@haiilo/catalyst 11.0.0 → 12.0.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 (350) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/catalyst.esm.js.map +1 -1
  3. package/dist/catalyst/index.esm.js +2 -2
  4. package/dist/catalyst/index.esm.js.map +1 -1
  5. package/dist/catalyst/loader.esm.js.map +1 -0
  6. package/dist/catalyst/p-6a54965a.entry.js +10 -0
  7. package/dist/catalyst/p-6a54965a.entry.js.map +1 -0
  8. package/dist/catalyst/p-B-m4GNf1.js +3 -0
  9. package/dist/catalyst/p-B-m4GNf1.js.map +1 -0
  10. package/dist/catalyst/p-DQuL1Twl.js +2 -0
  11. package/dist/catalyst/p-DQuL1Twl.js.map +1 -0
  12. package/dist/catalyst/p-LJZzaWFR.js +2 -0
  13. package/dist/catalyst/p-LJZzaWFR.js.map +1 -0
  14. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  15. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  16. package/dist/cjs/cat-alert_30.cjs.entry.js +1467 -1833
  17. package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
  18. package/dist/cjs/catalyst.cjs.js +8 -7
  19. package/dist/cjs/catalyst.cjs.js.map +1 -1
  20. package/dist/cjs/index-DNLT6JC9.js +10178 -0
  21. package/dist/cjs/index-DNLT6JC9.js.map +1 -0
  22. package/dist/cjs/{index-1094f0fc.js → index-jGQAsDy6.js} +528 -358
  23. package/dist/cjs/index-jGQAsDy6.js.map +1 -0
  24. package/dist/cjs/index.cjs.js +461 -453
  25. package/dist/cjs/index.cjs.js.map +1 -1
  26. package/dist/cjs/loader.cjs.js +4 -5
  27. package/dist/cjs/loader.cjs.js.map +1 -1
  28. package/dist/collection/collection-manifest.json +2 -2
  29. package/dist/collection/components/cat-alert/cat-alert.js +15 -4
  30. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  31. package/dist/collection/components/cat-avatar/cat-avatar.js +33 -14
  32. package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
  33. package/dist/collection/components/cat-badge/cat-badge.js +45 -9
  34. package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
  35. package/dist/collection/components/cat-button/cat-button.css +4 -2
  36. package/dist/collection/components/cat-button/cat-button.js +107 -35
  37. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  38. package/dist/collection/components/cat-button-group/cat-button-group.js +3 -2
  39. package/dist/collection/components/cat-button-group/cat-button-group.js.map +1 -1
  40. package/dist/collection/components/cat-checkbox/cat-checkbox.js +83 -24
  41. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  42. package/dist/collection/components/cat-date/cat-date.js +114 -39
  43. package/dist/collection/components/cat-date/cat-date.js.map +1 -1
  44. package/dist/collection/components/cat-date-inline/cat-date-inline.js +69 -19
  45. package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -1
  46. package/dist/collection/components/cat-datepicker/cat-datepicker.js +130 -42
  47. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
  48. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +37 -12
  49. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js.map +1 -1
  50. package/dist/collection/components/cat-dropdown/cat-dropdown.js +129 -17
  51. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  52. package/dist/collection/components/cat-form-group/cat-form-group.js +19 -4
  53. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  54. package/dist/collection/components/cat-icon/cat-icon.js +15 -7
  55. package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
  56. package/dist/collection/components/cat-input/cat-input.js +143 -51
  57. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  58. package/dist/collection/components/cat-pagination/cat-pagination.js +60 -10
  59. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  60. package/dist/collection/components/cat-radio/cat-radio.js +65 -18
  61. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  62. package/dist/collection/components/cat-radio-group/cat-radio-group.js +21 -8
  63. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  64. package/dist/collection/components/cat-scrollable/cat-scrollable.js +32 -7
  65. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  66. package/dist/collection/components/cat-select/cat-select.js +105 -34
  67. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  68. package/dist/collection/components/cat-skeleton/cat-skeleton.js +22 -5
  69. package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
  70. package/dist/collection/components/cat-spinner/cat-spinner.js +15 -4
  71. package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
  72. package/dist/collection/components/cat-tab/cat-tab.js +84 -17
  73. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
  74. package/dist/collection/components/cat-tabs/cat-tabs.css +29 -12
  75. package/dist/collection/components/cat-tabs/cat-tabs.js +189 -8
  76. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  77. package/dist/collection/components/cat-tag/cat-tag.js +84 -25
  78. package/dist/collection/components/cat-tag/cat-tag.js.map +1 -1
  79. package/dist/collection/components/cat-textarea/cat-textarea.js +90 -32
  80. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  81. package/dist/collection/components/cat-time/cat-time.js +120 -39
  82. package/dist/collection/components/cat-time/cat-time.js.map +1 -1
  83. package/dist/collection/components/cat-toggle/cat-toggle.js +71 -22
  84. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  85. package/dist/collection/components/cat-tooltip/cat-tooltip.js +49 -8
  86. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  87. package/dist/components/cat-alert.js +8 -3
  88. package/dist/components/cat-alert.js.map +1 -1
  89. package/dist/components/cat-avatar.js +1 -0
  90. package/dist/components/cat-avatar2.js +11 -8
  91. package/dist/components/cat-avatar2.js.map +1 -1
  92. package/dist/components/cat-badge.js +23 -3
  93. package/dist/components/cat-badge.js.map +1 -1
  94. package/dist/components/cat-button-group.js +2 -3
  95. package/dist/components/cat-button-group.js.map +1 -1
  96. package/dist/components/cat-button.js +1 -0
  97. package/dist/components/cat-button2.js +41 -17
  98. package/dist/components/cat-button2.js.map +1 -1
  99. package/dist/components/cat-card.js +2 -2
  100. package/dist/components/cat-card.js.map +1 -1
  101. package/dist/components/cat-checkbox.js +1 -0
  102. package/dist/components/cat-checkbox2.js +34 -10
  103. package/dist/components/cat-checkbox2.js.map +1 -1
  104. package/dist/components/cat-date-inline.js +1 -0
  105. package/dist/components/cat-date-inline2.js +29 -7
  106. package/dist/components/cat-date-inline2.js.map +1 -1
  107. package/dist/components/cat-date.js +41 -17
  108. package/dist/components/cat-date.js.map +1 -1
  109. package/dist/components/cat-datepicker-inline.js +16 -8
  110. package/dist/components/cat-datepicker-inline.js.map +1 -1
  111. package/dist/components/cat-datepicker.js +50 -20
  112. package/dist/components/cat-datepicker.js.map +1 -1
  113. package/dist/components/cat-datepicker.locale.js +110 -99
  114. package/dist/components/cat-datepicker.locale.js.map +1 -1
  115. package/dist/components/cat-dropdown.js +1 -0
  116. package/dist/components/cat-dropdown2.js +70 -13
  117. package/dist/components/cat-dropdown2.js.map +1 -1
  118. package/dist/components/cat-form-group.js +12 -3
  119. package/dist/components/cat-form-group.js.map +1 -1
  120. package/dist/components/cat-form-hint.js +1 -0
  121. package/dist/components/cat-form-hint.js.map +1 -1
  122. package/dist/components/cat-i18n-registry.js +1 -0
  123. package/dist/components/cat-i18n-registry.js.map +1 -1
  124. package/dist/components/cat-icon-registry.js +22 -21
  125. package/dist/components/cat-icon-registry.js.map +1 -1
  126. package/dist/components/cat-icon.js +1 -0
  127. package/dist/components/cat-icon2.js +5 -5
  128. package/dist/components/cat-icon2.js.map +1 -1
  129. package/dist/components/cat-input.js +1 -0
  130. package/dist/components/cat-input2.js +50 -25
  131. package/dist/components/cat-input2.js.map +1 -1
  132. package/dist/components/cat-pagination.js +32 -2
  133. package/dist/components/cat-pagination.js.map +1 -1
  134. package/dist/components/cat-radio-group.js +8 -5
  135. package/dist/components/cat-radio-group.js.map +1 -1
  136. package/dist/components/cat-radio.js +28 -8
  137. package/dist/components/cat-radio.js.map +1 -1
  138. package/dist/components/cat-scrollable.js +1 -0
  139. package/dist/components/cat-scrollable2.js +322 -542
  140. package/dist/components/cat-scrollable2.js.map +1 -1
  141. package/dist/components/cat-select-demo.js +27 -49
  142. package/dist/components/cat-select-demo.js.map +1 -1
  143. package/dist/components/cat-select.js +1 -0
  144. package/dist/components/cat-select2.js +135 -316
  145. package/dist/components/cat-select2.js.map +1 -1
  146. package/dist/components/cat-skeleton.js +1 -0
  147. package/dist/components/cat-skeleton2.js +12 -3
  148. package/dist/components/cat-skeleton2.js.map +1 -1
  149. package/dist/components/cat-spinner.js +1 -0
  150. package/dist/components/cat-spinner2.js +8 -3
  151. package/dist/components/cat-spinner2.js.map +1 -1
  152. package/dist/components/cat-tab.js +34 -9
  153. package/dist/components/cat-tab.js.map +1 -1
  154. package/dist/components/cat-tabs.js +140 -11
  155. package/dist/components/cat-tabs.js.map +1 -1
  156. package/dist/components/cat-tag.js +35 -13
  157. package/dist/components/cat-tag.js.map +1 -1
  158. package/dist/components/cat-textarea.js +33 -16
  159. package/dist/components/cat-textarea.js.map +1 -1
  160. package/dist/components/cat-time.js +44 -16
  161. package/dist/components/cat-time.js.map +1 -1
  162. package/dist/components/cat-toggle.js +28 -10
  163. package/dist/components/cat-toggle.js.map +1 -1
  164. package/dist/components/cat-tooltip.js +28 -3
  165. package/dist/components/cat-tooltip.js.map +1 -1
  166. package/dist/components/coerce.js +1 -0
  167. package/dist/components/coerce.js.map +1 -1
  168. package/dist/components/first-tabbable.js +1 -0
  169. package/dist/components/first-tabbable.js.map +1 -1
  170. package/dist/components/{floating-ui.dom.esm.js → floating-ui.dom.js} +3 -492
  171. package/dist/components/floating-ui.dom.js.map +1 -0
  172. package/dist/components/index.js +460 -450
  173. package/dist/components/index.js.map +1 -1
  174. package/dist/components/index2.js +9456 -0
  175. package/dist/components/index2.js.map +1 -0
  176. package/dist/components/loglevel.js +368 -356
  177. package/dist/components/loglevel.js.map +1 -1
  178. package/dist/components/media-matcher.js +1 -0
  179. package/dist/components/media-matcher.js.map +1 -1
  180. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  181. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  182. package/dist/esm/cat-alert_30.entry.js +1428 -1792
  183. package/dist/esm/cat-alert_30.entry.js.map +1 -1
  184. package/dist/esm/catalyst.js +7 -5
  185. package/dist/esm/catalyst.js.map +1 -1
  186. package/dist/esm/{index-e8c0ddf2.js → index-B-m4GNf1.js} +528 -338
  187. package/dist/esm/index-B-m4GNf1.js.map +1 -0
  188. package/dist/esm/index-LJZzaWFR.js +10057 -0
  189. package/dist/esm/index-LJZzaWFR.js.map +1 -0
  190. package/dist/esm/index.js +458 -448
  191. package/dist/esm/index.js.map +1 -1
  192. package/dist/esm/loader.js +5 -4
  193. package/dist/esm/loader.js.map +1 -1
  194. package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +11 -1
  195. package/dist/types/components/cat-tab/cat-tab.d.ts +6 -0
  196. package/dist/types/components/cat-tabs/cat-tabs.d.ts +18 -0
  197. package/dist/types/components.d.ts +46 -0
  198. package/dist/types/stencil-public-runtime.d.ts +28 -2
  199. package/loader/index.d.ts +3 -0
  200. package/package.json +3 -3
  201. package/dist/catalyst/p-59e2ada2.entry.js +0 -10
  202. package/dist/catalyst/p-59e2ada2.entry.js.map +0 -1
  203. package/dist/catalyst/p-7f3bcfb9.js +0 -3
  204. package/dist/catalyst/p-7f3bcfb9.js.map +0 -1
  205. package/dist/catalyst/p-9500d6fb.js +0 -2
  206. package/dist/catalyst/p-9500d6fb.js.map +0 -1
  207. package/dist/catalyst/p-e1255160.js +0 -2
  208. package/dist/catalyst/p-e1255160.js.map +0 -1
  209. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  210. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  211. package/dist/cjs/index-1094f0fc.js.map +0 -1
  212. package/dist/cjs/of-958251e4.js +0 -1549
  213. package/dist/cjs/of-958251e4.js.map +0 -1
  214. package/dist/collection/components/cat-alert/cat-alert.e2e.js +0 -11
  215. package/dist/collection/components/cat-alert/cat-alert.e2e.js.map +0 -1
  216. package/dist/collection/components/cat-alert/cat-alert.spec.js +0 -14
  217. package/dist/collection/components/cat-alert/cat-alert.spec.js.map +0 -1
  218. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js +0 -10
  219. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js.map +0 -1
  220. package/dist/collection/components/cat-avatar/cat-avatar.spec.js +0 -14
  221. package/dist/collection/components/cat-avatar/cat-avatar.spec.js.map +0 -1
  222. package/dist/collection/components/cat-badge/cat-badge.e2e.js +0 -10
  223. package/dist/collection/components/cat-badge/cat-badge.e2e.js.map +0 -1
  224. package/dist/collection/components/cat-badge/cat-badge.spec.js +0 -14
  225. package/dist/collection/components/cat-badge/cat-badge.spec.js.map +0 -1
  226. package/dist/collection/components/cat-button/cat-button.e2e.js +0 -10
  227. package/dist/collection/components/cat-button/cat-button.e2e.js.map +0 -1
  228. package/dist/collection/components/cat-button/cat-button.spec.js +0 -20
  229. package/dist/collection/components/cat-button/cat-button.spec.js.map +0 -1
  230. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js +0 -10
  231. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js.map +0 -1
  232. package/dist/collection/components/cat-button-group/cat-button-group.spec.js +0 -14
  233. package/dist/collection/components/cat-button-group/cat-button-group.spec.js.map +0 -1
  234. package/dist/collection/components/cat-card/cat-card.e2e.js +0 -10
  235. package/dist/collection/components/cat-card/cat-card.e2e.js.map +0 -1
  236. package/dist/collection/components/cat-card/cat-card.spec.js +0 -14
  237. package/dist/collection/components/cat-card/cat-card.spec.js.map +0 -1
  238. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js +0 -10
  239. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js.map +0 -1
  240. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +0 -14
  241. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +0 -1
  242. package/dist/collection/components/cat-date/cat-date.e2e.js +0 -11
  243. package/dist/collection/components/cat-date/cat-date.e2e.js.map +0 -1
  244. package/dist/collection/components/cat-date/cat-date.spec.js +0 -17
  245. package/dist/collection/components/cat-date/cat-date.spec.js.map +0 -1
  246. package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js +0 -11
  247. package/dist/collection/components/cat-date-inline/cat-date-inline.e2e.js.map +0 -1
  248. package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js +0 -16
  249. package/dist/collection/components/cat-date-inline/cat-date-inline.spec.js.map +0 -1
  250. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js +0 -11
  251. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js.map +0 -1
  252. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js +0 -15
  253. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js.map +0 -1
  254. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js +0 -11
  255. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js.map +0 -1
  256. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js +0 -15
  257. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js.map +0 -1
  258. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js +0 -10
  259. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js.map +0 -1
  260. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js +0 -21
  261. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js.map +0 -1
  262. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js +0 -10
  263. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js.map +0 -1
  264. package/dist/collection/components/cat-form-group/cat-form-group.spec.js +0 -14
  265. package/dist/collection/components/cat-form-group/cat-form-group.spec.js.map +0 -1
  266. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +0 -15
  267. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +0 -1
  268. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js +0 -7
  269. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js.map +0 -1
  270. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js +0 -7
  271. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js.map +0 -1
  272. package/dist/collection/components/cat-icon/cat-icon.e2e.js +0 -11
  273. package/dist/collection/components/cat-icon/cat-icon.e2e.js.map +0 -1
  274. package/dist/collection/components/cat-icon/cat-icon.spec.js +0 -15
  275. package/dist/collection/components/cat-icon/cat-icon.spec.js.map +0 -1
  276. package/dist/collection/components/cat-input/cat-input.e2e.js +0 -11
  277. package/dist/collection/components/cat-input/cat-input.e2e.js.map +0 -1
  278. package/dist/collection/components/cat-input/cat-input.spec.js +0 -15
  279. package/dist/collection/components/cat-input/cat-input.spec.js.map +0 -1
  280. package/dist/collection/components/cat-notification/cat-notification.spec.js +0 -7
  281. package/dist/collection/components/cat-notification/cat-notification.spec.js.map +0 -1
  282. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js +0 -14
  283. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js.map +0 -1
  284. package/dist/collection/components/cat-pagination/cat-pagination.spec.js +0 -15
  285. package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +0 -1
  286. package/dist/collection/components/cat-radio/cat-radio.e2e.js +0 -10
  287. package/dist/collection/components/cat-radio/cat-radio.e2e.js.map +0 -1
  288. package/dist/collection/components/cat-radio/cat-radio.spec.js +0 -14
  289. package/dist/collection/components/cat-radio/cat-radio.spec.js.map +0 -1
  290. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js +0 -10
  291. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js.map +0 -1
  292. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js +0 -14
  293. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js.map +0 -1
  294. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js +0 -10
  295. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js.map +0 -1
  296. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js +0 -14
  297. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js.map +0 -1
  298. package/dist/collection/components/cat-select/cat-select.e2e.js +0 -14
  299. package/dist/collection/components/cat-select/cat-select.e2e.js.map +0 -1
  300. package/dist/collection/components/cat-select/cat-select.spec.js +0 -15
  301. package/dist/collection/components/cat-select/cat-select.spec.js.map +0 -1
  302. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js +0 -10
  303. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js.map +0 -1
  304. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js +0 -14
  305. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js.map +0 -1
  306. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js +0 -10
  307. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js.map +0 -1
  308. package/dist/collection/components/cat-spinner/cat-spinner.spec.js +0 -18
  309. package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +0 -1
  310. package/dist/collection/components/cat-tab/cat-tab.e2e.js +0 -10
  311. package/dist/collection/components/cat-tab/cat-tab.e2e.js.map +0 -1
  312. package/dist/collection/components/cat-tab/cat-tab.spec.js +0 -14
  313. package/dist/collection/components/cat-tab/cat-tab.spec.js.map +0 -1
  314. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js +0 -10
  315. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js.map +0 -1
  316. package/dist/collection/components/cat-tabs/cat-tabs.spec.js +0 -14
  317. package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +0 -1
  318. package/dist/collection/components/cat-tag/cat-tag.e2e.js +0 -14
  319. package/dist/collection/components/cat-tag/cat-tag.e2e.js.map +0 -1
  320. package/dist/collection/components/cat-tag/cat-tag.spec.js +0 -23
  321. package/dist/collection/components/cat-tag/cat-tag.spec.js.map +0 -1
  322. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js +0 -11
  323. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js.map +0 -1
  324. package/dist/collection/components/cat-textarea/cat-textarea.spec.js +0 -15
  325. package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +0 -1
  326. package/dist/collection/components/cat-time/cat-time.e2e.js +0 -11
  327. package/dist/collection/components/cat-time/cat-time.e2e.js.map +0 -1
  328. package/dist/collection/components/cat-time/cat-time.spec.js +0 -16
  329. package/dist/collection/components/cat-time/cat-time.spec.js.map +0 -1
  330. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js +0 -10
  331. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js.map +0 -1
  332. package/dist/collection/components/cat-toggle/cat-toggle.spec.js +0 -14
  333. package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +0 -1
  334. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js +0 -10
  335. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js.map +0 -1
  336. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js +0 -20
  337. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js.map +0 -1
  338. package/dist/collection/utils/media-matcher.spec.js +0 -39
  339. package/dist/collection/utils/media-matcher.spec.js.map +0 -1
  340. package/dist/components/floating-ui.dom.esm.js.map +0 -1
  341. package/dist/components/from.js +0 -928
  342. package/dist/components/from.js.map +0 -1
  343. package/dist/components/of.js +0 -10
  344. package/dist/components/of.js.map +0 -1
  345. package/dist/esm/app-globals-0f993ce5.js +0 -5
  346. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  347. package/dist/esm/index-e8c0ddf2.js.map +0 -1
  348. package/dist/esm/of-e4ec2eb4.js +0 -1523
  349. package/dist/esm/of-e4ec2eb4.js.map +0 -1
  350. package/loader/package.json +0 -11
@@ -10,31 +10,55 @@ export class CatDate {
10
10
  this.language = i18n.getLocale();
11
11
  this.locale = getLocale(this.language);
12
12
  this.inputFocused = false;
13
- this.dateMaskOptions = undefined;
13
+ /**
14
+ * Whether the label need a marker to shown if the input is required or optional.
15
+ */
14
16
  this.requiredMarker = 'optional';
17
+ /**
18
+ * Whether the label is on top or left.
19
+ */
15
20
  this.horizontal = false;
21
+ /**
22
+ * Hint for form autofill feature.
23
+ */
16
24
  this.autoComplete = 'off';
25
+ /**
26
+ * Whether the input should show a clear button.
27
+ */
17
28
  this.clearable = false;
29
+ /**
30
+ * Whether the input is disabled.
31
+ */
18
32
  this.disabled = false;
19
- this.hint = undefined;
20
- this.icon = undefined;
33
+ /**
34
+ * Display the icon on the right.
35
+ */
21
36
  this.iconRight = false;
22
- this.identifier = undefined;
37
+ /**
38
+ * The label for the input.
39
+ */
23
40
  this.label = '';
41
+ /**
42
+ * Visually hide the label, but still show it to assistive technologies like screen readers.
43
+ */
24
44
  this.labelHidden = false;
25
- this.max = undefined;
26
- this.min = undefined;
27
- this.name = undefined;
28
- this.placeholder = undefined;
29
- this.textPrefix = undefined;
30
- this.textSuffix = undefined;
45
+ /**
46
+ * The value is not editable.
47
+ */
31
48
  this.readonly = false;
49
+ /**
50
+ * A value is required or must be check for the form to be submittable.
51
+ */
32
52
  this.required = false;
33
- this.value = undefined;
34
- this.errors = undefined;
53
+ /**
54
+ * Fine-grained control over when the errors are shown. Can be `false` to
55
+ * never show errors, `true` to show errors on blur, or a number to show
56
+ * errors change with the given delay in milliseconds or immediately on blur.
57
+ */
35
58
  this.errorUpdate = 0;
36
- this.nativeAttributes = undefined;
37
- this.testId = undefined;
59
+ /**
60
+ * The placement of the dropdown.
61
+ */
38
62
  this.placement = 'bottom-end';
39
63
  }
40
64
  onMinChanged(min, oldMin) {
@@ -182,6 +206,7 @@ export class CatDate {
182
206
  return {
183
207
  "requiredMarker": {
184
208
  "type": "string",
209
+ "attribute": "required-marker",
185
210
  "mutable": false,
186
211
  "complexType": {
187
212
  "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
@@ -194,12 +219,14 @@ export class CatDate {
194
219
  "tags": [],
195
220
  "text": "Whether the label need a marker to shown if the input is required or optional."
196
221
  },
197
- "attribute": "required-marker",
222
+ "getter": false,
223
+ "setter": false,
198
224
  "reflect": false,
199
225
  "defaultValue": "'optional'"
200
226
  },
201
227
  "horizontal": {
202
228
  "type": "boolean",
229
+ "attribute": "horizontal",
203
230
  "mutable": false,
204
231
  "complexType": {
205
232
  "original": "boolean",
@@ -212,12 +239,14 @@ export class CatDate {
212
239
  "tags": [],
213
240
  "text": "Whether the label is on top or left."
214
241
  },
215
- "attribute": "horizontal",
242
+ "getter": false,
243
+ "setter": false,
216
244
  "reflect": false,
217
245
  "defaultValue": "false"
218
246
  },
219
247
  "autoComplete": {
220
248
  "type": "string",
249
+ "attribute": "auto-complete",
221
250
  "mutable": false,
222
251
  "complexType": {
223
252
  "original": "string",
@@ -230,12 +259,14 @@ export class CatDate {
230
259
  "tags": [],
231
260
  "text": "Hint for form autofill feature."
232
261
  },
233
- "attribute": "auto-complete",
262
+ "getter": false,
263
+ "setter": false,
234
264
  "reflect": false,
235
265
  "defaultValue": "'off'"
236
266
  },
237
267
  "clearable": {
238
268
  "type": "boolean",
269
+ "attribute": "clearable",
239
270
  "mutable": false,
240
271
  "complexType": {
241
272
  "original": "boolean",
@@ -248,12 +279,14 @@ export class CatDate {
248
279
  "tags": [],
249
280
  "text": "Whether the input should show a clear button."
250
281
  },
251
- "attribute": "clearable",
282
+ "getter": false,
283
+ "setter": false,
252
284
  "reflect": false,
253
285
  "defaultValue": "false"
254
286
  },
255
287
  "disabled": {
256
288
  "type": "boolean",
289
+ "attribute": "disabled",
257
290
  "mutable": false,
258
291
  "complexType": {
259
292
  "original": "boolean",
@@ -266,12 +299,14 @@ export class CatDate {
266
299
  "tags": [],
267
300
  "text": "Whether the input is disabled."
268
301
  },
269
- "attribute": "disabled",
302
+ "getter": false,
303
+ "setter": false,
270
304
  "reflect": false,
271
305
  "defaultValue": "false"
272
306
  },
273
307
  "hint": {
274
308
  "type": "string",
309
+ "attribute": "hint",
275
310
  "mutable": false,
276
311
  "complexType": {
277
312
  "original": "string | string[]",
@@ -284,11 +319,13 @@ export class CatDate {
284
319
  "tags": [],
285
320
  "text": "Optional hint text(s) to be displayed with the input."
286
321
  },
287
- "attribute": "hint",
322
+ "getter": false,
323
+ "setter": false,
288
324
  "reflect": false
289
325
  },
290
326
  "icon": {
291
327
  "type": "string",
328
+ "attribute": "icon",
292
329
  "mutable": false,
293
330
  "complexType": {
294
331
  "original": "string",
@@ -301,11 +338,13 @@ export class CatDate {
301
338
  "tags": [],
302
339
  "text": "The name of an icon to be displayed in the input."
303
340
  },
304
- "attribute": "icon",
341
+ "getter": false,
342
+ "setter": false,
305
343
  "reflect": false
306
344
  },
307
345
  "iconRight": {
308
346
  "type": "boolean",
347
+ "attribute": "icon-right",
309
348
  "mutable": false,
310
349
  "complexType": {
311
350
  "original": "boolean",
@@ -318,12 +357,14 @@ export class CatDate {
318
357
  "tags": [],
319
358
  "text": "Display the icon on the right."
320
359
  },
321
- "attribute": "icon-right",
360
+ "getter": false,
361
+ "setter": false,
322
362
  "reflect": false,
323
363
  "defaultValue": "false"
324
364
  },
325
365
  "identifier": {
326
366
  "type": "string",
367
+ "attribute": "identifier",
327
368
  "mutable": false,
328
369
  "complexType": {
329
370
  "original": "string",
@@ -336,11 +377,13 @@ export class CatDate {
336
377
  "tags": [],
337
378
  "text": "A unique identifier for the input."
338
379
  },
339
- "attribute": "identifier",
380
+ "getter": false,
381
+ "setter": false,
340
382
  "reflect": false
341
383
  },
342
384
  "label": {
343
385
  "type": "string",
386
+ "attribute": "label",
344
387
  "mutable": false,
345
388
  "complexType": {
346
389
  "original": "string",
@@ -353,12 +396,14 @@ export class CatDate {
353
396
  "tags": [],
354
397
  "text": "The label for the input."
355
398
  },
356
- "attribute": "label",
399
+ "getter": false,
400
+ "setter": false,
357
401
  "reflect": false,
358
402
  "defaultValue": "''"
359
403
  },
360
404
  "labelHidden": {
361
405
  "type": "boolean",
406
+ "attribute": "label-hidden",
362
407
  "mutable": false,
363
408
  "complexType": {
364
409
  "original": "boolean",
@@ -371,12 +416,14 @@ export class CatDate {
371
416
  "tags": [],
372
417
  "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
373
418
  },
374
- "attribute": "label-hidden",
419
+ "getter": false,
420
+ "setter": false,
375
421
  "reflect": false,
376
422
  "defaultValue": "false"
377
423
  },
378
424
  "max": {
379
425
  "type": "string",
426
+ "attribute": "max",
380
427
  "mutable": false,
381
428
  "complexType": {
382
429
  "original": "string",
@@ -389,11 +436,13 @@ export class CatDate {
389
436
  "tags": [],
390
437
  "text": "A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD."
391
438
  },
392
- "attribute": "max",
439
+ "getter": false,
440
+ "setter": false,
393
441
  "reflect": false
394
442
  },
395
443
  "min": {
396
444
  "type": "string",
445
+ "attribute": "min",
397
446
  "mutable": false,
398
447
  "complexType": {
399
448
  "original": "string",
@@ -406,11 +455,13 @@ export class CatDate {
406
455
  "tags": [],
407
456
  "text": "A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD."
408
457
  },
409
- "attribute": "min",
458
+ "getter": false,
459
+ "setter": false,
410
460
  "reflect": false
411
461
  },
412
462
  "name": {
413
463
  "type": "string",
464
+ "attribute": "name",
414
465
  "mutable": false,
415
466
  "complexType": {
416
467
  "original": "string",
@@ -423,11 +474,13 @@ export class CatDate {
423
474
  "tags": [],
424
475
  "text": "The name of the form control. Submitted with the form as part of a name/value pair."
425
476
  },
426
- "attribute": "name",
477
+ "getter": false,
478
+ "setter": false,
427
479
  "reflect": false
428
480
  },
429
481
  "placeholder": {
430
482
  "type": "string",
483
+ "attribute": "placeholder",
431
484
  "mutable": false,
432
485
  "complexType": {
433
486
  "original": "string",
@@ -440,11 +493,13 @@ export class CatDate {
440
493
  "tags": [],
441
494
  "text": "The placeholder text to display within the input."
442
495
  },
443
- "attribute": "placeholder",
496
+ "getter": false,
497
+ "setter": false,
444
498
  "reflect": false
445
499
  },
446
500
  "textPrefix": {
447
501
  "type": "string",
502
+ "attribute": "text-prefix",
448
503
  "mutable": false,
449
504
  "complexType": {
450
505
  "original": "string",
@@ -457,11 +512,13 @@ export class CatDate {
457
512
  "tags": [],
458
513
  "text": "A textual prefix to be displayed in the input."
459
514
  },
460
- "attribute": "text-prefix",
515
+ "getter": false,
516
+ "setter": false,
461
517
  "reflect": false
462
518
  },
463
519
  "textSuffix": {
464
520
  "type": "string",
521
+ "attribute": "text-suffix",
465
522
  "mutable": false,
466
523
  "complexType": {
467
524
  "original": "string",
@@ -474,11 +531,13 @@ export class CatDate {
474
531
  "tags": [],
475
532
  "text": "A textual suffix to be displayed in the input."
476
533
  },
477
- "attribute": "text-suffix",
534
+ "getter": false,
535
+ "setter": false,
478
536
  "reflect": false
479
537
  },
480
538
  "readonly": {
481
539
  "type": "boolean",
540
+ "attribute": "readonly",
482
541
  "mutable": false,
483
542
  "complexType": {
484
543
  "original": "boolean",
@@ -491,12 +550,14 @@ export class CatDate {
491
550
  "tags": [],
492
551
  "text": "The value is not editable."
493
552
  },
494
- "attribute": "readonly",
553
+ "getter": false,
554
+ "setter": false,
495
555
  "reflect": false,
496
556
  "defaultValue": "false"
497
557
  },
498
558
  "required": {
499
559
  "type": "boolean",
560
+ "attribute": "required",
500
561
  "mutable": false,
501
562
  "complexType": {
502
563
  "original": "boolean",
@@ -509,12 +570,14 @@ export class CatDate {
509
570
  "tags": [],
510
571
  "text": "A value is required or must be check for the form to be submittable."
511
572
  },
512
- "attribute": "required",
573
+ "getter": false,
574
+ "setter": false,
513
575
  "reflect": false,
514
576
  "defaultValue": "false"
515
577
  },
516
578
  "value": {
517
579
  "type": "string",
580
+ "attribute": "value",
518
581
  "mutable": true,
519
582
  "complexType": {
520
583
  "original": "string",
@@ -527,11 +590,13 @@ export class CatDate {
527
590
  "tags": [],
528
591
  "text": "The value of the control, given in local ISO 8601 date format YYYY-MM-DD."
529
592
  },
530
- "attribute": "value",
593
+ "getter": false,
594
+ "setter": false,
531
595
  "reflect": false
532
596
  },
533
597
  "errors": {
534
598
  "type": "boolean",
599
+ "attribute": "errors",
535
600
  "mutable": false,
536
601
  "complexType": {
537
602
  "original": "boolean | string[] | ErrorMap",
@@ -550,11 +615,13 @@ export class CatDate {
550
615
  "tags": [],
551
616
  "text": "The validation errors for this input. Will render a hint under the input\nwith the translated error message(s) `error.${key}`. If an object is\npassed, the keys will be used as error keys and the values translation\nparameters.\nIf the value is `true`, the input will be marked as invalid without any\nhints under the input."
552
617
  },
553
- "attribute": "errors",
618
+ "getter": false,
619
+ "setter": false,
554
620
  "reflect": false
555
621
  },
556
622
  "errorUpdate": {
557
623
  "type": "any",
624
+ "attribute": "error-update",
558
625
  "mutable": false,
559
626
  "complexType": {
560
627
  "original": "boolean | number",
@@ -567,12 +634,14 @@ export class CatDate {
567
634
  "tags": [],
568
635
  "text": "Fine-grained control over when the errors are shown. Can be `false` to\nnever show errors, `true` to show errors on blur, or a number to show\nerrors change with the given delay in milliseconds or immediately on blur."
569
636
  },
570
- "attribute": "error-update",
637
+ "getter": false,
638
+ "setter": false,
571
639
  "reflect": false,
572
640
  "defaultValue": "0"
573
641
  },
574
642
  "nativeAttributes": {
575
643
  "type": "unknown",
644
+ "attribute": "native-attributes",
576
645
  "mutable": false,
577
646
  "complexType": {
578
647
  "original": "{ [key: string]: string }",
@@ -584,10 +653,13 @@ export class CatDate {
584
653
  "docs": {
585
654
  "tags": [],
586
655
  "text": "Attributes that will be added to the native HTML input element."
587
- }
656
+ },
657
+ "getter": false,
658
+ "setter": false
588
659
  },
589
660
  "testId": {
590
661
  "type": "string",
662
+ "attribute": "test-id",
591
663
  "mutable": false,
592
664
  "complexType": {
593
665
  "original": "string",
@@ -600,11 +672,13 @@ export class CatDate {
600
672
  "tags": [],
601
673
  "text": "A unique identifier for the underlying native element that is used for\ntesting purposes. The attribute is added as `data-test` attribute and acts\nas a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`."
602
674
  },
603
- "attribute": "test-id",
675
+ "getter": false,
676
+ "setter": false,
604
677
  "reflect": false
605
678
  },
606
679
  "placement": {
607
680
  "type": "string",
681
+ "attribute": "placement",
608
682
  "mutable": false,
609
683
  "complexType": {
610
684
  "original": "Placement",
@@ -623,7 +697,8 @@ export class CatDate {
623
697
  "tags": [],
624
698
  "text": "The placement of the dropdown."
625
699
  },
626
- "attribute": "placement",
700
+ "getter": false,
701
+ "setter": false,
627
702
  "reflect": false,
628
703
  "defaultValue": "'bottom-end'"
629
704
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cat-date.js","sourceRoot":"","sources":["../../../src/components/cat-date/cat-date.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7D,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGxE;;GAEG;AAQH,MAAM,OAAO,OAAO;;QACD,aAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,WAAM,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAG3C,iBAAY,GAAG,KAAK,CAAC;;8BASqE,UAAU;0BAKvF,KAAK;4BAKH,KAAK;yBAKR,KAAK;wBAKN,KAAK;;;yBAeJ,KAAK;;qBAUT,EAAE;2BAKI,KAAK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, Watch, h, State } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { DateUnit, FormatDateOptions } from 'cleave-zen';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n private inputFocused = false;\n\n @Element() hostElement!: HTMLElement;\n\n @State() dateMaskOptions?: FormatDateOptions;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete = 'off';\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors change with the given delay in milliseconds or immediately on blur.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter<string>;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentDidLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.dateMaskOptions = {\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1 as DateUnit, p2 as DateUnit, p3 as DateUnit]\n };\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise<void> {\n this.input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this.input?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.input?.clear();\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <Host>\n <cat-input\n class=\"cat-date-input\"\n ref={el => (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n testId={this.testId}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n dateMaskOptions={this.dateMaskOptions}\n onCatFocus={e => {\n this.inputFocused = e.target === this.input;\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n <span slot=\"label\">\n {this.label}\n <span class=\"label-aria\"> ({this.locale.formatStr})</span>\n </span>\n <cat-dropdown\n slot=\"addon\"\n placement={this.placement}\n arrowNavigation=\"none\"\n noResize\n onCatOpen={() => this.dateInline?.resetView()}\n >\n <cat-button\n slot=\"trigger\"\n icon=\"$cat:datepicker-calendar\"\n iconOnly\n class=\"cat-date-toggle\"\n disabled={this.disabled}\n a11yLabel={this.getTriggerA11yLabel()}\n ></cat-button>\n <div slot=\"content\">\n <cat-date-inline\n ref={el => (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n ></cat-date-inline>\n </div>\n </cat-dropdown>\n </cat-input>\n </Host>\n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input || !this.inputFocused) {\n return;\n }\n this.inputFocused = false;\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent<string>) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? this.locale.fromLocalISO(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"cat-date.js","sourceRoot":"","sources":["../../../src/components/cat-date/cat-date.tsx"],"names":[],"mappings":"AACA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, Watch, h, State } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { DateUnit, FormatDateOptions } from 'cleave-zen';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: {\n delegatesFocus: true\n }\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n private inputFocused = false;\n\n @Element() hostElement!: HTMLElement;\n\n @State() dateMaskOptions?: FormatDateOptions;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete = 'off';\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors change with the given delay in milliseconds or immediately on blur.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * A unique identifier for the underlying native element that is used for\n * testing purposes. The attribute is added as `data-test` attribute and acts\n * as a shorthand for `nativeAttributes={ 'data-test': 'test-Id' }`.\n */\n @Prop() testId?: string;\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter<string>;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentDidLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.dateMaskOptions = {\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1 as DateUnit, p2 as DateUnit, p3 as DateUnit]\n };\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise<void> {\n this.input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise<void> {\n this.input?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise<void> {\n this.input?.clear();\n }\n\n render() {\n this.hostElement.tabIndex = Number(this.hostElement.getAttribute('tabindex')) || 0;\n return (\n <Host>\n <cat-input\n class=\"cat-date-input\"\n ref={el => (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n testId={this.testId}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n dateMaskOptions={this.dateMaskOptions}\n onCatFocus={e => {\n this.inputFocused = e.target === this.input;\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n <span slot=\"label\">\n {this.label}\n <span class=\"label-aria\"> ({this.locale.formatStr})</span>\n </span>\n <cat-dropdown\n slot=\"addon\"\n placement={this.placement}\n arrowNavigation=\"none\"\n noResize\n onCatOpen={() => this.dateInline?.resetView()}\n >\n <cat-button\n slot=\"trigger\"\n icon=\"$cat:datepicker-calendar\"\n iconOnly\n class=\"cat-date-toggle\"\n disabled={this.disabled}\n a11yLabel={this.getTriggerA11yLabel()}\n ></cat-button>\n <div slot=\"content\">\n <cat-date-inline\n ref={el => (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n ></cat-date-inline>\n </div>\n </cat-dropdown>\n </cat-input>\n </Host>\n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input || !this.inputFocused) {\n return;\n }\n this.inputFocused = false;\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent<string>) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? this.locale.fromLocalISO(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n"]}