@rededor/cura 1.7.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cura-accordion_20.cjs.entry.js +485 -138
- package/dist/cjs/cura-accordion_20.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +9 -12
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-counter.cjs.entry.js +16 -8
- package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-counter.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-dot.cjs.entry.js +14 -5
- package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-dot.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-pill.cjs.entry.js +23 -7
- package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-pill.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +46 -8
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-outline.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-select.cjs.entry.js +7 -12
- package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-select.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-button.definitions-f036371c.js → cura-button.definitions-B3SK8MaV.js} +2 -1
- package/dist/cjs/cura-button.definitions-B3SK8MaV.js.map +1 -0
- package/dist/cjs/cura-calendar.cjs.entry.js +203 -94
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-calendar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-card.cjs.entry.js +34 -6
- package/dist/cjs/cura-card.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-card.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-checkbox.cjs.entry.js +72 -20
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +25 -7
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-display.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +5 -6
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-dropdown-search-not-found.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-forms.definitions-c164f1b8.js → cura-forms.definitions-DVLuO67c.js} +2 -1
- package/dist/cjs/cura-forms.definitions-DVLuO67c.js.map +1 -0
- package/dist/cjs/{cura-icon.definitions-5223028b.js → cura-icon.definitions-DT0wF67y.js} +2 -1
- package/dist/cjs/cura-icon.definitions-DT0wF67y.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +7 -8
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-icons-view.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-input-date.cjs.entry.js +32 -15
- package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-input-date.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-loader-bar.cjs.entry.js +4 -5
- package/dist/cjs/cura-loader-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-loader-bar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-modal.cjs.entry.js +46 -15
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar.cura-stepper-item.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js +25 -15
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.cjs.entry.js +73 -21
- package/dist/cjs/cura-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-stepper.cjs.entry.js +23 -6
- package/dist/cjs/cura-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-stepper.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +61 -18
- package/dist/cjs/cura-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-switch.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-button.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-button.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-button.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-transparent.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-tabs.definitions-b8955ad4.js → cura-tabs.definitions-CGqqGE2e.js} +2 -1
- package/dist/cjs/cura-tabs.definitions-CGqqGE2e.js.map +1 -0
- package/dist/cjs/{cura-theme-module-09bb63a4.js → cura-theme-module-CJkmAxBA.js} +94 -9
- package/dist/cjs/cura-theme-module-CJkmAxBA.js.map +1 -0
- package/dist/cjs/cura-toast.cjs.entry.js +8 -11
- package/dist/cjs/cura-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-toast.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tooltip.cjs.entry.js +9 -11
- package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/cura.cjs.js +9 -10
- package/dist/cjs/cura.cjs.js.map +1 -1
- package/dist/cjs/{index-60783089.js → index-BK9MSAiE.js} +947 -289
- package/dist/cjs/index-BK9MSAiE.js.map +1 -0
- package/dist/cjs/{index-6dc29195.js → index-EyP6Zlkd.js} +2 -1
- package/dist/cjs/index-EyP6Zlkd.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +5 -8
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +57 -18
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +45 -9
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +24 -7
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +8 -4
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js +19 -3
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +40 -9
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.js +86 -17
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +86 -17
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +25 -13
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +81 -16
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +19 -11
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
- package/dist/collection/components/cura-avatar/cura-avatar.js +48 -13
- package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.js +196 -24
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
- package/dist/collection/components/cura-card/cura-card.js +48 -7
- package/dist/collection/components/cura-card/cura-card.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +31 -9
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +91 -28
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +15 -6
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.css +0 -1
- package/dist/collection/components/cura-modal/cura-modal.js +65 -17
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js +3 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +21 -8
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +26 -9
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper.js +34 -6
- package/dist/collection/components/cura-stepper/cura-stepper.js.map +1 -1
- package/dist/collection/components/cura-toast/cura-toast.js +24 -12
- package/dist/collection/components/cura-toast/cura-toast.js.map +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +25 -12
- package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +114 -29
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.css +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +74 -16
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +13 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +132 -28
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +46 -9
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +109 -28
- package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +114 -34
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +13 -6
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js.map +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.js +85 -21
- package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +6 -2
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +14 -4
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +21 -9
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +9 -3
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +39 -8
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +53 -10
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +39 -8
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/components/cura-accordion-item.js +24 -6
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-accordion.js +34 -13
- package/dist/components/cura-accordion.js.map +1 -1
- package/dist/components/cura-alert.js +12 -14
- package/dist/components/cura-alert.js.map +1 -1
- package/dist/components/cura-avatar.js +25 -8
- package/dist/components/cura-avatar.js.map +1 -1
- package/dist/components/cura-badge-counter.js +2 -1
- package/dist/components/cura-badge-distance.js +7 -7
- package/dist/components/cura-badge-distance.js.map +1 -1
- package/dist/components/cura-badge-dot.js +14 -4
- package/dist/components/cura-badge-dot.js.map +1 -1
- package/dist/components/cura-badge-pill.js +2 -1
- package/dist/components/cura-button-outline.js +49 -10
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-select.js +10 -14
- package/dist/components/cura-button-select.js.map +1 -1
- package/dist/components/cura-button-transparent.js +2 -1
- package/dist/components/cura-button.js +49 -10
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-calendar.js +2 -1
- package/dist/components/cura-card.js +34 -5
- package/dist/components/cura-card.js.map +1 -1
- package/dist/components/cura-checkbox.js +75 -22
- package/dist/components/cura-checkbox.js.map +1 -1
- package/dist/components/cura-display.js +25 -6
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-dropdown-search-category.js +5 -5
- package/dist/components/cura-dropdown-search-category.js.map +1 -1
- package/dist/components/cura-dropdown-search-not-found.js +6 -6
- package/dist/components/cura-dropdown-search-not-found.js.map +1 -1
- package/dist/components/cura-dropdown-search-option.js +22 -10
- package/dist/components/cura-dropdown-search-option.js.map +1 -1
- package/dist/components/cura-dropdown-search.js +66 -27
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-heading.js +2 -1
- package/dist/components/cura-icon.js +2 -1
- package/dist/components/cura-icons-view.js +9 -9
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-input-date.js +40 -21
- package/dist/components/cura-input-date.js.map +1 -1
- package/dist/components/cura-input-text.js +2 -1
- package/dist/components/cura-label.js +2 -1
- package/dist/components/cura-loader-bar.js +2 -1
- package/dist/components/cura-loader-circle.js +2 -1
- package/dist/components/cura-modal.js +50 -18
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-page-template.js +4 -4
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +2 -1
- package/dist/components/cura-progress-bar.js +2 -1
- package/dist/components/cura-radio.js +75 -22
- package/dist/components/cura-radio.js.map +1 -1
- package/dist/components/cura-select-option.js +2 -1
- package/dist/components/cura-select.js +2 -1
- package/dist/components/cura-stepper-item.js +2 -1
- package/dist/components/cura-stepper.js +30 -12
- package/dist/components/cura-stepper.js.map +1 -1
- package/dist/components/cura-switch.js +62 -18
- package/dist/components/cura-switch.js.map +1 -1
- package/dist/components/cura-tabs-button.js +9 -11
- package/dist/components/cura-tabs-button.js.map +1 -1
- package/dist/components/cura-tabs-group.js +5 -5
- package/dist/components/cura-tabs-group.js.map +1 -1
- package/dist/components/cura-tabs-transparent.js +8 -10
- package/dist/components/cura-tabs-transparent.js.map +1 -1
- package/dist/components/cura-tabs.js +8 -10
- package/dist/components/cura-tabs.js.map +1 -1
- package/dist/components/cura-toast.js +12 -14
- package/dist/components/cura-toast.js.map +1 -1
- package/dist/components/cura-tooltip.js +15 -16
- package/dist/components/cura-tooltip.js.map +1 -1
- package/dist/components/index.js +3 -547
- package/dist/components/index.js.map +1 -1
- package/dist/components/{cura-icon2.js → p-B5aO1chh.js} +5 -6
- package/dist/components/p-B5aO1chh.js.map +1 -0
- package/dist/components/{cura-heading2.js → p-BHEafDKD.js} +34 -7
- package/dist/components/p-BHEafDKD.js.map +1 -0
- package/dist/components/{cura-button-transparent2.js → p-BRDqwZ4N.js} +48 -11
- package/dist/components/p-BRDqwZ4N.js.map +1 -0
- package/dist/{esm/cura-button.definitions-617d3bad.js → components/p-BSI2FkNn.js} +2 -1
- package/dist/components/p-BSI2FkNn.js.map +1 -0
- package/dist/components/{cura-badge-counter2.js → p-C72aF-gL.js} +18 -9
- package/dist/components/p-C72aF-gL.js.map +1 -0
- package/dist/components/{cura-tabs.definitions.js → p-CHcd-uKK.js} +2 -1
- package/dist/components/p-CHcd-uKK.js.map +1 -0
- package/dist/components/p-D1cPOZpG.js +2617 -0
- package/dist/components/p-D1cPOZpG.js.map +1 -0
- package/dist/components/{cura-paragraph2.js → p-DI4g-ZH4.js} +26 -7
- package/dist/components/p-DI4g-ZH4.js.map +1 -0
- package/dist/components/{cura-label2.js → p-DR1RHrEX.js} +30 -7
- package/dist/components/p-DR1RHrEX.js.map +1 -0
- package/dist/components/{cura-stepper-item2.js → p-DaPc6Dxl.js} +23 -14
- package/dist/components/p-DaPc6Dxl.js.map +1 -0
- package/dist/components/{cura-forms.definitions.js → p-Dot54hbB.js} +2 -1
- package/dist/components/p-Dot54hbB.js.map +1 -0
- package/dist/components/{cura-select-option2.js → p-DpIu_Oxz.js} +8 -9
- package/dist/components/p-DpIu_Oxz.js.map +1 -0
- package/dist/components/{cura-loader-circle2.js → p-Dqm2sAwv.js} +13 -7
- package/dist/components/p-Dqm2sAwv.js.map +1 -0
- package/dist/components/{cura-progress-bar2.js → p-FTSrgi0q.js} +11 -8
- package/dist/components/p-FTSrgi0q.js.map +1 -0
- package/dist/components/{cura-loader-bar2.js → p-KIQMkSRF.js} +5 -5
- package/dist/components/p-KIQMkSRF.js.map +1 -0
- package/dist/components/{cura-badge-pill2.js → p-cOEGtL9C.js} +26 -9
- package/dist/components/p-cOEGtL9C.js.map +1 -0
- package/dist/components/{cura-calendar2.js → p-e-P5qR3J.js} +210 -100
- package/dist/components/p-e-P5qR3J.js.map +1 -0
- package/dist/components/{cura-select2.js → p-y6Cly9DJ.js} +87 -31
- package/dist/components/p-y6Cly9DJ.js.map +1 -0
- package/dist/components/{cura-input-text2.js → p-zz_zOPBZ.js} +75 -102
- package/dist/components/p-zz_zOPBZ.js.map +1 -0
- package/dist/cura/cura-alert.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-counter.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-dot.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-pill.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-outline.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-select.entry.esm.js.map +1 -0
- package/dist/cura/{p-12a4ae7e.entry.js.map → cura-calendar.entry.esm.js.map} +1 -1
- package/dist/cura/{p-53d68d72.entry.js.map → cura-card.entry.esm.js.map} +1 -1
- package/dist/cura/cura-checkbox.entry.esm.js.map +1 -0
- package/dist/cura/cura-display.entry.esm.js.map +1 -0
- package/dist/cura/cura-dropdown-search-not-found.entry.esm.js.map +1 -0
- package/dist/cura/cura-icons-view.entry.esm.js.map +1 -0
- package/dist/cura/cura-input-date.entry.esm.js.map +1 -0
- package/dist/cura/cura-loader-bar.entry.esm.js.map +1 -0
- package/dist/cura/{p-1ef21ae9.entry.js.map → cura-modal.entry.esm.js.map} +1 -1
- package/dist/cura/cura-progress-bar.cura-stepper-item.entry.esm.js.map +1 -0
- package/dist/cura/cura-radio.entry.esm.js.map +1 -0
- package/dist/cura/cura-stepper.entry.esm.js.map +1 -0
- package/dist/cura/cura-switch.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-button.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-transparent.entry.esm.js.map +1 -0
- package/dist/cura/cura-toast.entry.esm.js.map +1 -0
- package/dist/cura/cura-tooltip.entry.esm.js.map +1 -0
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/loader.esm.js.map +1 -0
- package/dist/cura/p-077019da.entry.js +2 -0
- package/dist/cura/p-077019da.entry.js.map +1 -0
- package/dist/cura/p-07783235.entry.js +2 -0
- package/dist/cura/p-07783235.entry.js.map +1 -0
- package/dist/cura/p-090e297c.entry.js +2 -0
- package/dist/cura/p-090e297c.entry.js.map +1 -0
- package/dist/cura/p-16c0b52c.entry.js +2 -0
- package/dist/cura/p-16c0b52c.entry.js.map +1 -0
- package/dist/cura/p-2632183e.entry.js +2 -0
- package/dist/cura/p-2632183e.entry.js.map +1 -0
- package/dist/cura/p-32015dcc.entry.js +2 -0
- package/dist/cura/p-32015dcc.entry.js.map +1 -0
- package/dist/cura/p-32f94709.entry.js +2 -0
- package/dist/cura/p-32f94709.entry.js.map +1 -0
- package/dist/cura/p-3d6040e2.entry.js +2 -0
- package/dist/cura/p-3d6040e2.entry.js.map +1 -0
- package/dist/cura/p-4ac578a6.entry.js +2 -0
- package/dist/cura/p-4ac578a6.entry.js.map +1 -0
- package/dist/cura/p-4bde448e.entry.js +2 -0
- package/dist/cura/p-4bde448e.entry.js.map +1 -0
- package/dist/cura/p-6feba852.entry.js +2 -0
- package/dist/cura/p-6feba852.entry.js.map +1 -0
- package/dist/cura/p-7586fd07.entry.js +2 -0
- package/dist/cura/p-7586fd07.entry.js.map +1 -0
- package/dist/cura/p-76cbb798.entry.js +2 -0
- package/dist/cura/p-76cbb798.entry.js.map +1 -0
- package/dist/cura/p-7fd143aa.entry.js +2 -0
- package/dist/cura/p-7fd143aa.entry.js.map +1 -0
- package/dist/cura/p-8c83f259.entry.js +2 -0
- package/dist/cura/p-8c83f259.entry.js.map +1 -0
- package/dist/cura/p-95cd7918.entry.js +2 -0
- package/dist/cura/p-95cd7918.entry.js.map +1 -0
- package/dist/cura/{p-272c784a.js → p-964stZ3D.js} +1 -1
- package/dist/cura/p-964stZ3D.js.map +1 -0
- package/dist/cura/p-9ef5444e.entry.js +2 -0
- package/dist/cura/p-9ef5444e.entry.js.map +1 -0
- package/dist/cura/p-BPKQjAwN.js +2 -0
- package/dist/cura/p-BPKQjAwN.js.map +1 -0
- package/dist/cura/{p-53c18ed4.js → p-BSI2FkNn.js} +1 -1
- package/dist/cura/p-BSI2FkNn.js.map +1 -0
- package/dist/cura/{p-efcb32eb.js → p-CHcd-uKK.js} +1 -1
- package/dist/cura/p-CHcd-uKK.js.map +1 -0
- package/dist/cura/{p-f9b8f665.js → p-Dot54hbB.js} +1 -1
- package/dist/cura/p-Dot54hbB.js.map +1 -0
- package/dist/cura/p-PPMZr_VE.js +3 -0
- package/dist/cura/p-PPMZr_VE.js.map +1 -0
- package/dist/cura/p-c6f240f0.entry.js +2 -0
- package/dist/cura/p-c6f240f0.entry.js.map +1 -0
- package/dist/cura/p-ceb646df.entry.js +2 -0
- package/dist/cura/p-ceb646df.entry.js.map +1 -0
- package/dist/cura/p-d040f8b9.entry.js +2 -0
- package/dist/cura/p-d040f8b9.entry.js.map +1 -0
- package/dist/cura/p-deb0b764.entry.js +2 -0
- package/dist/cura/p-deb0b764.entry.js.map +1 -0
- package/dist/cura/p-df7cb250.entry.js +2 -0
- package/dist/cura/p-df7cb250.entry.js.map +1 -0
- package/dist/cura/p-f9af3a3b.entry.js +2 -0
- package/dist/cura/p-f9af3a3b.entry.js.map +1 -0
- package/dist/cura/p-fc3b57a8.entry.js +2 -0
- package/dist/cura/p-fc3b57a8.entry.js.map +1 -0
- package/dist/cura/{p-48f9289b.js → p-sjLA93YY.js} +1 -1
- package/dist/cura/p-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-accordion_20.entry.js +484 -135
- package/dist/esm/cura-accordion_20.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +9 -10
- package/dist/esm/cura-alert.entry.js.map +1 -1
- package/dist/esm/cura-badge-counter.entry.js +16 -6
- package/dist/esm/cura-badge-counter.entry.js.map +1 -1
- package/dist/esm/cura-badge-dot.entry.js +14 -3
- package/dist/esm/cura-badge-dot.entry.js.map +1 -1
- package/dist/esm/cura-badge-pill.entry.js +23 -5
- package/dist/esm/cura-badge-pill.entry.js.map +1 -1
- package/dist/esm/cura-button-outline.entry.js +46 -6
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-select.entry.js +7 -10
- package/dist/esm/cura-button-select.entry.js.map +1 -1
- package/dist/{components/cura-button.definitions.js → esm/cura-button.definitions-BSI2FkNn.js} +2 -1
- package/dist/esm/cura-button.definitions-BSI2FkNn.js.map +1 -0
- package/dist/esm/cura-calendar.entry.js +203 -92
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura-card.entry.js +34 -4
- package/dist/esm/cura-card.entry.js.map +1 -1
- package/dist/esm/cura-checkbox.entry.js +72 -18
- package/dist/esm/cura-checkbox.entry.js.map +1 -1
- package/dist/esm/cura-display.entry.js +25 -5
- package/dist/esm/cura-display.entry.js.map +1 -1
- package/dist/esm/cura-dropdown-search-not-found.entry.js +5 -4
- package/dist/esm/cura-dropdown-search-not-found.entry.js.map +1 -1
- package/dist/esm/{cura-forms.definitions-2f963167.js → cura-forms.definitions-Dot54hbB.js} +2 -1
- package/dist/esm/cura-forms.definitions-Dot54hbB.js.map +1 -0
- package/dist/esm/{cura-icon.definitions-a892c0e2.js → cura-icon.definitions-sjLA93YY.js} +2 -1
- package/dist/esm/cura-icon.definitions-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +7 -6
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-input-date.entry.js +32 -13
- package/dist/esm/cura-input-date.entry.js.map +1 -1
- package/dist/esm/cura-loader-bar.entry.js +4 -3
- package/dist/esm/cura-loader-bar.entry.js.map +1 -1
- package/dist/esm/cura-modal.entry.js +46 -13
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura-progress-bar.cura-stepper-item.entry.js.map +1 -0
- package/dist/esm/cura-progress-bar_2.entry.js +25 -13
- package/dist/esm/cura-progress-bar_2.entry.js.map +1 -1
- package/dist/esm/cura-radio.entry.js +73 -19
- package/dist/esm/cura-radio.entry.js.map +1 -1
- package/dist/esm/cura-stepper.entry.js +23 -4
- package/dist/esm/cura-stepper.entry.js.map +1 -1
- package/dist/esm/cura-switch.entry.js +61 -16
- package/dist/esm/cura-switch.entry.js.map +1 -1
- package/dist/esm/cura-tabs-button.entry.js +6 -7
- package/dist/esm/cura-tabs-button.entry.js.map +1 -1
- package/dist/esm/cura-tabs-transparent.entry.js +6 -7
- package/dist/esm/cura-tabs-transparent.entry.js.map +1 -1
- package/dist/esm/{cura-tabs.definitions-a017126e.js → cura-tabs.definitions-CHcd-uKK.js} +2 -1
- package/dist/esm/cura-tabs.definitions-CHcd-uKK.js.map +1 -0
- package/dist/esm/{cura-theme-module-bf286f68.js → cura-theme-module-BPKQjAwN.js} +88 -4
- package/dist/esm/cura-theme-module-BPKQjAwN.js.map +1 -0
- package/dist/esm/cura-toast.entry.js +8 -9
- package/dist/esm/cura-toast.entry.js.map +1 -1
- package/dist/esm/cura-tooltip.entry.js +9 -9
- package/dist/esm/cura-tooltip.entry.js.map +1 -1
- package/dist/esm/cura.js +7 -7
- package/dist/esm/cura.js.map +1 -1
- package/dist/esm/{index-fbee309a.js → index-964stZ3D.js} +2 -1
- package/dist/esm/index-964stZ3D.js.map +1 -0
- package/dist/esm/{index-21683715.js → index-OdKytJIH.js} +947 -270
- package/dist/esm/index-OdKytJIH.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +5 -6
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +4 -0
- package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +14 -0
- package/dist/types/components.d.ts +718 -0
- package/dist/types/stencil-public-runtime.d.ts +25 -1
- package/package.json +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-stepper.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,yyBAAyyB,CAAC;AACj0B,0BAAe,cAAc;;MCOhBA,aAAW;;;;;;kCAUiC,KAAK;8BAKT,KAAK;uBAKE,SAAS;qBAKlC,EAAE;sBAMjB,EAAE;wBAQQ,EAAE;;IAE9B,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE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,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAO,CACtG,EACN;KACH;IAED,MAAM;QACJ,OAAO,EAAC,IAAI,uDAAE,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAQ,CAAC;KACvG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraStepper"],"sources":["src/components/cura-stepper/cura-stepper.scss?tag=cura-stepper&encapsulation=shadow","src/components/cura-stepper/cura-stepper.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n width: 100%;\n}\n\ncura-heading { \n --margin-block: 0 !important;\n}\n\n.container {\n display: flex;\n}\n\n.compact {\n display: flex;\n padding: 0px;\n justify-content: space-between;\n align-items: center;\n\n .heading{\n text-align: right;\n }\n}\n\n.stepper-list {\n gap: 4px;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n padding: 0;\n flex: 1;\n width: 100%;\n justify-content: space-between;\n}\n\n.step{\n display: flex;\n align-items: center;\n flex-direction: row;\n flex: 1;\n gap: 4px;\n\n .wrapper {\n flex: 1;\n position: relative;\n }\n\n .divider{\n background-color: var(--neutral-light);\n height: 2px;\n flex: 1;\n\n transition: all 1s;\n }\n\n .animation {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n width: var(--progress-width);\n }\n\n .done{\n background-color: var(--success-light);\n }\n\n .stop{\n background-color: var(--error-light);\n }\n\n .active{\n background-color: var(--info-light);\n }\n}\n\n.last{\n flex: 0;\n}\n","import { Component, Host, State, h, Element, Prop } from '@stencil/core';\nimport { Step } from './stepper.type';\n\n@Component({\n tag: 'cura-stepper',\n styleUrl: 'cura-stepper.scss',\n shadow: true,\n})\nexport class CuraStepper {\n /**\n * The current active step index\n */\n @Prop({ reflect: true }) activeStepIndex: number;\n\n /**\n * Indicates if a step has encountered an error\n * If `true`, the current step will be marked as 'stop'\n */\n @Prop({ reflect: true }) errorInCurrentStep: boolean = false;\n\n /**\n * Whether to display the title (default: false)\n */\n @Prop({ reflect: true }) displayHeading: boolean = false;\n\n /**\n * Allows you to set the appearance of the component (default: default)\n */\n @Prop({ reflect: true }) variant: 'compact' | 'default' = 'default';\n\n /**\n * List of steps in the stepper.\n */\n @Prop() steps: Step[] | string = [];\n /**\n * Reference to the host element.\n */\n @Element() host: HTMLElement;\n\n @State() styles = {};\n\n /**\n * Array of steps in the stepper.\n *\n * @type {Date[]}\n * @default []\n */\n @State() stepList: Step[] = [];\n\n connectedCallback() {\n this.initializeSteps();\n\n const { fonts, colors, spacing } = window.CuraAPI.theme;\n const weights = fonts.getWeights();\n\n this.styles = this.generateStyles(colors, fonts, spacing, weights);\n }\n\n generateStyles(colors, fonts, spacing, weights) {\n return {\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 '--neutral-light': colors.getColor('neutral-light'),\n '--success-light': colors.getColor('success-light'),\n '--info-light': colors.getColor('info-light'),\n '--error-light': colors.getColor('error-light'),\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 initializeSteps() {\n if (typeof this.steps === 'string') {\n this.stepList = JSON.parse(this.steps || '[]');\n } else {\n this.stepList = this.steps;\n }\n }\n\n getStepStatus(step: number): 'done' | 'stop' | 'active' | 'default' {\n if (this.activeStepIndex === step && this.errorInCurrentStep) return 'stop';\n if (this.activeStepIndex === step && this.stepList.length !== step) return 'active';\n if (this.activeStepIndex >= step) return 'done';\n\n return 'default';\n }\n\n getProgressStyles() {\n const progressStyles = {\n default: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'info-darker',\n nextStepTextColor: 'info-dark',\n },\n firstStep: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'neutral-dark',\n nextStepTextColor: 'neutral-medium',\n },\n completed: {\n progressColor: 'var(--success-light)',\n activeStepTextColor: 'success-darker',\n nextStepTextColor: 'success-dark',\n },\n error: {\n progressColor: 'var(--error-light)',\n activeStepTextColor: 'error-darker',\n nextStepTextColor: 'error-dark',\n },\n };\n\n if (this.errorInCurrentStep) {\n return progressStyles.error;\n }\n\n if (this.activeStepIndex === 0) {\n return progressStyles.firstStep;\n }\n\n if (this.activeStepIndex === this.stepList.length) {\n return progressStyles.completed;\n }\n\n return progressStyles.default;\n }\n\n renderCompactStepper() {\n const title = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex].title : this.stepList[this.activeStepIndex - 1].title;\n const subtitle = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex + 1].title : this.stepList[this.activeStepIndex]?.title;\n const completed = this.activeStepIndex === this.stepList.length;\n const inProgress = !(completed || this.errorInCurrentStep);\n const { progressColor, activeStepTextColor, nextStepTextColor } = this.getProgressStyles();\n\n // Representa a porcentagem de progresso (step atual / quantidade de steps;)\n const progress = (this.activeStepIndex * 100) / this.stepList.length;\n\n return (\n <div class=\"container compact\" style={this.styles}>\n <cura-progress-bar progress={progress} progressColor={progressColor} active={this.activeStepIndex !== 0}>\n {!inProgress ? (\n <cura-icon name={this.errorInCurrentStep ? 'alertCircle' : 'checkCircle'} color={this.errorInCurrentStep ? 'error-dark' : 'success-dark'} size=\"16\"></cura-icon>\n ) : (\n <cura-heading color=\"neutral-dark\" size=\"xsmall\">\n {this.activeStepIndex}/{this.stepList.length}\n </cura-heading>\n )}\n </cura-progress-bar>\n {this.displayHeading && (\n <div class=\"heading\">\n <cura-heading size=\"small\" weight=\"bold\" color={activeStepTextColor}>\n {title}\n </cura-heading>\n {!completed && (\n <cura-heading size=\"xsmall\" weight=\"regular\" color={nextStepTextColor}>\n Próximo: {subtitle}\n </cura-heading>\n )}\n </div>\n )}\n </div>\n );\n }\n\n renderStep(step: Step, stepIndex: number) {\n const stepStatus = this.getStepStatus(stepIndex + 1);\n const lastStep = stepIndex === this.stepList.length - 1;\n const progressWidth = stepStatus !== 'default' ? '100%' : '0';\n\n return (\n <div class={`step ${lastStep ? 'last' : ''}`} key={step.title}>\n <cura-stepper-item heading={step.title} label={step.label} displayHeading={this.displayHeading} status={stepStatus}></cura-stepper-item>\n {stepIndex < this.stepList.length - 1 && (\n <div class=\"wrapper\">\n <div class=\"divider\" />\n <div class={`divider ${stepStatus} animation`} style={{ '--progress-width': progressWidth }} />\n </div>\n )}\n </div>\n );\n }\n renderStepper() {\n return (\n <div class=\"container\" style={this.styles}>\n <div class=\"stepper-list\">{this.stepList.map((step, stepIndex) => this.renderStep(step, stepIndex))}</div>\n </div>\n );\n }\n\n render() {\n return <Host>{this.variant === 'default' ? this.renderStepper() : this.renderCompactStepper()}</Host>;\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"cura-stepper.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,yyBAAyyB;;MCQnzBA,aAAW,iBAAAC,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AALxB,IAAA,WAAA,GAAA;;;;AAWE;;;AAGG;AACsB,QAAA,IAAkB,CAAA,kBAAA,GAAY,KAAK;AAE5D;;AAEG;AACsB,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK;AAExD;;AAEG;AACsB,QAAA,IAAO,CAAA,OAAA,GAA0B,SAAS;AAEnE;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAoB,EAAE;AAM1B,QAAA,IAAM,CAAA,MAAA,GAAG,EAAE;AAEpB;;;;;AAKG;AACM,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE;AAoJ/B;IAlJC,iBAAiB,GAAA;QACf,IAAI,CAAC,eAAe,EAAE;AAEtB,QAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK;AACvD,QAAA,MAAM,OAAO,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CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAClB,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,SAAS,EAAG,CAAA,EACvB,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,CAAW,QAAA,EAAA,UAAU,CAAY,UAAA,CAAA,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAA,CAAI,CAC3F,CACP,CACG;;IAGV,aAAa,GAAA;QACX,QACE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAA,EACvC,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,cAAc,EAAA,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAO,CACtG;;IAIV,MAAM,GAAA;AACJ,QAAA,OAAO,CAAA,CAAC,IAAI,EAAE,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraStepper","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/cura-stepper/cura-stepper.scss?tag=cura-stepper&encapsulation=shadow","src/components/cura-stepper/cura-stepper.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n width: 100%;\n}\n\ncura-heading { \n --margin-block: 0 !important;\n}\n\n.container {\n display: flex;\n}\n\n.compact {\n display: flex;\n padding: 0px;\n justify-content: space-between;\n align-items: center;\n\n .heading{\n text-align: right;\n }\n}\n\n.stepper-list {\n gap: 4px;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n padding: 0;\n flex: 1;\n width: 100%;\n justify-content: space-between;\n}\n\n.step{\n display: flex;\n align-items: center;\n flex-direction: row;\n flex: 1;\n gap: 4px;\n\n .wrapper {\n flex: 1;\n position: relative;\n }\n\n .divider{\n background-color: var(--neutral-light);\n height: 2px;\n flex: 1;\n\n transition: all 1s;\n }\n\n .animation {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n width: var(--progress-width);\n }\n\n .done{\n background-color: var(--success-light);\n }\n\n .stop{\n background-color: var(--error-light);\n }\n\n .active{\n background-color: var(--info-light);\n }\n}\n\n.last{\n flex: 0;\n}\n","import { Component, Host, State, h, Element, Prop } from '@stencil/core';\nimport { Step } from './stepper.type';\n\n@Component({\n tag: 'cura-stepper',\n styleUrl: 'cura-stepper.scss',\n shadow: true,\n})\nexport class CuraStepper {\n /**\n * The current active step index\n */\n @Prop({ reflect: true }) activeStepIndex: number;\n\n /**\n * Indicates if a step has encountered an error\n * If `true`, the current step will be marked as 'stop'\n */\n @Prop({ reflect: true }) errorInCurrentStep: boolean = false;\n\n /**\n * Whether to display the title (default: false)\n */\n @Prop({ reflect: true }) displayHeading: boolean = false;\n\n /**\n * Allows you to set the appearance of the component (default: default)\n */\n @Prop({ reflect: true }) variant: 'compact' | 'default' = 'default';\n\n /**\n * List of steps in the stepper.\n */\n @Prop() steps: Step[] | string = [];\n /**\n * Reference to the host element.\n */\n @Element() host: HTMLElement;\n\n @State() styles = {};\n\n /**\n * Array of steps in the stepper.\n *\n * @type {Date[]}\n * @default []\n */\n @State() stepList: Step[] = [];\n\n connectedCallback() {\n this.initializeSteps();\n\n const { fonts, colors, spacing } = window.CuraAPI.theme;\n const weights = fonts.getWeights();\n\n this.styles = this.generateStyles(colors, fonts, spacing, weights);\n }\n\n generateStyles(colors, fonts, spacing, weights) {\n return {\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 '--neutral-light': colors.getColor('neutral-light'),\n '--success-light': colors.getColor('success-light'),\n '--info-light': colors.getColor('info-light'),\n '--error-light': colors.getColor('error-light'),\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 initializeSteps() {\n if (typeof this.steps === 'string') {\n this.stepList = JSON.parse(this.steps || '[]');\n } else {\n this.stepList = this.steps;\n }\n }\n\n getStepStatus(step: number): 'done' | 'stop' | 'active' | 'default' {\n if (this.activeStepIndex === step && this.errorInCurrentStep) return 'stop';\n if (this.activeStepIndex === step && this.stepList.length !== step) return 'active';\n if (this.activeStepIndex >= step) return 'done';\n\n return 'default';\n }\n\n getProgressStyles() {\n const progressStyles = {\n default: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'info-darker',\n nextStepTextColor: 'info-dark',\n },\n firstStep: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'neutral-dark',\n nextStepTextColor: 'neutral-medium',\n },\n completed: {\n progressColor: 'var(--success-light)',\n activeStepTextColor: 'success-darker',\n nextStepTextColor: 'success-dark',\n },\n error: {\n progressColor: 'var(--error-light)',\n activeStepTextColor: 'error-darker',\n nextStepTextColor: 'error-dark',\n },\n };\n\n if (this.errorInCurrentStep) {\n return progressStyles.error;\n }\n\n if (this.activeStepIndex === 0) {\n return progressStyles.firstStep;\n }\n\n if (this.activeStepIndex === this.stepList.length) {\n return progressStyles.completed;\n }\n\n return progressStyles.default;\n }\n\n renderCompactStepper() {\n const title = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex].title : this.stepList[this.activeStepIndex - 1].title;\n const subtitle = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex + 1].title : this.stepList[this.activeStepIndex]?.title;\n const completed = this.activeStepIndex === this.stepList.length;\n const inProgress = !(completed || this.errorInCurrentStep);\n const { progressColor, activeStepTextColor, nextStepTextColor } = this.getProgressStyles();\n\n // Representa a porcentagem de progresso (step atual / quantidade de steps;)\n const progress = (this.activeStepIndex * 100) / this.stepList.length;\n\n return (\n <div class=\"container compact\" style={this.styles}>\n <cura-progress-bar progress={progress} progressColor={progressColor} active={this.activeStepIndex !== 0}>\n {!inProgress ? (\n <cura-icon name={this.errorInCurrentStep ? 'alertCircle' : 'checkCircle'} color={this.errorInCurrentStep ? 'error-dark' : 'success-dark'} size=\"16\"></cura-icon>\n ) : (\n <cura-heading color=\"neutral-dark\" size=\"xsmall\">\n {this.activeStepIndex}/{this.stepList.length}\n </cura-heading>\n )}\n </cura-progress-bar>\n {this.displayHeading && (\n <div class=\"heading\">\n <cura-heading size=\"small\" weight=\"bold\" color={activeStepTextColor}>\n {title}\n </cura-heading>\n {!completed && (\n <cura-heading size=\"xsmall\" weight=\"regular\" color={nextStepTextColor}>\n Próximo: {subtitle}\n </cura-heading>\n )}\n </div>\n )}\n </div>\n );\n }\n\n renderStep(step: Step, stepIndex: number) {\n const stepStatus = this.getStepStatus(stepIndex + 1);\n const lastStep = stepIndex === this.stepList.length - 1;\n const progressWidth = stepStatus !== 'default' ? '100%' : '0';\n\n return (\n <div class={`step ${lastStep ? 'last' : ''}`} key={step.title}>\n <cura-stepper-item heading={step.title} label={step.label} displayHeading={this.displayHeading} status={stepStatus}></cura-stepper-item>\n {stepIndex < this.stepList.length - 1 && (\n <div class=\"wrapper\">\n <div class=\"divider\" />\n <div class={`divider ${stepStatus} animation`} style={{ '--progress-width': progressWidth }} />\n </div>\n )}\n </div>\n );\n }\n renderStepper() {\n return (\n <div class=\"container\" style={this.styles}>\n <div class=\"stepper-list\">{this.stepList.map((step, stepIndex) => this.renderStep(step, stepIndex))}</div>\n </div>\n );\n }\n\n render() {\n return <Host>{this.variant === 'default' ? this.renderStepper() : this.renderCompactStepper()}</Host>;\n }\n}\n"],"version":3}
|
|
@@ -1,17 +1,71 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { f as formsSizes } from './
|
|
3
|
-
import { d as defineCustomElement$2 } from './
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-D1cPOZpG.js';
|
|
2
|
+
import { f as formsSizes } from './p-Dot54hbB.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-DR1RHrEX.js';
|
|
4
4
|
|
|
5
5
|
const curaSwitchCss = "@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);text-align:left;cursor:pointer}.position{flex-direction:row}.info{overflow:hidden}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color 0.3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform 0.3s, outline 0.3s;display:inline-block;cursor:pointer;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));background:var(--neutral-purewhite);transform:translateX(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale) !important;border-color:var(--neutral-darker-medium) !important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base) !important;border-color:var(--neutral-black-neutral-pale) !important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none !important;border-color:var(--neutral-black-neutral-pale) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base) !important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base) !important;border-color:var(--color-dark)}";
|
|
6
|
-
const CuraSwitchStyle0 = curaSwitchCss;
|
|
7
6
|
|
|
8
|
-
const CuraSwitch$1 = /*@__PURE__*/ proxyCustomElement(class CuraSwitch extends
|
|
7
|
+
const CuraSwitch$1 = /*@__PURE__*/ proxyCustomElement(class CuraSwitch extends H {
|
|
9
8
|
constructor() {
|
|
10
9
|
super();
|
|
11
10
|
this.__registerHost();
|
|
12
11
|
this.__attachShadow();
|
|
13
|
-
this.onchange = createEvent(this, "onchange"
|
|
12
|
+
this.onchange = createEvent(this, "onchange");
|
|
14
13
|
this.internals = this.attachInternals();
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether the switch is checked or not.
|
|
16
|
+
*/
|
|
17
|
+
this.checked = false;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates whether the switch is disabled or not.
|
|
20
|
+
*/
|
|
21
|
+
this.disabled = false;
|
|
22
|
+
/**
|
|
23
|
+
* The label text to display next to the switch.
|
|
24
|
+
*/
|
|
25
|
+
this.label = '';
|
|
26
|
+
/**
|
|
27
|
+
* Tab index for the switch element.
|
|
28
|
+
* Reflects as an HTML attribute.
|
|
29
|
+
*/
|
|
30
|
+
this.ontabindex = 0;
|
|
31
|
+
/**
|
|
32
|
+
* Position of the label relative to the switch.
|
|
33
|
+
* Can be 'left' or 'right'.
|
|
34
|
+
*/
|
|
35
|
+
this.position = 'left';
|
|
36
|
+
/**
|
|
37
|
+
* Size of the switch.
|
|
38
|
+
* Can be 'small', 'medium', or 'large'.
|
|
39
|
+
*/
|
|
40
|
+
this.size = 'medium';
|
|
41
|
+
/**
|
|
42
|
+
* Background style of the switch.
|
|
43
|
+
* Can be 'dark' or 'light'.
|
|
44
|
+
*/
|
|
45
|
+
this.background = 'light';
|
|
46
|
+
/**
|
|
47
|
+
* Accent color of the switch.
|
|
48
|
+
*/
|
|
49
|
+
this.color = 'accent';
|
|
50
|
+
/**
|
|
51
|
+
* Controls how the label text should handle overflow.
|
|
52
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
53
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
54
|
+
* - `string`: Custom overflow handling mode.
|
|
55
|
+
*
|
|
56
|
+
* @default 'none'
|
|
57
|
+
*/
|
|
58
|
+
this.overflowLabel = 'none';
|
|
59
|
+
/**
|
|
60
|
+
* Controls how the helper text should handle overflow.
|
|
61
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
62
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
63
|
+
* - `string`: Custom overflow handling mode.
|
|
64
|
+
*
|
|
65
|
+
* @default 'none'
|
|
66
|
+
*/
|
|
67
|
+
this.overflowHelper = 'none';
|
|
68
|
+
this.styles = {};
|
|
15
69
|
this.sizes = {
|
|
16
70
|
large: { size: 64 },
|
|
17
71
|
medium: { size: 48 },
|
|
@@ -25,17 +79,6 @@ const CuraSwitch$1 = /*@__PURE__*/ proxyCustomElement(class CuraSwitch extends H
|
|
|
25
79
|
this.internals.setFormValue(this.checked.toString());
|
|
26
80
|
this.onchange.emit({ checked: this.checked });
|
|
27
81
|
};
|
|
28
|
-
this.checked = false;
|
|
29
|
-
this.disabled = false;
|
|
30
|
-
this.label = '';
|
|
31
|
-
this.ontabindex = 0;
|
|
32
|
-
this.position = 'left';
|
|
33
|
-
this.size = 'medium';
|
|
34
|
-
this.background = 'light';
|
|
35
|
-
this.color = 'accent';
|
|
36
|
-
this.overflowLabel = 'none';
|
|
37
|
-
this.overflowHelper = 'none';
|
|
38
|
-
this.styles = {};
|
|
39
82
|
}
|
|
40
83
|
sizeHandler() {
|
|
41
84
|
this.styles = Object.assign(Object.assign({}, this.styles), { '--size-track': `${this.sizes[this.size].size}px`, '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
|
|
@@ -112,7 +155,7 @@ const CuraSwitch$1 = /*@__PURE__*/ proxyCustomElement(class CuraSwitch extends H
|
|
|
112
155
|
"color": ["setColors"],
|
|
113
156
|
"background": ["setColors"]
|
|
114
157
|
}; }
|
|
115
|
-
static get style() { return
|
|
158
|
+
static get style() { return curaSwitchCss; }
|
|
116
159
|
}, [65, "cura-switch", {
|
|
117
160
|
"checked": [1540],
|
|
118
161
|
"disabled": [516],
|
|
@@ -153,5 +196,6 @@ const CuraSwitch = CuraSwitch$1;
|
|
|
153
196
|
const defineCustomElement = defineCustomElement$1;
|
|
154
197
|
|
|
155
198
|
export { CuraSwitch, defineCustomElement };
|
|
199
|
+
//# sourceMappingURL=cura-switch.js.map
|
|
156
200
|
|
|
157
201
|
//# sourceMappingURL=cura-switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-switch.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,0nEAA0nE,CAAC;AACjpE,yBAAe,aAAa;;MCQfA,YAAU;;;;;;;QAgErB,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;QAuEpD,iBAAY,GAAG;YACb,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO,IAAI,CAAC;YAE/B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YACrD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;SAC/C,CAAC;uBA/IyD,KAAK;wBAInB,KAAK;qBAIT,EAAE;0BAKG,CAAC;w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AAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,OAAO,GAAG,MAAM,EAAE,EAClE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,IAEf,8DAAa,CACF,CACT,EAEN,4DAAK,KAAK,EAAC,SAAS,IAClB,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAC5C,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAQ,CAC7E,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraSwitch"],"sources":["src/components/forms/cura-switch/cura-switch.scss?tag=cura-switch&encapsulation=shadow","src/components/forms/cura-switch/cura-switch.tsx"],"sourcesContent":["@import '../../../../src/scss/mixins/shadows.scss';\n@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n}\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n text-align: left;\n\n cursor: pointer;\n}\n\n.position {\n flex-direction: row;\n}\n\n.info {\n overflow: hidden;\n}\n\n.label,\n.message {\n text-align: left;\n}\n\n.control {\n width: fit-content;\n}\n\n/* Estilos para o controle de switch */\n.track {\n background: var(--neutral-dark-base);\n border-radius: 16px;\n transition: background-color 0.3s;\n align-items: flex-start;\n flex-shrink: 0;\n box-sizing: border-box;\n width: var(--size-track);\n height: var(--size);\n position: relative;\n}\n\n.thumb {\n background: var(--neutral-purewhite);\n border: 2px solid var(--neutral-darker-medium);\n border-radius: 50%;\n\n position: absolute;\n transition: transform 0.3s, outline 0.3s;\n display: inline-block;\n cursor: pointer;\n user-select: none;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* Estado \"checked\" */\n.checked .thumb {\n border-color: var(--color-dark);\n @include shadow-level3(--neutral-black-shadow);\n background: var(--neutral-purewhite);\n transform: translateX(var(--size)) translateY(-50%);\n}\n\n.checked .thumb:hover {\n background: var(--neutral-pale) !important;\n border-color: var(--neutral-darker-medium) !important;\n}\n\n.checked .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n.checked .track {\n background: var(--color-base-light);\n}\n\n/* Estado \"disabled\" */\n.disabled .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.disabled .thumb {\n background: var(--neutral-black-neutral-base) !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n cursor: not-allowed;\n}\n\n.disabled.checked .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.container.disabled .thumb:focus {\n outline: none !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n}\n\n/* Estado hover para não disabled e não checked */\n:not(.disabled):not(.checked) .thumb:hover {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n:not(.disabled):not(.checked) .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n/* Estado hover para não disabled */\n:not(.disabled) .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border: 2px solid var(--neutral-darker-medium);\n z-index: 1;\n}\n\n:not(.disabled) .checked .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border-color: var(--color-dark);\n}\n","import { Component, Prop, Event, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-switch',\n styleUrl: 'cura-switch.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSwitch {\n /**\n * Indicates whether the switch is checked or not.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Indicates whether the switch is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * The label text to display next to the switch.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Tab index for the switch element.\n * Reflects as an HTML attribute.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the switch.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Size of the switch.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background style of the switch.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Accent color of the switch.\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 @Event({ eventName: 'onchange', composed: true, cancelable: true, bubbles: true }) onchange: EventEmitter<{ checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 64 },\n medium: { size: 48 },\n small: { size: 40 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-track': `${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: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--neutral-medium', background: 'neutral-medium' },\n { name: '--neutral-pale', background: 'neutral-pale' },\n { name: '--neutral-dark-base', background: `neutral-${this.isDarkbackground() ? 'dark' : 'base'}` },\n { name: '--neutral-darker-medium', background: `neutral-${this.isDarkbackground() ? 'darker' : 'medium'}` },\n { name: '--neutral-black-neutral-pale', background: `${this.isDarkbackground() ? 'neutral-black' : 'neutral-pale'}` },\n { name: '--neutral-black-neutral-base', background: `${this.isDarkbackground() ? 'neutral-dark' : 'neutral-base'}` },\n { name: '--color-base-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color?.opacity);\n });\n this.styles = { ...this.styles };\n }\n\n connectedCallback() {\n this.sizeHandler();\n this.setColors();\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 }) {\n this.checked = state.value === 'true';\n this.internals.setFormValue(this.checked.toString());\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.checked.toString());\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 toggleSwitch = () => {\n if (this.disabled) return null;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.checked.toString());\n this.onchange.emit({ checked: this.checked });\n };\n\n assignColor(colorDark: string, colorLight: string) {\n if (this.disabled) return this.isDarkbackground() ? 'neutral-dark' : 'neutral-dark';\n return this.isDarkbackground() ? colorDark : colorLight;\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\n return classes;\n }\n\n render() {\n return (\n <Host role=\"switch\" aria-checked={this.checked} aria-disabled={this.disabled}>\n <div class={this.getClasses()} style={this.styles} onClick={this.toggleSwitch}>\n <div class=\"info\">\n <cura-label\n textOverflow={this.overflowLabel}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n class=\"label\"\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n lineHeight=\"125%\"\n color={this.assignColor('neutral-white', 'neutral-black')}\n >\n {this.label}\n </cura-label>\n <cura-label\n textOverflow={this.overflowHelper}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n color={this.assignColor('primary-lighter', 'neutral-dark')}\n size=\"xsmall\"\n class=\"message\"\n >\n <slot></slot>\n </cura-label>\n </div>\n\n <div class=\"control\">\n <div class={`track ${this.size.toLowerCase()}`}>\n <div class={`thumb ${this.size.toLowerCase()}`} tabIndex={this.ontabindex}></div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"cura-switch.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,0nEAA0nE;;MCSnoEA,YAAU,iBAAAC,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AANvB,IAAA,WAAA,GAAA;;;;;;AAOE;;AAEG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAC3C;;;AAGG;AACsB,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAC/C;;;AAGG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAqB,MAAM;AAC5D;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAiC,QAAQ;AACtE;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAqB,OAAO;AAC9C;;AAEG;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AAC,eAAe,EAAE,eAAe,CAAC,EAAA,EAExD,IAAI,CAAC,KAAK,CACA,EACb,CAAA,CAAA,YAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,YAAY,EAAE,IAAI,CAAC,cAAc,EACjC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,OAAO,GAAG,MAAM,EAAE,EAClE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,EAAA,EAEf,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACF,CACT,EAEN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAClB,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAAS,MAAA,EAAA,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAE,CAAA,EAAA,EAC5C,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAAA,MAAA,EAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAA,CAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAA,CAAQ,CAC7E,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraSwitch","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/forms/cura-switch/cura-switch.scss?tag=cura-switch&encapsulation=shadow","src/components/forms/cura-switch/cura-switch.tsx"],"sourcesContent":["@import '../../../../src/scss/mixins/shadows.scss';\n@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n}\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n text-align: left;\n\n cursor: pointer;\n}\n\n.position {\n flex-direction: row;\n}\n\n.info {\n overflow: hidden;\n}\n\n.label,\n.message {\n text-align: left;\n}\n\n.control {\n width: fit-content;\n}\n\n/* Estilos para o controle de switch */\n.track {\n background: var(--neutral-dark-base);\n border-radius: 16px;\n transition: background-color 0.3s;\n align-items: flex-start;\n flex-shrink: 0;\n box-sizing: border-box;\n width: var(--size-track);\n height: var(--size);\n position: relative;\n}\n\n.thumb {\n background: var(--neutral-purewhite);\n border: 2px solid var(--neutral-darker-medium);\n border-radius: 50%;\n\n position: absolute;\n transition: transform 0.3s, outline 0.3s;\n display: inline-block;\n cursor: pointer;\n user-select: none;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* Estado \"checked\" */\n.checked .thumb {\n border-color: var(--color-dark);\n @include shadow-level3(--neutral-black-shadow);\n background: var(--neutral-purewhite);\n transform: translateX(var(--size)) translateY(-50%);\n}\n\n.checked .thumb:hover {\n background: var(--neutral-pale) !important;\n border-color: var(--neutral-darker-medium) !important;\n}\n\n.checked .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n.checked .track {\n background: var(--color-base-light);\n}\n\n/* Estado \"disabled\" */\n.disabled .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.disabled .thumb {\n background: var(--neutral-black-neutral-base) !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n cursor: not-allowed;\n}\n\n.disabled.checked .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.container.disabled .thumb:focus {\n outline: none !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n}\n\n/* Estado hover para não disabled e não checked */\n:not(.disabled):not(.checked) .thumb:hover {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n:not(.disabled):not(.checked) .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n/* Estado hover para não disabled */\n:not(.disabled) .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border: 2px solid var(--neutral-darker-medium);\n z-index: 1;\n}\n\n:not(.disabled) .checked .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border-color: var(--color-dark);\n}\n","import { Component, Prop, Event, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-switch',\n styleUrl: 'cura-switch.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSwitch {\n /**\n * Indicates whether the switch is checked or not.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Indicates whether the switch is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * The label text to display next to the switch.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Tab index for the switch element.\n * Reflects as an HTML attribute.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the switch.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Size of the switch.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background style of the switch.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Accent color of the switch.\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 @Event({ eventName: 'onchange', composed: true, cancelable: true, bubbles: true }) onchange: EventEmitter<{ checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 64 },\n medium: { size: 48 },\n small: { size: 40 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-track': `${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: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--neutral-medium', background: 'neutral-medium' },\n { name: '--neutral-pale', background: 'neutral-pale' },\n { name: '--neutral-dark-base', background: `neutral-${this.isDarkbackground() ? 'dark' : 'base'}` },\n { name: '--neutral-darker-medium', background: `neutral-${this.isDarkbackground() ? 'darker' : 'medium'}` },\n { name: '--neutral-black-neutral-pale', background: `${this.isDarkbackground() ? 'neutral-black' : 'neutral-pale'}` },\n { name: '--neutral-black-neutral-base', background: `${this.isDarkbackground() ? 'neutral-dark' : 'neutral-base'}` },\n { name: '--color-base-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color?.opacity);\n });\n this.styles = { ...this.styles };\n }\n\n connectedCallback() {\n this.sizeHandler();\n this.setColors();\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 }) {\n this.checked = state.value === 'true';\n this.internals.setFormValue(this.checked.toString());\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.checked.toString());\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 toggleSwitch = () => {\n if (this.disabled) return null;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.checked.toString());\n this.onchange.emit({ checked: this.checked });\n };\n\n assignColor(colorDark: string, colorLight: string) {\n if (this.disabled) return this.isDarkbackground() ? 'neutral-dark' : 'neutral-dark';\n return this.isDarkbackground() ? colorDark : colorLight;\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\n return classes;\n }\n\n render() {\n return (\n <Host role=\"switch\" aria-checked={this.checked} aria-disabled={this.disabled}>\n <div class={this.getClasses()} style={this.styles} onClick={this.toggleSwitch}>\n <div class=\"info\">\n <cura-label\n textOverflow={this.overflowLabel}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n class=\"label\"\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n lineHeight=\"125%\"\n color={this.assignColor('neutral-white', 'neutral-black')}\n >\n {this.label}\n </cura-label>\n <cura-label\n textOverflow={this.overflowHelper}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n color={this.assignColor('primary-lighter', 'neutral-dark')}\n size=\"xsmall\"\n class=\"message\"\n >\n <slot></slot>\n </cura-label>\n </div>\n\n <div class=\"control\">\n <div class={`track ${this.size.toLowerCase()}`}>\n <div class={`thumb ${this.size.toLowerCase()}`} tabIndex={this.ontabindex}></div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { l as labelSizes } from './
|
|
3
|
-
import { d as defineCustomElement$4 } from './
|
|
4
|
-
import { d as defineCustomElement$3 } from './
|
|
5
|
-
import { d as defineCustomElement$2 } from './
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-D1cPOZpG.js';
|
|
2
|
+
import { l as labelSizes } from './p-CHcd-uKK.js';
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-C72aF-gL.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './p-B5aO1chh.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-DR1RHrEX.js';
|
|
6
6
|
|
|
7
7
|
const curaTabsButtonCss = ":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;display:flex;align-items:center;justify-content:center;min-width:120px;width:fit-content;border:2px solid var(--border-color);border-radius:4px}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.selected),:host a:not(.selected){border:2px solid var(--border-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button cura-badge-counter,:host a cura-badge-counter{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{border-color:transparent;background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.disabled:not(.selected),:host a.disabled:not(.selected){border-color:var(--neutral-dark)}";
|
|
8
|
-
const CuraTabsButtonStyle0 = curaTabsButtonCss;
|
|
9
8
|
|
|
10
|
-
const CuraTabs = /*@__PURE__*/ proxyCustomElement(class CuraTabs extends
|
|
9
|
+
const CuraTabs = /*@__PURE__*/ proxyCustomElement(class CuraTabs extends H {
|
|
11
10
|
constructor() {
|
|
12
11
|
super();
|
|
13
12
|
this.__registerHost();
|
|
14
13
|
this.__attachShadow();
|
|
15
|
-
this.tabSelect = createEvent(this, "tabSelect"
|
|
16
|
-
this.name = undefined;
|
|
17
|
-
this.iconName = undefined;
|
|
14
|
+
this.tabSelect = createEvent(this, "tabSelect");
|
|
18
15
|
this.counter = 1;
|
|
19
16
|
this.selected = false;
|
|
20
17
|
this.disabled = false;
|
|
@@ -99,7 +96,7 @@ const CuraTabs = /*@__PURE__*/ proxyCustomElement(class CuraTabs extends HTMLEle
|
|
|
99
96
|
static get watchers() { return {
|
|
100
97
|
"colorMode": ["setColors"]
|
|
101
98
|
}; }
|
|
102
|
-
static get style() { return
|
|
99
|
+
static get style() { return curaTabsButtonCss; }
|
|
103
100
|
}, [1, "cura-tabs-button", {
|
|
104
101
|
"name": [513],
|
|
105
102
|
"iconName": [513, "icon-name"],
|
|
@@ -146,5 +143,6 @@ const CuraTabsButton = CuraTabs;
|
|
|
146
143
|
const defineCustomElement = defineCustomElement$1;
|
|
147
144
|
|
|
148
145
|
export { CuraTabsButton, defineCustomElement };
|
|
146
|
+
//# sourceMappingURL=cura-tabs-button.js.map
|
|
149
147
|
|
|
150
148
|
//# sourceMappingURL=cura-tabs-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-tabs-button.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAAG,m8DAAm8D,
|
|
1
|
+
{"file":"cura-tabs-button.js","mappings":";;;;;;AAAA,MAAM,iBAAiB,GAA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AAA,IAAI,CAAC,QAAQ,EAAiB,eAAA,EAAA,IAAI,CAAC,QAAQ,EAAA,EAC3E,CACE,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC9C,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,EAE7C,IAAI,CAAC,OAAO,EAAE,EACf,CAAA,CAAA,YAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAY,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,EAAC,WAAW,EAAC,GAAG,EAAA,EAC5E,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACF,EACZ,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAC/B,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/tabs/cura-tabs-button/cura-tabs-button.scss?tag=cura-tabs-button&encapsulation=shadow","src/components/tabs/cura-tabs-button/cura-tabs-button.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n@import '../../../scss/mixins/buttons.scss';\n\n$button-sizes: (\n small: $spacing-mini $spacing-mini,\n medium: $spacing-xxxs $spacing-xxxs,\n large: $spacing-xxxs $spacing-xxs,\n);\n\n:host {\n button,\n a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-width: 120px;\n width: fit-content;\n\n border: 2px solid var(--border-color);\n border-radius: 4px;\n\n &:not(.selected) {\n border: 2px solid var(--border-color);\n }\n\n &:not(.disabled, .selected):hover {\n background-color: var(--background-color-hover);\n\n &.dark {\n border-color: var(--neutral-purewhite);\n }\n }\n\n @each $size, $padding in $button-sizes {\n &.#{$size} {\n padding: $padding;\n }\n }\n\n &:focus {\n border-color: var(--primary-light);\n }\n\n cura-icon {\n margin-right: #{$spacing-mini};\n }\n\n cura-badge-counter {\n margin-left: #{$spacing-mini};\n }\n\n @include button-selected() {\n background-color: var(--background-color-selected);\n\n &.disabled {\n border-color: transparent;\n background-color: var(--background-disabled-selected);\n }\n }\n\n &.disabled {\n &:not(.selected) {\n border-color: var(--neutral-dark);\n }\n\n cursor: not-allowed;\n }\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { labelSizes } from '../cura-tabs.definitions';\n\n@Component({\n tag: 'cura-tabs-button',\n styleUrl: 'cura-tabs-button.scss',\n shadow: true,\n})\nexport class CuraTabs {\n @Prop({ reflect: true }) name: string;\n @Prop({ reflect: true }) iconName: string;\n @Prop({ reflect: true, mutable: true }) counter?: number = 1;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n @Prop({ reflect: true, mutable: true }) colorMode: 'dark' | 'light' = 'light';\n\n @State() hovered = false;\n @State() styles: Record<string, string> = {};\n\n @Event() tabSelect: EventEmitter<{ name: string }>;\n\n @Watch('colorMode')\n setColors() {\n const colors = [\n { name: '--background-color-selected', theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light' },\n { name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-light' : null },\n {\n name: '--background-disabled-selected',\n theme: this.colorMode === 'light' ? 'neutral-white' : 'neutral-black',\n },\n {\n name: '--border-color',\n theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light',\n },\n ];\n\n colors.forEach(c => {\n if (c.theme) this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);\n });\n\n this.styles = { ...this.styles };\n }\n\n computeContentColor(): string {\n if (this.disabled) return 'neutral-dark';\n\n if (this.colorMode === 'dark') {\n if (this.hovered && !this.selected) {\n return 'neutral-purewhite';\n }\n return this.selected ? 'neutral-black' : 'primary-lighter';\n }\n\n return this.selected ? 'neutral-purewhite' : 'primary-dark';\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n const iconColor = this.computeContentColor();\n\n return <cura-icon name={this.iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n getClasses() {\n return {\n [this.size]: true,\n [this.colorMode]: true,\n selected: this.selected,\n disabled: this.disabled,\n };\n }\n\n getCounter() {\n return <cura-badge-counter number={this.counter} color=\"primary\" disabled={this.disabled} class=\"badge-number\"></cura-badge-counter>;\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'),\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-dark': window.CuraAPI.theme.colors.getColor('neutral-dark'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this.selected = !this.selected;\n this.tabSelect.emit({ name: this.name });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n const labelColor = this.computeContentColor();\n\n return (\n <Host role=\"button\" aria-pressed={this.selected} aria-disabled={this.disabled}>\n <button\n class={this.getClasses()}\n style={this.styles}\n onClick={e => this.handleClick(e)}\n disabled={this.disabled}\n onMouseEnter={this.handleMouseEnter.bind(this)}\n onMouseLeave={this.handleMouseLeave.bind(this)}\n >\n {this.getIcon()}\n <cura-label size={labelSize} color={labelColor} lineHeight=\"0\" marginBlock=\"0\">\n <slot></slot>\n </cura-label>\n {this.counter > 0 && this.getCounter()}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-D1cPOZpG.js';
|
|
2
2
|
|
|
3
3
|
const curaTabsGroupCss = ":host{display:flex;gap:var(--gap)}:host(.border-bottom){position:relative}:host(.border-bottom)::after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--border-color);z-index:0}::slotted(cura-tabs),::slotted(cura-tabs-transparent){position:relative;z-index:1}";
|
|
4
|
-
const CuraTabsGroupStyle0 = curaTabsGroupCss;
|
|
5
4
|
|
|
6
|
-
const CuraTabsGroup$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabsGroup extends
|
|
5
|
+
const CuraTabsGroup$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabsGroup extends H {
|
|
7
6
|
constructor() {
|
|
8
7
|
super();
|
|
9
8
|
this.__registerHost();
|
|
10
9
|
this.__attachShadow();
|
|
11
|
-
this.tabChange = createEvent(this, "tabChange"
|
|
10
|
+
this.tabChange = createEvent(this, "tabChange");
|
|
12
11
|
this.gap = 0;
|
|
13
12
|
this.borderBottom = true;
|
|
14
13
|
this.colorMode = 'light';
|
|
@@ -35,7 +34,7 @@ const CuraTabsGroup$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabsGroup ext
|
|
|
35
34
|
return (h(Host, { key: 'fb6a6ae52fd5bdfb8c3978a75f26be87479ccafa', role: "tablist", style: this.styles, class: this.getClasses() }, h("slot", { key: 'afca97b27c8359f8236331257e4db41f1332e071' })));
|
|
36
35
|
}
|
|
37
36
|
get host() { return this; }
|
|
38
|
-
static get style() { return
|
|
37
|
+
static get style() { return curaTabsGroupCss; }
|
|
39
38
|
}, [1, "cura-tabs-group", {
|
|
40
39
|
"gap": [514],
|
|
41
40
|
"borderBottom": [1540, "border-bottom"],
|
|
@@ -60,5 +59,6 @@ const CuraTabsGroup = CuraTabsGroup$1;
|
|
|
60
59
|
const defineCustomElement = defineCustomElement$1;
|
|
61
60
|
|
|
62
61
|
export { CuraTabsGroup, defineCustomElement };
|
|
62
|
+
//# sourceMappingURL=cura-tabs-group.js.map
|
|
63
63
|
|
|
64
64
|
//# sourceMappingURL=cura-tabs-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-tabs-group.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,sSAAsS,
|
|
1
|
+
{"file":"cura-tabs-group.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,sSAAsS;;MCOlTA,eAAa,iBAAAC,kBAAA,CAAA,MAAA,aAAA,SAAAC,CAAA,CAAA;AAL1B,IAAA,WAAA,GAAA;;;;;AAM2B,QAAA,IAAG,CAAA,GAAA,GAAW,CAAC;AACA,QAAA,IAAY,CAAA,YAAA,GAAY,IAAI;AAC5B,QAAA,IAAS,CAAA,SAAA,GAAqB,OAAO;AAEpE,QAAA,IAAM,CAAA,MAAA,GAA2B,EAAE;AAwC7C;AAjCC,IAAA,eAAe,CAAC,EAAiC,EAAA;QAC/C,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;;AAGxC,IAAA,iBAAiB,CAAC,KAAa,EAAA;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,oDAAoD,CAAC;AAE7F,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,GAAwB,KAAI;YACxC,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,IAAI,KAAK,KAAK;AACnC,SAAC,CAAC;;IAGJ,UAAU,GAAA;QACR,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,YAAY;SACnC;;IAGH,iBAAiB,GAAA;QACf,IAAI,CAAC,MAAM,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACN,IAAI,CAAC,MAAM,KACd,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,KAAK,OAAO,GAAG,cAAc,GAAG,cAAc,CAAC,EACpH,OAAO,EAAE,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,EAAA,CAAI,GACzB;;IAGH,MAAM,GAAA;AACJ,QAAA,QACE,CAAC,CAAA,IAAI,qDAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAA,EAC/D,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraTabsGroup","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/tabs/cura-tabs-group/cura-tabs-group.scss?tag=cura-tabs-group&encapsulation=shadow","src/components/tabs/cura-tabs-group/cura-tabs-group.tsx"],"sourcesContent":[":host {\n display: flex;\n gap: var(--gap);\n}\n\n:host(.border-bottom) {\n position: relative;\n}\n\n:host(.border-bottom)::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--border-color);\n z-index: 0;\n}\n\n::slotted(cura-tabs),\n::slotted(cura-tabs-transparent) {\n position: relative;\n z-index: 1;\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-tabs-group',\n styleUrl: 'cura-tabs-group.scss',\n shadow: true,\n})\nexport class CuraTabsGroup {\n @Prop({ reflect: true }) gap: number = 0;\n @Prop({ reflect: true, mutable: true }) borderBottom: boolean = true;\n @Prop({ reflect: true, mutable: true }) colorMode: 'dark' | 'light' = 'light';\n\n @State() styles: Record<string, string> = {};\n\n @Element() host: HTMLElement;\n\n @Event() tabChange: EventEmitter<string>;\n\n @Listen('tabSelect')\n handleTabSelect(ev: CustomEvent<{ name: string }>) {\n this.updateSelectedTab(ev.detail.name);\n }\n\n updateSelectedTab(value: string) {\n const tabs = this.host.querySelectorAll('cura-tabs, cura-tabs-transparent, cura-tabs-button');\n\n tabs.forEach((tab: HTMLCuraTabsElement) => {\n tab.selected = tab.name === value;\n });\n }\n\n getClasses() {\n return {\n 'border-bottom': this.borderBottom,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--border-color': window.CuraAPI.theme.colors.getColor(this.colorMode === 'light' ? 'neutral-base' : 'primary-base'),\n '--gap': `${this.gap}px`,\n };\n }\n\n render() {\n return (\n <Host role=\"tablist\" style={this.styles} class={this.getClasses()}>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { l as labelSizes } from './
|
|
3
|
-
import { d as defineCustomElement$3 } from './
|
|
4
|
-
import { d as defineCustomElement$2 } from './
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-D1cPOZpG.js';
|
|
2
|
+
import { l as labelSizes } from './p-CHcd-uKK.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './p-B5aO1chh.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './p-DR1RHrEX.js';
|
|
5
5
|
|
|
6
6
|
const curaTabsTransparentCss = ":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:not(.selected),:host a:not(.selected){border-color:var(--border-color)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer}:host button.selected:not(.disabled),:host a.selected:not(.disabled){border-bottom:1px solid var(--border-bottom-color-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}";
|
|
7
|
-
const CuraTabsTransparentStyle0 = curaTabsTransparentCss;
|
|
8
7
|
|
|
9
|
-
const CuraTabsTransparent$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabsTransparent extends
|
|
8
|
+
const CuraTabsTransparent$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabsTransparent extends H {
|
|
10
9
|
constructor() {
|
|
11
10
|
super();
|
|
12
11
|
this.__registerHost();
|
|
13
12
|
this.__attachShadow();
|
|
14
|
-
this.tabSelect = createEvent(this, "tabSelect"
|
|
15
|
-
this.name = undefined;
|
|
16
|
-
this.iconName = undefined;
|
|
13
|
+
this.tabSelect = createEvent(this, "tabSelect");
|
|
17
14
|
this.selected = false;
|
|
18
15
|
this.disabled = false;
|
|
19
16
|
this.borderBottom = true;
|
|
@@ -97,7 +94,7 @@ const CuraTabsTransparent$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabsTra
|
|
|
97
94
|
static get watchers() { return {
|
|
98
95
|
"colorMode": ["setColors"]
|
|
99
96
|
}; }
|
|
100
|
-
static get style() { return
|
|
97
|
+
static get style() { return curaTabsTransparentCss; }
|
|
101
98
|
}, [1, "cura-tabs-transparent", {
|
|
102
99
|
"name": [513],
|
|
103
100
|
"iconName": [513, "icon-name"],
|
|
@@ -139,5 +136,6 @@ const CuraTabsTransparent = CuraTabsTransparent$1;
|
|
|
139
136
|
const defineCustomElement = defineCustomElement$1;
|
|
140
137
|
|
|
141
138
|
export { CuraTabsTransparent, defineCustomElement };
|
|
139
|
+
//# sourceMappingURL=cura-tabs-transparent.js.map
|
|
142
140
|
|
|
143
141
|
//# sourceMappingURL=cura-tabs-transparent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-tabs-transparent.js","mappings":";;;;;AAAA,MAAM,sBAAsB,GAAG,kuDAAkuD,
|
|
1
|
+
{"file":"cura-tabs-transparent.js","mappings":";;;;;AAAA,MAAM,sBAAsB,GAAG,kuDAAkuD;;MCQpvDA,qBAAmB,iBAAAC,kBAAA,CAAA,MAAA,mBAAA,SAAAC,CAAA,CAAA;AALhC,IAAA,WAAA,GAAA;;;;;AAQ0C,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzB,QAAA,IAAY,CAAA,YAAA,GAAY,IAAI;AAC3C,QAAA,IAAI,CAAA,IAAA,GAAiC,OAAO;AAC7B,QAAA,IAAS,CAAA,SAAA,GAAqB,OAAO;AAEpE,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AACf,QAAA,IAAM,CAAA,MAAA,GAA2B,EAAE;AA+G7C;IA1GC,SAAS,GAAA;AACP,QAAA,MAAM,MAAM,GAAG;AACb,YAAA;AACE,gBAAA,IAAI,EAAE,uBAAuB;AAC7B,gBAAA,KAAK,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,GAAG,cAAc,GAAG,SAAS;AAC/D,aAAA;AACD,YAAA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UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC;AAChE,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,EAAE;AAE7C,QAAA,QACE,CAAA,CAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,IAAI,EAAC,QAAQ,EAAe,cAAA,EAAA,IAAI,CAAC,QAAQ,EAAiB,eAAA,EAAA,IAAI,CAAC,QAAQ,EAAA,EAC3E,CACE,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC9C,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAA,EAE7C,IAAI,CAAC,OAAO,EAAE,EACf,CAAA,CAAA,YAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAY,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,EAAC,WAAW,EAAC,GAAG,EAAA,EAC5E,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACF,CACN,CACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraTabsTransparent","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/tabs/cura-tabs-transparent/cura-tabs-transparent.scss?tag=cura-tabs-transparent&encapsulation=shadow","src/components/tabs/cura-tabs-transparent/cura-tabs-transparent.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n@import '../../../scss/mixins/buttons.scss';\n\n$button-sizes: (\n small: $spacing-mini $spacing-mini,\n medium: $spacing-xxxs $spacing-xxxs,\n large: $spacing-xxxs $spacing-xxs,\n);\n\n:host {\n button,\n a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n min-width: 120px;\n width: fit-content;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.border-bottom {\n border-bottom: 1px solid var(--border-bottom-color);\n }\n\n @each $size, $padding in $button-sizes {\n &.#{$size} {\n padding: $padding;\n }\n }\n\n &:not(.selected) {\n border-color: var(--border-color);\n }\n\n &:focus {\n border-color: var(--primary-light);\n }\n\n &:not(.disabled, .selected):hover {\n background-color: var(--background-color-hover);\n\n &.dark {\n border-color: var(--neutral-purewhite);\n }\n }\n\n cura-icon {\n margin-right: #{$spacing-mini};\n }\n\n @include button-selected() {\n &:not(.disabled) {\n border-bottom: 1px solid var(--border-bottom-color-selected);\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n }\n }\n }\n}\n","import { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { labelSizes } from '../cura-tabs.definitions';\n\n@Component({\n tag: 'cura-tabs-transparent',\n styleUrl: 'cura-tabs-transparent.scss',\n shadow: true,\n})\nexport class CuraTabsTransparent {\n @Prop({ reflect: true }) name: string;\n @Prop({ reflect: true }) iconName: string;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\n @Prop({ reflect: true, mutable: true }) borderBottom: boolean = true;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n @Prop({ reflect: true, mutable: true }) colorMode: 'dark' | 'light' = 'light';\n\n @State() hovered = false;\n @State() styles: Record<string, string> = {};\n\n @Event() tabSelect: EventEmitter<{ name: string }>;\n\n @Watch('colorMode')\n setColors() {\n const colors = [\n {\n name: '--border-bottom-color',\n theme: this.colorMode === 'light' ? 'neutral-base' : 'primary',\n },\n {\n name: '--border-bottom-color-selected',\n theme: this.colorMode === 'light' ? 'primary-dark' : 'primary-lighter',\n },\n ];\n\n colors.forEach(c => {\n if (c.theme) this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);\n });\n\n this.styles = { ...this.styles };\n }\n\n computeContentColor(): string {\n if (this.disabled) return 'neutral-dark';\n\n if (this.colorMode === 'dark') {\n if (this.hovered && !this.selected) {\n return 'neutral-purewhite';\n }\n return this.selected ? 'primary-lighter' : 'neutral-purewhite';\n }\n\n if (this.hovered && !this.selected) {\n return 'primary-dark';\n }\n\n return this.selected ? 'primary-base' : 'neutral-black';\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n const iconColor = this.computeContentColor();\n\n return <cura-icon name={this.iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n getClasses() {\n return {\n [this.size]: true,\n [this.colorMode]: true,\n 'selected': this.selected,\n 'disabled': this.disabled,\n 'border-bottom': this.borderBottom,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'),\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this.selected = !this.selected;\n this.tabSelect.emit({ name: this.name });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n const labelColor = this.computeContentColor();\n\n return (\n <Host role=\"button\" aria-pressed={this.selected} aria-disabled={this.disabled}>\n <button\n class={this.getClasses()}\n style={this.styles}\n onClick={e => this.handleClick(e)}\n disabled={this.disabled}\n onMouseEnter={this.handleMouseEnter.bind(this)}\n onMouseLeave={this.handleMouseLeave.bind(this)}\n >\n {this.getIcon()}\n <cura-label size={labelSize} color={labelColor} lineHeight=\"0\" marginBlock=\"0\">\n <slot></slot>\n </cura-label>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { proxyCustomElement,
|
|
2
|
-
import { l as labelSizes } from './
|
|
3
|
-
import { d as defineCustomElement$3 } from './
|
|
4
|
-
import { d as defineCustomElement$2 } from './
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-D1cPOZpG.js';
|
|
2
|
+
import { l as labelSizes } from './p-CHcd-uKK.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './p-B5aO1chh.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './p-DR1RHrEX.js';
|
|
5
5
|
|
|
6
6
|
const curaTabsCss = ":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center;border-radius:4px 4px 0 0}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.light,:host a:not(.disabled,.selected):hover.light{border-bottom-color:var(--primary-dark)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-bottom-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border:2px solid var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}";
|
|
7
|
-
const CuraTabsStyle0 = curaTabsCss;
|
|
8
7
|
|
|
9
|
-
const CuraTabs$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabs extends
|
|
8
|
+
const CuraTabs$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabs extends H {
|
|
10
9
|
constructor() {
|
|
11
10
|
super();
|
|
12
11
|
this.__registerHost();
|
|
13
12
|
this.__attachShadow();
|
|
14
|
-
this.tabSelect = createEvent(this, "tabSelect"
|
|
15
|
-
this.name = undefined;
|
|
16
|
-
this.iconName = undefined;
|
|
13
|
+
this.tabSelect = createEvent(this, "tabSelect");
|
|
17
14
|
this.selected = false;
|
|
18
15
|
this.disabled = false;
|
|
19
16
|
this.borderBottom = true;
|
|
@@ -102,7 +99,7 @@ const CuraTabs$1 = /*@__PURE__*/ proxyCustomElement(class CuraTabs extends HTMLE
|
|
|
102
99
|
static get watchers() { return {
|
|
103
100
|
"colorMode": ["setColors"]
|
|
104
101
|
}; }
|
|
105
|
-
static get style() { return
|
|
102
|
+
static get style() { return curaTabsCss; }
|
|
106
103
|
}, [1, "cura-tabs", {
|
|
107
104
|
"name": [513],
|
|
108
105
|
"iconName": [513, "icon-name"],
|
|
@@ -144,5 +141,6 @@ const CuraTabs = CuraTabs$1;
|
|
|
144
141
|
const defineCustomElement = defineCustomElement$1;
|
|
145
142
|
|
|
146
143
|
export { CuraTabs, defineCustomElement };
|
|
144
|
+
//# sourceMappingURL=cura-tabs.js.map
|
|
147
145
|
|
|
148
146
|
//# sourceMappingURL=cura-tabs.js.map
|