@rededor/cura 1.7.1 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cura-accordion_20.cjs.entry.js +484 -137
- 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/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 +113 -33
- 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-calendar2.js → p-BGnJiNyu.js} +210 -100
- package/dist/components/p-BGnJiNyu.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-select2.js → p-BTt-pVTn.js} +86 -30
- package/dist/components/p-BTt-pVTn.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-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-9759f26f.entry.js +2 -0
- package/dist/cura/p-9759f26f.entry.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-48f9289b.js → p-sjLA93YY.js} +1 -1
- package/dist/cura/p-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-accordion_20.entry.js +483 -134
- 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 +5 -5
- 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-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-daf422ce.entry.js +0 -2
- package/dist/cura/p-daf422ce.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 +1 @@
|
|
|
1
|
-
{"file":"cura-modal.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,wpEAAwpE,CAAC;AAC9qE,wBAAe,YAAY;;MCMd,SAAS;;;;QAwFpB,qBAAgB,GAAG,CAAC,GAAkB;YACpC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACtC,OAAO;aACR;YA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C,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,SAA2B,CAC/H,EACNA,oEAAa,EAEbA,kEAAK,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,IACjDA,sFAAyB,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IACjE,IAAI,CAAC,gBAAgB,CACE,CACtB,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n padding: 0;\n margin-right: -8px;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-mini} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"cura-modal.entry.cjs.js","mappings":";;;;;AAAA,MAAM,YAAY,GAAG,wpEAAwpE;;MCOhqE,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAME;;;AAGG;AACqC,QAAA,IAAI,CAAA,IAAA,GAAa,KAAK;AAC9D;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAsB,OAAO;AAC/C;;;AAGG;AACK,QAAA,IAAG,CAAA,GAAA,GAAY,CAAC;AACxB;;;AAGG;AACK,QAAA,IAAM,CAAA,MAAA,GAAY,CAAC;AAC3B;;;AAGG;AACK,QAAA,IAAI,CAAA,IAAA,GAAY,CAAC;AACzB;;;AAGG;AACK,QAAA,IAAK,CAAA,KAAA,GAAY,CAAC;AAC1B;;;AAGG;AACsB,QAAA,IAAgB,CAAA,gBAAA,GAAW,QAAQ;AAC5D;;;AAGG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAW,KAAK;AAMtC,QAAA,IAAM,CAAA,MAAA,GAAG,EAAE;AA0CpB,QAAA,IAAA,CAAA,gBAAgB,GAAG,CAAC,GAAkB,KAAI;YACxC,IAAI,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACtC;;AAGF,YAAA,IAAI,CAAC,IAAI,GAAG,KAAK;AACjB,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AACxB,SAAC;AAgBO,QAAA,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,EAAQ,CAAA,EACnGA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAElBA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACxBA,OAAyB,CAAA,yBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,QAAQ,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,SAA2B,CAC/H,EACNA,OAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EAEbA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,EACjDA,OAAyB,CAAA,yBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EACjE,EAAA,IAAI,CAAC,gBAAgB,CACE,CACtB,CACF,CACF,CACD;;;;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n padding: 0;\n margin-right: -8px;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-mini} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-modal.entry.cjs.js","sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n padding: 0;\n margin-right: -8px;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-mini} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;;AAAA,MAAM,YAAY,GAAG,wpEAAwpE;;MCOhqE,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAME;;;AAGG;AACqC,QAAA,IAAI,CAAA,IAAA,GAAa,KAAK;AAC9D;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAsB,OAAO;AAC/C;;;AAGG;AACK,QAAA,IAAG,CAAA,GAAA,GAAY,CAAC;AACxB;;;AAGG;AACK,QAAA,IAAM,CAAA,MAAA,GAAY,CAAC;AAC3B;;;AAGG;AACK,QAAA,IAAI,CAAA,I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AgB,CACE,CACtB,CACF,CACF,CACD;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-progress-bar.cura-stepper-item.entry.cjs.js","sources":["src/components/cura-stepper/cura-progress-bar/cura-progress-bar.scss?tag=cura-progress-bar&encapsulation=shadow","src/components/cura-stepper/cura-progress-bar/cura-progress-bar.tsx","src/components/cura-stepper/cura-stepper-item/cura-stepper-item.scss?tag=cura-stepper-item&encapsulation=shadow","src/components/cura-stepper/cura-stepper-item/cura-stepper-item.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n}\n\n.progress-bar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & span {\n position: absolute;\n display: flex;\n }\n}","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-progress-bar',\n styleUrl: 'cura-progress-bar.scss',\n shadow: true,\n})\nexport class CuraProgressBar {\n /**\n * Defines the color of the progress bar\n */\n @Prop({ reflect: true }) progressColor: string;\n\n /**\n * Defines the percentage of progress\n */\n @Prop({ reflect: true }) progress: number;\n\n /**\n * Defines the size of the progress bar\n */\n @Prop({ reflect: true }) size: number = 40;\n\n /**\n * Defines the width of the stroke (outline) of the progress circle\n */\n @Prop({ reflect: true }) strokeWidth: number = 3.25;\n\n /**\n * Defines whether the progress bar is active\n */\n @Prop({ reflect: true }) active: boolean;\n\n render() {\n const radius = (this.size - this.strokeWidth) / 2;\n const circumference = radius * Math.PI * 2;\n const dash = (this.progress * circumference) / 100;\n\n const viewBox = `0 0 ${this.size} ${this.size}`;\n\n return (\n <Host>\n <div class=\"progress-bar\">\n <svg width={this.size} height={this.size} viewBox={viewBox}>\n <circle fill=\"none\" stroke=\"#ccc\" cx={this.size / 2} cy={this.size / 2} r={radius} stroke-width={`${this.strokeWidth}px`} />\n {this.active && (\n <circle\n fill=\"none\"\n stroke={this.progressColor}\n cx={this.size / 2}\n cy={this.size / 2}\n r={radius}\n stroke-width={`${this.strokeWidth}px`}\n transform={`rotate(-90 ${this.size / 2} ${this.size / 2})`}\n stroke-dasharray={`${dash}px ${circumference - dash}px`}\n stroke-linecap=\"round\"\n style={{ transition: 'all 0.5s' }}\n />\n )}\n </svg>\n <span>\n <slot></slot>\n </span>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n box-sizing: border-box;\n}\n\n.item-container{\n display: flex;\n gap: 4px;\n align-items: center;\n}\n","import { Component, Element, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-stepper-item',\n styleUrl: 'cura-stepper-item.scss',\n shadow: true,\n})\nexport class CuraStepperItem {\n /**\n * Determines if the step title is displayed (default: false)\n */\n @Prop({ reflect: true }) displayHeading: boolean = false;\n\n /**\n * The title of the step (displayed if `displayHeading` is true)\n */\n @Prop({ reflect: true }) heading: string;\n\n /**\n * The label displayed inside the badge\n */\n @Prop({ reflect: true }) label: string;\n\n /**\n * The current status of the step\n * Can be:\n * - 'done' for completed steps\n * - 'stop' for failed steps\n * - 'active' for the current active step\n * - 'default' for steps that are neither done, active nor stopped.\n */\n @Prop({ reflect: true }) status: 'done' | 'stop' | 'active' | 'default' = 'default';\n\n @State() styles = {};\n\n @Element() hostElement: HTMLElement;\n\n connectedCallback() {\n this.updateStyles();\n }\n\n statusMap = {\n active: {\n badgeColor: 'info',\n textColor: 'info-dark',\n icon: '',\n iconOnly: false,\n },\n stop: {\n badgeColor: 'error',\n textColor: 'error-darker',\n icon: 'alertCircle',\n iconOnly: true,\n },\n done: {\n badgeColor: 'success',\n textColor: 'success-darker',\n icon: 'checkCircle',\n iconOnly: true,\n },\n default: {\n badgeColor: 'neutral',\n textColor: 'neutral',\n icon: '',\n iconOnly: false,\n },\n };\n\n getStatusProperties() {\n return this.statusMap[this.status] || this.statusMap.default;\n }\n\n updateStyles() {\n const { fonts, colors, spacing } = window.CuraAPI.theme;\n const weights = fonts.getWeights();\n\n this.styles = {\n '--base-spacing': spacing.getSpacing(),\n '--neutral-purewhite': colors.getColor('neutral-purewhite'),\n '--neutral-lighter': colors.getColor('neutral-lighter'),\n '--neutral-base': colors.getColor('neutral-base'),\n '--font-size': fonts.getSize(),\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-weight-regular': weights.regular,\n };\n }\n\n render() {\n const { badgeColor, textColor, icon, iconOnly } = this.getStatusProperties();\n return (\n <Host>\n <div class=\"item-container\" style={this.styles}>\n <cura-badge-pill\n type=\"solid\"\n color={badgeColor as 'info' | 'error' | 'success' | 'neutral' | 'primary' | 'secondary' | 'accent' | 'warning'}\n icon-name={icon}\n icon-only={iconOnly}\n border-radius=\"50%\"\n >\n {this.label}\n </cura-badge-pill>\n {this.displayHeading && this.heading && (\n <cura-paragraph marginBlock=\"0\" size=\"xsmall\" color={textColor}>\n {this.heading}\n </cura-paragraph>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,qLAAqL;;MCOnM,eAAe,GAAA,MAAA;AAL5B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAgBE;;AAEG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE;AAE1C;;AAEG;AACsB,QAAA,IAAW,CAAA,WAAA,GAAW,IAAI;AAyCpD;IAlCC,MAAM,GAAA;AACJ,QAAA,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,IAAI,CAAC;QACjD,MAAM,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;QAC1C,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,aAAa,IAAI,GAAG;QAElD,MAAM,OAAO,GAAG,CAAA,IAAA,EAAO,IAAI,CAAC,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,CAAA,CAAE;QAE/C,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAK,CAAA,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AAW,EAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,SAAS,EAC3D,EAAA,IAAI,CAAC,OAAO,CACE,CAClB,CACG,CACD;;;;;;;;;"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const index = require('./index-60783089.js');
|
|
3
|
+
var index = require('./index-BK9MSAiE.js');
|
|
4
|
+
require('./cura-theme-module-CJkmAxBA.js');
|
|
6
5
|
|
|
7
6
|
const curaProgressBarCss = ":host{display:block;box-sizing:border-box}.progress-bar{position:relative;display:flex;align-items:center;justify-content:center}.progress-bar span{position:absolute;display:flex}";
|
|
8
|
-
const CuraProgressBarStyle0 = curaProgressBarCss;
|
|
9
7
|
|
|
10
8
|
const CuraProgressBar = class {
|
|
11
9
|
constructor(hostRef) {
|
|
12
10
|
index.registerInstance(this, hostRef);
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Defines the size of the progress bar
|
|
13
|
+
*/
|
|
15
14
|
this.size = 40;
|
|
15
|
+
/**
|
|
16
|
+
* Defines the width of the stroke (outline) of the progress circle
|
|
17
|
+
*/
|
|
16
18
|
this.strokeWidth = 3.25;
|
|
17
|
-
this.active = undefined;
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
21
|
const radius = (this.size - this.strokeWidth) / 2;
|
|
@@ -24,14 +25,27 @@ const CuraProgressBar = class {
|
|
|
24
25
|
return (index.h(index.Host, { key: '6deebf97271b84fcecb9e1d688c79ae88b2aa618' }, index.h("div", { key: 'f6556e004e4d0cc4de342292610764b74495e3b0', class: "progress-bar" }, index.h("svg", { key: 'ffc1de55ded85602db1840812cd1f296a413c39e', width: this.size, height: this.size, viewBox: viewBox }, index.h("circle", { key: '691beeaf7b5fb5d670bfde48d8023b742bd97126', fill: "none", stroke: "#ccc", cx: this.size / 2, cy: this.size / 2, r: radius, "stroke-width": `${this.strokeWidth}px` }), this.active && (index.h("circle", { key: '0fee97b7da871d6b242786bbcf175e9792da69f8', fill: "none", stroke: this.progressColor, cx: this.size / 2, cy: this.size / 2, r: radius, "stroke-width": `${this.strokeWidth}px`, transform: `rotate(-90 ${this.size / 2} ${this.size / 2})`, "stroke-dasharray": `${dash}px ${circumference - dash}px`, "stroke-linecap": "round", style: { transition: 'all 0.5s' } }))), index.h("span", { key: '8e78dd28e8fad5ee4d9aef8029a73b6cf6d778cc' }, index.h("slot", { key: 'aa7155860e7aa0bcd2aef87bed2a5530161de4aa' })))));
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
|
-
CuraProgressBar.style =
|
|
28
|
+
CuraProgressBar.style = curaProgressBarCss;
|
|
28
29
|
|
|
29
30
|
const curaStepperItemCss = ":host{display:block;box-sizing:border-box}.item-container{display:flex;gap:4px;align-items:center}";
|
|
30
|
-
const CuraStepperItemStyle0 = curaStepperItemCss;
|
|
31
31
|
|
|
32
32
|
const CuraStepperItem = class {
|
|
33
33
|
constructor(hostRef) {
|
|
34
34
|
index.registerInstance(this, hostRef);
|
|
35
|
+
/**
|
|
36
|
+
* Determines if the step title is displayed (default: false)
|
|
37
|
+
*/
|
|
38
|
+
this.displayHeading = false;
|
|
39
|
+
/**
|
|
40
|
+
* The current status of the step
|
|
41
|
+
* Can be:
|
|
42
|
+
* - 'done' for completed steps
|
|
43
|
+
* - 'stop' for failed steps
|
|
44
|
+
* - 'active' for the current active step
|
|
45
|
+
* - 'default' for steps that are neither done, active nor stopped.
|
|
46
|
+
*/
|
|
47
|
+
this.status = 'default';
|
|
48
|
+
this.styles = {};
|
|
35
49
|
this.statusMap = {
|
|
36
50
|
active: {
|
|
37
51
|
badgeColor: 'info',
|
|
@@ -58,11 +72,6 @@ const CuraStepperItem = class {
|
|
|
58
72
|
iconOnly: false,
|
|
59
73
|
},
|
|
60
74
|
};
|
|
61
|
-
this.displayHeading = false;
|
|
62
|
-
this.heading = undefined;
|
|
63
|
-
this.label = undefined;
|
|
64
|
-
this.status = 'default';
|
|
65
|
-
this.styles = {};
|
|
66
75
|
}
|
|
67
76
|
connectedCallback() {
|
|
68
77
|
this.updateStyles();
|
|
@@ -90,9 +99,10 @@ const CuraStepperItem = class {
|
|
|
90
99
|
}
|
|
91
100
|
get hostElement() { return index.getElement(this); }
|
|
92
101
|
};
|
|
93
|
-
CuraStepperItem.style =
|
|
102
|
+
CuraStepperItem.style = curaStepperItemCss;
|
|
94
103
|
|
|
95
104
|
exports.cura_progress_bar = CuraProgressBar;
|
|
96
105
|
exports.cura_stepper_item = CuraStepperItem;
|
|
106
|
+
//# sourceMappingURL=cura-progress-bar.cura-stepper-item.entry.cjs.js.map
|
|
97
107
|
|
|
98
108
|
//# sourceMappingURL=cura-progress-bar_2.cjs.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-progress-bar.cura-stepper-item.entry.cjs.js","mappings":"
|
|
1
|
+
{"file":"cura-progress-bar.cura-stepper-item.entry.cjs.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,qLAAqL;;MCOnM,eAAe,GAAA,MAAA;AAL5B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAgBE;;AAEG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE;AAE1C;;AAEG;AACsB,QAAA,IAAW,CAAA,WAAA,GAAW,IAAI;AAyCpD;IAlCC,MAAM,GAAA;AACJ,QAAA,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,IAAI,CAAC;QACjD,MAAM,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;QAC1C,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,aAAa,IAAI,GAAG;QAElD,MAAM,OAAO,GAAG,CAAA,IAAA,EAAO,IAAI,CAAC,IAAI,CAAA,CAAA,EAAI,IAAI,CAAC,IAAI,CAAA,CAAE;QAE/C,QACEA,QAACC,UAAI,EAAA,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AA,gBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,WAAW,EAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,SAAS,EAC3D,EAAA,IAAI,CAAC,OAAO,CACE,CAClB,CACG,CACD;;;;;;;;;","names":["h","Host"],"sources":["src/components/cura-stepper/cura-progress-bar/cura-progress-bar.scss?tag=cura-progress-bar&encapsulation=shadow","src/components/cura-stepper/cura-progress-bar/cura-progress-bar.tsx","src/components/cura-stepper/cura-stepper-item/cura-stepper-item.scss?tag=cura-stepper-item&encapsulation=shadow","src/components/cura-stepper/cura-stepper-item/cura-stepper-item.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n}\n\n.progress-bar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & span {\n position: absolute;\n display: flex;\n }\n}","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-progress-bar',\n styleUrl: 'cura-progress-bar.scss',\n shadow: true,\n})\nexport class CuraProgressBar {\n /**\n * Defines the color of the progress bar\n */\n @Prop({ reflect: true }) progressColor: string;\n\n /**\n * Defines the percentage of progress\n */\n @Prop({ reflect: true }) progress: number;\n\n /**\n * Defines the size of the progress bar\n */\n @Prop({ reflect: true }) size: number = 40;\n\n /**\n * Defines the width of the stroke (outline) of the progress circle\n */\n @Prop({ reflect: true }) strokeWidth: number = 3.25;\n\n /**\n * Defines whether the progress bar is active\n */\n @Prop({ reflect: true }) active: boolean;\n\n render() {\n const radius = (this.size - this.strokeWidth) / 2;\n const circumference = radius * Math.PI * 2;\n const dash = (this.progress * circumference) / 100;\n\n const viewBox = `0 0 ${this.size} ${this.size}`;\n\n return (\n <Host>\n <div class=\"progress-bar\">\n <svg width={this.size} height={this.size} viewBox={viewBox}>\n <circle fill=\"none\" stroke=\"#ccc\" cx={this.size / 2} cy={this.size / 2} r={radius} stroke-width={`${this.strokeWidth}px`} />\n {this.active && (\n <circle\n fill=\"none\"\n stroke={this.progressColor}\n cx={this.size / 2}\n cy={this.size / 2}\n r={radius}\n stroke-width={`${this.strokeWidth}px`}\n transform={`rotate(-90 ${this.size / 2} ${this.size / 2})`}\n stroke-dasharray={`${dash}px ${circumference - dash}px`}\n stroke-linecap=\"round\"\n style={{ transition: 'all 0.5s' }}\n />\n )}\n </svg>\n <span>\n <slot></slot>\n </span>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n box-sizing: border-box;\n}\n\n.item-container{\n display: flex;\n gap: 4px;\n align-items: center;\n}\n","import { Component, Element, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-stepper-item',\n styleUrl: 'cura-stepper-item.scss',\n shadow: true,\n})\nexport class CuraStepperItem {\n /**\n * Determines if the step title is displayed (default: false)\n */\n @Prop({ reflect: true }) displayHeading: boolean = false;\n\n /**\n * The title of the step (displayed if `displayHeading` is true)\n */\n @Prop({ reflect: true }) heading: string;\n\n /**\n * The label displayed inside the badge\n */\n @Prop({ reflect: true }) label: string;\n\n /**\n * The current status of the step\n * Can be:\n * - 'done' for completed steps\n * - 'stop' for failed steps\n * - 'active' for the current active step\n * - 'default' for steps that are neither done, active nor stopped.\n */\n @Prop({ reflect: true }) status: 'done' | 'stop' | 'active' | 'default' = 'default';\n\n @State() styles = {};\n\n @Element() hostElement: HTMLElement;\n\n connectedCallback() {\n this.updateStyles();\n }\n\n statusMap = {\n active: {\n badgeColor: 'info',\n textColor: 'info-dark',\n icon: '',\n iconOnly: false,\n },\n stop: {\n badgeColor: 'error',\n textColor: 'error-darker',\n icon: 'alertCircle',\n iconOnly: true,\n },\n done: {\n badgeColor: 'success',\n textColor: 'success-darker',\n icon: 'checkCircle',\n iconOnly: true,\n },\n default: {\n badgeColor: 'neutral',\n textColor: 'neutral',\n icon: '',\n iconOnly: false,\n },\n };\n\n getStatusProperties() {\n return this.statusMap[this.status] || this.statusMap.default;\n }\n\n updateStyles() {\n const { fonts, colors, spacing } = window.CuraAPI.theme;\n const weights = fonts.getWeights();\n\n this.styles = {\n '--base-spacing': spacing.getSpacing(),\n '--neutral-purewhite': colors.getColor('neutral-purewhite'),\n '--neutral-lighter': colors.getColor('neutral-lighter'),\n '--neutral-base': colors.getColor('neutral-base'),\n '--font-size': fonts.getSize(),\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-weight-regular': weights.regular,\n };\n }\n\n render() {\n const { badgeColor, textColor, icon, iconOnly } = this.getStatusProperties();\n return (\n <Host>\n <div class=\"item-container\" style={this.styles}>\n <cura-badge-pill\n type=\"solid\"\n color={badgeColor as 'info' | 'error' | 'success' | 'neutral' | 'primary' | 'secondary' | 'accent' | 'warning'}\n icon-name={icon}\n icon-only={iconOnly}\n border-radius=\"50%\"\n >\n {this.label}\n </cura-badge-pill>\n {this.displayHeading && this.heading && (\n <cura-paragraph marginBlock=\"0\" size=\"xsmall\" color={textColor}>\n {this.heading}\n </cura-paragraph>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const curaForms_definitions = require('./cura-forms.definitions-c164f1b8.js');
|
|
3
|
+
var index = require('./index-BK9MSAiE.js');
|
|
4
|
+
var curaForms_definitions = require('./cura-forms.definitions-DVLuO67c.js');
|
|
5
|
+
require('./cura-theme-module-CJkmAxBA.js');
|
|
7
6
|
|
|
8
7
|
const curaRadioCss = "@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0;}:host .container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}:host .position.container{flex-direction:row}:host .position .label-wrapper{justify-content:end}:host .position .message{text-align:right}:host .position .label{order:1}:host .label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}:host .info{display:flex;flex-direction:column;overflow:hidden}:host .label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}:host .control{width:fit-content;cursor:pointer;position:relative}:host .radio{margin:0;appearance:none;-webkit-appearance:none;-moz-appearance:none;border-radius:50%;border:2px solid var(--primary-base-neutral-medium);background:var(--neutral-purewhite);box-sizing:border-box;transition:border-color 0.3s;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);flex:0 0 var(--size)}:host .radio::after{content:\"\";background:var(--color-base-light);border-radius:50%;opacity:0;transition:opacity 0.3s;width:var(--size-after);height:var(--size-after)}:host .radio:focus{border-color:var(--info-base) !important}:host .success .radio{border-color:var(--success-base);background:var(--success-lighter)}:host .success .radio:hover{border-color:var(--success-base) !important}:host .success.checked .radio{border-color:var(--success-base)}:host .success.checked .radio::after{background:var(--success-base)}:host .success.checked .radio:hover{background:var(--success-lighter) !important;border-color:var(--success-base) !important}:host .success.checked .radio:hover::after{background:var(--success-base) !important}:host .error .radio{border-color:var(--error-base);background:var(--error-lighter)}:host .error .radio:hover{border-color:var(--error-base) !important}:host .error.checked .radio{border-color:var(--error-base)}:host .error.checked .radio::after{background:var(--error-base)}:host .error.checked .radio:hover{background:var(--error-lighter) !important;border-color:var(--error-base) !important}:host .error.checked .radio:hover::after{background:var(--error-base) !important}:host .checked .radio::after{opacity:1;background:var(--color-base)}:host .checked .radio{border-color:var(--color-dark)}:host .checked .radio:hover{border-color:var(--color-light) !important}:host .checked .radio:hover::after{background:var(--color-light)}:host .disabled .radio{background:var(--primary-base-neutral-white);border-color:var(--primary-darker-neutral-base);cursor:not-allowed}:host .disabled .radio::after{background:var(--neutral-lighter)}:host .disabled.checked .radio{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-darker-neutral-white) !important}:host .disabled.checked .radio::after{background:var(--primary-base-neutral-base) !important}:host :not(.disabled):not(.checked) .radio:hover{border-color:var(--primary-base-neutral-dark)}";
|
|
9
|
-
const CuraRadioStyle0 = curaRadioCss;
|
|
10
8
|
|
|
11
9
|
const CuraRadio = class {
|
|
12
10
|
constructor(hostRef) {
|
|
13
11
|
index.registerInstance(this, hostRef);
|
|
14
|
-
this.onchange = index.createEvent(this, "onchange"
|
|
12
|
+
this.onchange = index.createEvent(this, "onchange");
|
|
15
13
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
16
14
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
17
15
|
}
|
|
@@ -19,34 +17,87 @@ const CuraRadio = class {
|
|
|
19
17
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
20
18
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
this.isDarkbackground = () => this.background === 'dark';
|
|
28
|
-
this.handleClick = () => {
|
|
29
|
-
if (this.disabled)
|
|
30
|
-
return;
|
|
31
|
-
this.checked = !this.checked;
|
|
32
|
-
this.internals.setFormValue(this.value);
|
|
33
|
-
this.onchange.emit({ value: this.value, checked: this.checked });
|
|
34
|
-
};
|
|
20
|
+
/**
|
|
21
|
+
* Reflects the checked state of the radio button.
|
|
22
|
+
* Mutable property allowing state change.
|
|
23
|
+
*/
|
|
35
24
|
this.checked = false;
|
|
25
|
+
/**
|
|
26
|
+
* Status of the radio button.
|
|
27
|
+
* Can be 'error', 'success', or 'default'.
|
|
28
|
+
*/
|
|
36
29
|
this.status = 'default';
|
|
30
|
+
/**
|
|
31
|
+
* Reflects the disabled state of the radio button.
|
|
32
|
+
*/
|
|
37
33
|
this.disabled = false;
|
|
34
|
+
/**
|
|
35
|
+
* Reflects the required state of the radio button.
|
|
36
|
+
*/
|
|
38
37
|
this.required = false;
|
|
38
|
+
/**
|
|
39
|
+
* Text label associated with the radio button.
|
|
40
|
+
*/
|
|
39
41
|
this.label = '';
|
|
40
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Position of the label relative to the radio button.
|
|
44
|
+
* Can be 'left' or 'right'.
|
|
45
|
+
*/
|
|
41
46
|
this.position = 'left';
|
|
47
|
+
/**
|
|
48
|
+
* Value associated with the radio button.
|
|
49
|
+
*/
|
|
42
50
|
this.value = '';
|
|
51
|
+
/**
|
|
52
|
+
* Name attribute of the radio button.
|
|
53
|
+
*/
|
|
43
54
|
this.name = '';
|
|
55
|
+
/**
|
|
56
|
+
* Background theme of the radio button.
|
|
57
|
+
* Can be 'dark' or 'light'.
|
|
58
|
+
*/
|
|
44
59
|
this.background = 'light';
|
|
60
|
+
/**
|
|
61
|
+
* Size of the radio button.
|
|
62
|
+
* Can be 'small', 'medium', or 'large'.
|
|
63
|
+
*/
|
|
45
64
|
this.size = 'medium';
|
|
65
|
+
/**
|
|
66
|
+
* Color theme of the radio button.
|
|
67
|
+
*/
|
|
46
68
|
this.color = 'accent';
|
|
69
|
+
/**
|
|
70
|
+
* Controls how the label text should handle overflow.
|
|
71
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
72
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
73
|
+
* - `string`: Custom overflow handling mode.
|
|
74
|
+
*
|
|
75
|
+
* @default 'none'
|
|
76
|
+
*/
|
|
47
77
|
this.overflowLabel = 'none';
|
|
78
|
+
/**
|
|
79
|
+
* Controls how the helper text should handle overflow.
|
|
80
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
81
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
82
|
+
* - `string`: Custom overflow handling mode.
|
|
83
|
+
*
|
|
84
|
+
* @default 'none'
|
|
85
|
+
*/
|
|
48
86
|
this.overflowHelper = 'none';
|
|
49
87
|
this.styles = {};
|
|
88
|
+
this.sizes = {
|
|
89
|
+
large: { size: 20 },
|
|
90
|
+
medium: { size: 14 },
|
|
91
|
+
small: { size: 10 },
|
|
92
|
+
};
|
|
93
|
+
this.isDarkbackground = () => this.background === 'dark';
|
|
94
|
+
this.handleClick = () => {
|
|
95
|
+
if (this.disabled)
|
|
96
|
+
return;
|
|
97
|
+
this.checked = !this.checked;
|
|
98
|
+
this.internals.setFormValue(this.value);
|
|
99
|
+
this.onchange.emit({ value: this.value, checked: this.checked });
|
|
100
|
+
};
|
|
50
101
|
}
|
|
51
102
|
sizeHandler() {
|
|
52
103
|
this.styles = Object.assign(Object.assign({}, this.styles), { '--size-after': `${this.sizes[this.size].size}px`, '--size': `${curaForms_definitions.formsSizes[this.size].size}px`, '--gap': `${curaForms_definitions.formsSizes[this.size].gap}px` });
|
|
@@ -149,8 +200,9 @@ const CuraRadio = class {
|
|
|
149
200
|
"background": ["setColors", "assignColor"]
|
|
150
201
|
}; }
|
|
151
202
|
};
|
|
152
|
-
CuraRadio.style =
|
|
203
|
+
CuraRadio.style = curaRadioCss;
|
|
153
204
|
|
|
154
205
|
exports.cura_radio = CuraRadio;
|
|
206
|
+
//# sourceMappingURL=cura-radio.entry.cjs.js.map
|
|
155
207
|
|
|
156
208
|
//# sourceMappingURL=cura-radio.cjs.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-radio.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,YAAY,GAAG,0hGAA0hG,CAAC;AAChjG,wBAAe,YAAY;;MCQd,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,MAAM,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;QAgFpD,gBAAW,GAAG;YACZ,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,IAA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OAAO,GAAG,QAAQ,GAAG,QAAQ,EACjD,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAE/B,IAAI,CAAC,KAAK,CACA,EACZ,IAAI,CAAC,QAAQ,KACZA,6EAAgB,UAAU,EAAC,IAAI,EAAC,WAAW,EAAC,GAAG,EAAC,KAAK,EAAC,YAAY,SAC9D,GAAG,CACU,CAClB,CACG,EACNA,yEAAY,YAAY,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,IAC9GA,oEAAa,CACF,CACT,EACNA,oEACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,EAC/C,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,GACrB,CACE,CACD,EACP;KACH;;;;;;;;;;;;;","names":["formsSizes","h","Host"],"sources":["src/components/forms/cura-radio/cura-radio.scss?tag=cura-radio&encapsulation=shadow","src/components/forms/cura-radio/cura-radio.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n\n .container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n }\n\n .position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n }\n\n .label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n }\n\n .info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n .label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n }\n\n .control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n }\n\n .radio {\n margin: 0;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n border-radius: 50%;\n border: 2px solid var(--primary-base-neutral-medium);\n background: var(--neutral-purewhite);\n box-sizing: border-box;\n transition: border-color 0.3s;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n\n &::after {\n content: '';\n background: var(--color-base-light);\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.3s;\n width: var(--size-after);\n height: var(--size-after);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n /* Estado Success */\n .success .radio {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n }\n\n .success.checked .radio {\n border-color: var(--success-base);\n\n &::after {\n background: var(--success-base);\n }\n\n &:hover {\n background: var(--success-lighter) !important;\n border-color: var(--success-base) !important;\n\n &::after {\n background: var(--success-base) !important;\n }\n }\n }\n\n /* Estado Error */\n .error .radio {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n }\n\n .error.checked .radio {\n border-color: var(--error-base);\n\n &::after {\n background: var(--error-base);\n }\n\n &:hover {\n background: var(--error-lighter) !important;\n border-color: var(--error-base) !important;\n\n &::after {\n background: var(--error-base) !important;\n }\n }\n }\n\n /* Estado checked */\n .checked .radio::after {\n opacity: 1;\n background: var(--color-base);\n }\n\n .checked .radio {\n border-color: var(--color-dark);\n }\n\n .checked .radio:hover {\n border-color: var(--color-light) !important;\n }\n\n .checked .radio:hover::after {\n background: var(--color-light);\n }\n\n /* Estado disabled */\n .disabled .radio {\n background: var(--primary-base-neutral-white);\n border-color: var(--primary-darker-neutral-base);\n cursor: not-allowed;\n }\n\n .disabled .radio::after {\n background: var(--neutral-lighter);\n }\n\n .disabled.checked .radio {\n border-color: var(--primary-base-neutral-base) !important;\n background: var(--primary-darker-neutral-white) !important;\n }\n\n .disabled.checked .radio::after {\n background: var(--primary-base-neutral-base) !important;\n }\n\n /* Estado hover para não disabled e não checked */\n :not(.disabled):not(.checked) .radio:hover {\n border-color: var(--primary-base-neutral-dark);\n }\n}\n","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"],"version":3}
|
|
1
|
+
{"file":"cura-radio.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,0hGAA0hG;;MCSliG,SAAS,GAAA,MAAA;AANtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAOE;;;AAGG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;;AAGG;AACqC,QAAA,IAAM,CAAA,MAAA,GAAoC,SAAS;AAC3F;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAK,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,EAAE,IAAI,CAAC,UAAU,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,CAAA,CACE,CACD;;;;;;;;;;;;;;","names":["formsSizes","h","Host"],"sources":["src/components/forms/cura-radio/cura-radio.scss?tag=cura-radio&encapsulation=shadow","src/components/forms/cura-radio/cura-radio.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n\n .container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n }\n\n .position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n }\n\n .label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n }\n\n .info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n .label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n }\n\n .control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n }\n\n .radio {\n margin: 0;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n border-radius: 50%;\n border: 2px solid var(--primary-base-neutral-medium);\n background: var(--neutral-purewhite);\n box-sizing: border-box;\n transition: border-color 0.3s;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n\n &::after {\n content: '';\n background: var(--color-base-light);\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.3s;\n width: var(--size-after);\n height: var(--size-after);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n /* Estado Success */\n .success .radio {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n }\n\n .success.checked .radio {\n border-color: var(--success-base);\n\n &::after {\n background: var(--success-base);\n }\n\n &:hover {\n background: var(--success-lighter) !important;\n border-color: var(--success-base) !important;\n\n &::after {\n background: var(--success-base) !important;\n }\n }\n }\n\n /* Estado Error */\n .error .radio {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n }\n\n .error.checked .radio {\n border-color: var(--error-base);\n\n &::after {\n background: var(--error-base);\n }\n\n &:hover {\n background: var(--error-lighter) !important;\n border-color: var(--error-base) !important;\n\n &::after {\n background: var(--error-base) !important;\n }\n }\n }\n\n /* Estado checked */\n .checked .radio::after {\n opacity: 1;\n background: var(--color-base);\n }\n\n .checked .radio {\n border-color: var(--color-dark);\n }\n\n .checked .radio:hover {\n border-color: var(--color-light) !important;\n }\n\n .checked .radio:hover::after {\n background: var(--color-light);\n }\n\n /* Estado disabled */\n .disabled .radio {\n background: var(--primary-base-neutral-white);\n border-color: var(--primary-darker-neutral-base);\n cursor: not-allowed;\n }\n\n .disabled .radio::after {\n background: var(--neutral-lighter);\n }\n\n .disabled.checked .radio {\n border-color: var(--primary-base-neutral-base) !important;\n background: var(--primary-darker-neutral-white) !important;\n }\n\n .disabled.checked .radio::after {\n background: var(--primary-base-neutral-base) !important;\n }\n\n /* Estado hover para não disabled e não checked */\n :not(.disabled):not(.checked) .radio:hover {\n border-color: var(--primary-base-neutral-dark);\n }\n}\n","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"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-radio.entry.cjs.js","sources":["src/components/forms/cura-radio/cura-radio.scss?tag=cura-radio&encapsulation=shadow","src/components/forms/cura-radio/cura-radio.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n\n .container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n }\n\n .position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n }\n\n .label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n }\n\n .info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n .label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n }\n\n .control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n }\n\n .radio {\n margin: 0;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n border-radius: 50%;\n border: 2px solid var(--primary-base-neutral-medium);\n background: var(--neutral-purewhite);\n box-sizing: border-box;\n transition: border-color 0.3s;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n\n &::after {\n content: '';\n background: var(--color-base-light);\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.3s;\n width: var(--size-after);\n height: var(--size-after);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n /* Estado Success */\n .success .radio {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n }\n\n .success.checked .radio {\n border-color: var(--success-base);\n\n &::after {\n background: var(--success-base);\n }\n\n &:hover {\n background: var(--success-lighter) !important;\n border-color: var(--success-base) !important;\n\n &::after {\n background: var(--success-base) !important;\n }\n }\n }\n\n /* Estado Error */\n .error .radio {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n }\n\n .error.checked .radio {\n border-color: var(--error-base);\n\n &::after {\n background: var(--error-base);\n }\n\n &:hover {\n background: var(--error-lighter) !important;\n border-color: var(--error-base) !important;\n\n &::after {\n background: var(--error-base) !important;\n }\n }\n }\n\n /* Estado checked */\n .checked .radio::after {\n opacity: 1;\n background: var(--color-base);\n }\n\n .checked .radio {\n border-color: var(--color-dark);\n }\n\n .checked .radio:hover {\n border-color: var(--color-light) !important;\n }\n\n .checked .radio:hover::after {\n background: var(--color-light);\n }\n\n /* Estado disabled */\n .disabled .radio {\n background: var(--primary-base-neutral-white);\n border-color: var(--primary-darker-neutral-base);\n cursor: not-allowed;\n }\n\n .disabled .radio::after {\n background: var(--neutral-lighter);\n }\n\n .disabled.checked .radio {\n border-color: var(--primary-base-neutral-base) !important;\n background: var(--primary-darker-neutral-white) !important;\n }\n\n .disabled.checked .radio::after {\n background: var(--primary-base-neutral-base) !important;\n }\n\n /* Estado hover para não disabled e não checked */\n :not(.disabled):not(.checked) .radio:hover {\n border-color: var(--primary-base-neutral-dark);\n }\n}\n","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"],"names":["formsSizes","h","Host"],"mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,0hGAA0hG;;MCSliG,SAAS,GAAA,MAAA;AANtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAOE;;;AAGG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;;AAGG;AACqC,QAAA,IAAM,CAAA,MAAA,GAAoC,SAAS;AAC3F;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAK3C;;;AAGG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAqB,MAAM;AAC5D;;AAEG;AACsB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAC3C;;AAEG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE;AAC1C;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAqB,OAAO;AAC9C;;;AAGG;AACK,QAAA,IAAI,CAAA,IAAA,GAAiC,QAAQ;AACrD;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAG,QAAQ;AAExB;;;;;;;AAOG;AACsB,QAAA,IAAa,CAAA,aAAA,GAA+B,MAAM;AAE3E;;;;;;;AAOG;AACsB,QAAA,IAAc,CAAA,cAAA,GAA+B,MAAM;AAEnE,QAAA,IAAM,CAAA,MAAA,GAAG,EAAE;QAQpB,IAAA,CAAA,KAAK,GAAG;AACN,YAAA,KAAK,EAAE,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EAAC,GAAG,EAAC,KAAK,EAAC,YAAY,EAAA,OAC9D,GAAG,CACU,CAClB,CACG,EACNA,OAAY,CAAA,YAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,YAAY,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAA,EAC9GA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACF,CACT,EACNA,OACE,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,CAAS,MAAA,EAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAE,CAAA,EAC/C,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,CAAA,CACE,CACD;;;;;;;;;;;;;;"}
|
|
@@ -1,21 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const index = require('./index-60783089.js');
|
|
3
|
+
var index = require('./index-BK9MSAiE.js');
|
|
4
|
+
require('./cura-theme-module-CJkmAxBA.js');
|
|
6
5
|
|
|
7
6
|
const curaStepperCss = ":host{display:block;box-sizing:border-box;width:100%}cura-heading{--margin-block:0 !important}.container{display:flex}.compact{display:flex;padding:0px;justify-content:space-between;align-items:center}.compact .heading{text-align:right}.stepper-list{gap:4px;display:flex;flex-shrink:0;align-items:center;padding:0;flex:1;width:100%;justify-content:space-between}.step{display:flex;align-items:center;flex-direction:row;flex:1;gap:4px}.step .wrapper{flex:1;position:relative}.step .divider{background-color:var(--neutral-light);height:2px;flex:1;transition:all 1s}.step .animation{position:absolute;top:0;left:0;right:0;width:var(--progress-width)}.step .done{background-color:var(--success-light)}.step .stop{background-color:var(--error-light)}.step .active{background-color:var(--info-light)}.last{flex:0}";
|
|
8
|
-
const CuraStepperStyle0 = curaStepperCss;
|
|
9
7
|
|
|
10
8
|
const CuraStepper = class {
|
|
11
9
|
constructor(hostRef) {
|
|
12
10
|
index.registerInstance(this, hostRef);
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Indicates if a step has encountered an error
|
|
13
|
+
* If `true`, the current step will be marked as 'stop'
|
|
14
|
+
*/
|
|
14
15
|
this.errorInCurrentStep = false;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to display the title (default: false)
|
|
18
|
+
*/
|
|
15
19
|
this.displayHeading = false;
|
|
20
|
+
/**
|
|
21
|
+
* Allows you to set the appearance of the component (default: default)
|
|
22
|
+
*/
|
|
16
23
|
this.variant = 'default';
|
|
24
|
+
/**
|
|
25
|
+
* List of steps in the stepper.
|
|
26
|
+
*/
|
|
17
27
|
this.steps = [];
|
|
18
28
|
this.styles = {};
|
|
29
|
+
/**
|
|
30
|
+
* Array of steps in the stepper.
|
|
31
|
+
*
|
|
32
|
+
* @type {Date[]}
|
|
33
|
+
* @default []
|
|
34
|
+
*/
|
|
19
35
|
this.stepList = [];
|
|
20
36
|
}
|
|
21
37
|
connectedCallback() {
|
|
@@ -116,8 +132,9 @@ const CuraStepper = class {
|
|
|
116
132
|
}
|
|
117
133
|
get host() { return index.getElement(this); }
|
|
118
134
|
};
|
|
119
|
-
CuraStepper.style =
|
|
135
|
+
CuraStepper.style = curaStepperCss;
|
|
120
136
|
|
|
121
137
|
exports.cura_stepper = CuraStepper;
|
|
138
|
+
//# sourceMappingURL=cura-stepper.entry.cjs.js.map
|
|
122
139
|
|
|
123
140
|
//# sourceMappingURL=cura-stepper.cjs.entry.js.map
|