@rededor/cura 1.0.0 → 1.1.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 +8 -7
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-calendar.cjs.entry.js +9 -4
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-dropdown-search.cjs.entry.js +5 -4
- package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
- package/dist/cjs/cura.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- 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/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-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-calendar/cura-calendar.css +13 -5
- package/dist/collection/components/cura-calendar/cura-calendar.js +61 -6
- 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/forms/cura-checkbox/cura-checkbox.css +13 -5
- package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +23 -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-select/cura-select.css +1 -0
- 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/text/cura-paragraph/cura-paragraph.css +3 -1
- package/dist/collection/stories/blocks/index.js +85 -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-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 +12 -4
- package/dist/components/cura-calendar.js.map +1 -1
- package/dist/components/cura-checkbox.js +1 -1
- package/dist/components/cura-checkbox.js.map +1 -1
- package/dist/components/cura-dropdown-search.js +6 -4
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-paragraph2.js +1 -1
- package/dist/components/cura-paragraph2.js.map +1 -1
- package/dist/components/cura-select2.js +7 -5
- package/dist/components/cura-select2.js.map +1 -1
- package/dist/components/index.js +19 -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-42dfa3a7.entry.js +2 -0
- package/dist/cura/p-42dfa3a7.entry.js.map +1 -0
- package/dist/cura/{p-599acc84.entry.js → p-5ac9d510.entry.js} +2 -2
- package/dist/cura/p-5ac9d510.entry.js.map +1 -0
- package/dist/cura/{p-b301a1ef.entry.js → p-9b658260.entry.js} +2 -2
- package/dist/cura/{p-b301a1ef.entry.js.map → p-9b658260.entry.js.map} +1 -1
- package/dist/cura/{p-4ef24fbd.entry.js → p-a9cda3b1.entry.js} +2 -2
- package/dist/cura/p-a9cda3b1.entry.js.map +1 -0
- package/dist/cura/{p-0a923806.entry.js → p-afd2c148.entry.js} +2 -2
- package/dist/cura/{p-0a923806.entry.js.map → p-afd2c148.entry.js.map} +1 -1
- package/dist/cura/p-fbf20e5a.entry.js +2 -0
- package/dist/cura/p-fbf20e5a.entry.js.map +1 -0
- 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 +8 -7
- package/dist/esm/cura-accordion_12.entry.js.map +1 -1
- package/dist/esm/cura-button-outline.entry.js +1 -1
- package/dist/esm/cura-button-outline.entry.js.map +1 -1
- package/dist/esm/cura-button-transparent.entry.js +1 -1
- package/dist/esm/cura-button-transparent.entry.js.map +1 -1
- package/dist/esm/cura-calendar.entry.js +9 -4
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura-checkbox.entry.js +1 -1
- package/dist/esm/cura-checkbox.entry.js.map +1 -1
- package/dist/esm/cura-dropdown-search.entry.js +5 -4
- package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
- package/dist/esm/cura.js +2 -2
- package/dist/esm/loader.js +2 -2
- 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/cura-calendar/cura-calendar.d.ts +3 -0
- 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 +7 -3
- package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.stories.d.ts +14 -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 +22 -0
- package/package.json +5 -3
- package/dist/cjs/app-globals-b77d5b06.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-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/esm/app-globals-488bf508.js.map +0 -1
|
@@ -8,7 +8,7 @@ export class CuraCalendar {
|
|
|
8
8
|
this.weights = this.theme.fonts.getWeights();
|
|
9
9
|
this.optionsLocale = { 'pt-BR': ptBR, 'en-US': enAU };
|
|
10
10
|
this.period = null;
|
|
11
|
-
this.width = '
|
|
11
|
+
this.width = '268px';
|
|
12
12
|
this.mode = 'single';
|
|
13
13
|
this.dateFormat = 'yyyy-MM-dd';
|
|
14
14
|
this.locale = 'pt-BR';
|
|
@@ -17,8 +17,11 @@ export class CuraCalendar {
|
|
|
17
17
|
this.enable = [];
|
|
18
18
|
this.defaultDate = [];
|
|
19
19
|
this.limitRange = null;
|
|
20
|
-
this.disablePassDates =
|
|
20
|
+
this.disablePassDates = undefined;
|
|
21
|
+
this.disableFutureDates = undefined;
|
|
21
22
|
this.collapsed = null;
|
|
23
|
+
this.floating = undefined;
|
|
24
|
+
this.embedded = undefined;
|
|
22
25
|
this.currentDate = new Date();
|
|
23
26
|
this.selectedDates = [];
|
|
24
27
|
this.rangeStart = null;
|
|
@@ -103,6 +106,8 @@ export class CuraCalendar {
|
|
|
103
106
|
today.setHours(0, 0, 0, 0);
|
|
104
107
|
if (this.disablePassDates)
|
|
105
108
|
return isBefore(date, today);
|
|
109
|
+
if (this.disableFutureDates)
|
|
110
|
+
return isAfter(date, today);
|
|
106
111
|
if (this.disable === null)
|
|
107
112
|
return false;
|
|
108
113
|
return this.isDateInList(this.expandDateRanges(this.disable), date);
|
|
@@ -420,7 +425,7 @@ export class CuraCalendar {
|
|
|
420
425
|
}
|
|
421
426
|
render() {
|
|
422
427
|
const { months } = this.fetchMonthNames();
|
|
423
|
-
return (h(Host, { key: '
|
|
428
|
+
return (h(Host, { key: 'c35f2925c454310e100ffb51291fe5dd590c67ad', style: this.getHostCSSProperties() }, h("div", { key: 'e2b10e544856cd095735b85102ea7f74daf7312f', class: `calendar ${this.floating ? "floating" : ""} ${this.embedded ? "embedded" : ""}`, style: this.styles }, h("header", { key: '68092a2f7fb49ee40ee318dba69f56a0caf2e4eb', class: "header" }, h("div", { key: '5b29701bbde12a32085818ff85cc45f5cfde8d1c', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: '48ac9b9790f493c4cc8f5ef7b4b54c1c22bd4286', 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: 'a50ea156b4d7a9e6d25393cf68a65ad72ce3679d', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), h("span", { key: '742f91e5361baba1d4d6d2859276279ad24b0c71', 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: 'eb753228943697a38d9b96de60a56c74cdfbc1c7', class: "dates" }, !this.collapsed ?
|
|
424
429
|
this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : ''))) :
|
|
425
430
|
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)));
|
|
426
431
|
}
|
|
@@ -487,7 +492,7 @@ export class CuraCalendar {
|
|
|
487
492
|
},
|
|
488
493
|
"attribute": "width",
|
|
489
494
|
"reflect": true,
|
|
490
|
-
"defaultValue": "'
|
|
495
|
+
"defaultValue": "'268px'"
|
|
491
496
|
},
|
|
492
497
|
"mode": {
|
|
493
498
|
"type": "string",
|
|
@@ -690,8 +695,24 @@ export class CuraCalendar {
|
|
|
690
695
|
"text": ""
|
|
691
696
|
},
|
|
692
697
|
"attribute": "disable-pass-dates",
|
|
693
|
-
"reflect": true
|
|
694
|
-
|
|
698
|
+
"reflect": true
|
|
699
|
+
},
|
|
700
|
+
"disableFutureDates": {
|
|
701
|
+
"type": "boolean",
|
|
702
|
+
"mutable": true,
|
|
703
|
+
"complexType": {
|
|
704
|
+
"original": "boolean",
|
|
705
|
+
"resolved": "boolean",
|
|
706
|
+
"references": {}
|
|
707
|
+
},
|
|
708
|
+
"required": false,
|
|
709
|
+
"optional": false,
|
|
710
|
+
"docs": {
|
|
711
|
+
"tags": [],
|
|
712
|
+
"text": ""
|
|
713
|
+
},
|
|
714
|
+
"attribute": "disable-future-dates",
|
|
715
|
+
"reflect": true
|
|
695
716
|
},
|
|
696
717
|
"collapsed": {
|
|
697
718
|
"type": "boolean",
|
|
@@ -710,6 +731,40 @@ export class CuraCalendar {
|
|
|
710
731
|
"attribute": "collapsed",
|
|
711
732
|
"reflect": true,
|
|
712
733
|
"defaultValue": "null"
|
|
734
|
+
},
|
|
735
|
+
"floating": {
|
|
736
|
+
"type": "boolean",
|
|
737
|
+
"mutable": true,
|
|
738
|
+
"complexType": {
|
|
739
|
+
"original": "boolean",
|
|
740
|
+
"resolved": "boolean",
|
|
741
|
+
"references": {}
|
|
742
|
+
},
|
|
743
|
+
"required": false,
|
|
744
|
+
"optional": false,
|
|
745
|
+
"docs": {
|
|
746
|
+
"tags": [],
|
|
747
|
+
"text": ""
|
|
748
|
+
},
|
|
749
|
+
"attribute": "floating",
|
|
750
|
+
"reflect": true
|
|
751
|
+
},
|
|
752
|
+
"embedded": {
|
|
753
|
+
"type": "boolean",
|
|
754
|
+
"mutable": true,
|
|
755
|
+
"complexType": {
|
|
756
|
+
"original": "boolean",
|
|
757
|
+
"resolved": "boolean",
|
|
758
|
+
"references": {}
|
|
759
|
+
},
|
|
760
|
+
"required": false,
|
|
761
|
+
"optional": false,
|
|
762
|
+
"docs": {
|
|
763
|
+
"tags": [],
|
|
764
|
+
"text": ""
|
|
765
|
+
},
|
|
766
|
+
"attribute": "embedded",
|
|
767
|
+
"reflect": true
|
|
713
768
|
}
|
|
714
769
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, State, Prop, Event, EventEmitter, Host } from '@stencil/core';\nimport {\n getMonth, getYear, startOfMonth, endOfMonth, eachDayOfInterval, format, getDay,\n isBefore, isAfter, isSameDay, isToday, parseISO, addDays, addMonths, subDays, startOfYear,\n eachMonthOfInterval, startOfWeek, endOfWeek, subMonths,\n isValid,\n subWeeks,\n addWeeks\n} from 'date-fns';\nimport enAU from 'date-fns/locale/en-AU';\nimport ptBR from 'date-fns/locale/pt-BR';\n\n@Component({\n tag: 'cura-calendar',\n styleUrl: 'cura-calendar.scss',\n shadow: true,\n})\n\nexport class CuraCalendar {\n /**\n * An array of specific dates to be highlighted or processed.\n *\n * @type {string[] | string}\n * @default []\n * @example\n * // Example usage\n * period = [\"2024-08-01\", \"2024-08-30\"];\n */\n @Prop({ reflect: true }) period: null | string[] | string = null;\n /**\n * Width of the component.\n *\n * @type {string}\n * @default '280px'\n */\n @Prop({ reflect: true }) width: string = '280px';\n /**\n * Selection mode of the date picker.\n *\n * @type {'single' | 'multiple' | 'range'}\n * @default 'single'\n */\n @Prop({ reflect: true }) mode: 'single' | 'multiple' | 'range' = 'single';\n /**\n * Date format used for display and parsing.\n *\n * @type {string}\n * @default 'yyyy-MM-dd'\n */\n @Prop({ reflect: true, mutable: true }) dateFormat: string = 'yyyy-MM-dd';\n /**\n * Locale for date formatting.\n *\n * @type {'pt-BR' | 'en-US'}\n * @default 'pt-BR'\n */\n @Prop({ reflect: true }) locale: 'pt-BR' | 'en-US' = 'pt-BR';\n\n /**\n * Display type of the date picker.\n *\n * @type {'dropdown' | 'static'}\n * @default 'dropdown'\n */\n @Prop({ reflect: true }) type: 'dropdown' | 'static' = 'dropdown';\n\n /**\n * List of dates to disable.\n *\n * @type {string[]}\n * @default []\n */\n @Prop({ reflect: true }) disable: string[] | null = [];\n /**\n * List of dates to enable.\n *\n * @type {string[]}\n * @default []\n */\n @Prop({ reflect: true }) enable: string[] | null = [];\n /**\n * Default dates selected on initialization.\n *\n * @type {string[]}\n * @default []\n */\n @Prop({ reflect: true }) defaultDate: string[] = [];\n /**\n * Limits the selectable date range.\n *\n * @type {Date | null}\n * @default null\n */\n @Prop({ reflect: true }) limitRange: number | null = null;\n\n @Prop({ reflect: true, mutable: true }) disablePassDates: boolean = false;\n\n @Prop({ reflect: true, mutable: true }) collapsed: boolean | null = null;\n\n /**\n * The current month being viewed in the date picker.\n *\n * @type {Date}\n * @default new Date()\n */\n @State() currentDate: Date = new Date();\n\n /**\n * Array of currently selected dates.\n *\n * @type {Date[]}\n * @default []\n */\n @State() selectedDates: Date[] = [];\n\n /**\n * The start date of the range selection, if applicable.\n *\n * @type {Date | null}\n * @default null\n */\n @State() rangeStart: Date | null = null;\n\n /**\n * Array of default dates that are initially selected.\n *\n * @type {Date[]}\n * @default []\n */\n @State() defaultDates: Date[] = [];\n\n /**\n * Selected months on dropdown.\n *\n * @type {string}\n * @default ''\n */\n @State() selectMonth: string = '';\n\n /**\n * Selected year on dropdown.\n *\n * @type {string}\n * @default ''\n */\n @State() selectYear: string = ''\n\n /**\n * CSS styles applied to the component.\n *\n * @type {Object}\n * @default {}\n */\n @State() styles = {};\n\n /**\n * Event emitted when a day is changed.\n *\n * @event\n * @type {EventEmitter<{ days: Date[] }>}\n */\n @Event() onchangeday: EventEmitter<{ days: Date[] }>;\n\n theme = window.CuraAPI.theme;\n weights: { [key: string]: string } = this.theme.fonts.getWeights();\n optionsLocale = { 'pt-BR': ptBR, 'en-US': enAU };\n\n connectedCallback() {\n this.initializeDefaultDates();\n this.setFontProperties()\n\n const colors = [\n { name: '--accent-base', theme: 'accent-base' },\n { name: '--accent-light', theme: 'accent-light' },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--primary-darker', theme: 'primary-darker' },\n { name: '--neutral-dark', theme: 'neutral-dark' },\n { name: '--neutral-light', theme: 'neutral-light' },\n ];\n\n colors.forEach(color => this.styles = { ...this.styles, [color.name]: this.theme.colors.getColor(color.theme) });\n }\n\n setFontProperties() {\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--font-weight-bold'] = this.weights.bold;\n this.styles['--font-weight-regular'] = this.weights.regular;\n }\n\n /**\n * Initialize the selected dates based on defaultDate and mode.\n */\n initializeDefaultDates() {\n this.defaultDates = this.expandDateRanges(this.defaultDate);\n }\n\n /**\n * Get the locale for the calendar.\n *\n * @returns {Locale} The locale object.\n */\n determineLocale() {\n return this.optionsLocale[this.locale as string] || this.locale;\n }\n\n /**\n * Check if a date is within the valid period.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is valid.\n */\n isDateInValidPeriod(date: Date | null): boolean {\n if (this.period === null) {\n return true;\n }\n return this.period.includes(format(date, this.dateFormat));\n }\n\n /**\n * Check if a date is selected.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is selected.\n */\n isDateSelected(date: Date): boolean {\n return this.isDateInList(this.selectedDates, date);\n }\n\n /**\n * Check if has date in defaultDates.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is selected.\n */\n isDateInDefaultSelection(date: Date): boolean {\n return this.isDateInList(this.defaultDates, date);\n }\n\n /**\n * Check if a date is within a disabled period.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is disabled.\n */\n isDateInDisabledPeriod(date: Date | null): boolean {\n\n const today = new Date()\n today.setHours(0, 0, 0, 0);\n if (this.disablePassDates) return isBefore(date, today)\n if (this.disable === null) return false\n return this.isDateInList(this.expandDateRanges(this.disable), date)\n }\n\n /**\n * Check if a date is within an enabled period.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is enabled.\n */\n isDateInEnabledPeriod(date: Date | null): boolean {\n if (this.enable === null || []) return true;\n return this.isDateInList(this.expandDateRanges(this.enable), date)\n }\n\n /**\n * Checks if a date is in the provided list of dates.\n *\n * @param {Date[]} dates - The list of dates to check against.\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is in the list.\n */\n isDateInList(dates: Date[], date: Date): boolean {\n return dates.some(d => isSameDay(d, date));\n }\n\n /**\n * Removes a specific date from a list of dates.\n *\n * @param {Date[]} dates - The array of dates to filter.\n * @param {Date} dateToRemove - The date to remove from the array.\n * @returns {Date[]} A new array with the specified date removed.\n */\n removeDateFromSelection(dates: Date[], dateToRemove: Date): Date[] {\n return dates.filter(d => !isSameDay(d, dateToRemove));\n }\n\n /**\n * Change the current month.\n *\n * @param {string} direction - 'prev' | 'next'\n */\n updateCurrentMonth(direction: 'prev' | 'next') {\n let newMonth = new Date(this.currentDate);\n\n if (direction === 'prev') newMonth = subMonths(this.currentDate, 1)\n if (direction === 'next') newMonth = addMonths(this.currentDate, 1)\n\n this.currentDate = newMonth;\n }\n\n /**\n * Handle the month dropdown change.\n *\n * @param {CustomEvent} event - The change event.\n */\n onMonthDropdownChange(event: CustomEvent) {\n const { months } = this.fetchMonthNames();\n const newMonth = event.detail;\n\n this.selectMonth = newMonth\n this.currentDate = new Date(getYear(this.currentDate), months.indexOf(newMonth), 1);\n }\n\n /**\n * Handle the year input change.\n *\n * @param {CustomEvent} event - The change event.\n */\n onYearDropdownChange(event: CustomEvent) {\n const newYear = event.detail;\n\n this.selectYear = newYear\n this.currentDate = new Date(newYear, getMonth(this.currentDate), 1);\n }\n\n /**\n * Flatten date ranges into individual dates.\n *\n * @param {({ from: string; to: string } | string)[]} dates - An array of date ranges or individual dates.\n * @returns {Date[]} An array of individual dates.\n */\n expandDateRanges(dates: ({ from: string; to: string } | string)[]): Date[] {\n return dates.flatMap(date => {\n if (typeof date === 'string') return isValid(parseISO(date)) ? [parseISO(date)] : [];\n\n const start = parseISO(date.from);\n const end = parseISO(date.to);\n\n if (isValid(start) && isValid(end) && start <= end) return eachDayOfInterval({ start, end });\n return [];\n });\n }\n\n /**\n * Handle single date selection.\n *\n * @param {Date} date - The date to select.\n */\n selectSingleDate(date: Date) {\n this.defaultDates = [];\n this.selectedDates = [date];\n }\n\n /**\n * Handle multiple date selection.\n *\n * @param {Date} date - The date to select or deselect.\n */\n selectMultiplesDate(date: Date) {\n if (!this.isDateSelected(date) || !this.isDateInDefaultSelection(date)) return this.selectedDates = [...this.selectedDates, date];\n\n this.selectedDates = this.removeDateFromSelection(this.selectedDates, date)\n this.defaultDates = this.removeDateFromSelection(this.defaultDates, date)\n }\n\n /**\n * Handle range date selection.\n *\n * @param {Date} date - The date to select.\n */\n selectDateRange(date: Date) {\n this.defaultDates = [];\n\n const start = isBefore(this.rangeStart, date) ? this.rangeStart : date;\n const end = isAfter(this.rangeStart, date) ? this.rangeStart : date;\n const range = eachDayOfInterval({ start, end });\n\n if (!this.rangeStart || this.selectedDates.length === 2) {\n this.rangeStart = date;\n this.selectedDates = [date];\n return;\n }\n\n if (this.limitRange === null || range.length <= this.limitRange) {\n this.selectedDates = range;\n this.rangeStart = null;\n }\n }\n\n /**\n * Handle a click on a date.\n *\n * @param {Date} date - The date that was clicked.\n */\n onDateClick(date: Date) {\n if (!this.isDateInValidPeriod(date) || this.isDateInDisabledPeriod(date) || !this.isDateInEnabledPeriod(date)) return;\n\n const selectionHandlers = {\n single: this.selectSingleDate.bind(this),\n multiple: this.selectMultiplesDate.bind(this),\n range: this.selectDateRange.bind(this)\n };\n\n selectionHandlers[this.mode](date);\n this.onchangeday.emit({ days: [...this.defaultDates, ...this.selectedDates].filter(d => this.isDateInValidPeriod(d)) });\n }\n\n /**\n * Get the days of the week.\n *\n * @returns {string[]} An array of abbreviated day names.\n */\n fetchWeekDays(): string[] {\n const start = startOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });\n const end = endOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });\n\n return eachDayOfInterval({ start, end }).map(day => format(day, 'EEEEEE', { locale: this.determineLocale() }));\n }\n\n /**\n * Get the days of the current month, including leading nulls for alignment.\n *\n * @returns {(Date | null)[]} An array of dates and nulls for the current month view.\n */\n showNotColapsedCalendar() {\n if (this.collapsed) {\n this.fetchDaysOfWeek()\n }\n else (\n this.fetchDaysOfMonth())\n this.collapsed = false\n }\n\n showColapsedCalendar() {\n this.collapsed = true\n return this.fetchDaysOfWeek()\n }\n\n fetchDaysOfWeek(): Date[] {\n\n const DAYS_IN_CALENDAR_VIEW = 7\n const start = startOfWeek(this.currentDate);\n const end = endOfWeek(this.currentDate);\n\n const daysIncurrentDate = eachDayOfInterval({ start, end });\n\n return daysIncurrentDate.slice(0, DAYS_IN_CALENDAR_VIEW);\n }\n\n updateCurrentWeek(direction: 'prev' | 'next') {\n let newWeek = new Date(this.currentDate);\n\n if (direction === 'prev') newWeek = subWeeks(this.currentDate, 1)\n if (direction === 'next') newWeek = addWeeks(this.currentDate, 1)\n\n this.currentDate = newWeek;\n }\n\n fetchDaysOfMonth(): Date[] {\n\n const WEEKS_IN_CALENDAR_VIEW = 6\n const DAYS_IN_CALENDAR_VIEW = 42\n const start = startOfMonth(this.currentDate);\n const end = endOfMonth(this.currentDate);\n\n const daysIncurrentDate = eachDayOfInterval({ start, end });\n\n const prevMonthStart = startOfMonth(addMonths(start, -1));\n const prevMonthEnd = endOfMonth(prevMonthStart);\n const daysInPrevMonth = eachDayOfInterval({\n start: subDays(prevMonthEnd, getDay(start)),\n end: prevMonthEnd\n });\n\n const nextMonthStart = startOfMonth(addMonths(end, 1));\n const nextMonthEnd = endOfMonth(nextMonthStart);\n const remainingDays = WEEKS_IN_CALENDAR_VIEW - getDay(end);\n const daysInNextMonth = eachDayOfInterval({\n start: nextMonthStart,\n end: addDays(nextMonthEnd, remainingDays)\n });\n\n const totalDays = [\n ...daysInPrevMonth.slice(-getDay(start)),\n ...daysIncurrentDate,\n ...daysInNextMonth\n ];\n\n return totalDays.slice(0, DAYS_IN_CALENDAR_VIEW);\n }\n\n /**\n * Get the names of all months in the current year.\n *\n * @returns {{ months: string[], currentMonth: string }} An object containing an array of month names and the name of the current month.\n */\n fetchMonthNames(): { months: string[] } {\n const currentYear = getYear(this.currentDate);\n const locale = this.determineLocale();\n\n const months = eachMonthOfInterval({\n start: startOfYear(new Date(currentYear, 0, 1)),\n end: new Date(currentYear, 11, 31)\n }).map(month => format(month, 'MMMM', { locale }));\n\n const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\n\n return {\n months: months.map(capitalize),\n };\n }\n\n /**\n * Get a list of years in descending order from the current year to a specified limit.\n *\n * @returns {number[]} An array of years.\n */\n fetchYearList(): number[] {\n const currentYear = getYear(new Date());\n return Array.from({ length: 100 }, (_, i) => currentYear - i);\n }\n\n /**\n * Get the color for the previous button.\n *\n * @returns {string} The color name for the previous button.\n */\n determinePrevButtonColor(): string {\n const isPrevDisabled = isBefore(new Date(getYear(this.currentDate), getMonth(this.currentDate) - 1, 1), startOfMonth(new Date()));\n return isPrevDisabled && 'primary-base';\n }\n\n /**\n * Get the status of a given date, determining its position and interval status.\n *\n * @param {Date | null} date - The date to evaluate.\n * @returns {Object} An object containing the status flags for the date.\n */\n getDateStatus(date: Date) {\n const [startSelected, endSelected] = [this.selectedDates[0], this.selectedDates[this.selectedDates.length - 1]];\n const [startDefault, endDefault] = [this.defaultDates[0], this.defaultDates[this.defaultDates.length - 1]];\n\n const hasSelectedDates = this.selectedDates.length > 1;\n const isDateInDefaultSelection = this.defaultDates.length > 1;\n\n const isStartSelected = this.isDateSelected(date) && isSameDay(date, startSelected);\n const isStartDefault = this.isDateInDefaultSelection(date) && isSameDay(date, startDefault);\n const isEndSelected = this.isDateSelected(date) && isSameDay(date, endSelected);\n const isEndDefault = this.isDateInDefaultSelection(date) && isSameDay(date, endDefault);\n\n const isStart = isStartSelected || isStartDefault;\n const isEnd = isEndSelected || isEndDefault;\n\n\n const selectedIntervals = this.expandDateRanges([{ from: startSelected?.toISOString(), to: endSelected?.toISOString() }]);\n const defaultIntervals = this.expandDateRanges([{ from: startDefault?.toISOString(), to: endDefault?.toISOString() }]);\n\n const intervalSelected = hasSelectedDates && this.isDateInList(selectedIntervals, date);\n const intervalDefault = isDateInDefaultSelection && this.isDateInList(defaultIntervals, date);\n\n const isValid = this.isDateInValidPeriod(date);\n const isInvalid = !isValid || this.isDateInDisabledPeriod(date) || !this.isDateInEnabledPeriod(date);\n const isSelected = this.isDateSelected(date);\n const isRange = this.mode === 'range' && (hasSelectedDates || isDateInDefaultSelection);\n const isDefault = this.mode !== 'range' && this.isDateInDefaultSelection(date);\n const isInterval = (intervalSelected || intervalDefault) && !isStart && !isEnd;\n\n return {\n isStart,\n isEnd,\n isValid,\n isInvalid,\n isSelected,\n isRange,\n isDefault,\n isInterval\n };\n }\n\n /**\n * Get the CSS classes for a given date based on its status.\n *\n * @param {Date | null} date - The date to evaluate.\n * @returns {Object} An object containing the CSS classes for the date.\n */\n getClasses(date: Date) {\n const classes = { 'date': true };\n if (date === null) return classes;\n\n const dateStatus = this.getDateStatus(date);\n\n classes['today'] = isToday(date);\n classes['valid'] = dateStatus.isValid;\n classes['invalid'] = dateStatus.isInvalid;\n classes['selected'] = dateStatus.isSelected;\n classes['range'] = dateStatus.isRange;\n classes['default-dates'] = dateStatus.isDefault;\n classes['start'] = dateStatus.isStart;\n classes['interval'] = dateStatus.isInterval;\n classes['end'] = dateStatus.isEnd;\n\n return classes;\n }\n\n /**\n * Get custom CSS properties for the host element.\n *\n * @returns {Object} An object containing CSS properties and their values.\n */\n getHostCSSProperties() {\n return {\n '--width': this.width,\n };\n }\n\n\n render() {\n const { months } = this.fetchMonthNames();\n\n\n\n return (\n <Host style={this.getHostCSSProperties()}>\n <div class=\"calendar\" style={this.styles}>\n <header class=\"header\">\n <div class={`month-year ${this.type === 'dropdown' && 'dropdown'}`}>\n <cura-icon\n class={`icon ${this.type === 'dropdown' && 'dropdown'}`}\n name=\"left\"\n color={this.determinePrevButtonColor()}\n onClick={!this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev')}>\n </cura-icon>\n {this.type === 'dropdown' ? (\n <div class=\"select\">\n <cura-select\n class=\"drop-month\"\n mode=\"transparent\"\n value={months[getMonth(this.currentDate)]}\n onSelected={(e) => this.onMonthDropdownChange(e)}\n >\n {months.map((month, index) => (\n <cura-select-option\n key={index}\n value={month}>\n {month}\n </cura-select-option>\n ))}\n </cura-select>\n <cura-select\n class=\"drop-year\"\n mode=\"transparent\"\n value={getYear(this.currentDate).toString()}\n onSelected={(e) => this.onYearDropdownChange(e)}\n >\n {this.fetchYearList().map((year, index) => (\n <cura-select-option\n key={index}\n value={year.toString()}>\n {year.toString()}\n </cura-select-option>\n ))}\n </cura-select>\n </div>\n ) : (\n <cura-label\n color=\"neutral-black\"\n size=\"large\">\n {months[getMonth(this.currentDate)].slice(0, 3)}, {getYear(this.currentDate)}\n </cura-label>\n )}\n <cura-icon\n class={`icon ${this.type === 'dropdown' && 'dropdown'}`}\n name=\"right\"\n color=\"primary-base\"\n onClick={!this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next')}>\n </cura-icon>\n </div>\n </header>\n\n <span class=\"days-of-week\">\n {this.fetchWeekDays().map((day, index) => (\n <cura-label\n class=\"day\"\n size=\"xsmall\"\n color=\"neutral-black\"\n weight='bold'\n key={index}>\n {day === 'sab' ? 'SÁB' : day.toLocaleUpperCase()}\n </cura-label>\n ))}\n </span>\n\n <div class=\"dates\">\n {!this.collapsed ?\n this.fetchDaysOfMonth().map((day, index) => (\n <div\n key={index}\n class={this.getClasses(day)}\n onClick={() => this.onDateClick(day)}>\n {day ? format(day, 'd') : ''}\n </div>\n )) :\n this.fetchDaysOfWeek().map((day, index) => (\n <div\n key={index}\n class={this.getClasses(day)}\n onClick={() => this.onDateClick(day)}>\n {day ? format(day, 'd') : ''}\n </div>\n ))}\n </div>\n {this.collapsed !== null ? (\n this.collapsed ? (\n <div class='collapsed-container'>\n <cura-button-transparent\n onClick={() => this.showNotColapsedCalendar()}\n size='small'\n color='primary'\n fontColor='dark'\n iconName='plusCircle'>\n Veja mais datas\n </cura-button-transparent>\n </div>\n ) : (\n <div class='collapsed-container'>\n <cura-button-transparent\n onClick={() => this.showColapsedCalendar()}\n size='small'\n color='primary'\n fontColor='dark'\n iconName='minusCircle'>\n Veja menos datas\n </cura-button-transparent>\n </div>\n )\n ) : null}\n </div >\n </Host >\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cura-calendar.js","sourceRoot":"","sources":["../../../src/components/cura-calendar/cura-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EACL,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAC9E,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EACzF,mBAAmB,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EACtD,OAAO,EACP,QAAQ,EACR,QAAQ,EACT,MAAM,UAAU,CAAC;AAClB,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,IAAI,MAAM,uBAAuB,CAAC;AAQzC,MAAM,OAAO,YAAY;;QAyJvB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAC7B,YAAO,GAA8B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACnE,kBAAa,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO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AC,CACf,WAAK,KAAK,EAAC,qBAAqB;oBAC9B,+BACE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAC7C,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,SAAS,EACf,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAC,YAAY,sBAEG,CACtB,CACP,CAAC,CAAC,CAAC,CACF,WAAK,KAAK,EAAC,qBAAqB;oBAC9B,+BACE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAC1C,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,SAAS,EACf,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAC,aAAa,uBAEE,CACtB,CACP,CACF,CAAC,CAAC,CAAC,IAAI,CACH,CACD,CACT,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, State, Prop, Event, EventEmitter, Host } from '@stencil/core';\nimport {\n getMonth, getYear, startOfMonth, endOfMonth, eachDayOfInterval, format, getDay,\n isBefore, isAfter, isSameDay, isToday, parseISO, addDays, addMonths, subDays, startOfYear,\n eachMonthOfInterval, startOfWeek, endOfWeek, subMonths,\n isValid,\n subWeeks,\n addWeeks\n} from 'date-fns';\nimport enAU from 'date-fns/locale/en-AU';\nimport ptBR from 'date-fns/locale/pt-BR';\n\n@Component({\n tag: 'cura-calendar',\n styleUrl: 'cura-calendar.scss',\n shadow: true,\n})\n\nexport class CuraCalendar {\n /**\n * An array of specific dates to be highlighted or processed.\n *\n * @type {string[] | string}\n * @default []\n * @example\n * // Example usage\n * period = [\"2024-08-01\", \"2024-08-30\"];\n */\n @Prop({ reflect: true }) period: null | string[] | string = null;\n /**\n * Width of the component.\n *\n * @type {string}\n * @default '280px'\n */\n @Prop({ reflect: true }) width: string = '268px';\n /**\n * Selection mode of the date picker.\n *\n * @type {'single' | 'multiple' | 'range'}\n * @default 'single'\n */\n @Prop({ reflect: true }) mode: 'single' | 'multiple' | 'range' = 'single';\n /**\n * Date format used for display and parsing.\n *\n * @type {string}\n * @default 'yyyy-MM-dd'\n */\n @Prop({ reflect: true, mutable: true }) dateFormat: string = 'yyyy-MM-dd';\n /**\n * Locale for date formatting.\n *\n * @type {'pt-BR' | 'en-US'}\n * @default 'pt-BR'\n */\n @Prop({ reflect: true }) locale: 'pt-BR' | 'en-US' = 'pt-BR';\n\n /**\n * Display type of the date picker.\n *\n * @type {'dropdown' | 'static'}\n * @default 'dropdown'\n */\n @Prop({ reflect: true }) type: 'dropdown' | 'static' = 'dropdown';\n\n /**\n * List of dates to disable.\n *\n * @type {string[]}\n * @default []\n */\n @Prop({ reflect: true }) disable: string[] | null = [];\n /**\n * List of dates to enable.\n *\n * @type {string[]}\n * @default []\n */\n @Prop({ reflect: true }) enable: string[] | null = [];\n /**\n * Default dates selected on initialization.\n *\n * @type {string[]}\n * @default []\n */\n @Prop({ reflect: true }) defaultDate: string[] = [];\n /**\n * Limits the selectable date range.\n *\n * @type {Date | null}\n * @default null\n */\n @Prop({ reflect: true }) limitRange: number | null = null;\n\n @Prop({ reflect: true, mutable: true }) disablePassDates: boolean;\n\n @Prop({ reflect: true, mutable: true }) disableFutureDates: boolean;\n\n @Prop({ reflect: true, mutable: true }) collapsed: boolean | null = null;\n\n @Prop({ reflect: true, mutable: true }) floating: boolean;\n\n @Prop({ reflect: true, mutable: true }) embedded: boolean;\n\n\n\n /**\n * The current month being viewed in the date picker.\n *\n * @type {Date}\n * @default new Date()\n */\n @State() currentDate: Date = new Date();\n\n /**\n * Array of currently selected dates.\n *\n * @type {Date[]}\n * @default []\n */\n @State() selectedDates: Date[] = [];\n\n /**\n * The start date of the range selection, if applicable.\n *\n * @type {Date | null}\n * @default null\n */\n @State() rangeStart: Date | null = null;\n\n /**\n * Array of default dates that are initially selected.\n *\n * @type {Date[]}\n * @default []\n */\n @State() defaultDates: Date[] = [];\n\n /**\n * Selected months on dropdown.\n *\n * @type {string}\n * @default ''\n */\n @State() selectMonth: string = '';\n\n /**\n * Selected year on dropdown.\n *\n * @type {string}\n * @default ''\n */\n @State() selectYear: string = ''\n\n /**\n * CSS styles applied to the component.\n *\n * @type {Object}\n * @default {}\n */\n @State() styles = {};\n\n /**\n * Event emitted when a day is changed.\n *\n * @event\n * @type {EventEmitter<{ days: Date[] }>}\n */\n @Event() onchangeday: EventEmitter<{ days: Date[] }>;\n\n theme = window.CuraAPI.theme;\n weights: { [key: string]: string } = this.theme.fonts.getWeights();\n optionsLocale = { 'pt-BR': ptBR, 'en-US': enAU };\n\n connectedCallback() {\n this.initializeDefaultDates();\n this.setFontProperties()\n\n const colors = [\n { name: '--accent-base', theme: 'accent-base' },\n { name: '--accent-light', theme: 'accent-light' },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--primary-darker', theme: 'primary-darker' },\n { name: '--neutral-dark', theme: 'neutral-dark' },\n { name: '--neutral-light', theme: 'neutral-light' },\n ];\n\n colors.forEach(color => this.styles = { ...this.styles, [color.name]: this.theme.colors.getColor(color.theme) });\n }\n\n setFontProperties() {\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--font-weight-bold'] = this.weights.bold;\n this.styles['--font-weight-regular'] = this.weights.regular;\n }\n\n /**\n * Initialize the selected dates based on defaultDate and mode.\n */\n initializeDefaultDates() {\n this.defaultDates = this.expandDateRanges(this.defaultDate);\n }\n\n /**\n * Get the locale for the calendar.\n *\n * @returns {Locale} The locale object.\n */\n determineLocale() {\n return this.optionsLocale[this.locale as string] || this.locale;\n }\n\n /**\n * Check if a date is within the valid period.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is valid.\n */\n isDateInValidPeriod(date: Date | null): boolean {\n if (this.period === null) {\n return true;\n }\n return this.period.includes(format(date, this.dateFormat));\n }\n\n /**\n * Check if a date is selected.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is selected.\n */\n isDateSelected(date: Date): boolean {\n return this.isDateInList(this.selectedDates, date);\n }\n\n /**\n * Check if has date in defaultDates.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is selected.\n */\n isDateInDefaultSelection(date: Date): boolean {\n return this.isDateInList(this.defaultDates, date);\n }\n\n /**\n * Check if a date is within a disabled period.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is disabled.\n */\n isDateInDisabledPeriod(date: Date | null): boolean {\n\n const today = new Date()\n today.setHours(0, 0, 0, 0);\n if (this.disablePassDates) return isBefore(date, today)\n if (this.disableFutureDates) return isAfter(date, today)\n if (this.disable === null) return false\n return this.isDateInList(this.expandDateRanges(this.disable), date)\n }\n\n /**\n * Check if a date is within an enabled period.\n *\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is enabled.\n */\n isDateInEnabledPeriod(date: Date | null): boolean {\n if (this.enable === null || []) return true;\n return this.isDateInList(this.expandDateRanges(this.enable), date)\n }\n\n /**\n * Checks if a date is in the provided list of dates.\n *\n * @param {Date[]} dates - The list of dates to check against.\n * @param {Date} date - The date to check.\n * @returns {boolean} Whether the date is in the list.\n */\n isDateInList(dates: Date[], date: Date): boolean {\n return dates.some(d => isSameDay(d, date));\n }\n\n /**\n * Removes a specific date from a list of dates.\n *\n * @param {Date[]} dates - The array of dates to filter.\n * @param {Date} dateToRemove - The date to remove from the array.\n * @returns {Date[]} A new array with the specified date removed.\n */\n removeDateFromSelection(dates: Date[], dateToRemove: Date): Date[] {\n return dates.filter(d => !isSameDay(d, dateToRemove));\n }\n\n /**\n * Change the current month.\n *\n * @param {string} direction - 'prev' | 'next'\n */\n updateCurrentMonth(direction: 'prev' | 'next') {\n let newMonth = new Date(this.currentDate);\n\n if (direction === 'prev') newMonth = subMonths(this.currentDate, 1)\n if (direction === 'next') newMonth = addMonths(this.currentDate, 1)\n\n this.currentDate = newMonth;\n }\n\n /**\n * Handle the month dropdown change.\n *\n * @param {CustomEvent} event - The change event.\n */\n onMonthDropdownChange(event: CustomEvent) {\n const { months } = this.fetchMonthNames();\n const newMonth = event.detail;\n\n this.selectMonth = newMonth\n this.currentDate = new Date(getYear(this.currentDate), months.indexOf(newMonth), 1);\n }\n\n /**\n * Handle the year input change.\n *\n * @param {CustomEvent} event - The change event.\n */\n onYearDropdownChange(event: CustomEvent) {\n const newYear = event.detail;\n\n this.selectYear = newYear\n this.currentDate = new Date(newYear, getMonth(this.currentDate), 1);\n }\n\n /**\n * Flatten date ranges into individual dates.\n *\n * @param {({ from: string; to: string } | string)[]} dates - An array of date ranges or individual dates.\n * @returns {Date[]} An array of individual dates.\n */\n expandDateRanges(dates: ({ from: string; to: string } | string)[]): Date[] {\n return dates.flatMap(date => {\n if (typeof date === 'string') return isValid(parseISO(date)) ? [parseISO(date)] : [];\n\n const start = parseISO(date.from);\n const end = parseISO(date.to);\n\n if (isValid(start) && isValid(end) && start <= end) return eachDayOfInterval({ start, end });\n return [];\n });\n }\n\n /**\n * Handle single date selection.\n *\n * @param {Date} date - The date to select.\n */\n selectSingleDate(date: Date) {\n this.defaultDates = [];\n this.selectedDates = [date];\n }\n\n /**\n * Handle multiple date selection.\n *\n * @param {Date} date - The date to select or deselect.\n */\n selectMultiplesDate(date: Date) {\n if (!this.isDateSelected(date) || !this.isDateInDefaultSelection(date)) return this.selectedDates = [...this.selectedDates, date];\n\n this.selectedDates = this.removeDateFromSelection(this.selectedDates, date)\n this.defaultDates = this.removeDateFromSelection(this.defaultDates, date)\n }\n\n /**\n * Handle range date selection.\n *\n * @param {Date} date - The date to select.\n */\n selectDateRange(date: Date) {\n this.defaultDates = [];\n\n const start = isBefore(this.rangeStart, date) ? this.rangeStart : date;\n const end = isAfter(this.rangeStart, date) ? this.rangeStart : date;\n const range = eachDayOfInterval({ start, end });\n\n if (!this.rangeStart || this.selectedDates.length === 2) {\n this.rangeStart = date;\n this.selectedDates = [date];\n return;\n }\n\n if (this.limitRange === null || range.length <= this.limitRange) {\n this.selectedDates = range;\n this.rangeStart = null;\n }\n }\n\n /**\n * Handle a click on a date.\n *\n * @param {Date} date - The date that was clicked.\n */\n onDateClick(date: Date) {\n if (!this.isDateInValidPeriod(date) || this.isDateInDisabledPeriod(date) || !this.isDateInEnabledPeriod(date)) return;\n\n const selectionHandlers = {\n single: this.selectSingleDate.bind(this),\n multiple: this.selectMultiplesDate.bind(this),\n range: this.selectDateRange.bind(this)\n };\n\n selectionHandlers[this.mode](date);\n this.onchangeday.emit({ days: [...this.defaultDates, ...this.selectedDates].filter(d => this.isDateInValidPeriod(d)) });\n }\n\n /**\n * Get the days of the week.\n *\n * @returns {string[]} An array of abbreviated day names.\n */\n fetchWeekDays(): string[] {\n const start = startOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });\n const end = endOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });\n\n return eachDayOfInterval({ start, end }).map(day => format(day, 'EEEEEE', { locale: this.determineLocale() }));\n }\n\n /**\n * Get the days of the current month, including leading nulls for alignment.\n *\n * @returns {(Date | null)[]} An array of dates and nulls for the current month view.\n */\n showNotColapsedCalendar() {\n if (this.collapsed) {\n this.fetchDaysOfWeek()\n }\n else (\n this.fetchDaysOfMonth())\n this.collapsed = false\n }\n\n showColapsedCalendar() {\n this.collapsed = true\n return this.fetchDaysOfWeek()\n }\n\n fetchDaysOfWeek(): Date[] {\n\n const DAYS_IN_CALENDAR_VIEW = 7\n const start = startOfWeek(this.currentDate);\n const end = endOfWeek(this.currentDate);\n\n const daysIncurrentDate = eachDayOfInterval({ start, end });\n\n return daysIncurrentDate.slice(0, DAYS_IN_CALENDAR_VIEW);\n }\n\n updateCurrentWeek(direction: 'prev' | 'next') {\n let newWeek = new Date(this.currentDate);\n\n if (direction === 'prev') newWeek = subWeeks(this.currentDate, 1)\n if (direction === 'next') newWeek = addWeeks(this.currentDate, 1)\n\n this.currentDate = newWeek;\n }\n\n fetchDaysOfMonth(): Date[] {\n\n const WEEKS_IN_CALENDAR_VIEW = 6\n const DAYS_IN_CALENDAR_VIEW = 42\n const start = startOfMonth(this.currentDate);\n const end = endOfMonth(this.currentDate);\n\n const daysIncurrentDate = eachDayOfInterval({ start, end });\n\n const prevMonthStart = startOfMonth(addMonths(start, -1));\n const prevMonthEnd = endOfMonth(prevMonthStart);\n const daysInPrevMonth = eachDayOfInterval({\n start: subDays(prevMonthEnd, getDay(start)),\n end: prevMonthEnd\n });\n\n const nextMonthStart = startOfMonth(addMonths(end, 1));\n const nextMonthEnd = endOfMonth(nextMonthStart);\n const remainingDays = WEEKS_IN_CALENDAR_VIEW - getDay(end);\n const daysInNextMonth = eachDayOfInterval({\n start: nextMonthStart,\n end: addDays(nextMonthEnd, remainingDays)\n });\n\n const totalDays = [\n ...daysInPrevMonth.slice(-getDay(start)),\n ...daysIncurrentDate,\n ...daysInNextMonth\n ];\n\n return totalDays.slice(0, DAYS_IN_CALENDAR_VIEW);\n }\n\n /**\n * Get the names of all months in the current year.\n *\n * @returns {{ months: string[], currentMonth: string }} An object containing an array of month names and the name of the current month.\n */\n fetchMonthNames(): { months: string[] } {\n const currentYear = getYear(this.currentDate);\n const locale = this.determineLocale();\n\n const months = eachMonthOfInterval({\n start: startOfYear(new Date(currentYear, 0, 1)),\n end: new Date(currentYear, 11, 31)\n }).map(month => format(month, 'MMMM', { locale }));\n\n const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\n\n return {\n months: months.map(capitalize),\n };\n }\n\n /**\n * Get a list of years in descending order from the current year to a specified limit.\n *\n * @returns {number[]} An array of years.\n */\n fetchYearList(): number[] {\n const currentYear = getYear(new Date());\n return Array.from({ length: 100 }, (_, i) => currentYear - i);\n }\n\n /**\n * Get the color for the previous button.\n *\n * @returns {string} The color name for the previous button.\n */\n determinePrevButtonColor(): string {\n const isPrevDisabled = isBefore(new Date(getYear(this.currentDate), getMonth(this.currentDate) - 1, 1), startOfMonth(new Date()));\n return isPrevDisabled && 'primary-base';\n }\n\n /**\n * Get the status of a given date, determining its position and interval status.\n *\n * @param {Date | null} date - The date to evaluate.\n * @returns {Object} An object containing the status flags for the date.\n */\n getDateStatus(date: Date) {\n const [startSelected, endSelected] = [this.selectedDates[0], this.selectedDates[this.selectedDates.length - 1]];\n const [startDefault, endDefault] = [this.defaultDates[0], this.defaultDates[this.defaultDates.length - 1]];\n\n const hasSelectedDates = this.selectedDates.length > 1;\n const isDateInDefaultSelection = this.defaultDates.length > 1;\n\n const isStartSelected = this.isDateSelected(date) && isSameDay(date, startSelected);\n const isStartDefault = this.isDateInDefaultSelection(date) && isSameDay(date, startDefault);\n const isEndSelected = this.isDateSelected(date) && isSameDay(date, endSelected);\n const isEndDefault = this.isDateInDefaultSelection(date) && isSameDay(date, endDefault);\n\n const isStart = isStartSelected || isStartDefault;\n const isEnd = isEndSelected || isEndDefault;\n\n\n const selectedIntervals = this.expandDateRanges([{ from: startSelected?.toISOString(), to: endSelected?.toISOString() }]);\n const defaultIntervals = this.expandDateRanges([{ from: startDefault?.toISOString(), to: endDefault?.toISOString() }]);\n\n const intervalSelected = hasSelectedDates && this.isDateInList(selectedIntervals, date);\n const intervalDefault = isDateInDefaultSelection && this.isDateInList(defaultIntervals, date);\n\n const isValid = this.isDateInValidPeriod(date);\n const isInvalid = !isValid || this.isDateInDisabledPeriod(date) || !this.isDateInEnabledPeriod(date);\n const isSelected = this.isDateSelected(date);\n const isRange = this.mode === 'range' && (hasSelectedDates || isDateInDefaultSelection);\n const isDefault = this.mode !== 'range' && this.isDateInDefaultSelection(date);\n const isInterval = (intervalSelected || intervalDefault) && !isStart && !isEnd;\n\n return {\n isStart,\n isEnd,\n isValid,\n isInvalid,\n isSelected,\n isRange,\n isDefault,\n isInterval\n };\n }\n\n /**\n * Get the CSS classes for a given date based on its status.\n *\n * @param {Date | null} date - The date to evaluate.\n * @returns {Object} An object containing the CSS classes for the date.\n */\n getClasses(date: Date) {\n const classes = { 'date': true };\n if (date === null) return classes;\n\n const dateStatus = this.getDateStatus(date);\n\n classes['today'] = isToday(date);\n classes['valid'] = dateStatus.isValid;\n classes['invalid'] = dateStatus.isInvalid;\n classes['selected'] = dateStatus.isSelected;\n classes['range'] = dateStatus.isRange;\n classes['default-dates'] = dateStatus.isDefault;\n classes['start'] = dateStatus.isStart;\n classes['interval'] = dateStatus.isInterval;\n classes['end'] = dateStatus.isEnd;\n\n return classes;\n }\n\n /**\n * Get custom CSS properties for the host element.\n *\n * @returns {Object} An object containing CSS properties and their values.\n */\n getHostCSSProperties() {\n return {\n '--width': this.width,\n };\n }\n\n\n render() {\n const { months } = this.fetchMonthNames();\n\n\n\n return (\n <Host style={this.getHostCSSProperties()}>\n <div class={`calendar ${this.floating ? \"floating\" : \"\"} ${this.embedded ? \"embedded\" : \"\"}`} style={this.styles}>\n <header class=\"header\">\n <div class={`month-year ${this.type === 'dropdown' && 'dropdown'}`}>\n <cura-icon\n class={`icon ${this.type === 'dropdown' && 'dropdown'}`}\n name=\"left\"\n color={this.determinePrevButtonColor()}\n onClick={!this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev')}>\n </cura-icon>\n {this.type === 'dropdown' ? (\n <div class=\"select\">\n <cura-select\n size='small'\n class=\"drop-month\"\n mode=\"transparent\"\n value={months[getMonth(this.currentDate)]}\n onSelected={(e) => this.onMonthDropdownChange(e)}\n >\n {months.map((month, index) => (\n <cura-select-option size='xsmall'\n key={index}\n value={month}>\n {month}\n </cura-select-option>\n ))}\n </cura-select>\n <cura-select\n size='small'\n class=\"drop-year\"\n mode=\"transparent\"\n value={getYear(this.currentDate).toString()}\n onSelected={(e) => this.onYearDropdownChange(e)}\n >\n {this.fetchYearList().map((year, index) => (\n <cura-select-option\n key={index}\n value={year.toString()}>\n {year.toString()}\n </cura-select-option>\n ))}\n </cura-select>\n </div>\n ) : (\n <cura-label\n color=\"neutral-black\"\n size=\"large\">\n {months[getMonth(this.currentDate)].slice(0, 3)}, {getYear(this.currentDate)}\n </cura-label>\n )}\n <cura-icon\n class={`icon ${this.type === 'dropdown' && 'dropdown'}`}\n name=\"right\"\n color=\"primary-base\"\n onClick={!this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next')}>\n </cura-icon>\n </div>\n </header>\n\n <span class=\"days-of-week\">\n {this.fetchWeekDays().map((day, index) => (\n <cura-label\n class=\"day\"\n size=\"xsmall\"\n color=\"neutral-black\"\n weight='bold'\n key={index}>\n {day === 'sab' ? 'SÁB' : day.toLocaleUpperCase()}\n </cura-label>\n ))}\n </span>\n\n <div class=\"dates\">\n {!this.collapsed ?\n this.fetchDaysOfMonth().map((day, index) => (\n <div\n key={index}\n class={this.getClasses(day)}\n onClick={() => this.onDateClick(day)}>\n {day ? format(day, 'd') : ''}\n </div>\n )) :\n this.fetchDaysOfWeek().map((day, index) => (\n <div\n key={index}\n class={this.getClasses(day)}\n onClick={() => this.onDateClick(day)}>\n {day ? format(day, 'd') : ''}\n </div>\n ))}\n </div>\n {this.collapsed !== null ? (\n this.collapsed ? (\n <div class='collapsed-container'>\n <cura-button-transparent\n onClick={() => this.showNotColapsedCalendar()}\n size='small'\n color='primary'\n fontColor='dark'\n iconName='plusCircle'>\n Veja mais datas\n </cura-button-transparent>\n </div>\n ) : (\n <div class='collapsed-container'>\n <cura-button-transparent\n onClick={() => this.showColapsedCalendar()}\n size='small'\n color='primary'\n fontColor='dark'\n iconName='minusCircle'>\n Veja menos datas\n </cura-button-transparent>\n </div>\n )\n ) : null}\n </div >\n </Host >\n );\n }\n}\n"]}
|
|
@@ -10,7 +10,10 @@ const renderCuraCalendar = (args) => `
|
|
|
10
10
|
${`disable="${args.disable.length > 0 ? args.disable : '[]'}"`}
|
|
11
11
|
${`defaultDate="${args.defaultDate.length > 0 ? args.defaultDate : '[]'}"`}
|
|
12
12
|
${args.disablePassDates && `disable-pass-dates="${args.disablePassDates}"`}
|
|
13
|
+
${args.disableFutureDates && `disable-future-dates="${args.disableFutureDates}"`}
|
|
13
14
|
${args.collapsed && `collapsed="${args.collapsed}"`}
|
|
15
|
+
${args.floating && `floating="${args.floating}"`}
|
|
16
|
+
${args.embedded && `embedded="${args.embedded}"`}
|
|
14
17
|
${args.limitRange !== null ? `limit-range="${args.limitRange}"` : ''}
|
|
15
18
|
></cura-calendar>
|
|
16
19
|
`;
|
|
@@ -32,10 +35,10 @@ export default {
|
|
|
32
35
|
},
|
|
33
36
|
width: {
|
|
34
37
|
control: 'text',
|
|
35
|
-
description: 'Define a largura do calendário. <b>Largura minima "
|
|
38
|
+
description: 'Define a largura do calendário. <b>Largura minima "268px"</b>.',
|
|
36
39
|
table: {
|
|
37
40
|
category: 'Properties',
|
|
38
|
-
defaultValue: { summary: '
|
|
41
|
+
defaultValue: { summary: '268px' },
|
|
39
42
|
},
|
|
40
43
|
},
|
|
41
44
|
mode: {
|
|
@@ -113,6 +116,14 @@ export default {
|
|
|
113
116
|
defaultValue: { summary: false },
|
|
114
117
|
},
|
|
115
118
|
},
|
|
119
|
+
disableFutureDates: {
|
|
120
|
+
control: 'boolean',
|
|
121
|
+
description: 'Define se as datas futuras a data atual serão consideras como desabilitadas',
|
|
122
|
+
table: {
|
|
123
|
+
category: "Properties",
|
|
124
|
+
defaultValue: { summary: false },
|
|
125
|
+
},
|
|
126
|
+
},
|
|
116
127
|
collapsed: {
|
|
117
128
|
control: 'boolean',
|
|
118
129
|
description: 'Define se a exibição do calendário será com recolhida ou expandida ',
|
|
@@ -120,6 +131,22 @@ export default {
|
|
|
120
131
|
category: "Properties",
|
|
121
132
|
defaultValue: { summary: null },
|
|
122
133
|
},
|
|
134
|
+
},
|
|
135
|
+
floating: {
|
|
136
|
+
control: 'boolean',
|
|
137
|
+
description: 'Define se o componente é flutuante e aplica o sombreamento.',
|
|
138
|
+
table: {
|
|
139
|
+
category: "Properties",
|
|
140
|
+
defaultValue: { summary: true },
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
embedded: {
|
|
144
|
+
control: 'boolean',
|
|
145
|
+
description: 'Define se o componente tenha borda, padding e sombra (box) ou não.',
|
|
146
|
+
table: {
|
|
147
|
+
category: "Properties",
|
|
148
|
+
defaultValue: { summary: true },
|
|
149
|
+
},
|
|
123
150
|
}
|
|
124
151
|
},
|
|
125
152
|
};
|
|
@@ -140,7 +167,10 @@ export const Calendar = {
|
|
|
140
167
|
disable: [],
|
|
141
168
|
limitRange: null,
|
|
142
169
|
disablePassDates: false,
|
|
143
|
-
|
|
170
|
+
disableFutureDates: false,
|
|
171
|
+
collapsed: null,
|
|
172
|
+
floating: true,
|
|
173
|
+
embedded: true
|
|
144
174
|
},
|
|
145
175
|
};
|
|
146
176
|
//# sourceMappingURL=cura-calendar.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-calendar.stories.js","sourceRoot":"","sources":["../../../src/components/cura-calendar/cura-calendar.stories.tsx"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;;QAE7B,IAAI,CAAC,MAAM,IAAI,WAAW,IAAI,CAAC,MAAM,GAAG;QACxC,IAAI,CAAC,KAAK,IAAI,UAAU,IAAI,CAAC,KAAK,GAAG;QACrC,IAAI,CAAC,IAAI,IAAI,SAAS,IAAI,CAAC,IAAI,GAAG;QAClC,IAAI,CA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AAI;KACf;CACF,CAAC","sourcesContent":["const renderCuraCalendar = (args) => `\n <cura-calendar\n ${args.period && `period=\"${args.period}\"`}\n ${args.width && `width=\"${args.width}\"`}\n ${args.mode && `mode=\"${args.mode}\"`}\n ${args.type && `type=\"${args.type}\"`}\n ${args.dateFormat && `date-format=\"${args.dateFormat}\"`}\n ${args.locale && `locale=\"${args.locale}\"`}\n ${`enable=\"${args.enable.length > 0 ? args.enable : '[]'}\"`}\n ${`disable=\"${args.disable.length > 0 ? args.disable : '[]'}\"`}\n ${`defaultDate=\"${args.defaultDate.length > 0 ? args.defaultDate : '[]'}\"`}\n ${args.disablePassDates && `disable-pass-dates=\"${args.disablePassDates}\"`}\n ${args.disableFutureDates && `disable-future-dates=\"${args.disableFutureDates}\"`}\n ${args.collapsed && `collapsed=\"${args.collapsed}\"`}\n ${args.floating && `floating=\"${args.floating}\"`}\n ${args.embedded && `embedded=\"${args.embedded}\"`}\n ${args.limitRange !== null ? `limit-range=\"${args.limitRange}\"` : ''}\n ></cura-calendar>\n`;\n\nexport default {\n title: 'Componentes/Calendar/Calendar',\n tags: ['autodocs'],\n parameters: {\n layout: 'centered',\n },\n render: (args) => renderCuraCalendar(args),\n argTypes: {\n period: {\n control: 'array',\n description: 'Define os períodos disponíveis para o calendário. Quando não informado, considera todas as datas como habilitadas',\n table: {\n category: 'Properties',\n defaultValue: { summary: null },\n },\n },\n width: {\n control: 'text',\n description: 'Define a largura do calendário. <b>Largura minima \"268px\"</b>.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '268px' },\n },\n },\n mode: {\n control: 'inline-radio',\n options: ['single', 'multiple', 'range'],\n description: 'Define o modo de seleção de datas.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: 'single' },\n },\n },\n type: {\n control: 'inline-radio',\n options: ['static', 'dropdown'],\n description: 'Define o tipo de visualização (mês/ano) do calendário.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: 'static' },\n },\n },\n dateFormat: {\n control: 'text',\n description: 'Define o formato das datas exibidas.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: 'yyyy-MM-dd' },\n },\n },\n locale: {\n control: 'inline-radio',\n options: ['pt-BR', 'en-US'],\n description: 'Define o idioma/localização do calendário.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: 'pt-BR' },\n },\n },\n defaultDate: {\n control: 'array',\n description: 'Define as datas que serão pré-selecionadas no calendário.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: '[]' },\n },\n },\n enable: {\n control: 'array',\n description: 'Define as datas que são habilitadas para seleção.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: '[]' },\n },\n },\n disable: {\n control: 'array',\n description: 'Define as datas que são desabilitadas para seleção.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: '[]' },\n },\n },\n limitRange: {\n control: 'number',\n description: 'Define o limite de datas selecionáveis no modo de seleção range.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: 'null' },\n },\n },\n disablePassDates: {\n control: 'boolean',\n description: 'Define se as datas anteriores a data atual serão consideras como desabilitadas',\n table: {\n category: \"Properties\",\n defaultValue: { summary: false },\n },\n },\n disableFutureDates: {\n control: 'boolean',\n description: 'Define se as datas futuras a data atual serão consideras como desabilitadas',\n table: {\n category: \"Properties\",\n defaultValue: { summary: false },\n },\n },\n collapsed: {\n control: 'boolean',\n description: 'Define se a exibição do calendário será com recolhida ou expandida ',\n table: {\n category: \"Properties\",\n defaultValue: { summary: null },\n },\n },\n floating: {\n control: 'boolean',\n description: 'Define se o componente é flutuante e aplica o sombreamento.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: true },\n },\n },\n embedded: {\n control: 'boolean',\n description: 'Define se o componente tenha borda, padding e sombra (box) ou não.',\n table: {\n category: \"Properties\",\n defaultValue: { summary: true },\n },\n }\n },\n};\n\nexport const Calendar = {\n args: {\n period: [\n \"2024-08-01\", \"2024-08-30\", \"2024-08-02\", \"2024-08-03\", \"2024-08-04\",\n \"2024-08-29\", \"2024-08-15\", \"2024-08-02\", \"2024-08-30\", \"2024-09-01\",\n \"2024-09-29\", \"2024-10-15\", \"2024-09-02\", \"2024-09-30\", \"2024-10-01\"\n ],\n width: '280px',\n mode: 'single',\n type: 'static',\n locale: 'pt-BR',\n dateFormat: 'yyyy-MM-dd',\n defaultDate: [],\n enable: [],\n disable: [],\n limitRange: null,\n disablePassDates: false,\n disableFutureDates: false,\n collapsed: null,\n floating: true,\n embedded: true\n },\n};\n"]}
|
|
@@ -100,15 +100,23 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/* Estado Checked */
|
|
103
|
-
.checked .checkbox
|
|
104
|
-
.indeterminate .checkbox {
|
|
103
|
+
.checked .checkbox {
|
|
105
104
|
border-color: var(--color-dark);
|
|
106
105
|
background: var(--color-base);
|
|
107
106
|
}
|
|
108
|
-
.checked .checkbox:hover
|
|
107
|
+
.checked .checkbox:hover {
|
|
108
|
+
border-color: var(--color-base) !important;
|
|
109
|
+
background: var(--color-light);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Estado Indeterminate */
|
|
113
|
+
.indeterminate .checkbox {
|
|
114
|
+
border-color: var(--color-base);
|
|
115
|
+
background: var(--color-light);
|
|
116
|
+
}
|
|
109
117
|
.indeterminate .checkbox:hover {
|
|
110
|
-
border-color: var(--color-
|
|
111
|
-
background: var(--color-
|
|
118
|
+
border-color: var(--color-dark) !important;
|
|
119
|
+
background: var(--color-base);
|
|
112
120
|
}
|
|
113
121
|
|
|
114
122
|
.checked .icon,
|
|
@@ -41,6 +41,7 @@ export class CuraDropdownSearch {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
+
this.size = 'large';
|
|
44
45
|
this.status = 'default';
|
|
45
46
|
this.disabled = false;
|
|
46
47
|
this.name = undefined;
|
|
@@ -183,14 +184,14 @@ export class CuraDropdownSearch {
|
|
|
183
184
|
return {
|
|
184
185
|
'dropdown-input-search': true,
|
|
185
186
|
'dropdown-open': this.isDropdownOpen,
|
|
186
|
-
disabled: this.disabled,
|
|
187
|
+
'disabled': this.disabled,
|
|
187
188
|
[this.status]: true,
|
|
188
189
|
};
|
|
189
190
|
}
|
|
190
191
|
getDropdownClasses() {
|
|
191
192
|
return {
|
|
192
193
|
'dropdown-search-list': true,
|
|
193
|
-
'visible': this.options.length && this.isDropdownOpen ? true : false
|
|
194
|
+
'visible': this.options.length && this.isDropdownOpen ? true : false,
|
|
194
195
|
};
|
|
195
196
|
}
|
|
196
197
|
hostCSSProperties() {
|
|
@@ -200,9 +201,9 @@ export class CuraDropdownSearch {
|
|
|
200
201
|
}
|
|
201
202
|
render() {
|
|
202
203
|
const isMobileDropdown = this.isMobile && this.isDropdownOpen;
|
|
203
|
-
return (h(Host, { key: '
|
|
204
|
+
return (h(Host, { key: 'd0b8f3d5a755ad1898c046b9138f1e67ffaa7551', style: this.hostCSSProperties(), class: "dropdown-overlay" }, h("div", { key: '6f39302526074fbeb79258900300e9b0fae32a81', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, h("div", { key: 'acc77ef22319099260652c7f3863c360d5f29438', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (h("cura-button-transparent", { key: '2b69691925b17800a5a9ad212106700c79446d70', fontColor: "dark", onClick: () => (this.isMobile = false), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), h("cura-input-text", { key: 'd13ea595a08ad01dc4f3c551d28d036b73068d5a', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: isMobileDropdown ? 'transparent' : 'default', required: this.required, hideErrorIcon: this.status === 'error', iconName: this.iconName || 'search', value: this.value, status: this.status, onValueChange: e => this.onValueChange(e.target.value), onInput: e => this.handleInputChange(e), onFocus: () => (this.isDropdownOpen = true), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
|
|
204
205
|
this.handleOnBlur();
|
|
205
|
-
}, placeholder: this.placeholder, size:
|
|
206
|
+
}, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, h("slot", { key: '2a24a3c4e0909eb46e710f894e2a281f024496a4', name: "helperText" }))), h("div", { key: 'af42a387f10bb455a812d89878dd65b15858a7ff', id: "dropdown-search-list", class: this.getDropdownClasses() }, h("slot", { key: '1d574b5166aad988bfd713abda3f6befebf44335', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
|
|
206
207
|
}
|
|
207
208
|
static get is() { return "cura-dropdown-search"; }
|
|
208
209
|
static get encapsulation() { return "shadow"; }
|
|
@@ -218,6 +219,24 @@ export class CuraDropdownSearch {
|
|
|
218
219
|
}
|
|
219
220
|
static get properties() {
|
|
220
221
|
return {
|
|
222
|
+
"size": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"mutable": true,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "'small' | 'medium' | 'large'",
|
|
227
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Size of the dropdown search mode default: 'small', 'medium', or 'large' (default: 'large')"
|
|
235
|
+
},
|
|
236
|
+
"attribute": "size",
|
|
237
|
+
"reflect": true,
|
|
238
|
+
"defaultValue": "'large'"
|
|
239
|
+
},
|
|
221
240
|
"status": {
|
|
222
241
|
"type": "string",
|
|
223
242
|
"mutable": false,
|