@rededor/cura 1.6.1-alpha.0 → 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.
Files changed (45) hide show
  1. package/dist/cjs/cura-accordion_18.cjs.entry.js +23 -4
  2. package/dist/cjs/cura-accordion_18.cjs.entry.js.map +1 -1
  3. package/dist/cjs/cura-calendar.cjs.entry.js +3 -2
  4. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/cura-calendar/cura-calendar.js +27 -2
  8. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  9. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +19 -6
  10. package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
  11. package/dist/collection/components/cura-card/cura-card.stories.js +56 -25
  12. package/dist/collection/components/cura-card/cura-card.stories.js.map +1 -1
  13. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +6 -1
  14. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  15. package/dist/collection/components/forms/cura-select/cura-select.js +17 -3
  16. package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
  17. package/dist/collection/stories/blocks/index.js +9 -0
  18. package/dist/components/cura-calendar2.js +4 -2
  19. package/dist/components/cura-calendar2.js.map +1 -1
  20. package/dist/components/cura-dropdown-search.js +6 -1
  21. package/dist/components/cura-dropdown-search.js.map +1 -1
  22. package/dist/components/cura-select2.js +17 -3
  23. package/dist/components/cura-select2.js.map +1 -1
  24. package/dist/cura/cura.esm.js +1 -1
  25. package/dist/cura/cura.esm.js.map +1 -1
  26. package/dist/cura/{p-2090e71a.entry.js → p-75f6e652.entry.js} +2 -2
  27. package/dist/cura/p-75f6e652.entry.js.map +1 -0
  28. package/dist/cura/p-e5abb2a4.entry.js +2 -0
  29. package/dist/cura/p-e5abb2a4.entry.js.map +1 -0
  30. package/dist/esm/cura-accordion_18.entry.js +23 -4
  31. package/dist/esm/cura-accordion_18.entry.js.map +1 -1
  32. package/dist/esm/cura-calendar.entry.js +3 -2
  33. package/dist/esm/cura-calendar.entry.js.map +1 -1
  34. package/dist/esm/cura.js +1 -1
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/types/components/cura-calendar/cura-calendar.d.ts +7 -0
  37. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +11 -3
  38. package/dist/types/components/cura-card/cura-card.stories.d.ts +7 -98
  39. package/dist/types/components/cura-dropdown-search/cura-dropdown-search.d.ts +1 -0
  40. package/dist/types/components/forms/cura-select/cura-select.d.ts +3 -0
  41. package/dist/types/components.d.ts +12 -0
  42. package/package.json +15 -11
  43. package/dist/cura/p-2090e71a.entry.js.map +0 -1
  44. package/dist/cura/p-5b928e46.entry.js +0 -2
  45. package/dist/cura/p-5b928e46.entry.js.map +0 -1
@@ -6266,6 +6266,7 @@ const CuraCalendar = class {
6266
6266
  this.disable = [];
6267
6267
  this.enable = [];
6268
6268
  this.defaultDate = [];
6269
+ this.showToday = true;
6269
6270
  this.customDates = [];
6270
6271
  this.limitRange = null;
6271
6272
  this.disablePassDates = undefined;
@@ -6669,7 +6670,7 @@ const CuraCalendar = class {
6669
6670
  if (date === null)
6670
6671
  return classes;
6671
6672
  const dateStatus = this.getDateStatus(date);
6672
- classes['today'] = isToday(date);
6673
+ classes['today'] = this.showToday === true ? isToday(date) : false;
6673
6674
  classes['valid'] = dateStatus.isValid;
6674
6675
  classes['invalid'] = dateStatus.isInvalid;
6675
6676
  classes['selected'] = dateStatus.isSelected;
@@ -6710,7 +6711,7 @@ const CuraCalendar = class {
6710
6711
  }
6711
6712
  render() {
6712
6713
  const { months } = this.fetchMonthNames();
6713
- return (index$1.h(index$1.Host, { key: '622035565961e1a2a1917f402e853e29ed01b1fe', style: this.getHostCSSProperties() }, index$1.h("div", { key: '7d41f8769f65218c130751e25e0a9ee7126b930c', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, index$1.h("header", { key: '796f3f0d0fa3972151803f8b37707d7f33349c41', class: "header" }, index$1.h("div", { key: 'aa1d4dc49765ccbef9181f58696eeac4eb2336b3', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, index$1.h("cura-icon", { key: '9003a5aa57d9bf0217eef70452ffac20c434e1b2', 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: '331511ce7960285c1245fcc23179cc7d4837869d', 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: '4fc77ed5e8a40b95a88a6879299e78b8dfcf3ce6', 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: '311a707add171474195d075a7694eb10197c6263', class: "dates" }, !this.collapsed
6714
+ return (index$1.h(index$1.Host, { key: 'cac68d99ac0b523a2c1978730daabd1e2798b225', style: this.getHostCSSProperties() }, index$1.h("div", { key: '92319c571e5c9f8a4de530f8e6ace5f51c758b0b', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, index$1.h("header", { key: '7cd2b1693b997765ccbd8cbee3388170778e3943', class: "header" }, index$1.h("div", { key: '0d224450782d0639228abd0aa3b7d478007edbbe', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, index$1.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' ? (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: 'b56167e8bc133577f867e9513615faf91a488da3', 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: '62bb011a97c167a2d502f00f94fc69feaecdf92b', 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: '6c59b38a1195150f68c467161639af1b15180cbc', class: "dates" }, !this.collapsed
6714
6715
  ? this.fetchDaysOfMonth().map((day, index) => (index$1.h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
6715
6716
  : 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)));
6716
6717
  }