@rededor/cura 1.4.0-alpha.1 → 1.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cura-accordion_12.cjs.entry.js → cura-accordion_13.cjs.entry.js} +78 -17
- 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 +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-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 +84 -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 +27 -21
- 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-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 +6 -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-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.css +73 -0
- package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +220 -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 +7 -5
- package/dist/collection/components/cura-modal/cura-modal.js +129 -10
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.stories.js +72 -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-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.js +3 -3
- 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/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-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.d.ts +11 -0
- package/dist/components/cura-badge-pill.js +8 -0
- package/dist/components/cura-badge-pill.js.map +1 -0
- 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 +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 +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 +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 +40 -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-badge-number.d.ts → cura-progress-bar.d.ts} +4 -4
- 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 +3 -3
- 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 +12 -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-b0451cb3.entry.js → p-04006a3e.entry.js} +2 -2
- package/dist/cura/{p-81c66f2b.entry.js → p-0a133399.entry.js} +2 -2
- package/dist/cura/{p-01e301d4.entry.js → p-164ddb46.entry.js} +2 -2
- package/dist/cura/{p-eea093b2.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-2af6216a.entry.js +2 -0
- package/dist/cura/p-2af6216a.entry.js.map +1 -0
- package/dist/cura/{p-ed839f1e.entry.js → p-3c0931d3.entry.js} +2 -2
- package/dist/cura/{p-e5b0dd74.entry.js → p-46b21329.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-f375a612.entry.js → p-4aefe237.entry.js} +2 -2
- package/dist/cura/p-529332d3.entry.js +2 -0
- package/dist/cura/p-529332d3.entry.js.map +1 -0
- package/dist/cura/{p-5bb8302c.entry.js → p-545e8e55.entry.js} +2 -2
- package/dist/cura/p-545e8e55.entry.js.map +1 -0
- 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-bfb5e9e1.entry.js → p-6e4f4fbf.entry.js} +2 -2
- package/dist/cura/p-6f1a3fe5.entry.js +2 -0
- package/dist/cura/p-6f1a3fe5.entry.js.map +1 -0
- package/dist/cura/p-7ba80d78.entry.js +2 -0
- package/dist/cura/p-7ba80d78.entry.js.map +1 -0
- package/dist/cura/p-8622c492.entry.js +2 -0
- package/dist/cura/p-8622c492.entry.js.map +1 -0
- package/dist/cura/{p-1f53580a.entry.js → p-a5af4225.entry.js} +2 -2
- package/dist/cura/{p-075b02de.entry.js → p-a7c60a4e.entry.js} +2 -2
- package/dist/cura/{p-eda28278.entry.js → p-b3e93e74.entry.js} +2 -2
- package/dist/cura/{p-a7ecea4a.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-0e28f1c8.entry.js → p-d13e3295.entry.js} +2 -2
- package/dist/cura/{p-7853ab16.entry.js → p-ec7876d3.entry.js} +2 -2
- package/dist/cura/{p-dbd9eab3.entry.js → p-f96b0923.entry.js} +2 -2
- package/dist/esm/{cura-accordion_12.entry.js → cura-accordion_13.entry.js} +78 -18
- 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 +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-dot.entry.js +40 -0
- package/dist/esm/cura-badge-dot.entry.js.map +1 -0
- package/dist/esm/cura-badge-pill.entry.js +80 -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 +27 -21
- 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-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-counter/cura-badge-counter.d.ts +30 -0
- package/dist/types/components/badges/cura-badge-counter/cura-badge-counter.stories.d.ts +64 -0
- package/dist/types/components/badges/cura-badge-dot/cura-badge-dot.d.ts +24 -0
- package/dist/types/components/badges/{cura-badge-number/cura-badge-number.stories.d.ts → cura-badge-dot/cura-badge-dot.stories.d.ts} +20 -6
- 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 +32 -3
- package/dist/types/components/cura-modal/cura-modal.stories.d.ts +62 -3
- 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.stories.d.ts +1 -1
- package/dist/types/components.d.ts +344 -17
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
- 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/cjs/cura-modal.cjs.entry.js +0 -50
- package/dist/cjs/cura-modal.cjs.entry.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-3536c96b.entry.js +0 -2
- package/dist/cura/p-3536c96b.entry.js.map +0 -1
- package/dist/cura/p-5bb8302c.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-deadde8d.entry.js +0 -2
- package/dist/cura/p-deadde8d.entry.js.map +0 -1
- package/dist/cura/p-ebed83d1.entry.js +0 -2
- package/dist/esm/cura-accordion_12.entry.js.map +0 -1
- 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/esm/cura-modal.entry.js +0 -46
- package/dist/esm/cura-modal.entry.js.map +0 -1
- package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +0 -8
- /package/dist/cura/{p-b0451cb3.entry.js.map → p-04006a3e.entry.js.map} +0 -0
- /package/dist/cura/{p-81c66f2b.entry.js.map → p-0a133399.entry.js.map} +0 -0
- /package/dist/cura/{p-01e301d4.entry.js.map → p-164ddb46.entry.js.map} +0 -0
- /package/dist/cura/{p-eea093b2.entry.js.map → p-235ac0b4.entry.js.map} +0 -0
- /package/dist/cura/{p-ed839f1e.entry.js.map → p-3c0931d3.entry.js.map} +0 -0
- /package/dist/cura/{p-e5b0dd74.entry.js.map → p-46b21329.entry.js.map} +0 -0
- /package/dist/cura/{p-f375a612.entry.js.map → p-4aefe237.entry.js.map} +0 -0
- /package/dist/cura/{p-ebed83d1.entry.js.map → p-6624108e.entry.js.map} +0 -0
- /package/dist/cura/{p-bfb5e9e1.entry.js.map → p-6e4f4fbf.entry.js.map} +0 -0
- /package/dist/cura/{p-1f53580a.entry.js.map → p-a5af4225.entry.js.map} +0 -0
- /package/dist/cura/{p-075b02de.entry.js.map → p-a7c60a4e.entry.js.map} +0 -0
- /package/dist/cura/{p-eda28278.entry.js.map → p-b3e93e74.entry.js.map} +0 -0
- /package/dist/cura/{p-a7ecea4a.entry.js.map → p-bce10f9b.entry.js.map} +0 -0
- /package/dist/cura/{p-0e28f1c8.entry.js.map → p-d13e3295.entry.js.map} +0 -0
- /package/dist/cura/{p-7853ab16.entry.js.map → p-ec7876d3.entry.js.map} +0 -0
- /package/dist/cura/{p-dbd9eab3.entry.js.map → p-f96b0923.entry.js.map} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
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 {
|
|
20
|
+
width: fit-content;
|
|
21
|
+
display: inline-block;
|
|
22
|
+
height: calc(var(--base-spacing) * 4px);
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
:host .container {
|
|
26
|
+
display: flex;
|
|
27
|
+
min-width: calc(var(--base-spacing) * 4px);
|
|
28
|
+
width: fit-content;
|
|
29
|
+
height: calc(var(--base-spacing) * 4px);
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
border-radius: calc(calc(var(--base-spacing) * 4px) / 2);
|
|
33
|
+
background: var(--background-color);
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
padding: 0 calc(var(--base-spacing) * 1px);
|
|
36
|
+
position: relative;
|
|
37
|
+
}
|
|
38
|
+
:host .container.outline, :host .container.transparent {
|
|
39
|
+
background: transparent !important;
|
|
40
|
+
}
|
|
41
|
+
:host .container.outline::before {
|
|
42
|
+
content: "";
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
position: absolute;
|
|
46
|
+
left: 0px;
|
|
47
|
+
top: 0px;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
border: 1px solid var(--background-color);
|
|
50
|
+
border-radius: calc(calc(var(--base-spacing) * 4px) / 2);
|
|
51
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class CuraBadgeNumber {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.theme = window.CuraAPI.theme;
|
|
5
|
+
this.labelColor = 'primary-darker';
|
|
6
|
+
this.bgColorName = 'primary-lighter';
|
|
7
|
+
this.number = undefined;
|
|
8
|
+
this.color = 'primary';
|
|
9
|
+
this.disabled = false;
|
|
10
|
+
this.type = 'solid';
|
|
11
|
+
this.styles = {};
|
|
12
|
+
}
|
|
13
|
+
handleColorChange() {
|
|
14
|
+
this.setColors();
|
|
15
|
+
}
|
|
16
|
+
setColors() {
|
|
17
|
+
const color = this.color.toLowerCase();
|
|
18
|
+
/** type outline and transparent */
|
|
19
|
+
if (this.type === 'outline' || this.type === 'transparent') {
|
|
20
|
+
this.bgColorName = this.disabled ? `neutral-medium` : `${color}-dark`;
|
|
21
|
+
this.labelColor = this.bgColorName;
|
|
22
|
+
/** type solid - default */
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.bgColorName = color === 'neutral' || this.disabled ? `neutral-pale` : `${color}-lighter`;
|
|
26
|
+
this.labelColor = this.disabled ? 'neutral-medium' : `${color}-dark`;
|
|
27
|
+
}
|
|
28
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(`${this.bgColorName}`) });
|
|
29
|
+
}
|
|
30
|
+
connectedCallback() {
|
|
31
|
+
this.styles['--base-spacing'] = this.theme.spacing.getSpacing();
|
|
32
|
+
this.setColors();
|
|
33
|
+
}
|
|
34
|
+
getClasses() {
|
|
35
|
+
const classes = {
|
|
36
|
+
'container': true
|
|
37
|
+
};
|
|
38
|
+
classes[this.type.toLowerCase()] = true;
|
|
39
|
+
return classes;
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
return (h(Host, { key: '8b67f2b913a10de53a519cdafcfbcb140b2adda5' }, this.number && this.number <= 0 ? '' : (h("div", { class: this.getClasses(), style: this.styles }, h("cura-label", { size: "xsmall", "line-height": "none", color: this.labelColor }, this.number >= 100 ? '99+' : this.number)))));
|
|
43
|
+
}
|
|
44
|
+
static get is() { return "cura-badge-counter"; }
|
|
45
|
+
static get encapsulation() { return "shadow"; }
|
|
46
|
+
static get originalStyleUrls() {
|
|
47
|
+
return {
|
|
48
|
+
"$": ["cura-badge-counter.scss"]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
static get styleUrls() {
|
|
52
|
+
return {
|
|
53
|
+
"$": ["cura-badge-counter.css"]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get properties() {
|
|
57
|
+
return {
|
|
58
|
+
"number": {
|
|
59
|
+
"type": "number",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "number | null",
|
|
63
|
+
"resolved": "number",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "N\u00FAmero a ser representado no badge.\nApresentar\u00E1 99+ para n\u00FAmeros acima desse valor."
|
|
71
|
+
},
|
|
72
|
+
"attribute": "number",
|
|
73
|
+
"reflect": true
|
|
74
|
+
},
|
|
75
|
+
"color": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": "Cor fundamental do design system sem profundidade.\nEx.: primary (padr\u00E3o)"
|
|
88
|
+
},
|
|
89
|
+
"attribute": "color",
|
|
90
|
+
"reflect": false,
|
|
91
|
+
"defaultValue": "'primary'"
|
|
92
|
+
},
|
|
93
|
+
"disabled": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "boolean",
|
|
98
|
+
"resolved": "boolean",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "Define o estado do badge como desabilitado ou habilitado."
|
|
106
|
+
},
|
|
107
|
+
"attribute": "disabled",
|
|
108
|
+
"reflect": false,
|
|
109
|
+
"defaultValue": "false"
|
|
110
|
+
},
|
|
111
|
+
"type": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"mutable": false,
|
|
114
|
+
"complexType": {
|
|
115
|
+
"original": "'solid' | 'outline' | 'transparent' | string",
|
|
116
|
+
"resolved": "string",
|
|
117
|
+
"references": {}
|
|
118
|
+
},
|
|
119
|
+
"required": false,
|
|
120
|
+
"optional": false,
|
|
121
|
+
"docs": {
|
|
122
|
+
"tags": [],
|
|
123
|
+
"text": "Define o estilo visual entre solid (default), outline ou transparent."
|
|
124
|
+
},
|
|
125
|
+
"attribute": "type",
|
|
126
|
+
"reflect": false,
|
|
127
|
+
"defaultValue": "'solid'"
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
static get states() {
|
|
132
|
+
return {
|
|
133
|
+
"styles": {}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static get watchers() {
|
|
137
|
+
return [{
|
|
138
|
+
"propName": "disabled",
|
|
139
|
+
"methodName": "handleColorChange"
|
|
140
|
+
}, {
|
|
141
|
+
"propName": "color",
|
|
142
|
+
"methodName": "handleColorChange"
|
|
143
|
+
}, {
|
|
144
|
+
"propName": "type",
|
|
145
|
+
"methodName": "handleColorChange"
|
|
146
|
+
}];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=cura-badge-counter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-badge-counter.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-counter/cura-badge-counter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,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;IACnB,CAAC;IAED,SAAS;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QACvC,mCAAmC;QACnC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;YAC3D,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,CAAC;YACtE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;YACrC,2BAA2B;QAC3B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,WAAW,GAAG,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,UAAU,CAAC;YAC9F,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,OAAO,CAAC;QACvE,CAAC;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;IACH,CAAC;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;IACnB,CAAC;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;IACjB,CAAC;IAGD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,uDACD,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACzC,WAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM;YAC/C,kBAAY,IAAI,EAAC,QAAQ,iBAAa,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,UAAU,IAChE,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAC9B,CACT,CACL,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -10,22 +10,23 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
-
import {
|
|
14
|
-
const
|
|
15
|
-
const block = `<cura-badge-
|
|
16
|
-
color="${args.color}"
|
|
17
|
-
${args.
|
|
18
|
-
|
|
13
|
+
import { baseColors } from "../../../utils/utils";
|
|
14
|
+
const renderCuraBadgeCounter = (args) => {
|
|
15
|
+
const block = `<cura-badge-counter${args.color && args.color !== 'primary' ? `
|
|
16
|
+
color="${args.color}"` : ''}${args.disabled ? `
|
|
17
|
+
disabled` : ''}${args.type && args.type !== 'solid' ? `
|
|
18
|
+
type="${args.type}"` : ''}
|
|
19
|
+
number="${args.number}">
|
|
20
|
+
</cura-badge-counter>
|
|
19
21
|
`;
|
|
20
22
|
return `${block}`;
|
|
21
23
|
};
|
|
22
|
-
const colors = getColorsWithDepths();
|
|
23
24
|
export default {
|
|
24
|
-
title: 'Componentes/Badges/Badge
|
|
25
|
+
title: 'Componentes/Badges/Badge Counter',
|
|
25
26
|
tags: ['autodocs'],
|
|
26
27
|
render: (_a) => {
|
|
27
28
|
var args = __rest(_a, []);
|
|
28
|
-
return
|
|
29
|
+
return renderCuraBadgeCounter(args);
|
|
29
30
|
},
|
|
30
31
|
argTypes: {
|
|
31
32
|
number: {
|
|
@@ -38,19 +39,38 @@ export default {
|
|
|
38
39
|
},
|
|
39
40
|
color: {
|
|
40
41
|
control: { type: 'select' },
|
|
41
|
-
options: ['', ...
|
|
42
|
+
options: ['', ...baseColors],
|
|
42
43
|
description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
|
|
43
44
|
table: {
|
|
44
45
|
category: 'Properties',
|
|
45
46
|
defaultValue: { summary: 'primary' },
|
|
46
47
|
},
|
|
47
48
|
},
|
|
49
|
+
type: {
|
|
50
|
+
control: { type: 'select' },
|
|
51
|
+
options: ['solid', 'outline', 'transparent'],
|
|
52
|
+
description: 'Estilo do badge. Valores válidos são solid (padrão), outline ou transparent.',
|
|
53
|
+
table: {
|
|
54
|
+
category: 'Properties',
|
|
55
|
+
defaultValue: { summary: 'solid' },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
disabled: {
|
|
59
|
+
control: 'boolean',
|
|
60
|
+
description: 'Estado desabilitado.',
|
|
61
|
+
table: {
|
|
62
|
+
category: 'State',
|
|
63
|
+
defaultValue: { summary: false }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
48
66
|
},
|
|
49
67
|
};
|
|
50
|
-
export const
|
|
68
|
+
export const CuraBadgeCounter = {
|
|
51
69
|
args: {
|
|
52
70
|
number: 1,
|
|
53
71
|
color: 'primary',
|
|
54
|
-
|
|
72
|
+
disabled: false,
|
|
73
|
+
type: 'solid'
|
|
74
|
+
}
|
|
55
75
|
};
|
|
56
|
-
//# sourceMappingURL=cura-badge-
|
|
76
|
+
//# sourceMappingURL=cura-badge-counter.stories.js.map
|
package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.stories.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-badge-counter.stories.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-counter/cura-badge-counter.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,sBAAsB,GAAG,CAAC,IAAS,EAAE,EAAE;IAC3C,MAAM,KAAK,GAAG,sBAAsB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;WACpE,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;WACrC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC;UAC9C,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;YACf,IAAI,CAAC,MAAM;;GAEpB,CAAC;IACA,OAAO,GAAG,KAAK,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,eAAe;IACX,KAAK,EAAE,kCAAkC;IACzC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,MAAM,EAAE,CAAC,EAAW,EAAE,EAAE;YAAV,IAAI,cAAT,EAAW,CAAF;QACd,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACxC,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,UAAU,CAAC;YAC5B,WAAW,EAAE,kEAAkE;YAC/E,KAAK,EAAE;gBACH,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aACvC;SACJ;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,OAAO,EAAC,SAAS,EAAC,aAAa,CAAC;YAC1C,WAAW,EAAE,8EAA8E;YAC3F,KAAK,EAAE;gBACH,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;aACrC;SACJ;QACC,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,sBAAsB;YACnC,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,OAAO;KACd;CACJ,CAAC","sourcesContent":["import { baseColors } from \"../../../utils/utils\";\n\nconst renderCuraBadgeCounter = (args: any) => {\n const block = `<cura-badge-counter${args.color && args.color !== 'primary' ? `\n color=\"${args.color}\"` : ''}${args.disabled ? `\n disabled` : ''}${args.type && args.type !== 'solid' ? `\n type=\"${args.type}\"` : ''}\n number=\"${args.number}\">\n</cura-badge-counter>\n `;\n return `${block}`;\n};\n\nexport default {\n title: 'Componentes/Badges/Badge Counter',\n tags: ['autodocs'],\n render: ({ ...args }) => {\n return renderCuraBadgeCounter(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: ['', ...baseColors],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'primary' },\n },\n },\n type: {\n control: { type: 'select' },\n options: ['solid','outline','transparent'],\n description: 'Estilo do badge. Valores válidos são solid (padrão), outline ou transparent.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'solid' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false }\n }\n },\n },\n};\n\nexport const CuraBadgeCounter = {\n args: {\n number: 1,\n color: 'primary',\n disabled: false,\n type: 'solid'\n }\n};\n"]}
|
|
@@ -18,7 +18,7 @@ export class CuraDistance {
|
|
|
18
18
|
this.formatDistance();
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: 'cdc206deecbed2e069befda5d21ddcaf03049afc' }, h("div", { key: 'd22d2b5b97964281e8588fbc17a66f3fddcd875e', class: "container", style: this.styles }, h("cura-label", { key: '0d54ab1ad403ba23a57fb78a422ed8c577cd627e', size: 'xsmall', weight: 'bold', color: 'neutral-black' }, this.displayDistance, this.isThousandRounded ? 'K' : ''), h("cura-label", { key: 'd4929a67484bbfd6d6f3edce82414951ea4778c8', size: 'xsmall', weight: 'bold', color: 'neutral-dark' }, this.label))));
|
|
22
22
|
}
|
|
23
23
|
setCssProperties() {
|
|
24
24
|
this.styles = {
|
|
@@ -0,0 +1,61 @@
|
|
|
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 {
|
|
20
|
+
display: block;
|
|
21
|
+
position: relative;
|
|
22
|
+
width: fit-content;
|
|
23
|
+
height: fit-content;
|
|
24
|
+
}
|
|
25
|
+
:host .container {
|
|
26
|
+
width: calc(var(--base-spacing) * 2px);
|
|
27
|
+
height: calc(var(--base-spacing) * 2px);
|
|
28
|
+
position: relative;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
:host .container::before {
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: 0;
|
|
36
|
+
top: 0;
|
|
37
|
+
content: "";
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
border: 1px solid var(--color-dark);
|
|
41
|
+
background: var(--color);
|
|
42
|
+
}
|
|
43
|
+
:host .container.disabled::before {
|
|
44
|
+
background: var(--neutral-pale);
|
|
45
|
+
border: 1px solid var(--neutral-medium);
|
|
46
|
+
}
|
|
47
|
+
:host .container.outline::before {
|
|
48
|
+
background: transparent;
|
|
49
|
+
border: 2px solid var(--color);
|
|
50
|
+
}
|
|
51
|
+
:host .container.outline.disabled::before {
|
|
52
|
+
border: 2px solid var(--neutral-medium);
|
|
53
|
+
}
|
|
54
|
+
:host .container.transparent::before {
|
|
55
|
+
background: var(--color-dark);
|
|
56
|
+
border: none;
|
|
57
|
+
}
|
|
58
|
+
:host .container.transparent.disabled::before {
|
|
59
|
+
background: var(--neutral-medium);
|
|
60
|
+
border: none;
|
|
61
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class CuraBadgeDot {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.theme = window.CuraAPI.theme;
|
|
5
|
+
this.color = 'primary';
|
|
6
|
+
this.disabled = false;
|
|
7
|
+
this.type = 'solid';
|
|
8
|
+
this.styles = {};
|
|
9
|
+
}
|
|
10
|
+
connectedCallback() {
|
|
11
|
+
this.styles['--base-spacing'] = this.theme.spacing.getSpacing();
|
|
12
|
+
this.styles['--neutral-medium'] = this.theme.colors.getColor('neutral-dark');
|
|
13
|
+
;
|
|
14
|
+
this.styles['--neutral-pale'] = this.theme.colors.getColor('neutral-pale');
|
|
15
|
+
;
|
|
16
|
+
this.setColors();
|
|
17
|
+
}
|
|
18
|
+
setColors() {
|
|
19
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--color': this.theme.colors.getColor(`${this.color}`), '--color-dark': this.theme.colors.getColor(`${this.color}-dark`) });
|
|
20
|
+
}
|
|
21
|
+
getClasses() {
|
|
22
|
+
const classes = {
|
|
23
|
+
'container': true,
|
|
24
|
+
'disabled': this.disabled
|
|
25
|
+
};
|
|
26
|
+
classes[`${this.type}`] = true;
|
|
27
|
+
return classes;
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return (h(Host, { key: '00e335977fbb0677db9d95bab901a012ba8a5c06' }, h("div", { key: 'e828743793731c986f37dd6a9f7abdc78b63932b', class: this.getClasses(), style: this.styles })));
|
|
31
|
+
}
|
|
32
|
+
static get is() { return "cura-badge-dot"; }
|
|
33
|
+
static get encapsulation() { return "shadow"; }
|
|
34
|
+
static get originalStyleUrls() {
|
|
35
|
+
return {
|
|
36
|
+
"$": ["cura-badge-dot.scss"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get styleUrls() {
|
|
40
|
+
return {
|
|
41
|
+
"$": ["cura-badge-dot.css"]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static get properties() {
|
|
45
|
+
return {
|
|
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": "Cor fundamental do design system sem profundidade.\nEx.: primary (padr\u00E3o)"
|
|
59
|
+
},
|
|
60
|
+
"attribute": "color",
|
|
61
|
+
"reflect": false,
|
|
62
|
+
"defaultValue": "'primary'"
|
|
63
|
+
},
|
|
64
|
+
"disabled": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "boolean",
|
|
69
|
+
"resolved": "boolean",
|
|
70
|
+
"references": {}
|
|
71
|
+
},
|
|
72
|
+
"required": false,
|
|
73
|
+
"optional": false,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": "Define o estado do badge como desabilitado ou habilitado."
|
|
77
|
+
},
|
|
78
|
+
"attribute": "disabled",
|
|
79
|
+
"reflect": true,
|
|
80
|
+
"defaultValue": "false"
|
|
81
|
+
},
|
|
82
|
+
"type": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "'solid' | 'outline' | 'transparent' | string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Define o estilo visual entre solid (default), outline ou transparent."
|
|
95
|
+
},
|
|
96
|
+
"attribute": "type",
|
|
97
|
+
"reflect": true,
|
|
98
|
+
"defaultValue": "'solid'"
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static get states() {
|
|
103
|
+
return {
|
|
104
|
+
"styles": {}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=cura-badge-dot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-badge-dot.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-dot/cura-badge-dot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhE,MAAM,OAAO,YAAY;;QAEvB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;qBAML,SAAS;wBAIU,KAAK;oBAI4B,OAAO;sBAEjE,EAAE;;IAGpB,iBAAiB;QACf,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAChE,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAAA,CAAC;QAC9E,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAAA,CAAC;QAC5E,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EACtD,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,OAAO,CAAC,GACjE,CAAA;IACH,CAAC;IAED,UAAU;QACR,MAAM,OAAO,GAAG;YACd,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,IAAI,CAAC,QAAQ;SAC1B,CAAC;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;QAC/B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,GAAQ,CACpD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { baseColors } from "../../../utils/utils";
|
|
14
|
+
const renderCuraBadgeDot = (args) => {
|
|
15
|
+
const block = `<cura-badge-dot${args.color && args.color !== 'primary' ? `
|
|
16
|
+
color="${args.color}"` : ''}${args.disabled ? `
|
|
17
|
+
disabled` : ''}${args.type && args.type !== 'solid' ? `
|
|
18
|
+
type="${args.type}"` : ''}></cura-badge-dot>
|
|
19
|
+
`;
|
|
20
|
+
return `${block}`;
|
|
21
|
+
};
|
|
22
|
+
export default {
|
|
23
|
+
title: 'Componentes/Badges/Badge Dot',
|
|
24
|
+
tags: ['autodocs'],
|
|
25
|
+
render: (_a) => {
|
|
26
|
+
var args = __rest(_a, []);
|
|
27
|
+
return renderCuraBadgeDot(args);
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
color: {
|
|
31
|
+
control: { type: 'select' },
|
|
32
|
+
options: ['', ...baseColors],
|
|
33
|
+
description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
|
|
34
|
+
table: {
|
|
35
|
+
category: 'Properties',
|
|
36
|
+
defaultValue: { summary: 'primary' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
type: {
|
|
40
|
+
control: { type: 'select' },
|
|
41
|
+
options: ['', 'solid', 'outline', 'transparent'],
|
|
42
|
+
description: 'Estilo do badge. Valores válidos são solid (padrão), outline ou transparent.',
|
|
43
|
+
table: {
|
|
44
|
+
category: 'Properties',
|
|
45
|
+
defaultValue: { summary: 'solid' },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
disabled: {
|
|
49
|
+
control: 'boolean',
|
|
50
|
+
description: 'Estado desabilitado.',
|
|
51
|
+
table: {
|
|
52
|
+
category: 'State',
|
|
53
|
+
defaultValue: { summary: false }
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
export const CuraBadgeDot = {
|
|
59
|
+
args: {
|
|
60
|
+
color: 'primary',
|
|
61
|
+
disabled: false,
|
|
62
|
+
type: ''
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=cura-badge-dot.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cura-badge-dot.stories.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-dot/cura-badge-dot.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,kBAAkB,GAAE,CAAC,IAAS,EAAE,EAAE;IACtC,MAAM,KAAK,GAAG,kBAAkB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;WAChE,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;WACrC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC;UAC9C,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE;GACxB,CAAC;IACA,OAAO,GAAG,KAAK,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,eAAe;IACX,KAAK,EAAE,8BAA8B;IACrC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,MAAM,EAAE,CAAC,EAAW,EAAE,EAAE;YAAV,IAAI,cAAT,EAAW,CAAF;QACd,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,QAAQ,EAAE;QACN,KAAK,EAAE;YACH,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,EAAE,EAAE,GAAG,UAAU,CAAC;YAC5B,WAAW,EAAE,kEAAkE;YAC/E,KAAK,EAAE;gBACH,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aACvC;SACJ;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,EAAE,EAAC,OAAO,EAAC,SAAS,EAAC,aAAa,CAAC;YAC7C,WAAW,EAAE,8EAA8E;YAC3F,KAAK,EAAE;gBACH,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;aACrC;SACJ;QACC,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,sBAAsB;YACnC,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,EAAE;KACT;CACJ,CAAC","sourcesContent":["import { baseColors } from \"../../../utils/utils\";\n\nconst renderCuraBadgeDot= (args: any) => {\n const block = `<cura-badge-dot${args.color && args.color !== 'primary' ? `\n color=\"${args.color}\"` : ''}${args.disabled ? `\n disabled` : ''}${args.type && args.type !== 'solid' ? `\n type=\"${args.type}\"` : ''}></cura-badge-dot>\n `;\n return `${block}`;\n};\n\nexport default {\n title: 'Componentes/Badges/Badge Dot',\n tags: ['autodocs'],\n render: ({ ...args }) => {\n return renderCuraBadgeDot(args);\n },\n argTypes: {\n color: {\n control: { type: 'select' },\n options: ['', ...baseColors],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'primary' },\n },\n },\n type: {\n control: { type: 'select' },\n options: ['','solid','outline','transparent'],\n description: 'Estilo do badge. Valores válidos são solid (padrão), outline ou transparent.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'solid' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false }\n }\n },\n },\n};\n\nexport const CuraBadgeDot = {\n args: {\n color: 'primary',\n disabled: false,\n type: ''\n }\n};\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
.badge-container {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
gap: calc(var(--base-spacing) * 1px);
|
|
24
|
+
padding: calc(var(--base-spacing) * 1px);
|
|
25
|
+
border-radius: var(--border-radius);
|
|
26
|
+
font-family: var(--font-family);
|
|
27
|
+
font-size: var(--font-size);
|
|
28
|
+
position: relative;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
width: fit-content;
|
|
31
|
+
height: calc(var(--base-spacing) * 5px);
|
|
32
|
+
min-width: calc(var(--base-spacing) * 5px);
|
|
33
|
+
background-color: var(--color-background);
|
|
34
|
+
}
|
|
35
|
+
.badge-container::before {
|
|
36
|
+
content: "";
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
position: absolute;
|
|
40
|
+
left: 0px;
|
|
41
|
+
top: 0px;
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
border: 1px solid transparent;
|
|
44
|
+
border-radius: var(--border-radius);
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
.badge-container.icon-only cura-label {
|
|
48
|
+
display: none !important;
|
|
49
|
+
}
|
|
50
|
+
.badge-container.disabled {
|
|
51
|
+
background-color: var(--color-background-disabled);
|
|
52
|
+
}
|
|
53
|
+
.badge-container.outline {
|
|
54
|
+
background-color: transparent;
|
|
55
|
+
}
|
|
56
|
+
.badge-container.outline::before {
|
|
57
|
+
border: 1px solid var(--color-base);
|
|
58
|
+
}
|
|
59
|
+
.badge-container.outline.disabled::before {
|
|
60
|
+
border: 1px solid var(--color-outline-disabled);
|
|
61
|
+
}
|
|
62
|
+
.badge-container.transparent {
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
}
|
|
65
|
+
.badge-container.transparent::before {
|
|
66
|
+
border: 1px solid transparent;
|
|
67
|
+
}
|
|
68
|
+
.badge-container.transparent.disabled {
|
|
69
|
+
background-color: transparent;
|
|
70
|
+
}
|
|
71
|
+
.badge-container cura-icon {
|
|
72
|
+
display: flex;
|
|
73
|
+
}
|