@rededor/cura 1.4.0-alpha.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cura-accordion_12.cjs.entry.js +12 -16
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
- 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 +63 -0
- package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
- package/dist/cjs/cura-badge-pill.cjs.entry.js +83 -0
- package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-select.cjs.entry.js +2 -11
- package/dist/cjs/cura-button-select.cjs.entry.js.map +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 +24 -15
- package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
- package/dist/cjs/{cura-icon.definitions-8d714f6a.js → cura-icon.definitions-5223028b.js} +2 -4
- package/dist/cjs/cura-icon.definitions-5223028b.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +2 -5
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +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-modal.cjs.entry.js +28 -7
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-radio.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.css +51 -0
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +149 -0
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -0
- package/dist/collection/components/badges/{cura-badge-number/cura-badge-number.stories.js → cura-badge-counter/cura-badge-counter.stories.js} +33 -13
- package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.stories.js.map +1 -0
- package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +1 -1
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.css +73 -0
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +219 -0
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -0
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.stories.js +126 -0
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.stories.js.map +1 -0
- 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 +5 -14
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +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.definitions.js +1 -2
- package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +2 -6
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.stories.js +1 -3
- package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +2 -5
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.css +4 -2
- package/dist/collection/components/cura-modal/cura-modal.js +91 -10
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.stories.js +54 -18
- 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-toast/cura-toast.js +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.js +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.js +26 -16
- 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.js +3 -3
- 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/collection/utils/utils.js +1 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/cura-alert.js +1 -1
- package/dist/components/cura-avatar.js +1 -1
- package/dist/components/cura-badge-counter.d.ts +11 -0
- package/dist/components/cura-badge-counter.js +8 -0
- package/dist/components/cura-badge-counter.js.map +1 -0
- package/dist/components/cura-badge-counter2.js +90 -0
- package/dist/components/cura-badge-counter2.js.map +1 -0
- package/dist/components/cura-badge-distance.js +1 -1
- package/dist/components/{cura-badge-number.d.ts → cura-badge-pill.d.ts} +4 -4
- package/dist/components/cura-badge-pill.js +120 -0
- package/dist/components/cura-badge-pill.js.map +1 -0
- package/dist/components/cura-button-outline.js +1 -1
- package/dist/components/cura-button-select.js +6 -15
- package/dist/components/cura-button-select.js.map +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 +26 -16
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-icon2.js +3 -8
- package/dist/components/cura-icon2.js.map +1 -1
- package/dist/components/cura-icons-view.js +7 -16
- package/dist/components/cura-icons-view.js.map +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 +36 -9
- 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-radio.js +1 -1
- package/dist/components/cura-select-option2.js +1 -1
- package/dist/components/cura-select2.js +3 -3
- package/dist/components/cura-switch.js +1 -1
- package/dist/components/cura-toast.js +1 -1
- package/dist/components/cura-tooltip.js +1 -1
- package/dist/components/index.js +4 -2
- 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-01e301d4.entry.js → p-116a1cd6.entry.js} +2 -2
- package/dist/cura/{p-5bb8302c.entry.js → p-19f28fa8.entry.js} +2 -2
- package/dist/cura/p-19f28fa8.entry.js.map +1 -0
- package/dist/cura/{p-eda28278.entry.js → p-2545cfc7.entry.js} +2 -2
- package/dist/cura/p-35920ac0.entry.js +2 -0
- package/dist/cura/p-35920ac0.entry.js.map +1 -0
- package/dist/cura/{p-eea093b2.entry.js → p-36dbec98.entry.js} +2 -2
- package/dist/cura/{p-ed839f1e.entry.js → p-3d958d45.entry.js} +2 -2
- package/dist/cura/{p-3536c96b.entry.js → p-3e4ca7e7.entry.js} +2 -2
- package/dist/cura/{p-e5b0dd74.entry.js → p-3eca0f0c.entry.js} +2 -2
- package/dist/cura/{p-1f53580a.entry.js → p-42258230.entry.js} +2 -2
- package/dist/cura/p-48f9289b.js +2 -0
- package/dist/cura/p-48f9289b.js.map +1 -0
- package/dist/cura/{p-dbd9eab3.entry.js → p-4b496c51.entry.js} +2 -2
- package/dist/cura/p-52f854e0.entry.js +2 -0
- package/dist/cura/p-52f854e0.entry.js.map +1 -0
- package/dist/cura/{p-81c66f2b.entry.js → p-576c65b4.entry.js} +2 -2
- package/dist/cura/{p-bfb5e9e1.entry.js → p-6e4f4fbf.entry.js} +2 -2
- package/dist/cura/{p-0e28f1c8.entry.js → p-818c581f.entry.js} +2 -2
- package/dist/cura/{p-b0451cb3.entry.js → p-a91d451f.entry.js} +2 -2
- package/dist/cura/p-aa65cb50.entry.js +2 -0
- package/dist/cura/p-aa65cb50.entry.js.map +1 -0
- package/dist/cura/{p-075b02de.entry.js → p-b1a51e81.entry.js} +2 -2
- package/dist/cura/{p-f375a612.entry.js → p-bdb1a0c5.entry.js} +2 -2
- package/dist/cura/p-c4da4c44.entry.js +2 -0
- package/dist/cura/p-c4da4c44.entry.js.map +1 -0
- package/dist/cura/{p-a7ecea4a.entry.js → p-dcd2e5bb.entry.js} +2 -2
- package/dist/cura/{p-7853ab16.entry.js → p-e1a41792.entry.js} +2 -2
- package/dist/cura/p-ef593f12.entry.js +2 -0
- package/dist/cura/p-ef593f12.entry.js.map +1 -0
- package/dist/cura/p-f23c4ed8.entry.js +2 -0
- package/dist/cura/p-f23c4ed8.entry.js.map +1 -0
- package/dist/cura/p-f5d45776.entry.js +2 -0
- package/dist/esm/cura-accordion_12.entry.js +12 -16
- package/dist/esm/cura-accordion_12.entry.js.map +1 -1
- 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 +59 -0
- package/dist/esm/cura-badge-counter.entry.js.map +1 -0
- package/dist/esm/cura-badge-distance.entry.js +1 -1
- package/dist/esm/cura-badge-pill.entry.js +79 -0
- package/dist/esm/cura-badge-pill.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +1 -1
- package/dist/esm/cura-button-select.entry.js +2 -11
- package/dist/esm/cura-button-select.entry.js.map +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 +24 -15
- package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
- package/dist/esm/cura-icon.definitions-a892c0e2.js +17 -0
- package/dist/esm/cura-icon.definitions-a892c0e2.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +2 -5
- package/dist/esm/cura-icons-view.entry.js.map +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-modal.entry.js +28 -7
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura-radio.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/badges/cura-badge-counter/cura-badge-counter.d.ts +30 -0
- package/dist/types/components/badges/{cura-badge-number/cura-badge-number.stories.d.ts → cura-badge-counter/cura-badge-counter.stories.d.ts} +26 -1
- package/dist/types/components/badges/cura-badge-pill/cura-badge-pill.d.ts +44 -0
- package/dist/types/components/badges/cura-badge-pill/cura-badge-pill.stories.d.ts +119 -0
- package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +1 -2
- package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +0 -1
- package/dist/types/components/cura-modal/cura-modal.d.ts +22 -3
- package/dist/types/components/cura-modal/cura-modal.stories.d.ts +42 -3
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +8 -0
- package/dist/types/components.d.ts +140 -19
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/cura-badge-number.cjs.entry.js +0 -29
- package/dist/cjs/cura-badge-number.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-icon.definitions-8d714f6a.js.map +0 -1
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +0 -28
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +0 -66
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +0 -1
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +0 -1
- package/dist/components/cura-badge-number.js +0 -8
- package/dist/components/cura-badge-number.js.map +0 -1
- package/dist/components/cura-badge-number2.js +0 -49
- package/dist/components/cura-badge-number2.js.map +0 -1
- package/dist/cura/p-0308cf6b.entry.js +0 -2
- package/dist/cura/p-0308cf6b.entry.js.map +0 -1
- package/dist/cura/p-5bb8302c.entry.js.map +0 -1
- package/dist/cura/p-7090d4a7.entry.js +0 -2
- package/dist/cura/p-7090d4a7.entry.js.map +0 -1
- package/dist/cura/p-71a2dcef.entry.js +0 -2
- package/dist/cura/p-71a2dcef.entry.js.map +0 -1
- package/dist/cura/p-9a7e3f48.entry.js +0 -2
- package/dist/cura/p-9a7e3f48.entry.js.map +0 -1
- package/dist/cura/p-a7221f0c.js +0 -2
- package/dist/cura/p-a7221f0c.js.map +0 -1
- package/dist/cura/p-d635501a.entry.js +0 -2
- package/dist/cura/p-d635501a.entry.js.map +0 -1
- package/dist/cura/p-ebed83d1.entry.js +0 -2
- package/dist/esm/cura-badge-number.entry.js +0 -25
- package/dist/esm/cura-badge-number.entry.js.map +0 -1
- package/dist/esm/cura-icon.definitions-aaa4e80f.js +0 -18
- package/dist/esm/cura-icon.definitions-aaa4e80f.js.map +0 -1
- package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +0 -8
- /package/dist/cura/{p-01e301d4.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
- /package/dist/cura/{p-eda28278.entry.js.map → p-2545cfc7.entry.js.map} +0 -0
- /package/dist/cura/{p-eea093b2.entry.js.map → p-36dbec98.entry.js.map} +0 -0
- /package/dist/cura/{p-ed839f1e.entry.js.map → p-3d958d45.entry.js.map} +0 -0
- /package/dist/cura/{p-3536c96b.entry.js.map → p-3e4ca7e7.entry.js.map} +0 -0
- /package/dist/cura/{p-e5b0dd74.entry.js.map → p-3eca0f0c.entry.js.map} +0 -0
- /package/dist/cura/{p-1f53580a.entry.js.map → p-42258230.entry.js.map} +0 -0
- /package/dist/cura/{p-dbd9eab3.entry.js.map → p-4b496c51.entry.js.map} +0 -0
- /package/dist/cura/{p-81c66f2b.entry.js.map → p-576c65b4.entry.js.map} +0 -0
- /package/dist/cura/{p-bfb5e9e1.entry.js.map → p-6e4f4fbf.entry.js.map} +0 -0
- /package/dist/cura/{p-0e28f1c8.entry.js.map → p-818c581f.entry.js.map} +0 -0
- /package/dist/cura/{p-b0451cb3.entry.js.map → p-a91d451f.entry.js.map} +0 -0
- /package/dist/cura/{p-075b02de.entry.js.map → p-b1a51e81.entry.js.map} +0 -0
- /package/dist/cura/{p-f375a612.entry.js.map → p-bdb1a0c5.entry.js.map} +0 -0
- /package/dist/cura/{p-a7ecea4a.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
- /package/dist/cura/{p-7853ab16.entry.js.map → p-e1a41792.entry.js.map} +0 -0
- /package/dist/cura/{p-ebed83d1.entry.js.map → p-f5d45776.entry.js.map} +0 -0
|
@@ -81,13 +81,57 @@ export namespace Components {
|
|
|
81
81
|
"size": '80' | '40' | '32' | '24';
|
|
82
82
|
"type": 'default' | 'branding';
|
|
83
83
|
}
|
|
84
|
+
interface CuraBadgeCounter {
|
|
85
|
+
/**
|
|
86
|
+
* Cor fundamental do design system sem profundidade. Ex.: primary (padrão)
|
|
87
|
+
*/
|
|
88
|
+
"color": string;
|
|
89
|
+
/**
|
|
90
|
+
* Define o estado do badge como desabilitado ou habilitado.
|
|
91
|
+
*/
|
|
92
|
+
"disabled": boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Número a ser representado no badge. Apresentará 99+ para números acima desse valor.
|
|
95
|
+
*/
|
|
96
|
+
"number": number | null;
|
|
97
|
+
/**
|
|
98
|
+
* Define o estilo visual entre solid (default), outline ou transparent.
|
|
99
|
+
*/
|
|
100
|
+
"type": 'solid' | 'outline' | 'transparent' | string;
|
|
101
|
+
}
|
|
84
102
|
interface CuraBadgeDistance {
|
|
85
103
|
"distance": number;
|
|
86
104
|
"label": string;
|
|
87
105
|
}
|
|
88
|
-
interface
|
|
89
|
-
|
|
90
|
-
|
|
106
|
+
interface CuraBadgePill {
|
|
107
|
+
/**
|
|
108
|
+
* Set border-radius.
|
|
109
|
+
*/
|
|
110
|
+
"borderRadius": string;
|
|
111
|
+
/**
|
|
112
|
+
* Color base from color scheme. Default: primary
|
|
113
|
+
*/
|
|
114
|
+
"color": 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
115
|
+
/**
|
|
116
|
+
* Disabled state. Boolean
|
|
117
|
+
*/
|
|
118
|
+
"disabled": boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Name of the icon to be used from iconset
|
|
121
|
+
*/
|
|
122
|
+
"iconName": string;
|
|
123
|
+
/**
|
|
124
|
+
* Set badge to icon only. Boolean
|
|
125
|
+
*/
|
|
126
|
+
"iconOnly": boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Custom iconset if needed
|
|
129
|
+
*/
|
|
130
|
+
"iconset": string;
|
|
131
|
+
/**
|
|
132
|
+
* Badge type: solid | outline | transparent
|
|
133
|
+
*/
|
|
134
|
+
"type": 'solid' | 'outline' | 'transparent';
|
|
91
135
|
}
|
|
92
136
|
interface CuraButton {
|
|
93
137
|
/**
|
|
@@ -216,7 +260,7 @@ export namespace Components {
|
|
|
216
260
|
interface CuraButtonSelect {
|
|
217
261
|
"background": 'dark' | 'light';
|
|
218
262
|
"color": string;
|
|
219
|
-
"counter":
|
|
263
|
+
"counter": number | null;
|
|
220
264
|
"disabled": boolean;
|
|
221
265
|
"iconName": string;
|
|
222
266
|
"iconPosition": 'left' | 'right';
|
|
@@ -775,14 +819,26 @@ export namespace Components {
|
|
|
775
819
|
* Property background to control modal backdrop color. Default: light
|
|
776
820
|
*/
|
|
777
821
|
"background"?: 'dark' | 'light';
|
|
822
|
+
/**
|
|
823
|
+
* Property bottom to control modal bottom position. Default: 0px
|
|
824
|
+
*/
|
|
825
|
+
"bottom"?: number;
|
|
826
|
+
/**
|
|
827
|
+
* Property left to control modal left position. Default: 0px
|
|
828
|
+
*/
|
|
829
|
+
"left"?: number;
|
|
778
830
|
/**
|
|
779
831
|
* Property open to control modal visibility. Default: false
|
|
780
832
|
*/
|
|
781
833
|
"open"?: boolean;
|
|
782
834
|
/**
|
|
783
|
-
* Property
|
|
835
|
+
* Property right to control modal right position. Default: 0px
|
|
784
836
|
*/
|
|
785
|
-
"
|
|
837
|
+
"right"?: number;
|
|
838
|
+
/**
|
|
839
|
+
* Property top to control modal top position. Default: 0px
|
|
840
|
+
*/
|
|
841
|
+
"top"?: number;
|
|
786
842
|
}
|
|
787
843
|
interface CuraPageTemplate {
|
|
788
844
|
"contentwidth": 'default' | 'centered';
|
|
@@ -1048,17 +1104,23 @@ declare global {
|
|
|
1048
1104
|
prototype: HTMLCuraAvatarElement;
|
|
1049
1105
|
new (): HTMLCuraAvatarElement;
|
|
1050
1106
|
};
|
|
1107
|
+
interface HTMLCuraBadgeCounterElement extends Components.CuraBadgeCounter, HTMLStencilElement {
|
|
1108
|
+
}
|
|
1109
|
+
var HTMLCuraBadgeCounterElement: {
|
|
1110
|
+
prototype: HTMLCuraBadgeCounterElement;
|
|
1111
|
+
new (): HTMLCuraBadgeCounterElement;
|
|
1112
|
+
};
|
|
1051
1113
|
interface HTMLCuraBadgeDistanceElement extends Components.CuraBadgeDistance, HTMLStencilElement {
|
|
1052
1114
|
}
|
|
1053
1115
|
var HTMLCuraBadgeDistanceElement: {
|
|
1054
1116
|
prototype: HTMLCuraBadgeDistanceElement;
|
|
1055
1117
|
new (): HTMLCuraBadgeDistanceElement;
|
|
1056
1118
|
};
|
|
1057
|
-
interface
|
|
1119
|
+
interface HTMLCuraBadgePillElement extends Components.CuraBadgePill, HTMLStencilElement {
|
|
1058
1120
|
}
|
|
1059
|
-
var
|
|
1060
|
-
prototype:
|
|
1061
|
-
new ():
|
|
1121
|
+
var HTMLCuraBadgePillElement: {
|
|
1122
|
+
prototype: HTMLCuraBadgePillElement;
|
|
1123
|
+
new (): HTMLCuraBadgePillElement;
|
|
1062
1124
|
};
|
|
1063
1125
|
interface HTMLCuraButtonElement extends Components.CuraButton, HTMLStencilElement {
|
|
1064
1126
|
}
|
|
@@ -1378,8 +1440,9 @@ declare global {
|
|
|
1378
1440
|
"cura-accordion-item": HTMLCuraAccordionItemElement;
|
|
1379
1441
|
"cura-alert": HTMLCuraAlertElement;
|
|
1380
1442
|
"cura-avatar": HTMLCuraAvatarElement;
|
|
1443
|
+
"cura-badge-counter": HTMLCuraBadgeCounterElement;
|
|
1381
1444
|
"cura-badge-distance": HTMLCuraBadgeDistanceElement;
|
|
1382
|
-
"cura-badge-
|
|
1445
|
+
"cura-badge-pill": HTMLCuraBadgePillElement;
|
|
1383
1446
|
"cura-button": HTMLCuraButtonElement;
|
|
1384
1447
|
"cura-button-outline": HTMLCuraButtonOutlineElement;
|
|
1385
1448
|
"cura-button-select": HTMLCuraButtonSelectElement;
|
|
@@ -1485,13 +1548,57 @@ declare namespace LocalJSX {
|
|
|
1485
1548
|
"size"?: '80' | '40' | '32' | '24';
|
|
1486
1549
|
"type"?: 'default' | 'branding';
|
|
1487
1550
|
}
|
|
1551
|
+
interface CuraBadgeCounter {
|
|
1552
|
+
/**
|
|
1553
|
+
* Cor fundamental do design system sem profundidade. Ex.: primary (padrão)
|
|
1554
|
+
*/
|
|
1555
|
+
"color"?: string;
|
|
1556
|
+
/**
|
|
1557
|
+
* Define o estado do badge como desabilitado ou habilitado.
|
|
1558
|
+
*/
|
|
1559
|
+
"disabled"?: boolean;
|
|
1560
|
+
/**
|
|
1561
|
+
* Número a ser representado no badge. Apresentará 99+ para números acima desse valor.
|
|
1562
|
+
*/
|
|
1563
|
+
"number"?: number | null;
|
|
1564
|
+
/**
|
|
1565
|
+
* Define o estilo visual entre solid (default), outline ou transparent.
|
|
1566
|
+
*/
|
|
1567
|
+
"type"?: 'solid' | 'outline' | 'transparent' | string;
|
|
1568
|
+
}
|
|
1488
1569
|
interface CuraBadgeDistance {
|
|
1489
1570
|
"distance"?: number;
|
|
1490
1571
|
"label"?: string;
|
|
1491
1572
|
}
|
|
1492
|
-
interface
|
|
1493
|
-
|
|
1494
|
-
|
|
1573
|
+
interface CuraBadgePill {
|
|
1574
|
+
/**
|
|
1575
|
+
* Set border-radius.
|
|
1576
|
+
*/
|
|
1577
|
+
"borderRadius"?: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* Color base from color scheme. Default: primary
|
|
1580
|
+
*/
|
|
1581
|
+
"color"?: 'primary' | 'secondary' | 'accent' | 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
1582
|
+
/**
|
|
1583
|
+
* Disabled state. Boolean
|
|
1584
|
+
*/
|
|
1585
|
+
"disabled"?: boolean;
|
|
1586
|
+
/**
|
|
1587
|
+
* Name of the icon to be used from iconset
|
|
1588
|
+
*/
|
|
1589
|
+
"iconName"?: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Set badge to icon only. Boolean
|
|
1592
|
+
*/
|
|
1593
|
+
"iconOnly"?: boolean;
|
|
1594
|
+
/**
|
|
1595
|
+
* Custom iconset if needed
|
|
1596
|
+
*/
|
|
1597
|
+
"iconset"?: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* Badge type: solid | outline | transparent
|
|
1600
|
+
*/
|
|
1601
|
+
"type"?: 'solid' | 'outline' | 'transparent';
|
|
1495
1602
|
}
|
|
1496
1603
|
interface CuraButton {
|
|
1497
1604
|
/**
|
|
@@ -1620,7 +1727,7 @@ declare namespace LocalJSX {
|
|
|
1620
1727
|
interface CuraButtonSelect {
|
|
1621
1728
|
"background"?: 'dark' | 'light';
|
|
1622
1729
|
"color"?: string;
|
|
1623
|
-
"counter"?:
|
|
1730
|
+
"counter"?: number | null;
|
|
1624
1731
|
"disabled"?: boolean;
|
|
1625
1732
|
"iconName"?: string;
|
|
1626
1733
|
"iconPosition"?: 'left' | 'right';
|
|
@@ -2211,6 +2318,14 @@ declare namespace LocalJSX {
|
|
|
2211
2318
|
* Property background to control modal backdrop color. Default: light
|
|
2212
2319
|
*/
|
|
2213
2320
|
"background"?: 'dark' | 'light';
|
|
2321
|
+
/**
|
|
2322
|
+
* Property bottom to control modal bottom position. Default: 0px
|
|
2323
|
+
*/
|
|
2324
|
+
"bottom"?: number;
|
|
2325
|
+
/**
|
|
2326
|
+
* Property left to control modal left position. Default: 0px
|
|
2327
|
+
*/
|
|
2328
|
+
"left"?: number;
|
|
2214
2329
|
/**
|
|
2215
2330
|
* Event close to handle modal close.
|
|
2216
2331
|
*/
|
|
@@ -2220,9 +2335,13 @@ declare namespace LocalJSX {
|
|
|
2220
2335
|
*/
|
|
2221
2336
|
"open"?: boolean;
|
|
2222
2337
|
/**
|
|
2223
|
-
* Property
|
|
2338
|
+
* Property right to control modal right position. Default: 0px
|
|
2339
|
+
*/
|
|
2340
|
+
"right"?: number;
|
|
2341
|
+
/**
|
|
2342
|
+
* Property top to control modal top position. Default: 0px
|
|
2224
2343
|
*/
|
|
2225
|
-
"
|
|
2344
|
+
"top"?: number;
|
|
2226
2345
|
}
|
|
2227
2346
|
interface CuraPageTemplate {
|
|
2228
2347
|
"contentwidth"?: 'default' | 'centered';
|
|
@@ -2408,8 +2527,9 @@ declare namespace LocalJSX {
|
|
|
2408
2527
|
"cura-accordion-item": CuraAccordionItem;
|
|
2409
2528
|
"cura-alert": CuraAlert;
|
|
2410
2529
|
"cura-avatar": CuraAvatar;
|
|
2530
|
+
"cura-badge-counter": CuraBadgeCounter;
|
|
2411
2531
|
"cura-badge-distance": CuraBadgeDistance;
|
|
2412
|
-
"cura-badge-
|
|
2532
|
+
"cura-badge-pill": CuraBadgePill;
|
|
2413
2533
|
"cura-button": CuraButton;
|
|
2414
2534
|
"cura-button-outline": CuraButtonOutline;
|
|
2415
2535
|
"cura-button-select": CuraButtonSelect;
|
|
@@ -2448,8 +2568,9 @@ declare module "@stencil/core" {
|
|
|
2448
2568
|
"cura-accordion-item": LocalJSX.CuraAccordionItem & JSXBase.HTMLAttributes<HTMLCuraAccordionItemElement>;
|
|
2449
2569
|
"cura-alert": LocalJSX.CuraAlert & JSXBase.HTMLAttributes<HTMLCuraAlertElement>;
|
|
2450
2570
|
"cura-avatar": LocalJSX.CuraAvatar & JSXBase.HTMLAttributes<HTMLCuraAvatarElement>;
|
|
2571
|
+
"cura-badge-counter": LocalJSX.CuraBadgeCounter & JSXBase.HTMLAttributes<HTMLCuraBadgeCounterElement>;
|
|
2451
2572
|
"cura-badge-distance": LocalJSX.CuraBadgeDistance & JSXBase.HTMLAttributes<HTMLCuraBadgeDistanceElement>;
|
|
2452
|
-
"cura-badge-
|
|
2573
|
+
"cura-badge-pill": LocalJSX.CuraBadgePill & JSXBase.HTMLAttributes<HTMLCuraBadgePillElement>;
|
|
2453
2574
|
"cura-button": LocalJSX.CuraButton & JSXBase.HTMLAttributes<HTMLCuraButtonElement>;
|
|
2454
2575
|
"cura-button-outline": LocalJSX.CuraButtonOutline & JSXBase.HTMLAttributes<HTMLCuraButtonOutlineElement>;
|
|
2455
2576
|
"cura-button-select": LocalJSX.CuraButtonSelect & JSXBase.HTMLAttributes<HTMLCuraButtonSelectElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rededor/cura",
|
|
3
|
-
"version": "1.4.0
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Cura Design System",
|
|
5
5
|
"author": "Rede D`Or São Luiz",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"storybook": "^7.6.7",
|
|
52
52
|
"svgo": "^3.3.2"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bc7b0f67752ee42409f56fb59e4d035b8ca2ec3e"
|
|
55
55
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-e6d728ec.js');
|
|
6
|
-
|
|
7
|
-
const curaBadgeNumberCss = ":host .container{display:flex;width:20px;height:20px;min-width:16px;justify-content:center;align-items:center;border-radius:500px;background:var(--background-color)}";
|
|
8
|
-
const CuraBadgeNumberStyle0 = curaBadgeNumberCss;
|
|
9
|
-
|
|
10
|
-
const CuraBadgeNumber = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.styles = {};
|
|
14
|
-
this.theme = window.CuraAPI.theme;
|
|
15
|
-
this.number = undefined;
|
|
16
|
-
this.color = undefined;
|
|
17
|
-
}
|
|
18
|
-
connectedCallback() {
|
|
19
|
-
this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(this.color) });
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
return (index.h(index.Host, { key: 'a20934b4bec43ab7024e1bc4ad7537ff0d54b937' }, index.h("div", { key: 'a3fc8332932a117db4be61092050c3df3e4142bc', class: "container", style: this.styles }, index.h("cura-label", { key: 'ff53c0645348be0d392728778e3486c353243af5' }, index.h("slot", { key: 'f0774cc8f8ad07287b68bb3c59bf22cd4fc69755' }, this.number)))));
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
CuraBadgeNumber.style = CuraBadgeNumberStyle0;
|
|
26
|
-
|
|
27
|
-
exports.cura_badge_number = CuraBadgeNumber;
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=cura-badge-number.cjs.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"cura-badge-number.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,uKAAuK,CAAC;AACnM,8BAAe,kBAAkB;;MCMpB,eAAe;;;QAI1B,WAAM,GAAG,EAAE,CAAC;QAEZ,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;;;;IAE7B,iBAAiB;QACf,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAC7D,CAAA;KACF;IAGD,MAAM;QACJ,QACEA,QAACC,UAAI,uDACHD,kEAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IACvCA,2EACEA,qEAAO,IAAI,CAAC,MAAM,CAAQ,CACf,CACT,CACD,EACP;KACH;;;;;;","names":["h","Host"],"sources":["src/components/badges/cura-badge-number/cura-badge-number.scss?tag=cura-badge-number&encapsulation=shadow","src/components/badges/cura-badge-number/cura-badge-number.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n\n:host {\n .container {\n display: flex;\n width: 20px;\n height: 20px;\n min-width: 16px;\n justify-content: center;\n align-items: center;\n border-radius: 500px;\n background: var(--background-color);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-number',\n styleUrl: 'cura-badge-number.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n @Prop({ reflect: true }) number: number | null\n @Prop({ reflect: true }) color: string\n styles = {};\n\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(this.color),\n }\n }\n\n\n render() {\n return (\n <Host>\n <div class=\"container\" style={this.styles}>\n <cura-label>\n <slot>{this.number}</slot>\n </cura-label>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"cura-icon.definitions-8d714f6a.js","mappings":";;MAAa,UAAU,GAAG,CAAC,WAAW,EAAC,WAAW,EAAC,YAAY,EAAC,SAAS,EAAC,OAAO,EAAC,aAAa,EAAC,OAAO,EAAC,aAAa,EAAC,UAAU,EAAC,MAAM,EAAC,QAAQ,EAAC,cAAc,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,aAAa,EAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAC,MAAM,EAAC,YAAY,EAAC,YAAY,EAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,EAAE;MAEtR,SAAS,GAAG;IACvB,KAAK,EAAE,EAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC;IAChC,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;IAC3B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC;IAC9B,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAC;IAC7B,OAAO,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;IACjC,SAAS,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAC;;;;;;","names":[],"sources":["src/components/cura-icon/cura-icon.definitions.tsx"],"sourcesContent":["export const microIcons = ['arrowDown','arrowLeft','arrowRight','arrowUp','check','checkDouble','close','closeCircle','collapse','down','expand','linkExternal','link','left','minus','minusCircle','minusSquare','order','subItem','right','plus','plusCircle','plusSquare','up','filter','swap'];\n\nexport const iconSizes = {\n \"128\": {size: 128, stroke: 5.25},\n \"72\": {size: 72, stroke: 3.5},\n \"64\": {size: 64, stroke: 3.25},\n \"48\": {size: 48, stroke: 2.75},\n \"40\": {size: 40, stroke: 2.5},\n \"32\": {size: 32, stroke: 2.25},\n \"24\": {size: 24, stroke: 2},\n \"20\": {size: 20, stroke: 1.75},\n \"16\": {size: 16, stroke: 1.5},\n \"micro\": {size: 12, stroke: 1.5 },\n \"default\": {size: 24, stroke: 2}\n};\n"],"version":3}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Global Spacing Definitions.
|
|
3
|
-
* Required CSS Properties:
|
|
4
|
-
* --base-spacing
|
|
5
|
-
*/
|
|
6
|
-
/* None: 0px */
|
|
7
|
-
/* Tiny default: 4px */
|
|
8
|
-
/* Mini default: 8px */
|
|
9
|
-
/* XXXS default: 12px */
|
|
10
|
-
/* XXS default: 16px */
|
|
11
|
-
/* XS default: 20px */
|
|
12
|
-
/* S default: 20px */
|
|
13
|
-
/* M default: 32px */
|
|
14
|
-
/* L default: 40px */
|
|
15
|
-
/* XL default: 48px */
|
|
16
|
-
/* XXL default: 64px */
|
|
17
|
-
/* XXXL default: 72px */
|
|
18
|
-
/* Huge default: 96px */
|
|
19
|
-
:host .container {
|
|
20
|
-
display: flex;
|
|
21
|
-
width: 20px;
|
|
22
|
-
height: 20px;
|
|
23
|
-
min-width: 16px;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
align-items: center;
|
|
26
|
-
border-radius: 500px;
|
|
27
|
-
background: var(--background-color);
|
|
28
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
2
|
-
export class CuraBadgeNumber {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.styles = {};
|
|
5
|
-
this.theme = window.CuraAPI.theme;
|
|
6
|
-
this.number = undefined;
|
|
7
|
-
this.color = undefined;
|
|
8
|
-
}
|
|
9
|
-
connectedCallback() {
|
|
10
|
-
this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(this.color) });
|
|
11
|
-
}
|
|
12
|
-
render() {
|
|
13
|
-
return (h(Host, { key: 'a20934b4bec43ab7024e1bc4ad7537ff0d54b937' }, h("div", { key: 'a3fc8332932a117db4be61092050c3df3e4142bc', class: "container", style: this.styles }, h("cura-label", { key: 'ff53c0645348be0d392728778e3486c353243af5' }, h("slot", { key: 'f0774cc8f8ad07287b68bb3c59bf22cd4fc69755' }, this.number)))));
|
|
14
|
-
}
|
|
15
|
-
static get is() { return "cura-badge-number"; }
|
|
16
|
-
static get encapsulation() { return "shadow"; }
|
|
17
|
-
static get originalStyleUrls() {
|
|
18
|
-
return {
|
|
19
|
-
"$": ["cura-badge-number.scss"]
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
static get styleUrls() {
|
|
23
|
-
return {
|
|
24
|
-
"$": ["cura-badge-number.css"]
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
static get properties() {
|
|
28
|
-
return {
|
|
29
|
-
"number": {
|
|
30
|
-
"type": "number",
|
|
31
|
-
"mutable": false,
|
|
32
|
-
"complexType": {
|
|
33
|
-
"original": "number | null",
|
|
34
|
-
"resolved": "number",
|
|
35
|
-
"references": {}
|
|
36
|
-
},
|
|
37
|
-
"required": false,
|
|
38
|
-
"optional": false,
|
|
39
|
-
"docs": {
|
|
40
|
-
"tags": [],
|
|
41
|
-
"text": ""
|
|
42
|
-
},
|
|
43
|
-
"attribute": "number",
|
|
44
|
-
"reflect": true
|
|
45
|
-
},
|
|
46
|
-
"color": {
|
|
47
|
-
"type": "string",
|
|
48
|
-
"mutable": false,
|
|
49
|
-
"complexType": {
|
|
50
|
-
"original": "string",
|
|
51
|
-
"resolved": "string",
|
|
52
|
-
"references": {}
|
|
53
|
-
},
|
|
54
|
-
"required": false,
|
|
55
|
-
"optional": false,
|
|
56
|
-
"docs": {
|
|
57
|
-
"tags": [],
|
|
58
|
-
"text": ""
|
|
59
|
-
},
|
|
60
|
-
"attribute": "color",
|
|
61
|
-
"reflect": true
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=cura-badge-number.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cura-badge-number.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-number/cura-badge-number.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,eAAe;;QAI1B,WAAM,GAAG,EAAE,CAAC;QAEZ,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;;;;IAE7B,iBAAiB;QACf,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAC7D,CAAA;IACH,CAAC;IAGD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM;gBACvC;oBACE,+DAAO,IAAI,CAAC,MAAM,CAAQ,CACf,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-number',\n styleUrl: 'cura-badge-number.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n @Prop({ reflect: true }) number: number | null\n @Prop({ reflect: true }) color: string\n styles = {};\n\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(this.color),\n }\n }\n\n\n render() {\n return (\n <Host>\n <div class=\"container\" style={this.styles}>\n <cura-label>\n <slot>{this.number}</slot>\n </cura-label>\n </div>\n </Host>\n );\n }\n}\n"]}
|
package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cura-badge-number.stories.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-number/cura-badge-number.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,qBAAqB,GAAG,CAAC,IAAS,EAAE,EAAE;IACxC,MAAM,KAAK,GAAG;WACP,IAAI,CAAC,KAAK;IACjB,IAAI,CAAC,MAAM;;GAEZ,CAAC;IACA,OAAO,GAAG,KAAK,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;AAErC,eAAe;IACX,KAAK,EAAE,iCAAiC;IACxC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,MAAM,EAAE,CAAC,EAAW,EAAE,EAAE;YAAV,IAAI,cAAT,EAAW,CAAF;QACd,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IACD,QAAQ,EAAE;QACN,MAAM,EAAE;YACJ,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,yBAAyB;YACtC,KAAK,EAAE;gBACH,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;aAC/B;SACJ;QACD,KAAK,EAAE;YACH,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;YACxB,WAAW,EAAE,kEAAkE;YAC/E,KAAK,EAAE;gBACH,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aACvC;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,IAAI,EAAE;QACF,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,SAAS;KACnB;CACJ,CAAC","sourcesContent":["import { getColorsWithDepths } from \"../../../utils/utils\";\n\n\nconst renderCuraBadgeNumber = (args: any) => {\n const block = `<cura-badge-number\n color=\"${args.color}\">\n ${args.number}\n </cura-badge-number>\n `;\n return `${block}`;\n};\n\nconst colors = getColorsWithDepths();\n\nexport default {\n title: 'Componentes/Badges/Badge Number',\n tags: ['autodocs'],\n render: ({ ...args }) => {\n return renderCuraBadgeNumber(args);\n },\n argTypes: {\n number: {\n control: 'number',\n description: 'Número que será exibido',\n table: {\n category: 'Properties',\n defaultValue: { summary: 1 },\n },\n },\n color: {\n control: { type: 'select' },\n options: ['', ...colors],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'primary' },\n },\n },\n },\n};\n\nexport const CuraBadgeNumber = {\n args: {\n number: 1,\n color: 'primary',\n },\n};\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { C as CuraBadgeNumber$1, d as defineCustomElement$1 } from './cura-badge-number2.js';
|
|
2
|
-
|
|
3
|
-
const CuraBadgeNumber = CuraBadgeNumber$1;
|
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
|
5
|
-
|
|
6
|
-
export { CuraBadgeNumber, defineCustomElement };
|
|
7
|
-
|
|
8
|
-
//# sourceMappingURL=cura-badge-number.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"cura-badge-number.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$1 } from './cura-label2.js';
|
|
3
|
-
|
|
4
|
-
const curaBadgeNumberCss = ":host .container{display:flex;width:20px;height:20px;min-width:16px;justify-content:center;align-items:center;border-radius:500px;background:var(--background-color)}";
|
|
5
|
-
const CuraBadgeNumberStyle0 = curaBadgeNumberCss;
|
|
6
|
-
|
|
7
|
-
const CuraBadgeNumber = /*@__PURE__*/ proxyCustomElement(class CuraBadgeNumber extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
|
-
this.styles = {};
|
|
13
|
-
this.theme = window.CuraAPI.theme;
|
|
14
|
-
this.number = undefined;
|
|
15
|
-
this.color = undefined;
|
|
16
|
-
}
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(this.color) });
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return (h(Host, { key: 'a20934b4bec43ab7024e1bc4ad7537ff0d54b937' }, h("div", { key: 'a3fc8332932a117db4be61092050c3df3e4142bc', class: "container", style: this.styles }, h("cura-label", { key: 'ff53c0645348be0d392728778e3486c353243af5' }, h("slot", { key: 'f0774cc8f8ad07287b68bb3c59bf22cd4fc69755' }, this.number)))));
|
|
22
|
-
}
|
|
23
|
-
static get style() { return CuraBadgeNumberStyle0; }
|
|
24
|
-
}, [1, "cura-badge-number", {
|
|
25
|
-
"number": [514],
|
|
26
|
-
"color": [513]
|
|
27
|
-
}]);
|
|
28
|
-
function defineCustomElement() {
|
|
29
|
-
if (typeof customElements === "undefined") {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const components = ["cura-badge-number", "cura-label"];
|
|
33
|
-
components.forEach(tagName => { switch (tagName) {
|
|
34
|
-
case "cura-badge-number":
|
|
35
|
-
if (!customElements.get(tagName)) {
|
|
36
|
-
customElements.define(tagName, CuraBadgeNumber);
|
|
37
|
-
}
|
|
38
|
-
break;
|
|
39
|
-
case "cura-label":
|
|
40
|
-
if (!customElements.get(tagName)) {
|
|
41
|
-
defineCustomElement$1();
|
|
42
|
-
}
|
|
43
|
-
break;
|
|
44
|
-
} });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { CuraBadgeNumber as C, defineCustomElement as d };
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=cura-badge-number2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"cura-badge-number2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,uKAAuK,CAAC;AACnM,8BAAe,kBAAkB;;MCMpB,eAAe;;;;;QAI1B,WAAM,GAAG,EAAE,CAAC;QAEZ,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;;;;IAE7B,iBAAiB;QACf,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAC7D,CAAA;KACF;IAGD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,4DAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IACvC,qEACE,+DAAO,IAAI,CAAC,MAAM,CAAQ,CACf,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badges/cura-badge-number/cura-badge-number.scss?tag=cura-badge-number&encapsulation=shadow","src/components/badges/cura-badge-number/cura-badge-number.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n\n:host {\n .container {\n display: flex;\n width: 20px;\n height: 20px;\n min-width: 16px;\n justify-content: center;\n align-items: center;\n border-radius: 500px;\n background: var(--background-color);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-number',\n styleUrl: 'cura-badge-number.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n @Prop({ reflect: true }) number: number | null\n @Prop({ reflect: true }) color: string\n styles = {};\n\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(this.color),\n }\n }\n\n\n render() {\n return (\n <Host>\n <div class=\"container\" style={this.styles}>\n <cura-label>\n <slot>{this.number}</slot>\n </cura-label>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,h as c,H as t}from"./p-fd5ed6b0.js";const s=":host .container{display:flex;width:20px;height:20px;min-width:16px;justify-content:center;align-items:center;border-radius:500px;background:var(--background-color)}";const a=s;const i=class{constructor(c){e(this,c);this.styles={};this.theme=window.CuraAPI.theme;this.number=undefined;this.color=undefined}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--background-color":this.theme.colors.getColor(this.color)})}render(){return c(t,{key:"a20934b4bec43ab7024e1bc4ad7537ff0d54b937"},c("div",{key:"a3fc8332932a117db4be61092050c3df3e4142bc",class:"container",style:this.styles},c("cura-label",{key:"ff53c0645348be0d392728778e3486c353243af5"},c("slot",{key:"f0774cc8f8ad07287b68bb3c59bf22cd4fc69755"},this.number))))}};i.style=a;export{i as cura_badge_number};
|
|
2
|
-
//# sourceMappingURL=p-0308cf6b.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["curaBadgeNumberCss","CuraBadgeNumberStyle0","CuraBadgeNumber","this","styles","theme","window","CuraAPI","connectedCallback","Object","assign","colors","getColor","color","render","h","Host","key","class","style","number"],"sources":["src/components/badges/cura-badge-number/cura-badge-number.scss?tag=cura-badge-number&encapsulation=shadow","src/components/badges/cura-badge-number/cura-badge-number.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n\n:host {\n .container {\n display: flex;\n width: 20px;\n height: 20px;\n min-width: 16px;\n justify-content: center;\n align-items: center;\n border-radius: 500px;\n background: var(--background-color);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-number',\n styleUrl: 'cura-badge-number.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n @Prop({ reflect: true }) number: number | null\n @Prop({ reflect: true }) color: string\n styles = {};\n\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(this.color),\n }\n }\n\n\n render() {\n return (\n <Host>\n <div class=\"container\" style={this.styles}>\n <cura-label>\n <slot>{this.number}</slot>\n </cura-label>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAqB,wKAC3B,MAAAC,EAAeD,E,MCMFE,EAAe,M,yBAI1BC,KAAAC,OAAS,GAETD,KAAAE,MAAQC,OAAOC,QAAQF,M,2CAEvB,iBAAAG,GACEL,KAAKC,OAAMK,OAAAC,OAAAD,OAAAC,OAAA,GACNP,KAAKC,QAAM,CACd,qBAAsBD,KAAKE,MAAMM,OAAOC,SAAST,KAAKU,Q,CAK1D,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,OAAAE,IAAA,2CAAKC,MAAM,YAAYC,MAAOhB,KAAKC,QACjCW,EAAA,cAAAE,IAAA,4CACEF,EAAA,QAAAE,IAAA,4CAAOd,KAAKiB,U","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["curaButtonSelectCss","CuraButtonSelectStyle0","CuraButtonSelect","this","theme","window","CuraAPI","setColors","colors","name","thema","background","color","disabled","forEach","styles","getColor","Object","assign","getClasses","classes","_a","size","toLowerCase","iconPosition","selected","connectedCallback","weights","fonts","getWeights","spacing","getSpacing","getSize","getFamily","medium","getLabelFontColor","getColorCounter","getColorBagdeNumber","getIcon","iconSize","h","iconName","getCounter","class","counter","getCheckIconRight","handleMouseEnter","hovered","handleMouseLeave","handleClick","e","preventDefault","onclick","emit","render","labelSize","labelSizes","Host","key","style","onClick","onMouseEnter","onMouseLeave","lineHeight","weight"],"sources":["src/components/buttons/cura-button-select/cura-button-select.scss?tag=cura-button-select&encapsulation=shadow","src/components/buttons/cura-button-select/cura-button-select.tsx"],"sourcesContent":["@import '../../../scss/mixins/buttons.scss';\n\n:host {\n @include button-host();\n\n button,\n a {\n @include button-element() {\n background-color: var(--neutral-purewhite);\n box-sizing: border-box;\n border: none;\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: 2px solid var(--color-border);\n border-radius: var(--border-radius);\n }\n\n &:not(.disabled):hover {\n background-color: var(--color-background-hover);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-border) !important;\n }\n }\n\n @include button-sizes();\n\n @include button-label();\n\n // Children Elements\n @include button-container() {\n flex-direction: row !important;\n\n .badge-number {\n margin-left: 10px;\n }\n }\n\n @include button-icon();\n\n // selected state\n @include button-selected() {\n background-color: var(--color-select);\n border-color: var(--color-select);\n\n &:not(.disabled):hover {\n background-color: var(--color-border-hover-pressed);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-select-focus) !important;\n }\n\n &.disabled {\n background-color: var(--color-disable-select);\n border-color: var(--color-disable-select);\n }\n }\n\n // Disabled state\n @include button-disabled() {\n background-color: var(--neutral-white-primary-darker);\n border-color: var(--color-border-disable-unselect);\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\n\n@Component({\n tag: 'cura-button-select',\n styleUrl: 'cura-button-select.scss',\n shadow: true,\n})\nexport class CuraButtonSelect {\n @Element() host: HTMLElement;\n\n @Prop({ reflect: true, mutable: true }) selected = false;\n @Prop({ reflect: true, mutable: true }) iconName: string;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n @Prop({ reflect: true, mutable: true }) counter: string | number | null;\n @Prop({ reflect: true }) disabled: boolean;\n @Prop() background: 'dark' | 'light' = 'light';\n @Prop() color: string = 'primary';\n @Prop({ reflect: true }) iconPosition: 'left' | 'right';\n\n @State() hovered = false;\n @State() styles = {};\n\n @Event({ eventName: 'onclick' }) onclick: EventEmitter<{ selected: boolean }>;\n\n theme = window.CuraAPI.theme;\n\n weights;\n\n @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-border', thema: this.background === 'light' ? `${this.color}-darker` : 'neutral-white' },\n { name: '--color-border-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-light` },\n { name: '--color-background-hover', thema: this.background === 'light' ? `${this.color}-light` : `${this.color}-dark` },\n { name: '--color-select', thema: this.background === 'light' ? `${this.color}-base` : 'neutral-white' },\n { name: '--color-select-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-lighter` },\n { name: '--color-select-focus', thema: this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter` },\n { name: '--color-disable-select', thema: this.background === 'light' ? 'neutral-white' : 'neutral-black' },\n { name: '--color-border-disable-unselect', thema: 'neutral-dark' },\n { name: '--color-counter-disabled', thema: this.background === 'light' ? 'neutral-pale' : 'neutral-black' },\n { name: '--color-counter', thema: !this.disabled && 'primary-lighter' },\n ];\n\n colors.forEach(color => (this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.thema)));\n this.styles = { ...this.styles };\n }\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n classes['selected'] = this.selected;\n return classes;\n }\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.setColors();\n }\n\n getLabelFontColor() {\n if (this.disabled) return 'neutral-dark';\n\n if (this.background === 'dark') {\n return this.selected ? 'neutral-black' : 'neutral-white';\n }\n if (this.background === 'light') {\n return this.selected ? 'neutral-white' : 'neutral-black';\n }\n }\n\n getColorCounter() {\n if (this.background === 'dark' && this.disabled) {\n return !this.selected ? 'neutral-black' : 'neutral-dark';\n }\n\n if (this.background === 'light' && this.disabled) {\n return 'neutral-pale';\n }\n return `${this.color}-lighter`;\n }\n\n getColorBagdeNumber() {\n if (this.background === 'dark' && this.disabled) {\n return this.selected ? 'neutral-black' : 'neutral-dark';\n }\n\n if (this.background === 'light' && this.disabled) {\n return 'neutral-medium';\n }\n\n return `${this.color}-darker`;\n }\n\n getIcon() {\n const iconSize = this.size === 'large' ? 20 : 16;\n if (this.iconPosition === 'right') {\n return;\n }\n\n return <cura-icon name={this.iconName} size={iconSize} color={this.getLabelFontColor()} />;\n }\n\n getCounter() {\n return (\n <cura-badge-number color={this.getColorCounter()} class=\"badge-number\">\n <cura-label color={this.getColorBagdeNumber()} size=\"small\">\n {this.counter}\n </cura-label>\n </cura-badge-number>\n );\n }\n\n getCheckIconRight() {\n const iconSize = this.size === 'large' ? 20 : 16;\n return <cura-icon name=\"check\" size={iconSize} color={this.getLabelFontColor()}></cura-icon>;\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) e.preventDefault();\n this.selected = !this.selected;\n this.onclick.emit({ selected: this.selected });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n return (\n <Host>\n <button\n class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled}\n onClick={e => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n >\n <div class=\"button-container\">\n {this.iconName ? this.getIcon() : null}\n <cura-label class=\"label\" size={labelSize} lineHeight=\"0%\" color={this.getLabelFontColor()} weight=\"regular\">\n <slot></slot>\n </cura-label>\n {this.counter ? this.getCounter() : null}\n {this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null}\n </div>\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as o,g as s}from"./p-fd5ed6b0.js";const r=":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;gap:4px;padding:12px 8px;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}.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}";const n=r;const d=class{constructor(e){t(this,e);this.valueChanged=i(this,"valueChanged",7);this.onselect=i(this,"onselect",7);this.overlayElement=null;this.adjustInputPosition=()=>{window.visualViewport.addEventListener("resize",(()=>{var t;const i=window.innerHeight<window.screen.height*.8;const e=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-mobile");if(e){if(i){e.style.position="absolute";e.style.bottom=`${window.screen.height-window.innerHeight}px`}else{e.style.position="fixed";e.style.bottom="0"}}window.scroll({top:0,left:0,behavior:"smooth"})}))};this.handleSlotChange=()=>{this.options=Array.from(this.host.querySelectorAll("cura-dropdown-search-option"));this.addClickListenersToOptions();this.updateHoveredIndex()};this.handleInputChange=t=>{const i=t.target;this.value=i.value;this.onValueChange(this.value)};this.handleKeyDown=t=>{if(t.key==="ArrowDown"){t.preventDefault();this.moveHighlight(1)}else if(t.key==="ArrowUp"){t.preventDefault();this.moveHighlight(-1)}else if(t.key==="Enter"){t.preventDefault();if(this.hoveredIndex>-1){this.handleOnBlur();this.onSelectedOption(this.hoveredIndex)}}};this.handleResize=()=>{this.isMobile=window.innerWidth<768;if(this.isDropdownOpen){if(this.isMobile){this.showOverlay()}else{this.removeOverlay()}}};this.size="large";this.status="default";this.disabled=false;this.name=undefined;this.required=false;this.selected=false;this.value="";this.placeholder="";this.label="";this.iconName="search";this.dropdownMaxHeight="630px";this.overlayVisible=false;this.isDropdownOpen=false;this.styles={};this.isMobile=window.innerWidth<768;this.mode="default";this.inputTextRef=undefined;this.isOnBlurInput=true;this.hoveredIndex=-1;this.options=[]}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base");this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light");this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark");this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor(`neutral-black`,.16);this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark");this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter");this.styles["--breakpoints"]=window.CuraAPI.theme.breakpoints.get();this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium}onValueChange(t){this.updateSelectedOption(t);this.valueChanged.emit(t)}componentWillLoad(){this.updateSelectedOption(this.value)}componentDidRender(){if(this.isDropdownOpen&&this.isMobile){this.showOverlay();this.getDropdownSearchListHeight()}else{this.removeOverlay()}}componentDidLoad(){window.addEventListener("resize",this.handleResize);window.addEventListener("resize",this.adjustInputPosition)}disconnectedCallback(){window.removeEventListener("resize",this.handleResize);window.removeEventListener("resize",this.adjustInputPosition)}showOverlay(){if(!this.overlayElement){this.overlayElement=document.createElement("div");this.overlayElement.className="dropdown-overlay";this.overlayElement.style.position="fixed";this.overlayElement.style.top="0";this.overlayElement.style.left="0";this.overlayElement.style.width="100%";this.overlayElement.style.height="100%";this.overlayElement.style.zIndex="9999";this.overlayElement.style.backgroundColor="white";document.body.appendChild(this.overlayElement)}}removeOverlay(){if(this.overlayElement&&this.overlayElement.parentNode===document.body){document.body.removeChild(this.overlayElement);this.overlayElement=null}}addClickListenersToOptions(){this.options.forEach(((t,i)=>{t.addEventListener("optionSelected",(()=>this.onSelectedOption(i)))}))}updateSelectedOption(t){const i=this.options.findIndex((i=>i.getAttribute("value")===t));this.hoveredIndex=i;this.updateOptionAttribute("hovered",this.hoveredIndex);this.updateOptionAttribute("selected",this.hoveredIndex);this.scrollIntoView();this.adjustInputPosition()}onSelectedOption(t){const i=this.options[t];if(i.selectable){const t=i.getAttribute("value")||i.textContent;this.value=t||"";this.updateSelectedOption(this.value);this.isDropdownOpen=false;this.isOnBlurInput=true;this.removeOverlay()}}moveHighlight(t){const i=this.options;const e=(this.hoveredIndex+t+i.length)%i.length;this.hoveredIndex=e;this.updateOptionAttribute("hovered",this.hoveredIndex);this.scrollIntoView()}updateOptionAttribute(t,i){this.options.forEach(((e,o)=>{e[t]=o===i}))}updateHoveredIndex(){const t=this.options;const i=this.value;this.hoveredIndex=t.findIndex((t=>t.getAttribute("value")===i))}scrollIntoView(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-search-list");const e=this.options[this.hoveredIndex];if(i&&e){const t=e.getBoundingClientRect();const o=i.getBoundingClientRect();if(t.bottom>o.bottom){i.scrollTop+=t.bottom-o.bottom}if(t.top<o.top){i.scrollTop-=o.top-t.top}}}handleOnBlur(){if(this.isOnBlurInput===true){setTimeout((()=>{this.isDropdownOpen=false;this.removeOverlay()}),200)}}getClasses(){return{"dropdown-input-search":true,"dropdown-open":this.isDropdownOpen,disabled:this.disabled,[this.status]:true}}getDropdownClasses(){return{"dropdown-search-list":true,visible:this.options.length&&this.isDropdownOpen?true:false}}hostCSSProperties(){return{"--dropdown-max-height":this.dropdownMaxHeight}}handleOnFocus(){this.isDropdownOpen=true}getDropdownSearchListHeight(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-input-search");if(i){this.host.style.setProperty("--dynamic-input-search-height",`${i.offsetHeight}px`)}}render(){const t=this.isMobile&&this.isDropdownOpen;return e(o,{key:"fb9a745e5ae24c5abbf9c3c6ce8f0df2d5fcf01f",style:this.hostCSSProperties(),class:"dropdown-overlay"},e("div",{key:"efc455c59f27bb254a10bbe4c62eec3e627eebb7",class:`dropdown ${t?"dropdown-mobile":""}`,style:this.styles},e("div",{key:"4542af0eede7676c2a4ce7e4e88fa8983c0eec15",class:this.getClasses()},this.isMobile&&this.isDropdownOpen&&e("cura-button-transparent",{key:"2100335a869d32e7d4f6820bc64e02e308ab29e1",fontColor:"dark",onClick:()=>this.isMobile=false,iconName:"arrowLeft",size:"medium",iconOnly:true,color:"primary"}),e("cura-input-text",{key:"fe1c21c892226c704c36107d250aac5f5b3cf0e0",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:t?"transparent":"default",required:this.required,hideErrorIcon:this.status==="error",iconName:this.iconName||"search",value:this.value,status:this.status,onValueChange:t=>this.onValueChange(t.target.value),onInput:t=>this.handleInputChange(t),onFocus:()=>this.handleOnFocus(),onClick:()=>window.innerWidth<768?this.isMobile=true:null,onBlur:()=>{this.handleOnBlur()},placeholder:this.placeholder,size:this.size,onKeyDown:this.handleKeyDown},e("slot",{key:"b03a633b3e9e45fc4539d4e7a2282ae388bb2e96",name:"helperText"}))),e("div",{key:"e8e88a4f884e386de33cea7f3bcf175a7e78b168",id:"dropdown-search-list",class:this.getDropdownClasses()},e("slot",{key:"f3aa2664cd496ccdd984a58c25f84fd9f616d157",name:"dropdown-search-option",onSlotchange:this.handleSlotChange}))))}get host(){return s(this)}static get watchers(){return{value:["onValueChange"]}}};d.style=n;export{d as cura_dropdown_search};
|
|
2
|
-
//# sourceMappingURL=p-7090d4a7.entry.js.map
|