@rededor/cura 1.6.1-alpha.1 → 1.6.1-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-calendar.cjs.entry.js +3 -2
- package/dist/cjs/cura-calendar.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-calendar/cura-calendar.js +27 -2
- package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js +19 -6
- package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
- package/dist/components/cura-calendar2.js +4 -2
- package/dist/components/cura-calendar2.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-2090e71a.entry.js → p-75f6e652.entry.js} +2 -2
- package/dist/cura/p-75f6e652.entry.js.map +1 -0
- package/dist/esm/cura-calendar.entry.js +3 -2
- package/dist/esm/cura-calendar.entry.js.map +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cura-calendar/cura-calendar.d.ts +7 -0
- package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +11 -3
- package/dist/types/components.d.ts +12 -0
- package/package.json +2 -2
- package/dist/cura/p-2090e71a.entry.js.map +0 -1
|
@@ -6262,6 +6262,7 @@ const CuraCalendar = class {
|
|
|
6262
6262
|
this.disable = [];
|
|
6263
6263
|
this.enable = [];
|
|
6264
6264
|
this.defaultDate = [];
|
|
6265
|
+
this.showToday = true;
|
|
6265
6266
|
this.customDates = [];
|
|
6266
6267
|
this.limitRange = null;
|
|
6267
6268
|
this.disablePassDates = undefined;
|
|
@@ -6665,7 +6666,7 @@ const CuraCalendar = class {
|
|
|
6665
6666
|
if (date === null)
|
|
6666
6667
|
return classes;
|
|
6667
6668
|
const dateStatus = this.getDateStatus(date);
|
|
6668
|
-
classes['today'] = isToday(date);
|
|
6669
|
+
classes['today'] = this.showToday === true ? isToday(date) : false;
|
|
6669
6670
|
classes['valid'] = dateStatus.isValid;
|
|
6670
6671
|
classes['invalid'] = dateStatus.isInvalid;
|
|
6671
6672
|
classes['selected'] = dateStatus.isSelected;
|
|
@@ -6706,7 +6707,7 @@ const CuraCalendar = class {
|
|
|
6706
6707
|
}
|
|
6707
6708
|
render() {
|
|
6708
6709
|
const { months } = this.fetchMonthNames();
|
|
6709
|
-
return (h(Host, { key: '
|
|
6710
|
+
return (h(Host, { key: 'cac68d99ac0b523a2c1978730daabd1e2798b225', style: this.getHostCSSProperties() }, h("div", { key: '92319c571e5c9f8a4de530f8e6ace5f51c758b0b', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, h("header", { key: '7cd2b1693b997765ccbd8cbee3388170778e3943', class: "header" }, h("div", { key: '0d224450782d0639228abd0aa3b7d478007edbbe', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: 'fe71c4cdb1abcab9f6c0bed3958181fe72171009', 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: 'b56167e8bc133577f867e9513615faf91a488da3', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), h("span", { key: '62bb011a97c167a2d502f00f94fc69feaecdf92b', 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: '6c59b38a1195150f68c467161639af1b15180cbc', class: "dates" }, !this.collapsed
|
|
6710
6711
|
? this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
|
|
6711
6712
|
: 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)));
|
|
6712
6713
|
}
|