@rededor/cura 1.0.0 → 1.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/assets/cura-assets.zip +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-Black.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-BlackItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-Bold.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-BoldItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-Book.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-BookItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLight.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLightItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-Light.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-LightItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-Medium.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-MediumItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-Thin.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-ThinItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-Ultra.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/Gotham-UltraItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Gotham/style.css +90 -0
- package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-Italic-VariableFont_wght.woff2 +0 -0
- package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-VariableFont_wght.woff2 +0 -0
- package/dist/assets/assets/fonts/HankenGrotesk/style-webfont.css +72 -0
- package/dist/assets/assets/fonts/HankenGrotesk/style.css +16 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-Black.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-BlackItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-Bold.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-BoldItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-Italic.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-Light.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-LightItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-Medium.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-MediumItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-Regular.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-Thin.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/Roboto-ThinItalic.woff2 +0 -0
- package/dist/assets/assets/fonts/Roboto/style-webfont.css +756 -0
- package/dist/assets/assets/fonts/Roboto/style.css +90 -0
- package/dist/assets/assets/images/avatar/doctor-default.svg +6 -7
- package/dist/assets/assets/images/avatar/doctor-default_old.svg +8 -0
- package/dist/assets/assets/images/avatar/dora-default.svg +3 -4
- package/dist/assets/assets/images/avatar/dora-default_old.svg +5 -0
- package/dist/assets/assets/images/avatar/patient-default.svg +16 -10
- package/dist/assets/assets/images/avatar/patient-default_old.svg +12 -0
- package/dist/assets/assets/images/avatar/unit-default.svg +7 -8
- package/dist/assets/assets/images/avatar/unit-default_old.svg +9 -0
- package/dist/cjs/{app-globals-b77d5b06.js → app-globals-4d07f363.js} +20 -4
- package/dist/cjs/app-globals-4d07f363.js.map +1 -0
- package/dist/cjs/cura-accordion_12.cjs.entry.js +24 -17
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +2 -2
- package/dist/cjs/cura-avatar.cjs.entry.js +2 -2
- package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
- package/dist/cjs/cura-badge-number.cjs.entry.js +29 -0
- package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-select.cjs.entry.js +69 -58
- package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-transparent.cjs.entry.js +2 -2
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-calendar.cjs.entry.js +126 -235
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-card.cjs.entry.js +2 -2
- package/dist/cjs/cura-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-display.cjs.entry.js +2 -2
- package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +2 -2
- package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +3 -3
- package/dist/cjs/cura-dropdown-search.cjs.entry.js +33 -6
- package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-icons-view.cjs.entry.js +4 -4
- package/dist/cjs/cura-input-date.cjs.entry.js +188 -0
- package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-loader-bar.cjs.entry.js +2 -2
- package/dist/cjs/cura-radio.cjs.entry.js +2 -2
- package/dist/cjs/cura-switch.cjs.entry.js +2 -2
- package/dist/cjs/cura-toast.cjs.entry.js +2 -2
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/index-6dc29195.js +126 -0
- package/dist/cjs/index-6dc29195.js.map +1 -0
- package/dist/cjs/{index-98e7ba54.js → index-e6d728ec.js} +70 -3
- package/dist/{esm/index-1ad98520.js.map → cjs/index-e6d728ec.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/api/theme-presets/theme-default.js +3 -3
- package/dist/collection/api/theme-presets/theme-default.js.map +1 -1
- package/dist/collection/api/theme-presets/theme-legacy-default.js +16 -0
- package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -1
- package/dist/collection/assets/images/avatar/doctor-default.svg +6 -7
- package/dist/collection/assets/images/avatar/doctor-default_old.svg +8 -0
- package/dist/collection/assets/images/avatar/dora-default.svg +3 -4
- package/dist/collection/assets/images/avatar/dora-default_old.svg +5 -0
- package/dist/collection/assets/images/avatar/patient-default.svg +16 -10
- package/dist/collection/assets/images/avatar/patient-default_old.svg +12 -0
- package/dist/collection/assets/images/avatar/unit-default.svg +7 -8
- package/dist/collection/assets/images/avatar/unit-default_old.svg +9 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +30 -0
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +66 -0
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -0
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js +56 -0
- package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +1 -0
- package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
- package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +49 -21
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +110 -113
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +133 -0
- package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -0
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
- package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +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.css +15 -5
- package/dist/collection/components/cura-calendar/cura-calendar.js +139 -52
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js +33 -3
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
- package/dist/collection/components/cura-card/cura-card.js +1 -1
- package/dist/collection/components/cura-icon/cura-icon.js +1 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
- 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/forms/cura-checkbox/cura-checkbox.css +13 -5
- 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 +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +49 -4
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js +19 -6
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-date/cura-input-date.css +79 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js +424 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +138 -0
- package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -0
- package/dist/collection/components/forms/cura-input-text/cura-input-text.css +5 -2
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +41 -2
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +73 -21
- package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +3 -0
- package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -1
- package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
- package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.css +6 -2
- package/dist/collection/components/forms/cura-select/cura-select.js +23 -4
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.stories.js +11 -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.css +3 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
- package/dist/collection/stories/blocks/index.js +85 -0
- package/dist/components/cura-alert.js +1 -1
- package/dist/components/cura-avatar.js +1 -1
- package/dist/components/cura-badge-number.d.ts +11 -0
- package/dist/components/cura-badge-number.js +8 -0
- package/dist/components/cura-badge-number.js.map +1 -0
- package/dist/components/cura-badge-number2.js +49 -0
- package/dist/components/cura-badge-number2.js.map +1 -0
- package/dist/components/cura-button-outline.js +1 -1
- package/dist/components/cura-button-outline.js.map +1 -1
- package/dist/components/cura-button-select.js +81 -65
- package/dist/components/cura-button-select.js.map +1 -1
- package/dist/components/cura-button-transparent2.js +1 -1
- package/dist/components/cura-button-transparent2.js.map +1 -1
- package/dist/components/cura-button.js +1 -1
- package/dist/components/cura-button.js.map +1 -1
- package/dist/components/cura-calendar.js +1 -4065
- package/dist/components/cura-calendar.js.map +1 -1
- package/dist/components/cura-calendar2.js +4082 -0
- package/dist/components/cura-calendar2.js.map +1 -0
- package/dist/components/cura-card.js +1 -1
- package/dist/components/cura-checkbox.js +2 -2
- package/dist/components/cura-checkbox.js.map +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 +33 -5
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-icon2.js +1 -1
- package/dist/components/cura-icons-view.js +3 -3
- package/dist/components/cura-input-date.d.ts +11 -0
- package/dist/components/cura-input-date.js +270 -0
- package/dist/components/cura-input-date.js.map +1 -0
- package/dist/components/cura-input-text2.js +10 -2
- package/dist/components/cura-input-text2.js.map +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-page-template.js +1 -1
- package/dist/components/cura-paragraph2.js +2 -2
- package/dist/components/cura-paragraph2.js.map +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 +7 -5
- package/dist/components/cura-select2.js.map +1 -1
- package/dist/components/cura-switch.js +1 -1
- package/dist/components/cura-toast.js +1 -1
- package/dist/components/index.js +23 -3
- 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-0b7a7306.js +2 -0
- package/dist/cura/p-0b7a7306.js.map +1 -0
- package/dist/cura/{p-0d435e42.entry.js → p-116a1cd6.entry.js} +2 -2
- package/dist/cura/p-272c784a.js +2 -0
- package/dist/cura/p-272c784a.js.map +1 -0
- package/dist/cura/{p-4c7a2419.entry.js → p-2d267d23.entry.js} +2 -2
- package/dist/cura/{p-b301a1ef.entry.js → p-33772510.entry.js} +2 -2
- package/dist/cura/{p-b301a1ef.entry.js.map → p-33772510.entry.js.map} +1 -1
- package/dist/cura/{p-0a923806.entry.js → p-41c3d47d.entry.js} +2 -2
- package/dist/cura/{p-0a923806.entry.js.map → p-41c3d47d.entry.js.map} +1 -1
- package/dist/cura/p-44e3325a.entry.js +2 -0
- package/dist/cura/p-44e3325a.entry.js.map +1 -0
- package/dist/cura/p-4e14c01c.entry.js +2 -0
- package/dist/cura/p-563ba0cd.entry.js +2 -0
- package/dist/cura/p-563ba0cd.entry.js.map +1 -0
- package/dist/cura/{p-57b8b468.entry.js → p-8f3db0fe.entry.js} +2 -2
- package/dist/cura/{p-a00d2c68.entry.js → p-907b3d12.entry.js} +2 -2
- package/dist/cura/p-a2ae6bd2.entry.js +2 -0
- package/dist/cura/p-a2ae6bd2.entry.js.map +1 -0
- package/dist/cura/{p-6682619b.entry.js → p-b2d5db22.entry.js} +2 -2
- package/dist/cura/p-b43b69f3.entry.js +2 -0
- package/dist/cura/p-b43b69f3.entry.js.map +1 -0
- package/dist/cura/{p-599acc84.entry.js → p-be10b681.entry.js} +2 -2
- package/dist/cura/p-be10b681.entry.js.map +1 -0
- package/dist/cura/{p-a5cf0fd6.entry.js → p-c6508bd7.entry.js} +2 -2
- package/dist/cura/{p-2203e829.entry.js → p-dcd2e5bb.entry.js} +2 -2
- package/dist/cura/{p-84d8c67d.entry.js → p-e5023e34.entry.js} +2 -2
- package/dist/cura/p-e8bc6381.entry.js +2 -0
- package/dist/cura/p-e8bc6381.entry.js.map +1 -0
- package/dist/cura/p-ed97cf3c.entry.js +2 -0
- package/dist/cura/p-ed97cf3c.entry.js.map +1 -0
- package/dist/cura/{p-ad8a7e0f.entry.js → p-fcbf4311.entry.js} +2 -2
- package/dist/cura/{p-66c5cf5f.entry.js → p-fd083399.entry.js} +2 -2
- package/dist/cura/p-fd5ed6b0.js +3 -0
- package/dist/cura/p-fd5ed6b0.js.map +1 -0
- package/dist/cura/{p-f9433d24.entry.js → p-fdce91a7.entry.js} +2 -2
- package/dist/esm/{app-globals-488bf508.js → app-globals-6ca7103d.js} +20 -4
- package/dist/esm/app-globals-6ca7103d.js.map +1 -0
- package/dist/esm/cura-accordion_12.entry.js +24 -17
- package/dist/esm/cura-accordion_12.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +2 -2
- package/dist/esm/cura-avatar.entry.js +2 -2
- package/dist/esm/cura-badge-distance.entry.js +1 -1
- package/dist/esm/cura-badge-number.entry.js +25 -0
- package/dist/esm/cura-badge-number.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +2 -2
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-select.entry.js +69 -58
- package/dist/esm/cura-button-select.entry.js.map +1 -1
- package/dist/esm/cura-button-transparent.entry.js +2 -2
- package/dist/esm/cura-button-transparent.entry.js.map +1 -1
- package/dist/esm/cura-calendar.entry.js +58 -167
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura-card.entry.js +2 -2
- package/dist/esm/cura-checkbox.entry.js +3 -3
- package/dist/esm/cura-checkbox.entry.js.map +1 -1
- package/dist/esm/cura-display.entry.js +2 -2
- package/dist/esm/cura-dropdown-search-option-title.entry.js +2 -2
- package/dist/esm/cura-dropdown-search-option.entry.js +3 -3
- package/dist/esm/cura-dropdown-search.entry.js +33 -6
- package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
- package/dist/esm/cura-icons-view.entry.js +4 -4
- package/dist/esm/cura-input-date.entry.js +184 -0
- package/dist/esm/cura-input-date.entry.js.map +1 -0
- package/dist/esm/cura-loader-bar.entry.js +2 -2
- package/dist/esm/cura-radio.entry.js +2 -2
- package/dist/esm/cura-switch.entry.js +2 -2
- package/dist/esm/cura-toast.entry.js +2 -2
- package/dist/esm/cura.js +4 -4
- package/dist/esm/{index-1ad98520.js → index-747aad85.js} +70 -3
- package/dist/esm/index-747aad85.js.map +1 -0
- package/dist/esm/index-fbee309a.js +120 -0
- package/dist/esm/index-fbee309a.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/types/api/theme-presets/theme-legacy-default.d.ts +3 -3
- package/dist/types/api/theme-presets/theme-presets.d.ts +3 -3
- package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +8 -0
- package/dist/types/components/badges/cura-badge-number/cura-badge-number.stories.d.ts +39 -0
- package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +12 -34
- package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +105 -0
- package/dist/types/components/cura-calendar/cura-calendar.d.ts +53 -42
- package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +33 -0
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +9 -3
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.stories.d.ts +14 -0
- package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +92 -0
- package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +125 -0
- package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +6 -0
- package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +15 -0
- package/dist/types/components/forms/cura-select/cura-select.d.ts +5 -0
- package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +11 -0
- package/dist/types/components.d.ts +180 -48
- package/package.json +5 -3
- package/dist/cjs/app-globals-b77d5b06.js.map +0 -1
- package/dist/cjs/index-98e7ba54.js.map +0 -1
- package/dist/cura/p-0dd837cf.entry.js +0 -2
- package/dist/cura/p-0dd837cf.entry.js.map +0 -1
- package/dist/cura/p-312791fb.js +0 -3
- package/dist/cura/p-312791fb.js.map +0 -1
- package/dist/cura/p-4ef24fbd.entry.js +0 -2
- package/dist/cura/p-4ef24fbd.entry.js.map +0 -1
- package/dist/cura/p-599acc84.entry.js.map +0 -1
- package/dist/cura/p-a6c3c0ea.js +0 -2
- package/dist/cura/p-a6c3c0ea.js.map +0 -1
- package/dist/cura/p-dc5d0c29.entry.js +0 -2
- package/dist/cura/p-dc5d0c29.entry.js.map +0 -1
- package/dist/cura/p-df5c3a86.entry.js +0 -2
- package/dist/cura/p-df5c3a86.entry.js.map +0 -1
- package/dist/cura/p-dfc65f66.entry.js +0 -2
- package/dist/esm/app-globals-488bf508.js.map +0 -1
- /package/dist/cura/{p-0d435e42.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
- /package/dist/cura/{p-4c7a2419.entry.js.map → p-2d267d23.entry.js.map} +0 -0
- /package/dist/cura/{p-dfc65f66.entry.js.map → p-4e14c01c.entry.js.map} +0 -0
- /package/dist/cura/{p-57b8b468.entry.js.map → p-8f3db0fe.entry.js.map} +0 -0
- /package/dist/cura/{p-a00d2c68.entry.js.map → p-907b3d12.entry.js.map} +0 -0
- /package/dist/cura/{p-6682619b.entry.js.map → p-b2d5db22.entry.js.map} +0 -0
- /package/dist/cura/{p-a5cf0fd6.entry.js.map → p-c6508bd7.entry.js.map} +0 -0
- /package/dist/cura/{p-2203e829.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
- /package/dist/cura/{p-84d8c67d.entry.js.map → p-e5023e34.entry.js.map} +0 -0
- /package/dist/cura/{p-ad8a7e0f.entry.js.map → p-fcbf4311.entry.js.map} +0 -0
- /package/dist/cura/{p-66c5cf5f.entry.js.map → p-fd083399.entry.js.map} +0 -0
- /package/dist/cura/{p-f9433d24.entry.js.map → p-fdce91a7.entry.js.map} +0 -0
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
2
|
-
|
|
3
|
-
function _typeof(o) {
|
|
4
|
-
"@babel/helpers - typeof";
|
|
5
|
-
|
|
6
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
-
return typeof o;
|
|
8
|
-
} : function (o) {
|
|
9
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
-
}, _typeof(o);
|
|
11
|
-
}
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-747aad85.js';
|
|
2
|
+
import { r as requiredArgs, t as toDate, _ as _typeof, i as isBefore, a as isAfter } from './index-fbee309a.js';
|
|
12
3
|
|
|
13
4
|
function toInteger(dirtyNumber) {
|
|
14
5
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
@@ -21,63 +12,6 @@ function toInteger(dirtyNumber) {
|
|
|
21
12
|
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
22
13
|
}
|
|
23
14
|
|
|
24
|
-
function requiredArgs(required, args) {
|
|
25
|
-
if (args.length < required) {
|
|
26
|
-
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @name toDate
|
|
32
|
-
* @category Common Helpers
|
|
33
|
-
* @summary Convert the given argument to an instance of Date.
|
|
34
|
-
*
|
|
35
|
-
* @description
|
|
36
|
-
* Convert the given argument to an instance of Date.
|
|
37
|
-
*
|
|
38
|
-
* If the argument is an instance of Date, the function returns its clone.
|
|
39
|
-
*
|
|
40
|
-
* If the argument is a number, it is treated as a timestamp.
|
|
41
|
-
*
|
|
42
|
-
* If the argument is none of the above, the function returns Invalid Date.
|
|
43
|
-
*
|
|
44
|
-
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
45
|
-
*
|
|
46
|
-
* @param {Date|Number} argument - the value to convert
|
|
47
|
-
* @returns {Date} the parsed date in the local time zone
|
|
48
|
-
* @throws {TypeError} 1 argument required
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* // Clone the date:
|
|
52
|
-
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
53
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* // Convert the timestamp to date:
|
|
57
|
-
* const result = toDate(1392098430000)
|
|
58
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
59
|
-
*/
|
|
60
|
-
function toDate(argument) {
|
|
61
|
-
requiredArgs(1, arguments);
|
|
62
|
-
var argStr = Object.prototype.toString.call(argument);
|
|
63
|
-
|
|
64
|
-
// Clone the date
|
|
65
|
-
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
66
|
-
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
67
|
-
return new Date(argument.getTime());
|
|
68
|
-
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
69
|
-
return new Date(argument);
|
|
70
|
-
} else {
|
|
71
|
-
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
72
|
-
// eslint-disable-next-line no-console
|
|
73
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
74
|
-
// eslint-disable-next-line no-console
|
|
75
|
-
console.warn(new Error().stack);
|
|
76
|
-
}
|
|
77
|
-
return new Date(NaN);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
15
|
/**
|
|
82
16
|
* @name addDays
|
|
83
17
|
* @category Day Helpers
|
|
@@ -2750,56 +2684,6 @@ function getYear(dirtyDate) {
|
|
|
2750
2684
|
return toDate(dirtyDate).getFullYear();
|
|
2751
2685
|
}
|
|
2752
2686
|
|
|
2753
|
-
/**
|
|
2754
|
-
* @name isAfter
|
|
2755
|
-
* @category Common Helpers
|
|
2756
|
-
* @summary Is the first date after the second one?
|
|
2757
|
-
*
|
|
2758
|
-
* @description
|
|
2759
|
-
* Is the first date after the second one?
|
|
2760
|
-
*
|
|
2761
|
-
* @param {Date|Number} date - the date that should be after the other one to return true
|
|
2762
|
-
* @param {Date|Number} dateToCompare - the date to compare with
|
|
2763
|
-
* @returns {Boolean} the first date is after the second date
|
|
2764
|
-
* @throws {TypeError} 2 arguments required
|
|
2765
|
-
*
|
|
2766
|
-
* @example
|
|
2767
|
-
* // Is 10 July 1989 after 11 February 1987?
|
|
2768
|
-
* const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
|
|
2769
|
-
* //=> true
|
|
2770
|
-
*/
|
|
2771
|
-
function isAfter(dirtyDate, dirtyDateToCompare) {
|
|
2772
|
-
requiredArgs(2, arguments);
|
|
2773
|
-
var date = toDate(dirtyDate);
|
|
2774
|
-
var dateToCompare = toDate(dirtyDateToCompare);
|
|
2775
|
-
return date.getTime() > dateToCompare.getTime();
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
/**
|
|
2779
|
-
* @name isBefore
|
|
2780
|
-
* @category Common Helpers
|
|
2781
|
-
* @summary Is the first date before the second one?
|
|
2782
|
-
*
|
|
2783
|
-
* @description
|
|
2784
|
-
* Is the first date before the second one?
|
|
2785
|
-
*
|
|
2786
|
-
* @param {Date|Number} date - the date that should be before the other one to return true
|
|
2787
|
-
* @param {Date|Number} dateToCompare - the date to compare with
|
|
2788
|
-
* @returns {Boolean} the first date is before the second date
|
|
2789
|
-
* @throws {TypeError} 2 arguments required
|
|
2790
|
-
*
|
|
2791
|
-
* @example
|
|
2792
|
-
* // Is 10 July 1989 before 11 February 1987?
|
|
2793
|
-
* const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
|
|
2794
|
-
* //=> false
|
|
2795
|
-
*/
|
|
2796
|
-
function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
2797
|
-
requiredArgs(2, arguments);
|
|
2798
|
-
var date = toDate(dirtyDate);
|
|
2799
|
-
var dateToCompare = toDate(dirtyDateToCompare);
|
|
2800
|
-
return date.getTime() < dateToCompare.getTime();
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
2687
|
/**
|
|
2804
2688
|
* @name isToday
|
|
2805
2689
|
* @category Day Helpers
|
|
@@ -3563,7 +3447,7 @@ var locale = {
|
|
|
3563
3447
|
};
|
|
3564
3448
|
const ptBR = locale;
|
|
3565
3449
|
|
|
3566
|
-
const curaCalendarCss = ":host{display:block;width:var(--width)}:host .calendar{display:flex;flex-direction:column;gap:5px;width:var(--width);
|
|
3450
|
+
const curaCalendarCss = ":host{display:block;width:var(--width);max-width:400px;margin:0 auto}:host .calendar{display:flex;flex-direction:column;gap:5px;width:var(--width);min-width:268px;border-radius:4px;overflow:hidden;background:#fff;font-family:var(--font-family)}:host .calendar.embedded{border:2px solid var(--neutral-light);padding:0px 12px 12px 12px}:host .calendar.floating{box-shadow:0 4px 8px var(--neutral-light)}:host .header{position:relative;padding:12px 0}:host .header::after{content:\"\";position:absolute;bottom:0;left:2px;right:2px;border-bottom:2px dotted var(--neutral-light)}:host .month-year{display:flex;padding:12px 8px;justify-content:space-between;align-self:stretch}:host .month-year.dropdown{padding:0%}:host .select{display:flex;padding:7px 10px 0px;justify-content:center;align-items:center;gap:6px;flex:1 0 0}:host .drop-month{display:flex;max-width:118px;padding:0px;align-items:flex-start;gap:0px;flex:1 0 0}:host .drop-year{display:flex;min-width:80px;max-width:85px;padding:0px;align-items:flex-start;gap:0px;flex:1 0 0}:host .days-of-week{display:flex;height:30px;padding:4px;justify-content:center;align-items:center;gap:4px;flex-shrink:0}:host .day{flex:1;text-align:center}:host .dates{display:flex;flex-wrap:wrap;align-items:center;align-self:stretch;gap:0}:host .icon{cursor:pointer;position:relative;overflow:hidden;border-radius:50%}:host .icon.dropdown{margin-top:10px}:host .icon::before{content:\"\";position:absolute;border-radius:50%;top:50%;left:50%;width:20px;height:20px;background:var(--accent-base);transform:translate(-50%, -50%) scale(0);transition:transform 0.2s ease}:host .icon:active::before{transform:translate(-50%, -50%) scale(1)}:host .icon:active{transform:scale(1)}:host .collapsed-container{text-align:center;position:relative;display:flex;align-items:center;justify-content:center;padding-top:10px}:host .collapsed-container::before{content:\"\";position:absolute;bottom:0;top:0;left:2px;right:2px;border-top:2px dotted var(--neutral-light)}:host .date{display:flex;justify-content:center;align-items:center;height:auto;width:14.2857142857%;aspect-ratio:1;font-size:14px;cursor:pointer;position:relative;box-sizing:border-box;text-align:center;flex-shrink:0}:host .date.today{border:2px solid var(--primary-darker);border-radius:50%;color:var(--primary-darker)}:host .date.selected,:host .date.default-dates{color:var(--neutral-black) !important;background:var(--accent-base);border-radius:50%;border:none}:host .date.invalid{color:var(--neutral-dark) !important;cursor:not-allowed}:host .date.invalid:hover{background:none;box-shadow:none}:host .date.valid{color:var(--primary-darker);font-weight:var(--font-weight-bold)}:host .date.range.start{border-radius:50% 0 0 50%;color:var(--primary-darker) !important;background:var(--accent-base)}:host .date.range.interval{border-radius:0;background-color:var(--accent-light);color:var(--neutral-black)}:host .date.range.interval.today{border:none}:host .date.range.end{border-radius:0 50% 50% 0;color:var(--primary-darker) !important;background:var(--accent-base)}:host .date:hover{background:var(--accent-light);border-radius:50%;color:var(--neutral-black)}:host select,:host input{width:60px;font-size:16px;box-shadow:0 2px 2px var(--neutral-black);padding:5px;border-radius:4px;border:1px solid #ccc;background:#f7f7f7}.teste{width:100%}";
|
|
3567
3451
|
const CuraCalendarStyle0 = curaCalendarCss;
|
|
3568
3452
|
|
|
3569
3453
|
const CuraCalendar = class {
|
|
@@ -3574,7 +3458,7 @@ const CuraCalendar = class {
|
|
|
3574
3458
|
this.weights = this.theme.fonts.getWeights();
|
|
3575
3459
|
this.optionsLocale = { 'pt-BR': ptBR, 'en-US': enAU };
|
|
3576
3460
|
this.period = null;
|
|
3577
|
-
this.width = '
|
|
3461
|
+
this.width = '268px';
|
|
3578
3462
|
this.mode = 'single';
|
|
3579
3463
|
this.dateFormat = 'yyyy-MM-dd';
|
|
3580
3464
|
this.locale = 'pt-BR';
|
|
@@ -3582,9 +3466,13 @@ const CuraCalendar = class {
|
|
|
3582
3466
|
this.disable = [];
|
|
3583
3467
|
this.enable = [];
|
|
3584
3468
|
this.defaultDate = [];
|
|
3469
|
+
this.customDates = [];
|
|
3585
3470
|
this.limitRange = null;
|
|
3586
|
-
this.disablePassDates =
|
|
3471
|
+
this.disablePassDates = undefined;
|
|
3472
|
+
this.disableFutureDates = undefined;
|
|
3587
3473
|
this.collapsed = null;
|
|
3474
|
+
this.floating = undefined;
|
|
3475
|
+
this.embedded = undefined;
|
|
3588
3476
|
this.currentDate = new Date();
|
|
3589
3477
|
this.selectedDates = [];
|
|
3590
3478
|
this.rangeStart = null;
|
|
@@ -3594,7 +3482,6 @@ const CuraCalendar = class {
|
|
|
3594
3482
|
this.styles = {};
|
|
3595
3483
|
}
|
|
3596
3484
|
connectedCallback() {
|
|
3597
|
-
this.initializeDefaultDates();
|
|
3598
3485
|
this.setFontProperties();
|
|
3599
3486
|
const colors = [
|
|
3600
3487
|
{ name: '--accent-base', theme: 'accent-base' },
|
|
@@ -3604,7 +3491,7 @@ const CuraCalendar = class {
|
|
|
3604
3491
|
{ name: '--neutral-dark', theme: 'neutral-dark' },
|
|
3605
3492
|
{ name: '--neutral-light', theme: 'neutral-light' },
|
|
3606
3493
|
];
|
|
3607
|
-
colors.forEach(color => this.styles = Object.assign(Object.assign({}, this.styles), { [color.name]: this.theme.colors.getColor(color.theme) }));
|
|
3494
|
+
colors.forEach(color => (this.styles = Object.assign(Object.assign({}, this.styles), { [color.name]: this.theme.colors.getColor(color.theme) })));
|
|
3608
3495
|
}
|
|
3609
3496
|
setFontProperties() {
|
|
3610
3497
|
this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
|
|
@@ -3621,19 +3508,19 @@ const CuraCalendar = class {
|
|
|
3621
3508
|
this.defaultDates = this.expandDateRanges(this.defaultDate);
|
|
3622
3509
|
}
|
|
3623
3510
|
/**
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3511
|
+
* Get the locale for the calendar.
|
|
3512
|
+
*
|
|
3513
|
+
* @returns {Locale} The locale object.
|
|
3514
|
+
*/
|
|
3628
3515
|
determineLocale() {
|
|
3629
3516
|
return this.optionsLocale[this.locale] || this.locale;
|
|
3630
3517
|
}
|
|
3631
3518
|
/**
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3519
|
+
* Check if a date is within the valid period.
|
|
3520
|
+
*
|
|
3521
|
+
* @param {Date} date - The date to check.
|
|
3522
|
+
* @returns {boolean} Whether the date is valid.
|
|
3523
|
+
*/
|
|
3637
3524
|
isDateInValidPeriod(date) {
|
|
3638
3525
|
if (this.period === null) {
|
|
3639
3526
|
return true;
|
|
@@ -3669,6 +3556,8 @@ const CuraCalendar = class {
|
|
|
3669
3556
|
today.setHours(0, 0, 0, 0);
|
|
3670
3557
|
if (this.disablePassDates)
|
|
3671
3558
|
return isBefore(date, today);
|
|
3559
|
+
if (this.disableFutureDates)
|
|
3560
|
+
return isAfter(date, today);
|
|
3672
3561
|
if (this.disable === null)
|
|
3673
3562
|
return false;
|
|
3674
3563
|
return this.isDateInList(this.expandDateRanges(this.disable), date);
|
|
@@ -3685,12 +3574,12 @@ const CuraCalendar = class {
|
|
|
3685
3574
|
return this.isDateInList(this.expandDateRanges(this.enable), date);
|
|
3686
3575
|
}
|
|
3687
3576
|
/**
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3577
|
+
* Checks if a date is in the provided list of dates.
|
|
3578
|
+
*
|
|
3579
|
+
* @param {Date[]} dates - The list of dates to check against.
|
|
3580
|
+
* @param {Date} date - The date to check.
|
|
3581
|
+
* @returns {boolean} Whether the date is in the list.
|
|
3582
|
+
*/
|
|
3694
3583
|
isDateInList(dates, date) {
|
|
3695
3584
|
return dates.some(d => isSameDay(d, date));
|
|
3696
3585
|
}
|
|
@@ -3771,7 +3660,7 @@ const CuraCalendar = class {
|
|
|
3771
3660
|
*/
|
|
3772
3661
|
selectMultiplesDate(date) {
|
|
3773
3662
|
if (!this.isDateSelected(date) || !this.isDateInDefaultSelection(date))
|
|
3774
|
-
return this.selectedDates = [...this.selectedDates, date];
|
|
3663
|
+
return (this.selectedDates = [...this.selectedDates, date]);
|
|
3775
3664
|
this.selectedDates = this.removeDateFromSelection(this.selectedDates, date);
|
|
3776
3665
|
this.defaultDates = this.removeDateFromSelection(this.defaultDates, date);
|
|
3777
3666
|
}
|
|
@@ -3806,16 +3695,16 @@ const CuraCalendar = class {
|
|
|
3806
3695
|
const selectionHandlers = {
|
|
3807
3696
|
single: this.selectSingleDate.bind(this),
|
|
3808
3697
|
multiple: this.selectMultiplesDate.bind(this),
|
|
3809
|
-
range: this.selectDateRange.bind(this)
|
|
3698
|
+
range: this.selectDateRange.bind(this),
|
|
3810
3699
|
};
|
|
3811
3700
|
selectionHandlers[this.mode](date);
|
|
3812
3701
|
this.onchangeday.emit({ days: [...this.defaultDates, ...this.selectedDates].filter(d => this.isDateInValidPeriod(d)) });
|
|
3813
3702
|
}
|
|
3814
3703
|
/**
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3704
|
+
* Get the days of the week.
|
|
3705
|
+
*
|
|
3706
|
+
* @returns {string[]} An array of abbreviated day names.
|
|
3707
|
+
*/
|
|
3819
3708
|
fetchWeekDays() {
|
|
3820
3709
|
const start = startOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });
|
|
3821
3710
|
const end = endOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });
|
|
@@ -3831,7 +3720,7 @@ const CuraCalendar = class {
|
|
|
3831
3720
|
this.fetchDaysOfWeek();
|
|
3832
3721
|
}
|
|
3833
3722
|
else
|
|
3834
|
-
|
|
3723
|
+
this.fetchDaysOfMonth();
|
|
3835
3724
|
this.collapsed = false;
|
|
3836
3725
|
}
|
|
3837
3726
|
showColapsedCalendar() {
|
|
@@ -3863,20 +3752,16 @@ const CuraCalendar = class {
|
|
|
3863
3752
|
const prevMonthEnd = endOfMonth(prevMonthStart);
|
|
3864
3753
|
const daysInPrevMonth = eachDayOfInterval({
|
|
3865
3754
|
start: subDays(prevMonthEnd, getDay(start)),
|
|
3866
|
-
end: prevMonthEnd
|
|
3755
|
+
end: prevMonthEnd,
|
|
3867
3756
|
});
|
|
3868
3757
|
const nextMonthStart = startOfMonth(addMonths(end, 1));
|
|
3869
3758
|
const nextMonthEnd = endOfMonth(nextMonthStart);
|
|
3870
3759
|
const remainingDays = WEEKS_IN_CALENDAR_VIEW - getDay(end);
|
|
3871
3760
|
const daysInNextMonth = eachDayOfInterval({
|
|
3872
3761
|
start: nextMonthStart,
|
|
3873
|
-
end: addDays(nextMonthEnd, remainingDays)
|
|
3762
|
+
end: addDays(nextMonthEnd, remainingDays),
|
|
3874
3763
|
});
|
|
3875
|
-
const totalDays = [
|
|
3876
|
-
...daysInPrevMonth.slice(-getDay(start)),
|
|
3877
|
-
...daysIncurrentDate,
|
|
3878
|
-
...daysInNextMonth
|
|
3879
|
-
];
|
|
3764
|
+
const totalDays = [...daysInPrevMonth.slice(-getDay(start)), ...daysIncurrentDate, ...daysInNextMonth];
|
|
3880
3765
|
return totalDays.slice(0, DAYS_IN_CALENDAR_VIEW);
|
|
3881
3766
|
}
|
|
3882
3767
|
/**
|
|
@@ -3889,7 +3774,7 @@ const CuraCalendar = class {
|
|
|
3889
3774
|
const locale = this.determineLocale();
|
|
3890
3775
|
const months = eachMonthOfInterval({
|
|
3891
3776
|
start: startOfYear(new Date(currentYear, 0, 1)),
|
|
3892
|
-
end: new Date(currentYear, 11, 31)
|
|
3777
|
+
end: new Date(currentYear, 11, 31),
|
|
3893
3778
|
}).map(month => format(month, 'MMMM', { locale }));
|
|
3894
3779
|
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
3895
3780
|
return {
|
|
@@ -3906,20 +3791,20 @@ const CuraCalendar = class {
|
|
|
3906
3791
|
return Array.from({ length: 100 }, (_, i) => currentYear - i);
|
|
3907
3792
|
}
|
|
3908
3793
|
/**
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3794
|
+
* Get the color for the previous button.
|
|
3795
|
+
*
|
|
3796
|
+
* @returns {string} The color name for the previous button.
|
|
3797
|
+
*/
|
|
3913
3798
|
determinePrevButtonColor() {
|
|
3914
3799
|
const isPrevDisabled = isBefore(new Date(getYear(this.currentDate), getMonth(this.currentDate) - 1, 1), startOfMonth(new Date()));
|
|
3915
3800
|
return isPrevDisabled && 'primary-base';
|
|
3916
3801
|
}
|
|
3917
3802
|
/**
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3803
|
+
* Get the status of a given date, determining its position and interval status.
|
|
3804
|
+
*
|
|
3805
|
+
* @param {Date | null} date - The date to evaluate.
|
|
3806
|
+
* @returns {Object} An object containing the status flags for the date.
|
|
3807
|
+
*/
|
|
3923
3808
|
getDateStatus(date) {
|
|
3924
3809
|
const [startSelected, endSelected] = [this.selectedDates[0], this.selectedDates[this.selectedDates.length - 1]];
|
|
3925
3810
|
const [startDefault, endDefault] = [this.defaultDates[0], this.defaultDates[this.defaultDates.length - 1]];
|
|
@@ -3949,7 +3834,7 @@ const CuraCalendar = class {
|
|
|
3949
3834
|
isSelected,
|
|
3950
3835
|
isRange,
|
|
3951
3836
|
isDefault,
|
|
3952
|
-
isInterval
|
|
3837
|
+
isInterval,
|
|
3953
3838
|
};
|
|
3954
3839
|
}
|
|
3955
3840
|
/**
|
|
@@ -3959,7 +3844,7 @@ const CuraCalendar = class {
|
|
|
3959
3844
|
* @returns {Object} An object containing the CSS classes for the date.
|
|
3960
3845
|
*/
|
|
3961
3846
|
getClasses(date) {
|
|
3962
|
-
const classes = {
|
|
3847
|
+
const classes = { date: true };
|
|
3963
3848
|
if (date === null)
|
|
3964
3849
|
return classes;
|
|
3965
3850
|
const dateStatus = this.getDateStatus(date);
|
|
@@ -3984,12 +3869,18 @@ const CuraCalendar = class {
|
|
|
3984
3869
|
'--width': this.width,
|
|
3985
3870
|
};
|
|
3986
3871
|
}
|
|
3872
|
+
watchDefaultDatesArray() {
|
|
3873
|
+
this.selectedDates = this.customDates;
|
|
3874
|
+
}
|
|
3987
3875
|
render() {
|
|
3988
3876
|
const { months } = this.fetchMonthNames();
|
|
3989
|
-
return (h(Host, { key: '
|
|
3990
|
-
this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
|
|
3991
|
-
this.fetchDaysOfWeek().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))), this.collapsed !== null ? (this.collapsed ? (h("div", { class:
|
|
3877
|
+
return (h(Host, { key: '3c3a06e4eee0a100a0a9e1eab8d42d839a1cb945', style: this.getHostCSSProperties() }, h("div", { key: 'b82154d8bb381b3452c90e26e2cbae69db670add', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, h("header", { key: '0c9a5ce68444d2ae931aff60efeb20c52172b2cf', class: "header" }, h("div", { key: '68e6c5e716ea1919f423950a22341721d0094d8c', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: '54f6799b4d54bed92a671dc75045c52076d3adab', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", color: this.determinePrevButtonColor(), onClick: !this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev') }), this.type === 'dropdown' ? (h("div", { class: "select" }, h("cura-select", { size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), h("cura-select", { size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (h("cura-label", { color: "neutral-black", size: "large" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), h("cura-icon", { key: '66f0f20be96bc0517fb88c284435eda3f85e5227', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), h("span", { key: '5df4ad92b85833a2284830cd69418e9c740fd0f6', class: "days-of-week" }, this.fetchWeekDays().map((day, index) => (h("cura-label", { class: "day", size: "xsmall", color: "neutral-black", weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase())))), h("div", { key: 'c94c9a2eae554149126f729953245b27a6f82a86', class: "dates" }, !this.collapsed
|
|
3878
|
+
? this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
|
|
3879
|
+
: this.fetchDaysOfWeek().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))), this.collapsed !== null ? (this.collapsed ? (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { onClick: () => this.showNotColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "plusCircle" }, "Veja mais datas"))) : (h("div", { class: "collapsed-container" }, h("cura-button-transparent", { onClick: () => this.showColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "minusCircle" }, "Veja menos datas")))) : null)));
|
|
3992
3880
|
}
|
|
3881
|
+
static get watchers() { return {
|
|
3882
|
+
"customDates": ["watchDefaultDatesArray"]
|
|
3883
|
+
}; }
|
|
3993
3884
|
};
|
|
3994
3885
|
CuraCalendar.style = CuraCalendarStyle0;
|
|
3995
3886
|
|