@rededor/cura 1.7.0 → 1.8.0
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/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/assets/icons/iconset-default-tmp.svg +26 -0
- package/dist/assets/assets/icons/iconset-default.svg +1 -1
- package/dist/cjs/cura-accordion_20.cjs.entry.js +485 -138
- package/dist/cjs/cura-accordion_20.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +9 -12
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-counter.cjs.entry.js +16 -8
- package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-counter.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-dot.cjs.entry.js +14 -5
- package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-dot.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-pill.cjs.entry.js +23 -7
- package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-pill.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +46 -8
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-outline.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-select.cjs.entry.js +7 -12
- package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-select.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-button.definitions-f036371c.js → cura-button.definitions-B3SK8MaV.js} +2 -1
- package/dist/cjs/cura-button.definitions-B3SK8MaV.js.map +1 -0
- package/dist/cjs/cura-calendar.cjs.entry.js +203 -94
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-calendar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-card.cjs.entry.js +34 -6
- package/dist/cjs/cura-card.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-card.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-checkbox.cjs.entry.js +72 -20
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +25 -7
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-display.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +5 -6
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-dropdown-search-not-found.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-forms.definitions-c164f1b8.js → cura-forms.definitions-DVLuO67c.js} +2 -1
- package/dist/cjs/cura-forms.definitions-DVLuO67c.js.map +1 -0
- package/dist/cjs/{cura-icon.definitions-5223028b.js → cura-icon.definitions-DT0wF67y.js} +2 -1
- package/dist/cjs/cura-icon.definitions-DT0wF67y.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +7 -8
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-icons-view.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-input-date.cjs.entry.js +32 -15
- package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-input-date.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-loader-bar.cjs.entry.js +4 -5
- package/dist/cjs/cura-loader-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-loader-bar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-modal.cjs.entry.js +46 -15
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar.cura-stepper-item.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js +25 -15
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.cjs.entry.js +73 -21
- package/dist/cjs/cura-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-stepper.cjs.entry.js +23 -6
- package/dist/cjs/cura-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-stepper.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +61 -18
- package/dist/cjs/cura-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-switch.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-button.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-button.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-button.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-transparent.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-tabs.definitions-b8955ad4.js → cura-tabs.definitions-CGqqGE2e.js} +2 -1
- package/dist/cjs/cura-tabs.definitions-CGqqGE2e.js.map +1 -0
- package/dist/cjs/{cura-theme-module-09bb63a4.js → cura-theme-module-CJkmAxBA.js} +94 -9
- package/dist/cjs/cura-theme-module-CJkmAxBA.js.map +1 -0
- package/dist/cjs/cura-toast.cjs.entry.js +8 -11
- package/dist/cjs/cura-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-toast.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tooltip.cjs.entry.js +9 -11
- package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/cura.cjs.js +9 -10
- package/dist/cjs/cura.cjs.js.map +1 -1
- package/dist/cjs/{index-60783089.js → index-BK9MSAiE.js} +947 -289
- package/dist/cjs/index-BK9MSAiE.js.map +1 -0
- package/dist/cjs/{index-6dc29195.js → index-EyP6Zlkd.js} +2 -1
- package/dist/cjs/index-EyP6Zlkd.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +5 -8
- package/dist/cjs/loader.cjs.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 +26 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/bike.svg +3 -0
- package/dist/collection/assets-raw/icons/default/cart.svg +3 -0
- package/dist/collection/assets-raw/icons/default/coffee.svg +3 -0
- package/dist/collection/assets-raw/icons/default/id.svg +3 -0
- package/dist/collection/assets-raw/icons/default/image.svg +5 -0
- package/dist/collection/assets-raw/icons/default/store.svg +3 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +57 -18
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +45 -9
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +24 -7
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +8 -4
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js +19 -3
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +40 -9
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.js +86 -17
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +86 -17
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +25 -13
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +81 -16
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +19 -11
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
- package/dist/collection/components/cura-avatar/cura-avatar.js +48 -13
- package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.js +196 -24
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
- package/dist/collection/components/cura-card/cura-card.js +48 -7
- package/dist/collection/components/cura-card/cura-card.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +31 -9
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +91 -28
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +15 -6
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.css +0 -1
- package/dist/collection/components/cura-modal/cura-modal.js +65 -17
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js +3 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +21 -8
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +26 -9
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper.js +34 -6
- package/dist/collection/components/cura-stepper/cura-stepper.js.map +1 -1
- package/dist/collection/components/cura-toast/cura-toast.js +24 -12
- package/dist/collection/components/cura-toast/cura-toast.js.map +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +25 -12
- package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +114 -29
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.css +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +74 -16
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +13 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +132 -28
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +46 -9
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +109 -28
- package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +114 -34
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +13 -6
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js.map +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.js +85 -21
- package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +6 -2
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +14 -4
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +21 -9
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +9 -3
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +39 -8
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +53 -10
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +39 -8
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/components/cura-accordion-item.js +24 -6
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-accordion.js +34 -13
- package/dist/components/cura-accordion.js.map +1 -1
- package/dist/components/cura-alert.js +12 -14
- package/dist/components/cura-alert.js.map +1 -1
- package/dist/components/cura-avatar.js +25 -8
- package/dist/components/cura-avatar.js.map +1 -1
- package/dist/components/cura-badge-counter.js +2 -1
- package/dist/components/cura-badge-distance.js +7 -7
- package/dist/components/cura-badge-distance.js.map +1 -1
- package/dist/components/cura-badge-dot.js +14 -4
- package/dist/components/cura-badge-dot.js.map +1 -1
- package/dist/components/cura-badge-pill.js +2 -1
- package/dist/components/cura-button-outline.js +49 -10
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-select.js +10 -14
- package/dist/components/cura-button-select.js.map +1 -1
- package/dist/components/cura-button-transparent.js +2 -1
- package/dist/components/cura-button.js +49 -10
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-calendar.js +2 -1
- package/dist/components/cura-card.js +34 -5
- package/dist/components/cura-card.js.map +1 -1
- package/dist/components/cura-checkbox.js +75 -22
- package/dist/components/cura-checkbox.js.map +1 -1
- package/dist/components/cura-display.js +25 -6
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-dropdown-search-category.js +5 -5
- package/dist/components/cura-dropdown-search-category.js.map +1 -1
- package/dist/components/cura-dropdown-search-not-found.js +6 -6
- package/dist/components/cura-dropdown-search-not-found.js.map +1 -1
- package/dist/components/cura-dropdown-search-option.js +22 -10
- package/dist/components/cura-dropdown-search-option.js.map +1 -1
- package/dist/components/cura-dropdown-search.js +66 -27
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-heading.js +2 -1
- package/dist/components/cura-icon.js +2 -1
- package/dist/components/cura-icons-view.js +9 -9
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-input-date.js +40 -21
- package/dist/components/cura-input-date.js.map +1 -1
- package/dist/components/cura-input-text.js +2 -1
- package/dist/components/cura-label.js +2 -1
- package/dist/components/cura-loader-bar.js +2 -1
- package/dist/components/cura-loader-circle.js +2 -1
- package/dist/components/cura-modal.js +50 -18
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-page-template.js +4 -4
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +2 -1
- package/dist/components/cura-progress-bar.js +2 -1
- package/dist/components/cura-radio.js +75 -22
- package/dist/components/cura-radio.js.map +1 -1
- package/dist/components/cura-select-option.js +2 -1
- package/dist/components/cura-select.js +2 -1
- package/dist/components/cura-stepper-item.js +2 -1
- package/dist/components/cura-stepper.js +30 -12
- package/dist/components/cura-stepper.js.map +1 -1
- package/dist/components/cura-switch.js +62 -18
- package/dist/components/cura-switch.js.map +1 -1
- package/dist/components/cura-tabs-button.js +9 -11
- package/dist/components/cura-tabs-button.js.map +1 -1
- package/dist/components/cura-tabs-group.js +5 -5
- package/dist/components/cura-tabs-group.js.map +1 -1
- package/dist/components/cura-tabs-transparent.js +8 -10
- package/dist/components/cura-tabs-transparent.js.map +1 -1
- package/dist/components/cura-tabs.js +8 -10
- package/dist/components/cura-tabs.js.map +1 -1
- package/dist/components/cura-toast.js +12 -14
- package/dist/components/cura-toast.js.map +1 -1
- package/dist/components/cura-tooltip.js +15 -16
- package/dist/components/cura-tooltip.js.map +1 -1
- package/dist/components/index.js +3 -547
- package/dist/components/index.js.map +1 -1
- package/dist/components/{cura-icon2.js → p-B5aO1chh.js} +5 -6
- package/dist/components/p-B5aO1chh.js.map +1 -0
- package/dist/components/{cura-heading2.js → p-BHEafDKD.js} +34 -7
- package/dist/components/p-BHEafDKD.js.map +1 -0
- package/dist/components/{cura-button-transparent2.js → p-BRDqwZ4N.js} +48 -11
- package/dist/components/p-BRDqwZ4N.js.map +1 -0
- package/dist/{esm/cura-button.definitions-617d3bad.js → components/p-BSI2FkNn.js} +2 -1
- package/dist/components/p-BSI2FkNn.js.map +1 -0
- package/dist/components/{cura-badge-counter2.js → p-C72aF-gL.js} +18 -9
- package/dist/components/p-C72aF-gL.js.map +1 -0
- package/dist/components/{cura-tabs.definitions.js → p-CHcd-uKK.js} +2 -1
- package/dist/components/p-CHcd-uKK.js.map +1 -0
- package/dist/components/p-D1cPOZpG.js +2617 -0
- package/dist/components/p-D1cPOZpG.js.map +1 -0
- package/dist/components/{cura-paragraph2.js → p-DI4g-ZH4.js} +26 -7
- package/dist/components/p-DI4g-ZH4.js.map +1 -0
- package/dist/components/{cura-label2.js → p-DR1RHrEX.js} +30 -7
- package/dist/components/p-DR1RHrEX.js.map +1 -0
- package/dist/components/{cura-stepper-item2.js → p-DaPc6Dxl.js} +23 -14
- package/dist/components/p-DaPc6Dxl.js.map +1 -0
- package/dist/components/{cura-forms.definitions.js → p-Dot54hbB.js} +2 -1
- package/dist/components/p-Dot54hbB.js.map +1 -0
- package/dist/components/{cura-select-option2.js → p-DpIu_Oxz.js} +8 -9
- package/dist/components/p-DpIu_Oxz.js.map +1 -0
- package/dist/components/{cura-loader-circle2.js → p-Dqm2sAwv.js} +13 -7
- package/dist/components/p-Dqm2sAwv.js.map +1 -0
- package/dist/components/{cura-progress-bar2.js → p-FTSrgi0q.js} +11 -8
- package/dist/components/p-FTSrgi0q.js.map +1 -0
- package/dist/components/{cura-loader-bar2.js → p-KIQMkSRF.js} +5 -5
- package/dist/components/p-KIQMkSRF.js.map +1 -0
- package/dist/components/{cura-badge-pill2.js → p-cOEGtL9C.js} +26 -9
- package/dist/components/p-cOEGtL9C.js.map +1 -0
- package/dist/components/{cura-calendar2.js → p-e-P5qR3J.js} +210 -100
- package/dist/components/p-e-P5qR3J.js.map +1 -0
- package/dist/components/{cura-select2.js → p-y6Cly9DJ.js} +87 -31
- package/dist/components/p-y6Cly9DJ.js.map +1 -0
- package/dist/components/{cura-input-text2.js → p-zz_zOPBZ.js} +75 -102
- package/dist/components/p-zz_zOPBZ.js.map +1 -0
- package/dist/cura/cura-alert.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-counter.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-dot.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-pill.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-outline.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-select.entry.esm.js.map +1 -0
- package/dist/cura/{p-12a4ae7e.entry.js.map → cura-calendar.entry.esm.js.map} +1 -1
- package/dist/cura/{p-53d68d72.entry.js.map → cura-card.entry.esm.js.map} +1 -1
- package/dist/cura/cura-checkbox.entry.esm.js.map +1 -0
- package/dist/cura/cura-display.entry.esm.js.map +1 -0
- package/dist/cura/cura-dropdown-search-not-found.entry.esm.js.map +1 -0
- package/dist/cura/cura-icons-view.entry.esm.js.map +1 -0
- package/dist/cura/cura-input-date.entry.esm.js.map +1 -0
- package/dist/cura/cura-loader-bar.entry.esm.js.map +1 -0
- package/dist/cura/{p-1ef21ae9.entry.js.map → cura-modal.entry.esm.js.map} +1 -1
- package/dist/cura/cura-progress-bar.cura-stepper-item.entry.esm.js.map +1 -0
- package/dist/cura/cura-radio.entry.esm.js.map +1 -0
- package/dist/cura/cura-stepper.entry.esm.js.map +1 -0
- package/dist/cura/cura-switch.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-button.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-transparent.entry.esm.js.map +1 -0
- package/dist/cura/cura-toast.entry.esm.js.map +1 -0
- package/dist/cura/cura-tooltip.entry.esm.js.map +1 -0
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/loader.esm.js.map +1 -0
- package/dist/cura/p-077019da.entry.js +2 -0
- package/dist/cura/p-077019da.entry.js.map +1 -0
- package/dist/cura/p-07783235.entry.js +2 -0
- package/dist/cura/p-07783235.entry.js.map +1 -0
- package/dist/cura/p-090e297c.entry.js +2 -0
- package/dist/cura/p-090e297c.entry.js.map +1 -0
- package/dist/cura/p-16c0b52c.entry.js +2 -0
- package/dist/cura/p-16c0b52c.entry.js.map +1 -0
- package/dist/cura/p-2632183e.entry.js +2 -0
- package/dist/cura/p-2632183e.entry.js.map +1 -0
- package/dist/cura/p-32015dcc.entry.js +2 -0
- package/dist/cura/p-32015dcc.entry.js.map +1 -0
- package/dist/cura/p-32f94709.entry.js +2 -0
- package/dist/cura/p-32f94709.entry.js.map +1 -0
- package/dist/cura/p-3d6040e2.entry.js +2 -0
- package/dist/cura/p-3d6040e2.entry.js.map +1 -0
- package/dist/cura/p-4ac578a6.entry.js +2 -0
- package/dist/cura/p-4ac578a6.entry.js.map +1 -0
- package/dist/cura/p-4bde448e.entry.js +2 -0
- package/dist/cura/p-4bde448e.entry.js.map +1 -0
- package/dist/cura/p-6feba852.entry.js +2 -0
- package/dist/cura/p-6feba852.entry.js.map +1 -0
- package/dist/cura/p-7586fd07.entry.js +2 -0
- package/dist/cura/p-7586fd07.entry.js.map +1 -0
- package/dist/cura/p-76cbb798.entry.js +2 -0
- package/dist/cura/p-76cbb798.entry.js.map +1 -0
- package/dist/cura/p-7fd143aa.entry.js +2 -0
- package/dist/cura/p-7fd143aa.entry.js.map +1 -0
- package/dist/cura/p-8c83f259.entry.js +2 -0
- package/dist/cura/p-8c83f259.entry.js.map +1 -0
- package/dist/cura/p-95cd7918.entry.js +2 -0
- package/dist/cura/p-95cd7918.entry.js.map +1 -0
- package/dist/cura/{p-272c784a.js → p-964stZ3D.js} +1 -1
- package/dist/cura/p-964stZ3D.js.map +1 -0
- package/dist/cura/p-9ef5444e.entry.js +2 -0
- package/dist/cura/p-9ef5444e.entry.js.map +1 -0
- package/dist/cura/p-BPKQjAwN.js +2 -0
- package/dist/cura/p-BPKQjAwN.js.map +1 -0
- package/dist/cura/{p-53c18ed4.js → p-BSI2FkNn.js} +1 -1
- package/dist/cura/p-BSI2FkNn.js.map +1 -0
- package/dist/cura/{p-efcb32eb.js → p-CHcd-uKK.js} +1 -1
- package/dist/cura/p-CHcd-uKK.js.map +1 -0
- package/dist/cura/{p-f9b8f665.js → p-Dot54hbB.js} +1 -1
- package/dist/cura/p-Dot54hbB.js.map +1 -0
- package/dist/cura/p-PPMZr_VE.js +3 -0
- package/dist/cura/p-PPMZr_VE.js.map +1 -0
- package/dist/cura/p-c6f240f0.entry.js +2 -0
- package/dist/cura/p-c6f240f0.entry.js.map +1 -0
- package/dist/cura/p-ceb646df.entry.js +2 -0
- package/dist/cura/p-ceb646df.entry.js.map +1 -0
- package/dist/cura/p-d040f8b9.entry.js +2 -0
- package/dist/cura/p-d040f8b9.entry.js.map +1 -0
- package/dist/cura/p-deb0b764.entry.js +2 -0
- package/dist/cura/p-deb0b764.entry.js.map +1 -0
- package/dist/cura/p-df7cb250.entry.js +2 -0
- package/dist/cura/p-df7cb250.entry.js.map +1 -0
- package/dist/cura/p-f9af3a3b.entry.js +2 -0
- package/dist/cura/p-f9af3a3b.entry.js.map +1 -0
- package/dist/cura/p-fc3b57a8.entry.js +2 -0
- package/dist/cura/p-fc3b57a8.entry.js.map +1 -0
- package/dist/cura/{p-48f9289b.js → p-sjLA93YY.js} +1 -1
- package/dist/cura/p-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-accordion_20.entry.js +484 -135
- package/dist/esm/cura-accordion_20.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +9 -10
- package/dist/esm/cura-alert.entry.js.map +1 -1
- package/dist/esm/cura-badge-counter.entry.js +16 -6
- package/dist/esm/cura-badge-counter.entry.js.map +1 -1
- package/dist/esm/cura-badge-dot.entry.js +14 -3
- package/dist/esm/cura-badge-dot.entry.js.map +1 -1
- package/dist/esm/cura-badge-pill.entry.js +23 -5
- package/dist/esm/cura-badge-pill.entry.js.map +1 -1
- package/dist/esm/cura-button-outline.entry.js +46 -6
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-select.entry.js +7 -10
- package/dist/esm/cura-button-select.entry.js.map +1 -1
- package/dist/{components/cura-button.definitions.js → esm/cura-button.definitions-BSI2FkNn.js} +2 -1
- package/dist/esm/cura-button.definitions-BSI2FkNn.js.map +1 -0
- package/dist/esm/cura-calendar.entry.js +203 -92
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura-card.entry.js +34 -4
- package/dist/esm/cura-card.entry.js.map +1 -1
- package/dist/esm/cura-checkbox.entry.js +72 -18
- package/dist/esm/cura-checkbox.entry.js.map +1 -1
- package/dist/esm/cura-display.entry.js +25 -5
- package/dist/esm/cura-display.entry.js.map +1 -1
- package/dist/esm/cura-dropdown-search-not-found.entry.js +5 -4
- package/dist/esm/cura-dropdown-search-not-found.entry.js.map +1 -1
- package/dist/esm/{cura-forms.definitions-2f963167.js → cura-forms.definitions-Dot54hbB.js} +2 -1
- package/dist/esm/cura-forms.definitions-Dot54hbB.js.map +1 -0
- package/dist/esm/{cura-icon.definitions-a892c0e2.js → cura-icon.definitions-sjLA93YY.js} +2 -1
- package/dist/esm/cura-icon.definitions-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +7 -6
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-input-date.entry.js +32 -13
- package/dist/esm/cura-input-date.entry.js.map +1 -1
- package/dist/esm/cura-loader-bar.entry.js +4 -3
- package/dist/esm/cura-loader-bar.entry.js.map +1 -1
- package/dist/esm/cura-modal.entry.js +46 -13
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura-progress-bar.cura-stepper-item.entry.js.map +1 -0
- package/dist/esm/cura-progress-bar_2.entry.js +25 -13
- package/dist/esm/cura-progress-bar_2.entry.js.map +1 -1
- package/dist/esm/cura-radio.entry.js +73 -19
- package/dist/esm/cura-radio.entry.js.map +1 -1
- package/dist/esm/cura-stepper.entry.js +23 -4
- package/dist/esm/cura-stepper.entry.js.map +1 -1
- package/dist/esm/cura-switch.entry.js +61 -16
- package/dist/esm/cura-switch.entry.js.map +1 -1
- package/dist/esm/cura-tabs-button.entry.js +6 -7
- package/dist/esm/cura-tabs-button.entry.js.map +1 -1
- package/dist/esm/cura-tabs-transparent.entry.js +6 -7
- package/dist/esm/cura-tabs-transparent.entry.js.map +1 -1
- package/dist/esm/{cura-tabs.definitions-a017126e.js → cura-tabs.definitions-CHcd-uKK.js} +2 -1
- package/dist/esm/cura-tabs.definitions-CHcd-uKK.js.map +1 -0
- package/dist/esm/{cura-theme-module-bf286f68.js → cura-theme-module-BPKQjAwN.js} +88 -4
- package/dist/esm/cura-theme-module-BPKQjAwN.js.map +1 -0
- package/dist/esm/cura-toast.entry.js +8 -9
- package/dist/esm/cura-toast.entry.js.map +1 -1
- package/dist/esm/cura-tooltip.entry.js +9 -9
- package/dist/esm/cura-tooltip.entry.js.map +1 -1
- package/dist/esm/cura.js +7 -7
- package/dist/esm/cura.js.map +1 -1
- package/dist/esm/{index-fbee309a.js → index-964stZ3D.js} +2 -1
- package/dist/esm/index-964stZ3D.js.map +1 -0
- package/dist/esm/{index-21683715.js → index-OdKytJIH.js} +947 -270
- package/dist/esm/index-OdKytJIH.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +5 -6
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +4 -0
- package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +14 -0
- package/dist/types/components.d.ts +718 -0
- package/dist/types/stencil-public-runtime.d.ts +25 -1
- package/package.json +13 -16
- package/dist/cjs/app-globals-6d5b51b6.js +0 -70
- package/dist/cjs/app-globals-6d5b51b6.js.map +0 -1
- package/dist/cjs/cura-button.definitions-f036371c.js.map +0 -1
- package/dist/cjs/cura-forms.definitions-c164f1b8.js.map +0 -1
- package/dist/cjs/cura-icon.definitions-5223028b.js.map +0 -1
- package/dist/cjs/cura-tabs.definitions-b8955ad4.js.map +0 -1
- package/dist/cjs/cura-theme-module-09bb63a4.js.map +0 -1
- package/dist/cjs/index-60783089.js.map +0 -1
- package/dist/cjs/index-6dc29195.js.map +0 -1
- package/dist/cjs/static-44199808.js +0 -90
- package/dist/cjs/static-44199808.js.map +0 -1
- package/dist/components/cura-badge-counter2.js.map +0 -1
- package/dist/components/cura-badge-pill2.js.map +0 -1
- package/dist/components/cura-button-transparent2.js.map +0 -1
- package/dist/components/cura-button.definitions.js.map +0 -1
- package/dist/components/cura-calendar2.js.map +0 -1
- package/dist/components/cura-forms.definitions.js.map +0 -1
- package/dist/components/cura-heading2.js.map +0 -1
- package/dist/components/cura-icon2.js.map +0 -1
- package/dist/components/cura-input-text2.js.map +0 -1
- package/dist/components/cura-label2.js.map +0 -1
- package/dist/components/cura-loader-bar2.js.map +0 -1
- package/dist/components/cura-loader-circle2.js.map +0 -1
- package/dist/components/cura-paragraph2.js.map +0 -1
- package/dist/components/cura-progress-bar2.js.map +0 -1
- package/dist/components/cura-select-option2.js.map +0 -1
- package/dist/components/cura-select2.js.map +0 -1
- package/dist/components/cura-stepper-item2.js.map +0 -1
- package/dist/components/cura-tabs.definitions.js.map +0 -1
- package/dist/cura/p-0aeaf57a.entry.js +0 -2
- package/dist/cura/p-0aeaf57a.entry.js.map +0 -1
- package/dist/cura/p-0b872499.entry.js +0 -2
- package/dist/cura/p-0b872499.entry.js.map +0 -1
- package/dist/cura/p-0ccde0ff.entry.js +0 -2
- package/dist/cura/p-0ccde0ff.entry.js.map +0 -1
- package/dist/cura/p-12a4ae7e.entry.js +0 -2
- package/dist/cura/p-137f003b.entry.js +0 -2
- package/dist/cura/p-137f003b.entry.js.map +0 -1
- package/dist/cura/p-197213c0.entry.js +0 -2
- package/dist/cura/p-197213c0.entry.js.map +0 -1
- package/dist/cura/p-1ef21ae9.entry.js +0 -2
- package/dist/cura/p-202dc01a.entry.js +0 -2
- package/dist/cura/p-202dc01a.entry.js.map +0 -1
- package/dist/cura/p-20b05d8f.entry.js +0 -2
- package/dist/cura/p-20b05d8f.entry.js.map +0 -1
- package/dist/cura/p-272c784a.js.map +0 -1
- package/dist/cura/p-2db4deb3.js +0 -2
- package/dist/cura/p-2db4deb3.js.map +0 -1
- package/dist/cura/p-48f9289b.js.map +0 -1
- package/dist/cura/p-4ee8efca.js +0 -3
- package/dist/cura/p-4ee8efca.js.map +0 -1
- package/dist/cura/p-53c18ed4.js.map +0 -1
- package/dist/cura/p-53d68d72.entry.js +0 -2
- package/dist/cura/p-5a43e745.entry.js +0 -2
- package/dist/cura/p-5a43e745.entry.js.map +0 -1
- package/dist/cura/p-5c6f9593.entry.js +0 -2
- package/dist/cura/p-5c6f9593.entry.js.map +0 -1
- package/dist/cura/p-633c13cd.entry.js +0 -2
- package/dist/cura/p-633c13cd.entry.js.map +0 -1
- package/dist/cura/p-6cbd49dd.js +0 -2
- package/dist/cura/p-6cbd49dd.js.map +0 -1
- package/dist/cura/p-7a68835f.entry.js +0 -2
- package/dist/cura/p-7a68835f.entry.js.map +0 -1
- package/dist/cura/p-7e10b146.entry.js +0 -2
- package/dist/cura/p-7e10b146.entry.js.map +0 -1
- package/dist/cura/p-7e2d1229.entry.js +0 -2
- package/dist/cura/p-7e2d1229.entry.js.map +0 -1
- package/dist/cura/p-8aade007.entry.js +0 -2
- package/dist/cura/p-8aade007.entry.js.map +0 -1
- package/dist/cura/p-9f460031.js +0 -2
- package/dist/cura/p-9f460031.js.map +0 -1
- package/dist/cura/p-ac0c90af.entry.js +0 -2
- package/dist/cura/p-ac0c90af.entry.js.map +0 -1
- package/dist/cura/p-b254bbe4.entry.js +0 -2
- package/dist/cura/p-b254bbe4.entry.js.map +0 -1
- package/dist/cura/p-b4ee956b.entry.js +0 -2
- package/dist/cura/p-b4ee956b.entry.js.map +0 -1
- package/dist/cura/p-b60a6aaa.entry.js +0 -2
- package/dist/cura/p-b60a6aaa.entry.js.map +0 -1
- package/dist/cura/p-b6ff8ac1.entry.js +0 -2
- package/dist/cura/p-b6ff8ac1.entry.js.map +0 -1
- package/dist/cura/p-d8e1e182.entry.js +0 -2
- package/dist/cura/p-d8e1e182.entry.js.map +0 -1
- package/dist/cura/p-d97719bc.entry.js +0 -2
- package/dist/cura/p-d97719bc.entry.js.map +0 -1
- package/dist/cura/p-efcb32eb.js.map +0 -1
- package/dist/cura/p-f9b8f665.js.map +0 -1
- package/dist/esm/app-globals-c2abb41c.js +0 -68
- package/dist/esm/app-globals-c2abb41c.js.map +0 -1
- package/dist/esm/cura-button.definitions-617d3bad.js.map +0 -1
- package/dist/esm/cura-forms.definitions-2f963167.js.map +0 -1
- package/dist/esm/cura-icon.definitions-a892c0e2.js.map +0 -1
- package/dist/esm/cura-tabs.definitions-a017126e.js.map +0 -1
- package/dist/esm/cura-theme-module-bf286f68.js.map +0 -1
- package/dist/esm/index-21683715.js.map +0 -1
- package/dist/esm/index-fbee309a.js.map +0 -1
- package/dist/esm/static-090f0088.js +0 -88
- package/dist/esm/static-090f0088.js.map +0 -1
- package/dist/loader/package.json +0 -11
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class CuraLabel {
|
|
3
3
|
constructor() {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Set size of body text.
|
|
6
|
+
* Values: medium (default) | large | small | xsmall.
|
|
7
|
+
*/
|
|
5
8
|
this.size = 'medium';
|
|
9
|
+
/**
|
|
10
|
+
* Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well.
|
|
11
|
+
* Values: regular (default) | bold.
|
|
12
|
+
*/
|
|
6
13
|
this.weight = 'regular';
|
|
14
|
+
/**
|
|
15
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text.
|
|
16
|
+
* Values: Color from design system scheme. Default to 'accent-dark'.
|
|
17
|
+
*/
|
|
7
18
|
this.spotColor = 'accent-dark';
|
|
8
|
-
|
|
19
|
+
/**
|
|
20
|
+
* CSS margin-block property values.
|
|
21
|
+
* Default to 1.25em
|
|
22
|
+
*/
|
|
9
23
|
this.marginBlock = '0';
|
|
24
|
+
/**
|
|
25
|
+
* CSS line-height property values.
|
|
26
|
+
* Default to 140%
|
|
27
|
+
*/
|
|
10
28
|
this.lineHeight = '125%';
|
|
29
|
+
/**
|
|
30
|
+
* Apply text-overflow ellipsis definitions.
|
|
31
|
+
* Default to none
|
|
32
|
+
*/
|
|
11
33
|
this.textOverflow = 'none';
|
|
12
34
|
this.styles = {};
|
|
35
|
+
this.theme = window.CuraAPI.theme;
|
|
13
36
|
}
|
|
14
37
|
handleChangeColor() {
|
|
15
38
|
this.setColors();
|
|
@@ -68,6 +91,7 @@ export class CuraLabel {
|
|
|
68
91
|
return {
|
|
69
92
|
"size": {
|
|
70
93
|
"type": "string",
|
|
94
|
+
"attribute": "size",
|
|
71
95
|
"mutable": false,
|
|
72
96
|
"complexType": {
|
|
73
97
|
"original": "'medium' | 'large' | 'small' | 'xsmall' | string",
|
|
@@ -80,12 +104,14 @@ export class CuraLabel {
|
|
|
80
104
|
"tags": [],
|
|
81
105
|
"text": "Set size of body text.\nValues: medium (default) | large | small | xsmall."
|
|
82
106
|
},
|
|
83
|
-
"
|
|
107
|
+
"getter": false,
|
|
108
|
+
"setter": false,
|
|
84
109
|
"reflect": true,
|
|
85
110
|
"defaultValue": "'medium'"
|
|
86
111
|
},
|
|
87
112
|
"weight": {
|
|
88
113
|
"type": "string",
|
|
114
|
+
"attribute": "weight",
|
|
89
115
|
"mutable": false,
|
|
90
116
|
"complexType": {
|
|
91
117
|
"original": "'regular' | 'bold'",
|
|
@@ -98,12 +124,14 @@ export class CuraLabel {
|
|
|
98
124
|
"tags": [],
|
|
99
125
|
"text": "Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well.\nValues: regular (default) | bold."
|
|
100
126
|
},
|
|
101
|
-
"
|
|
127
|
+
"getter": false,
|
|
128
|
+
"setter": false,
|
|
102
129
|
"reflect": true,
|
|
103
130
|
"defaultValue": "'regular'"
|
|
104
131
|
},
|
|
105
132
|
"spotColor": {
|
|
106
133
|
"type": "string",
|
|
134
|
+
"attribute": "spot-color",
|
|
107
135
|
"mutable": false,
|
|
108
136
|
"complexType": {
|
|
109
137
|
"original": "string",
|
|
@@ -116,12 +144,14 @@ export class CuraLabel {
|
|
|
116
144
|
"tags": [],
|
|
117
145
|
"text": "Apply design system color to interactive elements like <a> and <abbr> inside the text.\nValues: Color from design system scheme. Default to 'accent-dark'."
|
|
118
146
|
},
|
|
119
|
-
"
|
|
147
|
+
"getter": false,
|
|
148
|
+
"setter": false,
|
|
120
149
|
"reflect": true,
|
|
121
150
|
"defaultValue": "'accent-dark'"
|
|
122
151
|
},
|
|
123
152
|
"color": {
|
|
124
153
|
"type": "string",
|
|
154
|
+
"attribute": "color",
|
|
125
155
|
"mutable": false,
|
|
126
156
|
"complexType": {
|
|
127
157
|
"original": "string",
|
|
@@ -134,11 +164,13 @@ export class CuraLabel {
|
|
|
134
164
|
"tags": [],
|
|
135
165
|
"text": "Text color.\nValues: Color from design system scheme. Default to the font color from the theme."
|
|
136
166
|
},
|
|
137
|
-
"
|
|
167
|
+
"getter": false,
|
|
168
|
+
"setter": false,
|
|
138
169
|
"reflect": false
|
|
139
170
|
},
|
|
140
171
|
"marginBlock": {
|
|
141
172
|
"type": "string",
|
|
173
|
+
"attribute": "margin-block",
|
|
142
174
|
"mutable": false,
|
|
143
175
|
"complexType": {
|
|
144
176
|
"original": "string",
|
|
@@ -151,12 +183,14 @@ export class CuraLabel {
|
|
|
151
183
|
"tags": [],
|
|
152
184
|
"text": "CSS margin-block property values.\nDefault to 1.25em"
|
|
153
185
|
},
|
|
154
|
-
"
|
|
186
|
+
"getter": false,
|
|
187
|
+
"setter": false,
|
|
155
188
|
"reflect": true,
|
|
156
189
|
"defaultValue": "'0'"
|
|
157
190
|
},
|
|
158
191
|
"lineHeight": {
|
|
159
192
|
"type": "string",
|
|
193
|
+
"attribute": "line-height",
|
|
160
194
|
"mutable": false,
|
|
161
195
|
"complexType": {
|
|
162
196
|
"original": "string",
|
|
@@ -169,12 +203,14 @@ export class CuraLabel {
|
|
|
169
203
|
"tags": [],
|
|
170
204
|
"text": "CSS line-height property values.\nDefault to 140%"
|
|
171
205
|
},
|
|
172
|
-
"
|
|
206
|
+
"getter": false,
|
|
207
|
+
"setter": false,
|
|
173
208
|
"reflect": true,
|
|
174
209
|
"defaultValue": "'125%'"
|
|
175
210
|
},
|
|
176
211
|
"textOverflow": {
|
|
177
212
|
"type": "string",
|
|
213
|
+
"attribute": "text-overflow",
|
|
178
214
|
"mutable": false,
|
|
179
215
|
"complexType": {
|
|
180
216
|
"original": "'none' | 'single' | string",
|
|
@@ -187,7 +223,8 @@ export class CuraLabel {
|
|
|
187
223
|
"tags": [],
|
|
188
224
|
"text": "Apply text-overflow ellipsis definitions.\nDefault to none"
|
|
189
225
|
},
|
|
190
|
-
"
|
|
226
|
+
"getter": false,
|
|
227
|
+
"setter": false,
|
|
191
228
|
"reflect": true,
|
|
192
229
|
"defaultValue": "'none'"
|
|
193
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-label.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-label/cura-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,SAAS
|
|
1
|
+
{"version":3,"file":"cura-label.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-label/cura-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,SAAS;IALtB;QAOE;;;WAGG;QACoB,SAAI,GAAqD,QAAQ,CAAC;QAEzF;;;WAGG;QACoB,WAAM,GAAuB,SAAS,CAAC;QAE9D;;;UAGE;QACqB,cAAS,GAAG,aAAa,CAAC;QAajD;;;WAGG;QACoB,gBAAW,GAAG,GAAG,CAAC;QAEzC;;;WAGG;QACoB,eAAU,GAAG,MAAM,CAAC;QAE3C;;;WAGG;QACoB,iBAAY,GAA+B,MAAM,CAAC;QAYhE,WAAM,GAAG,EAAE,CAAC;QACrB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;KAuD9B;IAxFC,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAiCD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,EAAE,CA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AAe,EAAE,IAAI,CAAC,UAAU;YAChC,cAAc,EAAE,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;SAC1E,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE;YACnC,0DAAG,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE;gBAC7C,8DAAa,CACX,CACC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-label',\n styleUrl: 'cura-label.scss',\n shadow: true,\n})\nexport class CuraLabel {\n\n /**\n * Set size of body text.\n * Values: medium (default) | large | small | xsmall.\n */\n @Prop({reflect: true}) size: 'medium' | 'large' | 'small' | 'xsmall' | string = 'medium';\n\n /**\n * Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well.\n * Values: regular (default) | bold.\n */\n @Prop({reflect: true}) weight: 'regular' | 'bold' = 'regular';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop({reflect: true}) spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '0';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '125%';\n\n /**\n * Apply text-overflow ellipsis definitions.\n * Default to none\n */\n @Prop({reflect: true}) textOverflow: 'none' | 'single' | string = 'none';\n\n /**\n * Host element <cura-label>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n @State() styles = {};\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n getClasses() {\n const classes = {\n 'textoverflow-single': this.textOverflow === 'single',\n };\n classes[this.size.toLowerCase()] = true;\n classes[`${this.weight.toLowerCase()}-weight`] = true;\n return classes;\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': this.theme.fonts.getFamily('body'),\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n };\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n hostCSSProperties() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n };\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n <p style={this.styles} class={this.getClasses()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -2,34 +2,87 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { formsSizes } from "../cura-forms.definitions";
|
|
3
3
|
export class CuraRadio {
|
|
4
4
|
constructor() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
this.isDarkbackground = () => this.background === 'dark';
|
|
11
|
-
this.handleClick = () => {
|
|
12
|
-
if (this.disabled)
|
|
13
|
-
return;
|
|
14
|
-
this.checked = !this.checked;
|
|
15
|
-
this.internals.setFormValue(this.value);
|
|
16
|
-
this.onchange.emit({ value: this.value, checked: this.checked });
|
|
17
|
-
};
|
|
5
|
+
/**
|
|
6
|
+
* Reflects the checked state of the radio button.
|
|
7
|
+
* Mutable property allowing state change.
|
|
8
|
+
*/
|
|
18
9
|
this.checked = false;
|
|
10
|
+
/**
|
|
11
|
+
* Status of the radio button.
|
|
12
|
+
* Can be 'error', 'success', or 'default'.
|
|
13
|
+
*/
|
|
19
14
|
this.status = 'default';
|
|
15
|
+
/**
|
|
16
|
+
* Reflects the disabled state of the radio button.
|
|
17
|
+
*/
|
|
20
18
|
this.disabled = false;
|
|
19
|
+
/**
|
|
20
|
+
* Reflects the required state of the radio button.
|
|
21
|
+
*/
|
|
21
22
|
this.required = false;
|
|
23
|
+
/**
|
|
24
|
+
* Text label associated with the radio button.
|
|
25
|
+
*/
|
|
22
26
|
this.label = '';
|
|
23
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Position of the label relative to the radio button.
|
|
29
|
+
* Can be 'left' or 'right'.
|
|
30
|
+
*/
|
|
24
31
|
this.position = 'left';
|
|
32
|
+
/**
|
|
33
|
+
* Value associated with the radio button.
|
|
34
|
+
*/
|
|
25
35
|
this.value = '';
|
|
36
|
+
/**
|
|
37
|
+
* Name attribute of the radio button.
|
|
38
|
+
*/
|
|
26
39
|
this.name = '';
|
|
40
|
+
/**
|
|
41
|
+
* Background theme of the radio button.
|
|
42
|
+
* Can be 'dark' or 'light'.
|
|
43
|
+
*/
|
|
27
44
|
this.background = 'light';
|
|
45
|
+
/**
|
|
46
|
+
* Size of the radio button.
|
|
47
|
+
* Can be 'small', 'medium', or 'large'.
|
|
48
|
+
*/
|
|
28
49
|
this.size = 'medium';
|
|
50
|
+
/**
|
|
51
|
+
* Color theme of the radio button.
|
|
52
|
+
*/
|
|
29
53
|
this.color = 'accent';
|
|
54
|
+
/**
|
|
55
|
+
* Controls how the label text should handle overflow.
|
|
56
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
57
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
58
|
+
* - `string`: Custom overflow handling mode.
|
|
59
|
+
*
|
|
60
|
+
* @default 'none'
|
|
61
|
+
*/
|
|
30
62
|
this.overflowLabel = 'none';
|
|
63
|
+
/**
|
|
64
|
+
* Controls how the helper text should handle overflow.
|
|
65
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
66
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
67
|
+
* - `string`: Custom overflow handling mode.
|
|
68
|
+
*
|
|
69
|
+
* @default 'none'
|
|
70
|
+
*/
|
|
31
71
|
this.overflowHelper = 'none';
|
|
32
72
|
this.styles = {};
|
|
73
|
+
this.sizes = {
|
|
74
|
+
large: { size: 20 },
|
|
75
|
+
medium: { size: 14 },
|
|
76
|
+
small: { size: 10 },
|
|
77
|
+
};
|
|
78
|
+
this.isDarkbackground = () => this.background === 'dark';
|
|
79
|
+
this.handleClick = () => {
|
|
80
|
+
if (this.disabled)
|
|
81
|
+
return;
|
|
82
|
+
this.checked = !this.checked;
|
|
83
|
+
this.internals.setFormValue(this.value);
|
|
84
|
+
this.onchange.emit({ value: this.value, checked: this.checked });
|
|
85
|
+
};
|
|
33
86
|
}
|
|
34
87
|
sizeHandler() {
|
|
35
88
|
this.styles = Object.assign(Object.assign({}, this.styles), { '--size-after': `${this.sizes[this.size].size}px`, '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
|
|
@@ -141,6 +194,7 @@ export class CuraRadio {
|
|
|
141
194
|
return {
|
|
142
195
|
"checked": {
|
|
143
196
|
"type": "boolean",
|
|
197
|
+
"attribute": "checked",
|
|
144
198
|
"mutable": true,
|
|
145
199
|
"complexType": {
|
|
146
200
|
"original": "boolean",
|
|
@@ -153,12 +207,14 @@ export class CuraRadio {
|
|
|
153
207
|
"tags": [],
|
|
154
208
|
"text": "Reflects the checked state of the radio button.\nMutable property allowing state change."
|
|
155
209
|
},
|
|
156
|
-
"
|
|
210
|
+
"getter": false,
|
|
211
|
+
"setter": false,
|
|
157
212
|
"reflect": true,
|
|
158
213
|
"defaultValue": "false"
|
|
159
214
|
},
|
|
160
215
|
"status": {
|
|
161
216
|
"type": "string",
|
|
217
|
+
"attribute": "status",
|
|
162
218
|
"mutable": true,
|
|
163
219
|
"complexType": {
|
|
164
220
|
"original": "'error' | 'success' | 'default'",
|
|
@@ -171,12 +227,14 @@ export class CuraRadio {
|
|
|
171
227
|
"tags": [],
|
|
172
228
|
"text": "Status of the radio button.\nCan be 'error', 'success', or 'default'."
|
|
173
229
|
},
|
|
174
|
-
"
|
|
230
|
+
"getter": false,
|
|
231
|
+
"setter": false,
|
|
175
232
|
"reflect": true,
|
|
176
233
|
"defaultValue": "'default'"
|
|
177
234
|
},
|
|
178
235
|
"disabled": {
|
|
179
236
|
"type": "boolean",
|
|
237
|
+
"attribute": "disabled",
|
|
180
238
|
"mutable": false,
|
|
181
239
|
"complexType": {
|
|
182
240
|
"original": "boolean",
|
|
@@ -189,12 +247,14 @@ export class CuraRadio {
|
|
|
189
247
|
"tags": [],
|
|
190
248
|
"text": "Reflects the disabled state of the radio button."
|
|
191
249
|
},
|
|
192
|
-
"
|
|
250
|
+
"getter": false,
|
|
251
|
+
"setter": false,
|
|
193
252
|
"reflect": true,
|
|
194
253
|
"defaultValue": "false"
|
|
195
254
|
},
|
|
196
255
|
"required": {
|
|
197
256
|
"type": "boolean",
|
|
257
|
+
"attribute": "required",
|
|
198
258
|
"mutable": false,
|
|
199
259
|
"complexType": {
|
|
200
260
|
"original": "boolean",
|
|
@@ -207,12 +267,14 @@ export class CuraRadio {
|
|
|
207
267
|
"tags": [],
|
|
208
268
|
"text": "Reflects the required state of the radio button."
|
|
209
269
|
},
|
|
210
|
-
"
|
|
270
|
+
"getter": false,
|
|
271
|
+
"setter": false,
|
|
211
272
|
"reflect": true,
|
|
212
273
|
"defaultValue": "false"
|
|
213
274
|
},
|
|
214
275
|
"label": {
|
|
215
276
|
"type": "string",
|
|
277
|
+
"attribute": "label",
|
|
216
278
|
"mutable": false,
|
|
217
279
|
"complexType": {
|
|
218
280
|
"original": "string",
|
|
@@ -225,12 +287,14 @@ export class CuraRadio {
|
|
|
225
287
|
"tags": [],
|
|
226
288
|
"text": "Text label associated with the radio button."
|
|
227
289
|
},
|
|
228
|
-
"
|
|
290
|
+
"getter": false,
|
|
291
|
+
"setter": false,
|
|
229
292
|
"reflect": true,
|
|
230
293
|
"defaultValue": "''"
|
|
231
294
|
},
|
|
232
295
|
"ontabindex": {
|
|
233
296
|
"type": "number",
|
|
297
|
+
"attribute": "ontabindex",
|
|
234
298
|
"mutable": false,
|
|
235
299
|
"complexType": {
|
|
236
300
|
"original": "number",
|
|
@@ -243,11 +307,13 @@ export class CuraRadio {
|
|
|
243
307
|
"tags": [],
|
|
244
308
|
"text": "Specifies the tabindex of the radio button."
|
|
245
309
|
},
|
|
246
|
-
"
|
|
310
|
+
"getter": false,
|
|
311
|
+
"setter": false,
|
|
247
312
|
"reflect": true
|
|
248
313
|
},
|
|
249
314
|
"position": {
|
|
250
315
|
"type": "string",
|
|
316
|
+
"attribute": "position",
|
|
251
317
|
"mutable": false,
|
|
252
318
|
"complexType": {
|
|
253
319
|
"original": "'left' | 'right'",
|
|
@@ -260,12 +326,14 @@ export class CuraRadio {
|
|
|
260
326
|
"tags": [],
|
|
261
327
|
"text": "Position of the label relative to the radio button.\nCan be 'left' or 'right'."
|
|
262
328
|
},
|
|
263
|
-
"
|
|
329
|
+
"getter": false,
|
|
330
|
+
"setter": false,
|
|
264
331
|
"reflect": true,
|
|
265
332
|
"defaultValue": "'left'"
|
|
266
333
|
},
|
|
267
334
|
"value": {
|
|
268
335
|
"type": "string",
|
|
336
|
+
"attribute": "value",
|
|
269
337
|
"mutable": false,
|
|
270
338
|
"complexType": {
|
|
271
339
|
"original": "string",
|
|
@@ -278,12 +346,14 @@ export class CuraRadio {
|
|
|
278
346
|
"tags": [],
|
|
279
347
|
"text": "Value associated with the radio button."
|
|
280
348
|
},
|
|
281
|
-
"
|
|
349
|
+
"getter": false,
|
|
350
|
+
"setter": false,
|
|
282
351
|
"reflect": true,
|
|
283
352
|
"defaultValue": "''"
|
|
284
353
|
},
|
|
285
354
|
"name": {
|
|
286
355
|
"type": "string",
|
|
356
|
+
"attribute": "name",
|
|
287
357
|
"mutable": false,
|
|
288
358
|
"complexType": {
|
|
289
359
|
"original": "string",
|
|
@@ -296,12 +366,14 @@ export class CuraRadio {
|
|
|
296
366
|
"tags": [],
|
|
297
367
|
"text": "Name attribute of the radio button."
|
|
298
368
|
},
|
|
299
|
-
"
|
|
369
|
+
"getter": false,
|
|
370
|
+
"setter": false,
|
|
300
371
|
"reflect": true,
|
|
301
372
|
"defaultValue": "''"
|
|
302
373
|
},
|
|
303
374
|
"background": {
|
|
304
375
|
"type": "string",
|
|
376
|
+
"attribute": "background",
|
|
305
377
|
"mutable": false,
|
|
306
378
|
"complexType": {
|
|
307
379
|
"original": "'dark' | 'light'",
|
|
@@ -314,12 +386,14 @@ export class CuraRadio {
|
|
|
314
386
|
"tags": [],
|
|
315
387
|
"text": "Background theme of the radio button.\nCan be 'dark' or 'light'."
|
|
316
388
|
},
|
|
317
|
-
"
|
|
389
|
+
"getter": false,
|
|
390
|
+
"setter": false,
|
|
318
391
|
"reflect": false,
|
|
319
392
|
"defaultValue": "'light'"
|
|
320
393
|
},
|
|
321
394
|
"size": {
|
|
322
395
|
"type": "string",
|
|
396
|
+
"attribute": "size",
|
|
323
397
|
"mutable": false,
|
|
324
398
|
"complexType": {
|
|
325
399
|
"original": "'small' | 'medium' | 'large'",
|
|
@@ -332,12 +406,14 @@ export class CuraRadio {
|
|
|
332
406
|
"tags": [],
|
|
333
407
|
"text": "Size of the radio button.\nCan be 'small', 'medium', or 'large'."
|
|
334
408
|
},
|
|
335
|
-
"
|
|
409
|
+
"getter": false,
|
|
410
|
+
"setter": false,
|
|
336
411
|
"reflect": false,
|
|
337
412
|
"defaultValue": "'medium'"
|
|
338
413
|
},
|
|
339
414
|
"color": {
|
|
340
415
|
"type": "string",
|
|
416
|
+
"attribute": "color",
|
|
341
417
|
"mutable": false,
|
|
342
418
|
"complexType": {
|
|
343
419
|
"original": "string",
|
|
@@ -350,12 +426,14 @@ export class CuraRadio {
|
|
|
350
426
|
"tags": [],
|
|
351
427
|
"text": "Color theme of the radio button."
|
|
352
428
|
},
|
|
353
|
-
"
|
|
429
|
+
"getter": false,
|
|
430
|
+
"setter": false,
|
|
354
431
|
"reflect": false,
|
|
355
432
|
"defaultValue": "'accent'"
|
|
356
433
|
},
|
|
357
434
|
"overflowLabel": {
|
|
358
435
|
"type": "string",
|
|
436
|
+
"attribute": "overflow-label",
|
|
359
437
|
"mutable": false,
|
|
360
438
|
"complexType": {
|
|
361
439
|
"original": "'none' | 'single' | string",
|
|
@@ -371,12 +449,14 @@ export class CuraRadio {
|
|
|
371
449
|
}],
|
|
372
450
|
"text": "Controls how the label text should handle overflow.\n- `'none'`: No overflow handling; the label displays normally.\n- `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n- `string`: Custom overflow handling mode."
|
|
373
451
|
},
|
|
374
|
-
"
|
|
452
|
+
"getter": false,
|
|
453
|
+
"setter": false,
|
|
375
454
|
"reflect": true,
|
|
376
455
|
"defaultValue": "'none'"
|
|
377
456
|
},
|
|
378
457
|
"overflowHelper": {
|
|
379
458
|
"type": "string",
|
|
459
|
+
"attribute": "overflow-helper",
|
|
380
460
|
"mutable": false,
|
|
381
461
|
"complexType": {
|
|
382
462
|
"original": "'none' | 'single' | string",
|
|
@@ -392,7 +472,8 @@ export class CuraRadio {
|
|
|
392
472
|
}],
|
|
393
473
|
"text": "Controls how the helper text should handle overflow.\n- `'none'`: No overflow handling; the label displays normally.\n- `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n- `string`: Custom overflow handling mode."
|
|
394
474
|
},
|
|
395
|
-
"
|
|
475
|
+
"getter": false,
|
|
476
|
+
"setter": false,
|
|
396
477
|
"reflect": true,
|
|
397
478
|
"defaultValue": "'none'"
|
|
398
479
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-radio.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-radio/cura-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,MAAM,OAAO,SAAS;;QAmFpB,UAAK,GAAG;YACN,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YACnB,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YACpB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;SACpB,CAAC;QAEF,qBAAgB,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;QAgFpD,gBAAW,GAAG,GAAG,EAAE;YACjB,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACnE,CAAC,CAAC;uBA1KyD,KAAK;sBAKkB,SAAS;wBAI9C,KAAK;wBAIL,KAAK;qBAIT,EAAE;;wBASW,MAAM;qBAInB,EAAE;oBAIH,EAAE;0BAKH,OAAO;oBAKD,QAAQ;qBAIrC,QAAQ;6BAU6C,MAAM;8BAUL,MAAM;sBAE1D,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-radio',\n styleUrl: 'cura-radio.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraRadio {\n /**\n * Reflects the checked state of the radio button.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Status of the radio button.\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 radio button.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the radio button.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the radio button.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Specifies the tabindex of the radio button.\n */\n @Prop({ reflect: true }) ontabindex: number;\n /**\n * Position of the label relative to the radio button.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the radio button.\n */\n @Prop({ reflect: true }) value: string = '';\n /**\n * Name attribute of the radio button.\n */\n @Prop({ reflect: true }) name: string = '';\n /**\n * Background theme of the radio button.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Size of the radio button.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Color theme of the radio button.\n */\n @Prop() color = 'accent';\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowLabel: 'none' | 'single' | string = 'none';\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowHelper: 'none' | 'single' | string = 'none';\n\n @State() styles = {};\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string; checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 20 },\n medium: { size: 14 },\n small: { size: 10 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-after': `${this.sizes[this.size].size}px`,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--info-base', background: 'info-base' },\n { name: '--color-light', background: `${this.color}-light` },\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--error-base', background: 'error-base' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },\n { name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },\n { name: '--primary-darker-neutral-base', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-base' },\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-dark', background: this.isDarkbackground() ? 'success-base' : 'success-dark' },\n { name: '--error-base-dark', background: this.isDarkbackground() ? 'error-base' : 'error-dark' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\n });\n this.styles = { ...this.styles };\n }\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string; checked: boolean }) {\n this.value = state.value;\n this.checked = state.checked;\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.value = '';\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n connectedCallback() {\n this.sizeHandler();\n this.setColors();\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.value);\n this.onchange.emit({ value: this.value, checked: this.checked });\n };\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['position'] = this.position === 'right';\n classes[this.status] = true;\n\n return classes;\n }\n\n @Watch('background')\n assignColor(type: 'label' | 'message') {\n if (this.disabled) return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';\n\n const statusColors = {\n success: {\n label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkbackground() ? 'success-base' : 'success-dark',\n },\n error: {\n label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkbackground() ? 'error-base' : 'error-dark',\n },\n default: {\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 render() {\n return (\n <Host role=\"radio\" aria-checked={this.checked} aria-disabled={this.disabled} aria-required={this.required} aria-invalid={this.status === 'error'}>\n <div class={this.getClasses()} style={this.styles} onClick={this.handleClick}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n textOverflow={this.overflowLabel}\n class={`label${this.overflowLabel === 'single' ? ' textoverflow-single' : ''}`}\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}\n >\n {this.label}\n </cura-label>\n {this.required && (\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\">\n *{' '}\n </cura-paragraph>\n )}\n </div>\n <cura-label textOverflow={this.overflowHelper} color={this.assignColor('message')} size=\"xsmall\" class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <input\n type=\"radio\"\n class={`radio ${this.size.toLocaleLowerCase()}`}\n name={this.name}\n value={this.value}\n required={this.required}\n tabIndex={this.ontabindex}\n disabled={this.disabled}\n checked={this.checked}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cura-radio.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-radio/cura-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,MAAM,OAAO,SAAS;IANtB;QAOE;;;WAGG;QACqC,YAAO,GAAY,KAAK,CAAC;QACjE;;;WAGG;QACqC,WAAM,GAAoC,SAAS,CAAC;QAC5F;;WAEG;QACsB,aAAQ,GAAY,KAAK,CAAC;QACnD;;WAEG;QACsB,aA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-radio',\n styleUrl: 'cura-radio.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraRadio {\n /**\n * Reflects the checked state of the radio button.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Status of the radio button.\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 radio button.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the radio button.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the radio button.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Specifies the tabindex of the radio button.\n */\n @Prop({ reflect: true }) ontabindex: number;\n /**\n * Position of the label relative to the radio button.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the radio button.\n */\n @Prop({ reflect: true }) value: string = '';\n /**\n * Name attribute of the radio button.\n */\n @Prop({ reflect: true }) name: string = '';\n /**\n * Background theme of the radio button.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Size of the radio button.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Color theme of the radio button.\n */\n @Prop() color = 'accent';\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowLabel: 'none' | 'single' | string = 'none';\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowHelper: 'none' | 'single' | string = 'none';\n\n @State() styles = {};\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string; checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 20 },\n medium: { size: 14 },\n small: { size: 10 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-after': `${this.sizes[this.size].size}px`,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--info-base', background: 'info-base' },\n { name: '--color-light', background: `${this.color}-light` },\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--error-base', background: 'error-base' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },\n { name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },\n { name: '--primary-darker-neutral-base', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-base' },\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-dark', background: this.isDarkbackground() ? 'success-base' : 'success-dark' },\n { name: '--error-base-dark', background: this.isDarkbackground() ? 'error-base' : 'error-dark' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\n });\n this.styles = { ...this.styles };\n }\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string; checked: boolean }) {\n this.value = state.value;\n this.checked = state.checked;\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.value = '';\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n connectedCallback() {\n this.sizeHandler();\n this.setColors();\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.value);\n this.onchange.emit({ value: this.value, checked: this.checked });\n };\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['position'] = this.position === 'right';\n classes[this.status] = true;\n\n return classes;\n }\n\n @Watch('background')\n assignColor(type: 'label' | 'message') {\n if (this.disabled) return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';\n\n const statusColors = {\n success: {\n label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkbackground() ? 'success-base' : 'success-dark',\n },\n error: {\n label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkbackground() ? 'error-base' : 'error-dark',\n },\n default: {\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 render() {\n return (\n <Host role=\"radio\" aria-checked={this.checked} aria-disabled={this.disabled} aria-required={this.required} aria-invalid={this.status === 'error'}>\n <div class={this.getClasses()} style={this.styles} onClick={this.handleClick}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n textOverflow={this.overflowLabel}\n class={`label${this.overflowLabel === 'single' ? ' textoverflow-single' : ''}`}\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}\n >\n {this.label}\n </cura-label>\n {this.required && (\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\">\n *{' '}\n </cura-paragraph>\n )}\n </div>\n <cura-label textOverflow={this.overflowHelper} color={this.assignColor('message')} size=\"xsmall\" class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <input\n type=\"radio\"\n class={`radio ${this.size.toLocaleLowerCase()}`}\n name={this.name}\n value={this.value}\n required={this.required}\n tabIndex={this.ontabindex}\n disabled={this.disabled}\n checked={this.checked}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
|