@rededor/cura 1.1.0 → 1.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/assets/assets/cura-assets.zip +0 -0
  2. package/dist/cjs/app-globals-4d07f363.js.map +1 -1
  3. package/dist/cjs/cura-accordion_12.cjs.entry.js +21 -15
  4. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura-alert.cjs.entry.js +2 -2
  6. package/dist/cjs/cura-avatar.cjs.entry.js +2 -2
  7. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  8. package/dist/cjs/cura-badge-number.cjs.entry.js +29 -0
  9. package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -0
  10. package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
  11. package/dist/cjs/cura-button-select.cjs.entry.js +69 -58
  12. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  13. package/dist/cjs/cura-button-transparent.cjs.entry.js +2 -2
  14. package/dist/cjs/cura-calendar.cjs.entry.js +120 -234
  15. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/cura-card.cjs.entry.js +2 -2
  17. package/dist/cjs/cura-checkbox.cjs.entry.js +2 -2
  18. package/dist/cjs/cura-display.cjs.entry.js +2 -2
  19. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +2 -2
  20. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +3 -3
  21. package/dist/cjs/cura-dropdown-search.cjs.entry.js +30 -4
  22. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  23. package/dist/cjs/cura-icons-view.cjs.entry.js +4 -4
  24. package/dist/cjs/cura-input-date.cjs.entry.js +188 -0
  25. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -0
  26. package/dist/cjs/cura-loader-bar.cjs.entry.js +2 -2
  27. package/dist/cjs/cura-radio.cjs.entry.js +2 -2
  28. package/dist/cjs/cura-switch.cjs.entry.js +2 -2
  29. package/dist/cjs/cura-toast.cjs.entry.js +2 -2
  30. package/dist/cjs/cura.cjs.js +2 -2
  31. package/dist/cjs/index-6dc29195.js +126 -0
  32. package/dist/cjs/index-6dc29195.js.map +1 -0
  33. package/dist/cjs/{index-98e7ba54.js → index-e6d728ec.js} +70 -3
  34. package/dist/{esm/index-1ad98520.js.map → cjs/index-e6d728ec.js.map} +1 -1
  35. package/dist/cjs/loader.cjs.js +2 -2
  36. package/dist/collection/collection-manifest.json +2 -0
  37. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +30 -0
  38. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +66 -0
  39. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -0
  40. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js +56 -0
  41. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +1 -0
  42. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  43. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  44. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +49 -21
  45. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +110 -113
  46. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  47. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +133 -0
  48. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -0
  49. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  50. package/dist/collection/components/cura-alert/cura-alert.js +1 -1
  51. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  52. package/dist/collection/components/cura-calendar/cura-calendar.css +2 -0
  53. package/dist/collection/components/cura-calendar/cura-calendar.js +79 -47
  54. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  55. package/dist/collection/components/cura-card/cura-card.js +1 -1
  56. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  57. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  58. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  59. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  60. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  61. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  62. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  63. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +1 -1
  64. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +28 -2
  65. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  66. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +79 -0
  67. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +424 -0
  68. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -0
  69. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +138 -0
  70. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -0
  71. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +5 -2
  72. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +41 -2
  73. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  74. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +73 -21
  75. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -1
  76. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +3 -0
  77. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -1
  78. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  79. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  80. package/dist/collection/components/forms/cura-select/cura-select.css +5 -2
  81. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  82. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  83. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  84. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  85. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  86. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  87. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  88. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  89. package/dist/components/cura-alert.js +1 -1
  90. package/dist/components/cura-avatar.js +1 -1
  91. package/dist/components/cura-badge-number.d.ts +11 -0
  92. package/dist/components/cura-badge-number.js +8 -0
  93. package/dist/components/cura-badge-number.js.map +1 -0
  94. package/dist/components/cura-badge-number2.js +49 -0
  95. package/dist/components/cura-badge-number2.js.map +1 -0
  96. package/dist/components/cura-button-outline.js +1 -1
  97. package/dist/components/cura-button-select.js +81 -65
  98. package/dist/components/cura-button-select.js.map +1 -1
  99. package/dist/components/cura-button-transparent2.js +1 -1
  100. package/dist/components/cura-button.js +1 -1
  101. package/dist/components/cura-calendar.js +1 -4073
  102. package/dist/components/cura-calendar.js.map +1 -1
  103. package/dist/components/cura-calendar2.js +4082 -0
  104. package/dist/components/cura-calendar2.js.map +1 -0
  105. package/dist/components/cura-card.js +1 -1
  106. package/dist/components/cura-checkbox.js +1 -1
  107. package/dist/components/cura-display.js +1 -1
  108. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  109. package/dist/components/cura-dropdown-search-option.js +2 -2
  110. package/dist/components/cura-dropdown-search.js +29 -3
  111. package/dist/components/cura-dropdown-search.js.map +1 -1
  112. package/dist/components/cura-heading2.js +1 -1
  113. package/dist/components/cura-icon2.js +1 -1
  114. package/dist/components/cura-icons-view.js +3 -3
  115. package/dist/components/cura-input-date.d.ts +11 -0
  116. package/dist/components/cura-input-date.js +270 -0
  117. package/dist/components/cura-input-date.js.map +1 -0
  118. package/dist/components/cura-input-text2.js +10 -2
  119. package/dist/components/cura-input-text2.js.map +1 -1
  120. package/dist/components/cura-label2.js +1 -1
  121. package/dist/components/cura-loader-bar2.js +1 -1
  122. package/dist/components/cura-loader-circle2.js +1 -1
  123. package/dist/components/cura-page-template.js +1 -1
  124. package/dist/components/cura-paragraph2.js +1 -1
  125. package/dist/components/cura-radio.js +1 -1
  126. package/dist/components/cura-select-option2.js +1 -1
  127. package/dist/components/cura-select2.js +4 -4
  128. package/dist/components/cura-select2.js.map +1 -1
  129. package/dist/components/cura-switch.js +1 -1
  130. package/dist/components/cura-toast.js +1 -1
  131. package/dist/components/index.js +4 -0
  132. package/dist/components/index.js.map +1 -1
  133. package/dist/cura/cura.esm.js +1 -1
  134. package/dist/cura/cura.esm.js.map +1 -1
  135. package/dist/cura/p-0b7a7306.js.map +1 -1
  136. package/dist/cura/{p-0d435e42.entry.js → p-116a1cd6.entry.js} +2 -2
  137. package/dist/cura/p-272c784a.js +2 -0
  138. package/dist/cura/p-272c784a.js.map +1 -0
  139. package/dist/cura/{p-4c7a2419.entry.js → p-2d267d23.entry.js} +2 -2
  140. package/dist/cura/{p-9b658260.entry.js → p-33772510.entry.js} +2 -2
  141. package/dist/cura/{p-afd2c148.entry.js → p-41c3d47d.entry.js} +2 -2
  142. package/dist/cura/{p-fbf20e5a.entry.js → p-44e3325a.entry.js} +2 -2
  143. package/dist/cura/p-4e14c01c.entry.js +2 -0
  144. package/dist/cura/p-563ba0cd.entry.js +2 -0
  145. package/dist/cura/p-563ba0cd.entry.js.map +1 -0
  146. package/dist/cura/{p-57b8b468.entry.js → p-8f3db0fe.entry.js} +2 -2
  147. package/dist/cura/{p-a00d2c68.entry.js → p-907b3d12.entry.js} +2 -2
  148. package/dist/cura/p-a2ae6bd2.entry.js +2 -0
  149. package/dist/cura/p-a2ae6bd2.entry.js.map +1 -0
  150. package/dist/cura/{p-6682619b.entry.js → p-b2d5db22.entry.js} +2 -2
  151. package/dist/cura/p-b43b69f3.entry.js +2 -0
  152. package/dist/cura/p-b43b69f3.entry.js.map +1 -0
  153. package/dist/cura/{p-5ac9d510.entry.js → p-be10b681.entry.js} +2 -2
  154. package/dist/cura/p-be10b681.entry.js.map +1 -0
  155. package/dist/cura/{p-a5cf0fd6.entry.js → p-c6508bd7.entry.js} +2 -2
  156. package/dist/cura/{p-2203e829.entry.js → p-dcd2e5bb.entry.js} +2 -2
  157. package/dist/cura/{p-84d8c67d.entry.js → p-e5023e34.entry.js} +2 -2
  158. package/dist/cura/p-e8bc6381.entry.js +2 -0
  159. package/dist/cura/p-e8bc6381.entry.js.map +1 -0
  160. package/dist/cura/p-ed97cf3c.entry.js +2 -0
  161. package/dist/cura/p-ed97cf3c.entry.js.map +1 -0
  162. package/dist/cura/{p-ad8a7e0f.entry.js → p-fcbf4311.entry.js} +2 -2
  163. package/dist/cura/{p-66c5cf5f.entry.js → p-fd083399.entry.js} +2 -2
  164. package/dist/cura/p-fd5ed6b0.js +3 -0
  165. package/dist/cura/p-fd5ed6b0.js.map +1 -0
  166. package/dist/cura/{p-f9433d24.entry.js → p-fdce91a7.entry.js} +2 -2
  167. package/dist/esm/app-globals-6ca7103d.js.map +1 -1
  168. package/dist/esm/cura-accordion_12.entry.js +21 -15
  169. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  170. package/dist/esm/cura-alert.entry.js +2 -2
  171. package/dist/esm/cura-avatar.entry.js +2 -2
  172. package/dist/esm/cura-badge-distance.entry.js +1 -1
  173. package/dist/esm/cura-badge-number.entry.js +25 -0
  174. package/dist/esm/cura-badge-number.entry.js.map +1 -0
  175. package/dist/esm/cura-button-outline.entry.js +2 -2
  176. package/dist/esm/cura-button-select.entry.js +69 -58
  177. package/dist/esm/cura-button-select.entry.js.map +1 -1
  178. package/dist/esm/cura-button-transparent.entry.js +2 -2
  179. package/dist/esm/cura-calendar.entry.js +51 -165
  180. package/dist/esm/cura-calendar.entry.js.map +1 -1
  181. package/dist/esm/cura-card.entry.js +2 -2
  182. package/dist/esm/cura-checkbox.entry.js +2 -2
  183. package/dist/esm/cura-display.entry.js +2 -2
  184. package/dist/esm/cura-dropdown-search-option-title.entry.js +2 -2
  185. package/dist/esm/cura-dropdown-search-option.entry.js +3 -3
  186. package/dist/esm/cura-dropdown-search.entry.js +30 -4
  187. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  188. package/dist/esm/cura-icons-view.entry.js +4 -4
  189. package/dist/esm/cura-input-date.entry.js +184 -0
  190. package/dist/esm/cura-input-date.entry.js.map +1 -0
  191. package/dist/esm/cura-loader-bar.entry.js +2 -2
  192. package/dist/esm/cura-radio.entry.js +2 -2
  193. package/dist/esm/cura-switch.entry.js +2 -2
  194. package/dist/esm/cura-toast.entry.js +2 -2
  195. package/dist/esm/cura.js +3 -3
  196. package/dist/esm/{index-1ad98520.js → index-747aad85.js} +70 -3
  197. package/dist/esm/index-747aad85.js.map +1 -0
  198. package/dist/esm/index-fbee309a.js +120 -0
  199. package/dist/esm/index-fbee309a.js.map +1 -0
  200. package/dist/esm/loader.js +3 -3
  201. package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +8 -0
  202. package/dist/types/components/badges/cura-badge-number/cura-badge-number.stories.d.ts +39 -0
  203. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +12 -34
  204. package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +105 -0
  205. package/dist/types/components/cura-calendar/cura-calendar.d.ts +50 -42
  206. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +2 -0
  207. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +92 -0
  208. package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +125 -0
  209. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +6 -0
  210. package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +15 -0
  211. package/dist/types/components.d.ts +158 -48
  212. package/package.json +2 -2
  213. package/dist/cjs/index-98e7ba54.js.map +0 -1
  214. package/dist/cura/p-312791fb.js +0 -3
  215. package/dist/cura/p-312791fb.js.map +0 -1
  216. package/dist/cura/p-42dfa3a7.entry.js +0 -2
  217. package/dist/cura/p-42dfa3a7.entry.js.map +0 -1
  218. package/dist/cura/p-5ac9d510.entry.js.map +0 -1
  219. package/dist/cura/p-a9cda3b1.entry.js +0 -2
  220. package/dist/cura/p-a9cda3b1.entry.js.map +0 -1
  221. package/dist/cura/p-df5c3a86.entry.js +0 -2
  222. package/dist/cura/p-df5c3a86.entry.js.map +0 -1
  223. package/dist/cura/p-dfc65f66.entry.js +0 -2
  224. /package/dist/cura/{p-0d435e42.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
  225. /package/dist/cura/{p-4c7a2419.entry.js.map → p-2d267d23.entry.js.map} +0 -0
  226. /package/dist/cura/{p-9b658260.entry.js.map → p-33772510.entry.js.map} +0 -0
  227. /package/dist/cura/{p-afd2c148.entry.js.map → p-41c3d47d.entry.js.map} +0 -0
  228. /package/dist/cura/{p-fbf20e5a.entry.js.map → p-44e3325a.entry.js.map} +0 -0
  229. /package/dist/cura/{p-dfc65f66.entry.js.map → p-4e14c01c.entry.js.map} +0 -0
  230. /package/dist/cura/{p-57b8b468.entry.js.map → p-8f3db0fe.entry.js.map} +0 -0
  231. /package/dist/cura/{p-a00d2c68.entry.js.map → p-907b3d12.entry.js.map} +0 -0
  232. /package/dist/cura/{p-6682619b.entry.js.map → p-b2d5db22.entry.js.map} +0 -0
  233. /package/dist/cura/{p-a5cf0fd6.entry.js.map → p-c6508bd7.entry.js.map} +0 -0
  234. /package/dist/cura/{p-2203e829.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
  235. /package/dist/cura/{p-84d8c67d.entry.js.map → p-e5023e34.entry.js.map} +0 -0
  236. /package/dist/cura/{p-ad8a7e0f.entry.js.map → p-fcbf4311.entry.js.map} +0 -0
  237. /package/dist/cura/{p-66c5cf5f.entry.js.map → p-fd083399.entry.js.map} +0 -0
  238. /package/dist/cura/{p-f9433d24.entry.js.map → p-fdce91a7.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { getMonth, getYear, startOfMonth, endOfMonth, eachDayOfInterval, format, getDay, isBefore, isAfter, isSameDay, isToday, parseISO, addDays, addMonths, subDays, startOfYear, eachMonthOfInterval, startOfWeek, endOfWeek, subMonths, isValid, subWeeks, addWeeks } from "date-fns";
2
+ import { getMonth, getYear, startOfMonth, endOfMonth, eachDayOfInterval, format, getDay, isBefore, isAfter, isSameDay, isToday, parseISO, addDays, addMonths, subDays, startOfYear, eachMonthOfInterval, startOfWeek, endOfWeek, subMonths, isValid, subWeeks, addWeeks, } from "date-fns";
3
3
  import enAU from "date-fns/locale/en-AU";
4
4
  import ptBR from "date-fns/locale/pt-BR";
5
5
  export class CuraCalendar {
@@ -16,6 +16,7 @@ export class CuraCalendar {
16
16
  this.disable = [];
17
17
  this.enable = [];
18
18
  this.defaultDate = [];
19
+ this.customDates = [];
19
20
  this.limitRange = null;
20
21
  this.disablePassDates = undefined;
21
22
  this.disableFutureDates = undefined;
@@ -31,7 +32,6 @@ export class CuraCalendar {
31
32
  this.styles = {};
32
33
  }
33
34
  connectedCallback() {
34
- this.initializeDefaultDates();
35
35
  this.setFontProperties();
36
36
  const colors = [
37
37
  { name: '--accent-base', theme: 'accent-base' },
@@ -41,7 +41,7 @@ export class CuraCalendar {
41
41
  { name: '--neutral-dark', theme: 'neutral-dark' },
42
42
  { name: '--neutral-light', theme: 'neutral-light' },
43
43
  ];
44
- colors.forEach(color => this.styles = Object.assign(Object.assign({}, this.styles), { [color.name]: this.theme.colors.getColor(color.theme) }));
44
+ colors.forEach(color => (this.styles = Object.assign(Object.assign({}, this.styles), { [color.name]: this.theme.colors.getColor(color.theme) })));
45
45
  }
46
46
  setFontProperties() {
47
47
  this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
@@ -58,19 +58,19 @@ export class CuraCalendar {
58
58
  this.defaultDates = this.expandDateRanges(this.defaultDate);
59
59
  }
60
60
  /**
61
- * Get the locale for the calendar.
62
- *
63
- * @returns {Locale} The locale object.
64
- */
61
+ * Get the locale for the calendar.
62
+ *
63
+ * @returns {Locale} The locale object.
64
+ */
65
65
  determineLocale() {
66
66
  return this.optionsLocale[this.locale] || this.locale;
67
67
  }
68
68
  /**
69
- * Check if a date is within the valid period.
70
- *
71
- * @param {Date} date - The date to check.
72
- * @returns {boolean} Whether the date is valid.
73
- */
69
+ * Check if a date is within the valid period.
70
+ *
71
+ * @param {Date} date - The date to check.
72
+ * @returns {boolean} Whether the date is valid.
73
+ */
74
74
  isDateInValidPeriod(date) {
75
75
  if (this.period === null) {
76
76
  return true;
@@ -124,12 +124,12 @@ export class CuraCalendar {
124
124
  return this.isDateInList(this.expandDateRanges(this.enable), date);
125
125
  }
126
126
  /**
127
- * Checks if a date is in the provided list of dates.
128
- *
129
- * @param {Date[]} dates - The list of dates to check against.
130
- * @param {Date} date - The date to check.
131
- * @returns {boolean} Whether the date is in the list.
132
- */
127
+ * Checks if a date is in the provided list of dates.
128
+ *
129
+ * @param {Date[]} dates - The list of dates to check against.
130
+ * @param {Date} date - The date to check.
131
+ * @returns {boolean} Whether the date is in the list.
132
+ */
133
133
  isDateInList(dates, date) {
134
134
  return dates.some(d => isSameDay(d, date));
135
135
  }
@@ -210,7 +210,7 @@ export class CuraCalendar {
210
210
  */
211
211
  selectMultiplesDate(date) {
212
212
  if (!this.isDateSelected(date) || !this.isDateInDefaultSelection(date))
213
- return this.selectedDates = [...this.selectedDates, date];
213
+ return (this.selectedDates = [...this.selectedDates, date]);
214
214
  this.selectedDates = this.removeDateFromSelection(this.selectedDates, date);
215
215
  this.defaultDates = this.removeDateFromSelection(this.defaultDates, date);
216
216
  }
@@ -245,16 +245,16 @@ export class CuraCalendar {
245
245
  const selectionHandlers = {
246
246
  single: this.selectSingleDate.bind(this),
247
247
  multiple: this.selectMultiplesDate.bind(this),
248
- range: this.selectDateRange.bind(this)
248
+ range: this.selectDateRange.bind(this),
249
249
  };
250
250
  selectionHandlers[this.mode](date);
251
251
  this.onchangeday.emit({ days: [...this.defaultDates, ...this.selectedDates].filter(d => this.isDateInValidPeriod(d)) });
252
252
  }
253
253
  /**
254
- * Get the days of the week.
255
- *
256
- * @returns {string[]} An array of abbreviated day names.
257
- */
254
+ * Get the days of the week.
255
+ *
256
+ * @returns {string[]} An array of abbreviated day names.
257
+ */
258
258
  fetchWeekDays() {
259
259
  const start = startOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });
260
260
  const end = endOfWeek(new Date(2021, 0, 3), { locale: this.determineLocale() });
@@ -270,7 +270,7 @@ export class CuraCalendar {
270
270
  this.fetchDaysOfWeek();
271
271
  }
272
272
  else
273
- (this.fetchDaysOfMonth());
273
+ this.fetchDaysOfMonth();
274
274
  this.collapsed = false;
275
275
  }
276
276
  showColapsedCalendar() {
@@ -302,20 +302,16 @@ export class CuraCalendar {
302
302
  const prevMonthEnd = endOfMonth(prevMonthStart);
303
303
  const daysInPrevMonth = eachDayOfInterval({
304
304
  start: subDays(prevMonthEnd, getDay(start)),
305
- end: prevMonthEnd
305
+ end: prevMonthEnd,
306
306
  });
307
307
  const nextMonthStart = startOfMonth(addMonths(end, 1));
308
308
  const nextMonthEnd = endOfMonth(nextMonthStart);
309
309
  const remainingDays = WEEKS_IN_CALENDAR_VIEW - getDay(end);
310
310
  const daysInNextMonth = eachDayOfInterval({
311
311
  start: nextMonthStart,
312
- end: addDays(nextMonthEnd, remainingDays)
312
+ end: addDays(nextMonthEnd, remainingDays),
313
313
  });
314
- const totalDays = [
315
- ...daysInPrevMonth.slice(-getDay(start)),
316
- ...daysIncurrentDate,
317
- ...daysInNextMonth
318
- ];
314
+ const totalDays = [...daysInPrevMonth.slice(-getDay(start)), ...daysIncurrentDate, ...daysInNextMonth];
319
315
  return totalDays.slice(0, DAYS_IN_CALENDAR_VIEW);
320
316
  }
321
317
  /**
@@ -328,7 +324,7 @@ export class CuraCalendar {
328
324
  const locale = this.determineLocale();
329
325
  const months = eachMonthOfInterval({
330
326
  start: startOfYear(new Date(currentYear, 0, 1)),
331
- end: new Date(currentYear, 11, 31)
327
+ end: new Date(currentYear, 11, 31),
332
328
  }).map(month => format(month, 'MMMM', { locale }));
333
329
  const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
334
330
  return {
@@ -345,20 +341,20 @@ export class CuraCalendar {
345
341
  return Array.from({ length: 100 }, (_, i) => currentYear - i);
346
342
  }
347
343
  /**
348
- * Get the color for the previous button.
349
- *
350
- * @returns {string} The color name for the previous button.
351
- */
344
+ * Get the color for the previous button.
345
+ *
346
+ * @returns {string} The color name for the previous button.
347
+ */
352
348
  determinePrevButtonColor() {
353
349
  const isPrevDisabled = isBefore(new Date(getYear(this.currentDate), getMonth(this.currentDate) - 1, 1), startOfMonth(new Date()));
354
350
  return isPrevDisabled && 'primary-base';
355
351
  }
356
352
  /**
357
- * Get the status of a given date, determining its position and interval status.
358
- *
359
- * @param {Date | null} date - The date to evaluate.
360
- * @returns {Object} An object containing the status flags for the date.
361
- */
353
+ * Get the status of a given date, determining its position and interval status.
354
+ *
355
+ * @param {Date | null} date - The date to evaluate.
356
+ * @returns {Object} An object containing the status flags for the date.
357
+ */
362
358
  getDateStatus(date) {
363
359
  const [startSelected, endSelected] = [this.selectedDates[0], this.selectedDates[this.selectedDates.length - 1]];
364
360
  const [startDefault, endDefault] = [this.defaultDates[0], this.defaultDates[this.defaultDates.length - 1]];
@@ -388,7 +384,7 @@ export class CuraCalendar {
388
384
  isSelected,
389
385
  isRange,
390
386
  isDefault,
391
- isInterval
387
+ isInterval,
392
388
  };
393
389
  }
394
390
  /**
@@ -398,7 +394,7 @@ export class CuraCalendar {
398
394
  * @returns {Object} An object containing the CSS classes for the date.
399
395
  */
400
396
  getClasses(date) {
401
- const classes = { 'date': true };
397
+ const classes = { date: true };
402
398
  if (date === null)
403
399
  return classes;
404
400
  const dateStatus = this.getDateStatus(date);
@@ -423,11 +419,14 @@ export class CuraCalendar {
423
419
  '--width': this.width,
424
420
  };
425
421
  }
422
+ watchDefaultDatesArray() {
423
+ this.selectedDates = this.customDates;
424
+ }
426
425
  render() {
427
426
  const { months } = this.fetchMonthNames();
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 ?
429
- this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : ''))) :
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)));
427
+ return (h(Host, { key: '3c3a06e4eee0a100a0a9e1eab8d42d839a1cb945', style: this.getHostCSSProperties() }, h("div", { key: 'b82154d8bb381b3452c90e26e2cbae69db670add', class: `calendar ${this.floating ? 'floating' : ''} ${this.embedded ? 'embedded' : ''}`, style: this.styles }, h("header", { key: '0c9a5ce68444d2ae931aff60efeb20c52172b2cf', class: "header" }, h("div", { key: '68e6c5e716ea1919f423950a22341721d0094d8c', class: `month-year ${this.type === 'dropdown' && 'dropdown'}` }, h("cura-icon", { key: '54f6799b4d54bed92a671dc75045c52076d3adab', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "left", color: this.determinePrevButtonColor(), onClick: !this.collapsed ? () => this.updateCurrentMonth('prev') : () => this.updateCurrentWeek('prev') }), this.type === 'dropdown' ? (h("div", { class: "select" }, h("cura-select", { size: "small", class: "drop-month", mode: "transparent", value: months[getMonth(this.currentDate)], onSelected: e => this.onMonthDropdownChange(e) }, months.map((month, index) => (h("cura-select-option", { size: "xsmall", key: index, value: month }, month)))), h("cura-select", { size: "small", class: "drop-year", mode: "transparent", value: getYear(this.currentDate).toString(), onSelected: e => this.onYearDropdownChange(e) }, this.fetchYearList().map((year, index) => (h("cura-select-option", { key: index, value: year.toString() }, year.toString())))))) : (h("cura-label", { color: "neutral-black", size: "large" }, months[getMonth(this.currentDate)].slice(0, 3), ", ", getYear(this.currentDate))), h("cura-icon", { key: '66f0f20be96bc0517fb88c284435eda3f85e5227', class: `icon ${this.type === 'dropdown' && 'dropdown'}`, name: "right", color: "primary-base", onClick: !this.collapsed ? () => this.updateCurrentMonth('next') : () => this.updateCurrentWeek('next') }))), h("span", { key: '5df4ad92b85833a2284830cd69418e9c740fd0f6', class: "days-of-week" }, this.fetchWeekDays().map((day, index) => (h("cura-label", { class: "day", size: "xsmall", color: "neutral-black", weight: "bold", key: index }, day === 'sab' ? 'SÁB' : day.toLocaleUpperCase())))), h("div", { key: 'c94c9a2eae554149126f729953245b27a6f82a86', class: "dates" }, !this.collapsed
428
+ ? this.fetchDaysOfMonth().map((day, index) => (h("div", { key: index, class: this.getClasses(day), onClick: () => this.onDateClick(day) }, day ? format(day, 'd') : '')))
429
+ : 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)));
431
430
  }
432
431
  static get is() { return "cura-calendar"; }
433
432
  static get encapsulation() { return "shadow"; }
@@ -656,6 +655,33 @@ export class CuraCalendar {
656
655
  },
657
656
  "defaultValue": "[]"
658
657
  },
658
+ "customDates": {
659
+ "type": "unknown",
660
+ "mutable": false,
661
+ "complexType": {
662
+ "original": "Date[]",
663
+ "resolved": "Date[]",
664
+ "references": {
665
+ "Date": {
666
+ "location": "global",
667
+ "id": "global::Date"
668
+ }
669
+ }
670
+ },
671
+ "required": false,
672
+ "optional": false,
673
+ "docs": {
674
+ "tags": [{
675
+ "name": "type",
676
+ "text": "{Date[]}"
677
+ }, {
678
+ "name": "default",
679
+ "text": "[]"
680
+ }],
681
+ "text": "Array of dates chosen by the user, can be updated dynamically."
682
+ },
683
+ "defaultValue": "[]"
684
+ },
659
685
  "limitRange": {
660
686
  "type": "number",
661
687
  "mutable": false,
@@ -808,5 +834,11 @@ export class CuraCalendar {
808
834
  }
809
835
  }];
810
836
  }
837
+ static get watchers() {
838
+ return [{
839
+ "propName": "customDates",
840
+ "methodName": "watchDefaultDatesArray"
841
+ }];
842
+ }
811
843
  }
812
844
  //# sourceMappingURL=cura-calendar.js.map
@@ -1 +1 @@
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,OA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GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CACxB,CACP,CAAC,CACA;gBACL,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,CACzB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,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"]}
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,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,MAAM,UAAU,CAAC;AAClB,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,IAAI,MAAM,uBAAuB,CAAC;AAOzC,MAAM,OAAO,YAAY;;QAgKvB,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,EAAE,IAAI,EAAE,CAAC;sBAxJW,IAAI;qBAOvB,OAAO;oBAOiB,QAAQ;0BAOZ,YAAY;sBAOpB,OAAO;oBAQL,UAAU;uBAQb,EAAE;sBAOH,EAAE;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,GAAG,EAAE,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAC,MAAM,EAAC,QAAQ,EAAC,YAAY,sBAEjH,CACtB,CACP,CAAC,CAAC,CAAC,CACF,WAAK,KAAK,EAAC,qBAAqB;oBAC9B,+BAAyB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,SAAS,EAAC,MAAM,EAAC,QAAQ,EAAC,aAAa,uBAE/G,CACtB,CACP,CACF,CAAC,CAAC,CAAC,IAAI,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, State, Prop, Event, EventEmitter, Host, Watch } from '@stencil/core';\nimport {\n getMonth,\n getYear,\n startOfMonth,\n endOfMonth,\n eachDayOfInterval,\n format,\n getDay,\n isBefore,\n isAfter,\n isSameDay,\n isToday,\n parseISO,\n addDays,\n addMonths,\n subDays,\n startOfYear,\n eachMonthOfInterval,\n startOfWeek,\n endOfWeek,\n 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})\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 /**\n * Array of dates chosen by the user, can be updated dynamically.\n *\n * @type {Date[]}\n * @default []\n */\n @Prop({ reflect: true }) customDates: Date[] = [];\n\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 * 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.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 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 } else this.fetchDaysOfMonth();\n this.collapsed = false;\n }\n\n showColapsedCalendar() {\n this.collapsed = true;\n return this.fetchDaysOfWeek();\n }\n\n fetchDaysOfWeek(): Date[] {\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 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 = [...daysInPrevMonth.slice(-getDay(start)), ...daysIncurrentDate, ...daysInNextMonth];\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 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 @Watch('customDates')\n watchDefaultDatesArray() {\n this.selectedDates = this.customDates;\n }\n\n render() {\n const { months } = this.fetchMonthNames();\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 size=\"small\" class=\"drop-month\" mode=\"transparent\" value={months[getMonth(this.currentDate)]} onSelected={e => this.onMonthDropdownChange(e)}>\n {months.map((month, index) => (\n <cura-select-option size=\"xsmall\" key={index} value={month}>\n {month}\n </cura-select-option>\n ))}\n </cura-select>\n <cura-select size=\"small\" class=\"drop-year\" mode=\"transparent\" value={getYear(this.currentDate).toString()} onSelected={e => this.onYearDropdownChange(e)}>\n {this.fetchYearList().map((year, index) => (\n <cura-select-option key={index} value={year.toString()}>\n {year.toString()}\n </cura-select-option>\n ))}\n </cura-select>\n </div>\n ) : (\n <cura-label color=\"neutral-black\" 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 class=\"day\" size=\"xsmall\" color=\"neutral-black\" weight=\"bold\" 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 key={index} class={this.getClasses(day)} onClick={() => this.onDateClick(day)}>\n {day ? format(day, 'd') : ''}\n </div>\n ))\n : this.fetchDaysOfWeek().map((day, index) => (\n <div key={index} class={this.getClasses(day)} 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 onClick={() => this.showNotColapsedCalendar()} size=\"small\" color=\"primary\" fontColor=\"dark\" iconName=\"plusCircle\">\n Veja mais datas\n </cura-button-transparent>\n </div>\n ) : (\n <div class=\"collapsed-container\">\n <cura-button-transparent onClick={() => this.showColapsedCalendar()} size=\"small\" color=\"primary\" fontColor=\"dark\" iconName=\"minusCircle\">\n Veja menos datas\n </cura-button-transparent>\n </div>\n )\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -34,7 +34,7 @@ export class CuraCard {
34
34
  return classes;
35
35
  }
36
36
  render() {
37
- return (h(Host, { key: '24318e0e70d7a9cb1cbdfa3503b2fa5bce791c00', role: this.href ? 'link' : 'div' }, this.href ? (h("a", { class: this.getClasses(), target: this.target, style: this.styles, href: this.href }, h("slot", null))) : (h("div", { class: this.getClasses(), style: this.styles }, h("slot", null)))));
37
+ return (h(Host, { key: 'db1a13cfe3bb925300e65641e1d45fade5a03f52', role: this.href ? 'link' : 'div' }, this.href ? (h("a", { class: this.getClasses(), target: this.target, style: this.styles, href: this.href }, h("slot", null))) : (h("div", { class: this.getClasses(), style: this.styles }, h("slot", null)))));
38
38
  }
39
39
  static get is() { return "cura-card"; }
40
40
  static get encapsulation() { return "shadow"; }
@@ -31,7 +31,7 @@ export class CuraIcon {
31
31
  this.host.style.setProperty(prop, value);
32
32
  }
33
33
  render() {
34
- return (h(Host, { key: '42f2502c1180315fde13c1c383ba2335e681f25b' }, h("svg", { key: 'b30e76338033abd6be556049e1db9d949173adc2', version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, h("use", { key: '45df96f126cc573ce5189332a04c4e9a6db02b36', xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
34
+ return (h(Host, { key: '8955586152a043a308ad539516973dba36bd145d' }, h("svg", { key: 'f383174620a5dcaa33d3d969a6cd57e814b96140', version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, h("use", { key: '1f0550ed5a7826c7f7ef36ed34f45b3da4f4e80d', xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
35
35
  }
36
36
  static get is() { return "cura-icon"; }
37
37
  static get encapsulation() { return "shadow"; }
@@ -14,9 +14,9 @@ export class CuraIconsView {
14
14
  this.sizes.unshift(this.sizes.pop());
15
15
  }
16
16
  render() {
17
- return (h(Host, { key: 'a6617c95d8f812380ad9a6471b2d3308f230d985' }, h("div", { key: 'fd3d146d453f37b1e1f8968113271bd59c870821', class: "iconDetail" }, h("cura-heading", { key: '6f8ba0f48fe6a3fd7d237bf8606f0e789bb9a24e', size: "small", "margin-block": "0 24px" }, "Icon: ", h("b", { key: '9a90cfdc2df40488ece88e4af4ddf7af4c8b7413' }, this.selected)), h("div", { key: '0b0978997491adc4bf5c9629c3ca93302d352a57', class: "iconSizes" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
18
- h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { key: '0d8666083a28088fbb036920c0130770fadb9fe8', class: "iconSizes invert" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
19
- h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), h("span", null, size))))), h("div", { key: 'fcc2275ca60d1c36dbcc5a7a5b10e1a35d2445e2', class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: { icon: true, selected: icon === this.selected }, onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon, size: "32", color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }), h("cura-label", { size: "xsmall", weight: icon === this.selected ? 'bold' : 'regular', color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }, icon), !microIcons.includes(icon) ? '' :
17
+ return (h(Host, { key: '578795eda26d68314425907d7d4b0716eae31677' }, h("div", { key: '1cabf7e4ad314bbcb93d86c4ad22e5d8d69e2f81', class: "iconDetail" }, h("cura-heading", { key: '154ada215d4a13b674870c7b3ac85cb2b2c96873', size: "small", "margin-block": "0 24px" }, "Icon: ", h("b", { key: '84b323f4f81831142ccb51109a2bcbbe8748c8e9' }, this.selected)), h("div", { key: '71ee5a42938cc43014e4b306460ab03ed03a8d2d', class: "iconSizes" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
18
+ h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { key: 'f0ce668720e9897ea8abcd4c105fed555d0537dc', class: "iconSizes invert" }, this.sizes.map(size => size === 'micro' && !microIcons.includes(this.selected) ? '' :
19
+ h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), h("span", null, size))))), h("div", { key: '2c2a0f8f18eff3da6b4379e9549683f4daf2755d', class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: { icon: true, selected: icon === this.selected }, onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon, size: "32", color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }), h("cura-label", { size: "xsmall", weight: icon === this.selected ? 'bold' : 'regular', color: icon === this.selected ? 'accent-dark' : 'neutral-dark' }, icon), !microIcons.includes(icon) ? '' :
20
20
  h("cura-paragraph", { color: 'success-dark', size: "xsmall", "margin-block": "0px", "line-height": '100%' }, "MICRO"))))));
21
21
  }
22
22
  static get is() { return "cura-icons-view"; }
@@ -14,7 +14,7 @@ export class CuraPageTemplate {
14
14
  return classes;
15
15
  }
16
16
  render() {
17
- return (h(Host, { key: '11b8c556d3608f5fdb0f80fa5c0c9a71fa51e506' }, h("div", { key: '41c0a6cb17747a0bf8fb44f8e5766412dd261b4d', style: this.styles, class: "grid-template" }, h("div", { key: 'f563c6dbcd7506bfc100df9d5e4d7afe28cc7172', id: "sub-header" }, h("slot", { key: '2db35bb65c395d6af3ec1654fdbe2fa76735d60d', name: 'sub-header' })), h("div", { key: 'dff85fecdcf50c6812dd7eda1d2547b868da36a4', id: "header" }, h("slot", { key: 'dd1726210432a383868ae4ab716ee20259a7a744', name: 'header' })), h("div", { key: '3d8ebad203977884ea3b0c97cffd764e7c87ff8b', id: "pre-content" }, h("slot", { key: '15e9cd099c005d78afc31624d968142d657cd53e', name: 'pre-content' })), h("div", { key: '682ac5ec6855a6e598a1c27dae336787f38d5143', id: "content-container", class: this.getClasses() }, h("div", { key: 'a288d9994489df25bffac158026df89e688064a9', id: "sidebar-left" }, h("slot", { key: '26546baebf11e32f18ddec1659453e85cb5f8542', name: 'sidebar-left' })), h("div", { key: 'f998d555d298800c770919c6195b2d963000c07f', id: "content" }, h("slot", { key: 'e15084b2c7a2092331e92d5a0e389a37e07905d0', name: "content" }), h("slot", { key: '31a9c32a7309a34882ee8c7e5fe5f8893083a1ba' })), h("div", { key: '661aa62b89dd76d5d40008690fa56d53234e048d', id: "sidebar-right" }, h("slot", { key: 'f0b96d33a41818840a38ca162fd32fba8b3f70bb', name: 'sidebar-right' }))), h("div", { key: 'bdb1b6793f62315d80ab3843224a56e9586f5cc4', id: "post-body" }, h("slot", { key: 'c373462fbd8d8ecebccb1515304be38b68f1fc87', name: 'post-body' })), h("div", { key: '097ae8d7ccb045ebcc60f2829b43a2ba8e87fc2b', id: "footer" }, h("slot", { key: '1d519a8e1e5094bbf5c2a3309c4e84122468ab3e', name: 'footer' })), h("div", { key: '62e5ab1d7c9a4be5e4b4f9ab0803b298ee9fe125', id: "sub-footer" }, h("slot", { key: '59a0637bbc2dad5a2bfef04e78858a95f59231d1', name: 'sub-footer' })))));
17
+ return (h(Host, { key: 'ab4b10fe60c2d8cac394e1d4ab9e9415901e5e80' }, h("div", { key: 'bb1136f5c7dff53c8de05a1e4c2a0a16416f1c6e', style: this.styles, class: "grid-template" }, h("div", { key: 'eab90c228293eb3213380d8f2d74231dce0a3723', id: "sub-header" }, h("slot", { key: '5857d627c6038ada32dacd9840fd51f002245215', name: 'sub-header' })), h("div", { key: '9ebdd52e3f31f24b5a45c855539ee5c68f16b099', id: "header" }, h("slot", { key: 'ea50789c8628109a2d599f2a8a94dc3ac54f8b43', name: 'header' })), h("div", { key: 'c37250f3054ba97f31f6b6cff428ffbdf96869e9', id: "pre-content" }, h("slot", { key: 'e2c81d9af2c587356b26eaff85dec7318ddf52e2', name: 'pre-content' })), h("div", { key: 'ddd4aa8338ce668e42511b38d6b5ee8012f01c5b', id: "content-container", class: this.getClasses() }, h("div", { key: '31ebabdf53749aec5b526308b063f3c2c0d4821b', id: "sidebar-left" }, h("slot", { key: '01a4ce493250b17e7bef8c173bc66a10217f2f53', name: 'sidebar-left' })), h("div", { key: 'bde5a719d07f67230a56192ecc412721ff4d36bb', id: "content" }, h("slot", { key: '3cf647a29db3e59ccc7827f3ec01d55fa0a90109', name: "content" }), h("slot", { key: '8f8d9b784f5d65bbedace6378f7df09cc659968a' })), h("div", { key: '1dd69a2f8d28faa4a204d024b5884bd4ec37bf42', id: "sidebar-right" }, h("slot", { key: '4052cf77ae1be773f58a0b9c6bf39960591e1aa8', name: 'sidebar-right' }))), h("div", { key: '76188d32df6addc6f41018ba2bcb869b0811eaf2', id: "post-body" }, h("slot", { key: 'a9aa2d75a63a204ff2e24f525e9a4cbbacbb2dfa', name: 'post-body' })), h("div", { key: 'bd12d4cc7c2cde9428565899f0f89aaf6eaee04c', id: "footer" }, h("slot", { key: '3797061c1debbe0f415771def9068e56c96f9a5a', name: 'footer' })), h("div", { key: 'b5f292bd394bebc7394769827730daa4496c66b2', id: "sub-footer" }, h("slot", { key: '20f8a50ea6c385a2c4348508c2aab8558d3139cf', name: 'sub-footer' })))));
18
18
  }
19
19
  static get is() { return "cura-page-template"; }
20
20
  static get encapsulation() { return "shadow"; }
@@ -21,7 +21,7 @@ export class CuraToast {
21
21
  this.setStyle();
22
22
  }
23
23
  render() {
24
- return (h(Host, { key: '65417f506ab0db06fd38449643c679d4fea1fffd' }, h("div", { key: '80e509d36768bea4b99e215dc9d81aec83b9143c', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: 'd2f6a36370ab4c6555bb679f481e1975fb234e41', class: "default-icon", name: this.getNameIcon(), size: 16, color: `${this.type}-dark` }), h("div", { key: 'c312e11dbb469c1a486eaf90898c6149ce099627', class: "content" }, h("cura-heading", { key: 'f0ff03c554caaf0213476c23004b1361a876cf19', level: 4, size: "xsmall", color: `${this.type}-dark`, weight: "bold", "margin-block": "0" }, this.label), h("cura-paragraph", { key: 'd94ab5591663c1135712bf54dd90182de5d18ed5', color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: '9dc18a1ded79abcc258b4a2c892084addb194c9f' })), h("slot", { key: '829788786a56a1492b6fef2dd053f84fdafd7ea1', name: "actions" })), this.closeButton && h("cura-icon", { key: '1d507a45d3a860e859f879de15d79bc7c3a34787', class: "close-icon", name: "close", size: 16, color: "error-dark", onClick: this.handleClose }), this.loader && !!this.autoCloseDelay && h("cura-loader-bar", { key: '0ad99ff90899e19b3b2e9a13a2ac3fa76dae286d', color: `${this.type}-base`, progress: this.progress }))));
24
+ return (h(Host, { key: 'b875e88d00075a71d6052563a45849f0b3124f13' }, h("div", { key: 'e766c7a687ec1f9ad943dc4e2ebb87c100da5b71', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: '9379419d8403c5c7b14182bb136cd3375f8aa09a', class: "default-icon", name: this.getNameIcon(), size: 16, color: `${this.type}-dark` }), h("div", { key: '38f2a177984d826209d6fbdc9ad3036ef02a1825', class: "content" }, h("cura-heading", { key: 'a4fd1cce18d6208daa527b8da5687b47fbb59968', level: 4, size: "xsmall", color: `${this.type}-dark`, weight: "bold", "margin-block": "0" }, this.label), h("cura-paragraph", { key: 'fb803bbcbe47f1d2eca897ca5679d71294fe59ab', color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: '9ea56d9f87a423b109945cd4cf4078347a9fc1e9' })), h("slot", { key: '045b4ae11997260832288428df6672be6e918730', name: "actions" })), this.closeButton && h("cura-icon", { key: 'e326bb7786f60c95bed9d910e46f47bb4273bb7b', class: "close-icon", name: "close", size: 16, color: "error-dark", onClick: this.handleClose }), this.loader && !!this.autoCloseDelay && h("cura-loader-bar", { key: 'bf1d59681ac35d79fe240777e5d5424ee2b4a4e7', color: `${this.type}-base`, progress: this.progress }))));
25
25
  }
26
26
  componentDidLoad() {
27
27
  this.openContainer();
@@ -147,7 +147,7 @@ export class CuraCheckbox {
147
147
  return h("cura-icon", { class: "icon", name: iconName, size: iconSize, color: iconColor });
148
148
  }
149
149
  render() {
150
- return (h(Host, { key: 'd24019856ac701df4acbe1f7e104df67eae93945' }, h("div", { key: '413093861acf19223c65aae30bd5cd62053eec43', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, h("div", { key: '5ba8881480f1ef8692cde13258246175ac52f3c8', class: "info" }, h("div", { key: 'e3473b617a9261dfacea2c2b8bd826b87a739c6b', class: "label-wrapper" }, h("cura-label", { key: '2a4b7c973795a23b123c250259d95df63796f53c', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: '093a39a051be67644f6206095686cda606a3c9f5', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: '8fe9215b5a56a1cf7f10871e721c1b04cd88d37f', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: '5633213ce05d2f554a2acc9804d5306436eaac45' }))), h("div", { key: '5ff152af172d4a8cb0e83e2e50ec8fa6449ef9e4', class: 'checkbox', tabIndex: this.ontabindex }, h("input", { key: 'f62a404773c19fedfd236aa82ecd8582fdfd4c36', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
150
+ return (h(Host, { key: 'a346ec6f3d5a982471ac922982af7f9dbee14865' }, h("div", { key: '5786471ce3a9c1e116411f14b22d8bc5d7d39dce', class: this.getClasses(), style: this.styles, onClick: this.handleClick }, h("div", { key: '18d6646e969d7f78acba9deab9eb644de2df7011', class: "info" }, h("div", { key: 'fa29dbdfcd215a83aff824cb5d23d15b8f93313f', class: "label-wrapper" }, h("cura-label", { key: 'db7c96cc88553166b78e70f0c773fde12d54fc40', class: "label", weight: 'bold', size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: '408383422b9cdf45fe7cbfb51f7ea06ae3d1a260', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: '4af49958c61ddc4e79b719ff03179e6003eee93c', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: '649bbc456157e103eb55c199857158d37c8b7b16' }))), h("div", { key: 'b0abfc17ee08f13ad82e4c22ea8f90d980893274', class: 'checkbox', tabIndex: this.ontabindex }, h("input", { key: 'fba5fbe2853e340cc30ffe8d663f62b874cd1877', type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, required: this.required, checked: this.checked, indeterminate: this.indeterminate }), this.getIcon()))));
151
151
  }
152
152
  static get is() { return "cura-checkbox"; }
153
153
  static get encapsulation() { return "shadow"; }
@@ -36,12 +36,12 @@ export class CuraDropdownSearchOption {
36
36
  }
37
37
  }
38
38
  render() {
39
- return (h(Host, { key: '957218946adc6611a384d8e86860eb4f8ae50db3', slot: "dropdown-search-option" }, h("div", { key: 'a9b41feb6d72ae97cdeedd9a9aed36e2d6df40fe', style: this.styles, class: {
39
+ return (h(Host, { key: '3f02c7eb0d499c858c2145a7f63b0d935debaa2e', slot: "dropdown-search-option" }, h("div", { key: '5f9bfdaa8687e3784b7615b05fca16661847df62', style: this.styles, class: {
40
40
  "option-container": true,
41
41
  hovered: this.selectable ? this.hovered : false,
42
42
  selected: this.selected,
43
43
  disabled: !this.selectable
44
- } }, h("div", { key: '18994a7e0ad6e2b4ab37ae65edc796e4cdedce43', class: "content-container" }, h("div", { key: '2505977c08bea5d92b3cc33af5c117709120b82b', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, h("slot", { key: 'bc5ac8b88938f29693b6f9d68ec933e7abc513e4', name: "image" }), h("cura-heading", { key: '81d2b1d1e8b60f26a6e444d18dac0ddfc95b44ea', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, h("slot", { key: 'e91fb72dc20136d0a6b56da0d03eaba02327d80d' }))), h("slot", { key: 'f0e24b8548bec4ff52f3fcccd77562ef5548d5f6', name: "action" })))));
44
+ } }, h("div", { key: '4786ae6abd65c3232f854e2322d8b7b9093d332b', class: "content-container" }, h("div", { key: '5a29f12c98477cb970af13706b95b2f76a45c938', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, h("slot", { key: '199564385ab97d313235891c55eeff808de24857', name: "image" }), h("cura-heading", { key: 'bfdf99dae80d99bafa1bd30808986ce315cafd5f', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, h("slot", { key: '711d9843b8196400071b50a50d395d4775bec1f0' }))), h("slot", { key: '1487aac2527eba3511f9653a0d2986aac95e2bad', name: "action" })))));
45
45
  }
46
46
  static get is() { return "cura-dropdown-search-option"; }
47
47
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CuraDropdownSearchOptionTitle {
3
3
  render() {
4
- return (h(Host, { key: 'b9fbb0edaea7457fad9244d5c032961bd913f170', slot: "dropdown-search-option" }, h("cura-label", { key: 'dbefa340f1001a532c7f2152907b87e5e2e1f0ec', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, h("slot", { key: '1d03c41d153dc707db82943c77dd96547c98c78a' }))));
4
+ return (h(Host, { key: '5a6afd8afb971845aeef19cd4ea6fe7586a1fb4e', slot: "dropdown-search-option" }, h("cura-label", { key: '00f5bc78178b6b549eaee21f28dcdb28b539099b', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, h("slot", { key: '0d858d26544542c8c05686a879a44366318e86ce' }))));
5
5
  }
6
6
  static get is() { return "cura-dropdown-search-option-title"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -112,7 +112,7 @@
112
112
  }
113
113
  .dropdown-mobile {
114
114
  position: fixed;
115
- top: 0;
115
+ top: 1%;
116
116
  left: 0;
117
117
  right: 0;
118
118
  width: 100%;