@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,137 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { getColorsWithDepths } from "../../../utils/utils";
|
|
14
|
+
const colors = getColorsWithDepths();
|
|
15
|
+
const renderCuraLabel = (label, args) => {
|
|
16
|
+
const styles = args.cssMarginBlock || args.cssLineHeight ? `<style>
|
|
17
|
+
cura-heading { ${args.cssMarginBlock ? `
|
|
18
|
+
--margin-block: ${args.cssMarginBlock} !important;` : ``}${args.cssLineHeight ? `
|
|
19
|
+
--line-height: ${args.cssLineHeight} !important;` : ``}
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
22
|
+
|
|
23
|
+
` : '';
|
|
24
|
+
const block = `<cura-label${args.size && (args.size !== 'medium' && args.size !== 'regular') ? `
|
|
25
|
+
size="${args.size}"` : ``}${args.weight ? `
|
|
26
|
+
weight="${args.weight}"` : ''}${args.color ? `
|
|
27
|
+
color="${args.color}"` : ''}${args.spotColor ? `
|
|
28
|
+
spot-color="${args.spotColor}"` : ''}${args.marginBlock ? `
|
|
29
|
+
margin-block="${args.marginBlock}"` : ''}${args.lineHeight ? `
|
|
30
|
+
line-height="${args.lineHeight}"` : ''}>
|
|
31
|
+
${label}
|
|
32
|
+
</cura-label>
|
|
33
|
+
`;
|
|
34
|
+
return `${styles}${block}${block}${block}`;
|
|
35
|
+
};
|
|
36
|
+
export default {
|
|
37
|
+
title: 'Componentes/Forms/Label',
|
|
38
|
+
tags: ['autodocs'],
|
|
39
|
+
render: (_a) => {
|
|
40
|
+
var { label } = _a, args = __rest(_a, ["label"]);
|
|
41
|
+
return renderCuraLabel(label, args);
|
|
42
|
+
},
|
|
43
|
+
argTypes: {
|
|
44
|
+
label: {
|
|
45
|
+
control: 'text',
|
|
46
|
+
description: 'Define o texto do componente diretamente. Aceita tags HTML <i>Phrasing Content</i>.',
|
|
47
|
+
name: 'Content'
|
|
48
|
+
},
|
|
49
|
+
size: {
|
|
50
|
+
control: { type: 'select' },
|
|
51
|
+
options: ['xsmall', 'small', 'medium', 'large'],
|
|
52
|
+
description: 'Define o tamanho do bloco de texto considerando `xsmall`, `small`, `medium` (default) e `large` como valores válidos.',
|
|
53
|
+
table: {
|
|
54
|
+
category: 'Properties',
|
|
55
|
+
defaultValue: { summary: 'medium' }
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
weight: {
|
|
59
|
+
control: { type: 'inline-radio' },
|
|
60
|
+
options: ['regular', 'bold'],
|
|
61
|
+
description: 'Espessura de fonte `regular` (default) ou `bold` para todo o texto. É possível aplicar parcialmente utilizando as tags `<b>` e `<strong>`.',
|
|
62
|
+
table: {
|
|
63
|
+
category: 'Properties',
|
|
64
|
+
defaultValue: { summary: 'regular' }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
color: {
|
|
68
|
+
control: { type: 'select' },
|
|
69
|
+
options: ['', ...colors],
|
|
70
|
+
description: 'Define a cor de texto do bloco. Aceita qualquer valor do esquema de cores do design system.',
|
|
71
|
+
table: {
|
|
72
|
+
category: 'Properties',
|
|
73
|
+
defaultValue: { summary: 'Cor de texto padrão do tema' }
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
spotColor: {
|
|
77
|
+
control: { type: 'select' },
|
|
78
|
+
options: ['', ...colors],
|
|
79
|
+
description: 'Define a cor dos itens de interação dentro do bloco de texto como as tags `<a>`. Aceita qualquer valor do esquema de cores do design system.',
|
|
80
|
+
name: 'spot-color',
|
|
81
|
+
table: {
|
|
82
|
+
category: 'Properties',
|
|
83
|
+
defaultValue: { summary: 'accent-dark' }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
marginBlock: {
|
|
87
|
+
control: 'text',
|
|
88
|
+
description: 'Define o tamanho do espaçamento superior e inferior do bloco. Valores válidos para a propriedade CSS `margin-block`.',
|
|
89
|
+
name: 'margin-block',
|
|
90
|
+
table: {
|
|
91
|
+
category: 'Properties',
|
|
92
|
+
defaultValue: { summary: '0' }
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
lineHeight: {
|
|
96
|
+
control: 'text',
|
|
97
|
+
description: 'Define a altura de linha base a ser considerada pelo componente em sua responsividade. Valores válidos para a propriedade CSS `line-height`.',
|
|
98
|
+
name: 'line-height',
|
|
99
|
+
table: {
|
|
100
|
+
category: 'Properties',
|
|
101
|
+
defaultValue: { summary: '125%' }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
cssMarginBlock: {
|
|
105
|
+
control: 'text',
|
|
106
|
+
description: 'Permite a definição da propriedade `margin-block` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',
|
|
107
|
+
name: '--margin-block',
|
|
108
|
+
table: {
|
|
109
|
+
category: 'CSS Properties',
|
|
110
|
+
defaultValue: { summary: '0' }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
cssLineHeight: {
|
|
114
|
+
control: 'text',
|
|
115
|
+
description: 'Permite a definição da propriedade `line-height` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',
|
|
116
|
+
name: '--line-height',
|
|
117
|
+
table: {
|
|
118
|
+
category: 'CSS Properties',
|
|
119
|
+
defaultValue: { summary: '125%' }
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
export const Label = {
|
|
125
|
+
args: {
|
|
126
|
+
label: 'Dolor sit consectetur <a href="https://www.rededorsaoluiz.com.br" target="_blank">adipiscing</a> elit.',
|
|
127
|
+
size: 'medium',
|
|
128
|
+
weight: '',
|
|
129
|
+
color: '',
|
|
130
|
+
spotColor: '',
|
|
131
|
+
marginBlock: '',
|
|
132
|
+
lineHeight: '',
|
|
133
|
+
cssMarginBlock: '',
|
|
134
|
+
cssLineHeight: ''
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=cura-label.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-label.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-label/cura-label.stories.tsx"],"names":[],"mappings":"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","sourcesContent":["import { getColorsWithDepths } from \"../../../utils/utils\";\n\nconst colors = getColorsWithDepths();\n\nconst renderCuraLabel = (label: string, args: any) => {\n const styles = args.cssMarginBlock || args.cssLineHeight ? `<style>\n cura-heading { ${args.cssMarginBlock ? `\n --margin-block: ${args.cssMarginBlock} !important;` : ``}${ args.cssLineHeight ? `\n --line-height: ${args.cssLineHeight} !important;` : ``}\n }\n</style>\n\n` : '';\n const block = `<cura-label${args.size && (args.size !== 'medium' && args.size !== 'regular') ? `\n size=\"${args.size}\"` : ``}${args.weight ? `\n weight=\"${args.weight}\"` : ''}${args.color ? `\n color=\"${args.color}\"` : ''}${args.spotColor ? `\n spot-color=\"${args.spotColor}\"` : ''}${args.marginBlock ? `\n margin-block=\"${args.marginBlock}\"` : ''}${args.lineHeight ? `\n line-height=\"${args.lineHeight}\"` : ''}>\n ${label}\n</cura-label>\n`;\n return `${styles}${block}${block}${block}`;\n}\n\nexport default {\n title: 'Componentes/Forms/Label',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n return renderCuraLabel(label, args);\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Define o texto do componente diretamente. Aceita tags HTML <i>Phrasing Content</i>.',\n name: 'Content'\n },\n size: {\n control: { type: 'select' },\n options: ['xsmall', 'small', 'medium', 'large'],\n description: 'Define o tamanho do bloco de texto considerando `xsmall`, `small`, `medium` (default) e `large` como valores válidos.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium'}\n }\n },\n weight: {\n control: { type: 'inline-radio' },\n options: ['regular', 'bold'],\n description: 'Espessura de fonte `regular` (default) ou `bold` para todo o texto. É possível aplicar parcialmente utilizando as tags `<b>` e `<strong>`.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'regular'}\n }\n },\n color: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor de texto do bloco. Aceita qualquer valor do esquema de cores do design system.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'Cor de texto padrão do tema'}\n }\n },\n spotColor: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Define a cor dos itens de interação dentro do bloco de texto como as tags `<a>`. Aceita qualquer valor do esquema de cores do design system.',\n name: 'spot-color',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'accent-dark'}\n }\n },\n marginBlock: {\n control: 'text',\n description: 'Define o tamanho do espaçamento superior e inferior do bloco. Valores válidos para a propriedade CSS `margin-block`.',\n name: 'margin-block',\n table: {\n category: 'Properties',\n defaultValue: { summary: '0'}\n }\n },\n lineHeight: {\n control: 'text',\n description: 'Define a altura de linha base a ser considerada pelo componente em sua responsividade. Valores válidos para a propriedade CSS `line-height`.',\n name: 'line-height',\n table: {\n category: 'Properties',\n defaultValue: { summary: '125%'}\n }\n },\n cssMarginBlock: {\n control: 'text',\n description: 'Permite a definição da propriedade `margin-block` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',\n name: '--margin-block',\n table: {\n category: 'CSS Properties',\n defaultValue: { summary: '0'}\n }\n },\n cssLineHeight: {\n control: 'text',\n description: 'Permite a definição da propriedade `line-height` por folhas de estilo. É necessário o uso do `!important` conforme o exemplo de código.',\n name: '--line-height',\n table: {\n category: 'CSS Properties',\n defaultValue: { summary: '125%'}\n }\n },\n },\n};\n\nexport const Label = {\n args: {\n label: 'Dolor sit consectetur <a href=\"https://www.rededorsaoluiz.com.br\" target=\"_blank\">adipiscing</a> elit.',\n size: 'medium',\n weight: '',\n color: '',\n spotColor: '',\n marginBlock: '',\n lineHeight: '',\n cssMarginBlock: '',\n cssLineHeight: ''\n },\n};\n"]}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
width: fit-content;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
/* Estado Success */
|
|
7
|
+
/* Estado Error */
|
|
8
|
+
/* Estado checked */
|
|
9
|
+
/* Estado disabled */
|
|
10
|
+
/* Estado hover para não disabled e não checked */
|
|
11
|
+
}
|
|
12
|
+
:host .container {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
flex-direction: row-reverse;
|
|
16
|
+
gap: var(--gap);
|
|
17
|
+
}
|
|
18
|
+
:host .position.container {
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
}
|
|
21
|
+
:host .position .label-wrapper {
|
|
22
|
+
justify-content: end;
|
|
23
|
+
}
|
|
24
|
+
:host .position .message {
|
|
25
|
+
text-align: right;
|
|
26
|
+
}
|
|
27
|
+
:host .position .label {
|
|
28
|
+
order: 1;
|
|
29
|
+
}
|
|
30
|
+
:host .info {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
}
|
|
34
|
+
:host .label-wrapper {
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: start;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 5px;
|
|
39
|
+
}
|
|
40
|
+
:host .control {
|
|
41
|
+
width: fit-content;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
position: relative;
|
|
44
|
+
}
|
|
45
|
+
:host .radio {
|
|
46
|
+
margin: 0;
|
|
47
|
+
appearance: none;
|
|
48
|
+
-webkit-appearance: none;
|
|
49
|
+
-moz-appearance: none;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
border: 2px solid var(--primary-base-neutral-medium);
|
|
52
|
+
background: var(--neutral-purewhite);
|
|
53
|
+
box-sizing: border-box;
|
|
54
|
+
transition: border-color 0.3s;
|
|
55
|
+
position: relative;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
width: var(--size);
|
|
61
|
+
height: var(--size);
|
|
62
|
+
flex: 0 0 var(--size);
|
|
63
|
+
}
|
|
64
|
+
:host .radio::after {
|
|
65
|
+
content: "";
|
|
66
|
+
background: var(--color-base-light);
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
opacity: 0;
|
|
69
|
+
transition: opacity 0.3s;
|
|
70
|
+
width: var(--size-after);
|
|
71
|
+
height: var(--size-after);
|
|
72
|
+
}
|
|
73
|
+
:host .radio:focus {
|
|
74
|
+
border-color: var(--info-base) !important;
|
|
75
|
+
}
|
|
76
|
+
:host .success .radio {
|
|
77
|
+
border-color: var(--success-base);
|
|
78
|
+
background: var(--success-lighter);
|
|
79
|
+
}
|
|
80
|
+
:host .success .radio:hover {
|
|
81
|
+
border-color: var(--success-base) !important;
|
|
82
|
+
}
|
|
83
|
+
:host .success.checked .radio {
|
|
84
|
+
border-color: var(--success-base);
|
|
85
|
+
}
|
|
86
|
+
:host .success.checked .radio::after {
|
|
87
|
+
background: var(--success-base);
|
|
88
|
+
}
|
|
89
|
+
:host .success.checked .radio:hover {
|
|
90
|
+
background: var(--success-lighter) !important;
|
|
91
|
+
border-color: var(--success-base) !important;
|
|
92
|
+
}
|
|
93
|
+
:host .success.checked .radio:hover::after {
|
|
94
|
+
background: var(--success-base) !important;
|
|
95
|
+
}
|
|
96
|
+
:host .error .radio {
|
|
97
|
+
border-color: var(--error-base);
|
|
98
|
+
background: var(--error-lighter);
|
|
99
|
+
}
|
|
100
|
+
:host .error .radio:hover {
|
|
101
|
+
border-color: var(--error-base) !important;
|
|
102
|
+
}
|
|
103
|
+
:host .error.checked .radio {
|
|
104
|
+
border-color: var(--error-base);
|
|
105
|
+
}
|
|
106
|
+
:host .error.checked .radio::after {
|
|
107
|
+
background: var(--error-base);
|
|
108
|
+
}
|
|
109
|
+
:host .error.checked .radio:hover {
|
|
110
|
+
background: var(--error-lighter) !important;
|
|
111
|
+
border-color: var(--error-base) !important;
|
|
112
|
+
}
|
|
113
|
+
:host .error.checked .radio:hover::after {
|
|
114
|
+
background: var(--error-base) !important;
|
|
115
|
+
}
|
|
116
|
+
:host .checked .radio::after {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
background: var(--color-base);
|
|
119
|
+
}
|
|
120
|
+
:host .checked .radio {
|
|
121
|
+
border-color: var(--color-dark);
|
|
122
|
+
}
|
|
123
|
+
:host .checked .radio:hover {
|
|
124
|
+
border-color: var(--color-light) !important;
|
|
125
|
+
}
|
|
126
|
+
:host .checked .radio:hover::after {
|
|
127
|
+
background: var(--color-light);
|
|
128
|
+
}
|
|
129
|
+
:host .disabled .radio {
|
|
130
|
+
background: var(--primary-base-neutral-white);
|
|
131
|
+
border-color: var(--primary-darker-neutral-base);
|
|
132
|
+
cursor: not-allowed;
|
|
133
|
+
}
|
|
134
|
+
:host .disabled .radio::after {
|
|
135
|
+
background: var(--neutral-lighter);
|
|
136
|
+
}
|
|
137
|
+
:host .disabled.checked .radio {
|
|
138
|
+
border-color: var(--primary-base-neutral-base) !important;
|
|
139
|
+
background: var(--primary-darker-neutral-white) !important;
|
|
140
|
+
}
|
|
141
|
+
:host .disabled.checked .radio::after {
|
|
142
|
+
background: var(--primary-base-neutral-base) !important;
|
|
143
|
+
}
|
|
144
|
+
:host :not(.disabled):not(.checked) .radio:hover {
|
|
145
|
+
border-color: var(--primary-base-neutral-dark);
|
|
146
|
+
}
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { formsSizes } from '../cura-forms.definitions';
|
|
3
|
+
export class CuraRadio {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.sizes = {
|
|
6
|
+
"large": { size: 20 },
|
|
7
|
+
"medium": { size: 14 },
|
|
8
|
+
"small": { size: 10 },
|
|
9
|
+
};
|
|
10
|
+
this.isDarkbackground = () => this.background === 'dark';
|
|
11
|
+
this.handleClick = () => {
|
|
12
|
+
if (this.disabled)
|
|
13
|
+
return;
|
|
14
|
+
this.checked = !this.checked;
|
|
15
|
+
this.onchange.emit({ value: this.value, checked: this.checked });
|
|
16
|
+
};
|
|
17
|
+
this.checked = false;
|
|
18
|
+
this.status = 'default';
|
|
19
|
+
this.disabled = false;
|
|
20
|
+
this.required = false;
|
|
21
|
+
this.label = '';
|
|
22
|
+
this.ontabindex = undefined;
|
|
23
|
+
this.position = 'left';
|
|
24
|
+
this.value = '';
|
|
25
|
+
this.name = '';
|
|
26
|
+
this.background = 'light';
|
|
27
|
+
this.size = 'medium';
|
|
28
|
+
this.color = 'accent';
|
|
29
|
+
this.styles = {};
|
|
30
|
+
}
|
|
31
|
+
sizeHandler() {
|
|
32
|
+
this.styles['--size-after'] = `${this.sizes[this.size].size}px`;
|
|
33
|
+
this.styles['--size'] = `${formsSizes[this.size].size}px`;
|
|
34
|
+
this.styles['--gap'] = `${formsSizes[this.size].gap}px`;
|
|
35
|
+
}
|
|
36
|
+
setColors() {
|
|
37
|
+
const colors = [
|
|
38
|
+
{ name: '--info-base', background: 'info-base' },
|
|
39
|
+
{ name: '--color-light', background: `${this.color}-light` },
|
|
40
|
+
{ name: '--color-base', background: `${this.color}-base` },
|
|
41
|
+
{ name: '--color-dark', background: `${this.color}-dark` },
|
|
42
|
+
{ name: '--neutral-purewhite', background: 'neutral-purewhite' },
|
|
43
|
+
{ name: '--success-lighter', background: 'success-lighter' },
|
|
44
|
+
{ name: '--success-base', background: 'success-base' },
|
|
45
|
+
{ name: '--error-lighter', background: 'error-lighter' },
|
|
46
|
+
{ name: '--error-base', background: 'error-base' },
|
|
47
|
+
{ name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },
|
|
48
|
+
{ name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },
|
|
49
|
+
{ name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },
|
|
50
|
+
{ name: '--primary-darker-neutral-base', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-base' },
|
|
51
|
+
{ name: '--primary-base-neutral-base', background: this.isDarkbackground() ? 'primary-base' : 'neutral-base' },
|
|
52
|
+
{ name: '--primary-base-neutral-dark', background: this.isDarkbackground() ? 'primary-base' : 'neutral-dark' },
|
|
53
|
+
{ name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },
|
|
54
|
+
{ name: '--success-base-dark', background: this.isDarkbackground() ? 'success-base' : 'success-dark' },
|
|
55
|
+
{ name: '--error-base-dark', background: this.isDarkbackground() ? 'error-base' : 'error-dark' },
|
|
56
|
+
];
|
|
57
|
+
colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background));
|
|
58
|
+
}
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
this.sizeHandler();
|
|
61
|
+
this.setColors();
|
|
62
|
+
}
|
|
63
|
+
getClasses() {
|
|
64
|
+
const classes = {};
|
|
65
|
+
classes['container'] = true;
|
|
66
|
+
classes['checked'] = this.checked;
|
|
67
|
+
classes['disabled'] = this.disabled;
|
|
68
|
+
classes['position'] = this.position === 'right';
|
|
69
|
+
classes[this.status] = true;
|
|
70
|
+
return classes;
|
|
71
|
+
}
|
|
72
|
+
assignColor(type) {
|
|
73
|
+
if (this.disabled)
|
|
74
|
+
return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';
|
|
75
|
+
const statusColors = {
|
|
76
|
+
success: {
|
|
77
|
+
label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',
|
|
78
|
+
message: this.isDarkbackground() ? 'success-base' : 'success-dark'
|
|
79
|
+
},
|
|
80
|
+
error: {
|
|
81
|
+
label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',
|
|
82
|
+
message: this.isDarkbackground() ? 'error-base' : 'error-dark'
|
|
83
|
+
},
|
|
84
|
+
default: {
|
|
85
|
+
label: this.isDarkbackground() ? 'neutral-white' : 'neutral-black',
|
|
86
|
+
message: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark'
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return statusColors[this.status][type];
|
|
90
|
+
}
|
|
91
|
+
render() {
|
|
92
|
+
return (h(Host, null, h("div", { class: this.getClasses(), style: this.styles }, h("div", { class: "info" }, h("div", { class: "label-wrapper" }, h("cura-label", { class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", null))), h("input", { type: "radio", class: `radio ${this.size.toLocaleLowerCase()}`, name: this.name, value: this.value, required: this.required, tabIndex: this.ontabindex, disabled: this.disabled, checked: this.checked, onClick: this.handleClick }))));
|
|
93
|
+
}
|
|
94
|
+
static get is() { return "cura-radio"; }
|
|
95
|
+
static get encapsulation() { return "shadow"; }
|
|
96
|
+
static get originalStyleUrls() {
|
|
97
|
+
return {
|
|
98
|
+
"$": ["cura-radio.scss"]
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
static get styleUrls() {
|
|
102
|
+
return {
|
|
103
|
+
"$": ["cura-radio.css"]
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
static get properties() {
|
|
107
|
+
return {
|
|
108
|
+
"checked": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"mutable": true,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "boolean",
|
|
113
|
+
"resolved": "boolean",
|
|
114
|
+
"references": {}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": false,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": "Reflects the checked state of the radio button.\nMutable property allowing state change."
|
|
121
|
+
},
|
|
122
|
+
"attribute": "checked",
|
|
123
|
+
"reflect": true,
|
|
124
|
+
"defaultValue": "false"
|
|
125
|
+
},
|
|
126
|
+
"status": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"mutable": true,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "'error' | 'success' | 'default'",
|
|
131
|
+
"resolved": "\"default\" | \"error\" | \"success\"",
|
|
132
|
+
"references": {}
|
|
133
|
+
},
|
|
134
|
+
"required": false,
|
|
135
|
+
"optional": false,
|
|
136
|
+
"docs": {
|
|
137
|
+
"tags": [],
|
|
138
|
+
"text": "Status of the radio button.\nCan be 'error', 'success', or 'default'."
|
|
139
|
+
},
|
|
140
|
+
"attribute": "status",
|
|
141
|
+
"reflect": true,
|
|
142
|
+
"defaultValue": "'default'"
|
|
143
|
+
},
|
|
144
|
+
"disabled": {
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"mutable": false,
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "boolean",
|
|
149
|
+
"resolved": "boolean",
|
|
150
|
+
"references": {}
|
|
151
|
+
},
|
|
152
|
+
"required": false,
|
|
153
|
+
"optional": false,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [],
|
|
156
|
+
"text": "Reflects the disabled state of the radio button."
|
|
157
|
+
},
|
|
158
|
+
"attribute": "disabled",
|
|
159
|
+
"reflect": true,
|
|
160
|
+
"defaultValue": "false"
|
|
161
|
+
},
|
|
162
|
+
"required": {
|
|
163
|
+
"type": "boolean",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "boolean",
|
|
167
|
+
"resolved": "boolean",
|
|
168
|
+
"references": {}
|
|
169
|
+
},
|
|
170
|
+
"required": false,
|
|
171
|
+
"optional": false,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": "Reflects the required state of the radio button."
|
|
175
|
+
},
|
|
176
|
+
"attribute": "required",
|
|
177
|
+
"reflect": true,
|
|
178
|
+
"defaultValue": "false"
|
|
179
|
+
},
|
|
180
|
+
"label": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"mutable": false,
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "string",
|
|
185
|
+
"resolved": "string",
|
|
186
|
+
"references": {}
|
|
187
|
+
},
|
|
188
|
+
"required": false,
|
|
189
|
+
"optional": false,
|
|
190
|
+
"docs": {
|
|
191
|
+
"tags": [],
|
|
192
|
+
"text": "Text label associated with the radio button."
|
|
193
|
+
},
|
|
194
|
+
"attribute": "label",
|
|
195
|
+
"reflect": true,
|
|
196
|
+
"defaultValue": "''"
|
|
197
|
+
},
|
|
198
|
+
"ontabindex": {
|
|
199
|
+
"type": "number",
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "number",
|
|
203
|
+
"resolved": "number",
|
|
204
|
+
"references": {}
|
|
205
|
+
},
|
|
206
|
+
"required": false,
|
|
207
|
+
"optional": false,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [],
|
|
210
|
+
"text": "Specifies the tabindex of the radio button."
|
|
211
|
+
},
|
|
212
|
+
"attribute": "ontabindex",
|
|
213
|
+
"reflect": true
|
|
214
|
+
},
|
|
215
|
+
"position": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"mutable": false,
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "\"left\" | \"right\"",
|
|
220
|
+
"resolved": "\"left\" | \"right\"",
|
|
221
|
+
"references": {}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": false,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": "Position of the label relative to the radio button.\nCan be 'left' or 'right'."
|
|
228
|
+
},
|
|
229
|
+
"attribute": "position",
|
|
230
|
+
"reflect": true,
|
|
231
|
+
"defaultValue": "'left'"
|
|
232
|
+
},
|
|
233
|
+
"value": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "string",
|
|
238
|
+
"resolved": "string",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": "Value associated with the radio button."
|
|
246
|
+
},
|
|
247
|
+
"attribute": "value",
|
|
248
|
+
"reflect": true,
|
|
249
|
+
"defaultValue": "''"
|
|
250
|
+
},
|
|
251
|
+
"name": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"mutable": false,
|
|
254
|
+
"complexType": {
|
|
255
|
+
"original": "string",
|
|
256
|
+
"resolved": "string",
|
|
257
|
+
"references": {}
|
|
258
|
+
},
|
|
259
|
+
"required": false,
|
|
260
|
+
"optional": false,
|
|
261
|
+
"docs": {
|
|
262
|
+
"tags": [],
|
|
263
|
+
"text": "Name attribute of the radio button."
|
|
264
|
+
},
|
|
265
|
+
"attribute": "name",
|
|
266
|
+
"reflect": true,
|
|
267
|
+
"defaultValue": "''"
|
|
268
|
+
},
|
|
269
|
+
"background": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"mutable": false,
|
|
272
|
+
"complexType": {
|
|
273
|
+
"original": "'dark' | 'light'",
|
|
274
|
+
"resolved": "\"dark\" | \"light\"",
|
|
275
|
+
"references": {}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "Background theme of the radio button.\nCan be 'dark' or 'light'."
|
|
282
|
+
},
|
|
283
|
+
"attribute": "background",
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"defaultValue": "'light'"
|
|
286
|
+
},
|
|
287
|
+
"size": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "'small' | 'medium' | 'large'",
|
|
292
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
293
|
+
"references": {}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": false,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": "Size of the radio button.\nCan be 'small', 'medium', or 'large'."
|
|
300
|
+
},
|
|
301
|
+
"attribute": "size",
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "'medium'"
|
|
304
|
+
},
|
|
305
|
+
"color": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string",
|
|
310
|
+
"resolved": "string",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": "Color theme of the radio button."
|
|
318
|
+
},
|
|
319
|
+
"attribute": "color",
|
|
320
|
+
"reflect": false,
|
|
321
|
+
"defaultValue": "'accent'"
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
static get states() {
|
|
326
|
+
return {
|
|
327
|
+
"styles": {}
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
static get events() {
|
|
331
|
+
return [{
|
|
332
|
+
"method": "onchange",
|
|
333
|
+
"name": "onchange",
|
|
334
|
+
"bubbles": true,
|
|
335
|
+
"cancelable": true,
|
|
336
|
+
"composed": true,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": ""
|
|
340
|
+
},
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "{ value: string, checked: boolean }",
|
|
343
|
+
"resolved": "{ value: string; checked: boolean; }",
|
|
344
|
+
"references": {}
|
|
345
|
+
}
|
|
346
|
+
}];
|
|
347
|
+
}
|
|
348
|
+
static get elementRef() { return "host"; }
|
|
349
|
+
static get watchers() {
|
|
350
|
+
return [{
|
|
351
|
+
"propName": "size",
|
|
352
|
+
"methodName": "sizeHandler"
|
|
353
|
+
}, {
|
|
354
|
+
"propName": "color",
|
|
355
|
+
"methodName": "setColors"
|
|
356
|
+
}, {
|
|
357
|
+
"propName": "background",
|
|
358
|
+
"methodName": "setColors"
|
|
359
|
+
}, {
|
|
360
|
+
"propName": "background",
|
|
361
|
+
"methodName": "assignColor"
|
|
362
|
+
}];
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
//# sourceMappingURL=cura-radio.js.map
|