diff --git a/design-system/documentation.json b/design-system/documentation.json index 2989aa8..2a97e47 100644 --- a/design-system/documentation.json +++ b/design-system/documentation.json @@ -786,11 +786,11 @@ "args": [], "line": 13 }, - "templateData": "
\n \n \n
\n\n" + "templateData": "
\n \n \n
\n\n" }, { "name": "ButtonComponent", - "id": "component-ButtonComponent-49659faee6154b9bcc4f411fcdc2bda1", + "id": "component-ButtonComponent-50edec0166108d84fec1745c9bb5a4c2", "file": "projects/lib/src/components/inputs/button/button.component.ts", "encapsulation": [], "entryComponents": [], @@ -827,6 +827,13 @@ "line": 40, "type": "boolean" }, + { + "name": "fillWidth", + "defaultValue": "false", + "description": "

Faz ou não o botão preencher a largura do container. (classe w-100)

\n", + "line": 48, + "type": "boolean" + }, { "name": "iconClass", "description": "

Ícone que será exibido no botão junto ao texto. Ex: uil uil-md uil-tabs

\n", @@ -877,7 +884,7 @@ "optional": false, "returnType": "string", "typeParameters": [], - "line": 48, + "line": 52, "modifierKind": [ 114 ] @@ -888,11 +895,11 @@ "description": "", "rawdescription": "", "type": "component", - "sourceCode": "import {Component, Input} from '@angular/core';\nimport {MainColors} from '../../../models/colors';\n\n@Component({\n selector: 'pm-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss']\n})\nexport class ButtonComponent {\n @Input('label') label: string | null = ''; // Usada só pra aparecer no storybook\n /**\n * Cor do botão que será exibido.\n * Utilizar as propriedades do tipo \"MainColors\"\n */\n @Input('type') type: MainColors | string = `${MainColors.default}`;\n /**\n * Exibe botão de \"carregamento\" e desabilita o botão.\n * Para alterar o texto, utilizar a propriedade `busyText`\n */\n @Input('busy') busy: boolean = false;\n /**\n * Texto exibido junto ao botão de \"carregando\" quando a propriedade `busy` está como `true`\n */\n @Input('busyText') busyText: string;\n /**\n * Ícone que será exibido no botão junto ao texto. Ex: `uil uil-md uil-tabs`\n */\n @Input('iconClass') iconClass: string;\n /**\n * Caso tenha ícone, indica se o ícone estará no começo ou fim do botão\n */\n @Input('iconPosition') iconPosition: 'start' | 'end' = 'start';\n /**\n * Se o botão será cheio ou apenas contornado pela borda\n */\n @Input('outline') outline: boolean = false;\n /**\n * Propriedade de habilitado ou desabilitado\n */\n @Input('disabled') disabled: boolean = false;\n /**\n * Tamanho do botão\n */\n @Input('size') size: 'sm' | 'md' = 'md';\n\n constructor() { }\n\n public getClassName(): string {\n let name = 'btn';\n if (this.size !== 'md') {\n name += ` ${this.size}`;\n }\n if (this.type) {\n if (this.outline) {\n name += ` btn-outline-${this.type}`;\n } else {\n name += ` btn-${this.type}`;\n }\n }\n if (this.iconClass) {\n name += ` d-flex flex-row`;\n }\n return name;\n }\n\n}\n", + "sourceCode": "import {Component, Input} from '@angular/core';\nimport {MainColors} from '../../../models/colors';\n\n@Component({\n selector: 'pm-button',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss']\n})\nexport class ButtonComponent {\n @Input('label') label: string | null = ''; // Usada só pra aparecer no storybook\n /**\n * Cor do botão que será exibido.\n * Utilizar as propriedades do tipo \"MainColors\"\n */\n @Input('type') type: MainColors | string = `${MainColors.default}`;\n /**\n * Exibe botão de \"carregamento\" e desabilita o botão.\n * Para alterar o texto, utilizar a propriedade `busyText`\n */\n @Input('busy') busy: boolean = false;\n /**\n * Texto exibido junto ao botão de \"carregando\" quando a propriedade `busy` está como `true`\n */\n @Input('busyText') busyText: string;\n /**\n * Ícone que será exibido no botão junto ao texto. Ex: `uil uil-md uil-tabs`\n */\n @Input('iconClass') iconClass: string;\n /**\n * Caso tenha ícone, indica se o ícone estará no começo ou fim do botão\n */\n @Input('iconPosition') iconPosition: 'start' | 'end' = 'start';\n /**\n * Se o botão será cheio ou apenas contornado pela borda\n */\n @Input('outline') outline: boolean = false;\n /**\n * Propriedade de habilitado ou desabilitado\n */\n @Input('disabled') disabled: boolean = false;\n /**\n * Tamanho do botão\n */\n @Input('size') size: 'sm' | 'md' = 'md';\n /**\n * Faz ou não o botão preencher a largura do container. (classe w-100)\n */\n @Input('fillWidth') fillWidth: boolean = false;\n\n constructor() { }\n\n public getClassName(): string {\n let name = 'pm-button btn';\n if (this.size !== 'md') {\n name += ` ${this.size}`;\n }\n if (this.fillWidth) {\n name += ' w-100';\n }\n if (this.type) {\n if (this.outline) {\n name += ` btn-outline-${this.type}`;\n } else {\n name += ` btn-${this.type}`;\n }\n }\n if (this.iconClass) {\n name += ` d-flex flex-row`;\n }\n return name;\n }\n\n}\n", "assetsDirs": [], "styleUrlsData": [ { - "data": ".pm-button {\n button {\n &:disabled {\n cursor: not-allowed;\n pointer-events: none;\n }\n\n &.sm {\n font-size: 0.7rem !important;\n padding: 0.2rem 0.5rem !important;\n }\n }\n}\n", + "data": "button {\n &.pm-button {\n &:disabled {\n cursor: not-allowed;\n pointer-events: none;\n }\n\n &.sm {\n font-size: 0.7rem !important;\n padding: 0.2rem 0.5rem !important;\n }\n }\n}\n", "styleUrl": "./button.component.scss" } ], @@ -901,9 +908,9 @@ "name": "constructor", "description": "", "args": [], - "line": 44 + "line": 48 }, - "templateData": "
\n \n
\n\n\n \n \n \n {{label}}\n \n \n \n\n\n\n \n\n\n" + "templateData": "\n\n\n \n \n \n {{label}}\n \n \n \n\n\n\n \n\n\n" }, { "name": "CheckboxComponent", @@ -1207,7 +1214,7 @@ }, { "name": "CopyContentInputComponent", - "id": "component-CopyContentInputComponent-bfa6a3c1d58c743a61a528776134b1ac", + "id": "component-CopyContentInputComponent-36e2b9d3b286bcf6c3659ae8c255ff37", "file": "projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.ts", "encapsulation": [], "entryComponents": [], @@ -1224,29 +1231,74 @@ ], "viewProviders": [], "inputsClass": [ + { + "name": "btnColor", + "defaultValue": "MainColors.primary", + "description": "

Faz o input ter altura 100%

\n", + "line": 30, + "type": "MainColors" + }, + { + "name": "copyCallback", + "description": "

Executa um comando ao copiar para a área de transferência

\n", + "line": 22, + "type": "function" + }, { "name": "disabled", "defaultValue": "true", "description": "

Desabilita a interação o input.

\n", - "line": 17 + "line": 18 + }, + { + "name": "fillHeight", + "defaultValue": "false", + "description": "

Faz o input ter altura 100%

\n", + "line": 26, + "type": "boolean" }, { "name": "text", "defaultValue": "''", "description": "

texto a ser exibido como conteúdo

\n", - "line": 13 + "line": 14 } ], "outputsClass": [], "propertiesClass": [], "methodsClass": [ + { + "name": "copyCallbackExecute", + "args": [ + { + "name": "inputText", + "type": "string" + } + ], + "optional": false, + "returnType": "void", + "typeParameters": [], + "line": 39, + "modifierKind": [ + 114 + ], + "jsdoctags": [ + { + "name": "inputText", + "type": "string", + "tagName": { + "text": "param" + } + } + ] + }, { "name": "ngOnInit", "args": [], "optional": false, "returnType": "void", "typeParameters": [], - "line": 26 + "line": 36 } ], "hostBindings": [], @@ -1254,11 +1306,11 @@ "description": "", "rawdescription": "", "type": "component", - "sourceCode": "import {Component, Input, OnInit} from '@angular/core';\n\n@Component({\n selector: 'pm-copy-content-input',\n templateUrl: './copy-content-input.component.html',\n styleUrls: ['./copy-content-input.component.scss']\n})\nexport class CopyContentInputComponent implements OnInit {\n\n /**\n * texto a ser exibido como conteúdo\n */\n @Input() text = '';\n /**\n * Desabilita a interação o input.\n */\n @Input() disabled = true;\n // public readonly notifier: SnotifyService;\n\n constructor(\n // private notifierService: SnotifyService\n ) {\n // this.notifier = notifierService;\n }\n\n ngOnInit(): void {\n }\n\n // /**\n // * Notifica que o valor foi copiado para a clipboard.\n // * O que copia mesmo é a diretiva [cdkCopyToClipboard]=\"texto\"\n // * @param inputElement: uma tag input\n // */\n // copyInputMessage(inputElement) {\n // this.notifier.info('Link copiado para a área de transferência')\n // }\n\n}\n", + "sourceCode": "import {Component, Input, OnInit} from '@angular/core';\nimport {MainColors} from '../../../models/colors';\n\n@Component({\n selector: 'pm-copy-content-input',\n templateUrl: './copy-content-input.component.html',\n styleUrls: ['./copy-content-input.component.scss']\n})\nexport class CopyContentInputComponent implements OnInit {\n\n /**\n * texto a ser exibido como conteúdo\n */\n @Input() text = '';\n /**\n * Desabilita a interação o input.\n */\n @Input() disabled = true;\n /**\n * Executa um comando ao copiar para a área de transferência\n */\n @Input() copyCallback: (inputText: string) => void;\n /**\n * Faz o input ter altura 100%\n */\n @Input() fillHeight: boolean = false;\n /**\n * Faz o input ter altura 100%\n */\n @Input() btnColor: MainColors = MainColors.primary;\n\n constructor(\n ) {\n }\n\n ngOnInit(): void {\n }\n\n public copyCallbackExecute(inputText: string): void {\n if (this.copyCallback) {\n this.copyCallback(inputText);\n }\n }\n\n}\n", "assetsDirs": [], "styleUrlsData": [ { - "data": "", + "data": ".btn-copy {\n min-width: 40px !important;\n max-width: 40px !important;\n display: flex !important;\n justify-content: center !important;\n padding: 3px !important;\n border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0 !important;\n}\n", "styleUrl": "./copy-content-input.component.scss" } ], @@ -1267,12 +1319,12 @@ "name": "constructor", "description": "", "args": [], - "line": 17 + "line": 30 }, "implements": [ "OnInit" ], - "templateData": "\n
\n \n \n
\n
\n" + "templateData": "\n
\n \n \n
\n
\n" }, { "name": "DialogComponent", @@ -2279,6 +2331,16 @@ "file": "ButtonComponent" } }, + { + "name": "fillWidth", + "defaultValue": "false", + "description": "

Faz ou não o botão preencher a largura do container. (classe w-100)

\n", + "line": 48, + "type": "boolean", + "inheritance": { + "file": "ButtonComponent" + } + }, { "name": "iconClass", "description": "

Ícone que será exibido no botão junto ao texto. Ex: uil uil-md uil-tabs

\n", @@ -2383,7 +2445,7 @@ "optional": false, "returnType": "string", "typeParameters": [], - "line": 48, + "line": 52, "modifierKind": [ 114 ], @@ -4360,7 +4422,7 @@ "subtype": "variable", "file": "projects/lib/src/components/cards/basic-card/basic-card.stories.ts", "type": "object", - "defaultValue": "{\n}" + "defaultValue": "{\n hoverable: false,\n borderRadius: Sizes.md,\n paddingClass: 'p-3'\n}" }, { "name": "defaultArgs", @@ -4382,17 +4444,17 @@ "name": "defaultArgs", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/inputs/button/button.stories.ts", + "file": "projects/lib/src/components/inputs/checkbox/checkbox.stories.ts", "type": "object", - "defaultValue": "{\n label: '',\n type: MainColors.default,\n busy: false,\n busyText: '',\n iconClass: '',\n iconPosition: 'start',\n outline: false,\n disabled: false,\n size: 'md'\n}" + "defaultValue": "{\n checked: false,\n disabled: false,\n selectedItem: undefined,\n}" }, { "name": "defaultArgs", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/inputs/checkbox/checkbox.stories.ts", + "file": "projects/lib/src/components/inputs/button/button.stories.ts", "type": "object", - "defaultValue": "{\n checked: false,\n disabled: false,\n selectedItem: undefined,\n}" + "defaultValue": "{\n label: '',\n type: MainColors.default,\n busy: false,\n busyText: '',\n iconClass: '',\n iconPosition: 'start',\n outline: false,\n disabled: false,\n size: 'md',\n fillWidth: false\n}" }, { "name": "defaultArgs", @@ -4408,7 +4470,7 @@ "subtype": "variable", "file": "projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.ts", "type": "object", - "defaultValue": "{\n disabled: false,\n text: ''\n}" + "defaultValue": "{\n disabled: false,\n text: '',\n copyCallback: undefined,\n fillHeight: false,\n btnColor: MainColors.primary\n}" }, { "name": "defaultArgs", @@ -4438,17 +4500,17 @@ "name": "defaultArgs", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/lists/table-list/table-list.stories.ts", + "file": "projects/lib/src/components/lists/grid-list/grid-list.stories.ts", "type": "object", - "defaultValue": "{\n columns: [],\n columnNames: [],\n imageColumns: [],\n imageHeight: '50px',\n showHeader: true,\n numberFormat: '1.2-2',\n numberPrefix: '',\n actionsTemplate: undefined,\n itemList: undefined,\n borderRadius: undefined,\n backgroundColor: undefined,\n expandedDetailTemplate: undefined,\n disableExpandedOnDisabledRow: true,\n expandedRow: undefined\n}" + "defaultValue": "{\n}" }, { "name": "defaultArgs", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/lists/grid-list/grid-list.stories.ts", + "file": "projects/lib/src/components/lists/table-list/table-list.stories.ts", "type": "object", - "defaultValue": "{\n}" + "defaultValue": "{\n columns: [],\n columnNames: [],\n imageColumns: [],\n imageHeight: '50px',\n showHeader: true,\n numberFormat: '1.2-2',\n numberPrefix: '',\n actionsTemplate: undefined,\n itemList: undefined,\n borderRadius: undefined,\n backgroundColor: undefined,\n expandedDetailTemplate: undefined,\n disableExpandedOnDisabledRow: true,\n expandedRow: undefined\n}" }, { "name": "defaultArgs", @@ -4759,7 +4821,7 @@ "subtype": "variable", "file": "projects/lib/src/components/cards/basic-card/basic-card.stories.ts", "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" }, { "name": "Template", @@ -4781,17 +4843,17 @@ "name": "Template", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/inputs/button/button.stories.ts", - "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Button Content\n \n `\n})" + "file": "projects/lib/src/components/inputs/checkbox/checkbox.stories.ts", + "type": "Story", + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Checkbox\n \n `\n})" }, { "name": "Template", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/inputs/checkbox/checkbox.stories.ts", - "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Checkbox\n \n `\n})" + "file": "projects/lib/src/components/inputs/button/button.stories.ts", + "type": "Story", + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Button Content\n \n `\n})" }, { "name": "Template", @@ -4807,7 +4869,7 @@ "subtype": "variable", "file": "projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.ts", "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Conteúdo\n \n `\n})" + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" }, { "name": "Template", @@ -4837,17 +4899,17 @@ "name": "Template", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/lists/table-list/table-list.stories.ts", - "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: ``\n})" + "file": "projects/lib/src/components/lists/grid-list/grid-list.stories.ts", + "type": "Story", + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" }, { "name": "Template", "ctype": "miscellaneous", "subtype": "variable", - "file": "projects/lib/src/components/lists/grid-list/grid-list.stories.ts", - "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" + "file": "projects/lib/src/components/lists/table-list/table-list.stories.ts", + "type": "Story", + "defaultValue": "(args) => ({\n props: args,\n template: ``\n})" }, { "name": "Template", @@ -5232,7 +5294,7 @@ "subtype": "variable", "file": "projects/lib/src/components/inputs/button/button.stories.ts", "type": "object", - "defaultValue": "{\n label: '',\n type: MainColors.default,\n busy: false,\n busyText: '',\n iconClass: '',\n iconPosition: 'start',\n outline: false,\n disabled: false,\n size: 'md'\n}" + "defaultValue": "{\n label: '',\n type: MainColors.default,\n busy: false,\n busyText: '',\n iconClass: '',\n iconPosition: 'start',\n outline: false,\n disabled: false,\n size: 'md',\n fillWidth: false\n}" }, { "name": "DefaultButton", @@ -5304,7 +5366,7 @@ "subtype": "variable", "file": "projects/lib/src/components/inputs/button/button.stories.ts", "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Button Content\n \n `\n})" + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Button Content\n \n `\n})" }, { "name": "WarningButton", @@ -5437,7 +5499,7 @@ "subtype": "variable", "file": "projects/lib/src/components/cards/basic-card/basic-card.stories.ts", "type": "object", - "defaultValue": "{\n}" + "defaultValue": "{\n hoverable: false,\n borderRadius: Sizes.md,\n paddingClass: 'p-3'\n}" }, { "name": "DefaultBasicCard", @@ -5453,7 +5515,7 @@ "subtype": "variable", "file": "projects/lib/src/components/cards/basic-card/basic-card.stories.ts", "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" } ], "projects/lib/src/components/containers/expansion-panel/expansion-panel.stories.ts": [ @@ -5557,7 +5619,7 @@ "subtype": "variable", "file": "projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.ts", "type": "object", - "defaultValue": "{\n disabled: false,\n text: ''\n}" + "defaultValue": "{\n disabled: false,\n text: '',\n copyCallback: undefined,\n fillHeight: false,\n btnColor: MainColors.primary\n}" }, { "name": "DefaultCopyContentInput", @@ -5573,7 +5635,7 @@ "subtype": "variable", "file": "projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.ts", "type": "Story", - "defaultValue": "(args) => ({\n props: args,\n template: `\n \n Conteúdo\n \n `\n})" + "defaultValue": "(args) => ({\n props: args,\n template: `\n \n \n `\n})" } ], "projects/lib/src/components/inputs/dropdown-actions/dropdown-actions.stories.ts": [ @@ -6146,8 +6208,8 @@ "type": "component", "linktype": "component", "name": "ButtonComponent", - "coveragePercent": 66, - "coverageCount": "8/12", + "coveragePercent": 69, + "coverageCount": "9/13", "status": "good" }, { @@ -6392,9 +6454,9 @@ "type": "component", "linktype": "component", "name": "CopyContentInputComponent", - "coveragePercent": 40, - "coverageCount": "2/5", - "status": "medium" + "coveragePercent": 55, + "coverageCount": "5/9", + "status": "good" }, { "filePath": "projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.ts", @@ -6431,8 +6493,8 @@ "type": "component", "linktype": "component", "name": "DropdownActionsComponent", - "coveragePercent": 44, - "coverageCount": "8/18", + "coveragePercent": 47, + "coverageCount": "9/19", "status": "medium" }, { diff --git a/design-system/projects/lib/package.json b/design-system/projects/lib/package.json index 8f95c9d..a9ffc9d 100644 --- a/design-system/projects/lib/package.json +++ b/design-system/projects/lib/package.json @@ -1,6 +1,6 @@ { "name": "@mprisma/components", - "version": "0.0.68", + "version": "0.0.69", "repository": { "type": "git", "url": "https://github.com/gabriel-gn/prisma-components.git" diff --git a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.html b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.html index b90ef0f..81f2456 100644 --- a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.html +++ b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.html @@ -1,9 +1,16 @@ -
- -
diff --git a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.scss b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.scss index e69de29..10adba1 100644 --- a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.scss +++ b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.scss @@ -0,0 +1,7 @@ +.btn-copy { + min-width: 40px !important; + max-width: 40px !important; + display: flex !important; + justify-content: center !important; + padding: 3px !important; +} diff --git a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.ts b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.ts index 270efba..4ff6736 100644 --- a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.ts +++ b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.component.ts @@ -1,4 +1,6 @@ import {Component, Input, OnInit} from '@angular/core'; +import {MainColors} from '../../../models/colors'; +import {Sizes} from '../../../models/sizes'; @Component({ selector: 'pm-copy-content-input', @@ -15,24 +17,35 @@ export class CopyContentInputComponent implements OnInit { * Desabilita a interação o input. */ @Input() disabled = true; - // public readonly notifier: SnotifyService; + /** + * Executa um comando ao copiar para a área de transferência + */ + @Input() copyCallback: (inputText: string) => void; + /** + * Faz o input ter altura 100% + */ + @Input() fillHeight: boolean = false; + /** + * Faz o input ter altura 100% + */ + @Input() btnColor: MainColors = MainColors.primary; + /** + * Raio da borda + */ + @Input() borderRadius: Sizes = Sizes.md; + constructor( - // private notifierService: SnotifyService ) { - // this.notifier = notifierService; } ngOnInit(): void { } - // /** - // * Notifica que o valor foi copiado para a clipboard. - // * O que copia mesmo é a diretiva [cdkCopyToClipboard]="texto" - // * @param inputElement: uma tag input - // */ - // copyInputMessage(inputElement) { - // this.notifier.info('Link copiado para a área de transferência') - // } + public copyCallbackExecute(inputText: string): void { + if (this.copyCallback) { + this.copyCallback(inputText); + } + } } diff --git a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.mdx b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.mdx index 223aeda..457886b 100644 --- a/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.mdx +++ b/design-system/projects/lib/src/components/inputs/copy-content-input/copy-content-input.stories.mdx @@ -6,7 +6,7 @@ import SourceStory from '!!raw-loader!./copy-content-input.stories'; import { defaultArgs, DefaultCopyContentInput, -} from "./copy-content-input.stories"; +} from "./copy-content-input.stories"; import {MainColors} from "../../../models/colors"; import {Sizes} from "../../../models/sizes"; export const argTypes = { disabled: { @@ -22,6 +22,18 @@ export const argTypes = { }, control: { type: 'text'} }, + btnColor: { + table: { + defaultValue: { summary: defaultArgs.btnColor}, + }, + control: {type: 'select'}, options: Object.values(MainColors), + }, + borderRadius: { + table: { + defaultValue: { summary: defaultArgs.borderRadius}, + }, + control: {type: 'select'}, options: Object.values(Sizes), + }, } = (args) => ({ - Conteúdo ` }); export const defaultArgs = { disabled: false, - text: '' + text: '', + copyCallback: undefined, + fillHeight: false, + btnColor: MainColors.primary, + borderRadius: Sizes.md }; export const DefaultCopyContentInput = Template.bind({}); diff --git a/design-system/projects/lib/src/styles/default/_buttons.scss b/design-system/projects/lib/src/styles/default/_buttons.scss index 388c05c..ce680b0 100644 --- a/design-system/projects/lib/src/styles/default/_buttons.scss +++ b/design-system/projects/lib/src/styles/default/_buttons.scss @@ -44,16 +44,6 @@ border: none; } -.btn-copy { - @extend .btn-primary; - min-width: 40px !important; - max-width: 40px !important; - display: flex !important; - justify-content: center !important; - padding: 3px !important; - border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0 !important; -} - .btn-icon-action { box-shadow: none !important; outline: none !important;