@rededor/cura 0.5.0 → 0.5.2
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/cjs/{app-globals-0e3b7fc6.js → app-globals-2988084b.js} +5 -5
- package/dist/cjs/app-globals-2988084b.js.map +1 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js +452 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +74 -0
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +29 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-label.cjs.entry.js +69 -0
- package/dist/cjs/cura-label.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/{index-72217b50.js → index-404d93e9.js} +247 -3
- package/dist/cjs/index-404d93e9.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/api/cura-api.type.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
- package/dist/collection/api/theme-presets/static.js +2 -2
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +1 -1
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
- package/dist/collection/components/buttons/cura-button/cura-button.js +4 -3
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js +1 -1
- 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.js +4 -3
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +4 -3
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
- package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
- package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.css +21 -38
- package/dist/collection/components/text/cura-display/cura-display.js +80 -49
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.stories.js +79 -34
- package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
- package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js +93 -37
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +79 -47
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
- package/dist/collection/index.js +3 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/cura-accordion-item.js +1 -1
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-button-outline.js +1 -1
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-transparent.js +1 -1
- package/dist/components/cura-button-transparent.js.map +1 -1
- package/dist/components/cura-button.js +1 -1
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-display.js +41 -35
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-heading.js +34 -21
- package/dist/components/cura-heading.js.map +1 -1
- package/dist/components/cura-label.d.ts +11 -0
- package/dist/components/cura-label.js +91 -0
- package/dist/components/cura-label.js.map +1 -0
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +25 -23
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/components/index.js +11 -5
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/p-03047b3e.entry.js +2 -0
- package/dist/cura/p-03047b3e.entry.js.map +1 -0
- package/dist/cura/p-0c79c54e.entry.js +2 -0
- package/dist/cura/p-0c79c54e.entry.js.map +1 -0
- package/dist/cura/p-120926c5.system.js +2 -0
- package/dist/cura/p-120926c5.system.js.map +1 -0
- package/dist/cura/p-223924fb.system.entry.js +2 -0
- package/dist/cura/p-223924fb.system.entry.js.map +1 -0
- package/dist/cura/p-46d20db3.js +3 -0
- package/dist/cura/p-46d20db3.js.map +1 -0
- package/dist/cura/p-48426f60.system.js +2 -0
- package/dist/cura/p-48426f60.system.js.map +1 -0
- package/dist/cura/p-49813052.entry.js +2 -0
- package/dist/cura/p-49813052.entry.js.map +1 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js +2 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js.map +1 -0
- package/dist/cura/p-7c8f3c77.system.entry.js +2 -0
- package/dist/cura/p-7c8f3c77.system.entry.js.map +1 -0
- package/dist/cura/p-8b18b5f7.system.js +2 -0
- package/dist/cura/p-8b18b5f7.system.js.map +1 -0
- package/dist/cura/p-91b0f78e.entry.js +2 -0
- package/dist/cura/p-91b0f78e.entry.js.map +1 -0
- package/dist/cura/p-a0395f90.entry.js +2 -0
- package/dist/cura/p-a0395f90.entry.js.map +1 -0
- package/dist/cura/p-a7ef255f.entry.js +2 -0
- package/dist/cura/p-a7ef255f.entry.js.map +1 -0
- package/dist/cura/p-c0c00396.system.js +3 -0
- package/dist/cura/p-c0c00396.system.js.map +1 -0
- package/dist/cura/p-ca054b07.system.entry.js +2 -0
- package/dist/cura/p-ca054b07.system.entry.js.map +1 -0
- package/dist/cura/p-d47b9cfe.system.entry.js +2 -0
- package/dist/cura/p-d47b9cfe.system.entry.js.map +1 -0
- package/dist/cura/p-f8fffdc1.js +2 -0
- package/dist/cura/p-f8fffdc1.js.map +1 -0
- package/dist/cura/p-fc77814b.system.entry.js +2 -0
- package/dist/cura/p-fc77814b.system.entry.js.map +1 -0
- package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
- package/dist/esm/app-globals-29001758.js.map +1 -0
- package/dist/esm/cura-accordion_8.entry.js +441 -0
- package/dist/esm/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +79 -0
- package/dist/esm/cura-button-outline.entry.js.map +1 -0
- package/dist/esm/cura-button-transparent.entry.js +79 -0
- package/dist/esm/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm/cura-display.entry.js +70 -0
- package/dist/esm/cura-display.entry.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +25 -0
- package/dist/esm/cura-icons-view.entry.js.map +1 -0
- package/dist/esm/cura-label.entry.js +65 -0
- package/dist/esm/cura-label.entry.js.map +1 -0
- package/dist/esm/cura.js +4 -4
- package/dist/esm/{index-9af0cdbd.js → index-d99da69e.js} +247 -3
- package/dist/esm/index-d99da69e.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm-es5/app-globals-29001758.js +2 -0
- package/dist/esm-es5/app-globals-29001758.js.map +1 -0
- package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
- package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-outline.entry.js +2 -0
- package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
- package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm-es5/cura-display.entry.js +2 -0
- package/dist/esm-es5/cura-display.entry.js.map +1 -0
- package/dist/esm-es5/cura-icons-view.entry.js +2 -0
- package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
- package/dist/esm-es5/cura-label.entry.js +2 -0
- package/dist/esm-es5/cura-label.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/cura.js.map +1 -1
- package/dist/esm-es5/index-d99da69e.js +3 -0
- package/dist/esm-es5/index-d99da69e.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/api/cura-api.type.d.ts +1 -0
- package/dist/types/components/buttons/cura-button/cura-button.d.ts +1 -1
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +1 -1
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +1 -1
- package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
- package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
- package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
- package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
- package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
- package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
- package/dist/types/components.d.ts +145 -52
- package/dist/types/index.d.ts +9 -0
- package/package.json +2 -4
- package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
- package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
- package/dist/cjs/index-72217b50.js.map +0 -1
- package/dist/cura/p-2cbf52f1.js +0 -3
- package/dist/cura/p-2cbf52f1.js.map +0 -1
- package/dist/cura/p-4cdbc8a1.system.entry.js +0 -2
- package/dist/cura/p-4cdbc8a1.system.entry.js.map +0 -1
- package/dist/cura/p-50ea2036.system.js +0 -2
- package/dist/cura/p-50ea2036.system.js.map +0 -1
- package/dist/cura/p-788e035b.system.js +0 -2
- package/dist/cura/p-788e035b.system.js.map +0 -1
- package/dist/cura/p-8da635b7.system.js +0 -3
- package/dist/cura/p-8da635b7.system.js.map +0 -1
- package/dist/cura/p-c54ce246.entry.js +0 -2
- package/dist/cura/p-c54ce246.entry.js.map +0 -1
- package/dist/cura/p-d5c64a5f.js +0 -2
- package/dist/cura/p-d5c64a5f.js.map +0 -1
- package/dist/cura/p-f4232daa.system.js +0 -2
- package/dist/cura/p-f4232daa.system.js.map +0 -1
- package/dist/esm/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm/cura-accordion_12.entry.js +0 -659
- package/dist/esm/cura-accordion_12.entry.js.map +0 -1
- package/dist/esm/index-9af0cdbd.js.map +0 -1
- package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
- package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
- package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
- package/dist/esm-es5/index-9af0cdbd.js +0 -3
- package/dist/esm-es5/index-9af0cdbd.js.map +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
5
|
+
const index = require('./index-404d93e9.js');
|
|
6
|
+
const appGlobals = require('./app-globals-2988084b.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Esm v3.3.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -32,7 +32,7 @@ const defineCustomElements = (win, options) => {
|
|
|
32
32
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
33
33
|
return patchEsm().then(() => {
|
|
34
34
|
appGlobals.globalScripts();
|
|
35
|
-
return index.bootstrapLazy([["cura-
|
|
35
|
+
return index.bootstrapLazy([["cura-accordion_8.cjs",[[1,"cura-button",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"colorMode":[1,"color-mode"],"opened":[1540],"styles":[32]}],[1,"cura-accordion",{"color":[513],"activeColor":[513,"active-color"],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"behavior":[513],"styles":[32]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-page-template",{"contentwidth":[513]}],[1,"cura-paragraph",{"size":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]],["cura-button-outline.cjs",[[1,"cura-button-outline",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-button-transparent.cjs",[[1,"cura-button-transparent",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-icons-view.cjs",[[1,"cura-icons-view",{"selected":[32]}]]],["cura-display.cjs",[[1,"cura-display",{"level":[514],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]],["cura-label.cjs",[[1,"cura-label",{"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]]], options);
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-api.type.js","sourceRoot":"","sources":["../../src/api/cura-api.type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cura-api.type.js","sourceRoot":"","sources":["../../src/api/cura-api.type.ts"],"names":[],"mappings":"AA+CC,CAAC;AAEF,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;EACxB,iCAAe,CAAA;EACf,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["export interface CuraCustomThemeColorDepth {\n base?: string,\n depth0?: string,\n depth20?: string,\n depth40?: string,\n depth80?: string,\n depth100?: string\n}\nexport interface CuraCustomThemeColors {\n primary?: CuraCustomThemeColorDepth,\n secondary?: CuraCustomThemeColorDepth,\n accent?: CuraCustomThemeColorDepth\n}\n\nexport interface CuraCustomThemeSpacing {\n base?: string;\n}\n\nexport interface CuraCustomThemeFontFamily {\n title?: string;\n body?: string;\n}\nexport interface CuraCustomThemeFontSize {\n base?: string;\n}\nexport interface CuraCustomThemeFont {\n family?: CuraCustomThemeFontFamily;\n size?: CuraCustomThemeFontSize;\n}\n\nexport interface CuraCustomThemeDefinitions {\n colors?: CuraCustomThemeColors,\n spacing?: CuraCustomThemeSpacing,\n font?: CuraCustomThemeFont\n}\n\nexport interface CuraCustomTheme {\n name: string;\n definitions: CuraCustomThemeDefinitions;\n fromPreset?: string;\n}\n\nexport interface CuraConfig {\n localAssetsPath?: string;\n theme?: string;\n customTheme?: CuraCustomTheme;\n onReady?(api? : any): any;\n};\n\nexport enum InterfaceModes {\n LIGHT = 'light',\n DARK = 'dark'\n}\n\nexport interface APIThemeFunctions {\n load(themeTag: string): unknown,\n setCustom(customThemeDefinitions: CuraCustomTheme): unknown,\n colors: {\n getColor(colorWithDepth?: string, opacity?: number): string,\n },\n fonts: {\n getFamily(type?: string): string,\n getWeights(): any,\n getSize(): string,\n getColor(): string\n },\n spacing: {\n getSpacing(): string,\n },\n breakpoints: {\n get(): any\n }\n}\n\n"]}
|
|
@@ -5,7 +5,7 @@ export default class CuraThemeBreakpointsModule {
|
|
|
5
5
|
get(size = null, position = null) {
|
|
6
6
|
if (size) {
|
|
7
7
|
const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];
|
|
8
|
-
if (breakpoint)
|
|
8
|
+
if (breakpoint || breakpoint === 0)
|
|
9
9
|
return breakpoint;
|
|
10
10
|
}
|
|
11
11
|
return Static.breakpoints;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-theme-breakpoints-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-breakpoints-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,0BAA0B;EAE7C,gBAAe,CAAC;EAEhB,wDAAwD;EACxD,GAAG,CAAC,OAA2D,IAAI,EAAE,WAA0B,IAAI;IACjG,IAAI,IAAI,EAAE;MACR,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;MAC5F,IAAI,UAAU;QAAE,OAAO,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"cura-theme-breakpoints-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-breakpoints-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,0BAA0B;EAE7C,gBAAe,CAAC;EAEhB,wDAAwD;EACxD,GAAG,CAAC,OAA2D,IAAI,EAAE,WAA0B,IAAI;IACjG,IAAI,IAAI,EAAE;MACR,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;MAC5F,IAAI,UAAU,IAAI,UAAU,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;KACvD;IACD,OAAO,MAAM,CAAC,WAAW,CAAC;EAC5B,CAAC;CACF","sourcesContent":["import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint || breakpoint === 0) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n"]}
|
|
@@ -28,7 +28,7 @@ export default class CuraThemeColorsModule {
|
|
|
28
28
|
*/
|
|
29
29
|
getColor(colorWithDepth = "primary-base", opacity = 1) {
|
|
30
30
|
const { color, depth } = this.splitColorDepth(colorWithDepth);
|
|
31
|
-
const staticColor = this.getStatic(color, depth);
|
|
31
|
+
const staticColor = this.getStatic(color, depth, opacity);
|
|
32
32
|
if (staticColor)
|
|
33
33
|
return staticColor;
|
|
34
34
|
return this.getDynamic(color, depth, opacity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-theme-colors-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-colors-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,qBAAqB;EAuBxC;IArBA,sBAAiB,GAAG;MAClB,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,oBAAe,GAAG;MAChB,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;KAChB,CAAA;EAEc,CAAC;EAEhB;;;;KAIG;EACH,QAAQ,CAAC,iBAAyB,cAAc,EAAE,OAAO,GAAG,CAAC;IAC3D,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;IAC9D,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cura-theme-colors-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-colors-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,qBAAqB;EAuBxC;IArBA,sBAAiB,GAAG;MAClB,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,SAAS,EAAE,KAAK;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,KAAK;MACf,OAAO,EAAE,KAAK;KACf,CAAC;IAEF,oBAAe,GAAG;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AAE,KAAa,EAAE,OAAe;IACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;MAC1C,CAAC,CAAC,gBAAgB,KAAK,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;MACxD,CAAC,CAAC,gBAAgB,KAAK,IAAI,KAAK,EAAE,CAAC;IACrC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC;MAC1E,CAAC,CAAC,YAAY,QAAQ,MAAM,OAAO,GAAG;MACtC,CAAC,CAAC,uCAAuC,OAAO,GAAG,CAAC;EACxD,CAAC;EAED;;;;KAIG;EACK,eAAe,CAAC,cAAsB;IAC5C,MAAM,CAAE,KAAK,EAAE,KAAK,CAAE,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrE,OAAO,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,EAAE,CAAC;EAC/D,CAAC;CAEF","sourcesContent":["import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n\n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/api/theme-presets/static.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;EACpB,YAAY;EACZ,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,IAAI,EAAE;MACJ,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,KAAK,EAAE;MACL,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,GAAG,EAAE,aAAa;MAClB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,UAAU;KAClB;GACF;EACD,WAAW,EAAE;IACX,MAAM,EAAE;MACN,GAAG,EAAE,CAAC;MACN,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,MAAM,EAAE;MACN,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,IAAI;KACV;IACD,MAAM,EAAE;MACN,GAAG,EAAE,IAAI;MACT,GAAG,EAAE,IAAI;KACV;GACF;CACF,CAAC","sourcesContent":["/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max:
|
|
1
|
+
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/api/theme-presets/static.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;EACpB,YAAY;EACZ,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,IAAI,EAAE;MACJ,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,KAAK,EAAE;MACL,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,OAAO,EAAE;MACP,GAAG,EAAE,aAAa;MAClB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,UAAU;KAClB;GACF;EACD,WAAW,EAAE;IACX,MAAM,EAAE;MACN,GAAG,EAAE,CAAC;MACN,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,MAAM,EAAE;MACN,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,IAAI;KACV;IACD,MAAM,EAAE;MACN,GAAG,EAAE,IAAI;MACT,GAAG,EAAE,IAAI;KACV;GACF;CACF,CAAC","sourcesContent":["/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1920\n },\n xlarge: {\n min: 1921,\n max: 4096\n }\n }\n};\n"]}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"./components/cura-icon/cura-icon.js",
|
|
9
9
|
"./components/cura-icons-view/cura-icons-view.js",
|
|
10
10
|
"./components/cura-page-template/cura-page-template.js",
|
|
11
|
+
"./components/forms/cura-label/cura-label.js",
|
|
11
12
|
"./components/loaders/cura-loader-circle/cura-loader-circle.js",
|
|
12
13
|
"./components/text/cura-display/cura-display.js",
|
|
13
14
|
"./components/text/cura-heading/cura-heading.js",
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import iconNames from '../../../assets/icons/iconset-default-list';
|
|
14
14
|
export default {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Componentes/Accordion/Accordion',
|
|
16
16
|
tags: ['autodocs'],
|
|
17
17
|
render: (_a) => {
|
|
18
18
|
var args = __rest(_a, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-accordion.stories.js","sourceRoot":"","sources":["../../../../src/components/accordion/cura-accordion/cura-accordion.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,eAAe;EACb,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"cura-accordion.stories.js","sourceRoot":"","sources":["../../../../src/components/accordion/cura-accordion/cura-accordion.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,eAAe;EACb,KAAK,EAAE,iCAAiC;EACxC,IAAI,EAAE,CAAC,UAAU,CAAC;EAClB,MAAM,EAAE,CAAC,EAAW,EAAE,EAAE;QAAV,IAAI,cAAT,EAAW,CAAF;IAChB,mFAAmF;IACnF,gCAAgC;IAChC,OAAO;aACE,IAAI,CAAC,KAAK;oBACH,IAAI,CAAC,WAAW;kBAClB,IAAI,CAAC,SAAS;iBACf,IAAI,CAAC,QAAQ;kBACZ,IAAI,CAAC,SAAS;iBACf,IAA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,SAAS,CAAC;MACjG,WAAW,EAAE,8EAA8E;MAC3F,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;OAClB;MACD,IAAI,EAAE,YAAY;KACnB;IACD,eAAe,EAAE;MACf,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;MAC3B,OAAO,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;MACjG,WAAW,EAAE,2FAA2F;MACxG,KAAK,EAAE;QACL,QAAQ,EAAE,OAAO;OAClB;MACD,IAAI,EAAE,mBAAmB;KAC1B;IAED,cAAc,EAAE;MACd,OAAO,EAAE,SAAS;MAClB,WAAW,EAAE,4HAA4H;MACzI,KAAK,EAAE;QACL,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAC;OAClC;KACF;GACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;EACvB,IAAI,EAAE;IACJ,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE,QAAQ;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;IACnB,QAAQ,EAAE,SAAS;IACnB,cAAc,EAAE,KAAK;GACtB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\n\nexport default {\n title: 'Componentes/Accordion/Accordion',\n tags: ['autodocs'],\n render: ({ ...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-accordion\n color=\"${args.color}\"\n active-color=\"${args.activeColor}\"\n color-mode=\"${args.colorMode}\"\n open-icon=\"${args.openIcon}\"\n close-icon=\"${args.closeIcon}\"\n icon-size=\"${args.iconSize}\"\n icon-color=\"${args.iconColor}\"\n icon-active-color=\"${args.iconActiveColor}\"\n behavior=\"${args.behavior}\"\n style=\"${args.darkBackground ? 'background-color: #999; padding: 10px' : 'padding: 10px'}\"\n >\n <cura-accordion-item label=\"Item 1\">\n Texto 1\n </cura-accordion-item>\n <cura-accordion-item label=\"Item 2\">\n Texto 2\n </cura-accordion-item>\n <cura-accordion-item label=\"Item 3\">\n Texto 3\n </cura-accordion-item>\n <cura-accordion-item label=\"Item 4\">\n Texto 4\n </cura-accordion-item>\n </cura-accordion>`;\n },\n argTypes: {\n color: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Define cor base do item. Cor do DS sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'primary'}\n },\n name: 'color'\n },\n activeColor: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Define cor base do item ativo. Cor do DS sem profundidade (ex: accent).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'accent'}\n },\n name: 'active-color'\n },\n colorMode: {\n control: { type: 'inline-radio' },\n options: ['dark', 'light'],\n description: 'Seta tema claro ou escuro.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'dark'}\n },\n name: 'color-mode'\n },\n behavior: {\n control: { type: 'inline-radio' },\n options: ['default', 'keep-open'],\n description: 'Comportamento do accordion.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'default'}\n },\n name: 'behavior'\n },\n openIcon: {\n control: { type: 'select' },\n options: iconNames,\n description: 'Ícone para abrir o item.',\n table: {\n category: 'Icons',\n defaultValue: { summary: 'down'}\n },\n name: 'open-icon'\n },\n closeIcon: {\n control: { type: 'select' },\n options: iconNames,\n description: 'Ícone para fechar o item.',\n table: {\n category: 'Icons',\n defaultValue: { summary: 'up'}\n },\n name: 'close-icon'\n },\n iconSize: {\n control: { type: 'select' },\n options: [\"128\", \"72\", \"64\", \"48\", \"40\", \"32\", \"24\", \"20\", \"16\"],\n description: 'Tamanho do ícone.',\n table: {\n category: 'Icons',\n defaultValue: { summary: '24'}\n },\n name: 'icon-size'\n },\n iconColor: {\n control: { type: 'select' },\n options: ['', 'primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor do ícone. (Por padrão ele utiliza a mesma cor da propriedade \\'color\\').',\n table: {\n category: 'Icons',\n },\n name: 'icon-color'\n },\n iconActiveColor: {\n control: { type: 'select' },\n options: ['', 'primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor do ícone ativo. (Por padrão ele utiliza a mesma cor da propriedade \\'active-color\\').',\n table: {\n category: 'Icons',\n },\n name: 'icon-active-color'\n },\n\n darkBackground: {\n control: 'boolean',\n description: 'Não é uma propriedade do componente. Aplicado como estilo CSS diretamente para visualização em temas escuros de background',\n table: {\n category: 'CSS',\n defaultValue: { summary: 'false'}\n }\n },\n },\n};\n\nexport const Accordion = {\n args: {\n color: 'primary',\n activeColor: 'accent',\n colorMode: 'dark',\n openIcon: 'down',\n closeIcon: 'up',\n iconSize: '24',\n iconColor: \"\",\n iconActiveColor: \"\",\n behavior: 'default',\n darkBackground: false,\n },\n};\n"]}
|
|
@@ -11,14 +11,18 @@
|
|
|
11
11
|
* Responsive media for large only.
|
|
12
12
|
* Use: @include large-only() { ... }
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* Responsive media for large and up.
|
|
16
|
-
* Use: @include large-up() { ... }
|
|
17
|
-
*/
|
|
18
14
|
/**
|
|
19
15
|
* Responsive media for xlarge only.
|
|
20
16
|
* Use: @include xlarge-only() { ... }
|
|
21
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* Responsive media for medium to large.
|
|
20
|
+
* Use: @include medium-large() { ... }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Responsive media for large and up.
|
|
24
|
+
* Use: @include large-up() { ... }
|
|
25
|
+
*/
|
|
22
26
|
:host {
|
|
23
27
|
display: block;
|
|
24
28
|
}
|
|
@@ -124,7 +128,7 @@
|
|
|
124
128
|
:host .accordion-item.active.inverted .label .label-container:active cura-icon {
|
|
125
129
|
--color: var(--icon-color-active-light) !important;
|
|
126
130
|
}
|
|
127
|
-
@media (min-width:
|
|
131
|
+
@media (min-width: 769px) and (max-width: 992px) {
|
|
128
132
|
:host .accordion-item .label .label-container {
|
|
129
133
|
font-size: 1.29em;
|
|
130
134
|
}
|
|
@@ -132,7 +136,7 @@
|
|
|
132
136
|
font-size: 1.14em;
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
|
-
@media (min-width:
|
|
139
|
+
@media (min-width: 993px) {
|
|
136
140
|
:host .accordion-item .label .label-container {
|
|
137
141
|
font-size: 1.29em;
|
|
138
142
|
}
|
|
@@ -7,7 +7,7 @@ export class CuraButton {
|
|
|
7
7
|
this.iconName = undefined;
|
|
8
8
|
this.iconset = 'default';
|
|
9
9
|
this.iconPosition = 'left';
|
|
10
|
-
this.iconOnly =
|
|
10
|
+
this.iconOnly = false;
|
|
11
11
|
this.href = undefined;
|
|
12
12
|
this.target = "_self";
|
|
13
13
|
this.color = 'accent';
|
|
@@ -189,7 +189,7 @@ export class CuraButton {
|
|
|
189
189
|
"type": "boolean",
|
|
190
190
|
"mutable": false,
|
|
191
191
|
"complexType": {
|
|
192
|
-
"original": "
|
|
192
|
+
"original": "boolean",
|
|
193
193
|
"resolved": "boolean",
|
|
194
194
|
"references": {}
|
|
195
195
|
},
|
|
@@ -200,7 +200,8 @@ export class CuraButton {
|
|
|
200
200
|
"text": "Set button to FAB/icon only."
|
|
201
201
|
},
|
|
202
202
|
"attribute": "icon-only",
|
|
203
|
-
"reflect": true
|
|
203
|
+
"reflect": true,
|
|
204
|
+
"defaultValue": "false"
|
|
204
205
|
},
|
|
205
206
|
"href": {
|
|
206
207
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-button.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button/cura-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,UAAU;;gBAKuC,QAAQ;oBAKlC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM
|
|
1
|
+
{"version":3,"file":"cura-button.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button/cura-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,UAAU;;gBAKuC,QAAQ;oBAKlC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM;oBAI5B,KAAK;;kBASP,OAAO;iBAKvB,QAAQ;qBAQ6B,MAAM;qBAKK,MAAM;kBAGpD,EAAE;;EAdpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAgBD,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;IAC1E,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACvF,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACvF,IAAI,CAAC,MAAM,CAAC,gBAAgB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-button',\n styleUrl: 'cura-button.scss',\n shadow: true,\n})\nexport class CuraButton {\n\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({reflect: true}) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Disabled state. Boolean.\n */\n @Prop({reflect: true}) disabled = false;\n /**\n * Loading state. Boolean.\n */\n @Prop({reflect: true}) isLoading = false;\n\n /**\n * Name of the icon to be used from iconset.\n */\n @Prop({reflect: true}) iconName: string;\n /**\n * Custom iconset if needed.\n */\n @Prop({reflect: true}) iconset = 'default';\n /**\n * Icon position: left (default) | right.\n */\n @Prop({reflect: true}) iconPosition: 'left' | 'right' = 'left';\n /**\n * Set button to FAB/icon only.\n */\n @Prop({reflect: true}) iconOnly = false;\n\n /**\n * Property href switch button to link.\n */\n @Prop({reflect: true}) href: string;\n /**\n * Set target if link.\n */\n @Prop({reflect: true}) target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n /**\n * Set the font color to dark or light.\n */\n @Prop({reflect: true}) fontColor: 'dark' | 'light' = 'dark';\n /**\n * Set text aligment for the button label.\n * Vales: left (default) | center | right.\n */\n @Prop({reflect: true}) textAlign: 'left' | 'center' | 'right' = 'left';\n\n\n @State() styles = {};\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--text-align'] = this.textAlign;\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes[`icon-only`] = this.iconOnly;\n classes['inverted'] = this.fontColor === 'light';\n classes['disabled'] = this.disabled;\n classes['isLoading'] = this.isLoading;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.getSymbolColor();\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n getSymbolColor() {\n return this.disabled\n ? 'neutral-dark'\n : this.fontColor === 'light'\n ? 'neutral-white'\n : 'neutral-black';\n }\n\n handleClick(e: Event) {\n if (this.disabled || this.isLoading) e.preventDefault();\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href}\n target={this.target}\n class={this.getClasses()}\n style={this.styles}\n onClick={(e) => this.handleClick(e)}>\n <span class=\"button-container\">\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </span>\n <cura-loader-circle size={this.size} color={this.getSymbolColor()}></cura-loader-circle>\n </a>\n ) : (\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled || null}\n onClick={(e) => this.handleClick(e)}>\n <span class=\"button-container\">\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </span>\n <cura-loader-circle size={this.size} color={this.getSymbolColor()}></cura-loader-circle>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import iconNames from '../../../assets/icons/iconset-default-list';
|
|
14
14
|
export default {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Componentes/Buttons/Button',
|
|
16
16
|
tags: ['autodocs'],
|
|
17
17
|
render: (_a) => {
|
|
18
18
|
var { label } = _a, args = __rest(_a, ["label"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-button.stories.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button/cura-button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,eAAe;EACb,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"cura-button.stories.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button/cura-button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,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,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,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,MAAM,GAAG;EACpB,IAAI,EAAE;IACJ,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,OAAO;IAClB,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: 'Componentes/Buttons/Button',\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\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>`;\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 Button = {\n args: {\n label: 'Button',\n size: 'medium',\n color: 'primary',\n fontColor: 'light',\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"]}
|
|
@@ -7,7 +7,7 @@ export class CuraButtonOutline {
|
|
|
7
7
|
this.iconName = undefined;
|
|
8
8
|
this.iconset = 'default';
|
|
9
9
|
this.iconPosition = 'left';
|
|
10
|
-
this.iconOnly =
|
|
10
|
+
this.iconOnly = false;
|
|
11
11
|
this.href = undefined;
|
|
12
12
|
this.target = "_self";
|
|
13
13
|
this.color = 'accent';
|
|
@@ -189,7 +189,7 @@ export class CuraButtonOutline {
|
|
|
189
189
|
"type": "boolean",
|
|
190
190
|
"mutable": false,
|
|
191
191
|
"complexType": {
|
|
192
|
-
"original": "
|
|
192
|
+
"original": "boolean",
|
|
193
193
|
"resolved": "boolean",
|
|
194
194
|
"references": {}
|
|
195
195
|
},
|
|
@@ -200,7 +200,8 @@ export class CuraButtonOutline {
|
|
|
200
200
|
"text": "Set button to FAB/icon only."
|
|
201
201
|
},
|
|
202
202
|
"attribute": "icon-only",
|
|
203
|
-
"reflect": true
|
|
203
|
+
"reflect": true,
|
|
204
|
+
"defaultValue": "false"
|
|
204
205
|
},
|
|
205
206
|
"href": {
|
|
206
207
|
"type": "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-button-outline.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-outline/cura-button-outline.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,iBAAiB;;gBAKgC,OAAO;oBAKjC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM
|
|
1
|
+
{"version":3,"file":"cura-button-outline.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-outline/cura-button-outline.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,iBAAiB;;gBAKgC,OAAO;oBAKjC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM;oBAI5B,KAAK;;kBASP,OAAO;iBAKvB,QAAQ;qBAQ6B,MAAM;qBAKK,MAAM;kBAGpD,EAAE;;EAdpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAgBD,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;IAC1E,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACvF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACrF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IACrF,IAAI,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-button-outline',\n styleUrl: 'cura-button-outline.scss',\n shadow: true,\n})\nexport class CuraButtonOutline {\n\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({reflect: true}) size: 'small' | 'medium' | 'large' = 'large';\n\n /**\n * Disabled state. Boolean.\n */\n @Prop({reflect: true}) disabled = false;\n /**\n * Loading state. Boolean.\n */\n @Prop({reflect: true}) isLoading = false;\n\n /**\n * Name of the icon to be used from iconset.\n */\n @Prop({reflect: true}) iconName: string;\n /**\n * Custom iconset if needed.\n */\n @Prop({reflect: true}) iconset = 'default';\n /**\n * Icon position: left (default) | right.\n */\n @Prop({reflect: true}) iconPosition: 'left' | 'right' = 'left';\n /**\n * Set button to FAB/icon only.\n */\n @Prop({reflect: true}) iconOnly = false;\n\n /**\n * Property href switch button to link.\n */\n @Prop({reflect: true}) href: string;\n /**\n * Set target if link.\n */\n @Prop({reflect: true}) target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n /**\n * Set the font color to dark or light.\n */\n @Prop({reflect: true}) fontColor: 'dark' | 'light' = 'dark';\n /**\n * Set text aligment for the button label.\n * Vales: left (default) | center | right.\n */\n @Prop({reflect: true}) textAlign: 'left' | 'center' | 'right' = 'left';\n\n\n @State() styles = {};\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--text-align'] = this.textAlign;\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes[`icon-only`] = this.iconOnly;\n classes['inverted'] = this.fontColor === 'light';\n classes['disabled'] = this.disabled;\n classes['isLoading'] = this.isLoading;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-lighter': window.CuraAPI.theme.colors.getColor(`${this.color}-lighter`),\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.getSymbolColor();\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n getSymbolColor() {\n return this.disabled\n ? 'neutral-dark'\n : this.fontColor === 'light'\n ? 'neutral-white'\n : `${this.color}-base`;\n }\n\n handleClick(e: Event) {\n if (this.disabled || this.isLoading) e.preventDefault();\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href}\n target={this.target}\n class={this.getClasses()}\n style={this.styles}\n onClick={(e) => this.handleClick(e)}>\n <span class=\"button-container\">\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </span>\n <cura-loader-circle size={this.size} color={this.getSymbolColor()}></cura-loader-circle>\n </a>\n ) : (\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled || null}\n onClick={(e) => this.handleClick(e)}>\n <span class=\"button-container\">\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </span>\n <cura-loader-circle size={this.size} color={this.getSymbolColor()}></cura-loader-circle>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"]}
|
package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js
CHANGED
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
import iconNames from '../../../assets/icons/iconset-default-list';
|
|
14
14
|
export default {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Componentes/Buttons/Button Outline',
|
|
16
16
|
tags: ['autodocs'],
|
|
17
17
|
render: (_a) => {
|
|
18
18
|
var { label } = _a, args = __rest(_a, ["label"]);
|
package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map
CHANGED
|
@@ -1 +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,
|
|
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,oCAAoC;EAC3C,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,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AAI,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,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: 'Componentes/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"]}
|
package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js
CHANGED
|
@@ -7,7 +7,7 @@ export class CuraButtonTransparent {
|
|
|
7
7
|
this.iconName = undefined;
|
|
8
8
|
this.iconset = 'default';
|
|
9
9
|
this.iconPosition = 'left';
|
|
10
|
-
this.iconOnly =
|
|
10
|
+
this.iconOnly = false;
|
|
11
11
|
this.href = undefined;
|
|
12
12
|
this.target = "_self";
|
|
13
13
|
this.color = 'accent';
|
|
@@ -189,7 +189,7 @@ export class CuraButtonTransparent {
|
|
|
189
189
|
"type": "boolean",
|
|
190
190
|
"mutable": false,
|
|
191
191
|
"complexType": {
|
|
192
|
-
"original": "
|
|
192
|
+
"original": "boolean",
|
|
193
193
|
"resolved": "boolean",
|
|
194
194
|
"references": {}
|
|
195
195
|
},
|
|
@@ -200,7 +200,8 @@ export class CuraButtonTransparent {
|
|
|
200
200
|
"text": "Set button to FAB/icon only."
|
|
201
201
|
},
|
|
202
202
|
"attribute": "icon-only",
|
|
203
|
-
"reflect": true
|
|
203
|
+
"reflect": true,
|
|
204
|
+
"defaultValue": "false"
|
|
204
205
|
},
|
|
205
206
|
"href": {
|
|
206
207
|
"type": "string",
|
package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-button-transparent.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-transparent/cura-button-transparent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,qBAAqB;;gBAK6B,OAAO;oBAKjC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM
|
|
1
|
+
{"version":3,"file":"cura-button-transparent.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-transparent/cura-button-transparent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,qBAAqB;;gBAK6B,OAAO;oBAKjC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM;oBAI5B,KAAK;;kBASP,OAAO;iBAKvB,QAAQ;qBAQ6B,MAAM;qBAKK,MAAM;kBAGpD,EAAE;;EAdpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAgBD,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IACvD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;IAC1E,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAA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AE,IAAI,CAAC,SAAS,KAAK,OAAO,EAAC;UAAE,eAAa,CAAO,CACjF;MACP,0BAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,GAAuB,CACjF,CACV,CACM,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEH","sourcesContent":["import { Component, Host, h, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-button-transparent',\n styleUrl: 'cura-button-transparent.scss',\n shadow: true,\n})\nexport class CuraButtonTransparent {\n\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({reflect: true}) size: 'small' | 'medium' | 'large' = 'large';\n\n /**\n * Disabled state. Boolean.\n */\n @Prop({reflect: true}) disabled = false;\n /**\n * Loading state. Boolean.\n */\n @Prop({reflect: true}) isLoading = false;\n\n /**\n * Name of the icon to be used from iconset.\n */\n @Prop({reflect: true}) iconName: string;\n /**\n * Custom iconset if needed.\n */\n @Prop({reflect: true}) iconset = 'default';\n /**\n * Icon position: left (default) | right.\n */\n @Prop({reflect: true}) iconPosition: 'left' | 'right' = 'left';\n /**\n * Set button to FAB/icon only.\n */\n @Prop({reflect: true}) iconOnly = false;\n\n /**\n * Property href switch button to link.\n */\n @Prop({reflect: true}) href: string;\n /**\n * Set target if link.\n */\n @Prop({reflect: true}) target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n /**\n * Set the font color to dark or light.\n */\n @Prop({reflect: true}) fontColor: 'dark' | 'light' = 'dark';\n /**\n * Set text aligment for the button label.\n * Vales: left (default) | center | right.\n */\n @Prop({reflect: true}) textAlign: 'left' | 'center' | 'right' = 'left';\n\n\n @State() styles = {};\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--text-align'] = this.textAlign;\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes[`icon-only`] = this.iconOnly;\n classes['inverted'] = this.fontColor === 'light';\n classes['disabled'] = this.disabled;\n classes['isLoading'] = this.isLoading;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-lighter': window.CuraAPI.theme.colors.getColor(`${this.color}-lighter`),\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.getSymbolColor();\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n getSymbolColor() {\n return this.disabled\n ? 'neutral-dark'\n : this.fontColor === 'light'\n ? 'neutral-white'\n : `${this.color}-base`;\n }\n\n handleClick(e: Event) {\n if (this.disabled || this.isLoading) e.preventDefault();\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href}\n target={this.target}\n class={this.getClasses()}\n style={this.styles}\n onClick={(e) => this.handleClick(e)}>\n <span class=\"button-container\">\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </span>\n <cura-loader-circle size={this.size} color={this.getSymbolColor()}></cura-loader-circle>\n </a>\n ) : (\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled || null}\n onClick={(e) => this.handleClick(e)}>\n <span class=\"button-container\">\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </span>\n <cura-loader-circle size={this.size} color={this.getSymbolColor()}></cura-loader-circle>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"]}
|