@rededor/cura 1.6.0-alpha.0 → 1.6.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cura-accordion_18.cjs.entry.js +12 -15
- package/dist/cjs/cura-accordion_18.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js +1 -1
- package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-calendar.cjs.entry.js +12 -7
- package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-toast.cjs.entry.js +7 -1
- package/dist/cjs/cura-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js +1 -1
- package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
- package/dist/collection/components/cura-avatar/cura-avatar.js +4 -4
- package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.css +17 -16
- package/dist/collection/components/cura-calendar/cura-calendar.js +30 -7
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js +12 -0
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.js +7 -13
- package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.js.map +1 -1
- package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.js +14 -3
- package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.js.map +1 -1
- package/dist/collection/components/cura-icon/cura-icon.css +1 -0
- package/dist/collection/components/cura-toast/cura-toast.js +28 -1
- package/dist/collection/components/cura-toast/cura-toast.js.map +1 -1
- package/dist/collection/components/cura-toast/cura-toast.stories.js +7 -0
- package/dist/collection/components/cura-toast/cura-toast.stories.js.map +1 -1
- package/dist/collection/components/cura-tooltip/cura-tooltip.css +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.css +26 -26
- package/dist/components/cura-alert.js +6 -6
- package/dist/components/cura-alert.js.map +1 -1
- package/dist/components/cura-avatar.js +4 -4
- package/dist/components/cura-avatar.js.map +1 -1
- package/dist/components/cura-calendar2.js +14 -8
- package/dist/components/cura-calendar2.js.map +1 -1
- package/dist/components/cura-dropdown-search-new.js +7 -12
- package/dist/components/cura-dropdown-search-new.js.map +1 -1
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-heading2.js.map +1 -1
- package/dist/components/cura-icon2.js +1 -1
- package/dist/components/cura-icon2.js.map +1 -1
- package/dist/components/cura-toast.js +9 -2
- package/dist/components/cura-toast.js.map +1 -1
- package/dist/components/cura-tooltip.js +1 -1
- package/dist/components/cura-tooltip.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-02c2b948.entry.js +2 -0
- package/dist/cura/p-02c2b948.entry.js.map +1 -0
- package/dist/cura/p-506747fb.entry.js +2 -0
- package/dist/cura/p-506747fb.entry.js.map +1 -0
- package/dist/cura/p-823d0bb5.entry.js +2 -0
- package/dist/cura/p-823d0bb5.entry.js.map +1 -0
- package/dist/cura/{p-e98a1ad2.entry.js → p-89671cd4.entry.js} +2 -2
- package/dist/cura/{p-e98a1ad2.entry.js.map → p-89671cd4.entry.js.map} +1 -1
- package/dist/cura/{p-c0f445b5.entry.js → p-bf69b32f.entry.js} +2 -2
- package/dist/cura/p-bf69b32f.entry.js.map +1 -0
- package/dist/esm/cura-accordion_18.entry.js +12 -15
- package/dist/esm/cura-accordion_18.entry.js.map +1 -1
- package/dist/esm/cura-alert.entry.js +1 -1
- package/dist/esm/cura-alert.entry.js.map +1 -1
- package/dist/esm/cura-calendar.entry.js +12 -7
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura-toast.entry.js +7 -1
- package/dist/esm/cura-toast.entry.js.map +1 -1
- package/dist/esm/cura-tooltip.entry.js +1 -1
- package/dist/esm/cura-tooltip.entry.js.map +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cura-avatar/cura-avatar.d.ts +1 -0
- package/dist/types/components/cura-calendar/cura-calendar.d.ts +8 -7
- package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +15 -0
- package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-new.d.ts +3 -1
- package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.d.ts +12 -0
- package/dist/types/components/cura-toast/cura-toast.d.ts +4 -0
- package/dist/types/components/cura-toast/cura-toast.stories.d.ts +7 -0
- package/dist/types/components.d.ts +6 -0
- package/package.json +2 -2
- package/dist/cura/p-24d9f1f4.entry.js +0 -2
- package/dist/cura/p-24d9f1f4.entry.js.map +0 -1
- package/dist/cura/p-2afb14e9.entry.js +0 -2
- package/dist/cura/p-2afb14e9.entry.js.map +0 -1
- package/dist/cura/p-3576b633.entry.js +0 -2
- package/dist/cura/p-3576b633.entry.js.map +0 -1
- package/dist/cura/p-c0f445b5.entry.js.map +0 -1
|
@@ -54,7 +54,7 @@ const CuraAlert = class {
|
|
|
54
54
|
return this.icon ? this.icon : iconMapping[this.type];
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (index.h(index.Host, { key: 'a0b22404673b1568b9cb937150dda71ce4c99d50' }, index.h("div", { key: 'c30bf1b97d1e1ffaf334ef3bca6cdd1f081c679c', class: this.getClasses(), style: this.styles }, index.h("cura-icon", { key: '1bd88c8a19e073d7b9d967d8df38bb74063cd110', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), index.h("div", { key: '0df09a27c27c7e1743f7cfb9e71c96b102ff4484', class: "content" }, this.label ? (index.h("cura-
|
|
57
|
+
return (index.h(index.Host, { key: 'a0b22404673b1568b9cb937150dda71ce4c99d50' }, index.h("div", { key: 'c30bf1b97d1e1ffaf334ef3bca6cdd1f081c679c', class: this.getClasses(), style: this.styles }, index.h("cura-icon", { key: '1bd88c8a19e073d7b9d967d8df38bb74063cd110', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), index.h("div", { key: '0df09a27c27c7e1743f7cfb9e71c96b102ff4484', class: "content" }, this.label ? (index.h("cura-heading", { class: "title", size: "xsmall", color: "neutral-black", weight: "bold", "margin-block": "1px 0" }, this.label)) : '', index.h("cura-paragraph", { key: '00a039ac0b80bac62eb261c5cf8401b605e867a4', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, index.h("slot", { key: 'ba6989082e1f15337d5bb390b799b3dc3fda12eb' })), index.h("slot", { key: 'def5ab8aeca163432a52c9eb810f69c95d012313', name: "actions" })), this.closeable ?
|
|
58
58
|
(index.h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
|
|
59
59
|
: '')));
|
|
60
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-alert.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,8eAA8e,CAAC;AACpgB,wBAAe,YAAY;;MCKd,SAAS;;;;QAkDpB,gBAAW,GAAG;YACZ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;SACpB,CAAC;oBAlDuD,MAAM;wBAC3B,KAAK;;yBAEJ,IAAI;;sBAGvB,EAAE;;IAKpB,SAAS;QACP,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,UAAU,EAAE;YAC1D,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,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,IAAI,CAAC,SAAS;aACfA,uBAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,YAAY,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,GAAc;cAC9G,EAAE,CACA,CACD,EACP;KACH;;;;;;;;;;","names":["h","Host"],"sources":["src/components/cura-alert/cura-alert.scss?tag=cura-alert&encapsulation=shadow","src/components/cura-alert/cura-alert.tsx"],"sourcesContent":["@import \"../../scss/mixins/spacing.scss\";\n\n:host {\n display: block;\n box-sizing: border-box;\n\n .conteiner {\n display: flex;\n box-sizing: border-box;\n padding: #{$spacing-xxxs};\n gap: #{$spacing-xxxs};\n flex-shrink: 0;\n border: 1px solid var(--color-base);\n border-radius: 4px;\n background-color: var(--color-lighter);\n &.floating {\n box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);\n }\n }\n\n .content {\n flex: 1;\n flex-direction: column;\n display: flex;\n gap: #{$spacing-tiny};\n }\n\n .icon-right {\n cursor: pointer;\n }\n\n}\n","import { Component, Element, Prop, Host, h, State, Watch, Event, EventEmitter } from '@stencil/core';\n@Component({\n tag: 'cura-alert',\n styleUrl: 'cura-alert.scss',\n shadow: true,\n})\nexport class CuraAlert {\n @Element() host: HTMLElement;\n\n @Prop() type: 'info' | 'success' | 'warning' | 'error' = 'info';\n @Prop({ reflect: true }) floating = false;\n @Prop({ reflect: true }) label: string;\n @Prop({ reflect: true }) closeable = true;\n @Prop({ reflect: true }) icon: string;\n\n @State() styles = {};\n\n @Event({ eventName: 'close' }) close: EventEmitter<void>;\n\n @Watch('type')\n setColors() {\n const colors = [\n { name: '--color-lighter', theme: `${this.type}-lighter` },\n { name: '--neutral-black', theme: 'neutral-black' },\n { name: '--color-light', theme: `${this.type}-light` },\n { name: '--color-base', theme: `${this.type}-base` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme);\n });\n this.styles = {...this.styles};\n }\n\n connectedCallback() {\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.setColors();\n }\n\n getClasses() {\n const classes = {};\n classes['conteiner'] = true;\n classes['floating'] = this.floating;\n return classes;\n }\n\n getNameIcon() {\n const iconMapping = {\n info: 'infoCircle',\n success: 'checkCircle',\n warning: 'alertCircle',\n error: 'alertTriangle',\n };\n return this.icon ? this.icon : iconMapping[this.type];\n }\n\n handleClose = () => {\n this.close.emit();\n this.host.remove();\n };\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <cura-icon name={this.getNameIcon()} class=\"icon-left\" size={16} color={`${this.type}-dark`}></cura-icon>\n <div class=\"content\">\n { this.label ? (\n <cura-heading class=\"title\" size=\"xsmall\" color=\"neutral-black\" weight=\"bold\" margin-block=\"1px 0\">\n {this.label}\n </cura-heading>\n ) : ''}\n <cura-paragraph class=\"text\" color={`${this.type}-darker`} size=\"xsmall\" marginBlock=\"0\" lineHeight=\"133.33%\">\n <slot></slot>\n </cura-paragraph>\n <slot name=\"actions\"></slot>\n </div>\n { this.closeable ?\n (<cura-icon name=\"close\" size={16} color=\"error-dark\" class=\"icon-right\" onClick={this.handleClose}></cura-icon>)\n : '' }\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -3451,7 +3451,7 @@ var locale = {
|
|
|
3451
3451
|
};
|
|
3452
3452
|
const ptBR = locale;
|
|
3453
3453
|
|
|
3454
|
-
const curaCalendarCss = ":host{display:block;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);margin:0 auto}:host .calendar{display:flex;flex-direction:column;gap:5px;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);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(--
|
|
3454
|
+
const curaCalendarCss = ":host{display:block;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);margin:0 auto}:host .calendar{display:flex;flex-direction:column;gap:5px;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);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(--primary-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{color:var(--select-label) !important;background:var(--primary-base);border-radius:50%}:host .date.default-dates{color:var(--select-label) !important;background:var(--primary-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(--select-label) !important;background:var(--primary-base)}:host .date.range.interval{border-radius:0;background:var(--primary-lighter);color:var(--neutral-black) !important}:host .date.range.interval.today{border:none}:host .date.range.end{border-radius:0 50% 50% 0;color:var(--select-label) !important;background:var(--primary-base)}:host .date:hover{background:var(--primary-lighter);border-radius:50%;color:var(--neutral-white)}: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}";
|
|
3455
3455
|
const CuraCalendarStyle0 = curaCalendarCss;
|
|
3456
3456
|
|
|
3457
3457
|
const CuraCalendar = class {
|
|
@@ -3479,10 +3479,11 @@ const CuraCalendar = class {
|
|
|
3479
3479
|
this.collapsed = null;
|
|
3480
3480
|
this.floating = undefined;
|
|
3481
3481
|
this.embedded = undefined;
|
|
3482
|
-
this.
|
|
3482
|
+
this.selectLabelColorMode = 'light';
|
|
3483
3483
|
this.selectedDates = [];
|
|
3484
3484
|
this.rangeStart = null;
|
|
3485
3485
|
this.defaultDates = [];
|
|
3486
|
+
this.currentDate = new Date();
|
|
3486
3487
|
this.selectMonth = '';
|
|
3487
3488
|
this.selectYear = '';
|
|
3488
3489
|
this.styles = {};
|
|
@@ -3491,12 +3492,15 @@ const CuraCalendar = class {
|
|
|
3491
3492
|
this.setFontProperties();
|
|
3492
3493
|
this.initializeDefaultDates();
|
|
3493
3494
|
const colors = [
|
|
3494
|
-
{ name: '--
|
|
3495
|
-
{ name: '--
|
|
3495
|
+
{ name: '--primary-base', theme: 'primary-base' },
|
|
3496
|
+
{ name: '--primary-lighter', theme: 'primary-lighter' },
|
|
3497
|
+
{ name: '--primary-light', theme: 'primary-light' },
|
|
3496
3498
|
{ name: '--neutral-black', theme: 'neutral-black' },
|
|
3497
3499
|
{ name: '--primary-darker', theme: 'primary-darker' },
|
|
3498
3500
|
{ name: '--neutral-dark', theme: 'neutral-dark' },
|
|
3499
3501
|
{ name: '--neutral-light', theme: 'neutral-light' },
|
|
3502
|
+
{ name: '--neutral-white', theme: 'neutral-white' },
|
|
3503
|
+
{ name: '--select-label', theme: this.selectLabelColorMode === 'dark' ? 'neutral-black' : 'neutral-white' },
|
|
3500
3504
|
];
|
|
3501
3505
|
colors.forEach(color => (this.styles = Object.assign(Object.assign({}, this.styles), { [color.name]: this.theme.colors.getColor(color.theme) })));
|
|
3502
3506
|
}
|
|
@@ -3522,6 +3526,7 @@ const CuraCalendar = class {
|
|
|
3522
3526
|
}
|
|
3523
3527
|
}
|
|
3524
3528
|
this.defaultDates = this.expandDateRanges(this.defaultDate);
|
|
3529
|
+
this.currentDate = this.defaultDates[0] ? this.defaultDates[0] : this.currentDate;
|
|
3525
3530
|
}
|
|
3526
3531
|
/**
|
|
3527
3532
|
* Get the locale for the calendar.
|
|
@@ -3615,7 +3620,7 @@ const CuraCalendar = class {
|
|
|
3615
3620
|
* @param {string} direction - 'prev' | 'next'
|
|
3616
3621
|
*/
|
|
3617
3622
|
updateCurrentMonth(direction) {
|
|
3618
|
-
let newMonth =
|
|
3623
|
+
let newMonth = this.currentDate;
|
|
3619
3624
|
if (direction === 'prev')
|
|
3620
3625
|
newMonth = subMonths(this.currentDate, 1);
|
|
3621
3626
|
if (direction === 'next')
|
|
@@ -3753,7 +3758,7 @@ const CuraCalendar = class {
|
|
|
3753
3758
|
return daysIncurrentDate.slice(0, DAYS_IN_CALENDAR_VIEW);
|
|
3754
3759
|
}
|
|
3755
3760
|
updateCurrentWeek(direction) {
|
|
3756
|
-
let newWeek =
|
|
3761
|
+
let newWeek = this.currentDate;
|
|
3757
3762
|
if (direction === 'prev')
|
|
3758
3763
|
newWeek = subWeeks(this.currentDate, 1);
|
|
3759
3764
|
if (direction === 'next')
|
|
@@ -3906,7 +3911,7 @@ const CuraCalendar = class {
|
|
|
3906
3911
|
}
|
|
3907
3912
|
render() {
|
|
3908
3913
|
const { months } = this.fetchMonthNames();
|
|
3909
|
-
return (index$1.h(index$1.Host, { key: '
|
|
3914
|
+
return (index$1.h(index$1.Host, { key: 'a27b858fff12fe2d19898dbb0be8080a0175c465', style: this.getHostCSSProperties() }, index$1.h("div", { key: 'e2fe9991e3ef03d11b0e58b412d31020ead1b344', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, index$1.h("header", { key: '8bf8a4f703043d907d8bc81ed22061380cd67ade', class: "header" }, index$1.h("div", { key: '66c2b27693f188929065972828c2ce4a672f1e74', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, index$1.h("cura-icon", { key: '0e6841eb77061f404e23fbfc28be40600255767a', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", color: this.determinePrevButtonColor(), onClick: !this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev') }), this.type === 'dropdown' ? (index$1.h("div", { class: "select" }, index$1.h("cura-select", { size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (index$1.h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), index$1.h("cura-select", { size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (index$1.h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (index$1.h("cura-label", { color: "neutral-black", size: "large" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), index$1.h("cura-icon", { key: 'cdc62d8666dc7b890daadf63d2ffe0d0000ec545', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), index$1.h("span", { key: 'fa0d8c6ff291f343da594799b3ba366d3e020e74', class: "days-of-week" }, this.fetchWeekDays().map((day, index) => (index$1.h("cura-label", { class: "day", size: "xsmall", color: "neutral-black", weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase())))), index$1.h("div", { key: 'dc072663767251cc694d51612cacd94f1fe31a84', class: "dates" }, !this.collapsed
|
|
3910
3915
|
? this.fetchDaysOfMonth().map((day, index) => (index$1.h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
|
|
3911
3916
|
: this.fetchDaysOfWeek().map((day, index) => (index$1.h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))), this.collapsed !== null ? (this.collapsed ? (index$1.h("div", { class: "collapsed-container" }, index$1.h("cura-button-transparent", { onClick: () => this.showNotColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "plusCircle" }, "Veja mais datas"))) : (index$1.h("div", { class: "collapsed-container" }, index$1.h("cura-button-transparent", { onClick: () => this.showColapsedCalendar(), size: "small", color: "primary", fontColor: "dark", iconName: "minusCircle" }, "Veja menos datas")))) : null)));
|
|
3912
3917
|
}
|