@rededor/cura 1.7.1 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cura-accordion_20.cjs.entry.js +484 -137
- package/dist/cjs/cura-accordion_20.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +9 -12
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-counter.cjs.entry.js +16 -8
- package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-counter.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-dot.cjs.entry.js +14 -5
- package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-dot.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-badge-pill.cjs.entry.js +23 -7
- package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-pill.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +46 -8
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-outline.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-button-select.cjs.entry.js +7 -12
- package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-select.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-button.definitions-f036371c.js → cura-button.definitions-B3SK8MaV.js} +2 -1
- package/dist/cjs/cura-button.definitions-B3SK8MaV.js.map +1 -0
- package/dist/cjs/cura-calendar.cjs.entry.js +203 -94
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-calendar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-card.cjs.entry.js +34 -6
- package/dist/cjs/cura-card.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-card.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-checkbox.cjs.entry.js +72 -20
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +25 -7
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-display.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +5 -6
- package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-dropdown-search-not-found.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-forms.definitions-c164f1b8.js → cura-forms.definitions-DVLuO67c.js} +2 -1
- package/dist/cjs/cura-forms.definitions-DVLuO67c.js.map +1 -0
- package/dist/cjs/{cura-icon.definitions-5223028b.js → cura-icon.definitions-DT0wF67y.js} +2 -1
- package/dist/cjs/cura-icon.definitions-DT0wF67y.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +7 -8
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-icons-view.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-input-date.cjs.entry.js +32 -15
- package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-input-date.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-loader-bar.cjs.entry.js +4 -5
- package/dist/cjs/cura-loader-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-loader-bar.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-modal.cjs.entry.js +46 -15
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-modal.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar.cura-stepper-item.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js +25 -15
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.cjs.entry.js +73 -21
- package/dist/cjs/cura-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-stepper.cjs.entry.js +23 -6
- package/dist/cjs/cura-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-stepper.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +61 -18
- package/dist/cjs/cura-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-switch.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-button.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-button.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-button.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js +6 -9
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-transparent.entry.cjs.js.map +1 -0
- package/dist/cjs/{cura-tabs.definitions-b8955ad4.js → cura-tabs.definitions-CGqqGE2e.js} +2 -1
- package/dist/cjs/cura-tabs.definitions-CGqqGE2e.js.map +1 -0
- package/dist/cjs/{cura-theme-module-09bb63a4.js → cura-theme-module-CJkmAxBA.js} +94 -9
- package/dist/cjs/cura-theme-module-CJkmAxBA.js.map +1 -0
- package/dist/cjs/cura-toast.cjs.entry.js +8 -11
- package/dist/cjs/cura-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-toast.entry.cjs.js.map +1 -0
- package/dist/cjs/cura-tooltip.cjs.entry.js +9 -11
- package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/cura.cjs.js +9 -10
- package/dist/cjs/cura.cjs.js.map +1 -1
- package/dist/cjs/{index-60783089.js → index-BK9MSAiE.js} +947 -289
- package/dist/cjs/index-BK9MSAiE.js.map +1 -0
- package/dist/cjs/{index-6dc29195.js → index-EyP6Zlkd.js} +2 -1
- package/dist/cjs/index-EyP6Zlkd.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +5 -8
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +57 -18
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +45 -9
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +24 -7
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +8 -4
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js +19 -3
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js.map +1 -1
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +40 -9
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.js +86 -17
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +86 -17
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +25 -13
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +81 -16
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +19 -11
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
- package/dist/collection/components/cura-avatar/cura-avatar.js +48 -13
- package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.js +196 -24
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
- package/dist/collection/components/cura-card/cura-card.js +48 -7
- package/dist/collection/components/cura-card/cura-card.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +31 -9
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +91 -28
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +15 -6
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.css +0 -1
- package/dist/collection/components/cura-modal/cura-modal.js +65 -17
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js +3 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +21 -8
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +26 -9
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js.map +1 -1
- package/dist/collection/components/cura-stepper/cura-stepper.js +34 -6
- package/dist/collection/components/cura-stepper/cura-stepper.js.map +1 -1
- package/dist/collection/components/cura-toast/cura-toast.js +24 -12
- package/dist/collection/components/cura-toast/cura-toast.js.map +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +25 -12
- package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +114 -29
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.css +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +74 -16
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +13 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +132 -28
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +46 -9
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +109 -28
- package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +113 -33
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +13 -6
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js.map +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.js +85 -21
- package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +6 -2
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +14 -4
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +21 -9
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +9 -3
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +21 -9
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +39 -8
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +53 -10
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +39 -8
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/components/cura-accordion-item.js +24 -6
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-accordion.js +34 -13
- package/dist/components/cura-accordion.js.map +1 -1
- package/dist/components/cura-alert.js +12 -14
- package/dist/components/cura-alert.js.map +1 -1
- package/dist/components/cura-avatar.js +25 -8
- package/dist/components/cura-avatar.js.map +1 -1
- package/dist/components/cura-badge-counter.js +2 -1
- package/dist/components/cura-badge-distance.js +7 -7
- package/dist/components/cura-badge-distance.js.map +1 -1
- package/dist/components/cura-badge-dot.js +14 -4
- package/dist/components/cura-badge-dot.js.map +1 -1
- package/dist/components/cura-badge-pill.js +2 -1
- package/dist/components/cura-button-outline.js +49 -10
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-select.js +10 -14
- package/dist/components/cura-button-select.js.map +1 -1
- package/dist/components/cura-button-transparent.js +2 -1
- package/dist/components/cura-button.js +49 -10
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-calendar.js +2 -1
- package/dist/components/cura-card.js +34 -5
- package/dist/components/cura-card.js.map +1 -1
- package/dist/components/cura-checkbox.js +75 -22
- package/dist/components/cura-checkbox.js.map +1 -1
- package/dist/components/cura-display.js +25 -6
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-dropdown-search-category.js +5 -5
- package/dist/components/cura-dropdown-search-category.js.map +1 -1
- package/dist/components/cura-dropdown-search-not-found.js +6 -6
- package/dist/components/cura-dropdown-search-not-found.js.map +1 -1
- package/dist/components/cura-dropdown-search-option.js +22 -10
- package/dist/components/cura-dropdown-search-option.js.map +1 -1
- package/dist/components/cura-dropdown-search.js +66 -27
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-heading.js +2 -1
- package/dist/components/cura-icon.js +2 -1
- package/dist/components/cura-icons-view.js +9 -9
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-input-date.js +40 -21
- package/dist/components/cura-input-date.js.map +1 -1
- package/dist/components/cura-input-text.js +2 -1
- package/dist/components/cura-label.js +2 -1
- package/dist/components/cura-loader-bar.js +2 -1
- package/dist/components/cura-loader-circle.js +2 -1
- package/dist/components/cura-modal.js +50 -18
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-page-template.js +4 -4
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +2 -1
- package/dist/components/cura-progress-bar.js +2 -1
- package/dist/components/cura-radio.js +75 -22
- package/dist/components/cura-radio.js.map +1 -1
- package/dist/components/cura-select-option.js +2 -1
- package/dist/components/cura-select.js +2 -1
- package/dist/components/cura-stepper-item.js +2 -1
- package/dist/components/cura-stepper.js +30 -12
- package/dist/components/cura-stepper.js.map +1 -1
- package/dist/components/cura-switch.js +62 -18
- package/dist/components/cura-switch.js.map +1 -1
- package/dist/components/cura-tabs-button.js +9 -11
- package/dist/components/cura-tabs-button.js.map +1 -1
- package/dist/components/cura-tabs-group.js +5 -5
- package/dist/components/cura-tabs-group.js.map +1 -1
- package/dist/components/cura-tabs-transparent.js +8 -10
- package/dist/components/cura-tabs-transparent.js.map +1 -1
- package/dist/components/cura-tabs.js +8 -10
- package/dist/components/cura-tabs.js.map +1 -1
- package/dist/components/cura-toast.js +12 -14
- package/dist/components/cura-toast.js.map +1 -1
- package/dist/components/cura-tooltip.js +15 -16
- package/dist/components/cura-tooltip.js.map +1 -1
- package/dist/components/index.js +3 -547
- package/dist/components/index.js.map +1 -1
- package/dist/components/{cura-icon2.js → p-B5aO1chh.js} +5 -6
- package/dist/components/p-B5aO1chh.js.map +1 -0
- package/dist/components/{cura-calendar2.js → p-BGnJiNyu.js} +210 -100
- package/dist/components/p-BGnJiNyu.js.map +1 -0
- package/dist/components/{cura-heading2.js → p-BHEafDKD.js} +34 -7
- package/dist/components/p-BHEafDKD.js.map +1 -0
- package/dist/components/{cura-button-transparent2.js → p-BRDqwZ4N.js} +48 -11
- package/dist/components/p-BRDqwZ4N.js.map +1 -0
- package/dist/{esm/cura-button.definitions-617d3bad.js → components/p-BSI2FkNn.js} +2 -1
- package/dist/components/p-BSI2FkNn.js.map +1 -0
- package/dist/components/{cura-select2.js → p-BTt-pVTn.js} +86 -30
- package/dist/components/p-BTt-pVTn.js.map +1 -0
- package/dist/components/{cura-badge-counter2.js → p-C72aF-gL.js} +18 -9
- package/dist/components/p-C72aF-gL.js.map +1 -0
- package/dist/components/{cura-tabs.definitions.js → p-CHcd-uKK.js} +2 -1
- package/dist/components/p-CHcd-uKK.js.map +1 -0
- package/dist/components/p-D1cPOZpG.js +2617 -0
- package/dist/components/p-D1cPOZpG.js.map +1 -0
- package/dist/components/{cura-paragraph2.js → p-DI4g-ZH4.js} +26 -7
- package/dist/components/p-DI4g-ZH4.js.map +1 -0
- package/dist/components/{cura-label2.js → p-DR1RHrEX.js} +30 -7
- package/dist/components/p-DR1RHrEX.js.map +1 -0
- package/dist/components/{cura-stepper-item2.js → p-DaPc6Dxl.js} +23 -14
- package/dist/components/p-DaPc6Dxl.js.map +1 -0
- package/dist/components/{cura-forms.definitions.js → p-Dot54hbB.js} +2 -1
- package/dist/components/p-Dot54hbB.js.map +1 -0
- package/dist/components/{cura-select-option2.js → p-DpIu_Oxz.js} +8 -9
- package/dist/components/p-DpIu_Oxz.js.map +1 -0
- package/dist/components/{cura-loader-circle2.js → p-Dqm2sAwv.js} +13 -7
- package/dist/components/p-Dqm2sAwv.js.map +1 -0
- package/dist/components/{cura-progress-bar2.js → p-FTSrgi0q.js} +11 -8
- package/dist/components/p-FTSrgi0q.js.map +1 -0
- package/dist/components/{cura-loader-bar2.js → p-KIQMkSRF.js} +5 -5
- package/dist/components/p-KIQMkSRF.js.map +1 -0
- package/dist/components/{cura-badge-pill2.js → p-cOEGtL9C.js} +26 -9
- package/dist/components/p-cOEGtL9C.js.map +1 -0
- package/dist/components/{cura-input-text2.js → p-zz_zOPBZ.js} +75 -102
- package/dist/components/p-zz_zOPBZ.js.map +1 -0
- package/dist/cura/cura-alert.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-counter.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-dot.entry.esm.js.map +1 -0
- package/dist/cura/cura-badge-pill.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-outline.entry.esm.js.map +1 -0
- package/dist/cura/cura-button-select.entry.esm.js.map +1 -0
- package/dist/cura/{p-12a4ae7e.entry.js.map → cura-calendar.entry.esm.js.map} +1 -1
- package/dist/cura/{p-53d68d72.entry.js.map → cura-card.entry.esm.js.map} +1 -1
- package/dist/cura/cura-checkbox.entry.esm.js.map +1 -0
- package/dist/cura/cura-display.entry.esm.js.map +1 -0
- package/dist/cura/cura-dropdown-search-not-found.entry.esm.js.map +1 -0
- package/dist/cura/cura-icons-view.entry.esm.js.map +1 -0
- package/dist/cura/cura-input-date.entry.esm.js.map +1 -0
- package/dist/cura/cura-loader-bar.entry.esm.js.map +1 -0
- package/dist/cura/{p-1ef21ae9.entry.js.map → cura-modal.entry.esm.js.map} +1 -1
- package/dist/cura/cura-progress-bar.cura-stepper-item.entry.esm.js.map +1 -0
- package/dist/cura/cura-radio.entry.esm.js.map +1 -0
- package/dist/cura/cura-stepper.entry.esm.js.map +1 -0
- package/dist/cura/cura-switch.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-button.entry.esm.js.map +1 -0
- package/dist/cura/cura-tabs-transparent.entry.esm.js.map +1 -0
- package/dist/cura/cura-toast.entry.esm.js.map +1 -0
- package/dist/cura/cura-tooltip.entry.esm.js.map +1 -0
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/loader.esm.js.map +1 -0
- package/dist/cura/p-077019da.entry.js +2 -0
- package/dist/cura/p-077019da.entry.js.map +1 -0
- package/dist/cura/p-07783235.entry.js +2 -0
- package/dist/cura/p-07783235.entry.js.map +1 -0
- package/dist/cura/p-090e297c.entry.js +2 -0
- package/dist/cura/p-090e297c.entry.js.map +1 -0
- package/dist/cura/p-16c0b52c.entry.js +2 -0
- package/dist/cura/p-16c0b52c.entry.js.map +1 -0
- package/dist/cura/p-2632183e.entry.js +2 -0
- package/dist/cura/p-2632183e.entry.js.map +1 -0
- package/dist/cura/p-32015dcc.entry.js +2 -0
- package/dist/cura/p-32015dcc.entry.js.map +1 -0
- package/dist/cura/p-32f94709.entry.js +2 -0
- package/dist/cura/p-32f94709.entry.js.map +1 -0
- package/dist/cura/p-3d6040e2.entry.js +2 -0
- package/dist/cura/p-3d6040e2.entry.js.map +1 -0
- package/dist/cura/p-4ac578a6.entry.js +2 -0
- package/dist/cura/p-4ac578a6.entry.js.map +1 -0
- package/dist/cura/p-4bde448e.entry.js +2 -0
- package/dist/cura/p-4bde448e.entry.js.map +1 -0
- package/dist/cura/p-6feba852.entry.js +2 -0
- package/dist/cura/p-6feba852.entry.js.map +1 -0
- package/dist/cura/p-7586fd07.entry.js +2 -0
- package/dist/cura/p-7586fd07.entry.js.map +1 -0
- package/dist/cura/p-76cbb798.entry.js +2 -0
- package/dist/cura/p-76cbb798.entry.js.map +1 -0
- package/dist/cura/p-7fd143aa.entry.js +2 -0
- package/dist/cura/p-7fd143aa.entry.js.map +1 -0
- package/dist/cura/p-8c83f259.entry.js +2 -0
- package/dist/cura/p-8c83f259.entry.js.map +1 -0
- package/dist/cura/p-95cd7918.entry.js +2 -0
- package/dist/cura/p-95cd7918.entry.js.map +1 -0
- package/dist/cura/{p-272c784a.js → p-964stZ3D.js} +1 -1
- package/dist/cura/p-964stZ3D.js.map +1 -0
- package/dist/cura/p-9759f26f.entry.js +2 -0
- package/dist/cura/p-9759f26f.entry.js.map +1 -0
- package/dist/cura/p-9ef5444e.entry.js +2 -0
- package/dist/cura/p-9ef5444e.entry.js.map +1 -0
- package/dist/cura/p-BPKQjAwN.js +2 -0
- package/dist/cura/p-BPKQjAwN.js.map +1 -0
- package/dist/cura/{p-53c18ed4.js → p-BSI2FkNn.js} +1 -1
- package/dist/cura/p-BSI2FkNn.js.map +1 -0
- package/dist/cura/{p-efcb32eb.js → p-CHcd-uKK.js} +1 -1
- package/dist/cura/p-CHcd-uKK.js.map +1 -0
- package/dist/cura/{p-f9b8f665.js → p-Dot54hbB.js} +1 -1
- package/dist/cura/p-Dot54hbB.js.map +1 -0
- package/dist/cura/p-PPMZr_VE.js +3 -0
- package/dist/cura/p-PPMZr_VE.js.map +1 -0
- package/dist/cura/p-c6f240f0.entry.js +2 -0
- package/dist/cura/p-c6f240f0.entry.js.map +1 -0
- package/dist/cura/p-ceb646df.entry.js +2 -0
- package/dist/cura/p-ceb646df.entry.js.map +1 -0
- package/dist/cura/p-d040f8b9.entry.js +2 -0
- package/dist/cura/p-d040f8b9.entry.js.map +1 -0
- package/dist/cura/p-deb0b764.entry.js +2 -0
- package/dist/cura/p-deb0b764.entry.js.map +1 -0
- package/dist/cura/p-df7cb250.entry.js +2 -0
- package/dist/cura/p-df7cb250.entry.js.map +1 -0
- package/dist/cura/p-f9af3a3b.entry.js +2 -0
- package/dist/cura/p-f9af3a3b.entry.js.map +1 -0
- package/dist/cura/{p-48f9289b.js → p-sjLA93YY.js} +1 -1
- package/dist/cura/p-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-accordion_20.entry.js +483 -134
- package/dist/esm/cura-accordion_20.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +9 -10
- package/dist/esm/cura-alert.entry.js.map +1 -1
- package/dist/esm/cura-badge-counter.entry.js +16 -6
- package/dist/esm/cura-badge-counter.entry.js.map +1 -1
- package/dist/esm/cura-badge-dot.entry.js +14 -3
- package/dist/esm/cura-badge-dot.entry.js.map +1 -1
- package/dist/esm/cura-badge-pill.entry.js +23 -5
- package/dist/esm/cura-badge-pill.entry.js.map +1 -1
- package/dist/esm/cura-button-outline.entry.js +46 -6
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-select.entry.js +7 -10
- package/dist/esm/cura-button-select.entry.js.map +1 -1
- package/dist/{components/cura-button.definitions.js → esm/cura-button.definitions-BSI2FkNn.js} +2 -1
- package/dist/esm/cura-button.definitions-BSI2FkNn.js.map +1 -0
- package/dist/esm/cura-calendar.entry.js +203 -92
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura-card.entry.js +34 -4
- package/dist/esm/cura-card.entry.js.map +1 -1
- package/dist/esm/cura-checkbox.entry.js +72 -18
- package/dist/esm/cura-checkbox.entry.js.map +1 -1
- package/dist/esm/cura-display.entry.js +25 -5
- package/dist/esm/cura-display.entry.js.map +1 -1
- package/dist/esm/cura-dropdown-search-not-found.entry.js +5 -4
- package/dist/esm/cura-dropdown-search-not-found.entry.js.map +1 -1
- package/dist/esm/{cura-forms.definitions-2f963167.js → cura-forms.definitions-Dot54hbB.js} +2 -1
- package/dist/esm/cura-forms.definitions-Dot54hbB.js.map +1 -0
- package/dist/esm/{cura-icon.definitions-a892c0e2.js → cura-icon.definitions-sjLA93YY.js} +2 -1
- package/dist/esm/cura-icon.definitions-sjLA93YY.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +7 -6
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-input-date.entry.js +32 -13
- package/dist/esm/cura-input-date.entry.js.map +1 -1
- package/dist/esm/cura-loader-bar.entry.js +4 -3
- package/dist/esm/cura-loader-bar.entry.js.map +1 -1
- package/dist/esm/cura-modal.entry.js +46 -13
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura-progress-bar.cura-stepper-item.entry.js.map +1 -0
- package/dist/esm/cura-progress-bar_2.entry.js +25 -13
- package/dist/esm/cura-progress-bar_2.entry.js.map +1 -1
- package/dist/esm/cura-radio.entry.js +73 -19
- package/dist/esm/cura-radio.entry.js.map +1 -1
- package/dist/esm/cura-stepper.entry.js +23 -4
- package/dist/esm/cura-stepper.entry.js.map +1 -1
- package/dist/esm/cura-switch.entry.js +61 -16
- package/dist/esm/cura-switch.entry.js.map +1 -1
- package/dist/esm/cura-tabs-button.entry.js +6 -7
- package/dist/esm/cura-tabs-button.entry.js.map +1 -1
- package/dist/esm/cura-tabs-transparent.entry.js +6 -7
- package/dist/esm/cura-tabs-transparent.entry.js.map +1 -1
- package/dist/esm/{cura-tabs.definitions-a017126e.js → cura-tabs.definitions-CHcd-uKK.js} +2 -1
- package/dist/esm/cura-tabs.definitions-CHcd-uKK.js.map +1 -0
- package/dist/esm/{cura-theme-module-bf286f68.js → cura-theme-module-BPKQjAwN.js} +88 -4
- package/dist/esm/cura-theme-module-BPKQjAwN.js.map +1 -0
- package/dist/esm/cura-toast.entry.js +8 -9
- package/dist/esm/cura-toast.entry.js.map +1 -1
- package/dist/esm/cura-tooltip.entry.js +9 -9
- package/dist/esm/cura-tooltip.entry.js.map +1 -1
- package/dist/esm/cura.js +7 -7
- package/dist/esm/cura.js.map +1 -1
- package/dist/esm/{index-fbee309a.js → index-964stZ3D.js} +2 -1
- package/dist/esm/index-964stZ3D.js.map +1 -0
- package/dist/esm/{index-21683715.js → index-OdKytJIH.js} +947 -270
- package/dist/esm/index-OdKytJIH.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +5 -6
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +4 -0
- package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +14 -0
- package/dist/types/components.d.ts +718 -0
- package/dist/types/stencil-public-runtime.d.ts +25 -1
- package/package.json +5 -5
- package/dist/cjs/app-globals-6d5b51b6.js +0 -70
- package/dist/cjs/app-globals-6d5b51b6.js.map +0 -1
- package/dist/cjs/cura-button.definitions-f036371c.js.map +0 -1
- package/dist/cjs/cura-forms.definitions-c164f1b8.js.map +0 -1
- package/dist/cjs/cura-icon.definitions-5223028b.js.map +0 -1
- package/dist/cjs/cura-tabs.definitions-b8955ad4.js.map +0 -1
- package/dist/cjs/cura-theme-module-09bb63a4.js.map +0 -1
- package/dist/cjs/index-60783089.js.map +0 -1
- package/dist/cjs/index-6dc29195.js.map +0 -1
- package/dist/cjs/static-44199808.js +0 -90
- package/dist/cjs/static-44199808.js.map +0 -1
- package/dist/components/cura-badge-counter2.js.map +0 -1
- package/dist/components/cura-badge-pill2.js.map +0 -1
- package/dist/components/cura-button-transparent2.js.map +0 -1
- package/dist/components/cura-button.definitions.js.map +0 -1
- package/dist/components/cura-calendar2.js.map +0 -1
- package/dist/components/cura-forms.definitions.js.map +0 -1
- package/dist/components/cura-heading2.js.map +0 -1
- package/dist/components/cura-icon2.js.map +0 -1
- package/dist/components/cura-input-text2.js.map +0 -1
- package/dist/components/cura-label2.js.map +0 -1
- package/dist/components/cura-loader-bar2.js.map +0 -1
- package/dist/components/cura-loader-circle2.js.map +0 -1
- package/dist/components/cura-paragraph2.js.map +0 -1
- package/dist/components/cura-progress-bar2.js.map +0 -1
- package/dist/components/cura-select-option2.js.map +0 -1
- package/dist/components/cura-select2.js.map +0 -1
- package/dist/components/cura-stepper-item2.js.map +0 -1
- package/dist/components/cura-tabs.definitions.js.map +0 -1
- package/dist/cura/p-0aeaf57a.entry.js +0 -2
- package/dist/cura/p-0aeaf57a.entry.js.map +0 -1
- package/dist/cura/p-0b872499.entry.js +0 -2
- package/dist/cura/p-0b872499.entry.js.map +0 -1
- package/dist/cura/p-0ccde0ff.entry.js +0 -2
- package/dist/cura/p-0ccde0ff.entry.js.map +0 -1
- package/dist/cura/p-12a4ae7e.entry.js +0 -2
- package/dist/cura/p-137f003b.entry.js +0 -2
- package/dist/cura/p-137f003b.entry.js.map +0 -1
- package/dist/cura/p-197213c0.entry.js +0 -2
- package/dist/cura/p-197213c0.entry.js.map +0 -1
- package/dist/cura/p-1ef21ae9.entry.js +0 -2
- package/dist/cura/p-202dc01a.entry.js +0 -2
- package/dist/cura/p-202dc01a.entry.js.map +0 -1
- package/dist/cura/p-20b05d8f.entry.js +0 -2
- package/dist/cura/p-20b05d8f.entry.js.map +0 -1
- package/dist/cura/p-272c784a.js.map +0 -1
- package/dist/cura/p-2db4deb3.js +0 -2
- package/dist/cura/p-2db4deb3.js.map +0 -1
- package/dist/cura/p-48f9289b.js.map +0 -1
- package/dist/cura/p-4ee8efca.js +0 -3
- package/dist/cura/p-4ee8efca.js.map +0 -1
- package/dist/cura/p-53c18ed4.js.map +0 -1
- package/dist/cura/p-53d68d72.entry.js +0 -2
- package/dist/cura/p-5a43e745.entry.js +0 -2
- package/dist/cura/p-5a43e745.entry.js.map +0 -1
- package/dist/cura/p-633c13cd.entry.js +0 -2
- package/dist/cura/p-633c13cd.entry.js.map +0 -1
- package/dist/cura/p-6cbd49dd.js +0 -2
- package/dist/cura/p-6cbd49dd.js.map +0 -1
- package/dist/cura/p-7a68835f.entry.js +0 -2
- package/dist/cura/p-7a68835f.entry.js.map +0 -1
- package/dist/cura/p-7e10b146.entry.js +0 -2
- package/dist/cura/p-7e10b146.entry.js.map +0 -1
- package/dist/cura/p-7e2d1229.entry.js +0 -2
- package/dist/cura/p-7e2d1229.entry.js.map +0 -1
- package/dist/cura/p-8aade007.entry.js +0 -2
- package/dist/cura/p-8aade007.entry.js.map +0 -1
- package/dist/cura/p-9f460031.js +0 -2
- package/dist/cura/p-9f460031.js.map +0 -1
- package/dist/cura/p-ac0c90af.entry.js +0 -2
- package/dist/cura/p-ac0c90af.entry.js.map +0 -1
- package/dist/cura/p-b254bbe4.entry.js +0 -2
- package/dist/cura/p-b254bbe4.entry.js.map +0 -1
- package/dist/cura/p-b4ee956b.entry.js +0 -2
- package/dist/cura/p-b4ee956b.entry.js.map +0 -1
- package/dist/cura/p-b60a6aaa.entry.js +0 -2
- package/dist/cura/p-b60a6aaa.entry.js.map +0 -1
- package/dist/cura/p-b6ff8ac1.entry.js +0 -2
- package/dist/cura/p-b6ff8ac1.entry.js.map +0 -1
- package/dist/cura/p-d8e1e182.entry.js +0 -2
- package/dist/cura/p-d8e1e182.entry.js.map +0 -1
- package/dist/cura/p-d97719bc.entry.js +0 -2
- package/dist/cura/p-d97719bc.entry.js.map +0 -1
- package/dist/cura/p-daf422ce.entry.js +0 -2
- package/dist/cura/p-daf422ce.entry.js.map +0 -1
- package/dist/cura/p-efcb32eb.js.map +0 -1
- package/dist/cura/p-f9b8f665.js.map +0 -1
- package/dist/esm/app-globals-c2abb41c.js +0 -68
- package/dist/esm/app-globals-c2abb41c.js.map +0 -1
- package/dist/esm/cura-button.definitions-617d3bad.js.map +0 -1
- package/dist/esm/cura-forms.definitions-2f963167.js.map +0 -1
- package/dist/esm/cura-icon.definitions-a892c0e2.js.map +0 -1
- package/dist/esm/cura-tabs.definitions-a017126e.js.map +0 -1
- package/dist/esm/cura-theme-module-bf286f68.js.map +0 -1
- package/dist/esm/index-21683715.js.map +0 -1
- package/dist/esm/index-fbee309a.js.map +0 -1
- package/dist/esm/static-090f0088.js +0 -88
- package/dist/esm/static-090f0088.js.map +0 -1
- package/dist/loader/package.json +0 -11
|
@@ -1,20 +1,47 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const index = require('./index-60783089.js');
|
|
3
|
+
var index = require('./index-BK9MSAiE.js');
|
|
4
|
+
require('./cura-theme-module-CJkmAxBA.js');
|
|
6
5
|
|
|
7
6
|
const curaCardCss = ":host{display:block;box-sizing:border-box;font-size:var(--font-size);font-family:var(--font-family)}:host ::slotted(*){display:flex;align-items:center;justify-content:center;font-size:var(--font-size);font-family:var(--font-family)}a{display:block;text-decoration:none !important;color:inherit}.solid{background-color:var(--neutral-purewhite);border:2px solid var(--neutral-base);border-radius:12px;overflow:hidden;padding:0px;box-shadow:none}.solid ::slotted(*){border-radius:0}.solid.hasPadding{padding:20px}.solid.hasPadding ::slotted(*){border-radius:4px !important}.solid.hasShadow{border:2px solid var(--neutral-base);box-shadow:0px 1px 4px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}.solid.cardLink{background-color:var(--neutral-purewhite);border:2px solid var(--primary-base);border-radius:12px;padding:0px;box-shadow:none;cursor:pointer}.solid.cardLink ::slotted(*){border-radius:0px}.solid.cardLink:hover{border:2px solid var(--primary-lighter) !important}.solid.cardLink.hasPadding{padding:20px}.solid.cardLink.hasPadding ::slotted(*){border-radius:4px !important}.solid.cardLink.hasPadding:hover{border:2px solid var(--primary-lighter) !important}.solid.cardLink.hasShadow{border:2px solid var(--primary-base);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}.solid.cardLink:not(.hasPadding).hasShadow ::slotted(*){border-radius:12px !important}.solid.cardLink.dark{background-color:var(--neutral-purewhite);border:2px solid var(--neutral-purewhite)}.solid.cardLink.dark:hover{border:2px solid var(--primary-lighter)}.transparent{background-color:transparent;border:0;border-radius:12px;padding:0px;overflow:hidden}.transparent ::slotted(*){border-radius:12px}.transparent.hasPadding{padding:20px}.transparent.hasPadding ::slotted(*){border-radius:4px}.transparent.cardLink{background-color:transparent;border:2px solid var(--primary-base);overflow:hidden;border-radius:12px;padding:0px;box-shadow:none}.transparent.cardLink ::slotted(*){border-radius:0px !important}.transparent.cardLink:hover{border:2px solid var(--primary-lighter) !important}.transparent.cardLink.light{background-color:var(--neutral-purewhite);border:2px solid var(--primary-base)}.transparent.cardLink.light ::slotted(*){border-radius:12px !important}.transparent.cardLink.light:hover{border-color:var(--primary-lighter) !important}.transparent.cardLink.dark{background-color:transparent;border:2px solid var(--neutral-purewhite)}.transparent.cardLink.dark:hover{border:0}.transparent.cardLink.hasPadding{padding:20px}.transparent.cardLink.hasPadding ::slotted(*){border-radius:4px !important}";
|
|
8
|
-
const CuraCardStyle0 = curaCardCss;
|
|
9
7
|
|
|
10
8
|
const CuraCard = class {
|
|
11
9
|
constructor(hostRef) {
|
|
12
10
|
index.registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Determines whether the card should have padding.
|
|
13
|
+
* @type {boolean}
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
13
16
|
this.hasPadding = true;
|
|
17
|
+
/**
|
|
18
|
+
* Determines whether the card should have a shadow effect.
|
|
19
|
+
* @type {boolean}
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
14
22
|
this.hasShadow = false;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the type of the card background.
|
|
25
|
+
* - 'solid': A solid background.
|
|
26
|
+
* - 'transparent': A transparent background.
|
|
27
|
+
* @type {'solid' | 'transparent'}
|
|
28
|
+
* @default 'solid'
|
|
29
|
+
*/
|
|
15
30
|
this.type = 'solid';
|
|
31
|
+
/**
|
|
32
|
+
* Sets the color mode of the card.
|
|
33
|
+
* - 'light': Light mode for the card.
|
|
34
|
+
* - 'dark': Dark mode for the card.
|
|
35
|
+
* @type {'light' | 'dark'}
|
|
36
|
+
* @default 'light'
|
|
37
|
+
*/
|
|
16
38
|
this.colorMode = 'light';
|
|
17
|
-
|
|
39
|
+
/**
|
|
40
|
+
* The target attribute for the link.
|
|
41
|
+
* Applicable only if `href` is set.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @default '_self'
|
|
44
|
+
*/
|
|
18
45
|
this.target = '_self';
|
|
19
46
|
this.styles = {};
|
|
20
47
|
}
|
|
@@ -46,8 +73,9 @@ const CuraCard = class {
|
|
|
46
73
|
return (index.h(index.Host, { key: '9478ce754c108db722dbc5bcbb00a0884b6c6f38', role: this.href ? 'link' : 'div' }, this.href ? (index.h("a", { class: this.getClasses(), target: this.target, style: this.styles, href: this.href }, index.h("slot", null))) : (index.h("div", { class: this.getClasses(), style: this.styles }, index.h("slot", null)))));
|
|
47
74
|
}
|
|
48
75
|
};
|
|
49
|
-
CuraCard.style =
|
|
76
|
+
CuraCard.style = curaCardCss;
|
|
50
77
|
|
|
51
78
|
exports.cura_card = CuraCard;
|
|
79
|
+
//# sourceMappingURL=cura-card.entry.cjs.js.map
|
|
52
80
|
|
|
53
81
|
//# sourceMappingURL=cura-card.cjs.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-card.entry.cjs.js","mappings":"
|
|
1
|
+
{"file":"cura-card.entry.cjs.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,gkFAAgkF;;MCOvkF,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAME;;;;AAIG;AACsB,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI;AAEnD;;;;AAIG;AACsB,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAEnD;;;;;;AAMG;AACsB,QAAA,IAAI,CAAA,IAAA,GAA4B,OAAO;AAEhE;;;;;;AAMG;AACsB,QAAA,IAAS,CAAA,SAAA,GAAqB,OAAO;AAS9D;;;;;AAKG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO;AAExC,QAAA,IAAM,CAAA,MAAA,GAAQ,EAAE;AA6C1B;IAzCC,iBAAiB,GAAA;AACf,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE;AACtD,QAAA,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE;AACzE,QAAA,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,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C,SAAS,EAAE;QACrE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM;;IAG3D,UAAU,GAAA;QACR,MAAM,OAAO,GAAG,EAAE;AAClB,QAAA,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI;AACzB,QAAA,OAAO,CAAC,CAAU,QAAA,CAAA,CAAC,GAAG,IAAI,CAAC,IAAI;AAC/B,QAAA,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI;AAC9B,QAAA,OAAO,CAAC,CAAY,UAAA,CAAA,CAAC,GAAG,IAAI,CAAC,UAAU;AACvC,QAAA,OAAO,CAAC,CAAW,SAAA,CAAA,CAAC,GAAG,IAAI,CAAC,SAAS;AACrC,QAAA,OAAO,OAAO;;IAGhB,MAAM,GAAA;QACJ,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,KAAK,IACnC,IAAI,CAAC,IAAI,IACRD,OAAG,CAAA,GAAA,EAAA,EAAA,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAA,EACnFA,OAAA,CAAA,MAAA,EAAA,IAAA,CAAa,CACX,KAEJA,iBAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAA,EAC/CA,OAAA,CAAA,MAAA,EAAA,IAAA,CAAa,CACT,CACP,CACI;;;;;;;","names":["h","Host"],"sources":["src/components/cura-card/cura-card.scss?tag=cura-card&encapsulation=shadow","src/components/cura-card/cura-card.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/shadows.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n font-size: var(--font-size);\n font-family: var(--font-family);\n ::slotted(*) {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--font-size);\n font-family: var(--font-family);\n }\n \n}\n\na {\n display: block;\n text-decoration: none !important;\n color: inherit;\n}\n.solid {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-base);\n border-radius: 12px;\n overflow: hidden;\n padding: 0px;\n box-shadow: none;\n\n ::slotted(*) {\n \n border-radius: 0 ;\n }\n &.hasPadding {\n padding: 20px;\n ::slotted(*) {\n border-radius: 4px !important;\n }\n }\n\n &.hasShadow {\n border: 2px solid var(--neutral-base);\n\n @include shadow-level2(--neutral-black-shadow);\n }\n\n &.cardLink {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--primary-base);\n border-radius: 12px;\n padding: 0px;\n box-shadow: none;\n cursor: pointer;\n\n ::slotted(*) {\n border-radius: 0px;\n }\n &:hover {\n border: 2px solid var(--primary-lighter) !important;\n }\n &.hasPadding {\n padding: 20px;\n ::slotted(*) {\n border-radius: 4px !important;\n }\n &:hover {\n border: 2px solid var(--primary-lighter) !important;\n }\n }\n\n &.hasShadow {\n border: 2px solid var(--primary-base);\n\n @include shadow-level3(--neutral-black-shadow);\n }\n &:not(.hasPadding).hasShadow {\n ::slotted(*) {\n border-radius: 12px !important;\n }\n }\n\n &.dark {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-purewhite);\n &:hover {\n border: 2px solid var(--primary-lighter);\n }\n }\n }\n}\n\n.transparent {\n background-color: transparent;\n border: 0;\n border-radius: 12px;\n padding: 0px;\n overflow: hidden;\n ::slotted(*) {\n border-radius: 12px;\n }\n\n &.hasPadding {\n padding: 20px;\n\n ::slotted(*) {\n border-radius: 4px;\n }\n }\n\n &.cardLink {\n background-color: transparent;\n border: 2px solid var(--primary-base);\n overflow: hidden;\n border-radius: 12px;\n padding: 0px;\n box-shadow: none;\n ::slotted(*) {\n border-radius: 0px !important;\n }\n &:hover {\n border: 2px solid var(--primary-lighter) !important;\n }\n\n &.light {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--primary-base);\n ::slotted(*) {\n border-radius: 12px !important;\n }\n &:hover {\n border-color: var(--primary-lighter) !important;\n }\n }\n &.dark {\n background-color: transparent;\n\n border: 2px solid var(--neutral-purewhite);\n\n &:hover {\n border: 0;\n }\n }\n &.hasPadding {\n padding: 20px;\n\n ::slotted(*) {\n border-radius: 4px !important;\n }\n }\n }\n}\n","import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-card',\n styleUrl: 'cura-card.scss',\n shadow: true,\n})\nexport class CuraCard {\n /**\n * Determines whether the card should have padding.\n * @type {boolean}\n * @default false\n */\n @Prop({ mutable: true }) hasPadding: boolean = true;\n\n /**\n * Determines whether the card should have a shadow effect.\n * @type {boolean}\n * @default false\n */\n @Prop({ mutable: true }) hasShadow: boolean = false;\n\n /**\n * Sets the type of the card background.\n * - 'solid': A solid background.\n * - 'transparent': A transparent background.\n * @type {'solid' | 'transparent'}\n * @default 'solid'\n */\n @Prop({ mutable: true }) type: 'solid' | 'transparent' = 'solid';\n\n /**\n * Sets the color mode of the card.\n * - 'light': Light mode for the card.\n * - 'dark': Dark mode for the card.\n * @type {'light' | 'dark'}\n * @default 'light'\n */\n @Prop({ mutable: true }) colorMode: 'light' | 'dark' = 'light';\n\n /**\n * The URL that the card should link to (if set).\n * If not set, the card acts as a normal card.\n * @type {string | undefined}\n */\n @Prop({ mutable: true, reflect: true }) href?: string;\n\n /**\n * The target attribute for the link.\n * Applicable only if `href` is set.\n * @type {string}\n * @default '_self'\n */\n @Prop({ reflect: true }) target: string = '_self';\n\n @State() styles: any = {};\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--primary-lighter'] = window.CuraAPI.theme.colors.getColor(`primary-lighter`);\n this.styles['--primary-base'] = window.CuraAPI.theme.colors.getColor(`primary-base`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n }\n\n getClasses() {\n const classes = {};\n classes[this.type] = true;\n classes[`cardLink`] = this.href;\n classes[this.colorMode] = true;\n classes[`hasPadding`] = this.hasPadding;\n classes[`hasShadow`] = this.hasShadow;\n return classes;\n }\n\n render() {\n return (\n <Host role={this.href ? 'link' : 'div'}>\n {this.href ? (\n <a class={this.getClasses()} target={this.target} style={this.styles} href={this.href}>\n <slot></slot>\n </a>\n ) : (\n <div class={this.getClasses()} style={this.styles}>\n <slot></slot>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-card.entry.cjs.js","sources":["src/components/cura-card/cura-card.scss?tag=cura-card&encapsulation=shadow","src/components/cura-card/cura-card.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/shadows.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n font-size: var(--font-size);\n font-family: var(--font-family);\n ::slotted(*) {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--font-size);\n font-family: var(--font-family);\n }\n \n}\n\na {\n display: block;\n text-decoration: none !important;\n color: inherit;\n}\n.solid {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-base);\n border-radius: 12px;\n overflow: hidden;\n padding: 0px;\n box-shadow: none;\n\n ::slotted(*) {\n \n border-radius: 0 ;\n }\n &.hasPadding {\n padding: 20px;\n ::slotted(*) {\n border-radius: 4px !important;\n }\n }\n\n &.hasShadow {\n border: 2px solid var(--neutral-base);\n\n @include shadow-level2(--neutral-black-shadow);\n }\n\n &.cardLink {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--primary-base);\n border-radius: 12px;\n padding: 0px;\n box-shadow: none;\n cursor: pointer;\n\n ::slotted(*) {\n border-radius: 0px;\n }\n &:hover {\n border: 2px solid var(--primary-lighter) !important;\n }\n &.hasPadding {\n padding: 20px;\n ::slotted(*) {\n border-radius: 4px !important;\n }\n &:hover {\n border: 2px solid var(--primary-lighter) !important;\n }\n }\n\n &.hasShadow {\n border: 2px solid var(--primary-base);\n\n @include shadow-level3(--neutral-black-shadow);\n }\n &:not(.hasPadding).hasShadow {\n ::slotted(*) {\n border-radius: 12px !important;\n }\n }\n\n &.dark {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-purewhite);\n &:hover {\n border: 2px solid var(--primary-lighter);\n }\n }\n }\n}\n\n.transparent {\n background-color: transparent;\n border: 0;\n border-radius: 12px;\n padding: 0px;\n overflow: hidden;\n ::slotted(*) {\n border-radius: 12px;\n }\n\n &.hasPadding {\n padding: 20px;\n\n ::slotted(*) {\n border-radius: 4px;\n }\n }\n\n &.cardLink {\n background-color: transparent;\n border: 2px solid var(--primary-base);\n overflow: hidden;\n border-radius: 12px;\n padding: 0px;\n box-shadow: none;\n ::slotted(*) {\n border-radius: 0px !important;\n }\n &:hover {\n border: 2px solid var(--primary-lighter) !important;\n }\n\n &.light {\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--primary-base);\n ::slotted(*) {\n border-radius: 12px !important;\n }\n &:hover {\n border-color: var(--primary-lighter) !important;\n }\n }\n &.dark {\n background-color: transparent;\n\n border: 2px solid var(--neutral-purewhite);\n\n &:hover {\n border: 0;\n }\n }\n &.hasPadding {\n padding: 20px;\n\n ::slotted(*) {\n border-radius: 4px !important;\n }\n }\n }\n}\n","import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-card',\n styleUrl: 'cura-card.scss',\n shadow: true,\n})\nexport class CuraCard {\n /**\n * Determines whether the card should have padding.\n * @type {boolean}\n * @default false\n */\n @Prop({ mutable: true }) hasPadding: boolean = true;\n\n /**\n * Determines whether the card should have a shadow effect.\n * @type {boolean}\n * @default false\n */\n @Prop({ mutable: true }) hasShadow: boolean = false;\n\n /**\n * Sets the type of the card background.\n * - 'solid': A solid background.\n * - 'transparent': A transparent background.\n * @type {'solid' | 'transparent'}\n * @default 'solid'\n */\n @Prop({ mutable: true }) type: 'solid' | 'transparent' = 'solid';\n\n /**\n * Sets the color mode of the card.\n * - 'light': Light mode for the card.\n * - 'dark': Dark mode for the card.\n * @type {'light' | 'dark'}\n * @default 'light'\n */\n @Prop({ mutable: true }) colorMode: 'light' | 'dark' = 'light';\n\n /**\n * The URL that the card should link to (if set).\n * If not set, the card acts as a normal card.\n * @type {string | undefined}\n */\n @Prop({ mutable: true, reflect: true }) href?: string;\n\n /**\n * The target attribute for the link.\n * Applicable only if `href` is set.\n * @type {string}\n * @default '_self'\n */\n @Prop({ reflect: true }) target: string = '_self';\n\n @State() styles: any = {};\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--primary-lighter'] = window.CuraAPI.theme.colors.getColor(`primary-lighter`);\n this.styles['--primary-base'] = window.CuraAPI.theme.colors.getColor(`primary-base`);\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n }\n\n getClasses() {\n const classes = {};\n classes[this.type] = true;\n classes[`cardLink`] = this.href;\n classes[this.colorMode] = true;\n classes[`hasPadding`] = this.hasPadding;\n classes[`hasShadow`] = this.hasShadow;\n return classes;\n }\n\n render() {\n return (\n <Host role={this.href ? 'link' : 'div'}>\n {this.href ? (\n <a class={this.getClasses()} target={this.target} style={this.styles} href={this.href}>\n <slot></slot>\n </a>\n ) : (\n <div class={this.getClasses()} style={this.styles}>\n <slot></slot>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"names":["h","Host"],"mappings":";;;;;AAAA,MAAM,WAAW,GAAG,gkFAAgkF;;MCOvkF,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAME;;;;AAIG;AACsB,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI;AAEnD;;;;AAIG;AACsB,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAEnD;;;;;;AAMG;AACsB,QAAA,IAAI,CAAA,IAAA,GAA4B,OAAO;AAEhE;;;;;;AAMG;AACsB,QAAA,IAAS,CAAA,SAAA,GAAqB,OAAO;AAS9D;;;;;AAKG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO;AAExC,QAAA,IAAM,CAAA,MAAA,GAAQ,EAAE;AA6C1B;IAzCC,iBAAiB,GAAA;AACf,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE;AACtD,QAAA,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE;AACzE,Q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
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const curaForms_definitions = require('./cura-forms.definitions-c164f1b8.js');
|
|
3
|
+
var index = require('./index-BK9MSAiE.js');
|
|
4
|
+
var curaForms_definitions = require('./cura-forms.definitions-DVLuO67c.js');
|
|
5
|
+
require('./cura-theme-module-CJkmAxBA.js');
|
|
7
6
|
|
|
8
7
|
const curaCheckboxCss = "@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);cursor:pointer}.position.container{flex-direction:row}.position .label-wrapper{justify-content:end}.position .message{text-align:right}.position .label{order:1}.info{display:flex;flex-direction:column;overflow:hidden}.label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}.label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}.control{width:fit-content;cursor:pointer;position:relative}.checkbox{appearance:none;border:2px solid var(--neutral-base-neutral-medium);border-radius:4px;background:var(--neutral-black-neutral-purewhite);flex:1 0;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;box-sizing:border-box;width:var(--size);height:var(--size);flex:0 0 var(--size)}.icon{position:absolute;display:flex;opacity:0;transition:opacity 0.3s}.checkbox:focus{border-color:var(--info-base) !important}.disabled .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base);cursor:not-allowed}.disabled .checkbox:hover{border-color:var(--neutral-darker-neutral-base) !important}.disabled.checked .checkbox,.disabled.indeterminate .checkbox{background:var(--neutral-black-neutral-white);border-color:var(--neutral-darker-neutral-base)}.disabled.checked .checkbox:hover,.disabled.indeterminate .checkbox:hover{border-color:var(--neutral-base-neutral-white);background:var(--primary-base-neutral-white)}.disabled .checkbox:focus{border-color:var(--neutral-darker-neutral-base) !important}.checked .checkbox{border-color:var(--color-dark);background:var(--color-base)}.checked .checkbox:hover{border-color:var(--color-base) !important;background:var(--color-light)}.indeterminate .checkbox{border-color:var(--color-base);background:var(--color-light)}.indeterminate .checkbox:hover{border-color:var(--color-dark) !important;background:var(--color-base)}.checked .icon,.indeterminate .icon{opacity:1}:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover{border-color:var(--neutral-purewhite-neutral-dark)}.success.dark .checkbox{background:var(--neutral-black)}.success .checkbox{border-color:var(--success-base);background:var(--success-lighter)}.success .checkbox:hover{border-color:var(--success-base) !important}.success.checked .checkbox{border-color:var(--success-dark-base);background:var(--success-base-lighter)}.success.checked .checkbox:hover{border-color:var(--success-dark-base)}.error.dark .checkbox{background:var(--neutral-black)}.error .checkbox{border-color:var(--error-base);background:var(--error-lighter)}.error .checkbox:hover{border-color:var(--error-base) !important}.error.checked .checkbox{border-color:var(--error-dark-base);background:var(--error-base-lighter)}.error.checked .checkbox:hover{border-color:var(--error-dark-base)}input{appearance:none;-webkit-appearance:none;-moz-appearance:none}";
|
|
9
|
-
const CuraCheckboxStyle0 = curaCheckboxCss;
|
|
10
8
|
|
|
11
9
|
const CuraCheckbox = class {
|
|
12
10
|
constructor(hostRef) {
|
|
13
11
|
index.registerInstance(this, hostRef);
|
|
14
|
-
this.onchange = index.createEvent(this, "onchange"
|
|
12
|
+
this.onchange = index.createEvent(this, "onchange");
|
|
15
13
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
16
14
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
17
15
|
}
|
|
@@ -19,33 +17,86 @@ const CuraCheckbox = class {
|
|
|
19
17
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
20
18
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
21
19
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return;
|
|
27
|
-
this.indeterminate = false;
|
|
28
|
-
this.checked = !this.checked;
|
|
29
|
-
this.internals.setFormValue(this.value);
|
|
30
|
-
this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });
|
|
31
|
-
};
|
|
20
|
+
/**
|
|
21
|
+
* Reflects the checked state of the checkbox.
|
|
22
|
+
* Mutable property allowing state change.
|
|
23
|
+
*/
|
|
32
24
|
this.checked = false;
|
|
25
|
+
/**
|
|
26
|
+
* Reflects the indeterminate state of the checkbox.
|
|
27
|
+
* Mutable property allowing state change.
|
|
28
|
+
*/
|
|
33
29
|
this.indeterminate = false;
|
|
30
|
+
/**
|
|
31
|
+
* Status of the checkbox.
|
|
32
|
+
* Can be 'error', 'success', or 'default'.
|
|
33
|
+
*/
|
|
34
34
|
this.status = 'default';
|
|
35
|
+
/**
|
|
36
|
+
* Reflects the disabled state of the checkbox.
|
|
37
|
+
*/
|
|
35
38
|
this.disabled = false;
|
|
39
|
+
/**
|
|
40
|
+
* Reflects the required state of the checkbox.
|
|
41
|
+
*/
|
|
36
42
|
this.required = false;
|
|
37
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Specifies the tabindex of the checkbox.
|
|
45
|
+
*/
|
|
38
46
|
this.ontabindex = 0;
|
|
47
|
+
/**
|
|
48
|
+
* Position of the label relative to the checkbox.
|
|
49
|
+
* Can be 'left' or 'right'.
|
|
50
|
+
*/
|
|
39
51
|
this.position = 'left';
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Size of the checkbox.
|
|
54
|
+
* Can be 'small', 'medium', or 'large'.
|
|
55
|
+
*/
|
|
42
56
|
this.size = 'medium';
|
|
57
|
+
/**
|
|
58
|
+
* Background theme of the checkbox.
|
|
59
|
+
* Can be 'dark' or 'light'.
|
|
60
|
+
*/
|
|
43
61
|
this.background = 'light';
|
|
62
|
+
/**
|
|
63
|
+
* iconColor theme of the checkbox.
|
|
64
|
+
* Can be 'dark' or 'light'.
|
|
65
|
+
*/
|
|
44
66
|
this.iconColor = 'dark';
|
|
67
|
+
/**
|
|
68
|
+
* Color theme of the checkbox.
|
|
69
|
+
*/
|
|
45
70
|
this.color = 'accent';
|
|
71
|
+
/**
|
|
72
|
+
* Controls how the label text should handle overflow.
|
|
73
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
74
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
75
|
+
* - `string`: Custom overflow handling mode.
|
|
76
|
+
*
|
|
77
|
+
* @default 'none'
|
|
78
|
+
*/
|
|
46
79
|
this.overflowLabel = 'none';
|
|
80
|
+
/**
|
|
81
|
+
* Controls how the helper text should handle overflow.
|
|
82
|
+
* - `'none'`: No overflow handling; the label displays normally.
|
|
83
|
+
* - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
|
|
84
|
+
* - `string`: Custom overflow handling mode.
|
|
85
|
+
*
|
|
86
|
+
* @default 'none'
|
|
87
|
+
*/
|
|
47
88
|
this.overflowHelper = 'none';
|
|
48
89
|
this.styles = {};
|
|
90
|
+
this.isDarkBackground = () => this.background === 'dark';
|
|
91
|
+
this.isDarkIconColor = () => this.iconColor === 'dark';
|
|
92
|
+
this.handleClick = () => {
|
|
93
|
+
if (this.disabled)
|
|
94
|
+
return;
|
|
95
|
+
this.indeterminate = false;
|
|
96
|
+
this.checked = !this.checked;
|
|
97
|
+
this.internals.setFormValue(this.value);
|
|
98
|
+
this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });
|
|
99
|
+
};
|
|
49
100
|
}
|
|
50
101
|
sizeHandler() {
|
|
51
102
|
this.styles = Object.assign(Object.assign({}, this.styles), { '--size': `${curaForms_definitions.formsSizes[this.size].size}px`, '--gap': `${curaForms_definitions.formsSizes[this.size].gap}px` });
|
|
@@ -177,8 +228,9 @@ const CuraCheckbox = class {
|
|
|
177
228
|
"iconColor": ["assignColor"]
|
|
178
229
|
}; }
|
|
179
230
|
};
|
|
180
|
-
CuraCheckbox.style =
|
|
231
|
+
CuraCheckbox.style = curaCheckboxCss;
|
|
181
232
|
|
|
182
233
|
exports.cura_checkbox = CuraCheckbox;
|
|
234
|
+
//# sourceMappingURL=cura-checkbox.entry.cjs.js.map
|
|
183
235
|
|
|
184
236
|
//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Q,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,aAAa,EAAE,IAAI,CAAC,aAAa,GACjC,EACD,IAAI,CAAC,OAAO,EAAE,CACX,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;","names":["formsSizes","h","Host"],"sources":["src/components/forms/cura-checkbox/cura-checkbox.scss?tag=cura-checkbox&encapsulation=shadow","src/components/forms/cura-checkbox/cura-checkbox.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n}\n\n/* Container e Layout */\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n}\n\n.position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n}\n\n.info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n}\n\n.label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n}\n\n.label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n}\n\n/* Control e Checkbox */\n.control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n}\n\n.checkbox {\n appearance: none;\n border: 2px solid var(--neutral-base-neutral-medium);\n border-radius: 4px;\n background: var(--neutral-black-neutral-purewhite);\n flex: 1 0;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n}\n\n.icon {\n position: absolute;\n display: flex;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n/* Estados de Foco */\n.checkbox:focus {\n border-color: var(--info-base) !important;\n}\n\n/* Estado Disabled */\n.disabled .checkbox {\n background: var(--neutral-black-neutral-white);\n border-color: var(--neutral-darker-neutral-base);\n cursor: not-allowed;\n\n &:hover {\n border-color: var(--neutral-darker-neutral-base) !important;\n }\n}\n\n.disabled.checked .checkbox,\n.disabled.indeterminate .checkbox {\n background: var(--neutral-black-neutral-white);\n border-color: var(--neutral-darker-neutral-base);\n\n &:hover {\n border-color: var(--neutral-base-neutral-white);\n background: var(--primary-base-neutral-white);\n }\n}\n\n.disabled .checkbox:focus {\n border-color: var(--neutral-darker-neutral-base) !important;\n}\n\n/* Estado Checked */\n.checked .checkbox {\n border-color: var(--color-dark);\n background: var(--color-base);\n\n &:hover {\n border-color: var(--color-base) !important;\n background: var(--color-light);\n }\n}\n\n/* Estado Indeterminate */\n.indeterminate .checkbox {\n border-color: var(--color-base);\n background: var(--color-light);\n\n &:hover {\n border-color: var(--color-dark) !important;\n background: var(--color-base);\n }\n}\n\n.checked .icon,\n.indeterminate .icon {\n opacity: 1;\n}\n\n/* Hover para não disabled, default, checked, indeterminate */\n:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover {\n border-color: var(--neutral-purewhite-neutral-dark);\n}\n\n/* Estado Success */\n\n.success.dark .checkbox {\n background: var(--neutral-black);\n}\n\n.success .checkbox {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n}\n\n.success.checked .checkbox {\n border-color: var(--success-dark-base);\n background: var(--success-base-lighter);\n\n &:hover {\n border-color: var(--success-dark-base);\n }\n}\n\n/* Estado Error */\n\n.error.dark .checkbox {\n background: var(--neutral-black);\n}\n\n.error .checkbox {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n}\n\n.error.checked .checkbox {\n border-color: var(--error-dark-base);\n background: var(--error-base-lighter);\n\n &:hover {\n border-color: var(--error-dark-base);\n }\n}\n\n/* Input */\ninput {\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n","import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-checkbox',\n styleUrl: 'cura-checkbox.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraCheckbox {\n /**\n * Reflects the checked state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Reflects the indeterminate state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate: boolean = false;\n /**\n * Status of the checkbox.\n * Can be 'error', 'success', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n /**\n * Reflects the disabled state of the checkbox.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the checkbox.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the checkbox.\n */\n @Prop({ reflect: true }) label: string;\n /**\n * Specifies the tabindex of the checkbox.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the checkbox.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the checkbox.\n */\n @Prop({ reflect: true }) value: string;\n /**\n * Name attribute of the checkbox.\n */\n @Prop({ reflect: true }) name: string;\n /**\n * Size of the checkbox.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * iconColor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() iconColor: 'dark' | 'light' = 'dark';\n /**\n * Color theme of the checkbox.\n */\n @Prop() color = 'accent';\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowLabel: 'none' | 'single' | string = 'none';\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowHelper: 'none' | 'single' | string = 'none';\n\n @State() styles = {};\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string; checked: boolean; indeterminate: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n isDarkBackground = () => this.background === 'dark';\n\n isDarkIconColor = () => this.iconColor === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n /**\n * Watches changes in color and background properties to update styles.\n */\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-lighter', background: `${this.color}-lighter` },\n { name: '--color-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--info-base', background: 'info-base' },\n { name: '--error-base', background: 'error-base' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--success-dark', background: 'success-dark' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--neutral-black', background: 'neutral-black' },\n { name: '--primary-base-neutral-white', background: this.isDarkBackground() ? 'primary-base' : 'neutral-white' },\n { name: '--neutral-base-neutral-medium', background: this.isDarkBackground() ? 'neutral-base' : 'neutral-medium' },\n { name: '--neutral-black-neutral-purewhite', background: this.isDarkBackground() ? 'neutral-black' : 'neutral-purewhite' },\n { name: '--neutral-black-neutral-white', background: this.isDarkBackground() ? 'neutral-black' : 'neutral-white' },\n { name: '--neutral-darker-neutral-base', background: this.isDarkBackground() ? 'neutral-darker' : 'neutral-base' },\n { name: '--neutral-base-neutral-base', background: this.isDarkBackground() ? 'primary-base' : 'neutral-base' },\n { name: '--neutral-purewhite-neutral-dark', background: this.isDarkBackground() ? 'neutral-purewhite' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkBackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-lighter', background: this.isDarkBackground() ? 'success-base' : 'success-lighter' },\n { name: '--success-dark-base', background: this.isDarkBackground() ? 'success-dark' : 'success-base' },\n { name: '--error-base-lighter', background: this.isDarkBackground() ? 'error-base' : 'error-lighter' },\n { name: '--error-dark-base', background: this.isDarkBackground() ? 'error-dark' : 'error-base' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\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; checked: boolean; indeterminate: boolean }) {\n this.value = state.value;\n this.checked = state.checked;\n this.indeterminate = state.indeterminate;\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.value = '';\n this.checked = false;\n this.indeterminate = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.indeterminate = false;\n this.checked = !this.checked;\n this.internals.setFormValue(this.value);\n this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });\n };\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes[this.background] = true;\n classes['indeterminate'] = this.indeterminate;\n classes['position'] = this.position === 'right';\n classes[this.status] = true;\n\n return classes;\n }\n\n /**\n * Assigns color based on status and background theme.\n * @param defaultColor Default color.\n */\n @Watch('background')\n @Watch('iconColor')\n assignColor(type: 'icon' | 'label' | 'message') {\n if (this.disabled) return this.isDarkBackground() ? 'neutral-dark' : 'neutral-dark';\n\n const statusColors = {\n success: {\n icon: 'success-dark',\n label: this.isDarkBackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkBackground() ? 'success-base' : 'success-dark',\n },\n error: {\n icon: 'error-dark',\n label: this.isDarkBackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkBackground() ? 'error-base' : 'error-dark',\n },\n default: {\n icon: this.isDarkIconColor() ? 'neutral-black' : 'neutral-purewhite',\n label: this.isDarkBackground() ? 'neutral-white' : 'neutral-black',\n message: this.isDarkBackground() ? 'primary-lighter' : 'neutral-dark',\n },\n };\n\n return statusColors[this.status][type];\n }\n\n /**\n * Retrieves icon element based on checkbox state.\n */\n getIcon() {\n const iconName = this.indeterminate ? 'minus' : 'check';\n const iconColor = this.assignColor('icon');\n const iconSize = this.size === 'large' ? 20 : 'micro';\n\n return <cura-icon class=\"icon\" name={iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n render() {\n return (\n <Host role=\"checkbox\" aria-checked={this.checked} aria-disabled={this.disabled} aria-required={this.required} aria-invalid={this.status === 'error'}>\n <div class={this.getClasses()} style={this.styles} onClick={this.handleClick}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n textOverflow={this.overflowLabel}\n class={`label${this.overflowLabel === 'single' ? ' textoverflow-single' : ''}`}\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}\n >\n {this.label}\n </cura-label>\n {this.required && (\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\">\n *{' '}\n </cura-paragraph>\n )}\n </div>\n <cura-label textOverflow={this.overflowHelper} color={this.assignColor('message')} size=\"xsmall\" class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <div class={'checkbox'} tabIndex={this.ontabindex}>\n <input\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n required={this.required}\n checked={this.checked}\n indeterminate={this.indeterminate}\n />\n {this.getIcon()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"cura-checkbox.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,0gGAA0gG;;MCSrhG,YAAY,GAAA,MAAA;AANzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAOE;;;AAGG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;;AAGG;AACqC,QAAA,IAAa,CAAA,aAAA,GAAY,KAAK;AACtE;;;AAGG;AACqC,QAAA,IAAM,CAAA,MAAA,GAAoC,SAAS;AAC3F;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAKlD;;AAEG;AACsB,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAC/C;;;AAGG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAqB,MAAM;AAS5D;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAiC,QAAQ;AACtE;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAqB,OAAO;AAC9C;;;AAGG;AACK,QAAA,IAAS,CAAA,SAAA,GAAqB,MAAM;AAC5C;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAG,QAAQ;AAExB;;;;;;;AAOG;AACsB,QAAA,IAAa,CAAA,aAAA,GAA+B,MAAM;AAE3E;;;;;;;AAOG;AACsB,QAAA,IAAc,CAAA,cAAA,GAA+B,MAAM;AAEnE,QAAA,IAAM,CAAA,MAAA,GAAG,EAAE;QAQpB,IAAgB,CAAA,gBAAA,GAAG,MAAM,IAAI,CAAC,UAAU,KAAK,MAAM;QAEnD,IAAe,CAAA,eAAA,GAAG,MAAM,IAAI,CAAC,SAAS,KAAK,MAAM;AAyFjD,QAA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AAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,EAAA,EAC9GA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACF,CACT,EACNA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAA,EAC/CA,OAAA,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,CAAA,EACD,IAAI,CAAC,OAAO,EAAE,CACX,CACF,CACD;;;;;;;;;;;;;;;","names":["formsSizes","h","Host"],"sources":["src/components/forms/cura-checkbox/cura-checkbox.scss?tag=cura-checkbox&encapsulation=shadow","src/components/forms/cura-checkbox/cura-checkbox.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n}\n\n/* Container e Layout */\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n}\n\n.position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n}\n\n.info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n}\n\n.label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n}\n\n.label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n}\n\n/* Control e Checkbox */\n.control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n}\n\n.checkbox {\n appearance: none;\n border: 2px solid var(--neutral-base-neutral-medium);\n border-radius: 4px;\n background: var(--neutral-black-neutral-purewhite);\n flex: 1 0;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n}\n\n.icon {\n position: absolute;\n display: flex;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n/* Estados de Foco */\n.checkbox:focus {\n border-color: var(--info-base) !important;\n}\n\n/* Estado Disabled */\n.disabled .checkbox {\n background: var(--neutral-black-neutral-white);\n border-color: var(--neutral-darker-neutral-base);\n cursor: not-allowed;\n\n &:hover {\n border-color: var(--neutral-darker-neutral-base) !important;\n }\n}\n\n.disabled.checked .checkbox,\n.disabled.indeterminate .checkbox {\n background: var(--neutral-black-neutral-white);\n border-color: var(--neutral-darker-neutral-base);\n\n &:hover {\n border-color: var(--neutral-base-neutral-white);\n background: var(--primary-base-neutral-white);\n }\n}\n\n.disabled .checkbox:focus {\n border-color: var(--neutral-darker-neutral-base) !important;\n}\n\n/* Estado Checked */\n.checked .checkbox {\n border-color: var(--color-dark);\n background: var(--color-base);\n\n &:hover {\n border-color: var(--color-base) !important;\n background: var(--color-light);\n }\n}\n\n/* Estado Indeterminate */\n.indeterminate .checkbox {\n border-color: var(--color-base);\n background: var(--color-light);\n\n &:hover {\n border-color: var(--color-dark) !important;\n background: var(--color-base);\n }\n}\n\n.checked .icon,\n.indeterminate .icon {\n opacity: 1;\n}\n\n/* Hover para não disabled, default, checked, indeterminate */\n:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover {\n border-color: var(--neutral-purewhite-neutral-dark);\n}\n\n/* Estado Success */\n\n.success.dark .checkbox {\n background: var(--neutral-black);\n}\n\n.success .checkbox {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n}\n\n.success.checked .checkbox {\n border-color: var(--success-dark-base);\n background: var(--success-base-lighter);\n\n &:hover {\n border-color: var(--success-dark-base);\n }\n}\n\n/* Estado Error */\n\n.error.dark .checkbox {\n background: var(--neutral-black);\n}\n\n.error .checkbox {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n}\n\n.error.checked .checkbox {\n border-color: var(--error-dark-base);\n background: var(--error-base-lighter);\n\n &:hover {\n border-color: var(--error-dark-base);\n }\n}\n\n/* Input */\ninput {\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n","import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-checkbox',\n styleUrl: 'cura-checkbox.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraCheckbox {\n /**\n * Reflects the checked state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Reflects the indeterminate state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate: boolean = false;\n /**\n * Status of the checkbox.\n * Can be 'error', 'success', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n /**\n * Reflects the disabled state of the checkbox.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the checkbox.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the checkbox.\n */\n @Prop({ reflect: true }) label: string;\n /**\n * Specifies the tabindex of the checkbox.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the checkbox.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the checkbox.\n */\n @Prop({ reflect: true }) value: string;\n /**\n * Name attribute of the checkbox.\n */\n @Prop({ reflect: true }) name: string;\n /**\n * Size of the checkbox.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * iconColor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() iconColor: 'dark' | 'light' = 'dark';\n /**\n * Color theme of the checkbox.\n */\n @Prop() color = 'accent';\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowLabel: 'none' | 'single' | string = 'none';\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowHelper: 'none' | 'single' | string = 'none';\n\n @State() styles = {};\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string; checked: boolean; indeterminate: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n isDarkBackground = () => this.background === 'dark';\n\n isDarkIconColor = () => this.iconColor === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n /**\n * Watches changes in color and background properties to update styles.\n */\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-lighter', background: `${this.color}-lighter` },\n { name: '--color-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--info-base', background: 'info-base' },\n { name: '--error-base', background: 'error-base' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--success-dark', background: 'success-dark' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--neutral-black', background: 'neutral-black' },\n { name: '--primary-base-neutral-white', background: this.isDarkBackground() ? 'primary-base' : 'neutral-white' },\n { name: '--neutral-base-neutral-medium', background: this.isDarkBackground() ? 'neutral-base' : 'neutral-medium' },\n { name: '--neutral-black-neutral-purewhite', background: this.isDarkBackground() ? 'neutral-black' : 'neutral-purewhite' },\n { name: '--neutral-black-neutral-white', background: this.isDarkBackground() ? 'neutral-black' : 'neutral-white' },\n { name: '--neutral-darker-neutral-base', background: this.isDarkBackground() ? 'neutral-darker' : 'neutral-base' },\n { name: '--neutral-base-neutral-base', background: this.isDarkBackground() ? 'primary-base' : 'neutral-base' },\n { name: '--neutral-purewhite-neutral-dark', background: this.isDarkBackground() ? 'neutral-purewhite' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkBackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-lighter', background: this.isDarkBackground() ? 'success-base' : 'success-lighter' },\n { name: '--success-dark-base', background: this.isDarkBackground() ? 'success-dark' : 'success-base' },\n { name: '--error-base-lighter', background: this.isDarkBackground() ? 'error-base' : 'error-lighter' },\n { name: '--error-dark-base', background: this.isDarkBackground() ? 'error-dark' : 'error-base' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\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; checked: boolean; indeterminate: boolean }) {\n this.value = state.value;\n this.checked = state.checked;\n this.indeterminate = state.indeterminate;\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.value = '';\n this.checked = false;\n this.indeterminate = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.indeterminate = false;\n this.checked = !this.checked;\n this.internals.setFormValue(this.value);\n this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });\n };\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes[this.background] = true;\n classes['indeterminate'] = this.indeterminate;\n classes['position'] = this.position === 'right';\n classes[this.status] = true;\n\n return classes;\n }\n\n /**\n * Assigns color based on status and background theme.\n * @param defaultColor Default color.\n */\n @Watch('background')\n @Watch('iconColor')\n assignColor(type: 'icon' | 'label' | 'message') {\n if (this.disabled) return this.isDarkBackground() ? 'neutral-dark' : 'neutral-dark';\n\n const statusColors = {\n success: {\n icon: 'success-dark',\n label: this.isDarkBackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkBackground() ? 'success-base' : 'success-dark',\n },\n error: {\n icon: 'error-dark',\n label: this.isDarkBackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkBackground() ? 'error-base' : 'error-dark',\n },\n default: {\n icon: this.isDarkIconColor() ? 'neutral-black' : 'neutral-purewhite',\n label: this.isDarkBackground() ? 'neutral-white' : 'neutral-black',\n message: this.isDarkBackground() ? 'primary-lighter' : 'neutral-dark',\n },\n };\n\n return statusColors[this.status][type];\n }\n\n /**\n * Retrieves icon element based on checkbox state.\n */\n getIcon() {\n const iconName = this.indeterminate ? 'minus' : 'check';\n const iconColor = this.assignColor('icon');\n const iconSize = this.size === 'large' ? 20 : 'micro';\n\n return <cura-icon class=\"icon\" name={iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n render() {\n return (\n <Host role=\"checkbox\" aria-checked={this.checked} aria-disabled={this.disabled} aria-required={this.required} aria-invalid={this.status === 'error'}>\n <div class={this.getClasses()} style={this.styles} onClick={this.handleClick}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n textOverflow={this.overflowLabel}\n class={`label${this.overflowLabel === 'single' ? ' textoverflow-single' : ''}`}\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}\n >\n {this.label}\n </cura-label>\n {this.required && (\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\">\n *{' '}\n </cura-paragraph>\n )}\n </div>\n <cura-label textOverflow={this.overflowHelper} color={this.assignColor('message')} size=\"xsmall\" class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <div class={'checkbox'} tabIndex={this.ontabindex}>\n <input\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n required={this.required}\n checked={this.checked}\n indeterminate={this.indeterminate}\n />\n {this.getIcon()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-checkbox.entry.cjs.js","sources":["src/components/forms/cura-checkbox/cura-checkbox.scss?tag=cura-checkbox&encapsulation=shadow","src/components/forms/cura-checkbox/cura-checkbox.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n}\n\n/* Container e Layout */\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n}\n\n.position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n}\n\n.info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n}\n\n.label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n}\n\n.label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n}\n\n/* Control e Checkbox */\n.control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n}\n\n.checkbox {\n appearance: none;\n border: 2px solid var(--neutral-base-neutral-medium);\n border-radius: 4px;\n background: var(--neutral-black-neutral-purewhite);\n flex: 1 0;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n}\n\n.icon {\n position: absolute;\n display: flex;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n/* Estados de Foco */\n.checkbox:focus {\n border-color: var(--info-base) !important;\n}\n\n/* Estado Disabled */\n.disabled .checkbox {\n background: var(--neutral-black-neutral-white);\n border-color: var(--neutral-darker-neutral-base);\n cursor: not-allowed;\n\n &:hover {\n border-color: var(--neutral-darker-neutral-base) !important;\n }\n}\n\n.disabled.checked .checkbox,\n.disabled.indeterminate .checkbox {\n background: var(--neutral-black-neutral-white);\n border-color: var(--neutral-darker-neutral-base);\n\n &:hover {\n border-color: var(--neutral-base-neutral-white);\n background: var(--primary-base-neutral-white);\n }\n}\n\n.disabled .checkbox:focus {\n border-color: var(--neutral-darker-neutral-base) !important;\n}\n\n/* Estado Checked */\n.checked .checkbox {\n border-color: var(--color-dark);\n background: var(--color-base);\n\n &:hover {\n border-color: var(--color-base) !important;\n background: var(--color-light);\n }\n}\n\n/* Estado Indeterminate */\n.indeterminate .checkbox {\n border-color: var(--color-base);\n background: var(--color-light);\n\n &:hover {\n border-color: var(--color-dark) !important;\n background: var(--color-base);\n }\n}\n\n.checked .icon,\n.indeterminate .icon {\n opacity: 1;\n}\n\n/* Hover para não disabled, default, checked, indeterminate */\n:not(.disabled):not(.checked):not(.indeterminate) .checkbox:hover {\n border-color: var(--neutral-purewhite-neutral-dark);\n}\n\n/* Estado Success */\n\n.success.dark .checkbox {\n background: var(--neutral-black);\n}\n\n.success .checkbox {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n}\n\n.success.checked .checkbox {\n border-color: var(--success-dark-base);\n background: var(--success-base-lighter);\n\n &:hover {\n border-color: var(--success-dark-base);\n }\n}\n\n/* Estado Error */\n\n.error.dark .checkbox {\n background: var(--neutral-black);\n}\n\n.error .checkbox {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n}\n\n.error.checked .checkbox {\n border-color: var(--error-dark-base);\n background: var(--error-base-lighter);\n\n &:hover {\n border-color: var(--error-dark-base);\n }\n}\n\n/* Input */\ninput {\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n","import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-checkbox',\n styleUrl: 'cura-checkbox.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraCheckbox {\n /**\n * Reflects the checked state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Reflects the indeterminate state of the checkbox.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) indeterminate: boolean = false;\n /**\n * Status of the checkbox.\n * Can be 'error', 'success', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n /**\n * Reflects the disabled state of the checkbox.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the checkbox.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the checkbox.\n */\n @Prop({ reflect: true }) label: string;\n /**\n * Specifies the tabindex of the checkbox.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the checkbox.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the checkbox.\n */\n @Prop({ reflect: true }) value: string;\n /**\n * Name attribute of the checkbox.\n */\n @Prop({ reflect: true }) name: string;\n /**\n * Size of the checkbox.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * iconColor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() iconColor: 'dark' | 'light' = 'dark';\n /**\n * Color theme of the checkbox.\n */\n @Prop() color = 'accent';\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowLabel: 'none' | 'single' | string = 'none';\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowHelper: 'none' | 'single' | string = 'none';\n\n @State() styles = {};\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string; checked: boolean; indeterminate: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n isDarkBackground = () => this.background === 'dark';\n\n isDarkIconColor = () => this.iconColor === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n /**\n * Watches changes in color and background properties to update styles.\n */\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-lighter', background: `${this.color}-lighter` },\n { name: '--color-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--info-base', background: 'info-base' },\n { name: '--error-base', background: 'error-base' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--success-dark', background: 'success-dark' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--neutral-black', background: 'neutral-black' },\n { name: '--primary-base-neutral-white', background: this.isDarkBackground() ? 'primary-base' : 'neutral-white' },\n { name: '--neutral-base-neutral-medium', background: this.isDarkBackground() ? 'neutral-base' : 'neutral-medium' },\n { name: '--neutral-black-neutral-purewhite', background: this.isDarkBackground() ? 'neutral-black' : 'neutral-purewhite' },\n { name: '--neutral-black-neutral-white', background: this.isDarkBackground() ? 'neutral-black' : 'neutral-white' },\n { name: '--neutral-darker-neutral-base', background: this.isDarkBackground() ? 'neutral-darker' : 'neutral-base' },\n { name: '--neutral-base-neutral-base', background: this.isDarkBackground() ? 'primary-base' : 'neutral-base' },\n { name: '--neutral-purewhite-neutral-dark', background: this.isDarkBackground() ? 'neutral-purewhite' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkBackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-lighter', background: this.isDarkBackground() ? 'success-base' : 'success-lighter' },\n { name: '--success-dark-base', background: this.isDarkBackground() ? 'success-dark' : 'success-base' },\n { name: '--error-base-lighter', background: this.isDarkBackground() ? 'error-base' : 'error-lighter' },\n { name: '--error-dark-base', background: this.isDarkBackground() ? 'error-dark' : 'error-base' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\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; checked: boolean; indeterminate: boolean }) {\n this.value = state.value;\n this.checked = state.checked;\n this.indeterminate = state.indeterminate;\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.value = '';\n this.checked = false;\n this.indeterminate = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.indeterminate = false;\n this.checked = !this.checked;\n this.internals.setFormValue(this.value);\n this.onchange.emit({ value: this.value, checked: this.checked, indeterminate: this.indeterminate });\n };\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes[this.background] = true;\n classes['indeterminate'] = this.indeterminate;\n classes['position'] = this.position === 'right';\n classes[this.status] = true;\n\n return classes;\n }\n\n /**\n * Assigns color based on status and background theme.\n * @param defaultColor Default color.\n */\n @Watch('background')\n @Watch('iconColor')\n assignColor(type: 'icon' | 'label' | 'message') {\n if (this.disabled) return this.isDarkBackground() ? 'neutral-dark' : 'neutral-dark';\n\n const statusColors = {\n success: {\n icon: 'success-dark',\n label: this.isDarkBackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkBackground() ? 'success-base' : 'success-dark',\n },\n error: {\n icon: 'error-dark',\n label: this.isDarkBackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkBackground() ? 'error-base' : 'error-dark',\n },\n default: {\n icon: this.isDarkIconColor() ? 'neutral-black' : 'neutral-purewhite',\n label: this.isDarkBackground() ? 'neutral-white' : 'neutral-black',\n message: this.isDarkBackground() ? 'primary-lighter' : 'neutral-dark',\n },\n };\n\n return statusColors[this.status][type];\n }\n\n /**\n * Retrieves icon element based on checkbox state.\n */\n getIcon() {\n const iconName = this.indeterminate ? 'minus' : 'check';\n const iconColor = this.assignColor('icon');\n const iconSize = this.size === 'large' ? 20 : 'micro';\n\n return <cura-icon class=\"icon\" name={iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n render() {\n return (\n <Host role=\"checkbox\" aria-checked={this.checked} aria-disabled={this.disabled} aria-required={this.required} aria-invalid={this.status === 'error'}>\n <div class={this.getClasses()} style={this.styles} onClick={this.handleClick}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n textOverflow={this.overflowLabel}\n class={`label${this.overflowLabel === 'single' ? ' textoverflow-single' : ''}`}\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}\n >\n {this.label}\n </cura-label>\n {this.required && (\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\">\n *{' '}\n </cura-paragraph>\n )}\n </div>\n <cura-label textOverflow={this.overflowHelper} color={this.assignColor('message')} size=\"xsmall\" class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <div class={'checkbox'} tabIndex={this.ontabindex}>\n <input\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n required={this.required}\n checked={this.checked}\n indeterminate={this.indeterminate}\n />\n {this.getIcon()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":["formsSizes","h","Host"],"mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,0gGAA0gG;;MCSrhG,YAAY,GAAA,MAAA;AANzB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAOE;;;AAGG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;;AAGG;AACqC,QAAA,IAAa,CAAA,aAAA,GAAY,KAAK;AACtE;;;AAGG;AACqC,QAAA,IAAM,CAAA,MAAA,GAAoC,SAAS;AAC3F;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAKlD;;AAEG;AACsB,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAC/C;;;AAGG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAqB,MAAM;AAS5D;;;AAGG;AACsB,QAAA,IAAI,CAAA,IAAA,GAAiC,QAAQ;AACtE;;;AAGG;AACK,QAAA,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E.js');
|
|
4
|
+
require('./cura-theme-module-CJkmAxBA.js');
|
|
6
5
|
|
|
7
6
|
const curaDisplayCss = ":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:3em;font-weight:var(--font-weight-bold);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.2857142857em;letter-spacing:-1.68px}:host h1 ::slotted(b),:host h1 ::slotted(strong),:host h2 ::slotted(b),:host h2 ::slotted(strong),:host h3 ::slotted(b),:host h3 ::slotted(strong),:host h4 ::slotted(b),:host h4 ::slotted(strong),:host h5 ::slotted(b),:host h5 ::slotted(strong),:host h6 ::slotted(b),:host h6 ::slotted(strong){font-weight:var(--font-weight-bold)}:host h1 ::slotted(a),:host h2 ::slotted(a),:host h3 ::slotted(a),:host h4 ::slotted(a),:host h5 ::slotted(a),:host h6 ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%;cursor:pointer}:host h1 ::slotted(u),:host h2 ::slotted(u),:host h3 ::slotted(u),:host h4 ::slotted(u),:host h5 ::slotted(u),:host h6 ::slotted(u){text-underline-offset:10%}:host h1 ::slotted(i),:host h1 ::slotted(em),:host h2 ::slotted(i),:host h2 ::slotted(em),:host h3 ::slotted(i),:host h3 ::slotted(em),:host h4 ::slotted(i),:host h4 ::slotted(em),:host h5 ::slotted(i),:host h5 ::slotted(em),:host h6 ::slotted(i),:host h6 ::slotted(em){font-style:italic;font-weight:var(--font-weight-medium)}:host h1 ::slotted(abbr),:host h2 ::slotted(abbr),:host h3 ::slotted(abbr),:host h4 ::slotted(abbr),:host h5 ::slotted(abbr),:host h6 ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:3.429em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:2.8571428571em;letter-spacing:-1.92px}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.286em;line-height:calc(var(--line-height) + 5%)}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.5714285714em;letter-spacing:-1.2px}}";
|
|
8
|
-
const CuraDisplayStyle0 = curaDisplayCss;
|
|
9
7
|
|
|
10
8
|
const CuraDisplay = class {
|
|
11
9
|
constructor(hostRef) {
|
|
12
10
|
index.registerInstance(this, hostRef);
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...
|
|
13
|
+
* Values: 1(default) to 6.
|
|
14
|
+
*/
|
|
14
15
|
this.level = 1;
|
|
16
|
+
/**
|
|
17
|
+
* Display size.
|
|
18
|
+
* Values: 'large' (default) | 'small'.
|
|
19
|
+
*/
|
|
15
20
|
this.size = 'large';
|
|
21
|
+
/**
|
|
22
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text.
|
|
23
|
+
* Values: Color from design system scheme. Default to 'accent-dark'.
|
|
24
|
+
*/
|
|
16
25
|
this.spotColor = 'accent-dark';
|
|
17
|
-
|
|
26
|
+
/**
|
|
27
|
+
* CSS margin-block property values.
|
|
28
|
+
* Default to 1.25em
|
|
29
|
+
*/
|
|
18
30
|
this.marginBlock = '1.25em';
|
|
31
|
+
/**
|
|
32
|
+
* CSS line-height property values.
|
|
33
|
+
* Default to 140%
|
|
34
|
+
*/
|
|
19
35
|
this.lineHeight = '120%';
|
|
36
|
+
this.theme = window.CuraAPI.theme;
|
|
20
37
|
this.styles = {};
|
|
21
38
|
}
|
|
22
39
|
handleChangeColor() {
|
|
@@ -77,8 +94,9 @@ const CuraDisplay = class {
|
|
|
77
94
|
"spotColor": ["handleChangeColor"]
|
|
78
95
|
}; }
|
|
79
96
|
};
|
|
80
|
-
CuraDisplay.style =
|
|
97
|
+
CuraDisplay.style = curaDisplayCss;
|
|
81
98
|
|
|
82
99
|
exports.cura_display = CuraDisplay;
|
|
100
|
+
//# sourceMappingURL=cura-display.entry.cjs.js.map
|
|
83
101
|
|
|
84
102
|
//# sourceMappingURL=cura-display.cjs.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-display.entry.cjs.js","mappings":"
|
|
1
|
+
{"file":"cura-display.entry.cjs.js","mappings":";;;;;AAAA,MAAM,cAAc,GAAG,mvEAAmvE;;MCO7vE,WAAW,GAAA,MAAA;AALxB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAOE;;;AAGG;AACoB,QAAA,IAAK,CAAA,KAAA,GAA0B,CAAC;AAEvD;;;AAGG;AACoB,QAAA,IAAI,CAAA,IAAA,GAAsB,OAAO;AAExD;;;AAGE;AACM,QAAA,IAAS,CAAA,SAAA,GAAG,aAAa;AAajC;;;AAGG;AACoB,QAAA,IAAW,CAAA,WAAA,GAAG,QAAQ;AAE7C;;;AAGG;AACoB,QAAA,IAAU,CAAA,UAAA,GAAG,MAAM;QAY1C,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK;AACnB,QAAA,IAAM,CAAA,MAAA,GAAG,EAAE;AAiErB;IA5FC,iBAAiB,GAAA;QACf,IAAI,CAAC,SAAS,EAAE;;IA4BlB,iBAAiB,GAAA;QACf,IAAI,CAAC,iBAAiB,EAAE;QACxB,IAAI,CAAC,SAAS,EAAE;;IAGlB,iBAAiB,GAAA;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;QAC9C,IAAI,CAAC,MAAM,GAAG;AACZ,YAAA,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC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AS,CAAC;;IAGjD,MAAM,GAAA;AACJ,QAAA,QACEA,OAAC,CAAAC,UAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAC,SAAS,EAAA,YAAA,EAAa,IAAI,CAAC,KAAK,EAAA,EACxE,IAAI,CAAC,aAAa,EAAE,CACjB;;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/text/cura-display/cura-display.scss?tag=cura-display&encapsulation=shadow","src/components/text/cura-display/cura-display.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n h1, h2, h3, h4, h5, h6 {\n font-family: var(--font-family);\n font-size: 3em;\n font-weight: var(--font-weight-bold);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0px;\n\n &.small {\n font-size: 2.2857142857142856em;\n letter-spacing: -1.68px;\n }\n\n ::slotted(b), ::slotted(strong) {\n font-weight: var(--font-weight-bold);\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n cursor: pointer;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(i), ::slotted(em) {\n font-style: italic;\n font-weight: var(--font-weight-medium);\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n }\n\n @include medium-large() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 3.429em;\n\n &.small {\n font-size: 2.857142857142857em;\n letter-spacing: -1.92px;\n }\n }\n }\n\n @include xlarge-only() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 4.286em;\n line-height: calc(var(--line-height) + 5%);\n\n &.small {\n font-size: 3.5714285714285716em;\n letter-spacing: -1.2px;\n }\n }\n }\n\n}\n","import { Component, Host, h, Element, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-display',\n styleUrl: 'cura-display.scss',\n shadow: true,\n})\nexport class CuraDisplay {\n\n /**\n * Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...\n * Values: 1(default) to 6.\n */\n @Prop({reflect: true}) level: 1 | 2 | 3 | 4 | 5 | 6 = 1;\n\n /**\n * Display size.\n * Values: 'large' (default) | 'small'.\n */\n @Prop({reflect: true}) size: 'large' | 'small' = 'large';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop() spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '1.25em';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '120%';\n\n /**\n * Host element <cura-display>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n theme = window.CuraAPI.theme;\n @State() styles = {};\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-bold': this.weights.bold,\n '--font-weight-medium': this.weights.medium\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n return classes;\n }\n\n getHeadingTag() {\n const classes = this.getClasses();\n const tags = {\n '1': <h1 style={this.styles} class={classes}><slot></slot></h1>,\n '2': <h2 style={this.styles} class={classes}><slot></slot></h2>,\n '3': <h3 style={this.styles} class={classes}><slot></slot></h3>,\n '4': <h4 style={this.styles} class={classes}><slot></slot></h4>,\n '5': <h5 style={this.styles} class={classes}><slot></slot></h5>,\n '6': <h6 style={this.styles} class={classes}><slot></slot></h6>,\n 'default': <h1 style={this.styles} class={classes}><slot></slot></h1>\n };\n return tags[`${this.level}`] || tags['default'];\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()} role=\"heading\" aria-level={this.level}>\n { this.getHeadingTag() }\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-display.entry.cjs.js","sources":["src/components/text/cura-display/cura-display.scss?tag=cura-display&encapsulation=shadow","src/components/text/cura-display/cura-display.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n h1, h2, h3, h4, h5, h6 {\n font-family: var(--font-family);\n font-size: 3em;\n font-weight: var(--font-weight-bold);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0px;\n\n &.small {\n font-size: 2.2857142857142856em;\n letter-spacing: -1.68px;\n }\n\n ::slotted(b), ::slotted(strong) {\n font-weight: var(--font-weight-bold);\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n cursor: pointer;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(i), ::slotted(em) {\n font-style: italic;\n font-weight: var(--font-weight-medium);\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n }\n\n @include medium-large() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 3.429em;\n\n &.small {\n font-size: 2.857142857142857em;\n letter-spacing: -1.92px;\n }\n }\n }\n\n @include xlarge-only() {\n h1, h2, h3, h4, h5, h6 {\n font-size: 4.286em;\n line-height: calc(var(--line-height) + 5%);\n\n &.small {\n font-size: 3.5714285714285716em;\n letter-spacing: -1.2px;\n }\n }\n }\n\n}\n","import { Component, Host, h, Element, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-display',\n styleUrl: 'cura-display.scss',\n shadow: true,\n})\nexport class CuraDisplay {\n\n /**\n * Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...\n * Values: 1(default) to 6.\n */\n @Prop({reflect: true}) level: 1 | 2 | 3 | 4 | 5 | 6 = 1;\n\n /**\n * Display size.\n * Values: 'large' (default) | 'small'.\n */\n @Prop({reflect: true}) size: 'large' | 'small' = 'large';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop() spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '1.25em';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '120%';\n\n /**\n * Host element <cura-display>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n theme = window.CuraAPI.theme;\n @State() styles = {};\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),\n '--font-size': window.CuraAPI.theme.fonts.getSize(),\n '--font-weight-bold': this.weights.bold,\n '--font-weight-medium': this.weights.medium\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n return classes;\n }\n\n getHeadingTag() {\n const classes = this.getClasses();\n const tags = {\n '1': <h1 style={this.styles} class={classes}><slot></slot></h1>,\n '2': <h2 style={this.styles} class={classes}><slot></slot></h2>,\n '3': <h3 style={this.styles} class={classes}><slot></slot></h3>,\n '4': <h4 style={this.styles} class={classes}><slot></slot></h4>,\n '5': <h5 style={this.styles} class={classes}><slot></slot></h5>,\n '6': <h6 style={this.styles} class={classes}><slot></slot></h6>,\n 'default': <h1 style={this.styles} class={classes}><slot></slot></h1>\n };\n return tags[`${this.level}`] || tags['default'];\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()} role=\"heading\" aria-level={this.level}>\n { this.getHeadingTag() }\n </Host>\n );\n }\n\n}\n"],"names":["h","Host"],"mappings":";;;;;AAAA,MAAM,cAAc,GAAG,mvEAAmvE;;MCO7vE,WAAW,GAAA,MAAA;AALxB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAOE;;;AAGG;AACoB,QAAA,IAAK,CAAA,KAAA,GAA0B,CAAC;AAEvD;;;AAGG;AACoB,QAAA,IAAI,CAAA,IAAA,GAAsB,OAAO;AAExD;;;AAGE;AACM,QAAA,IAAS,CAAA,SAAA,GAAG,aAAa;AAajC;;;AAGG;AACoB,QAAA,IAAW,CAAA,WAAA,GAAG,QAAQ;AAE7C;;;AAGG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