@rededor/cura 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/icons/iconset-default-tmp.svg +9 -0
- package/dist/assets/icons/iconset-default.svg +1 -1
- package/dist/cjs/cura-button_10.cjs.entry.js +1 -1
- package/dist/cjs/cura-button_10.cjs.entry.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-tmp.svg +9 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/doc.svg +5 -5
- package/dist/collection/assets-raw/icons/default/examDoc.svg +8 -0
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js +93 -47
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +168 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +168 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.stories.js +75 -0
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +56 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.stories.js +80 -0
- package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -0
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js +91 -0
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +94 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -0
- package/dist/collection/utils/utils.js +12 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/p-19176c44.system.js +1 -1
- package/dist/cura/{p-b7e3230a.entry.js → p-d184517b.entry.js} +2 -2
- package/dist/cura/{p-b7e3230a.entry.js.map → p-d184517b.entry.js.map} +1 -1
- package/dist/cura/{p-e45582d9.system.entry.js → p-eec653ca.system.entry.js} +2 -2
- package/dist/cura/{p-e45582d9.system.entry.js.map → p-eec653ca.system.entry.js.map} +1 -1
- package/dist/esm/cura-button_10.entry.js +1 -1
- package/dist/esm/cura-button_10.entry.js.map +1 -1
- package/dist/esm-es5/cura-button_10.entry.js +1 -1
- package/dist/esm-es5/cura-button_10.entry.js.map +1 -1
- package/dist/types/components/buttons/cura-button/cura-button.stories.d.ts +87 -35
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.stories.d.ts +171 -0
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.stories.d.ts +171 -0
- package/dist/types/components/cura-icon/cura-icon.stories.d.ts +65 -0
- package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.stories.d.ts +43 -0
- package/dist/types/components/text/cura-display/cura-display.stories.d.ts +76 -0
- package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +90 -0
- package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +74 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +2 -2
- /package/dist/collection/stories/{Button.stories.js → Button.st.js} +0 -0
- /package/dist/collection/stories/{Header.stories.js → Header.st.js} +0 -0
- /package/dist/collection/stories/{Page.stories.js → Page.st.js} +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import iconNames from '../../../assets/icons/iconset-default-list';
|
|
14
|
+
export default {
|
|
15
|
+
title: 'Components/Buttons/Button Outline',
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
render: (_a) => {
|
|
18
|
+
var { label } = _a, args = __rest(_a, ["label"]);
|
|
19
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
20
|
+
// return `<div>${label}</div>`;
|
|
21
|
+
return `<cura-button-outline
|
|
22
|
+
size="${args.size}"
|
|
23
|
+
disabled="${args.disabled}"
|
|
24
|
+
is-loading="${args.isLoading}"
|
|
25
|
+
color="${args.color}"
|
|
26
|
+
font-color="${args.fontColor}"
|
|
27
|
+
icon-name="${args.iconName}"
|
|
28
|
+
icon-position="${args.iconPosition}"
|
|
29
|
+
icon-only="${args.iconOnly}"
|
|
30
|
+
href="${args.href}"
|
|
31
|
+
target="${args.target}"
|
|
32
|
+
text-align="${args.textAlign}"
|
|
33
|
+
style="${args.fullWidth ? 'width: 100%' : ''}">
|
|
34
|
+
${label}
|
|
35
|
+
</cura-button-outline>`;
|
|
36
|
+
},
|
|
37
|
+
argTypes: {
|
|
38
|
+
label: {
|
|
39
|
+
control: 'text',
|
|
40
|
+
description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',
|
|
41
|
+
name: 'Label'
|
|
42
|
+
},
|
|
43
|
+
disabled: {
|
|
44
|
+
control: 'boolean',
|
|
45
|
+
description: 'Estado desabilitado.',
|
|
46
|
+
table: {
|
|
47
|
+
category: 'State',
|
|
48
|
+
defaultValue: { summary: 'false' }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
isLoading: {
|
|
52
|
+
control: 'boolean',
|
|
53
|
+
description: 'Estado de carregamento. Também desabilita ação do botão e pode ser usado em conjunto com a propriedade disabled.',
|
|
54
|
+
table: {
|
|
55
|
+
category: 'State',
|
|
56
|
+
defaultValue: { summary: 'false' }
|
|
57
|
+
},
|
|
58
|
+
name: 'is-loading'
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
control: { type: 'inline-radio' },
|
|
62
|
+
options: ['small', 'medium', 'large'],
|
|
63
|
+
description: 'Tamanhos disponíveis.',
|
|
64
|
+
table: {
|
|
65
|
+
category: 'Properties',
|
|
66
|
+
defaultValue: { summary: 'medium' }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
color: {
|
|
70
|
+
control: { type: 'select' },
|
|
71
|
+
options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],
|
|
72
|
+
description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
|
|
73
|
+
table: {
|
|
74
|
+
category: 'Properties',
|
|
75
|
+
defaultValue: { summary: 'accent' }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
fontColor: {
|
|
79
|
+
control: { type: 'inline-radio' },
|
|
80
|
+
options: ['dark', 'light'],
|
|
81
|
+
description: 'Define cor clara ou escura de acordo com contexto.',
|
|
82
|
+
table: {
|
|
83
|
+
category: 'Properties',
|
|
84
|
+
defaultValue: { summary: 'dark' }
|
|
85
|
+
},
|
|
86
|
+
name: 'font-color'
|
|
87
|
+
},
|
|
88
|
+
textAlign: {
|
|
89
|
+
control: { type: 'inline-radio' },
|
|
90
|
+
options: ['left', 'center', 'right'],
|
|
91
|
+
description: 'Alinha texto de múltiplas linhas.',
|
|
92
|
+
table: {
|
|
93
|
+
category: 'Properties',
|
|
94
|
+
defaultValue: { summary: 'left' }
|
|
95
|
+
},
|
|
96
|
+
name: 'text-align'
|
|
97
|
+
},
|
|
98
|
+
fullWidth: {
|
|
99
|
+
control: 'boolean',
|
|
100
|
+
description: 'Não é uma propriedade do componente. Aplicado como estilo CSS diretamente para visualização em largura total',
|
|
101
|
+
table: {
|
|
102
|
+
category: 'CSS',
|
|
103
|
+
defaultValue: { summary: 'false' }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
iconName: {
|
|
107
|
+
control: { type: 'select' },
|
|
108
|
+
options: iconNames,
|
|
109
|
+
description: 'Nome do ícone a ser utilizado no iconset.',
|
|
110
|
+
table: {
|
|
111
|
+
category: 'Icons'
|
|
112
|
+
},
|
|
113
|
+
name: 'icon-name'
|
|
114
|
+
},
|
|
115
|
+
iconPosition: {
|
|
116
|
+
control: { type: 'inline-radio' },
|
|
117
|
+
options: ['left', 'right'],
|
|
118
|
+
description: 'Posição do ícone no botão.',
|
|
119
|
+
table: {
|
|
120
|
+
category: 'Icons',
|
|
121
|
+
defaultValue: { summary: 'left' }
|
|
122
|
+
},
|
|
123
|
+
name: 'icon-position'
|
|
124
|
+
},
|
|
125
|
+
iconOnly: {
|
|
126
|
+
control: 'boolean',
|
|
127
|
+
description: 'Oculta o label do botão exibindo somente o ícone.',
|
|
128
|
+
table: {
|
|
129
|
+
category: 'Icons',
|
|
130
|
+
defaultValue: { summary: 'false' }
|
|
131
|
+
},
|
|
132
|
+
name: 'icon-only'
|
|
133
|
+
},
|
|
134
|
+
href: {
|
|
135
|
+
control: 'text',
|
|
136
|
+
description: `Se definido o elemento de ação renderizado internamente será um link.`,
|
|
137
|
+
table: {
|
|
138
|
+
category: 'Properties'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
target: {
|
|
142
|
+
control: 'text',
|
|
143
|
+
description: 'Define o comportamento de abertura do link quando href for informado.',
|
|
144
|
+
table: {
|
|
145
|
+
category: 'Properties',
|
|
146
|
+
defaultValue: { summary: '_self' }
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
export const ButtonOutline = {
|
|
152
|
+
args: {
|
|
153
|
+
label: 'Button',
|
|
154
|
+
size: 'medium',
|
|
155
|
+
color: 'primary',
|
|
156
|
+
fontColor: 'dark',
|
|
157
|
+
textAlign: 'left',
|
|
158
|
+
iconName: iconNames[0],
|
|
159
|
+
iconPosition: 'left',
|
|
160
|
+
iconOnly: false,
|
|
161
|
+
disabled: false,
|
|
162
|
+
isLoading: false,
|
|
163
|
+
href: '',
|
|
164
|
+
target: '_self',
|
|
165
|
+
fullWidth: false,
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=cura-button-outline.stories.js.map
|
package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-button-outline.stories.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-outline/cura-button-outline.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,eAAe;EACb,KAAK,EAAE,mCAAmC;EAC1C,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;QAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;IACvB,mFAAmF;IACnF,gCAAgC;IAChC,OAAO;UACD,IAAI,CAAC,IAAI;cACL,IAAI,CAAC,QAAQ;gBACX,IAAI,CAAC,SAAS;WACnB,IAAI,CAAC,KAAK;gBACL,IAAI,CAAC,SAAS;eACf,IAAI,CAAC,QAAQ;mBACT,IAAI,CAAC,YAAY;eACrB,IAAI,CAAC,QAAQ;UAClB,IAAI,CAAC,IAAI;YACP,IAAI,CAAC,MAAM;gBACP,IAAI,CAAC,SAAS;WACnB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;MACxC,K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O,EAAE,MAAM;MACf,WAAW,EAAE,uEAAuE;MACpF,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;OACvB;KACF;IACD,MAAM,EAAE;MACN,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,uEAAuE;MACpF,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;OAClC;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;EAC3B,IAAI,EAAE;IACJ,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IACtB,YAAY,EAAE,MAAM;IACpB,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,KAAK;GACjB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\n\nexport default {\n title: 'Components/Buttons/Button Outline',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n // You can either use a function to create DOM elements or use a plain html string!\n // return `<div>${label}</div>`;\n return `<cura-button-outline\n size=\"${args.size}\"\n disabled=\"${args.disabled}\"\n is-loading=\"${args.isLoading}\"\n color=\"${args.color}\"\n font-color=\"${args.fontColor}\"\n icon-name=\"${args.iconName}\"\n icon-position=\"${args.iconPosition}\"\n icon-only=\"${args.iconOnly}\"\n href=\"${args.href}\"\n target=\"${args.target}\"\n text-align=\"${args.textAlign}\"\n style=\"${args.fullWidth ? 'width: 100%' : ''}\">\n ${label}\n</cura-button-outline>`;\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',\n name: 'Label'\n },\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: 'false'}\n }\n },\n isLoading: {\n control: 'boolean',\n description: 'Estado de carregamento. Também desabilita ação do botão e pode ser usado em conjunto com a propriedade disabled.',\n table: {\n category: 'State',\n defaultValue: { summary: 'false'}\n },\n name: 'is-loading'\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'accent'}\n }\n },\n fontColor: {\n control: { type: 'inline-radio' },\n options: ['dark', 'light'],\n description: 'Define cor clara ou escura de acordo com contexto.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'dark'}\n },\n name: 'font-color'\n },\n textAlign: {\n control: { type: 'inline-radio' },\n options: ['left', 'center', 'right'],\n description: 'Alinha texto de múltiplas linhas.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'left'}\n },\n name: 'text-align'\n },\n fullWidth: {\n control: 'boolean',\n description: 'Não é uma propriedade do componente. Aplicado como estilo CSS diretamente para visualização em largura total',\n table: {\n category: 'CSS',\n defaultValue: { summary: 'false'}\n }\n },\n iconName: {\n control: {type: 'select' },\n options: iconNames,\n description: 'Nome do ícone a ser utilizado no iconset.',\n table: {\n category: 'Icons'\n },\n name: 'icon-name'\n },\n iconPosition: {\n control: { type: 'inline-radio' },\n options: ['left', 'right'],\n description: 'Posição do ícone no botão.',\n table: {\n category: 'Icons',\n defaultValue: { summary: 'left'}\n },\n name: 'icon-position'\n },\n iconOnly: {\n control: 'boolean',\n description: 'Oculta o label do botão exibindo somente o ícone.',\n table: {\n category: 'Icons',\n defaultValue: { summary: 'false'}\n },\n name: 'icon-only'\n },\n href: {\n control: 'text',\n description: `Se definido o elemento de ação renderizado internamente será um link.`,\n table: {\n category: 'Properties'\n }\n },\n target: {\n control: 'text',\n description: 'Define o comportamento de abertura do link quando href for informado.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '_self'}\n }\n }\n },\n};\n\nexport const ButtonOutline = {\n args: {\n label: 'Button',\n size: 'medium',\n color: 'primary',\n fontColor: 'dark',\n textAlign: 'left',\n iconName: iconNames[0],\n iconPosition: 'left',\n iconOnly: false,\n disabled: false,\n isLoading: false,\n href: '',\n target: '_self',\n fullWidth: false,\n },\n};\n"]}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import iconNames from '../../../assets/icons/iconset-default-list';
|
|
14
|
+
export default {
|
|
15
|
+
title: 'Components/Buttons/Button Transparent',
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
render: (_a) => {
|
|
18
|
+
var { label } = _a, args = __rest(_a, ["label"]);
|
|
19
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
20
|
+
// return `<div>${label}</div>`;
|
|
21
|
+
return `<cura-button-transparent
|
|
22
|
+
size="${args.size}"
|
|
23
|
+
disabled="${args.disabled}"
|
|
24
|
+
is-loading="${args.isLoading}"
|
|
25
|
+
color="${args.color}"
|
|
26
|
+
font-color="${args.fontColor}"
|
|
27
|
+
icon-name="${args.iconName}"
|
|
28
|
+
icon-position="${args.iconPosition}"
|
|
29
|
+
icon-only="${args.iconOnly}"
|
|
30
|
+
href="${args.href}"
|
|
31
|
+
target="${args.target}"
|
|
32
|
+
text-align="${args.textAlign}"
|
|
33
|
+
style="${args.fullWidth ? 'width: 100%;' : ''}">
|
|
34
|
+
${label}
|
|
35
|
+
</cura-button-transparent>`;
|
|
36
|
+
},
|
|
37
|
+
argTypes: {
|
|
38
|
+
label: {
|
|
39
|
+
control: 'text',
|
|
40
|
+
description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',
|
|
41
|
+
name: 'Label'
|
|
42
|
+
},
|
|
43
|
+
disabled: {
|
|
44
|
+
control: 'boolean',
|
|
45
|
+
description: 'Estado desabilitado.',
|
|
46
|
+
table: {
|
|
47
|
+
category: 'State',
|
|
48
|
+
defaultValue: { summary: 'false' }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
isLoading: {
|
|
52
|
+
control: 'boolean',
|
|
53
|
+
description: 'Estado de carregamento. Também desabilita ação do botão e pode ser usado em conjunto com a propriedade disabled.',
|
|
54
|
+
table: {
|
|
55
|
+
category: 'State',
|
|
56
|
+
defaultValue: { summary: 'false' }
|
|
57
|
+
},
|
|
58
|
+
name: 'is-loading'
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
control: { type: 'inline-radio' },
|
|
62
|
+
options: ['small', 'medium', 'large'],
|
|
63
|
+
description: 'Tamanhos disponíveis.',
|
|
64
|
+
table: {
|
|
65
|
+
category: 'Properties',
|
|
66
|
+
defaultValue: { summary: 'medium' }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
color: {
|
|
70
|
+
control: { type: 'select' },
|
|
71
|
+
options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],
|
|
72
|
+
description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
|
|
73
|
+
table: {
|
|
74
|
+
category: 'Properties',
|
|
75
|
+
defaultValue: { summary: 'accent' }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
fontColor: {
|
|
79
|
+
control: { type: 'inline-radio' },
|
|
80
|
+
options: ['dark', 'light'],
|
|
81
|
+
description: 'Define cor clara ou escura de acordo com contexto.',
|
|
82
|
+
table: {
|
|
83
|
+
category: 'Properties',
|
|
84
|
+
defaultValue: { summary: 'dark' }
|
|
85
|
+
},
|
|
86
|
+
name: 'font-color'
|
|
87
|
+
},
|
|
88
|
+
textAlign: {
|
|
89
|
+
control: { type: 'inline-radio' },
|
|
90
|
+
options: ['left', 'center', 'right'],
|
|
91
|
+
description: 'Alinha texto de múltiplas linhas.',
|
|
92
|
+
table: {
|
|
93
|
+
category: 'Properties',
|
|
94
|
+
defaultValue: { summary: 'left' }
|
|
95
|
+
},
|
|
96
|
+
name: 'text-align'
|
|
97
|
+
},
|
|
98
|
+
fullWidth: {
|
|
99
|
+
control: 'boolean',
|
|
100
|
+
description: 'Não é uma propriedade do componente. Aplicado como estilo CSS diretamente para visualização em largura total',
|
|
101
|
+
table: {
|
|
102
|
+
category: 'CSS',
|
|
103
|
+
defaultValue: { summary: 'false' }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
iconName: {
|
|
107
|
+
control: { type: 'select' },
|
|
108
|
+
options: iconNames,
|
|
109
|
+
description: 'Nome do ícone a ser utilizado no iconset.',
|
|
110
|
+
table: {
|
|
111
|
+
category: 'Icons'
|
|
112
|
+
},
|
|
113
|
+
name: 'icon-name'
|
|
114
|
+
},
|
|
115
|
+
iconPosition: {
|
|
116
|
+
control: { type: 'inline-radio' },
|
|
117
|
+
options: ['left', 'right'],
|
|
118
|
+
description: 'Posição do ícone no botão.',
|
|
119
|
+
table: {
|
|
120
|
+
category: 'Icons',
|
|
121
|
+
defaultValue: { summary: 'left' }
|
|
122
|
+
},
|
|
123
|
+
name: 'icon-position'
|
|
124
|
+
},
|
|
125
|
+
iconOnly: {
|
|
126
|
+
control: 'boolean',
|
|
127
|
+
description: 'Oculta o label do botão exibindo somente o ícone.',
|
|
128
|
+
table: {
|
|
129
|
+
category: 'Icons',
|
|
130
|
+
defaultValue: { summary: 'false' }
|
|
131
|
+
},
|
|
132
|
+
name: 'icon-only'
|
|
133
|
+
},
|
|
134
|
+
href: {
|
|
135
|
+
control: 'text',
|
|
136
|
+
description: `Se definido o elemento de ação renderizado internamente será um link.`,
|
|
137
|
+
table: {
|
|
138
|
+
category: 'Properties'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
target: {
|
|
142
|
+
control: 'text',
|
|
143
|
+
description: 'Define o comportamento de abertura do link quando href for informado.',
|
|
144
|
+
table: {
|
|
145
|
+
category: 'Properties',
|
|
146
|
+
defaultValue: { summary: '_self' }
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
export const ButtonTransparent = {
|
|
152
|
+
args: {
|
|
153
|
+
label: 'Button',
|
|
154
|
+
size: 'medium',
|
|
155
|
+
color: 'primary',
|
|
156
|
+
fontColor: 'dark',
|
|
157
|
+
textAlign: 'left',
|
|
158
|
+
iconName: iconNames[0],
|
|
159
|
+
iconPosition: 'left',
|
|
160
|
+
iconOnly: false,
|
|
161
|
+
disabled: false,
|
|
162
|
+
isLoading: false,
|
|
163
|
+
href: '',
|
|
164
|
+
target: '_self',
|
|
165
|
+
fullWidth: false,
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=cura-button-transparent.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-button-transparent.stories.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-transparent/cura-button-transparent.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,eAAe;EACb,KAAK,EAAE,uCAAuC;EAC9C,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;QAA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I,EAAE,cAAc,EAAE;MACjC,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;MAC1B,WAAW,EAAE,4BAA4B;MACzC,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAC;OACjC;MACD,IAAI,EAAE,eAAe;KACtB;IACD,QAAQ,EAAE;MACR,OAAO,EAAE,SAAS;MAClB,WAAW,EAAE,mDAAmD;MAChE,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;OAClC;MACD,IAAI,EAAE,WAAW;KAClB;IACD,IAAI,EAAE;MACJ,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,uEAAuE;MACpF,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;OACvB;KACF;IACD,MAAM,EAAE;MACN,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,uEAAuE;MACpF,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;OAClC;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;EAC/B,IAAI,EAAE;IACJ,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IACtB,YAAY,EAAE,MAAM;IACpB,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,KAAK;GACjB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\n\nexport default {\n title: 'Components/Buttons/Button Transparent',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n // You can either use a function to create DOM elements or use a plain html string!\n // return `<div>${label}</div>`;\n return `<cura-button-transparent\n size=\"${args.size}\"\n disabled=\"${args.disabled}\"\n is-loading=\"${args.isLoading}\"\n color=\"${args.color}\"\n font-color=\"${args.fontColor}\"\n icon-name=\"${args.iconName}\"\n icon-position=\"${args.iconPosition}\"\n icon-only=\"${args.iconOnly}\"\n href=\"${args.href}\"\n target=\"${args.target}\"\n text-align=\"${args.textAlign}\"\n style=\"${args.fullWidth ? 'width: 100%;' : ''}\">\n ${label}\n</cura-button-transparent>`;\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',\n name: 'Label'\n },\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: 'false'}\n }\n },\n isLoading: {\n control: 'boolean',\n description: 'Estado de carregamento. Também desabilita ação do botão e pode ser usado em conjunto com a propriedade disabled.',\n table: {\n category: 'State',\n defaultValue: { summary: 'false'}\n },\n name: 'is-loading'\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'accent'}\n }\n },\n fontColor: {\n control: { type: 'inline-radio' },\n options: ['dark', 'light'],\n description: 'Define cor clara ou escura de acordo com contexto.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'dark'}\n },\n name: 'font-color'\n },\n textAlign: {\n control: { type: 'inline-radio' },\n options: ['left', 'center', 'right'],\n description: 'Alinha texto de múltiplas linhas.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'left'}\n },\n name: 'text-align'\n },\n fullWidth: {\n control: 'boolean',\n description: 'Não é uma propriedade do componente. Aplicado como estilo CSS diretamente para visualização em largura total',\n table: {\n category: 'CSS',\n defaultValue: { summary: 'false'}\n }\n },\n iconName: {\n control: {type: 'select' },\n options: iconNames,\n description: 'Nome do ícone a ser utilizado no iconset.',\n table: {\n category: 'Icons'\n },\n name: 'icon-name'\n },\n iconPosition: {\n control: { type: 'inline-radio' },\n options: ['left', 'right'],\n description: 'Posição do ícone no botão.',\n table: {\n category: 'Icons',\n defaultValue: { summary: 'left'}\n },\n name: 'icon-position'\n },\n iconOnly: {\n control: 'boolean',\n description: 'Oculta o label do botão exibindo somente o ícone.',\n table: {\n category: 'Icons',\n defaultValue: { summary: 'false'}\n },\n name: 'icon-only'\n },\n href: {\n control: 'text',\n description: `Se definido o elemento de ação renderizado internamente será um link.`,\n table: {\n category: 'Properties'\n }\n },\n target: {\n control: 'text',\n description: 'Define o comportamento de abertura do link quando href for informado.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '_self'}\n }\n }\n },\n};\n\nexport const ButtonTransparent = {\n args: {\n label: 'Button',\n size: 'medium',\n color: 'primary',\n fontColor: 'dark',\n textAlign: 'left',\n iconName: iconNames[0],\n iconPosition: 'left',\n iconOnly: false,\n disabled: false,\n isLoading: false,\n href: '',\n target: '_self',\n fullWidth: false,\n },\n};\n"]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import iconNames from '../../assets/icons/iconset-default-list';
|
|
14
|
+
import { getColorsWithDepths } from "../../utils/utils";
|
|
15
|
+
const colors = getColorsWithDepths();
|
|
16
|
+
export default {
|
|
17
|
+
title: 'Components/Icons/Icon',
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
render: (_a) => {
|
|
20
|
+
var { label } = _a, args = __rest(_a, ["label"]);
|
|
21
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
22
|
+
// return `<div>${label}</div>`;
|
|
23
|
+
return `<cura-icon
|
|
24
|
+
name="${args.name}"
|
|
25
|
+
color="${args.color}"
|
|
26
|
+
size="${args.size}"
|
|
27
|
+
disabled="${args.disabled}">
|
|
28
|
+
</cura-icon>`;
|
|
29
|
+
},
|
|
30
|
+
argTypes: {
|
|
31
|
+
disabled: {
|
|
32
|
+
control: 'boolean',
|
|
33
|
+
description: 'Estado desabilitado',
|
|
34
|
+
table: {
|
|
35
|
+
category: 'State',
|
|
36
|
+
defaultValue: { summary: 'false' }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
control: { type: 'select' },
|
|
41
|
+
options: ["128", "72", "64", "48", "40", "32", "24", "20", "16"],
|
|
42
|
+
description: 'Tamanhos disponíveis.',
|
|
43
|
+
table: {
|
|
44
|
+
category: 'Properties',
|
|
45
|
+
defaultValue: { summary: '24' }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
color: {
|
|
49
|
+
control: { type: 'select' },
|
|
50
|
+
options: colors,
|
|
51
|
+
description: 'Cor e profundidade (ex: primary-dark). Se nenhuma profundidade informada assumirá a base como padrão.',
|
|
52
|
+
table: {
|
|
53
|
+
category: 'Properties',
|
|
54
|
+
defaultValue: { summary: 'neutral' }
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
name: {
|
|
58
|
+
control: { type: 'select' },
|
|
59
|
+
options: iconNames,
|
|
60
|
+
description: 'Nome do ícone no iconset.',
|
|
61
|
+
table: {
|
|
62
|
+
category: 'Properties'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
export const Icon = {
|
|
68
|
+
args: {
|
|
69
|
+
name: iconNames[0],
|
|
70
|
+
size: '24',
|
|
71
|
+
color: 'neutral',
|
|
72
|
+
disabled: false,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=cura-icon.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-icon.stories.js","sourceRoot":"","sources":["../../../src/components/cura-icon/cura-icon.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,yCAAyC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;AAErC,eAAe;EACb,KAAK,EAAE,uBAAuB;EAC9B,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;QAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;IACvB,mFAAmF;IACnF,gCAAgC;IAChC,OAAO;UACD,IAAI,CAAC,IAAI;WACR,IAAI,CAAC,KAAK;UACX,IAAI,CAAC,IAAI;cACL,IAAI,CAAC,QAAQ;aACd,CAAC;EACZ,CAAC;EACD,QAAQ,EAAE;IACR,QAAQ,EAAE;MACR,OAAO,EAAE,SAAS;MAClB,WAAW,EAAE,qBAAqB;MAClC,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;OAClC;KACF;IACD,IAAI,EAAE;MACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;MAChE,WAAW,EAAE,uBAAuB;MACpC,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC;OAC/B;KACF;IACD,KAAK,EAAE;MACL,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,uGAAuG;MACpH,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC;OACpC;KACF;IACD,IAAI,EAAE;MACJ,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE;MAC1B,OAAO,EAAE,SAAS;MAClB,WAAW,EAAE,2BAA2B;MACxC,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;OACvB;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG;EAClB,IAAI,EAAE;IACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAClB,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,KAAK;GAChB;CACF,CAAC","sourcesContent":["import iconNames from '../../assets/icons/iconset-default-list';\nimport { getColorsWithDepths } from \"../../utils/utils\";\n\nconst colors = getColorsWithDepths();\n\nexport default {\n title: 'Components/Icons/Icon',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n // You can either use a function to create DOM elements or use a plain html string!\n // return `<div>${label}</div>`;\n return `<cura-icon\n name=\"${args.name}\"\n color=\"${args.color}\"\n size=\"${args.size}\"\n disabled=\"${args.disabled}\">\n</cura-icon>`;\n },\n argTypes: {\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado',\n table: {\n category: 'State',\n defaultValue: { summary: 'false'}\n }\n },\n size: {\n control: { type: 'select' },\n options: [\"128\", \"72\", \"64\", \"48\", \"40\", \"32\", \"24\", \"20\", \"16\"],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '24'}\n }\n },\n color: {\n control: { type: 'select' },\n options: colors,\n description: 'Cor e profundidade (ex: primary-dark). Se nenhuma profundidade informada assumirá a base como padrão.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'neutral'}\n }\n },\n name: {\n control: {type: 'select' },\n options: iconNames,\n description: 'Nome do ícone no iconset.',\n table: {\n category: 'Properties'\n }\n }\n },\n};\n\nexport const Icon = {\n args: {\n name: iconNames[0],\n size: '24',\n color: 'neutral',\n disabled: false,\n },\n};\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { getColorsWithDepths } from "../../../utils/utils";
|
|
14
|
+
const colors = getColorsWithDepths();
|
|
15
|
+
export default {
|
|
16
|
+
title: 'Components/Loaders/Loader Circle',
|
|
17
|
+
tags: ['autodocs'],
|
|
18
|
+
render: (_a) => {
|
|
19
|
+
var { label } = _a, args = __rest(_a, ["label"]);
|
|
20
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
21
|
+
// return `<div>${label}</div>`;
|
|
22
|
+
return `<cura-loader-circle
|
|
23
|
+
name="${args.name}"
|
|
24
|
+
color="${args.color}"
|
|
25
|
+
size="${args.size}"
|
|
26
|
+
disabled="${args.disabled}">
|
|
27
|
+
</cura-loader-circle>`;
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
size: {
|
|
31
|
+
control: { type: 'select' },
|
|
32
|
+
options: ['small', 'medium', 'large', 'xlarge'],
|
|
33
|
+
description: 'Tamanhos disponíveis.',
|
|
34
|
+
table: {
|
|
35
|
+
category: 'Properties',
|
|
36
|
+
defaultValue: { summary: 'medium' }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
color: {
|
|
40
|
+
control: { type: 'select' },
|
|
41
|
+
options: colors,
|
|
42
|
+
description: 'Cor e profundidade (ex: primary-dark). Se nenhuma profundidade informada assumirá a base como padrão.',
|
|
43
|
+
table: {
|
|
44
|
+
category: 'Properties',
|
|
45
|
+
defaultValue: { summary: 'neutral-white' }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
export const LoaderCircle = {
|
|
51
|
+
args: {
|
|
52
|
+
size: 'medium',
|
|
53
|
+
color: 'primary'
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=cura-loader-circle.stories.js.map
|
package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-loader-circle.stories.js","sourceRoot":"","sources":["../../../../src/components/loaders/cura-loader-circle/cura-loader-circle.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;AAErC,eAAe;EACb,KAAK,EAAE,kCAAkC;EACzC,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;QAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;IACvB,mFAAmF;IACnF,gCAAgC;IAChC,OAAO;UACD,IAAI,CAAC,IAAI;WACR,IAAI,CAAC,KAAK;UACX,IAAI,CAAC,IAAI;cACL,IAAI,CAAC,QAAQ;sBACL,CAAC;EACrB,CAAC;EACD,QAAQ,EAAE;IACR,IAAI,EAAE;MACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC;MAC/C,WAAW,EAAE,uBAAuB;MACpC,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAC;OACnC;KACF;IACD,KAAK,EAAE;MACL,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,uGAAuG;MACpH,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,eAAe,EAAC;OAC1C;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;EAC1B,IAAI,EAAE;IACJ,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;GACjB;CACF,CAAC","sourcesContent":["import { getColorsWithDepths } from \"../../../utils/utils\";\n\nconst colors = getColorsWithDepths();\n\nexport default {\n title: 'Components/Loaders/Loader Circle',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n // You can either use a function to create DOM elements or use a plain html string!\n // return `<div>${label}</div>`;\n return `<cura-loader-circle\n name=\"${args.name}\"\n color=\"${args.color}\"\n size=\"${args.size}\"\n disabled=\"${args.disabled}\">\n</cura-loader-circle>`;\n },\n argTypes: {\n size: {\n control: { type: 'select' },\n options: ['small', 'medium', 'large', 'xlarge'],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium'}\n }\n },\n color: {\n control: { type: 'select' },\n options: colors,\n description: 'Cor e profundidade (ex: primary-dark). Se nenhuma profundidade informada assumirá a base como padrão.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'neutral-white'}\n }\n }\n },\n};\n\nexport const LoaderCircle = {\n args: {\n size: 'medium',\n color: 'primary'\n },\n};\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Components/Text/Display',
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
render: (_a) => {
|
|
17
|
+
var { label } = _a, args = __rest(_a, ["label"]);
|
|
18
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
19
|
+
// return `<div>${label}</div>`;
|
|
20
|
+
return `<cura-display
|
|
21
|
+
level="${args.level}"
|
|
22
|
+
spot-color="${args.spotColor}"
|
|
23
|
+
size="${args.size}"
|
|
24
|
+
inverted="${args.inverted}">
|
|
25
|
+
${label}
|
|
26
|
+
</cura-display>
|
|
27
|
+
<cura-paragraph>Proin quis turpis et turpis efficitur dictum. Suspendisse egestas posuere libero. Sed non dapibus urna. Sed luctus tincidunt nibh, eu tincidunt justo. Curabitur at ullamcorper mauris, feugiat fermentum nulla. Quisque sed nibh in odio blandit mollis at quis dolor. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.</cura-paragraph>`;
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
label: {
|
|
31
|
+
control: 'text',
|
|
32
|
+
description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',
|
|
33
|
+
name: 'Content'
|
|
34
|
+
},
|
|
35
|
+
inverted: {
|
|
36
|
+
control: 'boolean',
|
|
37
|
+
description: 'Inverte cores do texto para aplicação em fundo escuro.',
|
|
38
|
+
table: {
|
|
39
|
+
category: 'Properties',
|
|
40
|
+
defaultValue: { summary: 'false' }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
control: { type: 'select' },
|
|
45
|
+
options: ['small', 'regular', 'large'],
|
|
46
|
+
description: 'Tamanhos disponíveis.',
|
|
47
|
+
table: {
|
|
48
|
+
category: 'Properties',
|
|
49
|
+
defaultValue: { summary: 'regular' }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
spotColor: {
|
|
53
|
+
control: { type: 'select' },
|
|
54
|
+
options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],
|
|
55
|
+
description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
|
|
56
|
+
table: {
|
|
57
|
+
category: 'Properties',
|
|
58
|
+
defaultValue: { summary: 'primary' }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
level: {
|
|
62
|
+
control: { type: 'number', min: 1, max: 6, step: 1 },
|
|
63
|
+
description: 'Define a tag semântica do título. Ex. h1, h2, h3, etc.',
|
|
64
|
+
table: {
|
|
65
|
+
category: 'Properties',
|
|
66
|
+
defaultValue: { summary: 'primary' }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
export const Display = {
|
|
72
|
+
args: {
|
|
73
|
+
label: 'Dolor sit <a href="https://www.rededorsaoluiz.com.br" target="_blank">amet</a>, consectetur adipiscing elit.',
|
|
74
|
+
size: 'regular',
|
|
75
|
+
level: 1,
|
|
76
|
+
spotColor: 'primary',
|
|
77
|
+
inverted: false,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=cura-display.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-display.stories.js","sourceRoot":"","sources":["../../../../src/components/text/cura-display/cura-display.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,eAAe;EACb,KAAK,EAAE,yBAAyB;EAChC,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAkB,EAAE,EAAE;QAAtB,EAAE,KAAK,OAAW,EAAN,IAAI,cAAhB,SAAkB,CAAF;IACvB,mFAAmF;IACnF,gCAAgC;IAChC,OAAO;WACA,IAAI,CAAC,KAAK;gBACL,IAAI,CAAC,SAAS;UACpB,IAAI,CAAC,IAAI;cACL,IAAI,CAAC,QAAQ;IACvB,KAAK;;8gBAEqgB,CAAC;EAC7gB,CAAC;EACD,QAAQ,EAAE;IACR,KAAK,EAAE;MACL,OAAO,EAAE,MAAM;MACf,WAAW,EAAE,qFAAqF;MAClG,IAAI,EAAE,SAAS;KAChB;IACD,QAAQ,EAAE;MACR,OAAO,EAAE,SAAS;MAClB,WAAW,EAAE,wDAAwD;MACrE,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;OAClC;KACF;IACD,IAAI,EAAE;MACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;MACtC,WAAW,EAAE,uBAAuB;MACpC,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC;OACpC;KACF;IACD,SAAS,EAAE;MACT,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;MAC7F,WAAW,EAAE,kEAAkE;MAC/E,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC;OACpC;KACF;IACD,KAAK,EAAE;MACL,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;MACpD,WAAW,EAAE,wDAAwD;MACrE,KAAK,EAAE;QACL,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC;OACpC;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;EACrB,IAAI,EAAE;IACJ,KAAK,EAAE,8GAA8G;IACrH,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,CAAC;IACR,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,KAAK;GAChB;CACF,CAAC","sourcesContent":["\nexport default {\n title: 'Components/Text/Display',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n // You can either use a function to create DOM elements or use a plain html string!\n // return `<div>${label}</div>`;\n return `<cura-display\n level=\"${args.level}\"\n spot-color=\"${args.spotColor}\"\n size=\"${args.size}\"\n inverted=\"${args.inverted}\">\n ${label}\n</cura-display>\n<cura-paragraph>Proin quis turpis et turpis efficitur dictum. Suspendisse egestas posuere libero. Sed non dapibus urna. Sed luctus tincidunt nibh, eu tincidunt justo. Curabitur at ullamcorper mauris, feugiat fermentum nulla. Quisque sed nibh in odio blandit mollis at quis dolor. Sed urna lacus, ultricies ac vulputate at, luctus eu ex. Duis at elit facilisis, iaculis orci sed, suscipit nisl. Phasellus semper lorem sed tincidunt semper. Morbi lobortis eu mi sed ultricies. Sed consequat id orci at iaculis.</cura-paragraph>`;\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',\n name: 'Content'\n },\n inverted: {\n control: 'boolean',\n description: 'Inverte cores do texto para aplicação em fundo escuro.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'false'}\n }\n },\n size: {\n control: { type: 'select' },\n options: ['small', 'regular', 'large'],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'regular'}\n }\n },\n spotColor: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'primary'}\n }\n },\n level: {\n control: { type: 'number', min: 1, max: 6, step: 1 },\n description: 'Define a tag semântica do título. Ex. h1, h2, h3, etc.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'primary'}\n }\n }\n },\n};\n\nexport const Display = {\n args: {\n label: 'Dolor sit <a href=\"https://www.rededorsaoluiz.com.br\" target=\"_blank\">amet</a>, consectetur adipiscing elit.',\n size: 'regular',\n level: 1,\n spotColor: 'primary',\n inverted: false,\n },\n};\n"]}
|