@sellmate/design-system 1.1.0 → 1.3.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 (402) hide show
  1. package/dist/cjs/component.datepicker-Cw_-oidk.js +121 -0
  2. package/dist/cjs/{component.table-B7brIpIQ.js → component.table-CMqGfEui.js} +11 -1
  3. package/dist/cjs/design-system.cjs.js +2 -2
  4. package/dist/cjs/{index-BlxrCRYi.js → index-Cw-78mnC.js} +1 -1
  5. package/dist/cjs/index.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
  8. package/dist/cjs/sd-badge.cjs.entry.js +2 -2
  9. package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -2
  10. package/dist/cjs/sd-button_2.cjs.entry.js +278 -11
  11. package/dist/cjs/sd-calendar_2.cjs.entry.js +262 -0
  12. package/dist/cjs/sd-card.cjs.entry.js +2 -2
  13. package/dist/cjs/sd-checkbox.cjs.entry.js +4 -4
  14. package/dist/cjs/sd-chip.cjs.entry.js +4 -4
  15. package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
  16. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +4 -4
  17. package/dist/cjs/sd-date-box.cjs.entry.js +8 -3
  18. package/dist/cjs/sd-date-picker.config-D3lTpa6W.js +37 -0
  19. package/dist/cjs/sd-date-picker_7.cjs.entry.js +27 -20
  20. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +49 -49
  21. package/dist/cjs/sd-dropdown-button.cjs.entry.js +10 -6
  22. package/dist/cjs/sd-field_3.cjs.entry.js +31 -30
  23. package/dist/cjs/sd-form.cjs.entry.js +5 -5
  24. package/dist/cjs/sd-ghost-button.cjs.entry.js +4 -4
  25. package/dist/cjs/sd-guide.cjs.entry.js +5 -5
  26. package/dist/cjs/sd-key-value-table.cjs.entry.js +10 -10
  27. package/dist/cjs/sd-linear-progress.cjs.entry.js +2 -2
  28. package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
  29. package/dist/cjs/sd-modal-container.cjs.entry.js +3 -3
  30. package/dist/cjs/sd-pagination_4.cjs.entry.js +116 -43
  31. package/dist/cjs/sd-popover.cjs.entry.js +6 -6
  32. package/dist/cjs/sd-popup.cjs.entry.js +2 -2
  33. package/dist/cjs/sd-portal.cjs.entry.js +3 -3
  34. package/dist/cjs/sd-radio-button.cjs.entry.js +7 -4
  35. package/dist/cjs/sd-radio.cjs.entry.js +2 -2
  36. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +15 -11
  37. package/dist/cjs/sd-select_3.cjs.entry.js +20 -15
  38. package/dist/cjs/sd-switch.cjs.entry.js +2 -2
  39. package/dist/cjs/sd-table.cjs.entry.js +170 -47
  40. package/dist/cjs/{sd-table.config-CDyioyE2.js → sd-table.config-BIpldZtw.js} +13 -2
  41. package/dist/cjs/sd-tabs.cjs.entry.js +8 -3
  42. package/dist/cjs/sd-tag.cjs.entry.js +10 -10
  43. package/dist/cjs/sd-td.cjs.entry.js +52 -10
  44. package/dist/cjs/sd-text-link.cjs.entry.js +9 -4
  45. package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
  46. package/dist/cjs/sd-toast.cjs.entry.js +3 -3
  47. package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
  48. package/dist/cjs/{tooltipArrow-N6nQ1QT-.js → tooltipArrow-BjSFKIUq.js} +1 -1
  49. package/dist/cjs/useDatePicker-dCuEgvjX.js +103 -0
  50. package/dist/collection/collection-manifest.json +1 -2
  51. package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
  52. package/dist/collection/components/sd-badge/sd-badge.js +1 -1
  53. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
  54. package/dist/collection/components/sd-button/sd-button.js +9 -8
  55. package/dist/collection/components/sd-calendar/sd-calendar.config.js +51 -0
  56. package/dist/collection/components/sd-calendar/sd-calendar.css +134 -73
  57. package/dist/collection/components/sd-calendar/sd-calendar.js +172 -133
  58. package/dist/collection/components/sd-card/sd-card.js +1 -1
  59. package/dist/collection/components/sd-checkbox/sd-checkbox.js +3 -3
  60. package/dist/collection/components/sd-chip/sd-chip.js +4 -4
  61. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  62. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
  63. package/dist/collection/components/sd-date-box/sd-date-box.js +7 -2
  64. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +8 -3
  65. package/dist/collection/components/sd-date-picker/sd-date-picker.config.js +0 -38
  66. package/dist/collection/components/sd-date-picker/sd-date-picker.js +3 -2
  67. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +12 -12
  68. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.config.js +2 -1
  69. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +3 -3
  70. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +6 -2
  71. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
  72. package/dist/collection/components/sd-field/sd-field.js +23 -22
  73. package/dist/collection/components/sd-file-picker/sd-file-picker.js +7 -2
  74. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +4 -4
  75. package/dist/collection/components/sd-form/sd-form.js +4 -4
  76. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +3 -3
  77. package/dist/collection/components/sd-guide/sd-guide.js +4 -4
  78. package/dist/collection/components/sd-input/sd-input.js +3 -3
  79. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +8 -8
  80. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  81. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  82. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  83. package/dist/collection/components/sd-modal-container/sd-modal-container.js +2 -2
  84. package/dist/collection/components/sd-number-input/sd-number-input.js +6 -6
  85. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  86. package/dist/collection/components/sd-popover/sd-popover.js +5 -5
  87. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  88. package/dist/collection/components/sd-portal/sd-portal.js +2 -2
  89. package/dist/collection/components/sd-radio/sd-radio.js +1 -1
  90. package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -3
  91. package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
  92. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +7 -3
  93. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +7 -7
  94. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +5 -5
  95. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +9 -4
  96. package/dist/collection/components/sd-select/sd-select.js +5 -5
  97. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  98. package/dist/collection/components/sd-table/sd-table.config.js +4 -0
  99. package/dist/collection/components/sd-table/sd-table.css +22 -3
  100. package/dist/collection/components/sd-table/sd-table.js +197 -50
  101. package/dist/collection/components/sd-table/sd-table.stories.helpers.js +2 -3
  102. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +5 -5
  103. package/dist/collection/components/sd-table/sd-td/sd-td.js +111 -9
  104. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +30 -16
  105. package/dist/collection/components/sd-table/sd-tr/sd-tr.css +20 -1
  106. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +97 -18
  107. package/dist/collection/components/sd-tabs/sd-tabs.js +7 -2
  108. package/dist/collection/components/sd-tag/sd-tag.config.js +3 -3
  109. package/dist/collection/components/sd-tag/sd-tag.js +6 -3
  110. package/dist/collection/components/sd-text-link/sd-text-link.js +8 -3
  111. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  112. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  113. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  114. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  115. package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
  116. package/dist/collection/index.js +1 -1
  117. package/dist/collection/utils/modal.js +1 -1
  118. package/dist/components/index.js +1 -1
  119. package/dist/components/p-B8o25hOw.js +1 -0
  120. package/dist/components/p-BFC3Etk2.js +1 -0
  121. package/dist/components/p-BQn6le_Y.js +1 -0
  122. package/dist/components/p-BRk9YZBe.js +1 -0
  123. package/dist/components/p-BRxXhFqt.js +1 -0
  124. package/dist/components/{p-D8WAP9T3.js → p-BSfu4DO2.js} +1 -1
  125. package/dist/components/p-BZabVWBD.js +1 -0
  126. package/dist/components/{p-BfkuCNCI.js → p-BeBiPTbd.js} +1 -1
  127. package/dist/components/p-BjkROjjt.js +1 -0
  128. package/dist/components/p-BjpbUGud.js +1 -0
  129. package/dist/components/p-BkWaPXXj.js +1 -0
  130. package/dist/components/p-BnfUIhUj.js +1 -0
  131. package/dist/components/p-Bs1Z5QtN.js +1 -0
  132. package/dist/components/{p-MQTl8fGT.js → p-BwPmM1Pm.js} +1 -1
  133. package/dist/components/p-C3fqSH7A.js +1 -0
  134. package/dist/components/p-CIUE4qr7.js +1 -0
  135. package/dist/components/p-CLxVZFEG.js +1 -0
  136. package/dist/components/p-CPuyhF6g.js +1 -0
  137. package/dist/components/p-CpgTSxf0.js +1 -0
  138. package/dist/components/p-Cx_d5vsS.js +1 -0
  139. package/dist/components/{p-BeK8amzx.js → p-CyObYB-g.js} +1 -1
  140. package/dist/components/p-D7nYP2a4.js +1 -0
  141. package/dist/components/{p-BPsOJlCP.js → p-DS7Ypvt5.js} +1 -1
  142. package/dist/components/p-Da5i_Sa6.js +1 -0
  143. package/dist/components/p-DhTcn6jX.js +1 -0
  144. package/dist/components/p-DlREBZ-C.js +1 -0
  145. package/dist/components/p-DnW8EAqd.js +1 -0
  146. package/dist/components/{p-D5TRyquv.js → p-FKKk7Bk8.js} +1 -1
  147. package/dist/components/{p-Dr1AMbBj.js → p-INdVvadB.js} +1 -1
  148. package/dist/components/p-JlZdKw4C.js +1 -0
  149. package/dist/components/p-VuxN5d2D.js +1 -0
  150. package/dist/components/p-WAsath62.js +1 -0
  151. package/dist/components/{p-ofkgu5aS.js → p-X-8I-A3g.js} +1 -1
  152. package/dist/components/{p-B1MabGRR.js → p-Z5Vk33zf.js} +1 -1
  153. package/dist/components/{p-DG45uNxd.js → p-kSfaCwf1.js} +1 -1
  154. package/dist/components/p-mmdt-WnS.js +1 -0
  155. package/dist/components/p-oyZgWRnC.js +1 -0
  156. package/dist/components/p-t161LJqb.js +1 -0
  157. package/dist/components/{p-CGBnxqG2.js → p-wOAxmZ1V.js} +1 -1
  158. package/dist/components/p-xX3QT-8K.js +1 -0
  159. package/dist/components/sd-action-modal.js +1 -1
  160. package/dist/components/sd-badge.js +1 -1
  161. package/dist/components/sd-barcode-input.js +1 -1
  162. package/dist/components/sd-button.js +1 -1
  163. package/dist/components/sd-calendar.js +1 -1
  164. package/dist/components/sd-card.js +1 -1
  165. package/dist/components/sd-checkbox.js +1 -1
  166. package/dist/components/sd-chip.js +1 -1
  167. package/dist/components/sd-circle-progress.js +1 -1
  168. package/dist/components/sd-confirm-modal.js +1 -1
  169. package/dist/components/sd-date-box.js +1 -1
  170. package/dist/components/sd-date-picker-trigger.js +1 -1
  171. package/dist/components/sd-date-picker.js +1 -1
  172. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  173. package/dist/components/sd-date-range-picker.js +1 -1
  174. package/dist/components/sd-dropdown-button.js +1 -1
  175. package/dist/components/sd-field.js +1 -1
  176. package/dist/components/sd-file-picker.js +1 -1
  177. package/dist/components/sd-floating-portal.js +1 -1
  178. package/dist/components/sd-form.js +1 -1
  179. package/dist/components/sd-ghost-button.js +1 -1
  180. package/dist/components/sd-guide.js +1 -1
  181. package/dist/components/sd-icon.js +1 -1
  182. package/dist/components/sd-input.js +1 -1
  183. package/dist/components/sd-key-value-table.js +1 -1
  184. package/dist/components/sd-linear-progress.js +1 -1
  185. package/dist/components/sd-loading-container.js +1 -1
  186. package/dist/components/sd-loading-modal.js +1 -1
  187. package/dist/components/sd-modal-container.js +1 -1
  188. package/dist/components/sd-number-input.js +1 -1
  189. package/dist/components/sd-pagination.js +1 -1
  190. package/dist/components/sd-popover.js +1 -1
  191. package/dist/components/sd-popup.js +1 -1
  192. package/dist/components/sd-portal.js +1 -1
  193. package/dist/components/sd-radio-button.js +1 -1
  194. package/dist/components/sd-radio-group.js +1 -1
  195. package/dist/components/sd-radio.js +1 -1
  196. package/dist/components/sd-select-list-item-search.js +1 -1
  197. package/dist/components/sd-select-list-item.js +1 -1
  198. package/dist/components/sd-select-listbox.js +1 -1
  199. package/dist/components/sd-select-trigger.js +1 -1
  200. package/dist/components/sd-select.js +1 -1
  201. package/dist/components/sd-switch.js +1 -1
  202. package/dist/components/sd-table.js +1 -1
  203. package/dist/components/sd-tabs.js +1 -1
  204. package/dist/components/sd-tag.js +1 -1
  205. package/dist/components/sd-tbody.js +1 -1
  206. package/dist/components/sd-td.js +1 -1
  207. package/dist/components/sd-text-link.js +1 -1
  208. package/dist/components/sd-textarea.js +1 -1
  209. package/dist/components/sd-thead.js +1 -1
  210. package/dist/components/sd-toast-container.js +1 -1
  211. package/dist/components/sd-toast.js +1 -1
  212. package/dist/components/sd-toggle.js +1 -1
  213. package/dist/components/sd-tooltip.js +1 -1
  214. package/dist/components/sd-tr.js +1 -1
  215. package/dist/design-system/design-system.css +1 -1
  216. package/dist/design-system/design-system.esm.js +1 -1
  217. package/dist/design-system/index.esm.js +1 -1
  218. package/dist/design-system/p-00854a0a.entry.js +1 -0
  219. package/dist/design-system/p-00b2c850.entry.js +1 -0
  220. package/dist/design-system/p-03badf68.entry.js +1 -0
  221. package/dist/design-system/p-0U6dRjlq.js +2 -0
  222. package/dist/design-system/{p-d78fbe16.entry.js → p-11b904a3.entry.js} +1 -1
  223. package/dist/design-system/p-32e2d71e.entry.js +1 -0
  224. package/dist/design-system/p-399d416c.entry.js +1 -0
  225. package/dist/design-system/{p-29ed11e5.entry.js → p-3b8954d9.entry.js} +1 -1
  226. package/dist/design-system/{p-feeb0cc5.entry.js → p-481e6934.entry.js} +1 -1
  227. package/dist/design-system/{p-328fae12.entry.js → p-4a91875c.entry.js} +1 -1
  228. package/dist/design-system/p-563b6fc2.entry.js +1 -0
  229. package/dist/design-system/p-679bce6c.entry.js +1 -0
  230. package/dist/design-system/{p-b6ca4461.entry.js → p-74bf0ed9.entry.js} +1 -1
  231. package/dist/design-system/{p-4e2953eb.entry.js → p-84a94775.entry.js} +1 -1
  232. package/dist/design-system/p-8f4ccae4.entry.js +1 -0
  233. package/dist/design-system/p-92f368a2.entry.js +1 -0
  234. package/dist/design-system/p-9681b0ba.entry.js +1 -0
  235. package/dist/design-system/{p-f5576a0d.entry.js → p-9b9bf9db.entry.js} +1 -1
  236. package/dist/design-system/p-9f7f1b8b.entry.js +1 -0
  237. package/dist/design-system/p-BGtUaScP.js +1 -0
  238. package/dist/design-system/p-BQn6le_Y.js +1 -0
  239. package/dist/design-system/p-BnfUIhUj.js +1 -0
  240. package/dist/{components/p-CT3dfy3K.js → design-system/p-C29HUShl.js} +1 -1
  241. package/dist/design-system/p-TF8_Lyhq.js +1 -0
  242. package/dist/design-system/p-a640e509.entry.js +1 -0
  243. package/dist/design-system/{p-20a50702.entry.js → p-a71d4947.entry.js} +1 -1
  244. package/dist/design-system/p-a7ea1cf0.entry.js +1 -0
  245. package/dist/design-system/{p-e1c0a3c9.entry.js → p-a97033a2.entry.js} +1 -1
  246. package/dist/design-system/p-a98f9a29.entry.js +1 -0
  247. package/dist/design-system/{p-7882e388.entry.js → p-ae117afa.entry.js} +1 -1
  248. package/dist/design-system/{p-f3cfff78.entry.js → p-aeccfb2b.entry.js} +1 -1
  249. package/dist/design-system/p-c7099e9e.entry.js +1 -0
  250. package/dist/design-system/p-cc97f4b4.entry.js +1 -0
  251. package/dist/design-system/{p-b96c694c.entry.js → p-d39e515d.entry.js} +1 -1
  252. package/dist/design-system/p-dbeaeb31.entry.js +1 -0
  253. package/dist/design-system/p-e23dac79.entry.js +1 -0
  254. package/dist/design-system/{p-c0f60b00.entry.js → p-e611dcd4.entry.js} +1 -1
  255. package/dist/design-system/{p-a942dfbe.entry.js → p-e8e64511.entry.js} +1 -1
  256. package/dist/design-system/{p-cd8e4dd6.entry.js → p-e902a3f4.entry.js} +1 -1
  257. package/dist/design-system/p-f7074386.entry.js +1 -0
  258. package/dist/design-system/p-f721a6c6.entry.js +1 -0
  259. package/dist/design-system/{p-b1bb0d72.entry.js → p-fc5c4f85.entry.js} +1 -1
  260. package/dist/design-system/p-fe0a5368.entry.js +1 -0
  261. package/dist/design-system/{p-cbda9194.entry.js → p-fe3ae346.entry.js} +1 -1
  262. package/dist/design-system/p-ffaa4b5d.entry.js +1 -0
  263. package/dist/design-system/p-mmdt-WnS.js +1 -0
  264. package/dist/esm/component.datepicker-BQn6le_Y.js +119 -0
  265. package/dist/esm/{component.table-BQ6at17Y.js → component.table-BnfUIhUj.js} +11 -1
  266. package/dist/esm/design-system.js +3 -3
  267. package/dist/esm/{index-CLCoul8o.js → index-0U6dRjlq.js} +1 -1
  268. package/dist/esm/index.js +1 -1
  269. package/dist/esm/loader.js +3 -3
  270. package/dist/esm/sd-action-modal.entry.js +2 -2
  271. package/dist/esm/sd-badge.entry.js +2 -2
  272. package/dist/esm/sd-barcode-input.entry.js +2 -2
  273. package/dist/esm/sd-button_2.entry.js +277 -10
  274. package/dist/esm/sd-calendar_2.entry.js +259 -0
  275. package/dist/esm/sd-card.entry.js +2 -2
  276. package/dist/esm/sd-checkbox.entry.js +4 -4
  277. package/dist/esm/sd-chip.entry.js +4 -4
  278. package/dist/esm/sd-circle-progress.entry.js +2 -2
  279. package/dist/esm/sd-confirm-modal_2.entry.js +4 -4
  280. package/dist/esm/sd-date-box.entry.js +8 -3
  281. package/dist/esm/sd-date-picker.config-CGEE3DkI.js +34 -0
  282. package/dist/esm/sd-date-picker_7.entry.js +27 -20
  283. package/dist/esm/sd-date-range-picker-calendar.entry.js +22 -22
  284. package/dist/esm/sd-dropdown-button.entry.js +10 -6
  285. package/dist/esm/sd-field_3.entry.js +31 -30
  286. package/dist/esm/sd-form.entry.js +5 -5
  287. package/dist/esm/sd-ghost-button.entry.js +4 -4
  288. package/dist/esm/sd-guide.entry.js +5 -5
  289. package/dist/esm/sd-key-value-table.entry.js +10 -10
  290. package/dist/esm/sd-linear-progress.entry.js +2 -2
  291. package/dist/esm/sd-loading-container.entry.js +3 -3
  292. package/dist/esm/sd-modal-container.entry.js +3 -3
  293. package/dist/esm/sd-pagination_4.entry.js +116 -43
  294. package/dist/esm/sd-popover.entry.js +6 -6
  295. package/dist/esm/sd-popup.entry.js +2 -2
  296. package/dist/esm/sd-portal.entry.js +3 -3
  297. package/dist/esm/sd-radio-button.entry.js +7 -4
  298. package/dist/esm/sd-radio.entry.js +2 -2
  299. package/dist/esm/sd-select-list-item_2.entry.js +15 -11
  300. package/dist/esm/sd-select_3.entry.js +20 -15
  301. package/dist/esm/sd-switch.entry.js +2 -2
  302. package/dist/esm/{sd-table.config-0Te8GLCI.js → sd-table.config-B-VgXXT7.js} +13 -3
  303. package/dist/esm/sd-table.entry.js +170 -47
  304. package/dist/esm/sd-tabs.entry.js +8 -3
  305. package/dist/esm/sd-tag.entry.js +10 -10
  306. package/dist/esm/sd-td.entry.js +52 -10
  307. package/dist/esm/sd-text-link.entry.js +9 -4
  308. package/dist/esm/sd-toast-container.entry.js +2 -2
  309. package/dist/esm/sd-toast.entry.js +3 -3
  310. package/dist/esm/sd-toggle.entry.js +2 -2
  311. package/dist/esm/{tooltipArrow-Bc-yw2nt.js → tooltipArrow-O5LOsHae.js} +1 -1
  312. package/dist/esm/useDatePicker-D5RmWGOp.js +98 -0
  313. package/dist/types/components/sd-calendar/sd-calendar.config.d.ts +55 -0
  314. package/dist/types/components/sd-calendar/sd-calendar.d.ts +18 -21
  315. package/dist/types/components/sd-date-picker/sd-date-picker.config.d.ts +0 -38
  316. package/dist/types/components/sd-date-range-picker/sd-date-range-picker.config.d.ts +2 -1
  317. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +3 -2
  318. package/dist/types/components/sd-table/constants.d.ts +2 -0
  319. package/dist/types/components/sd-table/sd-table.config.d.ts +4 -0
  320. package/dist/types/components/sd-table/sd-table.d.ts +19 -15
  321. package/dist/types/components/sd-table/sd-td/sd-td.d.ts +6 -0
  322. package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +7 -0
  323. package/dist/types/components/sd-tag/sd-tag.d.ts +1 -0
  324. package/dist/types/components.d.ts +47 -60
  325. package/dist/types/index.d.ts +4 -3
  326. package/hydrate/index.js +1359 -1130
  327. package/hydrate/index.mjs +1359 -1130
  328. package/package.json +1 -1
  329. package/dist/cjs/resolveColor-B0hzQNLG.js +0 -270
  330. package/dist/cjs/sd-calendar.cjs.entry.js +0 -143
  331. package/dist/cjs/sd-date-picker-calendar_2.cjs.entry.js +0 -214
  332. package/dist/cjs/sd-date-picker.config-CjvrFpYK.js +0 -177
  333. package/dist/cjs/useDatePicker-cK_XK_P6.js +0 -48
  334. package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.css +0 -117
  335. package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +0 -246
  336. package/dist/components/p--t9jBTYS.js +0 -1
  337. package/dist/components/p-At6nBeyO.js +0 -1
  338. package/dist/components/p-B6cqMQaM.js +0 -1
  339. package/dist/components/p-B73VhbYi.js +0 -1
  340. package/dist/components/p-BDQQllAo.js +0 -1
  341. package/dist/components/p-BDr27lvk.js +0 -1
  342. package/dist/components/p-BQ6at17Y.js +0 -1
  343. package/dist/components/p-BW_sBt7X.js +0 -1
  344. package/dist/components/p-BX3TJuQY.js +0 -1
  345. package/dist/components/p-Bm_T3qE0.js +0 -1
  346. package/dist/components/p-BnzK4uU4.js +0 -1
  347. package/dist/components/p-BqkJ0rZv.js +0 -1
  348. package/dist/components/p-C4PmGpW8.js +0 -1
  349. package/dist/components/p-C9CszVFl.js +0 -1
  350. package/dist/components/p-CGQWERwE.js +0 -1
  351. package/dist/components/p-CZmKBmKx.js +0 -1
  352. package/dist/components/p-CnarDyZi.js +0 -1
  353. package/dist/components/p-Cr2ghUra.js +0 -1
  354. package/dist/components/p-Cspm6LxP.js +0 -1
  355. package/dist/components/p-Cx3jXw9J.js +0 -1
  356. package/dist/components/p-DG-4Ifco.js +0 -1
  357. package/dist/components/p-DTrMR0rx.js +0 -1
  358. package/dist/components/p-DfXAgw0E.js +0 -1
  359. package/dist/components/p-MMkRcTBd.js +0 -1
  360. package/dist/components/p-ZstG0XdT.js +0 -1
  361. package/dist/components/p-h7eBUL4i.js +0 -1
  362. package/dist/components/p-lyB7zSp-.js +0 -1
  363. package/dist/components/p-oIM6jNZe.js +0 -1
  364. package/dist/components/p-oKHZl8yu.js +0 -1
  365. package/dist/components/sd-date-picker-calendar.d.ts +0 -11
  366. package/dist/components/sd-date-picker-calendar.js +0 -1
  367. package/dist/design-system/p-02289728.entry.js +0 -1
  368. package/dist/design-system/p-17d66d85.entry.js +0 -1
  369. package/dist/design-system/p-18466728.entry.js +0 -1
  370. package/dist/design-system/p-1bb86d69.entry.js +0 -1
  371. package/dist/design-system/p-21874054.entry.js +0 -1
  372. package/dist/design-system/p-282cbefa.entry.js +0 -1
  373. package/dist/design-system/p-35dce399.entry.js +0 -1
  374. package/dist/design-system/p-39ff56b4.entry.js +0 -1
  375. package/dist/design-system/p-3cb712a6.entry.js +0 -1
  376. package/dist/design-system/p-7610153d.entry.js +0 -1
  377. package/dist/design-system/p-7722ddeb.entry.js +0 -1
  378. package/dist/design-system/p-7bfa0cf9.entry.js +0 -1
  379. package/dist/design-system/p-824ecfb5.entry.js +0 -1
  380. package/dist/design-system/p-9a04b341.entry.js +0 -1
  381. package/dist/design-system/p-B6cqMQaM.js +0 -1
  382. package/dist/design-system/p-BQ6at17Y.js +0 -1
  383. package/dist/design-system/p-CGQWERwE.js +0 -1
  384. package/dist/design-system/p-CLCoul8o.js +0 -2
  385. package/dist/design-system/p-Ce0cmS4R.js +0 -1
  386. package/dist/design-system/p-DTrMR0rx.js +0 -1
  387. package/dist/design-system/p-Dmf0PYdM.js +0 -1
  388. package/dist/design-system/p-a7a0ca14.entry.js +0 -1
  389. package/dist/design-system/p-b04b22c6.entry.js +0 -1
  390. package/dist/design-system/p-baed13e4.entry.js +0 -1
  391. package/dist/design-system/p-bd45e65d.entry.js +0 -1
  392. package/dist/design-system/p-bf4156d8.entry.js +0 -1
  393. package/dist/design-system/p-c228c2c7.entry.js +0 -1
  394. package/dist/design-system/p-cf382479.entry.js +0 -1
  395. package/dist/design-system/p-d0de34fd.entry.js +0 -1
  396. package/dist/design-system/p-f60cc7be.entry.js +0 -1
  397. package/dist/esm/resolveColor-Ce0cmS4R.js +0 -268
  398. package/dist/esm/sd-calendar.entry.js +0 -141
  399. package/dist/esm/sd-date-picker-calendar_2.entry.js +0 -211
  400. package/dist/esm/sd-date-picker.config-B6cqMQaM.js +0 -171
  401. package/dist/esm/useDatePicker-DTrMR0rx.js +0 -45
  402. package/dist/types/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.d.ts +0 -26
@@ -1,126 +1,194 @@
1
1
  import { h } from "@stencil/core";
2
- import { useDatePicker } from "../../modules/useDatePicker";
3
- import { resolveColor } from "../../utils/color";
4
2
  import { today } from "../../utils/date";
5
- const DEFAULT_COLORS = [
6
- 'brilliantblue_75',
7
- 'red_60',
8
- 'green_65',
9
- 'orange_60',
10
- 'steelblue_65',
11
- 'yellow_45',
12
- 'oceanblue_65',
13
- 'olive_55',
14
- ];
3
+ import { useDatePicker } from "../../modules/useDatePicker";
4
+ import { CALENDAR_LAYOUT, WEEK_LABELS } from "./sd-calendar.config";
15
5
  export class SdCalendar {
16
6
  value = null;
17
7
  selectable;
18
8
  events;
19
- eventColors;
20
9
  currentYear;
21
10
  currentMonth;
22
- eventsRevision = 0;
23
- select;
11
+ update;
24
12
  viewChange;
25
13
  dateUtil = useDatePicker();
14
+ _eventMapCache;
15
+ get eventMap() {
16
+ const cache = this._eventMapCache;
17
+ if (cache && cache.src === this.events)
18
+ return cache.map;
19
+ const map = new Map();
20
+ (this.events ?? []).forEach(g => g.dates.forEach(d => {
21
+ const arr = map.get(d) ?? [];
22
+ arr.push({ color: g.color, label: g.label });
23
+ map.set(d, arr);
24
+ }));
25
+ this._eventMapCache = { src: this.events, map };
26
+ return map;
27
+ }
28
+ get legendItems() {
29
+ const seen = new Set();
30
+ const out = [];
31
+ (this.events ?? []).forEach(g => {
32
+ const key = `${g.color}|${g.label}`;
33
+ if (seen.has(key))
34
+ return;
35
+ seen.add(key);
36
+ out.push({ color: g.color, label: g.label });
37
+ });
38
+ return out;
39
+ }
26
40
  componentWillLoad() {
27
- this.initCalendar();
41
+ this.syncViewFromValue();
28
42
  }
29
43
  handleValueChange() {
30
- this.initCalendar();
31
- }
32
- handleEventsChange() {
33
- this.eventsRevision = this.eventsRevision + 1;
44
+ this.syncViewFromValue();
34
45
  }
35
- initCalendar() {
46
+ syncViewFromValue() {
36
47
  const base = this.value || today;
37
48
  const [year, month] = base.split('-').map(Number);
38
49
  this.currentYear = year;
39
50
  this.currentMonth = month;
40
51
  }
41
- get calendar() {
42
- return this.dateUtil.createCalendar(this.currentYear, this.currentMonth);
52
+ formatDate(year, month, day) {
53
+ return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
43
54
  }
44
- handleUpdateMonth(type) {
45
- const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, type);
46
- this.currentYear = newYear;
47
- this.currentMonth = newMonth;
48
- this.viewChange.emit({ year: newYear, month: newMonth });
49
- }
50
- handleDateClick(day) {
51
- if (day === 0)
52
- return;
53
- const date = this.dateUtil.formatDate(this.currentYear, this.currentMonth, day);
54
- this.value = date;
55
- this.select.emit(date);
56
- }
57
- isDisabledDate(date) {
58
- if (this.selectable === undefined)
59
- return false;
60
- const [startSelectable, endSelectable] = this.selectable;
61
- if (startSelectable !== '' && endSelectable !== '') {
62
- return date < startSelectable || date > endSelectable;
55
+ get cells() {
56
+ const year = this.currentYear;
57
+ const month = this.currentMonth;
58
+ const firstDayIndex = new Date(year, month - 1, 1).getDay();
59
+ const daysInCurrent = new Date(year, month, 0).getDate();
60
+ const prevMonth = month === 1 ? 12 : month - 1;
61
+ const prevYear = month === 1 ? year - 1 : year;
62
+ const daysInPrev = new Date(prevYear, prevMonth, 0).getDate();
63
+ const nextMonth = month === 12 ? 1 : month + 1;
64
+ const nextYear = month === 12 ? year + 1 : year;
65
+ const cells = [];
66
+ for (let i = firstDayIndex - 1; i >= 0; i--) {
67
+ const day = daysInPrev - i;
68
+ cells.push({
69
+ date: this.formatDate(prevYear, prevMonth, day),
70
+ day,
71
+ inCurrentMonth: false,
72
+ });
63
73
  }
64
- if (startSelectable !== '') {
65
- return date < startSelectable;
74
+ for (let day = 1; day <= daysInCurrent; day++) {
75
+ cells.push({
76
+ date: this.formatDate(year, month, day),
77
+ day,
78
+ inCurrentMonth: true,
79
+ });
66
80
  }
67
- if (endSelectable !== '') {
68
- return date > endSelectable;
81
+ const remaining = (7 - (cells.length % 7)) % 7;
82
+ for (let day = 1; day <= remaining; day++) {
83
+ cells.push({
84
+ date: this.formatDate(nextYear, nextMonth, day),
85
+ day,
86
+ inCurrentMonth: false,
87
+ });
69
88
  }
70
- return false;
89
+ return cells;
71
90
  }
72
- getEventColor(eventName) {
73
- if (this.eventColors?.[eventName] !== undefined && this.eventColors[eventName] !== '') {
74
- return resolveColor(this.eventColors[eventName]);
75
- }
76
- const allEventNames = this.getAllEventNames();
77
- const index = allEventNames.indexOf(eventName);
78
- return resolveColor(DEFAULT_COLORS[index % DEFAULT_COLORS.length]);
91
+ emitViewChange() {
92
+ this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
79
93
  }
80
- getAllEventNames() {
81
- const names = new Set();
82
- if (this.eventColors) {
83
- for (const name of Object.keys(this.eventColors)) {
84
- names.add(name);
85
- }
86
- }
87
- if (this.events) {
88
- for (const dateEvents of Object.values(this.events)) {
89
- for (const name of dateEvents) {
90
- names.add(name);
91
- }
92
- }
93
- }
94
- return Array.from(names);
94
+ goPrevYear = (event) => {
95
+ event.stopPropagation();
96
+ this.currentYear -= 1;
97
+ this.emitViewChange();
98
+ };
99
+ goNextYear = (event) => {
100
+ event.stopPropagation();
101
+ this.currentYear += 1;
102
+ this.emitViewChange();
103
+ };
104
+ goPrevMonth = (event) => {
105
+ event.stopPropagation();
106
+ const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'prev');
107
+ this.currentYear = newYear;
108
+ this.currentMonth = newMonth;
109
+ this.emitViewChange();
110
+ };
111
+ goNextMonth = (event) => {
112
+ event.stopPropagation();
113
+ const { newYear, newMonth } = this.dateUtil.calculateYearMonth(this.currentYear, this.currentMonth, 'next');
114
+ this.currentYear = newYear;
115
+ this.currentMonth = newMonth;
116
+ this.emitViewChange();
117
+ };
118
+ isDisabled(date) {
119
+ if (!this.selectable)
120
+ return false;
121
+ const [start, end] = this.selectable;
122
+ if (start !== '' && date < start)
123
+ return true;
124
+ if (end !== '' && date > end)
125
+ return true;
126
+ return false;
95
127
  }
96
- getEventsForDate(date) {
97
- return this.events?.[date] ?? [];
128
+ handleDayClick(cell) {
129
+ if (this.isDisabled(cell.date))
130
+ return;
131
+ this.value = cell.date;
132
+ this.update.emit(cell.date);
98
133
  }
99
134
  render() {
100
- // eventsRevision 참조로 events/eventColors 변경 시 re-render 보장
101
- void this.eventsRevision;
102
- const allEventNames = this.getAllEventNames();
103
- return (h("div", { key: '3c3a6af518a3e96dd5d5d553ab2a00b9dd882221', class: "sd-calendar" }, h("div", { key: '660e96fcefe539b69ae7b69bb7a7eb209f40b02f', class: "sd-calendar__header" }, h("div", { key: '609b4d2e552adb526deefbf0719284c94ab01c21', class: "year-nav" }, h("button", { key: 'dc80f2e4fa441b9ed2e0a475f7982e7339c0cda7', type: "button", name: "prev-year", title: "Previous Year", onClick: () => {
104
- this.currentYear = this.currentYear - 1;
105
- this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
106
- } }, h("sd-icon", { key: 'ff62edabb67364704a4bfbcfc6f1658ad3d72408', name: "arrowLeft", size: "12", color: "grey_45" })), h("span", { key: '0829c746b8537196652e7c40b3babea14ae8053e', class: "year-nav__current" }, this.currentYear), h("button", { key: '3d288e5091445f2ed429de4aebb0d03f29eb6cc8', type: "button", name: "next-year", title: "Next Year", onClick: () => {
107
- this.currentYear = this.currentYear + 1;
108
- this.viewChange.emit({ year: this.currentYear, month: this.currentMonth });
109
- } }, h("sd-icon", { key: '5546ced1930082c68035db8b506b6ef2e953e305', name: "arrowRight", size: "12", color: "grey_45" }))), h("div", { key: '1db95c9f31c1a11b58a6f1ce4a13b9d6388f7994', class: "month-nav" }, h("button", { key: '2c5659945f3e0807a57ba22eb34576184e6ebf50', type: "button", name: "prev-month", title: "Previous Month", onClick: () => this.handleUpdateMonth('prev') }, h("sd-icon", { key: '7994e2bf63fc45ffb7d29b49ad279223a1a12a98', name: "arrowLeft", size: "12", color: "grey_45" })), h("span", { key: 'a8afd7592b3fba13a4560387bb759f4858273a85', class: "month-nav__current" }, this.currentMonth, "\uC6D4"), h("button", { key: 'b3d21b13823bd674c43c1782b66df38010fcfa59', type: "button", name: "next-month", title: "Next Month", onClick: () => this.handleUpdateMonth('next') }, h("sd-icon", { key: '8605340fe8128b6a55328c97dc84481092009c76', name: "arrowRight", size: "12", color: "grey_45" })))), h("div", { key: '9312ff7f3af76aced7189f121c71ff252a92a71d', class: "sd-calendar__days" }, ['일', '월', '화', '수', '목', '금', '토'].map(day => (h("div", { key: day, class: "day" }, day)))), h("div", { key: 'cb93d417204b3bad65074e06e491038fe06b1389', class: { 'sd-calendar__body': true, 'sd-calendar__body--has-events': !!this.events } }, [
110
- ...this.calendar.prevMonthDays,
111
- ...this.calendar.days,
112
- ...this.calendar.afterMonthDays,
113
- ].map((day, idx) => {
114
- const formattedDate = this.dateUtil.formatDate(this.currentYear, this.currentMonth, Number(day));
115
- const dateEvents = day !== 0 ? this.getEventsForDate(formattedDate) : [];
116
- const uniqueEvents = [...new Set(dateEvents)];
117
- return (h("div", { class: "sd-calendar__cell", key: `${day}_${idx}` }, h("sd-date-box", { date: day === 0 ? '' : Number(day), selected: this.value === formattedDate, isToday: today === formattedDate, disabled: day === 0 ? true : this.isDisabledDate(formattedDate), onClick: !this.isDisabledDate(formattedDate) && day !== 0
118
- ? () => this.handleDateClick(Number(day))
119
- : undefined }), this.events !== undefined && (h("div", { class: "sd-calendar__dots" }, uniqueEvents.map(eventName => (h("span", { key: eventName, class: "sd-calendar__dot", style: { backgroundColor: this.getEventColor(eventName) } })))))));
120
- })), allEventNames.length > 0 && (h("div", { key: '0556e06bcd0bab75b61c60181d9b203cb6ad4741', class: "sd-calendar__legend" }, allEventNames.map(name => (h("div", { key: name, class: "sd-calendar__legend-item" }, h("span", { class: "sd-calendar__legend-dot", style: { backgroundColor: this.getEventColor(name) } }), h("span", { class: "sd-calendar__legend-label" }, name))))))));
135
+ const cssVars = {
136
+ '--calendar-bg': CALENDAR_LAYOUT.bg,
137
+ '--calendar-padding': `${CALENDAR_LAYOUT.paddingXY}px`,
138
+ '--calendar-gap': `${CALENDAR_LAYOUT.gap}px`,
139
+ '--calendar-radius': `${CALENDAR_LAYOUT.radius}px`,
140
+ '--calendar-header-gap': `${CALENDAR_LAYOUT.header.gap}px`,
141
+ '--calendar-header-divider': CALENDAR_LAYOUT.header.divider,
142
+ '--calendar-header-font-size': `${CALENDAR_LAYOUT.header.fontSize}px`,
143
+ '--calendar-header-line-height': `${CALENDAR_LAYOUT.header.lineHeight}px`,
144
+ '--calendar-header-font-weight': CALENDAR_LAYOUT.header.fontWeight,
145
+ '--calendar-week-font-size': `${CALENDAR_LAYOUT.week.fontSize}px`,
146
+ '--calendar-week-line-height': `${CALENDAR_LAYOUT.week.lineHeight}px`,
147
+ '--calendar-week-font-weight': CALENDAR_LAYOUT.week.fontWeight,
148
+ '--calendar-week-color': CALENDAR_LAYOUT.week.color,
149
+ '--calendar-grid-row-gap': `${CALENDAR_LAYOUT.grid.rowGap}px`,
150
+ '--calendar-day-size': `${CALENDAR_LAYOUT.day.size}px`,
151
+ '--calendar-day-circle-size': `${CALENDAR_LAYOUT.day.circleSize}px`,
152
+ '--calendar-day-circle-radius': `${CALENDAR_LAYOUT.day.circleRadius}px`,
153
+ '--calendar-day-text': CALENDAR_LAYOUT.day.defaultText,
154
+ '--calendar-day-hover-text': CALENDAR_LAYOUT.day.hoverText,
155
+ '--calendar-day-hover-border': CALENDAR_LAYOUT.day.hoverBorder,
156
+ '--calendar-day-select-bg': CALENDAR_LAYOUT.day.selectBg,
157
+ '--calendar-day-select-text': CALENDAR_LAYOUT.day.selectText,
158
+ '--calendar-day-disabled-text': CALENDAR_LAYOUT.day.disabledText,
159
+ '--calendar-day-font-size': `${CALENDAR_LAYOUT.day.fontSize}px`,
160
+ '--calendar-day-line-height': `${CALENDAR_LAYOUT.day.lineHeight}px`,
161
+ '--calendar-day-font-weight': CALENDAR_LAYOUT.day.fontWeight,
162
+ '--calendar-day-bold-font-weight': CALENDAR_LAYOUT.day.boldFontWeight,
163
+ '--calendar-day-dot-size': `${CALENDAR_LAYOUT.day.dot.size}px`,
164
+ '--calendar-day-dot-gap': `${CALENDAR_LAYOUT.day.dot.gap}px`,
165
+ '--calendar-day-dot-padding-y': `${CALENDAR_LAYOUT.day.dot.paddingY}px`,
166
+ '--calendar-legend-font-size': `${CALENDAR_LAYOUT.legend.fontSize}px`,
167
+ '--calendar-legend-line-height': `${CALENDAR_LAYOUT.legend.lineHeight}px`,
168
+ '--calendar-legend-font-weight': CALENDAR_LAYOUT.legend.fontWeight,
169
+ '--calendar-legend-gap': `${CALENDAR_LAYOUT.legend.gap}px`,
170
+ '--calendar-legend-group-gap': `${CALENDAR_LAYOUT.legend.groupGap}px`,
171
+ };
172
+ const eventMap = this.eventMap;
173
+ const legend = this.legendItems;
174
+ return (h("div", { key: '66c0bec57c13af12b05f2e90fbc5e1674ab052c8', class: "sd-calendar", style: cssVars }, h("div", { key: '4df4f1c6d1ddcbe1478a69a481a228e66fc33c0a', class: "sd-calendar__header" }, h("div", { key: '378c04444b3ddcc7df92ecce0f49056e919cd8e5', class: "sd-calendar__nav-group" }, h("sd-ghost-button", { key: '47426c62a26b05a9db58144acc33770713e7fce4', ariaLabel: "prevYear", size: "xxs", icon: "chevronLeft", onClick: this.goPrevYear }), h("span", { key: '3b32e76a8a35705d820803c0b747829370079324', class: "sd-calendar__label" }, this.currentYear), h("sd-ghost-button", { key: '2e890a2cea91c9f49a03f0db3a4b943c707e312e', ariaLabel: "nextYear", size: "xxs", icon: "chevronRight", onClick: this.goNextYear })), h("span", { key: '795bb8452e75303c25a8dc6d95f819f1e42f7f49', class: "sd-calendar__divider", "aria-hidden": "true" }), h("div", { key: '6df460ec38917c51eff851732c7f37b7e09475f6', class: "sd-calendar__nav-group sd-calendar__nav-group-month" }, h("sd-ghost-button", { key: '36ef9dfdcfac5d9da08d05ca357fc9ec4100af4f', ariaLabel: "prevMonth", size: "xxs", icon: "chevronLeft", onClick: this.goPrevMonth }), h("span", { key: 'b2e0cc74570724c0d97fb2afbcb775c0794583af', class: "sd-calendar__label sd-calendar__label-month" }, this.currentMonth, "\uC6D4"), h("sd-ghost-button", { key: '4c45467356411f7a5d137c19931d8fc62084c742', ariaLabel: "nextMonth", size: "xxs", icon: "chevronRight", onClick: this.goNextMonth }))), h("div", { key: 'e1637a39795fb44bd33d138c8b244cc15b5f85f6', class: "sd-calendar__week" }, WEEK_LABELS.map(label => (h("span", { key: label, class: "sd-calendar__week-cell" }, label)))), h("div", { key: '45642dc93b1373dc760f64ba74dd931e651279dd', class: "sd-calendar__grid" }, this.cells.map(cell => {
175
+ const isSelected = cell.inCurrentMonth && this.value !== '' && this.value === cell.date;
176
+ const isToday = cell.inCurrentMonth && today === cell.date;
177
+ const isDisabled = cell.inCurrentMonth && this.isDisabled(cell.date);
178
+ const dayEvents = cell.inCurrentMonth ? eventMap.get(cell.date) : undefined;
179
+ return (h("button", { type: "button", key: cell.date, class: {
180
+ 'sd-calendar__day': true,
181
+ 'sd-calendar__day--empty': !cell.inCurrentMonth,
182
+ 'sd-calendar__day--today': isToday,
183
+ 'sd-calendar__day--selected': isSelected,
184
+ 'sd-calendar__day--disabled': isDisabled,
185
+ }, disabled: !cell.inCurrentMonth || isDisabled, tabindex: !cell.inCurrentMonth ? -1 : undefined, "aria-hidden": !cell.inCurrentMonth ? 'true' : undefined, onClick: () => cell.inCurrentMonth && this.handleDayClick(cell) }, h("span", { class: "sd-calendar__day-circle" }, cell.inCurrentMonth ? cell.day : ''), dayEvents && dayEvents.length > 0 && (h("span", { class: "sd-calendar__dot-row", "aria-hidden": "true" }, dayEvents.map((ev, i) => (h("span", { key: `${ev.color}|${ev.label}|${i}`, class: "sd-calendar__dot", style: { backgroundColor: ev.color } })))))));
186
+ })), legend.length > 0 && [
187
+ h("span", { key: '0872cb7627db7d33721fbd1e1c9a601bd3c6c3e1', class: "sd-calendar__divider-bottom", "aria-hidden": "true" }),
188
+ h("div", { key: 'd9c6be0684720aa9d2af24b2d0cf372a036dc8d5', class: "sd-calendar__legend" }, legend.map(item => (h("span", { key: `${item.color}|${item.label}`, class: "sd-calendar__legend-item" }, h("span", { class: "sd-calendar__legend-dot", style: { backgroundColor: item.color }, "aria-hidden": "true" }), h("span", { class: "sd-calendar__legend-label" }, item.label))))),
189
+ ]));
121
190
  }
122
191
  static get is() { return "sd-calendar"; }
123
- static get encapsulation() { return "scoped"; }
124
192
  static get originalStyleUrls() {
125
193
  return {
126
194
  "$": ["sd-calendar.scss"]
@@ -149,7 +217,7 @@ export class SdCalendar {
149
217
  },
150
218
  "getter": false,
151
219
  "setter": false,
152
- "reflect": true,
220
+ "reflect": false,
153
221
  "attribute": "value",
154
222
  "defaultValue": "null"
155
223
  },
@@ -174,36 +242,14 @@ export class SdCalendar {
174
242
  "type": "unknown",
175
243
  "mutable": false,
176
244
  "complexType": {
177
- "original": "CalendarEvents",
178
- "resolved": "CalendarEvents | undefined",
179
- "references": {
180
- "CalendarEvents": {
181
- "location": "local",
182
- "path": "/Users/meijing/Documents/sellmate/frontend/design-system/packages/stencil/src/components/sd-calendar/sd-calendar.tsx",
183
- "id": "src/components/sd-calendar/sd-calendar.tsx::CalendarEvents"
184
- }
185
- }
186
- },
187
- "required": false,
188
- "optional": true,
189
- "docs": {
190
- "tags": [],
191
- "text": ""
192
- },
193
- "getter": false,
194
- "setter": false
195
- },
196
- "eventColors": {
197
- "type": "unknown",
198
- "mutable": false,
199
- "complexType": {
200
- "original": "CalendarEventColors",
201
- "resolved": "CalendarEventColors | undefined",
245
+ "original": "CalendarEventGroup[]",
246
+ "resolved": "CalendarEventGroup[] | undefined",
202
247
  "references": {
203
- "CalendarEventColors": {
204
- "location": "local",
205
- "path": "/Users/meijing/Documents/sellmate/frontend/design-system/packages/stencil/src/components/sd-calendar/sd-calendar.tsx",
206
- "id": "src/components/sd-calendar/sd-calendar.tsx::CalendarEventColors"
248
+ "CalendarEventGroup": {
249
+ "location": "import",
250
+ "path": "./sd-calendar.config",
251
+ "id": "src/components/sd-calendar/sd-calendar.config.ts::CalendarEventGroup",
252
+ "referenceLocation": "CalendarEventGroup"
207
253
  }
208
254
  }
209
255
  },
@@ -221,14 +267,13 @@ export class SdCalendar {
221
267
  static get states() {
222
268
  return {
223
269
  "currentYear": {},
224
- "currentMonth": {},
225
- "eventsRevision": {}
270
+ "currentMonth": {}
226
271
  };
227
272
  }
228
273
  static get events() {
229
274
  return [{
230
- "method": "select",
231
- "name": "sdSelect",
275
+ "method": "update",
276
+ "name": "sdUpdate",
232
277
  "bubbles": true,
233
278
  "cancelable": true,
234
279
  "composed": true,
@@ -262,12 +307,6 @@ export class SdCalendar {
262
307
  return [{
263
308
  "propName": "value",
264
309
  "methodName": "handleValueChange"
265
- }, {
266
- "propName": "events",
267
- "methodName": "handleEventsChange"
268
- }, {
269
- "propName": "eventColors",
270
- "methodName": "handleEventsChange"
271
310
  }];
272
311
  }
273
312
  }
@@ -3,7 +3,7 @@ export class SdCard {
3
3
  bordered = false;
4
4
  sdClass = '';
5
5
  render() {
6
- return (h(Fragment, { key: '2700ffa3af5b6b35882c396a838d9da2e866ee4b' }, h("div", { key: '3d3aeaac318fc089c42ae4348bc72015d4476276', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, h("slot", { key: 'e72f00bc8c209644baf5f431ce485fb5b691f354' }))));
6
+ return (h(Fragment, { key: '61c364f88b03eb56b60c660a58533f417d209e6a' }, h("div", { key: 'dee3671e757c273ffec06a15a0191a798280522c', class: `sd-card ${this.bordered ? 'sd-card--bordered' : ''} ${this.sdClass}` }, h("slot", { key: 'f991bf5df95f8c1bac417aa4e70f40cf68624fb8' }))));
7
7
  }
8
8
  static get is() { return "sd-card"; }
9
9
  static get originalStyleUrls() {
@@ -100,13 +100,13 @@ export class SdCheckbox {
100
100
  '--sd-checkbox-inverse-icon': CHECKBOX_COLORS.checked.iconInverse,
101
101
  '--sd-checkbox-inverse-label': CHECKBOX_COLORS.labelInverse,
102
102
  };
103
- return (h("label", { key: '6b1ad950ce2f0b8e734efab6889a46064f7ef32a', class: this.checkboxClasses, style: cssVars }, h("input", { key: 'ee2fd70d61db2a5de6eab26dc07128e6158540e5', type: "checkbox", ref: el => {
103
+ return (h("label", { key: '6fb506c448a5968d403f779d113fd60857901982', class: this.checkboxClasses, style: cssVars }, h("input", { key: 'fb08f531416255b8886d2bd2c21c3f62e8a9d47d', type: "checkbox", ref: el => {
104
104
  this.inputEl = el;
105
- }, value: this.val, checked: !!this.isChecked, disabled: this.disabled, onChange: this.handleChange, name: this.val?.toString() || 'checkbox', "aria-label": this.label || 'checkbox', "aria-checked": this.isChecked === null ? 'mixed' : this.isChecked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }), h("div", { key: '234e0e4100da6f1a5f65fb4f32cb4d8e1ba018fd', class: "sd-checkbox__bg" }, this.isChecked !== false ? (h("sd-icon", { name: this.isChecked === true ? 'checkboxCheck' : 'checkboxIndeterminate', size: Number(CHECKBOX_LAYOUT.iconSize), color: this.disabled
105
+ }, value: this.val, checked: !!this.isChecked, disabled: this.disabled, onChange: this.handleChange, name: this.val?.toString() || 'checkbox', "aria-label": this.label || 'checkbox', "aria-checked": this.isChecked === null ? 'mixed' : this.isChecked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }), h("div", { key: 'e49eb38375ba680e08510f83a15ce8a6bbecd4b8', class: "sd-checkbox__bg" }, this.isChecked !== false ? (h("sd-icon", { name: this.isChecked === true ? 'checkboxCheck' : 'checkboxIndeterminate', size: Number(CHECKBOX_LAYOUT.iconSize), color: this.disabled
106
106
  ? CHECKBOX_COLORS.checked.iconDisabled
107
107
  : this.inverse
108
108
  ? CHECKBOX_COLORS.checked.iconInverse
109
- : CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: '15afb8e3b31201febd15bb85d24ee9c9b246d1d0', class: "sd-checkbox__label" }, this.label)));
109
+ : CHECKBOX_COLORS.checked.icon })) : null), this.label && h("span", { key: '92bc308561b0a7653926d751d029d80c38844b07', class: "sd-checkbox__label" }, this.label)));
110
110
  }
111
111
  static get is() { return "sd-checkbox"; }
112
112
  static get originalStyleUrls() {
@@ -1,4 +1,4 @@
1
- import { h } from "@stencil/core";
1
+ import { h, } from "@stencil/core";
2
2
  import { CHIP_COLORS, CHIP_LAYOUT, CHIP_TYPOGRAPHY } from "./sd-chip.config";
3
3
  export class SdChip {
4
4
  el;
@@ -167,7 +167,7 @@ export class SdChip {
167
167
  });
168
168
  }
169
169
  unregisterFromForm() {
170
- if (!this.name)
170
+ if (this.name === '')
171
171
  return;
172
172
  const formEl = this.el.closest('sd-form');
173
173
  formEl?.componentOnReady().then(form => {
@@ -205,12 +205,12 @@ export class SdChip {
205
205
  '--sd-chip-font-weight': typography.fontWeight,
206
206
  '--sd-chip-line-height': typography.lineHeight,
207
207
  };
208
- return (h("span", { key: '62732b07b821a995f2a9a32d433417a575b9e228', class: {
208
+ return (h("span", { key: '3cd683af3aed7cc6e549c5fc5da1e00cda2dc2a0', class: {
209
209
  'sd-chip': true,
210
210
  [`sd-chip--${state}`]: true,
211
211
  'sd-chip--disabled': this.disabled,
212
212
  'sd-chip--editable': !this.disabled,
213
- }, role: this.disabled ? undefined : 'button', tabIndex: this.disabled || this.isEditing ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, style: cssVars, onClick: this.handleChipClick, onKeyDown: this.handleChipKeyDown }, this.isEditing ? (h("span", { key: "chip-input", ref: el => (this.inputEl = el), class: "sd-chip__input", contentEditable: !this.disabled, "data-placeholder": this.placeholder, spellcheck: false, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, onBlur: this.handleInputBlur, onPaste: this.handlePaste, onClick: event => event.stopPropagation() })) : ([
213
+ }, role: this.disabled ? undefined : 'button', tabIndex: this.disabled || this.isEditing ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, style: cssVars, onClick: this.handleChipClick, onKeyDown: this.handleChipKeyDown }, this.isEditing ? (h("span", { key: "chip-input", ref: el => (this.inputEl = el), class: "sd-chip__input", role: "textbox", tabindex: this.disabled ? -1 : 0, contentEditable: !this.disabled, "data-placeholder": this.placeholder, spellcheck: false, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, onBlur: this.handleInputBlur, onPaste: this.handlePaste, onClick: event => event.stopPropagation() })) : ([
214
214
  h("span", { key: "chip-label", class: "sd-chip__label" }, this.internalValue),
215
215
  !this.disabled && (h("sd-ghost-button", { key: "chip-remove", class: "sd-chip__remove", icon: "close", size: "xxs", ariaLabel: "remove", onClick: this.handleRemoveClick })),
216
216
  ])));
@@ -27,7 +27,7 @@ export class SdCircleProgress {
27
27
  }
28
28
  const c = CIRCLE_PROGRESS_VIEWBOX_SIZE / 2;
29
29
  const showPercent = !this.indeterminate;
30
- return (h(Host, { key: 'f92bf4d6e4f1133c4465a4fec7b2bad4549a6d06', style: hostStyle }, h("svg", { key: '669fa503cc6007f48f35474b08e4359de695026d', class: "sd-circle-progress", viewBox: `0 0 ${CIRCLE_PROGRESS_VIEWBOX_SIZE} ${CIRCLE_PROGRESS_VIEWBOX_SIZE}`, xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: '020c7d840a6592d7705b65b14d27e3b5752629bf', class: "sd-circle-progress__track", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH }), h("circle", { key: 'e409da4a5c34adcd8744f16040ae9d5d6019a415', class: "sd-circle-progress__arc", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH, "stroke-linecap": "round", style: arcStyle })), showPercent && (h("span", { key: '91c0b91e69293b67c8a0ad67a6d4b9e9db5c6d4a', class: "sd-circle-progress__percent" }, Math.round(this.clampedValue), "%")), this.label && h("span", { key: '03a5bee22a2e2f1b4ba75dbeca2ef5b4b9840aeb', class: "sd-circle-progress__label" }, this.label)));
30
+ return (h(Host, { key: 'd4ace6f784fd64a45baa746870a84a88b4911cf8', style: hostStyle }, h("svg", { key: '08aef376ac746abf1a9b404e37703a862f956a08', class: "sd-circle-progress", viewBox: `0 0 ${CIRCLE_PROGRESS_VIEWBOX_SIZE} ${CIRCLE_PROGRESS_VIEWBOX_SIZE}`, xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: '42411ef6f92f6427309d92dfad84ad7dc8f8c3bb', class: "sd-circle-progress__track", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH }), h("circle", { key: 'a0ae53ce4dfd557e980155cd0ff22ba064fe32dc', class: "sd-circle-progress__arc", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH, "stroke-linecap": "round", style: arcStyle })), showPercent && (h("span", { key: '0917cfd3aa460872fa4c35da61530e01080d6937', class: "sd-circle-progress__percent" }, Math.round(this.clampedValue), "%")), this.label && h("span", { key: '051756bc7b20e87205b21c735b2827a81c2a17c9', class: "sd-circle-progress__label" }, this.label)));
31
31
  }
32
32
  static get is() { return "sd-circle-progress"; }
33
33
  static get originalStyleUrls() {
@@ -72,9 +72,9 @@ export class SdConfirmModal {
72
72
  const type = this.resolvedType;
73
73
  const iconName = CONFIRM_MODAL_ICON_MAP[type];
74
74
  const iconColor = CONFIRM_MODAL_ICON_COLOR[type];
75
- return (h("div", { key: '234455d93cbf02e5e70f78803914a8d91fbc4506', class: "sd-confirm-modal" }, h("sd-ghost-button", { key: '298f5279400b19159a8c08d2c739ab27cf88811c', class: "sd-confirm-modal__close-button", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() }), iconName && (h("sd-icon", { key: '41d01e92ff59cea05a367797ebde71cd13baed1f', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), h("h2", { key: 'd6b65e3a858a96f628602101adaaee2b62727df4', class: `sd-confirm-modal__title ${this.titleClass ?? ''}` }, this.modalTitle), h("div", { key: 'ed708bffc95467faabf70a9c2beec46fc1ba090c', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: 'e7a996bef926fa3741ed9f2ecc930a6961f4c6e4', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (h("div", { key: 'b4ab9cc0cf91166d4e34a7b4726d62c3463a9766', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
75
+ return (h("div", { key: '6dc337947f7c05799cf7c97d45b0df84c7976196', class: "sd-confirm-modal" }, h("sd-ghost-button", { key: 'b584cc4bc00191f8488be7265249922110d57d90', class: "sd-confirm-modal__close-button", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() }), iconName && (h("sd-icon", { key: '470716bef879befd1d6746bc27c10fb74d61a2b6', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), h("h2", { key: '5b0113f13b219a2e14c5d45397c293baafc28a2c', class: `sd-confirm-modal__title ${this.titleClass ?? ''}` }, this.modalTitle), h("div", { key: 'cee18d1afde384523ca0f96f4138b8854f89cb5c', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: 'b9466be3cbb635c9b8c0a50d7023b70fa31d9f0f', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg }))))), this.showContentBox && (h("div", { key: 'f3ea52c0261a63e75b42175c2e7c602e02f82636', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
76
76
  this.customContentRef = el;
77
- } })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && h("sd-tag", { name: this.tagPreset ?? 'square_sm_grey', label: this.tagLabel }), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: '1dd63a93ecd0eae9ecfb61a3b98f1e6d1ac2b4b3', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), h("div", { key: 'e22a5fc951054808bc70962e104eb3951b65ca61', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button", { key: 'c1f23f043eead651e71943c7e76585b9b7fe964a', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.cancel.emit() })), h("sd-button", { key: '63952e8b1c2d912fed6489760c97a787eaf2a90d', name: this.resolvedMainButton, label: this.mainButtonLabel ?? '확인', onSdClick: () => this.ok.emit() }))));
77
+ } })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && h("sd-tag", { name: this.tagPreset ?? 'square_sm_grey', label: this.tagLabel }), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: 'fa33e4f68a1c36e197ff6a6f5629005fbbebcbc3', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: msg })))))), h("div", { key: '378162e9e44cefc4e61113ba927545040e6a6c6c', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button", { key: '8fb93a086c4a42063f53ed533be2774de31db81e', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.cancel.emit() })), h("sd-button", { key: '304c80915c9a7a685bddcf2d5edf4f56119860e8', name: this.resolvedMainButton, label: this.mainButtonLabel ?? '확인', onSdClick: () => this.ok.emit() }))));
78
78
  }
79
79
  static get is() { return "sd-confirm-modal"; }
80
80
  static get originalStyleUrls() {
@@ -23,7 +23,7 @@ export class SdDateBox {
23
23
  this.mouseOver?.emit(this.date);
24
24
  }
25
25
  render() {
26
- return (h("div", { key: '5d1e92d90bbb12e3baaf9deaeafb6777d0540106', role: "button", tabindex: this.disabled ? -1 : 0, class: {
26
+ return (h("div", { key: 'ab09e8112e18b04dab2d171fa6dbd8554d11e57b', role: "button", tabindex: this.disabled ? -1 : 0, class: {
27
27
  'sd-date-box': true,
28
28
  'sd-hoverable': !this.disabled || !this.selected || this.type === '',
29
29
  'sd-date-box--disabled': this.disabled,
@@ -34,7 +34,12 @@ export class SdDateBox {
34
34
  'sd-date-box--in-range': this.inRange,
35
35
  'sd-date-box--type-start': this.type === 'start',
36
36
  'sd-date-box--type-end': this.type === 'end',
37
- }, onClick: () => this.handleClickDate(), onMouseOver: () => this.handleHoverDate() }, h("div", { key: 'a35272c78379828e61151435157e2324938752b4', class: "sd-date-box__content" }, h("div", { key: '21177c5b59e8a85b08275e4ce97f386f8af7f082', class: "sd-date-box__label" }, this.date))));
37
+ }, onClick: () => this.handleClickDate(), onKeyDown: e => {
38
+ if (e.key === 'Enter' || e.key === ' ') {
39
+ e.preventDefault();
40
+ this.handleClickDate();
41
+ }
42
+ }, onMouseOver: () => this.handleHoverDate(), onFocus: () => this.handleHoverDate() }, h("div", { key: 'b7e418536d6de86ae4e8042a0fc59dece42f7489', class: "sd-date-box__content" }, h("div", { key: '41f2b2136cc60e2d1a6664852a3fadf30413de0f', class: "sd-date-box__label" }, this.date))));
38
43
  }
39
44
  static get is() { return "sd-date-box"; }
40
45
  static get encapsulation() { return "scoped"; }
@@ -13,7 +13,7 @@ export class SdDatePickerTrigger {
13
13
  };
14
14
  render() {
15
15
  const sizeTokens = DATEPICKER_SIZE_MAP[this.size] ?? DATEPICKER_SIZE_MAP.sm;
16
- const hasValue = !!this.displayText;
16
+ const hasValue = this.displayText !== '';
17
17
  const textMinWidth = this.size === 'md' ? 104 : 80;
18
18
  const cssVars = {
19
19
  '--trigger-padding-x': `${sizeTokens.paddingX}px`,
@@ -33,10 +33,15 @@ export class SdDatePickerTrigger {
33
33
  ? DATEPICKER_COLORS.icon.disabled
34
34
  : DATEPICKER_COLORS.icon.default,
35
35
  };
36
- return (h("div", { key: '449ce38199b5a3d29d88353b9375bc45eceeae89', class: {
36
+ return (h("div", { key: '57a23626b1a392be20dccead71b792590fab61b8', role: "button", tabindex: this.disabled ? -1 : 0, class: {
37
37
  'sd-date-picker-trigger': true,
38
38
  'sd-date-picker-trigger--disabled': this.disabled,
39
- }, style: cssVars, onClick: this.handleClick }, h("sd-icon", { key: 'cc88f44660297a2fb72dfc9e4bc2387a84d55f58', name: "date", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-date-picker-trigger__icon" }), h("span", { key: '515419e015bf396b0ddba48615238e028ccc4a6d', class: "sd-date-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder)));
39
+ }, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
40
+ if (e.key === 'Enter' || e.key === ' ') {
41
+ e.preventDefault();
42
+ this.handleClick();
43
+ }
44
+ } }, h("sd-icon", { key: 'd4bb58eb97f9f2b98c27315547a85b019530ce5e', name: "date", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-date-picker-trigger__icon" }), h("span", { key: '25222882fa966eb5d6ead15e62b65af26586afbd', class: "sd-date-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder)));
40
45
  }
41
46
  static get is() { return "sd-date-picker-trigger"; }
42
47
  static get originalStyleUrls() {
@@ -29,41 +29,3 @@ export const DATEPICKER_COLORS = {
29
29
  icon: datepickerTokens.datepicker.icon,
30
30
  text: datepickerTokens.datepicker.text,
31
31
  };
32
- export const CALENDAR_LAYOUT = {
33
- bg: datepickerTokens.datepicker.calendar.bg,
34
- paddingXY: datepickerTokens.datepicker.calendar.paddingXY,
35
- gap: datepickerTokens.datepicker.calendar.gap,
36
- radius: datepickerTokens.datepicker.calendar.radius,
37
- header: {
38
- gap: datepickerTokens.datepicker.calendar.header.gap,
39
- divider: datepickerTokens.datepicker.calendar.header.divider,
40
- fontSize: datepickerTokens.datepicker.calendar.header.typography.fontSize,
41
- lineHeight: datepickerTokens.datepicker.calendar.header.typography.lineHeight,
42
- fontWeight: datepickerTokens.datepicker.calendar.header.typography.fontWeight,
43
- },
44
- week: {
45
- fontSize: datepickerTokens.datepicker.calendar.week.typography.fontSize,
46
- lineHeight: datepickerTokens.datepicker.calendar.week.typography.lineHeight,
47
- fontWeight: datepickerTokens.datepicker.calendar.week.typography.fontWeight,
48
- color: datepickerTokens.datepicker.calendar.week.color,
49
- },
50
- grid: {
51
- rowGap: datepickerTokens.datepicker.calendar.grid.rowGap,
52
- },
53
- day: {
54
- size: datepickerTokens.datepicker.calendar.day.width,
55
- circleSize: datepickerTokens.datepicker.calendar.day.circle.size,
56
- circleRadius: datepickerTokens.datepicker.calendar.day.circle.radius,
57
- defaultText: datepickerTokens.datepicker.calendar.day.default.text,
58
- hoverText: datepickerTokens.datepicker.calendar.day.hover.text,
59
- hoverBorder: datepickerTokens.datepicker.calendar.day.hover.border,
60
- selectBg: datepickerTokens.datepicker.calendar.day.select.bg,
61
- selectText: datepickerTokens.datepicker.calendar.day.select.text,
62
- disabledText: datepickerTokens.datepicker.calendar.day.disabled.text,
63
- fontSize: datepickerTokens.datepicker.calendar.day.typography.default.fontSize,
64
- lineHeight: datepickerTokens.datepicker.calendar.day.typography.default.lineHeight,
65
- fontWeight: datepickerTokens.datepicker.calendar.day.typography.default.fontWeight,
66
- boldFontWeight: datepickerTokens.datepicker.calendar.day.typography.bold.fontWeight,
67
- },
68
- };
69
- export const WEEK_LABELS = ['일', '월', '화', '수', '목', '금', '토'];
@@ -69,6 +69,7 @@ export class SdDatePicker {
69
69
  }
70
70
  };
71
71
  handleSelect = (e) => {
72
+ e.stopPropagation();
72
73
  this.closeDropdown();
73
74
  this.value = e.detail;
74
75
  const nextValue = this.value;
@@ -92,9 +93,9 @@ export class SdDatePicker {
92
93
  '--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
93
94
  '--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
94
95
  };
95
- return (h("sd-field", { key: '7678d58f741276e9848e05759f5c41f576e7fe66', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '8b3d615b241860ec1fb314fa0eeef5f51ea32f43', class: "sd-date-picker", ref: el => {
96
+ return (h("sd-field", { key: '825c845ea1ada63a9f21cfc43aad04a598325c13', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'b9dd1a8df29f340ad67331dbebd3ec71b79d128a', class: "sd-date-picker", ref: el => {
96
97
  this.triggerRef = el;
97
- } }, h("sd-date-picker-trigger", { key: '43185c67462cf0cb559c918e5f709723bf4d5aee', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '2cf151b52b3117de9c4d55bbc3c045b0a7b614e9', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-date-picker-calendar", { key: '9f77742d034dcb462eb1c4546b2c2a367544f97e', value: this.value, selectable: this.selectable, onSdSelect: this.handleSelect, onSdViewChange: this.handleViewChange })))));
98
+ } }, h("sd-date-picker-trigger", { key: 'b9bed57fa4a2b06b004ec5a1b723ed5af25fda19', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '776e0ce183edd9c7903ce1a75208addc47c20408', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-calendar", { key: 'f86b502f6b17ee9ff262c1a64e1b0e24defc1660', value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
98
99
  }
99
100
  static get is() { return "sd-date-picker"; }
100
101
  static get originalStyleUrls() {