@rededor/cura 1.4.0 → 1.5.0-alpha.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_12.cjs.entry.js → cura-accordion_13.cjs.entry.js} +107 -29
- package/dist/cjs/cura-accordion_13.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-alert.cjs.entry.js +1 -1
- package/dist/cjs/cura-avatar.cjs.entry.js +1 -1
- package/dist/cjs/cura-badge-counter.cjs.entry.js +2 -2
- package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
- package/dist/cjs/cura-badge-distance.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-badge-dot.cjs.entry.js +44 -0
- package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-badge-pill.cjs.entry.js +2 -1
- package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-select.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
- package/dist/cjs/cura-calendar.cjs.entry.js +1 -1
- package/dist/cjs/cura-card.cjs.entry.js +1 -1
- package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/cura-display.cjs.entry.js +1 -1
- package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +1 -1
- package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +2 -2
- package/dist/cjs/cura-dropdown-search.cjs.entry.js +27 -21
- package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
- package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
- package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js +98 -0
- package/dist/cjs/cura-progress-bar_2.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-radio.cjs.entry.js +1 -1
- package/dist/cjs/cura-stepper.cjs.entry.js +123 -0
- package/dist/cjs/cura-stepper.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-switch.cjs.entry.js +1 -1
- package/dist/cjs/cura-toast.cjs.entry.js +1 -1
- package/dist/cjs/cura-tooltip.cjs.entry.js +9 -8
- package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +2 -2
- 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.css +2 -2
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.css +61 -0
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js +108 -0
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js.map +1 -0
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.stories.js +65 -0
- package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.stories.js.map +1 -0
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +2 -1
- 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 +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +1 -1
- package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.js +1 -1
- package/dist/collection/components/cura-card/cura-card.js +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
- package/dist/collection/components/cura-modal/cura-modal.css +3 -3
- package/dist/collection/components/cura-modal/cura-modal.js +39 -1
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.stories.js +18 -0
- package/dist/collection/components/cura-modal/cura-modal.stories.js.map +1 -1
- package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.css +15 -0
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +121 -0
- package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js.map +1 -0
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.css +10 -0
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +153 -0
- package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js.map +1 -0
- package/dist/collection/components/cura-stepper/cura-stepper.css +72 -0
- package/dist/collection/components/cura-stepper/cura-stepper.js +227 -0
- package/dist/collection/components/cura-stepper/cura-stepper.js.map +1 -0
- package/dist/collection/components/cura-stepper/cura-stepper.stories.js +97 -0
- package/dist/collection/components/cura-stepper/cura-stepper.stories.js.map +1 -0
- package/dist/collection/components/cura-stepper/stepper.type.js +2 -0
- package/dist/collection/components/cura-stepper/stepper.type.js.map +1 -0
- package/dist/collection/components/cura-toast/cura-toast.js +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +9 -8
- package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -1
- package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +4 -2
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +28 -21
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.css +5 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +32 -19
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.stories.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
- package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
- package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
- package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
- package/dist/collection/components/text/cura-display/cura-display.js +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
- package/dist/components/cura-alert.js +1 -1
- package/dist/components/cura-avatar.js +1 -1
- package/dist/components/cura-badge-counter2.js +2 -2
- package/dist/components/cura-badge-counter2.js.map +1 -1
- package/dist/components/cura-badge-distance.js +1 -1
- package/dist/components/cura-badge-distance.js.map +1 -1
- package/dist/components/cura-badge-dot.d.ts +11 -0
- package/dist/components/cura-badge-dot.js +63 -0
- package/dist/components/cura-badge-dot.js.map +1 -0
- package/dist/components/cura-badge-pill.js +1 -113
- package/dist/components/cura-badge-pill.js.map +1 -1
- package/dist/components/cura-badge-pill2.js +118 -0
- package/dist/components/cura-badge-pill2.js.map +1 -0
- package/dist/components/cura-button-outline.js +1 -1
- package/dist/components/cura-button-select.js +1 -1
- package/dist/components/cura-button-transparent2.js +1 -1
- package/dist/components/cura-button.js +1 -1
- package/dist/components/cura-calendar2.js +1 -1
- package/dist/components/cura-card.js +1 -1
- package/dist/components/cura-checkbox.js +1 -1
- package/dist/components/cura-display.js +1 -1
- package/dist/components/cura-dropdown-search-option-title.js +1 -1
- package/dist/components/cura-dropdown-search-option.js +2 -2
- package/dist/components/cura-dropdown-search.js +29 -22
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-icon2.js +1 -1
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-input-date.js +1 -1
- package/dist/components/cura-label2.js +1 -1
- package/dist/components/cura-loader-bar2.js +1 -1
- package/dist/components/cura-loader-circle2.js +1 -1
- package/dist/components/cura-modal.js +6 -2
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-paragraph2.js +1 -1
- package/dist/components/cura-progress-bar.d.ts +11 -0
- package/dist/components/cura-progress-bar.js +8 -0
- package/dist/components/cura-progress-bar.js.map +1 -0
- package/dist/components/cura-progress-bar2.js +48 -0
- package/dist/components/cura-progress-bar2.js.map +1 -0
- package/dist/components/cura-radio.js +1 -1
- package/dist/components/cura-select-option2.js +1 -1
- package/dist/components/cura-select2.js +33 -20
- package/dist/components/cura-select2.js.map +1 -1
- package/dist/components/cura-stepper-item.d.ts +11 -0
- package/dist/components/cura-stepper-item.js +8 -0
- package/dist/components/cura-stepper-item.js.map +1 -0
- package/dist/components/cura-stepper-item2.js +116 -0
- package/dist/components/cura-stepper-item2.js.map +1 -0
- package/dist/components/cura-stepper.d.ts +11 -0
- package/dist/components/cura-stepper.js +187 -0
- package/dist/components/cura-stepper.js.map +1 -0
- package/dist/components/cura-switch.js +1 -1
- package/dist/components/cura-toast.js +1 -1
- package/dist/components/cura-tooltip.js +9 -8
- package/dist/components/cura-tooltip.js.map +1 -1
- package/dist/components/index.js +8 -0
- 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/{p-a91d451f.entry.js → p-04006a3e.entry.js} +2 -2
- package/dist/cura/{p-576c65b4.entry.js → p-0a133399.entry.js} +2 -2
- package/dist/cura/{p-116a1cd6.entry.js → p-164ddb46.entry.js} +2 -2
- package/dist/cura/{p-36dbec98.entry.js → p-235ac0b4.entry.js} +2 -2
- package/dist/cura/p-23fa2246.entry.js +2 -0
- package/dist/cura/p-23fa2246.entry.js.map +1 -0
- package/dist/cura/{p-c4da4c44.entry.js → p-2af6216a.entry.js} +2 -2
- package/dist/cura/{p-42258230.entry.js → p-3030774e.entry.js} +2 -2
- package/dist/cura/{p-3d958d45.entry.js → p-3c0931d3.entry.js} +2 -2
- package/dist/cura/{p-ef593f12.entry.js → p-46eaee31.entry.js} +2 -2
- package/dist/cura/p-46eaee31.entry.js.map +1 -0
- package/dist/cura/{p-bdb1a0c5.entry.js → p-4aefe237.entry.js} +2 -2
- package/dist/cura/{p-aa65cb50.entry.js → p-529332d3.entry.js} +2 -2
- package/dist/cura/{p-aa65cb50.entry.js.map → p-529332d3.entry.js.map} +1 -1
- package/dist/cura/{p-19f28fa8.entry.js → p-545e8e55.entry.js} +2 -2
- package/dist/cura/p-557b90c4.entry.js +2 -0
- package/dist/cura/p-557b90c4.entry.js.map +1 -0
- package/dist/cura/p-6624108e.entry.js +2 -0
- package/dist/cura/p-6b627841.entry.js +2 -0
- package/dist/cura/p-6b627841.entry.js.map +1 -0
- package/dist/cura/{p-3eca0f0c.entry.js → p-70adcf7b.entry.js} +2 -2
- package/dist/cura/{p-52f854e0.entry.js → p-7ba80d78.entry.js} +2 -2
- package/dist/cura/{p-52f854e0.entry.js.map → p-7ba80d78.entry.js.map} +1 -1
- package/dist/cura/p-8622c492.entry.js +2 -0
- package/dist/cura/p-8622c492.entry.js.map +1 -0
- package/dist/cura/p-935eeb7b.entry.js +2 -0
- package/dist/cura/p-935eeb7b.entry.js.map +1 -0
- package/dist/cura/{p-2545cfc7.entry.js → p-b3e93e74.entry.js} +2 -2
- package/dist/cura/{p-dcd2e5bb.entry.js → p-bce10f9b.entry.js} +2 -2
- package/dist/cura/p-cfbe2bce.entry.js +2 -0
- package/dist/cura/p-cfbe2bce.entry.js.map +1 -0
- package/dist/cura/{p-818c581f.entry.js → p-d13e3295.entry.js} +2 -2
- package/dist/cura/{p-e1a41792.entry.js → p-ec7876d3.entry.js} +2 -2
- package/dist/cura/{p-b1a51e81.entry.js → p-ee8db3dc.entry.js} +2 -2
- package/dist/cura/{p-4b496c51.entry.js → p-f96b0923.entry.js} +2 -2
- package/dist/esm/{cura-accordion_12.entry.js → cura-accordion_13.entry.js} +107 -30
- package/dist/esm/cura-accordion_13.entry.js.map +1 -0
- package/dist/esm/cura-alert.entry.js +1 -1
- package/dist/esm/cura-avatar.entry.js +1 -1
- package/dist/esm/cura-badge-counter.entry.js +2 -2
- package/dist/esm/cura-badge-counter.entry.js.map +1 -1
- package/dist/esm/cura-badge-distance.entry.js +1 -1
- package/dist/esm/cura-badge-distance.entry.js.map +1 -1
- package/dist/esm/cura-badge-dot.entry.js +40 -0
- package/dist/esm/cura-badge-dot.entry.js.map +1 -0
- package/dist/esm/cura-badge-pill.entry.js +2 -1
- package/dist/esm/cura-badge-pill.entry.js.map +1 -1
- package/dist/esm/cura-button-outline.entry.js +1 -1
- package/dist/esm/cura-button-select.entry.js +1 -1
- package/dist/esm/cura-button-transparent.entry.js +1 -1
- package/dist/esm/cura-calendar.entry.js +1 -1
- package/dist/esm/cura-card.entry.js +1 -1
- package/dist/esm/cura-checkbox.entry.js +1 -1
- package/dist/esm/cura-display.entry.js +1 -1
- package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
- package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
- package/dist/esm/cura-dropdown-search.entry.js +27 -21
- package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
- package/dist/esm/cura-icons-view.entry.js +1 -1
- package/dist/esm/cura-input-date.entry.js +1 -1
- package/dist/esm/cura-loader-bar.entry.js +1 -1
- package/dist/esm/cura-progress-bar_2.entry.js +93 -0
- package/dist/esm/cura-progress-bar_2.entry.js.map +1 -0
- package/dist/esm/cura-radio.entry.js +1 -1
- package/dist/esm/cura-stepper.entry.js +119 -0
- package/dist/esm/cura-stepper.entry.js.map +1 -0
- package/dist/esm/cura-switch.entry.js +1 -1
- package/dist/esm/cura-toast.entry.js +1 -1
- package/dist/esm/cura-tooltip.entry.js +9 -8
- package/dist/esm/cura-tooltip.entry.js.map +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/badges/cura-badge-dot/cura-badge-dot.d.ts +24 -0
- package/dist/types/components/badges/cura-badge-dot/cura-badge-dot.stories.d.ts +53 -0
- package/dist/types/components/cura-modal/cura-modal.d.ts +10 -0
- package/dist/types/components/cura-modal/cura-modal.stories.d.ts +20 -0
- package/dist/types/components/cura-stepper/cura-progress-bar/cura-progress-bar.d.ts +23 -0
- package/dist/types/components/cura-stepper/cura-stepper-item/cura-stepper-item.d.ts +60 -0
- package/dist/types/components/cura-stepper/cura-stepper.d.ts +62 -0
- package/dist/types/components/cura-stepper/cura-stepper.stories.d.ts +77 -0
- package/dist/types/components/cura-stepper/stepper.type.d.ts +4 -0
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +3 -1
- package/dist/types/components/forms/cura-select/cura-select.d.ts +8 -8
- package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +1 -1
- package/dist/types/components.d.ts +206 -0
- package/package.json +2 -2
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-modal.cjs.entry.js +0 -71
- package/dist/cjs/cura-modal.cjs.entry.js.map +0 -1
- package/dist/cura/p-35920ac0.entry.js +0 -2
- package/dist/cura/p-35920ac0.entry.js.map +0 -1
- package/dist/cura/p-3e4ca7e7.entry.js +0 -2
- package/dist/cura/p-3e4ca7e7.entry.js.map +0 -1
- package/dist/cura/p-6e4f4fbf.entry.js +0 -2
- package/dist/cura/p-6e4f4fbf.entry.js.map +0 -1
- package/dist/cura/p-ef593f12.entry.js.map +0 -1
- package/dist/cura/p-f23c4ed8.entry.js +0 -2
- package/dist/cura/p-f23c4ed8.entry.js.map +0 -1
- package/dist/cura/p-f5d45776.entry.js +0 -2
- package/dist/esm/cura-accordion_12.entry.js.map +0 -1
- package/dist/esm/cura-modal.entry.js +0 -67
- package/dist/esm/cura-modal.entry.js.map +0 -1
- /package/dist/cura/{p-a91d451f.entry.js.map → p-04006a3e.entry.js.map} +0 -0
- /package/dist/cura/{p-576c65b4.entry.js.map → p-0a133399.entry.js.map} +0 -0
- /package/dist/cura/{p-116a1cd6.entry.js.map → p-164ddb46.entry.js.map} +0 -0
- /package/dist/cura/{p-36dbec98.entry.js.map → p-235ac0b4.entry.js.map} +0 -0
- /package/dist/cura/{p-c4da4c44.entry.js.map → p-2af6216a.entry.js.map} +0 -0
- /package/dist/cura/{p-42258230.entry.js.map → p-3030774e.entry.js.map} +0 -0
- /package/dist/cura/{p-3d958d45.entry.js.map → p-3c0931d3.entry.js.map} +0 -0
- /package/dist/cura/{p-bdb1a0c5.entry.js.map → p-4aefe237.entry.js.map} +0 -0
- /package/dist/cura/{p-19f28fa8.entry.js.map → p-545e8e55.entry.js.map} +0 -0
- /package/dist/cura/{p-f5d45776.entry.js.map → p-6624108e.entry.js.map} +0 -0
- /package/dist/cura/{p-3eca0f0c.entry.js.map → p-70adcf7b.entry.js.map} +0 -0
- /package/dist/cura/{p-2545cfc7.entry.js.map → p-b3e93e74.entry.js.map} +0 -0
- /package/dist/cura/{p-dcd2e5bb.entry.js.map → p-bce10f9b.entry.js.map} +0 -0
- /package/dist/cura/{p-818c581f.entry.js.map → p-d13e3295.entry.js.map} +0 -0
- /package/dist/cura/{p-e1a41792.entry.js.map → p-ec7876d3.entry.js.map} +0 -0
- /package/dist/cura/{p-b1a51e81.entry.js.map → p-ee8db3dc.entry.js.map} +0 -0
- /package/dist/cura/{p-4b496c51.entry.js.map → p-f96b0923.entry.js.map} +0 -0
|
@@ -54,7 +54,7 @@ const CuraAlert = class {
|
|
|
54
54
|
return this.icon ? this.icon : iconMapping[this.type];
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (index.h(index.Host, { key: '
|
|
57
|
+
return (index.h(index.Host, { key: 'a0b22404673b1568b9cb937150dda71ce4c99d50' }, index.h("div", { key: 'c30bf1b97d1e1ffaf334ef3bca6cdd1f081c679c', class: this.getClasses(), style: this.styles }, index.h("cura-icon", { key: '1bd88c8a19e073d7b9d967d8df38bb74063cd110', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), index.h("div", { key: '0df09a27c27c7e1743f7cfb9e71c96b102ff4484', class: "content" }, this.label ? (index.h("cura-label", { class: "title", size: "small", color: "neutral-darker", weight: "bold" }, this.label)) : '', index.h("cura-paragraph", { key: '687cc7ab050299f0878c2d10ccd28e92708db85d', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, index.h("slot", { key: 'e2d85d40e65029ea71a43aa23e7298d6dcc7efa9' })), index.h("slot", { key: 'a28fe90c9bfe2b9fb22f196eab7bb2e09e408dbf', name: "actions" })), this.closeable ?
|
|
58
58
|
(index.h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
|
|
59
59
|
: '')));
|
|
60
60
|
}
|
|
@@ -54,7 +54,7 @@ const CuraAvatar = class {
|
|
|
54
54
|
this.imageSrc = this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`;
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (index.h(index.Host, { key: '
|
|
57
|
+
return (index.h(index.Host, { key: '467e74004b400e80a2d7f8e1a40cd9d7e782ff8a', style: this.hostCSSProperties(), role: "img" }, index.h("div", { key: 'c38a163b8aeebd07f8aece7aea9889c336df92a5', class: this.getClasses(), style: this.styles }, index.h("img", { key: 'a22868d4aae4029afb9b325a5c8f5556fa8984ea', src: this.imageSrc || this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`, onError: () => this.onSrcError() }))));
|
|
58
58
|
}
|
|
59
59
|
get host() { return index.getElement(this); }
|
|
60
60
|
static get watchers() { return {
|
|
@@ -42,13 +42,13 @@ const CuraBadgeNumber = class {
|
|
|
42
42
|
}
|
|
43
43
|
getClasses() {
|
|
44
44
|
const classes = {
|
|
45
|
-
'container': true
|
|
45
|
+
'container': true
|
|
46
46
|
};
|
|
47
47
|
classes[this.type.toLowerCase()] = true;
|
|
48
48
|
return classes;
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (index.h(index.Host, { key: '
|
|
51
|
+
return (index.h(index.Host, { key: '8b67f2b913a10de53a519cdafcfbcb140b2adda5' }, this.number && this.number <= 0 ? '' : (index.h("div", { class: this.getClasses(), style: this.styles }, index.h("cura-label", { size: "xsmall", "line-height": "none", color: this.labelColor }, this.number >= 100 ? '99+' : this.number)))));
|
|
52
52
|
}
|
|
53
53
|
static get watchers() { return {
|
|
54
54
|
"disabled": ["handleColorChange"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-badge-counter.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,uvBAAuvB,CAAC;AACpxB,+BAAe,mBAAmB;;MCMrB,eAAe;;;QAE1B,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAqB7B,eAAU,GAAG,gBAAgB,CAAC;QAC9B,gBAAW,GAAG,iBAAiB,CAAC;;qBAZR,SAAS;wBAIL,KAAK;oBAI4B,OAAO;sBAElD,EAAE;;IAOpB,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAED,SAAS;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;;QAEvC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;YAC1D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC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;;","names":["h","Host"],"sources":["src/components/badges/cura-badge-counter/cura-badge-counter.scss?tag=cura-badge-counter&encapsulation=shadow","src/components/badges/cura-badge-counter/cura-badge-counter.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n\n:host {\n width: fit-content;\n display: inline-block;\n height: #{$spacing-xxs};\n position: relative;\n\n .container {\n display: flex;\n min-width: #{$spacing-xxs};\n width: fit-content;\n height: #{$spacing-xxs};\n justify-content: center;\n align-items: center;\n border-radius: calc(#{$spacing-xxs} / 2);\n background: var(--background-color);\n box-sizing: border-box;\n padding: 0 #{$spacing-tiny};\n position: relative;\n\n &.outline,\n &.transparent {\n background: transparent !important;\n }\n\n &.outline {\n &::before {\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 1px solid var(--background-color);\n border-radius: calc(#{$spacing-xxs} / 2);\n }\n }\n }\n\n}\n","import { Component, Host, Prop, h, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-counter',\n styleUrl: 'cura-badge-counter.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n theme = window.CuraAPI.theme;\n\n /** Número a ser representado no badge.\n * Apresentará 99+ para números acima desse valor.\n */\n @Prop({ reflect: true }) number: number | null;\n /**\n * Cor fundamental do design system sem profundidade.\n * Ex.: primary (padrão)\n */\n @Prop() color: string = 'primary';\n /**\n * Define o estado do badge como desabilitado ou habilitado.\n */\n @Prop() disabled: boolean = false;\n /**\n * Define o estilo visual entre solid (default), outline ou transparent.\n */\n @Prop() type: 'solid' | 'outline' | 'transparent' | string = 'solid';\n\n @State() styles = {};\n labelColor = 'primary-darker';\n bgColorName = 'primary-lighter';\n\n @Watch(\"disabled\")\n @Watch(\"color\")\n @Watch(\"type\")\n handleColorChange() {\n this.setColors();\n }\n\n setColors() {\n const color = this.color.toLowerCase();\n /** type outline and transparent */\n if (this.type === 'outline' || this.type === 'transparent') {\n this.bgColorName = this.disabled ? `neutral-medium` : `${color}-dark`;\n this.labelColor = this.bgColorName;\n /** type solid - default */\n } else {\n this.bgColorName = color === 'neutral' || this.disabled ? `neutral-pale` : `${color}-lighter`;\n this.labelColor = this.disabled ? 'neutral-medium' : `${color}-dark`;\n }\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(`${this.bgColorName}`),\n }\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {\n 'container': true
|
|
1
|
+
{"file":"cura-badge-counter.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,uvBAAuvB,CAAC;AACpxB,+BAAe,mBAAmB;;MCMrB,eAAe;;;QAE1B,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAqB7B,eAAU,GAAG,gBAAgB,CAAC;QAC9B,gBAAW,GAAG,iBAAiB,CAAC;;qBAZR,SAAS;wBAIL,KAAK;oBAI4B,OAAO;sBAElD,EAAE;;IAOpB,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAED,SAAS;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;;QAEvC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE;YAC1D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,GAAG,gBAAgB,GAAG,GAAG,KAAK,OAAO,CAAC;YACtE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;;SAEpC;aAAM;YACL,IAAI,CAAC,WAAW,GAAG,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,GAAG,cAAc,GAAG,GAAG,KAAK,UAAU,CAAC;YAC9F,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,GAAG,gBAAgB,GAAG,GAAG,KAAK,OAAO,CAAC;SACtE;QACD,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,GACxE,CAAA;KACF;IAED,iBAAiB;QACf,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAChE,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAED,UAAU;QACR,MAAM,OAAO,GAAG;YACd,WAAW,EAAE,IAAI;SAClB,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;QACxC,OAAO,OAAO,CAAC;KAChB;IAGD,MAAM;QACJ,QACEA,QAACC,UAAI,uDACD,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,IACtCD,iBAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IAC/CA,wBAAY,IAAI,EAAC,QAAQ,iBAAa,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,UAAU,IAChE,IAAI,CAAC,MAAM,IAAI,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAC9B,CACT,CACL,CACI,EACP;KACH;;;;;;;;;;;","names":["h","Host"],"sources":["src/components/badges/cura-badge-counter/cura-badge-counter.scss?tag=cura-badge-counter&encapsulation=shadow","src/components/badges/cura-badge-counter/cura-badge-counter.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n\n:host {\n width: fit-content;\n display: inline-block;\n height: #{$spacing-xxs};\n position: relative;\n\n .container {\n display: flex;\n min-width: #{$spacing-xxs};\n width: fit-content;\n height: #{$spacing-xxs};\n justify-content: center;\n align-items: center;\n border-radius: calc(#{$spacing-xxs} / 2);\n background: var(--background-color);\n box-sizing: border-box;\n padding: 0 #{$spacing-tiny};\n position: relative;\n\n &.outline,\n &.transparent {\n background: transparent !important;\n }\n\n &.outline {\n &::before {\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 1px solid var(--background-color);\n border-radius: calc(#{$spacing-xxs} / 2);\n }\n }\n }\n\n}\n","import { Component, Host, Prop, h, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-counter',\n styleUrl: 'cura-badge-counter.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n theme = window.CuraAPI.theme;\n\n /** Número a ser representado no badge.\n * Apresentará 99+ para números acima desse valor.\n */\n @Prop({ reflect: true }) number: number | null;\n /**\n * Cor fundamental do design system sem profundidade.\n * Ex.: primary (padrão)\n */\n @Prop() color: string = 'primary';\n /**\n * Define o estado do badge como desabilitado ou habilitado.\n */\n @Prop() disabled: boolean = false;\n /**\n * Define o estilo visual entre solid (default), outline ou transparent.\n */\n @Prop() type: 'solid' | 'outline' | 'transparent' | string = 'solid';\n\n @State() styles = {};\n labelColor = 'primary-darker';\n bgColorName = 'primary-lighter';\n\n @Watch(\"disabled\")\n @Watch(\"color\")\n @Watch(\"type\")\n handleColorChange() {\n this.setColors();\n }\n\n setColors() {\n const color = this.color.toLowerCase();\n /** type outline and transparent */\n if (this.type === 'outline' || this.type === 'transparent') {\n this.bgColorName = this.disabled ? `neutral-medium` : `${color}-dark`;\n this.labelColor = this.bgColorName;\n /** type solid - default */\n } else {\n this.bgColorName = color === 'neutral' || this.disabled ? `neutral-pale` : `${color}-lighter`;\n this.labelColor = this.disabled ? 'neutral-medium' : `${color}-dark`;\n }\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(`${this.bgColorName}`),\n }\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {\n 'container': true\n };\n classes[this.type.toLowerCase()] = true;\n return classes;\n }\n\n\n render() {\n return (\n <Host>\n { this.number && this.number <= 0 ? '' : (\n <div class={this.getClasses()} style={this.styles}>\n <cura-label size=\"xsmall\" line-height=\"none\" color={this.labelColor}>\n {this.number >= 100 ? '99+' : this.number}\n </cura-label>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e6d728ec.js');
|
|
6
6
|
|
|
7
|
-
const curaBadgeDistanceCss = ":host .container{display:flex;flex-direction:column;justify-content:center;align-items:center;width:calc(var(--base-spacing) *
|
|
7
|
+
const curaBadgeDistanceCss = ":host .container{display:flex;flex-direction:column;justify-content:center;align-items:center;width:calc(var(--base-spacing) * 10px);height:calc(var(--base-spacing) * 10px);border-radius:calc(var(--base-spacing) * 1px);background:var(--neutral-pale)}";
|
|
8
8
|
const CuraBadgeDistanceStyle0 = curaBadgeDistanceCss;
|
|
9
9
|
|
|
10
10
|
const CuraDistance = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-badge-distance.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,
|
|
1
|
+
{"file":"cura-badge-distance.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,4PAA4P,CAAC;AAC1R,gCAAe,oBAAoB;;MCMtB,YAAY;;;QAMvB,sBAAiB,GAAG,KAAK,CAAC;QAE1B,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;wBANV,CAAC;qBACa,IAAI;sBACnB,EAAE;+BACO,CAAC;;IAM5B,cAAc;QACZ,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACvG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,IAAI,CAAC;QAC3D,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC,CAAC,eAAe,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC;KACnH;IAGD,iBAAiB;QACf,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,uDACHD,kEAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IACvCA,yEAAY,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,IAC1D,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,iBAAiB,GAAG,GAAG,GAAG,EAAE,CAC7C,EACbA,yEAAY,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,cAAc,IACzD,IAAI,CAAC,KAAK,CACA,CACT,CACD,EACP;KACH;IAED,gBAAgB;QACd,IAAI,CAAC,MAAM,GAAG;YACZ,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC;YAC5D,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE;SAClD,CAAA;KACF;;;;;;;;;","names":["h","Host"],"sources":["src/components/badges/cura-badge-distance/cura-badge-distance.scss?tag=cura-badge-distance&encapsulation=shadow","src/components/badges/cura-badge-distance/cura-badge-distance.tsx"],"sourcesContent":["@import \"../../../scss/mixins/spacing.scss\";\n\n:host {\n .container{\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: calc(#{$base-spacing} * 10px);\n height: calc(#{$base-spacing} * 10px);\n border-radius: calc(#{$base-spacing} * 1px);\n background: var(--neutral-pale);\n }\n}\n","import { Component, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-distance',\n styleUrl: 'cura-badge-distance.scss',\n shadow: true,\n})\nexport class CuraDistance {\n\n @Prop() distance = 0;\n @Prop({ reflect: true }) label = 'km';\n @State() styles = {};\n @State() displayDistance = 0;\n isThousandRounded = false;\n\n theme = window.CuraAPI.theme;\n\n @Watch('distance')\n formatDistance() {\n const roundedDistance = this.distance % 1 !== 0 ? parseFloat(this.distance.toFixed(1)) : this.distance; \n this.isThousandRounded = Math.abs(roundedDistance) >= 1000;\n this.displayDistance = this.isThousandRounded ? parseFloat((roundedDistance / 1000).toFixed(1)) : roundedDistance;\n }\n\n\n connectedCallback(){\n this.setCssProperties();\n this.formatDistance(); \n }\n\n render() {\n return (\n <Host>\n <div class=\"container\" style={this.styles}>\n <cura-label size='xsmall' weight='bold' color='neutral-black'>\n {this.displayDistance}{this.isThousandRounded ? 'K' : ''}\n </cura-label>\n <cura-label size='xsmall' weight='bold' color='neutral-dark'>\n {this.label}\n </cura-label>\n </div>\n </Host>\n );\n }\n\n setCssProperties() {\n this.styles = {\n '--neutral-pale': this.theme.colors.getColor(`neutral-pale`),\n '--base-spacing': this.theme.spacing.getSpacing()\n }\n }\n\n}\n"],"version":3}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e6d728ec.js');
|
|
6
|
+
|
|
7
|
+
const curaBadgeDotCss = ":host{display:block;position:relative;width:fit-content;height:fit-content}:host .container{width:calc(var(--base-spacing) * 2px);height:calc(var(--base-spacing) * 2px);position:relative;box-sizing:border-box}:host .container::before{width:100%;height:100%;position:absolute;left:0;top:0;content:\"\";box-sizing:border-box;border-radius:50%;border:1px solid var(--color-dark);background:var(--color)}:host .container.disabled::before{background:var(--neutral-pale);border:1px solid var(--neutral-medium)}:host .container.outline::before{background:transparent;border:2px solid var(--color)}:host .container.outline.disabled::before{border:2px solid var(--neutral-medium)}:host .container.transparent::before{background:var(--color-dark);border:none}:host .container.transparent.disabled::before{background:var(--neutral-medium);border:none}";
|
|
8
|
+
const CuraBadgeDotStyle0 = curaBadgeDotCss;
|
|
9
|
+
|
|
10
|
+
const CuraBadgeDot = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.theme = window.CuraAPI.theme;
|
|
14
|
+
this.color = 'primary';
|
|
15
|
+
this.disabled = false;
|
|
16
|
+
this.type = 'solid';
|
|
17
|
+
this.styles = {};
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
this.styles['--base-spacing'] = this.theme.spacing.getSpacing();
|
|
21
|
+
this.styles['--neutral-medium'] = this.theme.colors.getColor('neutral-dark');
|
|
22
|
+
this.styles['--neutral-pale'] = this.theme.colors.getColor('neutral-pale');
|
|
23
|
+
this.setColors();
|
|
24
|
+
}
|
|
25
|
+
setColors() {
|
|
26
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color': this.theme.colors.getColor(`${this.color}`), '--color-dark': this.theme.colors.getColor(`${this.color}-dark`) });
|
|
27
|
+
}
|
|
28
|
+
getClasses() {
|
|
29
|
+
const classes = {
|
|
30
|
+
'container': true,
|
|
31
|
+
'disabled': this.disabled
|
|
32
|
+
};
|
|
33
|
+
classes[`${this.type}`] = true;
|
|
34
|
+
return classes;
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
return (index.h(index.Host, { key: '00e335977fbb0677db9d95bab901a012ba8a5c06' }, index.h("div", { key: 'e828743793731c986f37dd6a9f7abdc78b63932b', class: this.getClasses(), style: this.styles })));
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
CuraBadgeDot.style = CuraBadgeDotStyle0;
|
|
41
|
+
|
|
42
|
+
exports.cura_badge_dot = CuraBadgeDot;
|
|
43
|
+
|
|
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DACHD,kEAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,GAAQ,CACpD,EACP;KACH;;;;;;","names":["h","Host"],"sources":["src/components/badges/cura-badge-dot/cura-badge-dot.scss?tag=cura-badge-dot&encapsulation=shadow","src/components/badges/cura-badge-dot/cura-badge-dot.tsx"],"sourcesContent":["@import \"../../../scss/mixins/spacing.scss\";\n\n:host {\n display: block;\n position: relative;\n width: fit-content;\n height: fit-content;\n\n .container {\n width: #{$spacing-mini};\n height: #{$spacing-mini};\n position: relative;\n box-sizing: border-box;\n\n &::before {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n content: \"\";\n box-sizing: border-box;\n border-radius: 50%;\n border: 1px solid var(--color-dark);\n background: var(--color);\n }\n\n &.disabled::before {\n background: var(--neutral-pale);\n border: 1px solid var(--neutral-medium);\n }\n\n &.outline::before {\n background: transparent;\n border: 2px solid var(--color);\n }\n &.outline.disabled::before {\n border: 2px solid var(--neutral-medium);\n }\n\n &.transparent::before {\n background: var(--color-dark);\n border: none;\n }\n &.transparent.disabled::before {\n background: var(--neutral-medium);\n border: none;\n }\n\n }\n}\n","import { Component, Host, h, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-dot',\n styleUrl: 'cura-badge-dot.scss',\n shadow: true,\n})\nexport class CuraBadgeDot {\n\n theme = window.CuraAPI.theme;\n\n /**\n * Cor fundamental do design system sem profundidade.\n * Ex.: primary (padrão)\n */\n @Prop() color: string = 'primary';\n /**\n * Define o estado do badge como desabilitado ou habilitado.\n */\n @Prop({reflect: true}) disabled: boolean = false;\n /**\n * Define o estilo visual entre solid (default), outline ou transparent.\n */\n @Prop({reflect: true}) type: 'solid' | 'outline' | 'transparent' | string = 'solid';\n\n @State() styles = {};\n\n\n connectedCallback() {\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.styles['--neutral-medium'] = this.theme.colors.getColor('neutral-dark');;\n this.styles['--neutral-pale'] = this.theme.colors.getColor('neutral-pale');;\n this.setColors();\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color': this.theme.colors.getColor(`${this.color}`),\n '--color-dark': this.theme.colors.getColor(`${this.color}-dark`)\n }\n }\n\n getClasses() {\n const classes = {\n 'container': true,\n 'disabled': this.disabled\n };\n classes[`${this.type}`] = true;\n return classes;\n }\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}></div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -43,6 +43,7 @@ const CuraBadgePill = class {
|
|
|
43
43
|
colors.forEach(color => {
|
|
44
44
|
this.styles[color.name] = this.theme.colors.getColor(color.theme);
|
|
45
45
|
});
|
|
46
|
+
this.styles = Object.assign({}, this.styles);
|
|
46
47
|
}
|
|
47
48
|
hostCSSProperties() {
|
|
48
49
|
return {
|
|
@@ -69,7 +70,7 @@ const CuraBadgePill = class {
|
|
|
69
70
|
}
|
|
70
71
|
render() {
|
|
71
72
|
const symbolColor = this.getSymbolColor();
|
|
72
|
-
return (index.h(index.Host, { key: '
|
|
73
|
+
return (index.h(index.Host, { key: 'd2b79aa7ede4462cd2b591b62321ef69b9e4fed3', style: this.hostCSSProperties() }, index.h("div", { key: 'a82383b03c02990b5879ca647ae06cabb5c32845', class: this.getClasses(), style: this.styles }, this.getIcon(), index.h("cura-label", { key: '1ccf493530fa6b7cee25db83d0fcb37cf308df3d', size: 'xsmall', "line-height": "117%", color: symbolColor }, index.h("slot", { key: '488e4fbd8b30cfcd15b25c9227e129b1c6e1ce32' })))));
|
|
73
74
|
}
|
|
74
75
|
get host() { return index.getElement(this); }
|
|
75
76
|
static get watchers() { return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-badge-pill.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,qrCAAqrC,CAAC;AAC/sC,4BAAe,gBAAgB;;MCMlB,aAAa;;;QAwCxB,UAAK,GAAG,MAAM,CAAC,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BAAa,MAAM,EAAC,KAAK,EAAE,WAAW,IAC7DA,oEAAa,CACF,CACT,CACD,EACP;KACH;;;;;;;;;;","names":["h","Host"],"sources":["src/components/badges/cura-badge-pill/cura-badge-pill.scss?tag=cura-badge-pill&encapsulation=shadow","src/components/badges/cura-badge-pill/cura-badge-pill.tsx"],"sourcesContent":["@import \"../../../scss/mixins/spacing.scss\";\n\n.badge-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: #{$spacing-tiny};\n padding: #{$spacing-tiny};\n border-radius: var(--border-radius);\n font-family: var(--font-family);\n font-size: var(--font-size);\n position: relative;\n box-sizing: border-box;\n width: fit-content;\n height: #{$spacing-xs};\n min-width: #{$spacing-xs};\n\n background-color: var(--color-background);\n\n &::before {\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 1px solid transparent;\n border-radius: var(--border-radius);\n pointer-events: none;\n }\n\n &.icon-only {\n cura-label {\n display: none !important;\n }\n }\n\n &.disabled {\n background-color: var(--color-background-disabled);\n }\n\n &.outline {\n background-color: transparent;\n\n &::before {\n border: 1px solid var(--color-base);\n }\n\n &.disabled::before {\n border: 1px solid var(--color-outline-disabled);\n }\n }\n\n &.transparent {\n background-color: transparent;\n\n &::before {\n border: 1px solid transparent;\n }\n\n &.disabled {\n background-color: transparent;\n }\n }\n\n cura-icon {\n display: flex;\n }\n}\n","import { Component, Host, Prop, State, h, Watch, Element } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-pill',\n styleUrl: 'cura-badge-pill.scss',\n shadow: true,\n})\nexport class CuraBadgePill {\n @Element() host: HTMLElement;\n\n /**\n * Badge type: solid | outline | transparent\n */\n @Prop({ reflect: true }) type: 'solid' | 'outline' | 'transparent' = 'solid';\n\n /**\n * Color base from color scheme. Default: primary\n */\n @Prop() color: 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error' = 'primary';\n\n /**\n * Name of the icon to be used from iconset\n */\n @Prop({ reflect: true }) iconName: string;\n\n /**\n * Custom iconset if needed\n */\n @Prop({ reflect: true }) iconset = 'default';\n\n /**\n * Disabled state. Boolean\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Set badge to icon only. Boolean\n */\n @Prop({ reflect: true }) iconOnly = false;\n\n /**\n * Set border-radius.\n */\n @Prop({ reflect: true }) borderRadius: string = \"2px\";\n\n @State() styles = {};\n\n theme = window.CuraAPI.theme;\n\n @Watch('color')\n handleColorChange() {\n this.setColors();\n }\n\n connectedCallback() {\n this.setBaseStyles();\n this.setColors();\n }\n\n private setBaseStyles() {\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.styles['--font-family'] = this.theme.fonts.getFamily();\n this.styles['--font-size'] = this.theme.fonts.getSize();\n this.styles = { ...this.styles };\n }\n\n private setColors() {\n const colors = [\n { name: '--color-background', theme: `${this.color}-lighter` },\n { name: '--color-base', theme: `${this.color}-dark` },\n { name: '--color-background-disabled', theme: 'neutral-pale' },\n { name: '--color-outline-disabled', theme: 'neutral-medium' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = this.theme.colors.getColor(color.theme);\n });\n this.styles = { ...this.styles };\n }\n\n hostCSSProperties() {\n return {\n '--border-radius': this.borderRadius || '2px',\n };\n }\n\n getClasses() {\n const classes = {};\n classes['badge-container'] = true;\n classes[`icon-only`] = this.iconOnly;\n classes['disabled'] = this.disabled;\n classes[`${this.type}`] = true;\n return classes;\n }\n\n getSymbolColor() {\n return this.disabled\n ? 'neutral-medium'\n : `${this.color}-dark`;\n }\n\n getIcon() {\n if (!this.iconName) return '';\n return <cura-icon\n name={this.iconName}\n iconset={this.iconset}\n size={'micro'}\n color={this.getSymbolColor()}\n />;\n }\n\n render() {\n const symbolColor = this.getSymbolColor();\n return (\n <Host style={this.hostCSSProperties()}>\n <div class={this.getClasses()} style={this.styles}>\n {this.getIcon()}\n <cura-label size='xsmall' line-height=\"117%\" color={symbolColor}>\n <slot></slot>\n </cura-label>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -103,7 +103,7 @@ const CuraButtonOutline = class {
|
|
|
103
103
|
render() {
|
|
104
104
|
const symbolColor = this.getSymbolColor();
|
|
105
105
|
const labelSize = curaButton_definitions.labelSizes[this.size] || curaButton_definitions.labelSizes["default"];
|
|
106
|
-
return (index.h(index.Host, { key: '
|
|
106
|
+
return (index.h(index.Host, { key: '0a0c25f94d0c18dbb90e4836ca3e7bcbbe10d032' }, this.href ? (index.h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: symbolColor }))) : (index.h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), type: this.type }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: symbolColor })))));
|
|
107
107
|
}
|
|
108
108
|
static get formAssociated() { return true; }
|
|
109
109
|
static get watchers() { return {
|
|
@@ -106,7 +106,7 @@ const CuraButtonSelect = class {
|
|
|
106
106
|
}
|
|
107
107
|
render() {
|
|
108
108
|
const labelSize = curaButton_definitions.labelSizes[this.size] || curaButton_definitions.labelSizes['default'];
|
|
109
|
-
return (index.h(index.Host, { key: '
|
|
109
|
+
return (index.h(index.Host, { key: '4b7592b68a09c5b93ec1c9ec6b84c7e5afa06ec3' }, index.h("button", { key: 'd607a733d64f73bd4bd4405e0aeb9d7f5ceebf52', class: this.getClasses(), style: this.styles, disabled: this.disabled, onClick: e => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, index.h("div", { key: '14e2f5b7309bf6c2252c81ab2f02fb36670facf3', class: "button-container" }, this.iconName ? this.getIcon() : null, index.h("cura-label", { key: '0759d70b0105a56dfa42bce78f2f5b8c33b04254', class: "label", size: labelSize, lineHeight: "0%", color: this.getLabelFontColor(), weight: "regular" }, index.h("slot", { key: 'a9935483ee6c67b8142878672804dfb7df0d8479' })), this.counter ? this.getCounter() : null, this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null))));
|
|
110
110
|
}
|
|
111
111
|
get host() { return index.getElement(this); }
|
|
112
112
|
static get watchers() { return {
|
|
@@ -92,7 +92,7 @@ const CuraButtonTransparent = class {
|
|
|
92
92
|
render() {
|
|
93
93
|
const symbolColor = this.getSymbolColor();
|
|
94
94
|
const labelSize = curaButton_definitions.labelSizes[this.size] || curaButton_definitions.labelSizes["default"];
|
|
95
|
-
return (index.h(index.Host, { key: '
|
|
95
|
+
return (index.h(index.Host, { key: 'f93f2f1b495403127238468c57edfcb5e9f69d43' }, this.href ? (index.h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: symbolColor }))) : (index.h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), type: this.type }, index.h("span", { class: "button-container" }, this.getIcon(), index.h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, index.h("slot", null))), index.h("cura-loader-circle", { size: this.size, color: symbolColor })))));
|
|
96
96
|
}
|
|
97
97
|
static get formAssociated() { return true; }
|
|
98
98
|
static get watchers() { return {
|
|
@@ -3906,7 +3906,7 @@ const CuraCalendar = class {
|
|
|
3906
3906
|
}
|
|
3907
3907
|
render() {
|
|
3908
3908
|
const { months } = this.fetchMonthNames();
|
|
3909
|
-
return (index$1.h(index$1.Host, { key: '
|
|
3909
|
+
return (index$1.h(index$1.Host, { key: '859c5f15de173c774dc9f8a88792845741b665e2', style: this.getHostCSSProperties() }, index$1.h("div", { key: '5838783d7ecb5b2258ef7ef73ba32ca7ddbad470', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, index$1.h("header", { key: '16245dbb73d9d0a277891b3853f451b89acccc35', class: "header" }, index$1.h("div", { key: '9a22c4386363642fa7219edebd9e9a5cfb5220aa', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, index$1.h("cura-icon", { key: '4d3ee4454dfc8bbcd8d76df101b553c86b0cea8f', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", color: this.determinePrevButtonColor(), onClick: !this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev') }), this.type === 'dropdown' ? (index$1.h("div", { class: "select" }, index$1.h("cura-select", { size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (index$1.h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), index$1.h("cura-select", { size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (index$1.h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (index$1.h("cura-label", { color: "neutral-black", size: "large" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), index$1.h("cura-icon", { key: '1f54119aafaa80816cdd016100a7987cba6656b0', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), index$1.h("span", { key: '40be6c876675cf43b42e214e30639e48873dc4bc', class: "days-of-week" }, this.fetchWeekDays().map((day, index) => (index$1.h("cura-label", { class: "day", size: "xsmall", color: "neutral-black", weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase())))), index$1.h("div", { key: '72cae6b30fa5b7d5e180b796458d1844aba27ea9', class: "dates" }, !this.collapsed
|
|
3910
3910
|
? this.fetchDaysOfMonth().map((day, index) => (index$1.h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
|
|
3911
3911
|
: this.fetchDaysOfWeek().map((day, index) => (index$1.h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))), this.collapsed !== null ? (this.collapsed ? (index$1.h("div", { class: "collapsed-container" }, index$1.h("cura-button-transparent", { onClick: () => this.showNotColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "plusCircle" }, "Veja mais datas"))) : (index$1.h("div", { class: "collapsed-container" }, index$1.h("cura-button-transparent", { onClick: () => this.showColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "minusCircle" }, "Veja menos datas")))) : null)));
|
|
3912
3912
|
}
|
|
@@ -43,7 +43,7 @@ const CuraCard = class {
|
|
|
43
43
|
return classes;
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (index.h(index.Host, { key: '
|
|
46
|
+
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
47
|
}
|
|
48
48
|
};
|
|
49
49
|
CuraCard.style = CuraCardStyle0;
|
|
@@ -164,7 +164,7 @@ const CuraCheckbox = class {
|
|
|
164
164
|
return index.h("cura-icon", { class: "icon", name: iconName, size: iconSize, color: iconColor });
|
|
165
165
|
}
|
|
166
166
|
render() {
|
|
167
|
-
return (index.h(index.Host, { key: '
|
|
167
|
+
return (index.h(index.Host, { key: 'c589b642a730e09b8d5ba60b69b45f131560ffda' }, index.h("div", { key: '85ee55dc52042e513e070d68af348dc78d1990e2', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, index.h("div", { key: '59e78d3b717b0bbd77d98da09ab7f1da30d02f14', class: "info" }, index.h("div", { key: '64d683966633a625e7e477fcf1b00364d5fd3fa7', class: "label-wrapper" }, index.h("cura-label", { key: '76d34006ffd837285cb899278f759d95862097c5', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && index.h("cura-paragraph", { key: '01394587736d7402d5c6729e9f7e93f7b08ad742', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), index.h("cura-label", { key: 'fcbbea9a05b9299a814111ea36d7412df6f54e92', color: this.assignColor('message'), size: "xsmall", class: "message" }, index.h("slot", { key: '99c46ed2eb8492cbebb114d828935f1ec0bf7796' }))), index.h("div", { key: '6291780f613af4e320c486b46697df6f19bdce0e', class: 'checkbox', tabIndex: this.ontabindex }, index.h("input", { key: 'b922e6498ecfd28391843cdfa45c850f045f3ab6', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
|
|
168
168
|
}
|
|
169
169
|
static get formAssociated() { return true; }
|
|
170
170
|
get host() { return index.getElement(this); }
|
|
@@ -69,7 +69,7 @@ const CuraDisplay = class {
|
|
|
69
69
|
return tags[`${this.level}`] || tags['default'];
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (index.h(index.Host, { key: '
|
|
72
|
+
return (index.h(index.Host, { key: '01876449797c600a4fa37c9b4addd80855e6fc83', style: this.hostCSSProperties() }, this.getHeadingTag()));
|
|
73
73
|
}
|
|
74
74
|
get host() { return index.getElement(this); }
|
|
75
75
|
static get watchers() { return {
|
|
@@ -12,7 +12,7 @@ const CuraDropdownSearchOptionTitle = class {
|
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: 'b378a877e6a90727e3216c284c2a064992f2dfc9', slot: "dropdown-search-option" }, index.h("cura-label", { key: 'e2d457a7d42bcacae09012322b19a54e44fb109f', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, index.h("slot", { key: 'e889fa1839988a0f138e14ad15b0e250100ba38c' }))));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
CuraDropdownSearchOptionTitle.style = CuraDropdownSearchOptionTitleStyle0;
|
|
@@ -46,12 +46,12 @@ const CuraDropdownSearchOption = class {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (index.h(index.Host, { key: '
|
|
49
|
+
return (index.h(index.Host, { key: '515f662d5fb08cd77e7ad24de425ec34497e5e6e', slot: "dropdown-search-option" }, index.h("div", { key: '8decccf2416ae3ea135bba38845da2a63c9cfdce', style: this.styles, class: {
|
|
50
50
|
"option-container": true,
|
|
51
51
|
hovered: this.selectable ? this.hovered : false,
|
|
52
52
|
selected: this.selected,
|
|
53
53
|
disabled: !this.selectable
|
|
54
|
-
} }, index.h("div", { key: '
|
|
54
|
+
} }, index.h("div", { key: '8c3cce88d40c764ae87cf8c54e3fb9fe9651f62d', class: "content-container" }, index.h("div", { key: '1c674ff6a3721c42e034b994bf903d8608100cb8', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, index.h("slot", { key: '7a6545a242da0774b74a403b2dc26ce378d146fd', name: "image" }), index.h("cura-heading", { key: '860fede2f20748b5e15ddf3222cd0c6ce3ff1f8c', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, index.h("slot", { key: 'e9a7610e2d561cb399d58c44f98fb9ea0e6cf5c6' }))), index.h("slot", { key: 'c784f7cddd4d5e246126ef43ab08e82db51fc2be', name: "action" })))));
|
|
55
55
|
}
|
|
56
56
|
get hostElement() { return index.getElement(this); }
|
|
57
57
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e6d728ec.js');
|
|
6
6
|
|
|
7
|
-
const curaDropdownSearchCss = ":host{display:block;width:100%;box-sizing:border-box}.dropdown{display:flex;position:relative;flex-direction:column;width:inherit}.dropdown .dropdown-search-list{z-index:1000}.dropdown-input-search{width:100%;display:flex;justify-content:center;align-items:center;background:transparent}.dropdown-input-search.dropdown-open ::part(cura-input-field){border-radius:4px 4px 0px 0px}.dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:none}.dropdown-input-search.dropdown-open cura-input-text ::slotted([slot=helperText]){display:none}.dropdown-search-list{position:absolute;top:calc(100% - 8px);width:100%;max-height:var(--dropdown-max-height);padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));border-radius:0px 0px 4px 4px;border-top:0 var(--neutral-light);border-right:2px solid var(--neutral-light);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;display:none}.dropdown-search-list.visible{display:block}.dropdown-search-list-input-search{width:inherit;display:flex;justify-content:center;align-items:center;padding:16px 8px;border-bottom:2px solid var(--info-base);background-color:var(--neutral-purewhite)}.dropdown-search-list-input-search cura-input-text{width:inherit}.dropdown-search-list-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile{position:fixed;top:1%;left:0;right:0;width:100%;z-index:10000}.dropdown-mobile .dropdown-input-search{display:flex;
|
|
7
|
+
const curaDropdownSearchCss = ":host{display:block;width:100%;box-sizing:border-box}.dropdown{display:flex;position:relative;flex-direction:column;width:inherit}.dropdown .dropdown-search-list{z-index:1000}.dropdown-input-search{width:100%;display:flex;justify-content:center;align-items:center;background:transparent}.dropdown-input-search.dropdown-open ::part(cura-input-field){border-radius:4px 4px 0px 0px}.dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:none}.dropdown-input-search.dropdown-open cura-input-text ::slotted([slot=helperText]){display:none}.dropdown-search-list{position:absolute;top:calc(100% - 8px);width:100%;max-height:var(--dropdown-max-height);padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));border-radius:0px 0px 4px 4px;border-top:0 var(--neutral-light);border-right:2px solid var(--neutral-light);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;display:none}.dropdown-search-list.visible{display:block}.dropdown-search-list-input-search{width:inherit;display:flex;justify-content:center;align-items:center;padding:16px 8px;border-bottom:2px solid var(--info-base);background-color:var(--neutral-purewhite)}.dropdown-search-list-input-search cura-input-text{width:inherit}.dropdown-search-list-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile{position:fixed;top:1%;left:0;right:0;width:100%;z-index:10000}.dropdown-mobile .dropdown-input-search{display:flex;background-color:var(--neutral-purewhite);border-bottom:2px solid var(--info-base);z-index:10000}.dropdown-mobile .dropdown-input-search cura-button-transparent{display:flex;margin-right:4px}.dropdown-mobile .dropdown-input-search cura-input-text{padding:12px 8px 12px 0px}.dropdown-mobile .dropdown-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile .dropdown-input-search.dropdown-open{display:flex}.dropdown-mobile .dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:block}.dropdown-mobile .dropdown-search-list{position:static;width:100%;height:calc(100vh - var(--dynamic-input-search-height, 0));max-height:none;padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:none;border:none;background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;z-index:10000}";
|
|
8
8
|
const CuraDropdownSearchStyle0 = curaDropdownSearchCss;
|
|
9
9
|
|
|
10
10
|
const CuraDropdownSearch = class {
|
|
@@ -14,16 +14,14 @@ const CuraDropdownSearch = class {
|
|
|
14
14
|
this.onselect = index.createEvent(this, "onselect", 7);
|
|
15
15
|
this.overlayElement = null;
|
|
16
16
|
this.adjustInputPosition = () => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
});
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const isKeyboardOpen = (window === null || window === void 0 ? void 0 : window.innerHeight) < this.screenDefaultHeight;
|
|
19
|
+
const dropdown = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.dropdown-mobile');
|
|
20
|
+
if (dropdown) {
|
|
21
|
+
dropdown.style.position = isKeyboardOpen ? 'absolute' : 'fixed';
|
|
22
|
+
dropdown.style.bottom = isKeyboardOpen ? `${((_b = window === null || window === void 0 ? void 0 : window.screen) === null || _b === void 0 ? void 0 : _b.height) - (window === null || window === void 0 ? void 0 : window.innerHeight)}px` : '0';
|
|
23
|
+
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
|
24
|
+
}
|
|
27
25
|
};
|
|
28
26
|
this.handleSlotChange = () => {
|
|
29
27
|
this.options = Array.from(this.host.querySelectorAll('cura-dropdown-search-option'));
|
|
@@ -65,6 +63,10 @@ const CuraDropdownSearch = class {
|
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
};
|
|
66
|
+
this.setUp = () => {
|
|
67
|
+
this.handleResize();
|
|
68
|
+
this.adjustInputPosition();
|
|
69
|
+
};
|
|
68
70
|
this.size = 'large';
|
|
69
71
|
this.status = 'default';
|
|
70
72
|
this.disabled = false;
|
|
@@ -86,6 +88,7 @@ const CuraDropdownSearch = class {
|
|
|
86
88
|
this.hoveredIndex = -1;
|
|
87
89
|
this.options = [];
|
|
88
90
|
this.originalOverflow = '';
|
|
91
|
+
this.screenDefaultHeight = 0;
|
|
89
92
|
}
|
|
90
93
|
connectedCallback() {
|
|
91
94
|
this.weights = window.CuraAPI.theme.fonts.getWeights();
|
|
@@ -118,12 +121,15 @@ const CuraDropdownSearch = class {
|
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
componentDidLoad() {
|
|
121
|
-
|
|
122
|
-
|
|
124
|
+
var _a;
|
|
125
|
+
this.screenDefaultHeight = window === null || window === void 0 ? void 0 : window.innerHeight;
|
|
126
|
+
window === null || window === void 0 ? void 0 : window.addEventListener('resize', this.setUp);
|
|
127
|
+
(_a = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener('resize', this.adjustInputPosition);
|
|
123
128
|
}
|
|
124
129
|
disconnectedCallback() {
|
|
125
|
-
|
|
126
|
-
window.removeEventListener('resize', this.
|
|
130
|
+
var _a;
|
|
131
|
+
window === null || window === void 0 ? void 0 : window.removeEventListener('resize', this.setUp);
|
|
132
|
+
(_a = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener('resize', this.adjustInputPosition);
|
|
127
133
|
}
|
|
128
134
|
showOverlay() {
|
|
129
135
|
if (!this.overlayElement) {
|
|
@@ -150,7 +156,7 @@ const CuraDropdownSearch = class {
|
|
|
150
156
|
}
|
|
151
157
|
addClickListenersToOptions() {
|
|
152
158
|
this.options.forEach((option, index) => {
|
|
153
|
-
option.addEventListener('optionSelected', () => this.onSelectedOption(index));
|
|
159
|
+
option === null || option === void 0 ? void 0 : option.addEventListener('optionSelected', () => this.onSelectedOption(index));
|
|
154
160
|
});
|
|
155
161
|
}
|
|
156
162
|
updateSelectedOption(value) {
|
|
@@ -158,7 +164,7 @@ const CuraDropdownSearch = class {
|
|
|
158
164
|
this.hoveredIndex = selectedOptionIndex;
|
|
159
165
|
this.updateOptionAttribute('hovered', this.hoveredIndex);
|
|
160
166
|
this.updateOptionAttribute('selected', this.hoveredIndex);
|
|
161
|
-
this.
|
|
167
|
+
this.scrollHoveredOptionIntoView();
|
|
162
168
|
this.adjustInputPosition();
|
|
163
169
|
}
|
|
164
170
|
onSelectedOption(index) {
|
|
@@ -178,7 +184,7 @@ const CuraDropdownSearch = class {
|
|
|
178
184
|
const newIndex = (this.hoveredIndex + direction + visibleOptions.length) % visibleOptions.length;
|
|
179
185
|
this.hoveredIndex = newIndex;
|
|
180
186
|
this.updateOptionAttribute('hovered', this.hoveredIndex);
|
|
181
|
-
this.
|
|
187
|
+
this.scrollHoveredOptionIntoView();
|
|
182
188
|
}
|
|
183
189
|
updateOptionAttribute(attribute, indexToUpdate) {
|
|
184
190
|
this.options.forEach((option, index) => {
|
|
@@ -190,7 +196,7 @@ const CuraDropdownSearch = class {
|
|
|
190
196
|
const currentValue = this.value;
|
|
191
197
|
this.hoveredIndex = visibleOptions.findIndex(option => option.getAttribute('value') === currentValue);
|
|
192
198
|
}
|
|
193
|
-
|
|
199
|
+
scrollHoveredOptionIntoView() {
|
|
194
200
|
var _a;
|
|
195
201
|
const container = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.dropdown-search-list');
|
|
196
202
|
const hoveredOption = this.options[this.hoveredIndex];
|
|
@@ -257,9 +263,9 @@ const CuraDropdownSearch = class {
|
|
|
257
263
|
}
|
|
258
264
|
render() {
|
|
259
265
|
const isMobileDropdown = this.isMobile && this.isDropdownOpen;
|
|
260
|
-
return (index.h(index.Host, { key: '
|
|
266
|
+
return (index.h(index.Host, { key: 'b65367e4fa490b0dff8616bb9d82665bf3bb6f2b', style: this.hostCSSProperties(), class: "dropdown-overlay" }, index.h("div", { key: 'ab7e1b6038a6dfa6b707bc97f225d68ed97bdc07', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, index.h("div", { key: '7e3ab85750a9d868fa789d1f1841c0a907b8948c', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (index.h("cura-button-transparent", { key: 'f171dceed48f41ad15736cbb358a1ffa6288d261', fontColor: "dark", onClick: () => this.handleGoBack(), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), index.h("cura-input-text", { key: '53e7aa39324cc7c4ce52388f80823d0fb144d4e0', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: isMobileDropdown ? 'transparent' : 'default', required: this.required, hideErrorIcon: this.status === 'error', iconName: this.iconName || 'search', value: this.value, status: this.status, onValueChange: e => this.onValueChange(e.target.value), onInput: e => this.handleInputChange(e), onFocus: () => this.handleOnFocus(), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
|
|
261
267
|
this.handleOnBlur();
|
|
262
|
-
}, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, index.h("slot", { key: '
|
|
268
|
+
}, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, index.h("slot", { key: '0fec269301bc1aa23978ec2b52adb856e9e8f17d', name: "helperText" }))), index.h("div", { key: 'a6060851435b1da0bac0adb2445bfb90000c17d7', id: "dropdown-search-list", class: this.getDropdownClasses() }, index.h("slot", { key: '5443c23f1279be7243a27fccb39aa9ce35452b99', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
|
|
263
269
|
}
|
|
264
270
|
get host() { return index.getElement(this); }
|
|
265
271
|
static get watchers() { return {
|