@rededor/cura 0.5.1 → 0.5.3
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 +4 -0
- package/dist/assets/icons/iconset-default.svg +1 -1
- 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 +445 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-alert.cjs.entry.js +67 -0
- package/dist/cjs/cura-alert.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-select.cjs.entry.js +97 -0
- package/dist/cjs/cura-button-select.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-checkbox.cjs.entry.js +144 -0
- package/dist/cjs/cura-checkbox.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-forms.definitions-11be2ebd.js +20 -0
- package/dist/cjs/cura-forms.definitions-11be2ebd.js.map +1 -0
- package/dist/cjs/cura-icon.definitions-b73b0178.js +21 -0
- package/dist/cjs/cura-icon.definitions-b73b0178.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +36 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-input-text.cjs.entry.js +3907 -0
- package/dist/cjs/cura-input-text.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-radio.cjs.entry.js +114 -0
- package/dist/cjs/cura-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +89 -0
- package/dist/cjs/cura-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/{index-404d93e9.js → index-7616f620.js} +35 -1
- package/dist/cjs/index-7616f620.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/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 +4 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/swap.svg +3 -0
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
- package/dist/collection/components/buttons/cura-button/cura-button.css +4 -0
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js +2 -2
- 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.css +4 -0
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +2 -2
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +139 -0
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +263 -0
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +4 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +2 -2
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.css +30 -0
- package/dist/collection/components/cura-alert/cura-alert.js +167 -0
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -0
- package/dist/collection/components/cura-alert/cura-alert.stories.js +95 -0
- package/dist/collection/components/cura-alert/cura-alert.stories.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.definitions.js +15 -0
- package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.js +9 -16
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js +7 -6
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.css +16 -17
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +10 -3
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +163 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +431 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js +196 -0
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-forms.definitions.js +15 -0
- package/dist/collection/components/forms/cura-forms.definitions.js.map +1 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.css +326 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +655 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +224 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +46 -0
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -0
- 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/forms/cura-radio/cura-radio.css +146 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.js +365 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.stories.js +175 -0
- package/dist/collection/components/forms/cura-radio/cura-radio.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.css +100 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.js +266 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.stories.js +137 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.stories.js.map +1 -0
- 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 +78 -33
- 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 +92 -36
- 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 +78 -46
- 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-alert.d.ts +11 -0
- package/dist/components/cura-alert.js +105 -0
- package/dist/components/cura-alert.js.map +1 -0
- package/dist/components/cura-button-select.d.ts +11 -0
- package/dist/components/cura-button-select.js +127 -0
- package/dist/components/cura-button-select.js.map +1 -0
- package/dist/components/cura-checkbox.d.ts +11 -0
- package/dist/components/cura-checkbox.js +192 -0
- package/dist/components/cura-checkbox.js.map +1 -0
- package/dist/components/cura-display.js +41 -35
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-forms.definitions.js +18 -0
- package/dist/components/cura-forms.definitions.js.map +1 -0
- package/dist/components/cura-heading.js +1 -87
- package/dist/components/cura-heading.js.map +1 -1
- package/dist/components/cura-heading2.js +104 -0
- package/dist/components/cura-heading2.js.map +1 -0
- package/dist/components/cura-icon2.js +24 -17
- package/dist/components/cura-icon2.js.map +1 -1
- package/dist/components/cura-icons-view.js +31 -7
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-input-text.d.ts +11 -0
- package/dist/components/cura-input-text.js +3961 -0
- package/dist/components/cura-input-text.js.map +1 -0
- package/dist/components/cura-label.d.ts +11 -0
- package/dist/components/cura-label.js +8 -0
- package/dist/components/cura-label.js.map +1 -0
- package/dist/components/cura-label2.js +88 -0
- package/dist/components/cura-label2.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 +1 -80
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/components/cura-paragraph2.js +86 -0
- package/dist/components/cura-paragraph2.js.map +1 -0
- package/dist/components/cura-radio.d.ts +11 -0
- package/dist/components/cura-radio.js +154 -0
- package/dist/components/cura-radio.js.map +1 -0
- package/dist/components/cura-switch.d.ts +11 -0
- package/dist/components/cura-switch.js +119 -0
- package/dist/components/cura-switch.js.map +1 -0
- package/dist/components/index.js +23 -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-120926c5.system.js +2 -0
- package/dist/cura/p-120926c5.system.js.map +1 -0
- package/dist/cura/p-1228e771.entry.js +2 -0
- package/dist/cura/p-1228e771.entry.js.map +1 -0
- package/dist/cura/p-2d42ccf4.entry.js +2 -0
- package/dist/cura/p-2d42ccf4.entry.js.map +1 -0
- package/dist/cura/p-3688570d.js +2 -0
- package/dist/cura/p-3688570d.js.map +1 -0
- package/dist/cura/p-36a83bc7.system.js +3 -0
- package/dist/cura/p-36a83bc7.system.js.map +1 -0
- package/dist/cura/p-3f3355f3.system.entry.js +2 -0
- package/dist/cura/p-3f3355f3.system.entry.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-4df84c9e.entry.js +2 -0
- package/dist/cura/p-4df84c9e.entry.js.map +1 -0
- package/dist/cura/p-70cefaf8.entry.js +2 -0
- package/dist/cura/p-70cefaf8.entry.js.map +1 -0
- package/dist/cura/p-72a9ed55.entry.js +2 -0
- package/dist/cura/p-72a9ed55.entry.js.map +1 -0
- package/dist/cura/p-75b2e4d1.system.entry.js +2 -0
- package/dist/cura/p-75b2e4d1.system.entry.js.map +1 -0
- package/dist/cura/p-880917c1.entry.js +2 -0
- package/dist/cura/p-880917c1.entry.js.map +1 -0
- package/dist/cura/p-9471c93e.system.entry.js +2 -0
- package/dist/cura/p-9471c93e.system.entry.js.map +1 -0
- package/dist/cura/p-98014544.entry.js +2 -0
- package/dist/cura/p-98014544.entry.js.map +1 -0
- package/dist/cura/p-98352c92.system.entry.js +2 -0
- package/dist/cura/p-98352c92.system.entry.js.map +1 -0
- package/dist/cura/p-a32889a4.system.js +2 -0
- package/dist/cura/p-a32889a4.system.js.map +1 -0
- package/dist/cura/p-a6d20c12.system.entry.js +2 -0
- package/dist/cura/p-a6d20c12.system.entry.js.map +1 -0
- package/dist/cura/p-ab8c9a8f.system.entry.js +2 -0
- package/dist/cura/p-ab8c9a8f.system.entry.js.map +1 -0
- package/dist/cura/p-ad194144.entry.js +2 -0
- package/dist/cura/p-ad194144.entry.js.map +1 -0
- package/dist/cura/p-b0e13882.system.entry.js +2 -0
- package/dist/cura/p-b0e13882.system.entry.js.map +1 -0
- package/dist/cura/p-ba66d7be.js +3 -0
- package/dist/cura/{p-c0c00396.system.js.map → p-ba66d7be.js.map} +1 -1
- package/dist/cura/p-bb3f9d05.entry.js +2 -0
- package/dist/cura/p-bb3f9d05.entry.js.map +1 -0
- package/dist/cura/p-c791725b.js +2 -0
- package/dist/cura/p-c791725b.js.map +1 -0
- package/dist/cura/p-c9afb94f.entry.js +2 -0
- package/dist/cura/p-c9afb94f.entry.js.map +1 -0
- package/dist/cura/p-d3f9c888.system.js +2 -0
- package/dist/cura/p-d3f9c888.system.js.map +1 -0
- package/dist/cura/p-e5e259fd.system.entry.js +2 -0
- package/dist/cura/p-e5e259fd.system.entry.js.map +1 -0
- package/dist/cura/p-edeffbfc.entry.js +2 -0
- package/dist/cura/p-edeffbfc.entry.js.map +1 -0
- package/dist/cura/p-eea5ca70.system.entry.js +2 -0
- package/dist/cura/p-eea5ca70.system.entry.js.map +1 -0
- package/dist/cura/p-f6e61abf.system.entry.js +2 -0
- package/dist/cura/p-f6e61abf.system.entry.js.map +1 -0
- package/dist/cura/p-f89f2ecc.system.entry.js +2 -0
- package/dist/cura/p-f89f2ecc.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-fc4ba4ce.system.js +2 -0
- package/dist/cura/p-fc4ba4ce.system.js.map +1 -0
- package/dist/cura/p-fef52079.entry.js +2 -0
- package/dist/cura/p-fef52079.entry.js.map +1 -0
- package/dist/cura/p-ffd41520.system.entry.js +2 -0
- package/dist/cura/p-ffd41520.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 +434 -0
- package/dist/esm/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm/cura-alert.entry.js +63 -0
- package/dist/esm/cura-alert.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-select.entry.js +93 -0
- package/dist/esm/cura-button-select.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-checkbox.entry.js +140 -0
- package/dist/esm/cura-checkbox.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-forms.definitions-0f774253.js +18 -0
- package/dist/esm/cura-forms.definitions-0f774253.js.map +1 -0
- package/dist/esm/cura-icon.definitions-a63d1862.js +18 -0
- package/dist/esm/cura-icon.definitions-a63d1862.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +32 -0
- package/dist/esm/cura-icons-view.entry.js.map +1 -0
- package/dist/esm/cura-input-text.entry.js +3903 -0
- package/dist/esm/cura-input-text.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-radio.entry.js +110 -0
- package/dist/esm/cura-radio.entry.js.map +1 -0
- package/dist/esm/cura-switch.entry.js +85 -0
- package/dist/esm/cura-switch.entry.js.map +1 -0
- package/dist/esm/cura.js +4 -4
- package/dist/esm/{index-d99da69e.js → index-81f1a268.js} +35 -2
- package/dist/{esm-es5/index-d99da69e.js.map → esm/index-81f1a268.js.map} +1 -1
- 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-alert.entry.js +2 -0
- package/dist/esm-es5/cura-alert.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-select.entry.js +2 -0
- package/dist/esm-es5/cura-button-select.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-checkbox.entry.js +2 -0
- package/dist/esm-es5/cura-checkbox.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-forms.definitions-0f774253.js +2 -0
- package/dist/esm-es5/cura-forms.definitions-0f774253.js.map +1 -0
- package/dist/esm-es5/cura-icon.definitions-a63d1862.js +2 -0
- package/dist/esm-es5/cura-icon.definitions-a63d1862.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-input-text.entry.js +2 -0
- package/dist/esm-es5/cura-input-text.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-radio.entry.js +2 -0
- package/dist/esm-es5/cura-radio.entry.js.map +1 -0
- package/dist/esm-es5/cura-switch.entry.js +2 -0
- package/dist/esm-es5/cura-switch.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-81f1a268.js +3 -0
- package/dist/esm-es5/index-81f1a268.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-select/cura-button-select.d.ts +51 -0
- package/dist/types/components/cura-alert/cura-alert.d.ts +16 -0
- package/dist/types/components/cura-alert/cura-alert.stories.d.ts +79 -0
- package/dist/types/components/cura-icon/cura-icon.d.ts +0 -42
- package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +47 -0
- package/dist/types/components/cura-icons-view/cura-icons-view.d.ts +2 -1
- package/dist/types/components/forms/cura-checkbox/cura-checkbox.d.ts +100 -0
- package/dist/types/components/forms/cura-checkbox/cura-checkbox.stories.d.ts +199 -0
- package/dist/types/components/forms/cura-forms.definitions.d.ts +14 -0
- package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +138 -0
- package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +224 -0
- package/dist/types/components/forms/cura-input-text/mask-presets/input-mask-presets.d.ts +5 -0
- 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/forms/cura-radio/cura-radio.d.ts +81 -0
- package/dist/types/components/forms/cura-radio/cura-radio.stories.d.ts +180 -0
- package/dist/types/components/forms/cura-switch/cura-switch.d.ts +62 -0
- package/dist/types/components/forms/cura-switch/cura-switch.stories.d.ts +135 -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 +741 -46
- package/dist/types/index.d.ts +9 -0
- package/package.json +5 -6
- 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-404d93e9.js.map +0 -1
- package/dist/cura/p-319699df.entry.js +0 -2
- package/dist/cura/p-319699df.entry.js.map +0 -1
- package/dist/cura/p-46d20db3.js +0 -3
- package/dist/cura/p-46d20db3.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-5250cb43.system.js +0 -2
- package/dist/cura/p-5250cb43.system.js.map +0 -1
- package/dist/cura/p-5cc3c8bd.system.entry.js +0 -2
- package/dist/cura/p-5cc3c8bd.system.entry.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-c0c00396.system.js +0 -3
- package/dist/cura/p-d5c64a5f.js +0 -2
- package/dist/cura/p-d5c64a5f.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-d99da69e.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-d99da69e.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-checkbox.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-checkbox/cura-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,MAAM,OAAO,YAAY;;IAuEvB,qBAAgB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;IAEpD,oBAAe,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC;IA+ClD;;;OAGG;IACH,gBAAW,GAAG,GAAG,EAAE;MACjB,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO;MAE1B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;MAC3B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;MAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IACtG,CAAC,CAAC;mBA7HyD,KAAK;yBAKC,KAAK;kBAKY,SAAS;oBAI9C,KAAK;oBAIL,KAAK;;sBAQJ,CAAC;oBAKO,MAAM;;;gBAaE,QAAQ;sBAK/B,OAAO;qBAKR,MAAM;iBAI5B,QAAQ;kBAEN,EAAE;;EAWpB,WAAW;IACT,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI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ent":["import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-checkbox',\n styleUrl: 'cura-checkbox.scss',\n shadow: true,\n})\n\nexport class CuraCheckbox {\n /**\n * Reflects the checked state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Reflects the indeterminate state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate: boolean = false;\n /**\n * Status of the checkbox.\n * Can be 'error', 'success', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n /**\n * Reflects the disabled state of the checkbox.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the checkbox.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the checkbox.\n */\n @Prop({ reflect: true }) label: string;\n /**\n * Specifies the tabindex of the checkbox.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the checkbox.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the checkbox.\n */\n @Prop({ reflect: true }) value: string;\n /**\n * Name attribute of the checkbox.\n */\n @Prop({ reflect: true }) name: string;\n /**\n * Size of the checkbox.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * iconColor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() iconColor: 'dark' | 'light' = 'dark';\n /**\n * Color theme of the checkbox.\n */\n @Prop() color = 'accent';\n\n @State() styles = {};\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string, checked: boolean, indeterminate: boolean }>;\n\n isDarkbackground = () => this.background === 'dark';\n\n isDarkIconColor = () => this.iconColor === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles['--size'] = `${formsSizes[this.size].size}px`\n this.styles['--gap'] = `${formsSizes[this.size].gap}px`\n }\n\n /**\n * Watches changes in color and background properties to update styles.\n */\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-lighter', background: `${this.color}-lighter` },\n { name: '--color-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--info-base', background: 'info-base' },\n { name: '--error-base', background: 'error-base' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--success-dark', background: 'success-dark' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--neutral-lighter-neutral-purewhite', background: this.isDarkbackground() ? 'neutral-lighter' : 'neutral-purewhite' },\n { name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },\n { name: '--primary-base-neutral-base', background: this.isDarkbackground() ? 'primary-base' : 'neutral-base' },\n { name: '--primary-base-neutral-dark', background: this.isDarkbackground() ? 'primary-base' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-lighter', background: this.isDarkbackground() ? 'success-base' : 'success-lighter' },\n { name: '--success-dark-base', background: this.isDarkbackground() ? 'success-dark' : 'success-base' },\n { name: '--error-base-lighter', background: this.isDarkbackground() ? 'error-base' : 'error-lighter' },\n { name: '--error-dark-base', background: this.isDarkbackground() ? 'error-dark' : 'error-base' },\n ];\n\n colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background));\n this.styles = { ...this.styles };\n }\n\n connectedCallback() {\n this.sizeHandler()\n this.setColors();\n }\n\n /**\n * Handles click event on the checkbox.\n * Emits onchange event with value, checked, and indeterminate states.\n */\n handleClick = () => {\n if (this.disabled) return;\n\n this.indeterminate = false;\n this.checked = !this.checked;\n this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });\n };\n\n /**\n * Retrieves classes based on component state for conditional styling.\n */\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['indeterminate'] = this.indeterminate;\n classes['position'] = this.position === 'right';\n classes[this.status] = true;\n\n return classes;\n }\n\n /**\n * Assigns color based on status and background theme.\n * @param defaultColor Default color.\n */\n\n @Watch('background')\n @Watch('iconColor')\n assignColor(type: 'icon' | 'label' | 'message',) {\n if (this.disabled) return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';\n\n const statusColors = {\n success: {\n icon: 'success-dark',\n label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkbackground() ? 'success-base' : 'success-dark'\n },\n error: {\n icon: 'error-dark',\n label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkbackground() ? 'error-base' : 'error-dark'\n },\n default: {\n icon: this.isDarkIconColor() ? 'neutral-black' : 'neutral-purewhite',\n label: this.isDarkbackground() ? 'neutral-white' : 'neutral-black',\n message: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark'\n }\n };\n\n return statusColors[this.status][type];\n }\n\n /**\n * Retrieves icon element based on checkbox state.\n */\n getIcon() {\n const iconName = this.indeterminate ? 'minus' : \"check\"\n const iconColor = this.assignColor('icon');\n const iconSize = this.size === 'large' ? 20 : \"micro\"\n\n return <cura-icon class=\"icon\" name={iconName} size={iconSize} color={iconColor}></cura-icon>\n }\n\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n class=\"label\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}>\n {this.label}\n </cura-label>\n {this.required && <cura-paragraph lineHeight='0%' marginBlock='0' color=\"error-base\" >* </cura-paragraph>}\n </div>\n <cura-label\n color={this.assignColor('message')}\n size=\"xsmall\"\n class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <div class={\"checkbox\"} onClick={this.handleClick} tabIndex={this.ontabindex}>\n <input\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n required={this.required}\n checked={this.checked}\n indeterminate={this.indeterminate}\n />\n {this.getIcon()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,196 @@
|
|
|
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
|
+
const renderCuraCheckbox = (label, message, args) => {
|
|
14
|
+
const block = `<cura-checkbox${label ? `
|
|
15
|
+
label="${label}"` : ''}${args.size && args.size !== 'medium' ? `
|
|
16
|
+
size="${args.size}"` : ''}${args.status && args.status !== 'default' ? `
|
|
17
|
+
status="${args.status}"` : ''}${args.position && args.position !== 'left' ? `
|
|
18
|
+
position="${args.position}"` : ''}${args.color && args.color !== 'accent' ? `
|
|
19
|
+
color="${args.color}"` : ''}${args.background && args.background !== 'light' ? `
|
|
20
|
+
background="${args.background}"` : ''}${args.iconColor && args.iconColor !== 'dark' ? `
|
|
21
|
+
icon-color="${args.iconColor}"` : ''}${args.value ? `
|
|
22
|
+
value="${args.value}"` : ''}${args.ontabindex ? `
|
|
23
|
+
ontabindex="${args.ontabindex}"` : ''}${args.checked ? `
|
|
24
|
+
checked="${args.checked}"` : ''}${args.required ? `
|
|
25
|
+
required="${args.required}"` : ''}${args.indeterminate ? `
|
|
26
|
+
indeterminate="${args.indeterminate}"` : ''}${args.disabled ? `
|
|
27
|
+
disabled="${args.disabled}"` : ''}>${message ? `
|
|
28
|
+
${message}` : ''}
|
|
29
|
+
</cura-checkbox>
|
|
30
|
+
`;
|
|
31
|
+
return `${block}`;
|
|
32
|
+
};
|
|
33
|
+
export default {
|
|
34
|
+
title: 'Componentes/Forms/Checkbox',
|
|
35
|
+
tags: ['autodocs'],
|
|
36
|
+
render: (_a) => {
|
|
37
|
+
var { label, message } = _a, args = __rest(_a, ["label", "message"]);
|
|
38
|
+
return renderCuraCheckbox(label, message, args);
|
|
39
|
+
},
|
|
40
|
+
argTypes: {
|
|
41
|
+
label: {
|
|
42
|
+
control: 'text',
|
|
43
|
+
description: 'Título do checkbox.',
|
|
44
|
+
name: 'label',
|
|
45
|
+
table: {
|
|
46
|
+
category: 'Properties',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
message: {
|
|
50
|
+
control: 'text',
|
|
51
|
+
name: 'Info text',
|
|
52
|
+
description: 'Texto adicional de ajuda ou mensagem de erro/sucesso.',
|
|
53
|
+
table: {
|
|
54
|
+
category: 'Slots',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
checked: {
|
|
58
|
+
control: 'boolean',
|
|
59
|
+
description: 'Define o checkbox como marcado.',
|
|
60
|
+
table: {
|
|
61
|
+
category: 'State',
|
|
62
|
+
defaultValue: { summary: false },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
required: {
|
|
66
|
+
control: 'boolean',
|
|
67
|
+
description: 'Define a marcação do checkbox como obrigatória e insere o símbolo `*` no título.',
|
|
68
|
+
table: {
|
|
69
|
+
category: 'State',
|
|
70
|
+
defaultValue: { summary: false }
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
status: {
|
|
74
|
+
control: { type: 'select' },
|
|
75
|
+
options: ['default', 'success', 'error'],
|
|
76
|
+
description: 'Define o estado do checkbox para <b>default</b>, <b>success</b> ou <b>error</b>.',
|
|
77
|
+
table: {
|
|
78
|
+
category: 'Properties',
|
|
79
|
+
defaultValue: { summary: 'default' },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
indeterminate: {
|
|
83
|
+
control: 'boolean',
|
|
84
|
+
description: 'Define se o checkbox está em estado indeterminado de seleção.',
|
|
85
|
+
table: {
|
|
86
|
+
category: 'State',
|
|
87
|
+
defaultValue: { summary: false },
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
disabled: {
|
|
91
|
+
control: 'boolean',
|
|
92
|
+
description: 'Define se o checkbox está desabilitado.',
|
|
93
|
+
table: {
|
|
94
|
+
category: 'State',
|
|
95
|
+
defaultValue: { summary: false },
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
ontabindex: {
|
|
99
|
+
control: 'number',
|
|
100
|
+
description: 'Índice de tabulação do checkbox.',
|
|
101
|
+
table: {
|
|
102
|
+
category: 'Properties',
|
|
103
|
+
},
|
|
104
|
+
name: 'ontabindex'
|
|
105
|
+
},
|
|
106
|
+
position: {
|
|
107
|
+
control: { type: 'inline-radio' },
|
|
108
|
+
options: ['left', 'right'],
|
|
109
|
+
description: 'Posição do box em relação ao controle.',
|
|
110
|
+
table: {
|
|
111
|
+
category: 'Properties',
|
|
112
|
+
defaultValue: { summary: 'left' }
|
|
113
|
+
},
|
|
114
|
+
name: 'position'
|
|
115
|
+
},
|
|
116
|
+
size: {
|
|
117
|
+
control: { type: 'select' },
|
|
118
|
+
options: ['small', 'medium', 'large'],
|
|
119
|
+
description: 'Tamanhos do checkbox: <b>small</b>, <b>medium</b> ou <b>large</b>.',
|
|
120
|
+
table: {
|
|
121
|
+
category: 'Properties',
|
|
122
|
+
defaultValue: { summary: 'medium' }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
value: {
|
|
126
|
+
control: 'text',
|
|
127
|
+
description: 'Valor do checkbox.',
|
|
128
|
+
table: {
|
|
129
|
+
category: 'Properties',
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
name: {
|
|
133
|
+
control: 'text',
|
|
134
|
+
description: 'Nome do checkbox.',
|
|
135
|
+
table: {
|
|
136
|
+
category: 'Properties',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
background: {
|
|
140
|
+
control: { type: 'inline-radio' },
|
|
141
|
+
options: ['dark', 'light'],
|
|
142
|
+
description: 'Define o tipo de fundo onde o checkbox está inserido com as opções <b>dark</b> ou <b>light</b>.',
|
|
143
|
+
table: {
|
|
144
|
+
category: 'Properties',
|
|
145
|
+
defaultValue: { summary: 'light' }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
iconColor: {
|
|
149
|
+
control: { type: 'inline-radio' },
|
|
150
|
+
options: ['dark', 'light'],
|
|
151
|
+
description: 'Define a cor do ícone para o estado `checked` com os valores <b>dark</b> ou <b>light</b>.',
|
|
152
|
+
name: 'icon-color',
|
|
153
|
+
table: {
|
|
154
|
+
category: 'Properties',
|
|
155
|
+
defaultValue: { summary: 'dark' }
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
color: {
|
|
159
|
+
control: { type: 'select' },
|
|
160
|
+
options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],
|
|
161
|
+
description: 'Define a cor do checkbox. As opções são as cores principais do tema (sem profundidade).',
|
|
162
|
+
table: {
|
|
163
|
+
category: 'Properties',
|
|
164
|
+
defaultValue: { summary: 'accent' },
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
onchange: {
|
|
168
|
+
control: 'none',
|
|
169
|
+
description: 'Emite evento via Listener quando o estado do Checkbox é alterado.`{ checked: boolean, indeterminate: boolean, value: string }`',
|
|
170
|
+
table: {
|
|
171
|
+
category: 'Event',
|
|
172
|
+
defaultValue: { summary: '' },
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
export const Checkbox = {
|
|
178
|
+
args: {
|
|
179
|
+
label: 'Checkbox',
|
|
180
|
+
size: 'medium',
|
|
181
|
+
status: 'default',
|
|
182
|
+
color: 'accent',
|
|
183
|
+
position: 'left',
|
|
184
|
+
background: 'light',
|
|
185
|
+
iconColor: 'dark',
|
|
186
|
+
value: '',
|
|
187
|
+
name: '',
|
|
188
|
+
ontabindex: 0,
|
|
189
|
+
message: 'Helper text',
|
|
190
|
+
checked: false,
|
|
191
|
+
required: false,
|
|
192
|
+
indeterminate: false,
|
|
193
|
+
disabled: false,
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=cura-checkbox.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-checkbox.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-checkbox/cura-checkbox.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAE,OAAe,EAAE,IAAS,EAAE,EAAE;EACvE,MAAM,KAAK,GAAG,iBAAiB,KAAK,CAAC,CAAC,CAAC;WAC9B,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;UACvD,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;YAC7D,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAA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,EAAE,KAAK;IACd,QAAQ,EAAE,KAAK;IACf,aAAa,EAAE,KAAK;IACpB,QAAQ,EAAE,KAAK;GAChB;CACF,CAAC","sourcesContent":["const renderCuraCheckbox = (label: string, message: string, args: any) => {\n const block = `<cura-checkbox${label ? `\n label=\"${label}\"` : ''}${args.size && args.size !== 'medium' ? `\n size=\"${args.size}\"` : ''}${args.status && args.status !== 'default' ? `\n status=\"${args.status}\"` : ''}${args.position && args.position !== 'left' ? `\n position=\"${args.position}\"` : ''}${args.color && args.color !== 'accent' ? `\n color=\"${args.color}\"` : ''}${args.background && args.background !== 'light' ? `\n background=\"${args.background}\"` : ''}${args.iconColor && args.iconColor !== 'dark' ? `\n icon-color=\"${args.iconColor}\"` : ''}${args.value ? `\n value=\"${args.value}\"` : ''}${args.ontabindex ? `\n ontabindex=\"${args.ontabindex}\"` : ''}${args.checked ? `\n checked=\"${args.checked}\"` : ''}${args.required ? `\n required=\"${args.required}\"` : ''}${args.indeterminate ? `\n indeterminate=\"${args.indeterminate}\"` : ''}${args.disabled ? `\n disabled=\"${args.disabled}\"` : ''}>${message ? `\n ${message}` : ''}\n</cura-checkbox>\n`;\n return `${block}`;\n}\n\nexport default {\n title: 'Componentes/Forms/Checkbox',\n tags: ['autodocs'],\n render: ({ label, message, ...args }) => {\n return renderCuraCheckbox(label, message, args);\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Título do checkbox.',\n name: 'label',\n table: {\n category: 'Properties',\n },\n },\n message: {\n control: 'text',\n name: 'Info text',\n description: 'Texto adicional de ajuda ou mensagem de erro/sucesso.',\n table: {\n category: 'Slots',\n },\n },\n checked: {\n control: 'boolean',\n description: 'Define o checkbox como marcado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n required: {\n control: 'boolean',\n description: 'Define a marcação do checkbox como obrigatória e insere o símbolo `*` no título.',\n table: {\n category: 'State',\n defaultValue: { summary: false }\n },\n },\n status: {\n control: { type: 'select' },\n options: ['default', 'success', 'error'],\n description: 'Define o estado do checkbox para <b>default</b>, <b>success</b> ou <b>error</b>.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'default' },\n },\n },\n indeterminate: {\n control: 'boolean',\n description: 'Define se o checkbox está em estado indeterminado de seleção.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Define se o checkbox está desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n ontabindex: {\n control: 'number',\n description: 'Índice de tabulação do checkbox.',\n table: {\n category: 'Properties',\n },\n name: 'ontabindex'\n },\n position: {\n control: { type: 'inline-radio' },\n options: ['left', 'right'],\n description: 'Posição do box em relação ao controle.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'left' }\n },\n name: 'position'\n },\n size: {\n control: { type: 'select' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanhos do checkbox: <b>small</b>, <b>medium</b> ou <b>large</b>.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium' }\n }\n },\n value: {\n control: 'text',\n description: 'Valor do checkbox.',\n table: {\n category: 'Properties',\n },\n },\n name: {\n control: 'text',\n description: 'Nome do checkbox.',\n table: {\n category: 'Properties',\n },\n },\n background: {\n control: { type: 'inline-radio' },\n options: ['dark', 'light'],\n description: 'Define o tipo de fundo onde o checkbox está inserido com as opções <b>dark</b> ou <b>light</b>.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'light' }\n }\n },\n iconColor: {\n control: { type: 'inline-radio' },\n options: ['dark', 'light'],\n description: 'Define a cor do ícone para o estado `checked` com os valores <b>dark</b> ou <b>light</b>.',\n name: 'icon-color',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'dark' }\n },\n },\n color: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Define a cor do checkbox. As opções são as cores principais do tema (sem profundidade).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'accent' },\n },\n },\n onchange: {\n control: 'none',\n description: 'Emite evento via Listener quando o estado do Checkbox é alterado.`{ checked: boolean, indeterminate: boolean, value: string }`',\n table: {\n category: 'Event',\n defaultValue: { summary: '' },\n },\n },\n },\n};\n\nexport const Checkbox = {\n args: {\n label: 'Checkbox',\n size: 'medium',\n status: 'default',\n color: 'accent',\n position: 'left',\n background: 'light',\n iconColor: 'dark',\n value: '',\n name: '',\n ontabindex: 0,\n message: 'Helper text',\n checked: false,\n required: false,\n indeterminate: false,\n disabled: false,\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-forms.definitions.js","sourceRoot":"","sources":["../../../src/components/forms/cura-forms.definitions.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;EACxB,OAAO,EAAE;IACP,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,EAAE;GACR;EACD,QAAQ,EAAE;IACR,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,EAAE;GACR;EACD,OAAO,EAAE;IACP,IAAI,EAAE,EAAE;IACR,GAAG,EAAE,CAAC;GACP;CACF,CAAC","sourcesContent":["export const formsSizes = {\n \"large\": {\n size: 32,\n gap: 16,\n },\n \"medium\": {\n size: 24,\n gap: 12,\n },\n \"small\": {\n size: 20,\n gap: 8,\n },\n};\n"]}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.required {
|
|
7
|
+
color: var(--error-base);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.cura-input-group {
|
|
11
|
+
width: 100%;
|
|
12
|
+
font-family: var(--font-family);
|
|
13
|
+
text-align: left !important;
|
|
14
|
+
}
|
|
15
|
+
.cura-input-group cura-label {
|
|
16
|
+
margin-bottom: 8px;
|
|
17
|
+
}
|
|
18
|
+
.cura-input-group .helper-text {
|
|
19
|
+
margin-top: 8px;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
font-family: var(--font-family);
|
|
22
|
+
color: var(--neutral-dark);
|
|
23
|
+
}
|
|
24
|
+
.cura-input-group .cura-input-field {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 44px;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
align-items: center;
|
|
30
|
+
background-color: var(--neutral-purewhite);
|
|
31
|
+
border: 2px solid var(--neutral-medium);
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
color: var(--primary-base);
|
|
34
|
+
letter-spacing: 0.32px;
|
|
35
|
+
line-height: 20px;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
}
|
|
38
|
+
.cura-input-group .cura-input-field input {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
background: transparent;
|
|
42
|
+
border: none;
|
|
43
|
+
outline: none;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
color: var(--neutral-dark);
|
|
46
|
+
font-family: var(--font-family);
|
|
47
|
+
font-weight: var(--font-weight-medium);
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
font-style: normal;
|
|
50
|
+
line-height: 20px;
|
|
51
|
+
letter-spacing: 0.32px;
|
|
52
|
+
padding: 0px 12px 0px 8px;
|
|
53
|
+
}
|
|
54
|
+
.cura-input-group .cura-input-field input input::placeholder {
|
|
55
|
+
color: var(--neutral-dark);
|
|
56
|
+
}
|
|
57
|
+
.cura-input-group .cura-input-field cura-loader-circle {
|
|
58
|
+
margin: 0px 12px;
|
|
59
|
+
}
|
|
60
|
+
.cura-input-group .cura-input-field .feedback-icon {
|
|
61
|
+
padding-left: 12px;
|
|
62
|
+
padding-top: 6px;
|
|
63
|
+
}
|
|
64
|
+
.cura-input-group .cura-input-field .clear-button {
|
|
65
|
+
padding-right: 12px;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
.cura-input-group:hover:not(.disabled):not(.isLoading):not(.isSuccess):not(.isError):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field {
|
|
69
|
+
border-color: var(--neutral-dark);
|
|
70
|
+
}
|
|
71
|
+
.cura-input-group:hover:not(.disabled):not(.isLoading):not(.isSuccess):not(.isError):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input {
|
|
72
|
+
color: var(--neutral-dark);
|
|
73
|
+
}
|
|
74
|
+
.cura-input-group:hover:not(.disabled):not(.isLoading):not(.isSuccess):not(.isError):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder {
|
|
75
|
+
color: var(--neutral-dark);
|
|
76
|
+
}
|
|
77
|
+
.cura-input-group:hover:not(.disabled):not(.isLoading):not(.isSuccess):not(.isError):not(.isFocused):not(.readOnly):not(.transparent) ::slotted(cura-label) {
|
|
78
|
+
color: var(--neutral-black);
|
|
79
|
+
}
|
|
80
|
+
.cura-input-group.isFocused .cura-input-field,
|
|
81
|
+
.cura-input-group :focus-within :not(.readOnly) .cura-input-field {
|
|
82
|
+
border: 2px solid var(--info-base);
|
|
83
|
+
background-color: var(--neutral-purewhite);
|
|
84
|
+
outline: none;
|
|
85
|
+
}
|
|
86
|
+
.cura-input-group.isFocused .cura-input-field input,
|
|
87
|
+
.cura-input-group :focus-within :not(.readOnly) .cura-input-field input {
|
|
88
|
+
letter-spacing: 0.32px;
|
|
89
|
+
line-height: 20px;
|
|
90
|
+
color: var(--neutral-black);
|
|
91
|
+
}
|
|
92
|
+
.cura-input-group.isFocused .helper-text,
|
|
93
|
+
.cura-input-group :focus-within :not(.readOnly) .helper-text {
|
|
94
|
+
color: var(--neutral-black);
|
|
95
|
+
}
|
|
96
|
+
.cura-input-group.isSuccess .cura-input-field {
|
|
97
|
+
border: 2px solid var(--success-dark);
|
|
98
|
+
background-color: var(--success-lighter);
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
}
|
|
101
|
+
.cura-input-group.isSuccess .cura-input-field input {
|
|
102
|
+
letter-spacing: 0.32px;
|
|
103
|
+
line-height: 20px;
|
|
104
|
+
color: var(--success-darker);
|
|
105
|
+
}
|
|
106
|
+
.cura-input-group.isSuccess .cura-input-field input::placeholder {
|
|
107
|
+
color: var(--success-darker);
|
|
108
|
+
}
|
|
109
|
+
.cura-input-group.isSuccess .helper-text {
|
|
110
|
+
color: var(--success-dark);
|
|
111
|
+
}
|
|
112
|
+
.cura-input-group.isError .cura-input-field {
|
|
113
|
+
border: 2px solid var(--error-dark);
|
|
114
|
+
background-color: var(--error-lighter);
|
|
115
|
+
letter-spacing: 0.32px;
|
|
116
|
+
line-height: 20px;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
}
|
|
119
|
+
.cura-input-group.isError .cura-input-field input {
|
|
120
|
+
letter-spacing: 0.32px;
|
|
121
|
+
line-height: 20px;
|
|
122
|
+
color: var(--error-darker);
|
|
123
|
+
}
|
|
124
|
+
.cura-input-group.isError .cura-input-field input::placeholder {
|
|
125
|
+
color: var(--error-darker);
|
|
126
|
+
}
|
|
127
|
+
.cura-input-group.isError .helper-text {
|
|
128
|
+
color: var(--error-dark);
|
|
129
|
+
}
|
|
130
|
+
.cura-input-group.isLoading {
|
|
131
|
+
cursor: wait;
|
|
132
|
+
}
|
|
133
|
+
.cura-input-group.isLoading .cura-input-field {
|
|
134
|
+
background-color: var(--neutral-white);
|
|
135
|
+
border: 2px solid var(--primary-base);
|
|
136
|
+
color: var(--primary-base);
|
|
137
|
+
letter-spacing: 0.32px;
|
|
138
|
+
line-height: 20px;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
}
|
|
141
|
+
.cura-input-group.isLoading .cura-input-field input {
|
|
142
|
+
cursor: wait;
|
|
143
|
+
color: var(--primary-base);
|
|
144
|
+
}
|
|
145
|
+
.cura-input-group.isLoading input::placeholder {
|
|
146
|
+
color: var(--primary-base);
|
|
147
|
+
}
|
|
148
|
+
.cura-input-group.isLoading .helper-text {
|
|
149
|
+
color: var(--primary-base);
|
|
150
|
+
}
|
|
151
|
+
.cura-input-group.disabled .cura-input-field {
|
|
152
|
+
background-color: var(--neutral-white);
|
|
153
|
+
border: 2px solid var(--neutral-base);
|
|
154
|
+
color: var(--neutral-medium);
|
|
155
|
+
}
|
|
156
|
+
.cura-input-group.disabled .cura-input-field input {
|
|
157
|
+
color: var(--neutral-medium);
|
|
158
|
+
}
|
|
159
|
+
.cura-input-group.disabled .cura-input-field input::placeholder {
|
|
160
|
+
color: var(--neutral-medium);
|
|
161
|
+
}
|
|
162
|
+
.cura-input-group.readOnly[read-only] .cura-input-field {
|
|
163
|
+
cursor: default;
|
|
164
|
+
}
|
|
165
|
+
.cura-input-group.readOnly[read-only] .cura-input-field input {
|
|
166
|
+
cursor: default;
|
|
167
|
+
}
|
|
168
|
+
.cura-input-group.readOnly[read-only] .helper-text {
|
|
169
|
+
color: var(--neutral-dark);
|
|
170
|
+
}
|
|
171
|
+
.cura-input-group.transparent {
|
|
172
|
+
display: flex;
|
|
173
|
+
background-color: transparent;
|
|
174
|
+
padding: 0px;
|
|
175
|
+
justify-content: start;
|
|
176
|
+
align-items: center;
|
|
177
|
+
min-width: 300px;
|
|
178
|
+
max-height: 80px;
|
|
179
|
+
gap: 4px;
|
|
180
|
+
}
|
|
181
|
+
.cura-input-group.transparent .input-wrapper {
|
|
182
|
+
display: flex;
|
|
183
|
+
width: 100%;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
justify-content: start;
|
|
186
|
+
}
|
|
187
|
+
.cura-input-group.transparent cura-label {
|
|
188
|
+
margin-bottom: 4px;
|
|
189
|
+
}
|
|
190
|
+
.cura-input-group.transparent .cura-input-field {
|
|
191
|
+
display: flex;
|
|
192
|
+
width: 100%;
|
|
193
|
+
background-color: transparent;
|
|
194
|
+
border: none;
|
|
195
|
+
border-radius: 0;
|
|
196
|
+
color: var(--primary-base);
|
|
197
|
+
height: 27px;
|
|
198
|
+
letter-spacing: 0.32px;
|
|
199
|
+
line-height: 20px;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
}
|
|
202
|
+
.cura-input-group.transparent .cura-input-field input {
|
|
203
|
+
order: 1;
|
|
204
|
+
color: var(--neutral-black);
|
|
205
|
+
font-size: 16px;
|
|
206
|
+
font-weight: var(--font-weight-bold);
|
|
207
|
+
line-height: 20px;
|
|
208
|
+
letter-spacing: 0.32px;
|
|
209
|
+
padding: 0;
|
|
210
|
+
}
|
|
211
|
+
.cura-input-group.transparent .cura-input-field input::placeholder {
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
text-overflow: ellipsis;
|
|
214
|
+
font-size: 16px;
|
|
215
|
+
font-style: normal;
|
|
216
|
+
font-weight: var(--font-weight-medium);
|
|
217
|
+
line-height: 20px;
|
|
218
|
+
letter-spacing: 0.32px;
|
|
219
|
+
color: var(--neutral-black);
|
|
220
|
+
}
|
|
221
|
+
.cura-input-group.transparent .cura-input-field .clear-button {
|
|
222
|
+
order: 2;
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
margin: 0 20px 0 0;
|
|
225
|
+
padding: 0;
|
|
226
|
+
}
|
|
227
|
+
.cura-input-group.transparent .cura-input-field .feedback-icon {
|
|
228
|
+
order: 3;
|
|
229
|
+
margin: 0 20px 0 0;
|
|
230
|
+
padding: 6px 0 0 0;
|
|
231
|
+
}
|
|
232
|
+
.cura-input-group.transparent .cura-input-field cura-loader-circle {
|
|
233
|
+
order: 2;
|
|
234
|
+
margin: 0 20px 0 0;
|
|
235
|
+
}
|
|
236
|
+
.cura-input-group.transparent .helper-text {
|
|
237
|
+
margin-top: 0px;
|
|
238
|
+
}
|
|
239
|
+
.cura-input-group.transparent.isError .cura-input-field {
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
}
|
|
242
|
+
.cura-input-group.transparent.isError .clear-button {
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
margin: 0 16px 0 0;
|
|
245
|
+
}
|
|
246
|
+
.cura-input-group.transparent.isError input {
|
|
247
|
+
letter-spacing: 0.32px;
|
|
248
|
+
line-height: 20px;
|
|
249
|
+
color: var(--error-darker);
|
|
250
|
+
}
|
|
251
|
+
.cura-input-group.transparent.isError input::placeholder {
|
|
252
|
+
color: var(--error-darker);
|
|
253
|
+
}
|
|
254
|
+
.cura-input-group.transparent.isSuccess .cura-input-field {
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
}
|
|
257
|
+
.cura-input-group.transparent.isSuccess .clear-button {
|
|
258
|
+
cursor: pointer;
|
|
259
|
+
margin: 0 16px 0 0;
|
|
260
|
+
}
|
|
261
|
+
.cura-input-group.transparent.isSuccess input {
|
|
262
|
+
letter-spacing: 0.32px;
|
|
263
|
+
line-height: 20px;
|
|
264
|
+
color: var(--success-darker);
|
|
265
|
+
}
|
|
266
|
+
.cura-input-group.transparent.isSuccess input::placeholder {
|
|
267
|
+
color: var(--success-darker);
|
|
268
|
+
}
|
|
269
|
+
.cura-input-group.transparent.disabled .cura-input-field {
|
|
270
|
+
color: var(--neutral-medium);
|
|
271
|
+
}
|
|
272
|
+
.cura-input-group.transparent.disabled .cura-input-field input {
|
|
273
|
+
color: var(--neutral-medium);
|
|
274
|
+
}
|
|
275
|
+
.cura-input-group.transparent.disabled .cura-input-field input::placeholder {
|
|
276
|
+
color: var(--neutral-medium);
|
|
277
|
+
}
|
|
278
|
+
.cura-input-group.transparent.disabled .cura-input-field .helper-text {
|
|
279
|
+
color: var(--neutral-medium);
|
|
280
|
+
}
|
|
281
|
+
.cura-input-group.small .cura-input-field {
|
|
282
|
+
height: 32px;
|
|
283
|
+
}
|
|
284
|
+
.cura-input-group.small .cura-input-field input {
|
|
285
|
+
font-family: var(--font-family);
|
|
286
|
+
font-weight: var(--font-weight-medium);
|
|
287
|
+
font-size: 12px;
|
|
288
|
+
font-style: normal;
|
|
289
|
+
line-height: 13px;
|
|
290
|
+
letter-spacing: 0.72px;
|
|
291
|
+
}
|
|
292
|
+
.cura-input-group.small .helper-text {
|
|
293
|
+
font-weight: var(--font-weight-regular);
|
|
294
|
+
}
|
|
295
|
+
.cura-input-group.medium .cura-input-field {
|
|
296
|
+
height: 40px;
|
|
297
|
+
}
|
|
298
|
+
.cura-input-group.medium .cura-input-field input {
|
|
299
|
+
font-family: var(--font-family);
|
|
300
|
+
font-weight: var(--font-weight-medium);
|
|
301
|
+
font-size: 14px;
|
|
302
|
+
font-style: normal;
|
|
303
|
+
line-height: 16px;
|
|
304
|
+
letter-spacing: 0.56px;
|
|
305
|
+
}
|
|
306
|
+
.cura-input-group.medium .helper-text {
|
|
307
|
+
font-weight: var(--font-weight-regular);
|
|
308
|
+
}
|
|
309
|
+
.cura-input-group.large .cura-input-field {
|
|
310
|
+
height: 44px;
|
|
311
|
+
}
|
|
312
|
+
.cura-input-group.large input::placeholder {
|
|
313
|
+
font-family: var(--font-family);
|
|
314
|
+
font-weight: var(--font-weight-medium);
|
|
315
|
+
font-size: 16px;
|
|
316
|
+
font-style: normal;
|
|
317
|
+
line-height: 20px;
|
|
318
|
+
letter-spacing: 0.32px;
|
|
319
|
+
}
|
|
320
|
+
.cura-input-group.large .helper-text {
|
|
321
|
+
font-weight: var(--font-weight-bold);
|
|
322
|
+
}
|
|
323
|
+
.cura-input-group input::-webkit-outer-spin-button,
|
|
324
|
+
.cura-input-group input::-webkit-inner-spin-button {
|
|
325
|
+
-webkit-appearance: none;
|
|
326
|
+
}
|