@rededor/cura 0.5.4 → 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/icons/iconset-default-tmp.svg +8 -0
- package/dist/assets/icons/iconset-default.svg +1 -1
- package/dist/cjs/app-globals-bcffd819.js +511 -0
- package/dist/cjs/app-globals-bcffd819.js.map +1 -0
- package/dist/cjs/cura-accordion_9.cjs.entry.js +544 -0
- package/dist/cjs/cura-accordion_9.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-alert.cjs.entry.js +57 -55
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-avatar.cjs.entry.js +68 -0
- package/dist/cjs/cura-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +102 -71
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-select.cjs.entry.js +91 -85
- package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-transparent_2.cjs.entry.js +4055 -0
- package/dist/cjs/cura-button-transparent_2.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-calendar.cjs.entry.js +3913 -0
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-card.cjs.entry.js +53 -0
- package/dist/cjs/cura-card.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-checkbox.cjs.entry.js +168 -131
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-display.cjs.entry.js +63 -62
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +22 -0
- package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +55 -0
- package/dist/cjs/cura-dropdown-search-option.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-dropdown-search.cjs.entry.js +209 -0
- package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-forms.definitions-c164f1b8.js +20 -0
- package/dist/cjs/cura-forms.definitions-c164f1b8.js.map +1 -0
- package/dist/cjs/cura-icon.definitions-8d714f6a.js +21 -0
- package/dist/cjs/cura-icon.definitions-8d714f6a.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +24 -23
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.cjs.entry.js +142 -103
- package/dist/cjs/cura-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-select_2.cjs.entry.js +325 -0
- package/dist/cjs/cura-select_2.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +113 -78
- package/dist/cjs/cura-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/cura.cjs.js +13 -22
- package/dist/cjs/cura.cjs.js.map +1 -1
- package/dist/cjs/index-5b63ff7a.js +1529 -0
- package/dist/cjs/index-5b63ff7a.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +6 -31
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/api/cura-api.js +30 -30
- package/dist/collection/api/cura-api.js.map +1 -1
- package/dist/collection/api/cura-api.type.js +2 -2
- package/dist/collection/api/cura-api.type.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js +10 -10
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js +72 -72
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-fonts-module.js +28 -28
- package/dist/collection/api/modules/cura-theme-fonts-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-module.js +66 -66
- package/dist/collection/api/modules/cura-theme-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-spacing-module.js +9 -9
- package/dist/collection/api/modules/cura-theme-spacing-module.js.map +1 -1
- package/dist/collection/api/theme-presets/static.js +63 -63
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/collection/api/theme-presets/theme-default.js +41 -41
- package/dist/collection/api/theme-presets/theme-default.js.map +1 -1
- package/dist/collection/api/theme-presets/theme-legacy-default.js +24 -24
- package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -1
- package/dist/collection/api/theme-presets/theme-maternity.js +38 -38
- package/dist/collection/api/theme-presets/theme-maternity.js.map +1 -1
- package/dist/collection/api/theme-presets/theme-oncology.js +46 -46
- package/dist/collection/api/theme-presets/theme-oncology.js.map +1 -1
- package/dist/collection/api/theme-presets/theme-presets.js +8 -8
- package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-tmp.svg +8 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets/images/avatar/doctor-default.svg +8 -0
- package/dist/collection/assets/images/avatar/dora-default.svg +5 -0
- package/dist/collection/assets/images/avatar/patient-default.svg +12 -0
- package/dist/collection/assets/images/avatar/unit-default.svg +9 -0
- package/dist/collection/assets/images/logoCura.svg +15 -0
- package/dist/collection/assets-raw/icons/default/contacts.svg +3 -0
- package/dist/collection/assets-raw/icons/default/scheduleCancel.svg +3 -0
- package/dist/collection/collection-manifest.json +29 -21
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +267 -267
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +127 -127
- package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +196 -196
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.css +112 -46
- package/dist/collection/components/buttons/cura-button/cura-button.js +368 -306
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js +184 -159
- package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +37 -64
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +374 -306
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +184 -159
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +36 -23
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +265 -260
- 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.css +32 -50
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +339 -306
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +172 -159
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +182 -164
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
- package/dist/collection/components/cura-alert/cura-alert.stories.js +90 -77
- package/dist/collection/components/cura-alert/cura-alert.stories.js.map +1 -1
- package/dist/collection/components/cura-avatar/cura-avatar.css +24 -0
- package/dist/collection/components/cura-avatar/cura-avatar.definitions.js +7 -0
- package/dist/collection/components/cura-avatar/cura-avatar.definitions.js.map +1 -0
- package/dist/collection/components/cura-avatar/cura-avatar.js +231 -0
- package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -0
- package/dist/collection/components/cura-avatar/cura-avatar.stories.js +198 -0
- package/dist/collection/components/cura-avatar/cura-avatar.stories.js.map +1 -0
- package/dist/collection/components/cura-calendar/cura-calendar.css +181 -0
- package/dist/collection/components/cura-calendar/cura-calendar.js +681 -0
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -0
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js +126 -0
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -0
- package/dist/collection/components/cura-card/cura-card.css +175 -0
- package/dist/collection/components/cura-card/cura-card.js +201 -0
- package/dist/collection/components/cura-card/cura-card.js.map +1 -0
- package/dist/collection/components/cura-card/cura-card.stories.js +127 -0
- package/dist/collection/components/cura-card/cura-card.stories.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.definitions.js +11 -11
- package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +151 -151
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js +60 -60
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +37 -37
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js +7 -7
- package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js +52 -52
- package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +19 -11
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +457 -427
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js +170 -170
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.css +50 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +136 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.stories.js +56 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.css +10 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +19 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js.map +1 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +149 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +384 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js +181 -0
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-forms.definitions.js +12 -12
- package/dist/collection/components/forms/cura-forms.definitions.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.css +849 -139
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +732 -641
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +217 -196
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +40 -40
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +187 -187
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.stories.js +108 -108
- package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +395 -363
- package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.stories.js +150 -150
- package/dist/collection/components/forms/cura-radio/cura-radio.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.css +519 -0
- package/dist/collection/components/forms/cura-select/cura-select.js +444 -0
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -0
- package/dist/collection/components/forms/cura-select/cura-select.stories.js +144 -0
- package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-select-options/cura-select-option.css +28 -0
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +138 -0
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js.map +1 -0
- package/dist/collection/components/forms/cura-switch/cura-switch.css +88 -24
- package/dist/collection/components/forms/cura-switch/cura-switch.js +292 -264
- package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.stories.js +115 -115
- package/dist/collection/components/forms/cura-switch/cura-switch.stories.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +74 -74
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +41 -41
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +174 -174
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.stories.js +97 -97
- package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +220 -220
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js +117 -117
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +168 -168
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +98 -98
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/rededor-cura-start.js +7 -7
- package/dist/collection/rededor-cura-start.js.map +1 -1
- package/dist/collection/utils/utils.js +11 -11
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/cura-accordion-item.d.ts +2 -2
- package/dist/components/cura-accordion-item.js +62 -61
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-accordion.d.ts +2 -2
- package/dist/components/cura-accordion.js +108 -104
- package/dist/components/cura-accordion.js.map +1 -1
- package/dist/components/cura-alert.d.ts +2 -2
- package/dist/components/cura-alert.js +93 -88
- package/dist/components/cura-alert.js.map +1 -1
- package/dist/components/cura-avatar.d.ts +11 -0
- package/dist/components/cura-avatar.js +95 -0
- package/dist/components/cura-avatar.js.map +1 -0
- package/dist/components/cura-button-outline.d.ts +2 -2
- package/dist/components/cura-button-outline.js +147 -109
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-select.d.ts +2 -2
- package/dist/components/cura-button-select.js +129 -113
- package/dist/components/cura-button-select.js.map +1 -1
- package/dist/components/cura-button-transparent.d.ts +2 -2
- package/dist/components/cura-button-transparent.js +1 -116
- package/dist/components/cura-button-transparent.js.map +1 -1
- package/dist/components/cura-button-transparent2.js +144 -0
- package/dist/components/cura-button-transparent2.js.map +1 -0
- package/dist/components/cura-button.d.ts +2 -2
- package/dist/components/cura-button.js +145 -109
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-calendar.d.ts +11 -0
- package/dist/components/cura-calendar.js +3969 -0
- package/dist/components/cura-calendar.js.map +1 -0
- package/dist/components/cura-card.d.ts +11 -0
- package/dist/components/cura-card.js +75 -0
- package/dist/components/cura-card.js.map +1 -0
- package/dist/components/cura-checkbox.d.ts +2 -2
- package/dist/components/cura-checkbox.js +210 -174
- package/dist/components/cura-checkbox.js.map +1 -1
- package/dist/components/cura-display.d.ts +2 -2
- package/dist/components/cura-display.js +85 -81
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-dropdown-search-option-title.d.ts +11 -0
- package/dist/components/cura-dropdown-search-option-title.js +42 -0
- package/dist/components/cura-dropdown-search-option-title.js.map +1 -0
- package/dist/components/cura-dropdown-search-option.d.ts +11 -0
- package/dist/components/cura-dropdown-search-option.js +82 -0
- package/dist/components/cura-dropdown-search-option.js.map +1 -0
- package/dist/components/cura-dropdown-search.d.ts +11 -0
- package/dist/components/cura-dropdown-search.js +272 -0
- package/dist/components/cura-dropdown-search.js.map +1 -0
- package/dist/components/cura-forms.definitions.js +12 -12
- package/dist/components/cura-forms.definitions.js.map +1 -1
- package/dist/components/cura-heading.d.ts +2 -2
- package/dist/components/cura-heading2.js +97 -93
- package/dist/components/cura-heading2.js.map +1 -1
- package/dist/components/cura-icon.d.ts +2 -2
- package/dist/components/cura-icon2.js +74 -69
- package/dist/components/cura-icon2.js.map +1 -1
- package/dist/components/cura-icons-view.d.ts +2 -2
- package/dist/components/cura-icons-view.js +57 -56
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-input-text.d.ts +2 -2
- package/dist/components/cura-input-text.js +1 -3954
- package/dist/components/cura-input-text.js.map +1 -1
- package/dist/{cjs/cura-input-text.cjs.entry.js → components/cura-input-text2.js} +393 -283
- package/dist/components/cura-input-text2.js.map +1 -0
- package/dist/components/cura-label.d.ts +2 -2
- package/dist/components/cura-label2.js +81 -77
- package/dist/components/cura-label2.js.map +1 -1
- package/dist/components/cura-loader-circle.d.ts +2 -2
- package/dist/components/cura-loader-circle2.js +41 -40
- package/dist/components/cura-loader-circle2.js.map +1 -1
- package/dist/components/cura-page-template.d.ts +2 -2
- package/dist/components/cura-page-template.js +36 -35
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.d.ts +2 -2
- package/dist/components/cura-paragraph2.js +79 -75
- package/dist/components/cura-paragraph2.js.map +1 -1
- package/dist/components/cura-radio.d.ts +2 -2
- package/dist/components/cura-radio.js +176 -139
- package/dist/components/cura-radio.js.map +1 -1
- package/dist/components/cura-select-option.d.ts +11 -0
- package/dist/components/cura-select-option.js +8 -0
- package/dist/components/cura-select-option.js.map +1 -0
- package/dist/components/cura-select-option2.js +87 -0
- package/dist/components/cura-select-option2.js.map +1 -0
- package/dist/components/cura-select.d.ts +11 -0
- package/dist/components/cura-select.js +8 -0
- package/dist/components/cura-select.js.map +1 -0
- package/dist/components/cura-select2.js +308 -0
- package/dist/components/cura-select2.js.map +1 -0
- package/dist/components/cura-switch.d.ts +2 -2
- package/dist/components/cura-switch.js +138 -105
- package/dist/components/cura-switch.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +482 -466
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/p-12d75346.entry.js +2 -0
- package/dist/cura/p-12d75346.entry.js.map +1 -0
- package/dist/cura/p-2176f253.entry.js +2 -0
- package/dist/cura/p-2176f253.entry.js.map +1 -0
- package/dist/cura/p-22292bfa.entry.js +2 -0
- package/dist/cura/p-22292bfa.entry.js.map +1 -0
- package/dist/cura/p-2a8be665.entry.js +2 -0
- package/dist/cura/p-2a8be665.entry.js.map +1 -0
- package/dist/cura/p-2d70b515.entry.js +2 -0
- package/dist/cura/p-2d70b515.entry.js.map +1 -0
- package/dist/cura/p-3c2ebc3a.entry.js +2 -0
- package/dist/cura/p-3c2ebc3a.entry.js.map +1 -0
- package/dist/cura/p-45a0a5e8.entry.js +2 -0
- package/dist/cura/p-45a0a5e8.entry.js.map +1 -0
- package/dist/cura/p-586bbe43.js +3 -0
- package/dist/cura/p-586bbe43.js.map +1 -0
- package/dist/cura/p-5d8e3ee3.entry.js +2 -0
- package/dist/cura/p-5d8e3ee3.entry.js.map +1 -0
- package/dist/cura/{p-f8fffdc1.js → p-70c369b1.js} +1 -1
- package/dist/cura/p-70c369b1.js.map +1 -0
- package/dist/cura/p-7c41f034.entry.js +2 -0
- package/dist/cura/p-7c41f034.entry.js.map +1 -0
- package/dist/cura/p-8cecf9e5.entry.js +2 -0
- package/dist/cura/p-8cecf9e5.entry.js.map +1 -0
- package/dist/cura/p-94b5c3b3.entry.js +2 -0
- package/dist/cura/p-94b5c3b3.entry.js.map +1 -0
- package/dist/cura/p-a5456007.entry.js +2 -0
- package/dist/cura/p-a5456007.entry.js.map +1 -0
- package/dist/cura/{p-c791725b.js → p-a7221f0c.js} +1 -1
- package/dist/{esm-es5/cura-icon.definitions-a63d1862.js.map → cura/p-a7221f0c.js.map} +1 -1
- package/dist/cura/p-cd757625.entry.js +2 -0
- package/dist/cura/p-cd757625.entry.js.map +1 -0
- package/dist/cura/p-de870781.entry.js +2 -0
- package/dist/cura/p-de870781.entry.js.map +1 -0
- package/dist/cura/p-e661bcca.entry.js +2 -0
- package/dist/cura/p-e661bcca.entry.js.map +1 -0
- package/dist/cura/p-ee7388a5.entry.js +2 -0
- package/dist/cura/p-ee7388a5.entry.js.map +1 -0
- package/dist/cura/{p-3688570d.js → p-f9b8f665.js} +1 -1
- package/dist/{esm-es5/cura-forms.definitions-0f774253.js.map → cura/p-f9b8f665.js.map} +1 -1
- package/dist/cura/p-fb9bece3.entry.js +2 -0
- package/dist/cura/p-fb9bece3.entry.js.map +1 -0
- package/dist/esm/app-globals-f2da2b14.js +509 -0
- package/dist/esm/app-globals-f2da2b14.js.map +1 -0
- package/dist/esm/cura-accordion_9.entry.js +532 -0
- package/dist/esm/cura-accordion_9.entry.js.map +1 -0
- package/dist/esm/cura-alert.entry.js +57 -55
- package/dist/esm/cura-alert.entry.js.map +1 -1
- package/dist/esm/cura-avatar.entry.js +64 -0
- package/dist/esm/cura-avatar.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +102 -71
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-select.entry.js +91 -85
- package/dist/esm/cura-button-select.entry.js.map +1 -1
- package/dist/esm/{cura-input-text.entry.js → cura-button-transparent_2.entry.js} +423 -276
- package/dist/esm/cura-button-transparent_2.entry.js.map +1 -0
- package/dist/esm/cura-calendar.entry.js +3909 -0
- package/dist/esm/cura-calendar.entry.js.map +1 -0
- package/dist/esm/cura-card.entry.js +49 -0
- package/dist/esm/cura-card.entry.js.map +1 -0
- package/dist/esm/cura-checkbox.entry.js +168 -131
- package/dist/esm/cura-checkbox.entry.js.map +1 -1
- package/dist/esm/cura-display.entry.js +63 -62
- package/dist/esm/cura-display.entry.js.map +1 -1
- package/dist/esm/cura-dropdown-search-option-title.entry.js +18 -0
- package/dist/esm/cura-dropdown-search-option-title.entry.js.map +1 -0
- package/dist/esm/cura-dropdown-search-option.entry.js +51 -0
- package/dist/esm/cura-dropdown-search-option.entry.js.map +1 -0
- package/dist/esm/cura-dropdown-search.entry.js +205 -0
- package/dist/esm/cura-dropdown-search.entry.js.map +1 -0
- package/dist/esm/cura-forms.definitions-2f963167.js +18 -0
- package/dist/esm/cura-forms.definitions-2f963167.js.map +1 -0
- package/dist/esm/cura-icon.definitions-aaa4e80f.js +18 -0
- package/dist/esm/cura-icon.definitions-aaa4e80f.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +24 -23
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-radio.entry.js +142 -103
- package/dist/esm/cura-radio.entry.js.map +1 -1
- package/dist/esm/cura-select_2.entry.js +320 -0
- package/dist/esm/cura-select_2.entry.js.map +1 -0
- package/dist/esm/cura-switch.entry.js +113 -78
- package/dist/esm/cura-switch.entry.js.map +1 -1
- package/dist/esm/cura.js +14 -23
- package/dist/esm/cura.js.map +1 -1
- package/dist/esm/index-b6c443d5.js +1500 -0
- package/dist/esm/index-b6c443d5.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +8 -33
- package/dist/esm/loader.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/loader/cdn.js +1 -3
- package/dist/loader/index.cjs.js +1 -3
- package/dist/loader/index.d.ts +4 -1
- package/dist/loader/index.es2017.js +1 -3
- package/dist/loader/index.js +1 -3
- package/dist/types/api/cura-api.d.ts +3 -3
- package/dist/types/api/cura-api.type.d.ts +44 -44
- package/dist/types/api/modules/cura-theme-breakpoints-module.d.ts +3 -3
- package/dist/types/api/modules/cura-theme-colors-module.d.ts +46 -46
- package/dist/types/api/modules/cura-theme-fonts-module.d.ts +22 -22
- package/dist/types/api/modules/cura-theme-module.d.ts +25 -25
- package/dist/types/api/modules/cura-theme-spacing-module.d.ts +4 -4
- package/dist/types/api/theme-presets/static.d.ts +62 -62
- package/dist/types/api/theme-presets/theme-default.d.ts +38 -38
- package/dist/types/api/theme-presets/theme-legacy-default.d.ts +38 -38
- package/dist/types/api/theme-presets/theme-maternity.d.ts +38 -38
- package/dist/types/api/theme-presets/theme-oncology.d.ts +45 -45
- package/dist/types/api/theme-presets/theme-presets.d.ts +175 -175
- package/dist/types/components/accordion/cura-accordion/cura-accordion.d.ts +37 -37
- package/dist/types/components/accordion/cura-accordion/cura-accordion.stories.d.ts +140 -140
- package/dist/types/components/accordion/cura-accordion-item/cura-accordion-item.d.ts +27 -27
- package/dist/types/components/buttons/cura-button/cura-button.d.ts +70 -59
- package/dist/types/components/buttons/cura-button/cura-button.stories.d.ts +184 -155
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +70 -59
- package/dist/types/components/buttons/cura-button-outline/cura-button-outline.stories.d.ts +184 -155
- package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +48 -47
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +65 -59
- package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.stories.d.ts +169 -155
- package/dist/types/components/cura-alert/cura-alert.d.ts +14 -13
- package/dist/types/components/cura-alert/cura-alert.stories.d.ts +85 -70
- package/dist/types/components/cura-avatar/cura-avatar.d.ts +24 -0
- package/dist/types/components/cura-avatar/cura-avatar.definitions.d.ts +14 -0
- package/dist/types/components/cura-avatar/cura-avatar.stories.d.ts +167 -0
- package/dist/types/components/cura-calendar/cura-calendar.d.ts +323 -0
- package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +128 -0
- package/dist/types/components/cura-card/cura-card.d.ts +48 -0
- package/dist/types/components/cura-card/cura-card.stories.d.ts +98 -0
- package/dist/types/components/cura-icon/cura-icon.d.ts +12 -12
- package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +44 -44
- package/dist/types/components/cura-icon/cura-icon.stories.d.ts +56 -56
- package/dist/types/components/cura-icons-view/cura-icons-view.d.ts +6 -6
- package/dist/types/components/cura-icons-view/cura-icons-view.stories.d.ts +3 -3
- package/dist/types/components/cura-page-template/cura-page-template.d.ts +6 -6
- package/dist/types/components/forms/cura-checkbox/cura-checkbox.d.ts +111 -95
- package/dist/types/components/forms/cura-checkbox/cura-checkbox.stories.d.ts +193 -193
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.d.ts +27 -0
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.stories.d.ts +44 -0
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.d.ts +3 -0
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +103 -0
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.stories.d.ts +112 -0
- package/dist/types/components/forms/cura-forms.definitions.d.ts +12 -12
- package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +169 -132
- package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +241 -218
- package/dist/types/components/forms/cura-input-text/mask-presets/input-mask-presets.d.ts +1 -2
- package/dist/types/components/forms/cura-label/cura-label.d.ts +52 -52
- package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +112 -112
- package/dist/types/components/forms/cura-radio/cura-radio.d.ts +96 -74
- package/dist/types/components/forms/cura-radio/cura-radio.stories.d.ts +162 -162
- package/dist/types/components/forms/cura-select/cura-select.d.ts +176 -0
- package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +156 -0
- package/dist/types/components/forms/cura-select-options/cura-select-option.d.ts +17 -0
- package/dist/types/components/forms/cura-switch/cura-switch.d.ts +78 -57
- package/dist/types/components/forms/cura-switch/cura-switch.stories.d.ts +121 -121
- package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.d.ts +21 -21
- package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.stories.d.ts +35 -35
- package/dist/types/components/text/cura-display/cura-display.d.ts +47 -47
- package/dist/types/components/text/cura-display/cura-display.stories.d.ts +101 -101
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +58 -58
- package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +127 -127
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +47 -47
- package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +99 -99
- package/dist/types/components.d.ts +689 -13
- package/dist/types/index.d.ts +4 -4
- package/dist/types/rededor-cura-start.d.ts +4 -4
- package/dist/types/stencil-public-runtime.d.ts +51 -15
- package/package.json +5 -5
- package/dist/cjs/app-globals-2988084b.js +0 -511
- package/dist/cjs/app-globals-2988084b.js.map +0 -1
- package/dist/cjs/css-shim-83cf0349.js +0 -8
- package/dist/cjs/css-shim-83cf0349.js.map +0 -1
- package/dist/cjs/cura-accordion_8.cjs.entry.js +0 -445
- package/dist/cjs/cura-accordion_8.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-button-transparent.cjs.entry.js +0 -83
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-forms.definitions-11be2ebd.js +0 -20
- package/dist/cjs/cura-forms.definitions-11be2ebd.js.map +0 -1
- package/dist/cjs/cura-icon.definitions-b73b0178.js +0 -21
- package/dist/cjs/cura-icon.definitions-b73b0178.js.map +0 -1
- package/dist/cjs/cura-input-text.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-label.cjs.entry.js +0 -69
- package/dist/cjs/cura-label.cjs.entry.js.map +0 -1
- package/dist/cjs/index-7616f620.js +0 -2281
- package/dist/cjs/index-7616f620.js.map +0 -1
- package/dist/cjs/shadow-css-8baae635.js +0 -391
- package/dist/cjs/shadow-css-8baae635.js.map +0 -1
- package/dist/collection/utils/utils.spec.js +0 -16
- package/dist/collection/utils/utils.spec.js.map +0 -1
- package/dist/cura/cura.js +0 -133
- package/dist/cura/p-118112e5.system.js +0 -14
- package/dist/cura/p-118112e5.system.js.map +0 -1
- package/dist/cura/p-120926c5.system.js +0 -2
- package/dist/cura/p-120926c5.system.js.map +0 -1
- package/dist/cura/p-1228e771.entry.js +0 -2
- package/dist/cura/p-1228e771.entry.js.map +0 -1
- package/dist/cura/p-183305c3.js +0 -2
- package/dist/cura/p-183305c3.js.map +0 -1
- package/dist/cura/p-2d42ccf4.entry.js +0 -2
- package/dist/cura/p-2d42ccf4.entry.js.map +0 -1
- package/dist/cura/p-3688570d.js.map +0 -1
- package/dist/cura/p-36a83bc7.system.js +0 -3
- package/dist/cura/p-36a83bc7.system.js.map +0 -1
- package/dist/cura/p-3f3355f3.system.entry.js +0 -2
- package/dist/cura/p-3f3355f3.system.entry.js.map +0 -1
- package/dist/cura/p-3f5de5e2.entry.js +0 -2
- package/dist/cura/p-3f5de5e2.entry.js.map +0 -1
- package/dist/cura/p-3f6aaefc.system.js +0 -2
- package/dist/cura/p-3f6aaefc.system.js.map +0 -1
- package/dist/cura/p-48426f60.system.js +0 -2
- package/dist/cura/p-48426f60.system.js.map +0 -1
- package/dist/cura/p-4db87e8d.system.entry.js +0 -2
- package/dist/cura/p-4db87e8d.system.entry.js.map +0 -1
- package/dist/cura/p-51e00a16.entry.js +0 -2
- package/dist/cura/p-51e00a16.entry.js.map +0 -1
- package/dist/cura/p-72a9ed55.entry.js +0 -2
- package/dist/cura/p-72a9ed55.entry.js.map +0 -1
- package/dist/cura/p-75b2e4d1.system.entry.js +0 -2
- package/dist/cura/p-75b2e4d1.system.entry.js.map +0 -1
- package/dist/cura/p-880917c1.entry.js +0 -2
- package/dist/cura/p-880917c1.entry.js.map +0 -1
- package/dist/cura/p-8d959fb2.entry.js +0 -2
- package/dist/cura/p-8d959fb2.entry.js.map +0 -1
- package/dist/cura/p-9471c93e.system.entry.js +0 -2
- package/dist/cura/p-9471c93e.system.entry.js.map +0 -1
- package/dist/cura/p-98014544.entry.js +0 -2
- package/dist/cura/p-98014544.entry.js.map +0 -1
- package/dist/cura/p-98352c92.system.entry.js +0 -2
- package/dist/cura/p-98352c92.system.entry.js.map +0 -1
- package/dist/cura/p-a32889a4.system.js +0 -2
- package/dist/cura/p-a32889a4.system.js.map +0 -1
- package/dist/cura/p-ab8c9a8f.system.entry.js +0 -2
- package/dist/cura/p-ab8c9a8f.system.entry.js.map +0 -1
- package/dist/cura/p-ad194144.entry.js +0 -2
- package/dist/cura/p-ad194144.entry.js.map +0 -1
- package/dist/cura/p-b0e13882.system.entry.js +0 -2
- package/dist/cura/p-b0e13882.system.entry.js.map +0 -1
- package/dist/cura/p-ba66d7be.js +0 -3
- package/dist/cura/p-ba66d7be.js.map +0 -1
- package/dist/cura/p-bb3f9d05.entry.js +0 -2
- package/dist/cura/p-bb3f9d05.entry.js.map +0 -1
- package/dist/cura/p-beab48cd.js +0 -13
- package/dist/cura/p-beab48cd.js.map +0 -1
- package/dist/cura/p-c791725b.js.map +0 -1
- package/dist/cura/p-cb4e2a0c.system.entry.js +0 -2
- package/dist/cura/p-cb4e2a0c.system.entry.js.map +0 -1
- package/dist/cura/p-d3f9c888.system.js +0 -2
- package/dist/cura/p-d3f9c888.system.js.map +0 -1
- package/dist/cura/p-e5e259fd.system.entry.js +0 -2
- package/dist/cura/p-e5e259fd.system.entry.js.map +0 -1
- package/dist/cura/p-edeffbfc.entry.js +0 -2
- package/dist/cura/p-edeffbfc.entry.js.map +0 -1
- package/dist/cura/p-f51705c2.system.entry.js +0 -2
- package/dist/cura/p-f51705c2.system.entry.js.map +0 -1
- package/dist/cura/p-f89f2ecc.system.entry.js +0 -2
- package/dist/cura/p-f89f2ecc.system.entry.js.map +0 -1
- package/dist/cura/p-f8fffdc1.js.map +0 -1
- package/dist/cura/p-fc4ba4ce.system.js +0 -2
- package/dist/cura/p-fc4ba4ce.system.js.map +0 -1
- package/dist/cura/p-fef52079.entry.js +0 -2
- package/dist/cura/p-fef52079.entry.js.map +0 -1
- package/dist/cura/p-ffd41520.system.entry.js +0 -2
- package/dist/cura/p-ffd41520.system.entry.js.map +0 -1
- package/dist/esm/app-globals-29001758.js +0 -509
- package/dist/esm/app-globals-29001758.js.map +0 -1
- package/dist/esm/css-shim-d13f0738.js +0 -6
- package/dist/esm/css-shim-d13f0738.js.map +0 -1
- package/dist/esm/cura-accordion_8.entry.js +0 -434
- package/dist/esm/cura-accordion_8.entry.js.map +0 -1
- package/dist/esm/cura-button-transparent.entry.js +0 -79
- package/dist/esm/cura-button-transparent.entry.js.map +0 -1
- package/dist/esm/cura-forms.definitions-0f774253.js +0 -18
- package/dist/esm/cura-forms.definitions-0f774253.js.map +0 -1
- package/dist/esm/cura-icon.definitions-a63d1862.js +0 -18
- package/dist/esm/cura-icon.definitions-a63d1862.js.map +0 -1
- package/dist/esm/cura-input-text.entry.js.map +0 -1
- package/dist/esm/cura-label.entry.js +0 -65
- package/dist/esm/cura-label.entry.js.map +0 -1
- package/dist/esm/index-81f1a268.js +0 -2249
- package/dist/esm/index-81f1a268.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/shadow-css-07b0c8c8.js +0 -389
- package/dist/esm/shadow-css-07b0c8c8.js.map +0 -1
- package/dist/esm-es5/app-globals-29001758.js +0 -2
- package/dist/esm-es5/app-globals-29001758.js.map +0 -1
- package/dist/esm-es5/css-shim-d13f0738.js +0 -2
- package/dist/esm-es5/css-shim-d13f0738.js.map +0 -1
- package/dist/esm-es5/cura-accordion_8.entry.js +0 -2
- package/dist/esm-es5/cura-accordion_8.entry.js.map +0 -1
- package/dist/esm-es5/cura-alert.entry.js +0 -2
- package/dist/esm-es5/cura-alert.entry.js.map +0 -1
- package/dist/esm-es5/cura-button-outline.entry.js +0 -2
- package/dist/esm-es5/cura-button-outline.entry.js.map +0 -1
- package/dist/esm-es5/cura-button-select.entry.js +0 -2
- package/dist/esm-es5/cura-button-select.entry.js.map +0 -1
- package/dist/esm-es5/cura-button-transparent.entry.js +0 -2
- package/dist/esm-es5/cura-button-transparent.entry.js.map +0 -1
- package/dist/esm-es5/cura-checkbox.entry.js +0 -2
- package/dist/esm-es5/cura-checkbox.entry.js.map +0 -1
- package/dist/esm-es5/cura-display.entry.js +0 -2
- package/dist/esm-es5/cura-display.entry.js.map +0 -1
- package/dist/esm-es5/cura-forms.definitions-0f774253.js +0 -2
- package/dist/esm-es5/cura-icon.definitions-a63d1862.js +0 -2
- package/dist/esm-es5/cura-icons-view.entry.js +0 -2
- package/dist/esm-es5/cura-icons-view.entry.js.map +0 -1
- package/dist/esm-es5/cura-input-text.entry.js +0 -2
- package/dist/esm-es5/cura-input-text.entry.js.map +0 -1
- package/dist/esm-es5/cura-label.entry.js +0 -2
- package/dist/esm-es5/cura-label.entry.js.map +0 -1
- package/dist/esm-es5/cura-radio.entry.js +0 -2
- package/dist/esm-es5/cura-radio.entry.js.map +0 -1
- package/dist/esm-es5/cura-switch.entry.js +0 -2
- package/dist/esm-es5/cura-switch.entry.js.map +0 -1
- package/dist/esm-es5/cura.js +0 -2
- package/dist/esm-es5/cura.js.map +0 -1
- package/dist/esm-es5/index-81f1a268.js +0 -3
- package/dist/esm-es5/index-81f1a268.js.map +0 -1
- package/dist/esm-es5/index.js +0 -2
- package/dist/esm-es5/index.js.map +0 -1
- package/dist/esm-es5/loader.js +0 -2
- package/dist/esm-es5/loader.js.map +0 -1
- package/dist/esm-es5/shadow-css-07b0c8c8.js +0 -13
- package/dist/esm-es5/shadow-css-07b0c8c8.js.map +0 -1
|
@@ -2,114 +2,147 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { f as formsSizes } from './cura-forms.definitions.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './cura-label2.js';
|
|
4
4
|
|
|
5
|
-
const curaSwitchCss = "@charset \"UTF-8\";:host{display:block;width
|
|
5
|
+
const curaSwitchCss = "@charset \"UTF-8\";:host{display:block;width:fit-content;box-sizing:border-box}.container{display:flex;align-items:center;flex-direction:row-reverse;gap:var(--gap);text-align:left}.position{flex-direction:row}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color 0.3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform 0.3s, outline 0.3s;display:inline-block;cursor:pointer;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));background:var(--neutral-purewhite);transform:translateX(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale) !important;border-color:var(--neutral-darker-medium) !important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base) !important;border-color:var(--neutral-black-neutral-pale) !important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none !important;border-color:var(--neutral-black-neutral-pale) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base) !important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base) !important;border-color:var(--color-dark)}";
|
|
6
|
+
const CuraSwitchStyle0 = curaSwitchCss;
|
|
6
7
|
|
|
7
8
|
const CuraSwitch$1 = /*@__PURE__*/ proxyCustomElement(class CuraSwitch extends HTMLElement {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.onchange = createEvent(this, "onchange", 7);
|
|
14
|
+
this.internals = this.attachInternals();
|
|
15
|
+
this.sizes = {
|
|
16
|
+
large: { size: 64 },
|
|
17
|
+
medium: { size: 48 },
|
|
18
|
+
small: { size: 40 },
|
|
19
|
+
};
|
|
20
|
+
this.isDarkbackground = () => this.background === 'dark';
|
|
21
|
+
this.toggleSwitch = () => {
|
|
22
|
+
if (this.disabled)
|
|
23
|
+
return null;
|
|
24
|
+
this.checked = !this.checked;
|
|
25
|
+
this.internals.setFormValue(this.checked.toString());
|
|
26
|
+
this.onchange.emit({ checked: this.checked });
|
|
27
|
+
};
|
|
28
|
+
this.checked = false;
|
|
29
|
+
this.disabled = false;
|
|
30
|
+
this.label = '';
|
|
31
|
+
this.ontabindex = 0;
|
|
32
|
+
this.position = 'left';
|
|
33
|
+
this.size = 'medium';
|
|
34
|
+
this.background = 'light';
|
|
35
|
+
this.color = 'accent';
|
|
36
|
+
this.styles = {};
|
|
37
|
+
}
|
|
38
|
+
sizeHandler() {
|
|
39
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--size-track': `${this.sizes[this.size].size}px`, '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
|
|
40
|
+
}
|
|
41
|
+
setColors() {
|
|
42
|
+
const colors = [
|
|
43
|
+
{ name: '--info-base', background: 'info-base' },
|
|
44
|
+
{ name: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },
|
|
45
|
+
{ name: '--neutral-purewhite', background: 'neutral-purewhite' },
|
|
46
|
+
{ name: '--neutral-medium', background: 'neutral-medium' },
|
|
47
|
+
{ name: '--neutral-pale', background: 'neutral-pale' },
|
|
48
|
+
{ name: '--neutral-dark-base', background: `neutral-${this.isDarkbackground() ? 'dark' : 'base'}` },
|
|
49
|
+
{ name: '--neutral-darker-medium', background: `neutral-${this.isDarkbackground() ? 'darker' : 'medium'}` },
|
|
50
|
+
{ name: '--neutral-black-neutral-pale', background: `${this.isDarkbackground() ? 'neutral-black' : 'neutral-pale'}` },
|
|
51
|
+
{ name: '--neutral-black-neutral-base', background: `${this.isDarkbackground() ? 'neutral-dark' : 'neutral-base'}` },
|
|
52
|
+
{ name: '--color-base-light', background: `${this.color}-light` },
|
|
53
|
+
{ name: '--color-dark', background: `${this.color}-dark` },
|
|
54
|
+
];
|
|
55
|
+
colors.forEach(color => {
|
|
56
|
+
this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color === null || color === void 0 ? void 0 : color.opacity);
|
|
57
|
+
});
|
|
58
|
+
this.styles = Object.assign({}, this.styles);
|
|
59
|
+
}
|
|
60
|
+
connectedCallback() {
|
|
61
|
+
this.sizeHandler();
|
|
62
|
+
this.setColors();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Callback for form association.
|
|
66
|
+
*/
|
|
67
|
+
formAssociatedCallback(form) {
|
|
68
|
+
form.ariaLabel = this.label;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Callback to restore the switch state from the form.
|
|
72
|
+
*/
|
|
73
|
+
formStateRestoreCallback(state) {
|
|
74
|
+
this.checked = state.value === 'true';
|
|
75
|
+
this.internals.setFormValue(this.checked.toString());
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Callback to reset the switch state when the form is reset.
|
|
79
|
+
*/
|
|
80
|
+
formResetCallback() {
|
|
81
|
+
this.checked = false;
|
|
82
|
+
this.internals.setValidity({});
|
|
83
|
+
this.internals.setFormValue(this.checked.toString());
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Callback to update the switch's disabled state when the form's disabled state changes.
|
|
87
|
+
*/
|
|
88
|
+
formDisabledCallback(disabled) {
|
|
89
|
+
this.disabled = disabled;
|
|
90
|
+
}
|
|
91
|
+
assignColor(colorDark, colorLight) {
|
|
92
|
+
if (this.disabled)
|
|
93
|
+
return this.isDarkbackground() ? 'neutral-dark' : 'neutral-dark';
|
|
94
|
+
return this.isDarkbackground() ? colorDark : colorLight;
|
|
95
|
+
}
|
|
96
|
+
getClasses() {
|
|
97
|
+
const classes = {};
|
|
98
|
+
classes['container'] = true;
|
|
99
|
+
classes['checked'] = this.checked;
|
|
100
|
+
classes['disabled'] = this.disabled;
|
|
101
|
+
classes['position'] = this.position === 'right';
|
|
102
|
+
return classes;
|
|
103
|
+
}
|
|
104
|
+
render() {
|
|
105
|
+
return (h(Host, { key: 'e0040434db080b1ccdb12a1389ca028f5c02f66a' }, h("div", { key: '6008f7aef47e0519e965c2be573dc1eacc001b6c', class: this.getClasses(), style: this.styles }, h("div", { key: 'a954404dce1c7eafd79cb3236e8761a3dc29f86e', class: "info" }, h("cura-label", { key: '6ff5cc1f26abad0f173c4e1330aaae43357b7737', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, class: "label", weight: "bold", size: this.size === 'large' ? 'medium' : 'xsmall', lineHeight: "125%", color: this.assignColor('neutral-white', 'neutral-black') }, this.label), h("cura-label", { key: 'b82e4cb25ef94481642e1d5a2180eb4e12b8eff8', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, h("slot", { key: '243e906253614d9ce837e0c598b259ad7c87afb4' }))), h("div", { key: '36d0165722a6fae98ca829a5a2e89edef3694ff2', onClick: this.toggleSwitch, class: "control" }, h("div", { key: 'f9c0c7cbc84b655e37e7e8df1c2293c1260445ca', class: `track ${this.size.toLowerCase()}` }, h("div", { key: 'e5ca4006ad41a6cbf8d62ca612b52ef26fb7255f', class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
|
|
106
|
+
}
|
|
107
|
+
static get formAssociated() { return true; }
|
|
108
|
+
static get watchers() { return {
|
|
109
|
+
"size": ["sizeHandler"],
|
|
110
|
+
"color": ["setColors"],
|
|
111
|
+
"background": ["setColors"]
|
|
112
|
+
}; }
|
|
113
|
+
static get style() { return CuraSwitchStyle0; }
|
|
114
|
+
}, [65, "cura-switch", {
|
|
115
|
+
"checked": [1540],
|
|
116
|
+
"disabled": [516],
|
|
117
|
+
"label": [513],
|
|
118
|
+
"ontabindex": [514],
|
|
119
|
+
"position": [513],
|
|
120
|
+
"size": [513],
|
|
121
|
+
"background": [1],
|
|
122
|
+
"color": [1],
|
|
123
|
+
"styles": [32]
|
|
124
|
+
}, undefined, {
|
|
125
|
+
"size": ["sizeHandler"],
|
|
126
|
+
"color": ["setColors"],
|
|
127
|
+
"background": ["setColors"]
|
|
128
|
+
}]);
|
|
96
129
|
function defineCustomElement$1() {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
130
|
+
if (typeof customElements === "undefined") {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const components = ["cura-switch", "cura-label"];
|
|
134
|
+
components.forEach(tagName => { switch (tagName) {
|
|
135
|
+
case "cura-switch":
|
|
136
|
+
if (!customElements.get(tagName)) {
|
|
137
|
+
customElements.define(tagName, CuraSwitch$1);
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
140
|
+
case "cura-label":
|
|
141
|
+
if (!customElements.get(tagName)) {
|
|
142
|
+
defineCustomElement$2();
|
|
143
|
+
}
|
|
144
|
+
break;
|
|
145
|
+
} });
|
|
113
146
|
}
|
|
114
147
|
|
|
115
148
|
const CuraSwitch = CuraSwitch$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-switch.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,qtEAAqtE;;MCS9tEA,YAAU;;;;;;IA0CrB,UAAK,GAAG;MACN,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;MACrB,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;MACtB,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;KACtB,CAAC;IAGF,qBAAgB,GAAG,MAAM,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;IA2CpD,iBAAY,GAAG;MACb,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;MAE/B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;MAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;KAC9C,CAAC;mBA7FyD,KAAK;oBAInB,KAAK;iBAIT,EAAE;sBAKG,CAAC;oBAKO,MAAM;gBAKE,QAAQ;sBAK/B,OAAO;iBAI9B,QAAQ;kBAEN,EAAE;;EAcpB,WAAW;IACT,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,cAAc,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,EACjD,QAAQ,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,C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,CAAC,OAAO,CAAC;IAClC,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;IACpC,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC;IAEhD,OAAO,OAAO,CAAC;GAChB;EAGD,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IAC/C,WAAK,KAAK,EAAC,MAAM,IACf,kBAAY,KAAK,EAAC,OAAO,EACvB,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,QAAQ,GAAG,QAAQ,EACjD,UAAU,EAAC,MAAM,EACjB,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,IACxD,IAAI,CAAC,KAAK,CACA,EACb,kBACE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,IACf,eAAa,CACF,CACT,EAEN,WAAK,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,IAC9C,WAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAC5C,WAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAQ,CAC7E,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraSwitch"],"sources":["./src/components/forms/cura-switch/cura-switch.scss?tag=cura-switch&encapsulation=shadow","./src/components/forms/cura-switch/cura-switch.tsx"],"sourcesContent":[":host {\n display: block;\n width: fit-content;\n box-sizing: border-box;\n}\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n gap: var(--gap);\n}\n\n.position {\n\n &.container {\n flex-direction: row;\n }\n\n .label {\n text-align: right;\n }\n\n .message {\n text-align: right;\n }\n}\n\n.control {\n width: fit-content;\n}\n\n/* Estilos para o controle de switch */\n.track {\n background: var(--neutral-base-black-40);\n border-radius: 16px;\n transition: background-color 0.3s;\n align-items: flex-start;\n flex-shrink: 0;\n box-sizing: border-box;\n width: var(--size-track);\n height: var(--size);\n}\n\n.thumb {\n background-color: var(--neutral-white-purewhite);\n border: 2px solid var(--neutral-medium);\n border-radius: 50%;\n position: absolute;\n transition: transform 0.3s, outline 0.3s;\n display: inline-block;\n cursor: pointer;\n user-select: none;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n}\n\n/* Estado \"checked\" */\n.checked .thumb {\n border-color: var(--color-dark-light);\n background: var(--color-lighter);\n transform: translateX(var(--size));\n}\n\n.checked .thumb:hover {\n background: var(--neutral-white-purewhite) !important;\n}\n\n.checked .track {\n background: var(--color-base-lighter-50);\n}\n\n/* Estado \"disabled\" */\n\n.disabled .track {\n background: var(--primary-base-neutral-black-20);\n\n}\n\n.disabled .thumb {\n background: var(--neutral-lighter) !important;\n border-color: var(--primary-dark-neutral-base);\n cursor: not-allowed;\n\n}\n\n.disabled.checked .track {\n background: var(--primary-base-neutral-black-20);\n}\n\n.disabled .thumb:hover {\n background: var(--neutral-lighter) !important;\n border-color: var(--primary-dark-neutral-base) !important;\n}\n\n/* Estado hover para não disabled e não checked */\n:not(.disabled):not(.checked) .thumb:hover {\n border-color: var(--color-dark-light);\n background: var(--color-lighter);\n}\n\n/* Estado hover para não disabled */\n:not(.disabled) .thumb:focus {\n border-color: var(--info-base) !important;\n z-index: 1;\n}\n","import { Component, Prop, Event, h, Host, Watch, EventEmitter, State } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-switch',\n styleUrl: 'cura-switch.scss',\n shadow: true,\n})\n\nexport class CuraSwitch {\n /**\n * Indicates whether the switch is checked or not.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Indicates whether the switch is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * The label text to display next to the switch.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Tab index for the switch element.\n * Reflects as an HTML attribute.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the switch.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: \"left\" | \"right\" = 'left';\n /**\n * Size of the switch.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background style of the switch.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Accent color of the switch.\n */\n @Prop() color = 'accent';\n\n @State() styles = {};\n\n @Event({ eventName: 'onchange', composed: true, cancelable: true, bubbles: true }) onchange: EventEmitter<{ checked: boolean }>;\n\n sizes = {\n \"large\": { size: 64 },\n \"medium\": { size: 48 },\n \"small\": { size: 40 },\n };\n\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-track': `${this.sizes[this.size].size}px`,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`\n };\n }\n\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--info-base', background: 'info-base' },\n { name: '--neutral-medium', background: 'neutral-medium' },\n { name: '--color-lighter', background: `${this.color}-lighter` },\n { name: '--color-base-lighter-50', background: `${this.color}-${this.isDarkbackground() ? 'base' : 'lighter'}`, opacity: 0.5 },\n { name: '--color-base-light', background: `${this.color}-${this.isDarkbackground() ? 'base' : 'light'}` },\n { name: '--color-dark-light', background: `${this.color}-${this.isDarkbackground() ? 'dark' : 'light'}` },\n { name: '--primary-lighter-neutral-dark', background: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--neutral-white-purewhite', background: `neutral-${this.isDarkbackground() ? 'white' : 'purewhite'}` },\n { name: '--primary-base-neutral-black-20', background: `${this.isDarkbackground() ? 'primary-base' : 'neutral-black'}`, opacity: 0.2 },\n { name: '--neutral-base-black-40', background: `neutral-${this.isDarkbackground() ? 'base' : 'black'}`, opacity: 0.4 },\n { name: '--primary-dark-neutral-base', background: `${this.isDarkbackground() ? 'primary-dark' : 'neutral-base'}` },\n { name: '--neutral-lighter', background: `${this.isDarkbackground() ? 'primary-base' : 'neutral-lighter'}` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color?.opacity);\n });\n this.styles = { ...this.styles };\n\n }\n\n connectedCallback() {\n this.sizeHandler()\n this.setColors();\n }\n\n toggleSwitch = () => {\n if (this.disabled) return null;\n\n this.checked = !this.checked;\n this.onchange.emit({ checked: this.checked })\n };\n\n assignColor(colorDark: string, colorLight: string) {\n if (this.disabled) return this.isDarkbackground() ? 'primary-base' : 'neutral-medium';\n return this.isDarkbackground() ? colorDark : colorLight\n }\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['position'] = this.position === 'right';\n\n return classes;\n }\n\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"info\">\n <cura-label class=\"label\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n lineHeight=\"125%\"\n color={this.assignColor('neutral-white', 'neutral-black')}>\n {this.label}\n </cura-label>\n <cura-label\n color={this.assignColor('primary-lighter', 'neutral-dark')}\n size=\"xsmall\"\n class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n\n <div onClick={this.toggleSwitch} class=\"control\">\n <div class={`track ${this.size.toLowerCase()}`}>\n <div class={`thumb ${this.size.toLowerCase()}`} tabIndex={this.ontabindex}></div>\n </div>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src/components/forms/cura-switch/cura-switch.tsx"],"sourcesContent":["@import '../../../../src/scss/mixins/shadows.scss';\n\n:host {\n display: block;\n width: fit-content;\n box-sizing: border-box;\n}\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n gap: var(--gap);\n text-align: left;\n\n}\n\n.position {\n flex-direction: row;\n}\n\n.label,\n.message {\n text-align: left;\n}\n\n.control {\n width: fit-content;\n}\n\n/* Estilos para o controle de switch */\n.track {\n background: var(--neutral-dark-base);\n border-radius: 16px;\n transition: background-color 0.3s;\n align-items: flex-start;\n flex-shrink: 0;\n box-sizing: border-box;\n width: var(--size-track);\n height: var(--size);\n position: relative;\n}\n\n.thumb {\n background: var(--neutral-purewhite);\n border: 2px solid var(--neutral-darker-medium);\n border-radius: 50%;\n\n position: absolute;\n transition: transform 0.3s, outline 0.3s;\n display: inline-block;\n cursor: pointer;\n user-select: none;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* Estado \"checked\" */\n.checked .thumb {\n border-color: var(--color-dark);\n @include shadow-level3(--neutral-black-shadow);\n background: var(--neutral-purewhite);\n transform: translateX(var(--size)) translateY(-50%);\n}\n\n.checked .thumb:hover {\n background: var(--neutral-pale) !important;\n border-color: var(--neutral-darker-medium) !important;\n}\n\n.checked .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n\n.checked .track {\n background: var(--color-base-light);\n}\n\n/* Estado \"disabled\" */\n.disabled .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.disabled .thumb {\n background: var(--neutral-black-neutral-base) !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n cursor: not-allowed;\n}\n\n.disabled.checked .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.container.disabled .thumb:focus {\n outline: none !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n}\n\n\n/* Estado hover para não disabled e não checked */\n:not(.disabled):not(.checked) .thumb:hover {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n:not(.disabled):not(.checked) .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n\n/* Estado hover para não disabled */\n:not(.disabled) .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border: 2px solid var(--neutral-darker-medium);\n z-index: 1;\n}\n\n:not(.disabled) .checked .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border-color: var(--color-dark);\n}","import { Component, Prop, Event, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-switch',\n styleUrl: 'cura-switch.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSwitch {\n /**\n * Indicates whether the switch is checked or not.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Indicates whether the switch is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * The label text to display next to the switch.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Tab index for the switch element.\n * Reflects as an HTML attribute.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the switch.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Size of the switch.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background style of the switch.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Accent color of the switch.\n */\n @Prop() color = 'accent';\n\n @State() styles = {};\n\n @Event({ eventName: 'onchange', composed: true, cancelable: true, bubbles: true }) onchange: EventEmitter<{ checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 64 },\n medium: { size: 48 },\n small: { size: 40 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-track': `${this.sizes[this.size].size}px`,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--info-base', background: 'info-base' },\n { name: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--neutral-medium', background: 'neutral-medium' },\n { name: '--neutral-pale', background: 'neutral-pale' },\n { name: '--neutral-dark-base', background: `neutral-${this.isDarkbackground() ? 'dark' : 'base'}` },\n { name: '--neutral-darker-medium', background: `neutral-${this.isDarkbackground() ? 'darker' : 'medium'}` },\n { name: '--neutral-black-neutral-pale', background: `${this.isDarkbackground() ? 'neutral-black' : 'neutral-pale'}` },\n { name: '--neutral-black-neutral-base', background: `${this.isDarkbackground() ? 'neutral-dark' : 'neutral-base'}` },\n { name: '--color-base-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color?.opacity);\n });\n this.styles = { ...this.styles };\n }\n\n connectedCallback() {\n this.sizeHandler();\n this.setColors();\n }\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.checked = state.value === 'true';\n this.internals.setFormValue(this.checked.toString());\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.checked.toString());\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n toggleSwitch = () => {\n if (this.disabled) return null;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.checked.toString());\n this.onchange.emit({ checked: this.checked });\n };\n\n assignColor(colorDark: string, colorLight: string) {\n if (this.disabled) return this.isDarkbackground() ? 'neutral-dark' : 'neutral-dark';\n return this.isDarkbackground() ? colorDark : colorLight;\n }\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['position'] = this.position === 'right';\n\n return classes;\n }\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"info\">\n <cura-label\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n class=\"label\"\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n lineHeight=\"125%\"\n color={this.assignColor('neutral-white', 'neutral-black')}\n >\n {this.label}\n </cura-label>\n <cura-label\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n color={this.assignColor('primary-lighter', 'neutral-dark')}\n size=\"xsmall\"\n class=\"message\"\n >\n <slot></slot>\n </cura-label>\n </div>\n\n <div onClick={this.toggleSwitch} class=\"control\">\n <div class={`track ${this.size.toLowerCase()}`}>\n <div class={`thumb ${this.size.toLowerCase()}`} tabIndex={this.ontabindex}></div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
8
|
* Used to manually set the base path where assets can be found.
|
|
3
9
|
* If the script is used as "module", it's recommended to use "import.meta.url",
|