@sellmate/design-system 1.28.0 → 1.31.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 (467) hide show
  1. package/dist/cjs/design-system.cjs.js +2 -2
  2. package/dist/cjs/{index-D12oddge.js → index-Jr8OU0y9.js} +1 -15
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
  5. package/dist/cjs/sd-badge.cjs.entry.js +2 -2
  6. package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -2
  7. package/dist/cjs/sd-button_2.cjs.entry.js +3 -3
  8. package/dist/cjs/sd-calendar_2.cjs.entry.js +8 -9
  9. package/dist/cjs/sd-callout.cjs.entry.js +2 -2
  10. package/dist/cjs/sd-card.cjs.entry.js +2 -2
  11. package/dist/cjs/sd-checkbox.cjs.entry.js +5 -5
  12. package/dist/cjs/sd-chip-input.cjs.entry.js +22 -17
  13. package/dist/cjs/sd-chip.cjs.entry.js +7 -7
  14. package/dist/cjs/sd-circle-progress.cjs.entry.js +4 -4
  15. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +33 -36
  16. package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
  17. package/dist/cjs/{component.datepicker-CUQbDSku.js → sd-date-picker.config-CgyNxY03.js} +64 -0
  18. package/dist/cjs/{sd-date-picker_7.cjs.entry.js → sd-date-picker_8.cjs.entry.js} +446 -47
  19. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +162 -12
  20. package/dist/cjs/sd-divider.cjs.entry.js +3 -3
  21. package/dist/cjs/sd-dropdown-button.cjs.entry.js +2 -2
  22. package/dist/cjs/sd-field_3.cjs.entry.js +51 -52
  23. package/dist/cjs/sd-form.cjs.entry.js +1 -1
  24. package/dist/cjs/sd-ghost-button_3.cjs.entry.js +14 -10
  25. package/dist/cjs/sd-guide.cjs.entry.js +2 -2
  26. package/dist/cjs/sd-key-value-table.cjs.entry.js +88 -18
  27. package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
  28. package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
  29. package/dist/cjs/sd-modal-container.cjs.entry.js +16 -2
  30. package/dist/cjs/sd-pagination.cjs.entry.js +173 -0
  31. package/dist/cjs/sd-popover.cjs.entry.js +134 -44
  32. package/dist/cjs/sd-popup.cjs.entry.js +3 -3
  33. package/dist/cjs/sd-radio-button.cjs.entry.js +3 -3
  34. package/dist/cjs/sd-radio.cjs.entry.js +4 -2
  35. package/dist/cjs/{sd-select_3.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +294 -315
  36. package/dist/cjs/sd-switch.cjs.entry.js +13 -3
  37. package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
  38. package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
  39. package/dist/cjs/sd-time-picker-selector.cjs.entry.js +179 -0
  40. package/dist/cjs/sd-time-picker-trigger.cjs.entry.js +75 -0
  41. package/dist/cjs/sd-time-picker.cjs.entry.js +173 -0
  42. package/dist/cjs/sd-time-picker.config-C7REB08L.js +156 -0
  43. package/dist/cjs/sd-time-range-picker-selector.cjs.entry.js +219 -0
  44. package/dist/cjs/sd-time-range-picker.cjs.entry.js +204 -0
  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/{system-MjrAugX-.js → system-B4KkVpu2.js} +1 -7
  49. package/dist/cjs/{tooltipArrow-Dda4ik0V.js → tooltipArrow-BlrFItn5.js} +1 -1
  50. package/dist/cjs/useDatePicker-j06ymWZ_.js +103 -0
  51. package/dist/collection/collection-manifest.json +8 -8
  52. package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
  53. package/dist/collection/components/sd-badge/sd-badge.js +1 -1
  54. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
  55. package/dist/collection/components/sd-button/sd-button.js +2 -2
  56. package/dist/collection/components/sd-calendar/sd-calendar.js +3 -3
  57. package/dist/collection/components/sd-callout/sd-callout.js +1 -1
  58. package/dist/collection/components/sd-card/sd-card.js +1 -1
  59. package/dist/collection/components/sd-checkbox/sd-checkbox.js +8 -8
  60. package/dist/collection/components/sd-chip/sd-chip.js +8 -8
  61. package/dist/collection/components/sd-chip-input/sd-chip-input.css +3 -0
  62. package/dist/collection/components/sd-chip-input/sd-chip-input.js +43 -17
  63. package/dist/collection/components/sd-circle-progress/sd-circle-progress.css +1 -0
  64. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  65. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.css +3 -0
  66. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +35 -59
  67. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  68. package/dist/collection/components/sd-date-picker/sd-date-picker.js +23 -2
  69. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.css +75 -0
  70. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +152 -6
  71. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.config.js +27 -0
  72. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +59 -3
  73. package/dist/collection/components/sd-divider/sd-divider.js +1 -1
  74. package/dist/collection/components/sd-field/sd-field.css +4 -0
  75. package/dist/collection/components/sd-field/sd-field.js +58 -5
  76. package/dist/collection/components/sd-file-picker/sd-file-picker.config.js +17 -10
  77. package/dist/collection/components/sd-file-picker/sd-file-picker.js +46 -16
  78. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  79. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +27 -3
  80. package/dist/collection/components/sd-input/sd-input.js +4 -4
  81. package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +2 -0
  82. package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +5 -1
  83. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +65 -15
  84. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  85. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  86. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  87. package/dist/collection/components/sd-modal-container/sd-modal-container.js +15 -1
  88. package/dist/collection/components/sd-number-input/sd-number-input.js +58 -7
  89. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  90. package/dist/collection/components/sd-popover/sd-popover.config.js +41 -0
  91. package/dist/collection/components/sd-popover/sd-popover.js +189 -191
  92. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  93. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  94. package/dist/collection/components/sd-radio/sd-radio.js +25 -4
  95. package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -6
  96. package/dist/collection/components/sd-radio-group/sd-radio-group.js +7 -7
  97. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
  98. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
  99. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +2 -2
  100. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
  101. package/dist/collection/components/sd-select/sd-select.js +4 -4
  102. package/dist/collection/components/sd-switch/sd-switch.js +54 -3
  103. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  104. package/dist/collection/components/sd-tag/sd-tag.js +7 -8
  105. package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
  106. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  107. package/dist/collection/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.css +87 -0
  108. package/dist/collection/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.js +266 -0
  109. package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.css +38 -0
  110. package/dist/collection/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.js +216 -0
  111. package/dist/collection/components/sd-time-picker/sd-time-picker.config.js +78 -0
  112. package/dist/collection/components/sd-time-picker/sd-time-picker.css +12 -0
  113. package/dist/collection/components/sd-time-picker/sd-time-picker.js +761 -0
  114. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.css +102 -0
  115. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.js +338 -0
  116. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.config.js +23 -0
  117. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.css +12 -0
  118. package/dist/collection/components/sd-time-range-picker/sd-time-range-picker.js +809 -0
  119. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  120. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  121. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  122. package/dist/collection/components/sd-tooltip/sd-tooltip.js +36 -189
  123. package/dist/components/index.js +1 -1
  124. package/dist/components/p-1DsQj3tv.js +1 -0
  125. package/dist/components/p-2g4jlJ3i.js +1 -0
  126. package/dist/components/{p-BE6ymp9E.js → p-6U1qyU5A.js} +1 -1
  127. package/dist/components/{p-1i6Q61TF.js → p-B-EV9bey.js} +1 -1
  128. package/dist/components/p-B887QQl2.js +1 -0
  129. package/dist/components/{p-BysikR_g.js → p-BPzs63D8.js} +1 -1
  130. package/dist/components/p-Bth2l1cy.js +1 -0
  131. package/dist/components/{p-CTDPl65u.js → p-BvJ14GuJ.js} +1 -1
  132. package/dist/components/p-Bxv2AFOb.js +1 -0
  133. package/dist/components/p-C6o10dl7.js +1 -0
  134. package/dist/components/p-C6wuKkUq.js +1 -0
  135. package/dist/components/{p-BAVsc1Ml.js → p-C9IKm4j5.js} +1 -1
  136. package/dist/components/{p-BuADVB78.js → p-CH9dgzTr.js} +1 -1
  137. package/dist/components/p-CKV2W-zU.js +1 -0
  138. package/dist/components/p-CTCt17CE.js +1 -0
  139. package/dist/components/{p-laVsm9VM.js → p-CghFB91T.js} +1 -1
  140. package/dist/components/p-Ckr9iuVb.js +1 -0
  141. package/dist/components/p-ClbD4Gsr.js +1 -0
  142. package/dist/components/p-CmCOLnc0.js +1 -0
  143. package/dist/components/{p-DNbbdJIc.js → p-CwzkplrI.js} +1 -1
  144. package/dist/components/p-CzJ9g73f.js +1 -0
  145. package/dist/components/p-D8yhjm54.js +1 -0
  146. package/dist/components/p-D9qp3o5Y.js +1 -0
  147. package/dist/components/{p-Bgxca9o5.js → p-DE8Ws9As.js} +1 -1
  148. package/dist/components/p-DMm_GeZC.js +1 -0
  149. package/dist/components/{p-BnI9HUOv.js → p-DOfLrOEu.js} +1 -1
  150. package/dist/components/{p-vtuEYpc6.js → p-DSWD8udu.js} +1 -1
  151. package/dist/components/{p-BKV1WAFb.js → p-DWnuCSqC.js} +1 -1
  152. package/dist/components/p-DYjaQs6e.js +1 -0
  153. package/dist/components/{p-pwGA4sDj.js → p-DasiqnrU.js} +1 -1
  154. package/dist/components/p-Dc9g3-5z.js +1 -0
  155. package/dist/components/{p-ClD0nx1l.js → p-DnlLqzGM.js} +1 -1
  156. package/dist/components/p-DsZwiWiU.js +1 -0
  157. package/dist/components/{p-IDlLs_KA.js → p-FGII920I.js} +1 -1
  158. package/dist/components/p-Hjv7LqkN.js +1 -0
  159. package/dist/components/{p-CHHlQceE.js → p-In6mljvA.js} +1 -1
  160. package/dist/components/p-OnBLxJAP.js +1 -0
  161. package/dist/components/p-SYnTIeiO.js +1 -0
  162. package/dist/{design-system/p-D2S9Zafz.js → components/p-bXzpfkfN.js} +1 -1
  163. package/dist/components/p-mcbwNjNT.js +1 -0
  164. package/dist/components/p-qZxAQy4p.js +1 -0
  165. package/dist/components/sd-action-modal.js +1 -1
  166. package/dist/components/sd-badge.js +1 -1
  167. package/dist/components/sd-barcode-input.js +1 -1
  168. package/dist/components/sd-button.js +1 -1
  169. package/dist/components/sd-calendar.js +1 -1
  170. package/dist/components/sd-callout.js +1 -1
  171. package/dist/components/sd-card.js +1 -1
  172. package/dist/components/sd-checkbox.js +1 -1
  173. package/dist/components/sd-chip-input.js +1 -1
  174. package/dist/components/sd-chip.js +1 -1
  175. package/dist/components/sd-circle-progress.js +1 -1
  176. package/dist/components/sd-confirm-modal.js +1 -1
  177. package/dist/components/sd-date-box.js +1 -1
  178. package/dist/components/sd-date-picker-trigger.js +1 -1
  179. package/dist/components/sd-date-picker.js +1 -1
  180. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  181. package/dist/components/sd-date-range-picker.js +1 -1
  182. package/dist/components/sd-divider.js +1 -1
  183. package/dist/components/sd-dropdown-button.js +1 -1
  184. package/dist/components/sd-field.js +1 -1
  185. package/dist/components/sd-file-picker.js +1 -1
  186. package/dist/components/sd-floating-portal.js +1 -1
  187. package/dist/components/sd-form.js +1 -1
  188. package/dist/components/sd-ghost-button.js +1 -1
  189. package/dist/components/sd-guide.js +1 -1
  190. package/dist/components/sd-icon.js +1 -1
  191. package/dist/components/sd-input.js +1 -1
  192. package/dist/components/sd-key-value-table.js +1 -1
  193. package/dist/components/sd-linear-progress.js +1 -1
  194. package/dist/components/sd-loading-container.js +1 -1
  195. package/dist/components/sd-loading-modal.js +1 -1
  196. package/dist/components/sd-modal-container.js +1 -1
  197. package/dist/components/sd-number-input.js +1 -1
  198. package/dist/components/sd-pagination.js +1 -1
  199. package/dist/components/sd-popover.js +1 -1
  200. package/dist/components/sd-popup.js +1 -1
  201. package/dist/components/sd-portal.js +1 -1
  202. package/dist/components/sd-radio-button.js +1 -1
  203. package/dist/components/sd-radio-group.js +1 -1
  204. package/dist/components/sd-radio.js +1 -1
  205. package/dist/components/sd-select-list-item-search.js +1 -1
  206. package/dist/components/sd-select-list-item.js +1 -1
  207. package/dist/components/sd-select-listbox.js +1 -1
  208. package/dist/components/sd-select-trigger.js +1 -1
  209. package/dist/components/sd-select.js +1 -1
  210. package/dist/components/sd-switch.js +1 -1
  211. package/dist/components/sd-tabs.js +1 -1
  212. package/dist/components/sd-tag.js +1 -1
  213. package/dist/components/sd-text-link.js +1 -1
  214. package/dist/components/sd-textarea.js +1 -1
  215. package/dist/components/sd-time-picker-selector.d.ts +11 -0
  216. package/dist/components/sd-time-picker-selector.js +1 -0
  217. package/dist/components/{sd-table.d.ts → sd-time-picker-trigger.d.ts} +4 -4
  218. package/dist/components/sd-time-picker-trigger.js +1 -0
  219. package/dist/components/{sd-thead.d.ts → sd-time-picker.d.ts} +4 -4
  220. package/dist/components/sd-time-picker.js +1 -0
  221. package/dist/components/sd-time-range-picker-selector.d.ts +11 -0
  222. package/dist/components/sd-time-range-picker-selector.js +1 -0
  223. package/dist/components/{sd-td.d.ts → sd-time-range-picker.d.ts} +4 -4
  224. package/dist/components/sd-time-range-picker.js +1 -0
  225. package/dist/components/sd-toast-container.js +1 -1
  226. package/dist/components/sd-toast.js +1 -1
  227. package/dist/components/sd-toggle.js +1 -1
  228. package/dist/components/sd-tooltip.js +1 -1
  229. package/dist/design-system/design-system.css +1 -1
  230. package/dist/design-system/design-system.esm.js +1 -1
  231. package/dist/design-system/{p-750a9112.entry.js → p-129b6330.entry.js} +1 -1
  232. package/dist/design-system/p-15f43b9b.entry.js +1 -0
  233. package/dist/design-system/p-16b9eac4.entry.js +1 -0
  234. package/dist/design-system/{p-0b8c86c3.entry.js → p-1858636f.entry.js} +1 -1
  235. package/dist/design-system/{p-a938ffee.entry.js → p-21672bb8.entry.js} +1 -1
  236. package/dist/design-system/{p-3b3a46cd.entry.js → p-219288ef.entry.js} +1 -1
  237. package/dist/design-system/{p-26f2f4c2.entry.js → p-22ac9e05.entry.js} +1 -1
  238. package/dist/design-system/p-2534d3d4.entry.js +1 -0
  239. package/dist/design-system/p-3859316f.entry.js +1 -0
  240. package/dist/design-system/{p-67f19734.entry.js → p-46da4e95.entry.js} +1 -1
  241. package/dist/design-system/{p-287d8016.entry.js → p-46eb3421.entry.js} +1 -1
  242. package/dist/design-system/p-4782331f.entry.js +1 -0
  243. package/dist/design-system/p-4a117dd6.entry.js +1 -0
  244. package/dist/design-system/{p-58ec51db.entry.js → p-4ae0a64a.entry.js} +1 -1
  245. package/dist/design-system/{p-bbd24816.entry.js → p-52b1be6f.entry.js} +1 -1
  246. package/dist/design-system/p-56e7c87b.entry.js +1 -0
  247. package/dist/design-system/p-570b9e91.entry.js +1 -0
  248. package/dist/design-system/p-5a113197.entry.js +1 -0
  249. package/dist/design-system/p-62ff77e4.entry.js +1 -0
  250. package/dist/design-system/{p-1230b51b.entry.js → p-655324cd.entry.js} +1 -1
  251. package/dist/design-system/p-66cff123.entry.js +1 -0
  252. package/dist/design-system/{p-4970f1ff.entry.js → p-6c4fa9d7.entry.js} +1 -1
  253. package/dist/design-system/{p-071e73e0.entry.js → p-809a0a71.entry.js} +1 -1
  254. package/dist/design-system/{p-70608fec.entry.js → p-82cb62a9.entry.js} +1 -1
  255. package/dist/design-system/p-843d1a8a.entry.js +1 -0
  256. package/dist/design-system/{p-fbeed0e4.entry.js → p-8836d9ff.entry.js} +1 -1
  257. package/dist/design-system/p-8af8e302.entry.js +1 -0
  258. package/dist/design-system/p-9c131122.entry.js +1 -0
  259. package/dist/design-system/{p-BqWuC4-J.js → p-BnUjeY2n.js} +1 -1
  260. package/dist/design-system/p-Bth2l1cy.js +1 -0
  261. package/dist/design-system/p-C599jhDs.js +2 -0
  262. package/dist/design-system/{p-CRWmn35N.js → p-Cn8LZw1e.js} +1 -1
  263. package/dist/design-system/p-DMm_GeZC.js +1 -0
  264. package/dist/design-system/p-Dz23PPdF.js +1 -0
  265. package/dist/design-system/p-a0c55a19.entry.js +1 -0
  266. package/dist/design-system/p-a6c292d1.entry.js +1 -0
  267. package/dist/design-system/p-a9cc4697.entry.js +1 -0
  268. package/dist/design-system/{p-2553bb1f.entry.js → p-b2dc1202.entry.js} +1 -1
  269. package/dist/design-system/{p-9c0bca09.entry.js → p-b5229957.entry.js} +1 -1
  270. package/dist/design-system/{p-d7e302af.entry.js → p-b75cc0dd.entry.js} +1 -1
  271. package/dist/design-system/p-b97a6cf3.entry.js +1 -0
  272. package/dist/design-system/p-c1e625e5.entry.js +1 -0
  273. package/dist/design-system/{p-5687ed0c.entry.js → p-c7f03dea.entry.js} +1 -1
  274. package/dist/design-system/p-cdb2433a.entry.js +1 -0
  275. package/dist/design-system/{p-61f5d5ea.entry.js → p-d5325895.entry.js} +1 -1
  276. package/dist/design-system/p-e0e4a451.entry.js +1 -0
  277. package/dist/design-system/p-e387ec65.entry.js +1 -0
  278. package/dist/design-system/{p-bab692c6.entry.js → p-efe3601d.entry.js} +1 -1
  279. package/dist/esm/design-system.js +3 -3
  280. package/dist/esm/{index-DDNBPrZh.js → index-C599jhDs.js} +2 -14
  281. package/dist/esm/loader.js +3 -3
  282. package/dist/esm/sd-action-modal.entry.js +2 -2
  283. package/dist/esm/sd-badge.entry.js +2 -2
  284. package/dist/esm/sd-barcode-input.entry.js +2 -2
  285. package/dist/esm/sd-button_2.entry.js +3 -3
  286. package/dist/esm/sd-calendar_2.entry.js +8 -9
  287. package/dist/esm/sd-callout.entry.js +2 -2
  288. package/dist/esm/sd-card.entry.js +2 -2
  289. package/dist/esm/sd-checkbox.entry.js +5 -5
  290. package/dist/esm/sd-chip-input.entry.js +22 -17
  291. package/dist/esm/sd-chip.entry.js +7 -7
  292. package/dist/esm/sd-circle-progress.entry.js +4 -4
  293. package/dist/esm/sd-confirm-modal_2.entry.js +33 -36
  294. package/dist/esm/sd-date-box.entry.js +1 -1
  295. package/dist/esm/{component.datepicker-laVsm9VM.js → sd-date-picker.config-CdXJcOGr.js} +63 -1
  296. package/dist/esm/{sd-date-picker_7.entry.js → sd-date-picker_8.entry.js} +446 -48
  297. package/dist/esm/sd-date-range-picker-calendar.entry.js +158 -8
  298. package/dist/esm/sd-divider.entry.js +3 -3
  299. package/dist/esm/sd-dropdown-button.entry.js +2 -2
  300. package/dist/esm/sd-field_3.entry.js +51 -52
  301. package/dist/esm/sd-form.entry.js +1 -1
  302. package/dist/esm/sd-ghost-button_3.entry.js +14 -10
  303. package/dist/esm/sd-guide.entry.js +2 -2
  304. package/dist/esm/sd-key-value-table.entry.js +87 -17
  305. package/dist/esm/sd-linear-progress.entry.js +3 -3
  306. package/dist/esm/sd-loading-container.entry.js +3 -3
  307. package/dist/esm/sd-modal-container.entry.js +16 -2
  308. package/dist/esm/sd-pagination.entry.js +171 -0
  309. package/dist/esm/sd-popover.entry.js +134 -44
  310. package/dist/esm/sd-popup.entry.js +3 -3
  311. package/dist/esm/sd-radio-button.entry.js +3 -3
  312. package/dist/esm/sd-radio.entry.js +4 -2
  313. package/dist/esm/{sd-select_3.entry.js → sd-select-list-item_4.entry.js} +277 -299
  314. package/dist/esm/sd-switch.entry.js +13 -3
  315. package/dist/esm/sd-tabs.entry.js +2 -2
  316. package/dist/esm/sd-text-link.entry.js +4 -4
  317. package/dist/esm/sd-time-picker-selector.entry.js +177 -0
  318. package/dist/esm/sd-time-picker-trigger.entry.js +73 -0
  319. package/dist/esm/sd-time-picker.config-DUq29Nhs.js +148 -0
  320. package/dist/esm/sd-time-picker.entry.js +171 -0
  321. package/dist/esm/sd-time-range-picker-selector.entry.js +217 -0
  322. package/dist/esm/sd-time-range-picker.entry.js +202 -0
  323. package/dist/esm/sd-toast-container.entry.js +2 -2
  324. package/dist/esm/sd-toast.entry.js +3 -3
  325. package/dist/esm/sd-toggle.entry.js +2 -2
  326. package/dist/esm/{system-BJfiMC9H.js → system-Bth2l1cy.js} +1 -7
  327. package/dist/esm/{tooltipArrow-blL0aWPE.js → tooltipArrow-DbLihSLI.js} +1 -1
  328. package/dist/esm/{useDatePicker-DoUg--aq.js → useDatePicker-DQ5Kyy_D.js} +1 -1
  329. package/dist/types/components/sd-checkbox/sd-checkbox.d.ts +2 -2
  330. package/dist/types/components/sd-chip/sd-chip.d.ts +3 -3
  331. package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +4 -2
  332. package/dist/types/components/sd-confirm-modal/sd-confirm-modal.d.ts +10 -10
  333. package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +2 -0
  334. package/dist/types/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.d.ts +20 -0
  335. package/dist/types/components/sd-date-range-picker/sd-date-range-picker.config.d.ts +25 -0
  336. package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +9 -0
  337. package/dist/types/components/sd-field/sd-field.d.ts +7 -0
  338. package/dist/types/components/sd-file-picker/sd-file-picker.config.d.ts +28 -0
  339. package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +3 -1
  340. package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +5 -0
  341. package/dist/types/components/sd-input/sd-input.d.ts +1 -1
  342. package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +22 -3
  343. package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +9 -1
  344. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +3 -0
  345. package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +2 -0
  346. package/dist/types/components/sd-number-input/sd-number-input.d.ts +8 -0
  347. package/dist/types/components/sd-popover/sd-popover.config.d.ts +22 -0
  348. package/dist/types/components/sd-popover/sd-popover.d.ts +29 -36
  349. package/dist/types/components/sd-radio/sd-radio.d.ts +3 -1
  350. package/dist/types/components/sd-radio-button/sd-radio-button.d.ts +2 -2
  351. package/dist/types/components/sd-radio-group/sd-radio-group.d.ts +2 -2
  352. package/dist/types/components/sd-switch/sd-switch.d.ts +8 -1
  353. package/dist/types/components/sd-tag/sd-tag.d.ts +2 -2
  354. package/dist/types/components/sd-time-picker/sd-time-picker-selector/sd-time-picker-selector.d.ts +35 -0
  355. package/dist/types/components/sd-time-picker/sd-time-picker-trigger/sd-time-picker-trigger.d.ts +21 -0
  356. package/dist/types/components/sd-time-picker/sd-time-picker.config.d.ts +71 -0
  357. package/dist/types/components/sd-time-picker/sd-time-picker.d.ts +84 -0
  358. package/dist/types/components/sd-time-range-picker/sd-time-range-picker-selector/sd-time-range-picker-selector.d.ts +40 -0
  359. package/dist/types/components/sd-time-range-picker/sd-time-range-picker.config.d.ts +9 -0
  360. package/dist/types/components/sd-time-range-picker/sd-time-range-picker.d.ts +88 -0
  361. package/dist/types/components/sd-tooltip/sd-tooltip.d.ts +7 -22
  362. package/dist/types/components.d.ts +1093 -885
  363. package/dist/types/index.d.ts +0 -1
  364. package/hydrate/index.js +2573 -3144
  365. package/hydrate/index.mjs +2573 -3144
  366. package/package.json +1 -1
  367. package/dist/cjs/component.table-POXY492T.js +0 -72
  368. package/dist/cjs/constants-DJRV1upE.js +0 -5
  369. package/dist/cjs/sd-date-picker.config-De7ahWIs.js +0 -41
  370. package/dist/cjs/sd-pagination_4.cjs.entry.js +0 -858
  371. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +0 -173
  372. package/dist/cjs/sd-select.config-omyxekRa.js +0 -144
  373. package/dist/cjs/sd-table.cjs.entry.js +0 -956
  374. package/dist/cjs/sd-table.config-DFy_S4bc.js +0 -83
  375. package/dist/cjs/sd-td.cjs.entry.js +0 -201
  376. package/dist/cjs/useDatePicker-iMd6WToc.js +0 -103
  377. package/dist/collection/components/sd-table/constants.js +0 -1
  378. package/dist/collection/components/sd-table/sd-table.config.js +0 -88
  379. package/dist/collection/components/sd-table/sd-table.css +0 -180
  380. package/dist/collection/components/sd-table/sd-table.js +0 -1709
  381. package/dist/collection/components/sd-table/sd-table.stories.helpers.js +0 -242
  382. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -10
  383. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +0 -110
  384. package/dist/collection/components/sd-table/sd-td/sd-td.css +0 -15
  385. package/dist/collection/components/sd-table/sd-td/sd-td.js +0 -381
  386. package/dist/collection/components/sd-table/sd-thead/sd-thead.css +0 -186
  387. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +0 -629
  388. package/dist/collection/components/sd-table/sd-tr/sd-tr.css +0 -145
  389. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +0 -530
  390. package/dist/components/p-5pkzwl5N.js +0 -1
  391. package/dist/components/p-B-pJW3nY.js +0 -1
  392. package/dist/components/p-B2pYDEK7.js +0 -1
  393. package/dist/components/p-B3HYnTGx.js +0 -1
  394. package/dist/components/p-B6ezDhRg.js +0 -1
  395. package/dist/components/p-BCxePXvg.js +0 -1
  396. package/dist/components/p-BJfiMC9H.js +0 -1
  397. package/dist/components/p-BNHhtZUf.js +0 -1
  398. package/dist/components/p-BQ4Okfcm.js +0 -1
  399. package/dist/components/p-BSxleKw8.js +0 -1
  400. package/dist/components/p-BUgGuigd.js +0 -1
  401. package/dist/components/p-BWHQn4fD.js +0 -1
  402. package/dist/components/p-BZXgIBUG.js +0 -1
  403. package/dist/components/p-Bxb7TcZh.js +0 -1
  404. package/dist/components/p-C0tnN4yn.js +0 -1
  405. package/dist/components/p-CMvHDxR5.js +0 -1
  406. package/dist/components/p-CSh-DcM7.js +0 -1
  407. package/dist/components/p-Cf62Nvrx.js +0 -1
  408. package/dist/components/p-DbPS61bp.js +0 -1
  409. package/dist/components/p-DckXBMgo.js +0 -1
  410. package/dist/components/p-DmAnTwUx.js +0 -1
  411. package/dist/components/p-E8OA_psS.js +0 -1
  412. package/dist/components/p-PFLrdhQj.js +0 -1
  413. package/dist/components/p-l9RiSWRc.js +0 -1
  414. package/dist/components/p-paSLRXAR.js +0 -1
  415. package/dist/components/p-sZMi_32I.js +0 -1
  416. package/dist/components/p-yxZBh03f.js +0 -1
  417. package/dist/components/sd-table.js +0 -1
  418. package/dist/components/sd-tbody.d.ts +0 -11
  419. package/dist/components/sd-tbody.js +0 -1
  420. package/dist/components/sd-td.js +0 -1
  421. package/dist/components/sd-thead.js +0 -1
  422. package/dist/components/sd-tr.d.ts +0 -11
  423. package/dist/components/sd-tr.js +0 -1
  424. package/dist/design-system/p-0048de73.entry.js +0 -1
  425. package/dist/design-system/p-20f69606.entry.js +0 -1
  426. package/dist/design-system/p-27197194.entry.js +0 -1
  427. package/dist/design-system/p-5c8f4d9c.entry.js +0 -1
  428. package/dist/design-system/p-5pkzwl5N.js +0 -1
  429. package/dist/design-system/p-75726e20.entry.js +0 -1
  430. package/dist/design-system/p-7abf62f3.entry.js +0 -1
  431. package/dist/design-system/p-7ae27a26.entry.js +0 -1
  432. package/dist/design-system/p-84d0181b.entry.js +0 -1
  433. package/dist/design-system/p-91f7be74.entry.js +0 -1
  434. package/dist/design-system/p-94d6b7b4.entry.js +0 -1
  435. package/dist/design-system/p-9b21773a.entry.js +0 -1
  436. package/dist/design-system/p-BJfiMC9H.js +0 -1
  437. package/dist/design-system/p-Cf62Nvrx.js +0 -1
  438. package/dist/design-system/p-CuAh9n2o.js +0 -1
  439. package/dist/design-system/p-DDNBPrZh.js +0 -2
  440. package/dist/design-system/p-a12d7362.entry.js +0 -1
  441. package/dist/design-system/p-b831eded.entry.js +0 -1
  442. package/dist/design-system/p-c5502585.entry.js +0 -1
  443. package/dist/design-system/p-c81898a0.entry.js +0 -1
  444. package/dist/design-system/p-d4e2f412.entry.js +0 -1
  445. package/dist/design-system/p-d6b3d78b.entry.js +0 -1
  446. package/dist/design-system/p-dbfa3931.entry.js +0 -1
  447. package/dist/design-system/p-f16985c9.entry.js +0 -1
  448. package/dist/design-system/p-fa967329.entry.js +0 -1
  449. package/dist/design-system/p-laVsm9VM.js +0 -1
  450. package/dist/design-system/p-sZMi_32I.js +0 -1
  451. package/dist/esm/component.table-5pkzwl5N.js +0 -70
  452. package/dist/esm/constants-sZMi_32I.js +0 -3
  453. package/dist/esm/sd-date-picker.config-D-ks6qNf.js +0 -38
  454. package/dist/esm/sd-pagination_4.entry.js +0 -853
  455. package/dist/esm/sd-select-list-item_2.entry.js +0 -170
  456. package/dist/esm/sd-select.config-CeHGlqOT.js +0 -129
  457. package/dist/esm/sd-table.config-DmOBlnsM.js +0 -70
  458. package/dist/esm/sd-table.entry.js +0 -954
  459. package/dist/esm/sd-td.entry.js +0 -199
  460. package/dist/types/components/sd-table/constants.d.ts +0 -50
  461. package/dist/types/components/sd-table/sd-table.config.d.ts +0 -71
  462. package/dist/types/components/sd-table/sd-table.d.ts +0 -199
  463. package/dist/types/components/sd-table/sd-table.stories.helpers.d.ts +0 -39
  464. package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +0 -15
  465. package/dist/types/components/sd-table/sd-td/sd-td.d.ts +0 -38
  466. package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +0 -62
  467. package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +0 -54
@@ -1,858 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-D12oddge.js');
4
- var constants = require('./constants-DJRV1upE.js');
5
- var sdTable_config = require('./sd-table.config-DFy_S4bc.js');
6
- require('./component.table-POXY492T.js');
7
- require('./system-MjrAugX-.js');
8
-
9
- const pagination = {
10
- height: "24",
11
- paddingX: "6",
12
- radius: "6",
13
- gap: "12",
14
- move: {
15
- gap: "4"
16
- },
17
- icon: "12",
18
- typography: {
19
- "default": {
20
- fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
21
- fontSize: "12",
22
- fontWeight: "500",
23
- lineHeight: "20"},
24
- selected: {
25
- fontWeight: "700"}
26
- },
27
- item: {
28
- bg: {
29
- hover: "#EEEEEE",
30
- selected: "#E6F1FF"
31
- },
32
- content: {
33
- "default": "#555555",
34
- hover: "#004290",
35
- selected: "#004290"
36
- }
37
- },
38
- simple: {
39
- gap: "8"
40
- }
41
- };
42
- var paginationTokens = {
43
- pagination: pagination
44
- };
45
-
46
- const PAGINATION_LAYOUT = {
47
- height: `${paginationTokens.pagination.height}px`,
48
- paddingX: `${paginationTokens.pagination.paddingX}px`,
49
- radius: `${paginationTokens.pagination.radius}px`,
50
- gap: `${paginationTokens.pagination.gap}px`,
51
- moveGap: `${paginationTokens.pagination.move.gap}px`,
52
- simpleGap: `${paginationTokens.pagination.simple.gap}px`,
53
- iconSize: Number(paginationTokens.pagination.icon),
54
- };
55
- const PAGINATION_TYPOGRAPHY = {
56
- fontFamily: paginationTokens.pagination.typography.default.fontFamily,
57
- fontSize: `${paginationTokens.pagination.typography.default.fontSize}px`,
58
- lineHeight: `${paginationTokens.pagination.typography.default.lineHeight}px`,
59
- fontWeightDefault: paginationTokens.pagination.typography.default.fontWeight,
60
- fontWeightSelected: paginationTokens.pagination.typography.selected.fontWeight,
61
- };
62
- const PAGINATION_COLORS = {
63
- contentDefault: paginationTokens.pagination.item.content.default,
64
- contentHover: paginationTokens.pagination.item.content.hover,
65
- contentSelected: paginationTokens.pagination.item.content.selected,
66
- bgHover: paginationTokens.pagination.item.bg.hover,
67
- bgSelected: paginationTokens.pagination.item.bg.selected,
68
- // TODO: 토큰 반영 후 교체 — nav 화살표 색상은 현재 토큰에 없음
69
- iconDefault: '#888888',
70
- };
71
-
72
- const sdPaginationCss = () => `sd-pagination{display:inline-flex}.sd-pagination{display:inline-flex;align-items:center;gap:var(--sd-pagination-gap);font-family:var(--sd-pagination-font-family)}.sd-pagination__group{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap);min-width:calc(var(--sd-pagination-height) * 2 + var(--sd-pagination-move-gap))}.sd-pagination__group--prev{justify-content:flex-end}.sd-pagination__group--next{justify-content:flex-start}.sd-pagination__numbers{display:inline-flex;align-items:center;gap:var(--sd-pagination-move-gap)}.sd-pagination__nav{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-height);height:var(--sd-pagination-height);padding:0;background:transparent;border:0;border-radius:var(--sd-pagination-radius);cursor:pointer;outline:none}.sd-pagination__nav:hover{background-color:var(--sd-pagination-bg-hover)}.sd-pagination__item{display:inline-flex;align-items:center;justify-content:center;width:var(--sd-pagination-item-width);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);background:transparent;border:0;border-radius:var(--sd-pagination-radius);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height);cursor:pointer;outline:none;box-sizing:border-box}.sd-pagination__item:hover{background-color:var(--sd-pagination-bg-hover);color:var(--sd-pagination-content-hover)}.sd-pagination__item--selected{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}.sd-pagination__item--selected:hover{background-color:var(--sd-pagination-bg-selected);color:var(--sd-pagination-content-selected)}.sd-pagination__info{display:inline-flex;align-items:center;gap:var(--sd-pagination-simple-gap);height:var(--sd-pagination-height);padding:0 var(--sd-pagination-padding-x);color:var(--sd-pagination-content);font-size:var(--sd-pagination-font-size);font-weight:var(--sd-pagination-font-weight-default);line-height:var(--sd-pagination-line-height)}.sd-pagination__current{color:var(--sd-pagination-content-selected);font-weight:var(--sd-pagination-font-weight-selected)}`;
73
-
74
- const PER_PAGE = 10;
75
- const BUTTON_WIDTH = {
76
- 1: 24,
77
- 2: 34,
78
- 3: 40,
79
- 4: 48,
80
- 5: 56,
81
- };
82
- const SdPagination = class {
83
- constructor(hostRef) {
84
- index.registerInstance(this, hostRef);
85
- this.pageChange = index.createEvent(this, "sdPageChange", 7);
86
- }
87
- /** 현재 페이지 번호 */
88
- currentPage = 1;
89
- /** 마지막 페이지 번호 */
90
- lastPage = 1;
91
- /** true이면 현재/마지막 페이지만 표시하는 단순 모드 */
92
- simple = false;
93
- /** 페이지가 변경될 때 새 페이지 번호를 전달합니다. */
94
- pageChange;
95
- get pageNumbers() {
96
- const start = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;
97
- const end = Math.min(start + PER_PAGE - 1, this.lastPage);
98
- return Array.from({ length: end - start + 1 }, (_, i) => start + i);
99
- }
100
- get buttonWidth() {
101
- const lastPageNum = this.pageNumbers.at(-1) ?? 1;
102
- const maxPageLength = lastPageNum.toString().length;
103
- return BUTTON_WIDTH[maxPageLength] || BUTTON_WIDTH[1];
104
- }
105
- get isFirstGroup() {
106
- return this.currentPage <= PER_PAGE;
107
- }
108
- get isLastGroup() {
109
- const startPageGroup = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;
110
- return startPageGroup + PER_PAGE - 1 >= this.lastPage;
111
- }
112
- handlePageChange = (page) => {
113
- if (page < 1 || page > this.lastPage)
114
- return;
115
- this.currentPage = page;
116
- this.pageChange.emit(page);
117
- };
118
- handleGroupChange = (direction) => {
119
- const delta = direction === 'forward' ? PER_PAGE : -PER_PAGE;
120
- const newPage = Math.min(Math.max(this.currentPage + delta, 1), this.lastPage);
121
- this.handlePageChange(newPage);
122
- };
123
- renderNavButton(iconName, ariaLabel, onClick) {
124
- return (index.h("button", { type: "button", class: "sd-pagination__nav", "aria-label": ariaLabel, onClick: onClick }, index.h("sd-icon", { name: iconName, size: PAGINATION_LAYOUT.iconSize, color: PAGINATION_COLORS.iconDefault })));
125
- }
126
- renderPrevButtons() {
127
- if (this.simple) {
128
- if (this.currentPage <= 1)
129
- return null;
130
- return (index.h(index.Fragment, null, this.renderNavButton('chevronLeftEnd', 'Go to first page', () => this.handlePageChange(1)), this.renderNavButton('chevronLeft', 'Go to previous page', () => this.handlePageChange(this.currentPage - 1))));
131
- }
132
- if (this.isFirstGroup)
133
- return null;
134
- return (index.h(index.Fragment, null, this.renderNavButton('chevronLeftEnd', 'Go to first page', () => this.handlePageChange(1)), this.renderNavButton('chevronLeft', 'Go to previous page group', () => this.handleGroupChange('backward'))));
135
- }
136
- renderNextButtons() {
137
- if (this.simple) {
138
- if (this.currentPage >= this.lastPage)
139
- return null;
140
- return (index.h(index.Fragment, null, this.renderNavButton('chevronRight', 'Go to next page', () => this.handlePageChange(this.currentPage + 1)), this.renderNavButton('chevronRightEnd', 'Go to last page', () => this.handlePageChange(this.lastPage))));
141
- }
142
- if (this.isLastGroup)
143
- return null;
144
- return (index.h(index.Fragment, null, this.renderNavButton('chevronRight', 'Go to next page group', () => this.handleGroupChange('forward')), this.renderNavButton('chevronRightEnd', 'Go to last page', () => this.handlePageChange(this.lastPage))));
145
- }
146
- render() {
147
- const cssVars = {
148
- '--sd-pagination-height': PAGINATION_LAYOUT.height,
149
- '--sd-pagination-padding-x': PAGINATION_LAYOUT.paddingX,
150
- '--sd-pagination-radius': PAGINATION_LAYOUT.radius,
151
- '--sd-pagination-gap': PAGINATION_LAYOUT.gap,
152
- '--sd-pagination-move-gap': PAGINATION_LAYOUT.moveGap,
153
- '--sd-pagination-simple-gap': PAGINATION_LAYOUT.simpleGap,
154
- '--sd-pagination-font-family': PAGINATION_TYPOGRAPHY.fontFamily,
155
- '--sd-pagination-font-size': PAGINATION_TYPOGRAPHY.fontSize,
156
- '--sd-pagination-line-height': PAGINATION_TYPOGRAPHY.lineHeight,
157
- '--sd-pagination-font-weight-default': PAGINATION_TYPOGRAPHY.fontWeightDefault,
158
- '--sd-pagination-font-weight-selected': PAGINATION_TYPOGRAPHY.fontWeightSelected,
159
- '--sd-pagination-content': PAGINATION_COLORS.contentDefault,
160
- '--sd-pagination-content-hover': PAGINATION_COLORS.contentHover,
161
- '--sd-pagination-content-selected': PAGINATION_COLORS.contentSelected,
162
- '--sd-pagination-bg-hover': PAGINATION_COLORS.bgHover,
163
- '--sd-pagination-bg-selected': PAGINATION_COLORS.bgSelected,
164
- '--sd-pagination-item-width': `${this.buttonWidth}px`,
165
- };
166
- return (index.h("div", { key: '4a67cbb9ed9d3cafbd3d9f99562948e3b3840210', class: {
167
- 'sd-pagination': true,
168
- 'sd-pagination--simple': this.simple,
169
- }, style: cssVars }, index.h("div", { key: 'f0cc77abd3b03a1525f52fbcd2587b6ad9cd468d', class: "sd-pagination__group sd-pagination__group--prev" }, this.renderPrevButtons()), this.simple ? (index.h("div", { class: "sd-pagination__info" }, index.h("span", { class: "sd-pagination__current" }, this.currentPage), index.h("span", { class: "sd-pagination__divider" }, "/"), index.h("span", { class: "sd-pagination__last" }, this.lastPage))) : (index.h("div", { class: "sd-pagination__numbers" }, this.pageNumbers.map(n => (index.h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
170
- 'sd-pagination__item': true,
171
- 'sd-pagination__item--selected': this.currentPage === n,
172
- }, onClick: () => this.handlePageChange(n) }, n))))), index.h("div", { key: 'c4053f5917345cf1e7fcea9f3c2fa0d6b5fa7a3f', class: "sd-pagination__group sd-pagination__group--next" }, this.renderNextButtons())));
173
- }
174
- };
175
- SdPagination.style = sdPaginationCss();
176
-
177
- const sdTbodyCss = () => `:host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}`;
178
-
179
- const SdTbody = class {
180
- constructor(hostRef) {
181
- index.registerInstance(this, hostRef);
182
- }
183
- get el() { return index.getElement(this); }
184
- /** 렌더링할 행 데이터 목록 */
185
- rows = [];
186
- tableId = '';
187
- topSpacerHeight = 0;
188
- bottomSpacerHeight = 0;
189
- tableEl = null;
190
- handleRowsChange(newRows) {
191
- const safeRows = newRows ?? [];
192
- if (this.tableEl?.setRowCountSync) {
193
- this.tableEl.setRowCountSync(safeRows.length);
194
- }
195
- }
196
- componentWillLoad() {
197
- this.syncTableContext();
198
- this.rows = this.rows ?? [];
199
- if (this.tableEl?.setRowCountSync) {
200
- this.tableEl.setRowCountSync(this.rows.length);
201
- }
202
- this.el.setSpacersSync = (top, bottom) => {
203
- this.topSpacerHeight = top;
204
- this.bottomSpacerHeight = bottom;
205
- };
206
- }
207
- componentDidLoad() {
208
- this.syncTableContext();
209
- }
210
- syncTableContext() {
211
- // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
212
- // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
213
- const closest = this.el.closest('sd-table');
214
- const root = this.el.getRootNode();
215
- const fromShadow = root instanceof ShadowRoot ? root.host : null;
216
- const table = closest ?? fromShadow;
217
- this.tableEl = table;
218
- const fromMethod = table?.getTableIdSync?.();
219
- const fromAttr = table?.getAttribute(constants.TABLE_ID_ATTR);
220
- const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
221
- (fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
222
- '';
223
- if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
224
- this.tableId = resolvedTableId;
225
- }
226
- }
227
- render() {
228
- return (index.h(index.Host, { key: '72061abfda67f548675b6def5d217d2263b693a9', slot: `${this.tableId}-body` }, index.h("tbody", { key: 'e2ac60a7c395d2a411ac7811851a2916fe762f3c', class: { tbody: true } }, [
229
- this.topSpacerHeight > 0 && (index.h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
230
- index.h("slot", { key: 'af37117b1e162581569bcf6d14a8cc3289f9c6d4' }),
231
- this.bottomSpacerHeight > 0 && (index.h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
232
- ])));
233
- }
234
- static get watchers() { return {
235
- "rows": [{
236
- "handleRowsChange": 0
237
- }]
238
- }; }
239
- };
240
- SdTbody.style = sdTbodyCss();
241
-
242
- const sdTheadCss = () => `sd-thead{display:contents}sd-thead *{box-sizing:border-box}.thead{display:table-header-group;height:var(--table-header-height, 36px)}.thead--sticky{position:sticky;top:0;z-index:120}.tr{display:table-row;width:100%}.th{display:table-cell;background:var(--table-header-bg, #F5FAFF);height:var(--table-header-height, 36px);padding:0 var(--table-header-padding-x, 16px);font-family:var(--table-header-font-family, inherit);font-weight:var(--table-header-font-weight, 500);font-size:var(--table-header-font-size, 12px);line-height:var(--table-header-line-height, 20px);text-decoration:var(--table-header-text-decoration, none);vertical-align:middle;border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);-webkit-user-select:none;user-select:none;position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.th--selected sd-checkbox label{position:relative}.th--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.th.sticky-left{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;left:var(--sticky-left-offset, 0)}.th.sticky-right{position:sticky;background-color:var(--table-header-bg, #F5FAFF);z-index:110 !important;right:var(--sticky-right-offset, 0)}.th.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.th.sticky-left-edge.is-scrolled-left{overflow:visible}.th.sticky-left-edge.is-scrolled-left:after{opacity:1}.th.sticky-right-edge.is-scrolled-right{overflow:visible}.th.sticky-right-edge.is-scrolled-right:after{opacity:1}.th__content{display:flex;flex-flow:row nowrap;align-items:center;gap:var(--table-header-gap, 4px)}.th__content--left{justify-content:flex-start}.th__content--center{justify-content:center}.th__content--right{justify-content:flex-end}.th__content--label{white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.th__bar{position:absolute;top:50%;right:0;transform:translateY(-50%);width:var(--table-border-width, 1px);height:var(--table-header-resizer-height, 16px);z-index:3;background-color:var(--table-header-resizer-color, #CCCCCC)}.th--has-dropdown{cursor:pointer}.th__dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:16px;height:16px;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:2px}.th__dropdown-trigger sd-icon{transition:transform 0.15s ease}.th__dropdown-trigger--open sd-icon{transform:rotate(180deg)}.th__resizer{position:absolute;top:50%;right:0;transform:translateY(-50%);width:4px;height:var(--table-header-resizer-height, 16px);cursor:col-resize;z-index:3;border-left:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC);border-right:var(--table-border-width, 1px) solid var(--table-header-resizer-color, #CCCCCC)}.th__resizer--left{right:auto;left:0}`;
243
-
244
- const SdThead = class {
245
- constructor(hostRef) {
246
- index.registerInstance(this, hostRef);
247
- this.sdColumnSort = index.createEvent(this, "sdColumnSort", 7);
248
- }
249
- get el() { return index.getElement(this); }
250
- /** 테이블 컬럼 목록 */
251
- columns;
252
- /** 행 선택 기능 사용 여부 */
253
- selectable;
254
- /** 컬럼 너비 조절 가능 여부 */
255
- resizable;
256
- /** 고정 컬럼 설정 */
257
- stickyColumn;
258
- /** 헤더 고정 여부 */
259
- stickyHeader;
260
- /** 좌측 스크롤 여부 */
261
- scrolledLeft;
262
- /** 우측 스크롤 여부 */
263
- scrolledRight;
264
- /** 전체 선택 체크박스용 행 데이터 */
265
- rows = [];
266
- /** 컬럼 너비 목록 */
267
- columnWidths = [];
268
- /** 컬럼 정렬 버튼 클릭 시 발생합니다. */
269
- sdColumnSort;
270
- tableId = '';
271
- _columns = [];
272
- _selectable = false;
273
- _resizable = false;
274
- _stickyColumn = { left: 0, right: 0 };
275
- _stickyHeader = false;
276
- _scrolledLeft = false;
277
- _scrolledRight = false;
278
- dropdownOpenMap = {};
279
- tableEl = null;
280
- dropdownRefs = {};
281
- dropdownThRefs = {};
282
- dropdownPortals = {};
283
- handleColumnsChange(newCols) {
284
- if (Array.isArray(newCols) && (this.columnWidths ?? []).length === 0) {
285
- this.columnWidths = newCols.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
286
- }
287
- }
288
- disconnectedCallback() {
289
- const portals = this.dropdownPortals ?? {};
290
- Object.values(portals).forEach(portal => {
291
- if (portal?.parentNode != null)
292
- portal.parentNode.removeChild(portal);
293
- });
294
- }
295
- componentWillLoad() {
296
- this.syncTableContext();
297
- this.dropdownOpenMap = this.dropdownOpenMap ?? {};
298
- this.dropdownRefs = this.dropdownRefs ?? {};
299
- this.dropdownThRefs = this.dropdownThRefs ?? {};
300
- this.dropdownPortals = this.dropdownPortals ?? {};
301
- this.columnWidths = Array.isArray(this.columnWidths) ? this.columnWidths : [];
302
- this.resolveConfig();
303
- if ((this.columnWidths ?? []).length === 0) {
304
- this.columnWidths = this._columns.map(c => c.autoWidth ? 0 : parseInt(c.width || '120', 10));
305
- }
306
- }
307
- componentDidLoad() {
308
- this.syncTableContext();
309
- this.resolveConfig();
310
- this.initDropdownPortals();
311
- }
312
- // sd-portal을 body에 붙여 CSS transform 영향 없이 정확한 위치에 패널을 표시한다.
313
- // <slot>을 render에 두지 않고 직접 DOM 이동(slot 속성 제거)으로 Stencil 슬롯 에뮬레이션 충돌을 피한다.
314
- initDropdownPortals() {
315
- const cols = this._columns ?? [];
316
- const hasDropdownCols = cols.filter(c => c.hasDropdown === true);
317
- if (hasDropdownCols.length === 0)
318
- return;
319
- for (const col of hasDropdownCols) {
320
- const colName = col.name;
321
- // 이미 포탈이 생성된 컬럼은 건너뜀 (refreshConfig 재호출 대비)
322
- if ((this.dropdownPortals ?? {})[colName] != null)
323
- continue;
324
- const slotContent = this.el.querySelector(`[slot="dropdown-${colName}"]`);
325
- if (slotContent == null)
326
- continue;
327
- // slot 속성 제거: Stencil 슬롯 에뮬레이션이 재배포하지 못하게 한다
328
- slotContent.removeAttribute('slot');
329
- const portal = document.createElement('sd-portal');
330
- portal.parentRef = this.dropdownThRefs[colName] ?? null;
331
- portal.open = false;
332
- // 첫 open 전까지 포탈 호스트 자체를 숨긴다.
333
- // moveSlotContent()가 open=true 시 children을 독립 wrapper div로 이동하므로 이후 동작에 영향 없음.
334
- portal.style.display = 'none';
335
- portal.addEventListener('sdClose', () => this.closeDropdown(colName));
336
- portal.appendChild(slotContent);
337
- document.body.appendChild(portal);
338
- this.dropdownPortals[colName] = portal;
339
- }
340
- }
341
- syncTableContext() {
342
- // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
343
- // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
344
- const closest = this.el.closest('sd-table');
345
- const root = this.el.getRootNode();
346
- const fromShadow = root instanceof ShadowRoot ? root.host : null;
347
- const table = closest ?? fromShadow;
348
- this.tableEl = table;
349
- const fromMethod = table?.getTableIdSync?.();
350
- const fromAttr = table?.getAttribute(constants.TABLE_ID_ATTR);
351
- const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
352
- (fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
353
- '';
354
- if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
355
- this.tableId = resolvedTableId;
356
- }
357
- }
358
- resolveConfig() {
359
- const config = this.tableEl?.getConfigSync?.();
360
- const resolvedColumns = Array.isArray(this.columns)
361
- ? this.columns
362
- : Array.isArray(config?.columns)
363
- ? config.columns
364
- : [];
365
- this._columns = resolvedColumns;
366
- this._selectable = this.selectable ?? config?.selectable ?? false;
367
- this._resizable = this.resizable ?? config?.resizable ?? false;
368
- this._stickyColumn = this.stickyColumn ?? config?.stickyColumn ?? { left: 0, right: 0 };
369
- this._stickyHeader = this.stickyHeader ?? config?.stickyHeader ?? false;
370
- this._scrolledLeft = this.scrolledLeft ?? config?.scrolledLeft ?? false;
371
- this._scrolledRight = this.scrolledRight ?? config?.scrolledRight ?? false;
372
- if (Array.isArray(config?.columnWidths) && (this.columnWidths ?? []).length === 0) {
373
- this.columnWidths = [...config.columnWidths];
374
- }
375
- if (!Array.isArray(this.columnWidths)) {
376
- this.columnWidths = [];
377
- }
378
- }
379
- /** 테이블 설정을 다시 불러옵니다. */
380
- async refreshConfig() {
381
- this.resolveConfig();
382
- this.initDropdownPortals();
383
- }
384
- /** 컬럼 너비를 업데이트합니다. */
385
- async setColumnWidths(widths) {
386
- this.columnWidths = Array.isArray(widths) ? widths : [];
387
- }
388
- /** 전체 선택 체크박스 상태를 갱신합니다. */
389
- async refreshSelection() {
390
- const checkbox = this.el.querySelector('sd-checkbox');
391
- if (checkbox) {
392
- checkbox.value = this.getIsAllChecked();
393
- }
394
- }
395
- get visibleColumns() {
396
- return this._columns.filter(col => col.visible !== false);
397
- }
398
- getStickyStyle(colIdx) {
399
- if (this.tableEl?.getStickyStyleSync) {
400
- return this.tableEl.getStickyStyleSync(colIdx);
401
- }
402
- const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) +
403
- (this._selectable ? sdTable_config.TABLE_SELECTABLE_COLUMN_WIDTH : 0);
404
- const rightOffset = this.columnWidths
405
- .filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
406
- .reduce((a, b) => a + b, 0);
407
- const col = this.visibleColumns[colIdx];
408
- const base = {
409
- '--sticky-left-offset': `${leftOffset}px`,
410
- '--sticky-right-offset': `${rightOffset}px`,
411
- };
412
- if (!col?.autoWidth) {
413
- base['width'] = `${this.columnWidths[colIdx]}px`;
414
- base['minWidth'] = `${this.columnWidths[colIdx]}px`;
415
- base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
416
- }
417
- return base;
418
- }
419
- handleResize(index, event, reversed = false) {
420
- if (this.tableEl?.handleResize) {
421
- this.tableEl.handleResize(index, event, reversed);
422
- }
423
- }
424
- handleColumnSort = (col) => {
425
- this.sdColumnSort.emit({ column: col });
426
- };
427
- toggleDropdown(name) {
428
- const isOpen = this.dropdownOpenMap[name] !== true;
429
- const portals = this.dropdownPortals ?? {};
430
- const newMap = { ...this.dropdownOpenMap };
431
- // _columns 기준으로 순회: portals가 비어도 dropdownOpenMap은 항상 갱신됨
432
- for (const col of (this._columns ?? []).filter(c => c.hasDropdown === true)) {
433
- const shouldBeOpen = col.name === name ? isOpen : false;
434
- newMap[col.name] = shouldBeOpen;
435
- const portal = portals[col.name];
436
- if (portal != null)
437
- portal.open = shouldBeOpen;
438
- }
439
- this.dropdownOpenMap = newMap;
440
- }
441
- closeDropdown(name) {
442
- if (this.dropdownOpenMap[name] !== true)
443
- return;
444
- this.dropdownOpenMap = { ...this.dropdownOpenMap, [name]: false };
445
- const portal = (this.dropdownPortals ?? {})[name];
446
- if (portal != null)
447
- portal.open = false;
448
- }
449
- handleSelectAll(checked) {
450
- const nextChecked = !!checked;
451
- const safeRows = Array.isArray(this.rows) ? this.rows : [];
452
- if (this.tableEl?.toggleSelectAllSync) {
453
- this.tableEl.toggleSelectAllSync(nextChecked, safeRows);
454
- }
455
- }
456
- getIsAllChecked() {
457
- const safeRows = Array.isArray(this.rows) ? this.rows : [];
458
- if (this.tableEl?.getIsAllCheckedSync && safeRows.length > 0) {
459
- return this.tableEl.getIsAllCheckedSync(safeRows);
460
- }
461
- return false;
462
- }
463
- render() {
464
- const safeRows = Array.isArray(this.rows) ? this.rows : [];
465
- const dropdownOpenMap = this.dropdownOpenMap ?? {};
466
- const dropdownRefs = this.dropdownRefs ?? {};
467
- const stickyLeftCount = this._stickyColumn.left || 0;
468
- const stickyRightCount = this._stickyColumn.right || 0;
469
- const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
470
- const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
471
- const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
472
- const lastColIdx = this.visibleColumns.length - 1;
473
- const headStyle = {
474
- '--table-header-height': `${sdTable_config.TABLE_HEADER_LAYOUT.height}px`,
475
- '--table-header-padding-x': `${sdTable_config.TABLE_HEADER_LAYOUT.paddingX}px`,
476
- '--table-header-gap': `${sdTable_config.TABLE_HEADER_LAYOUT.gap}px`,
477
- '--table-header-bg': sdTable_config.TABLE_HEADER_COLORS.bg,
478
- '--table-header-font-family': sdTable_config.TABLE_HEADER_TYPOGRAPHY.fontFamily,
479
- '--table-header-font-weight': sdTable_config.TABLE_HEADER_TYPOGRAPHY.fontWeight,
480
- '--table-header-font-size': `${sdTable_config.TABLE_HEADER_TYPOGRAPHY.fontSize}px`,
481
- '--table-header-line-height': `${sdTable_config.TABLE_HEADER_TYPOGRAPHY.lineHeight}px`,
482
- '--table-header-text-decoration': sdTable_config.TABLE_HEADER_TYPOGRAPHY.textDecoration,
483
- '--table-header-resizer-color': sdTable_config.TABLE_HEADER_RESIZING_BAR.color,
484
- '--table-header-resizer-height': `${sdTable_config.TABLE_HEADER_RESIZING_BAR.height}px`,
485
- '--table-border-color': sdTable_config.TABLE_BORDER.color,
486
- '--table-border-width': `${sdTable_config.TABLE_BORDER.width}px`,
487
- };
488
- return (index.h(index.Host, { key: '2f2218c9c0ba02fc59eb026944a3e26fbf741f23', slot: `${this.tableId}-head`, style: headStyle }, index.h("thead", { key: '008fc1ef83c882dd85fd9d6b8490a3246183e758', class: {
489
- 'thead': true,
490
- 'thead--sticky': this._stickyHeader,
491
- } }, index.h("tr", { key: 'ff679599539ea36d74160d31258bc06c4c6d0fda', class: "tr" }, this._selectable && (index.h("th", { key: '9fd149c26ec979f3f82eb5b1fad56cf963ee1e7f', class: {
492
- 'th': true,
493
- 'th--selected': true,
494
- 'sticky-left': true,
495
- 'sticky-left-edge': stickyLeftCount === 0,
496
- 'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
497
- }, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { key: 'feab85e049c99a1a565b250f5b0aa0ed6d986d65', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), index.h("div", { key: 'bf68afc8990977e607cbd6f25b19f6442b7fbab3', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (index.h("th", { key: col.name, class: {
498
- 'th': true,
499
- [`${col.thClass}`]: Boolean(col.thClass),
500
- 'sticky-left': true,
501
- 'sticky-left-edge': idx === stickyLeftCount - 1,
502
- 'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
503
- 'th--has-dropdown': col.hasDropdown === true,
504
- }, style: { ...col.thStyle, ...this.getStickyStyle(idx) }, ref: col.hasDropdown === true
505
- ? el => {
506
- this.dropdownThRefs[col.name] = el;
507
- }
508
- : undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
509
- e.stopPropagation();
510
- this.handleColumnSort(col);
511
- }, style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
512
- 'th__dropdown-trigger': true,
513
- 'th__dropdown-trigger--open': dropdownOpenMap[col.name] === true,
514
- }, ref: el => {
515
- dropdownRefs[col.name] = el;
516
- }, "aria-haspopup": "listbox", "aria-expanded": dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && idx !== lastColIdx && (
517
- // column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
518
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
519
- index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
520
- const actualColIdx = stickyLeftCount + relativeIdx;
521
- return (index.h("th", { key: col.name, class: {
522
- 'th': true,
523
- [`${col.thClass}`]: Boolean(col.thClass),
524
- 'th--has-dropdown': col.hasDropdown === true,
525
- }, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
526
- ? el => {
527
- this.dropdownThRefs[col.name] = el;
528
- }
529
- : undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
530
- e.stopPropagation();
531
- this.handleColumnSort(col);
532
- }, style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
533
- 'th__dropdown-trigger': true,
534
- 'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
535
- }, ref: el => {
536
- this.dropdownRefs[col.name] = el;
537
- }, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && actualColIdx !== lastColIdx && (
538
- // column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
539
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
540
- index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
541
- }), stickyRightCols.map((col, relativeIdx) => {
542
- const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
543
- return (index.h("th", { key: col.name, class: {
544
- 'th': true,
545
- [`${col.thClass}`]: Boolean(col.thClass),
546
- 'sticky-right': true,
547
- 'sticky-right-edge': relativeIdx === 0,
548
- 'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
549
- 'th--has-dropdown': col.hasDropdown === true,
550
- }, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
551
- ? el => {
552
- this.dropdownThRefs[col.name] = el;
553
- }
554
- : undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, index.h("div", { class: `th__content th__content--${col.align || 'left'}` }, index.h("div", { class: "th__content--label" }, col.label), col.icon && (index.h("sd-icon", { name: col.icon, size: "12", color: sdTable_config.resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (index.h("sd-icon", { name: sdTable_config.resolveSortIconName(col.sort), size: "12", color: sdTable_config.resolveTableIconColor(sdTable_config.resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
555
- e.stopPropagation();
556
- this.handleColumnSort(col);
557
- }, style: { cursor: 'pointer' } })), col.tooltip && (index.h("sd-tooltip", { ...col.tooltipOptions }, index.h("div", { slot: "content" }, col.tooltip.map(text => (index.h("p", null, text)))))), col.hasDropdown === true && (index.h("button", { class: {
558
- 'th__dropdown-trigger': true,
559
- 'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
560
- }, ref: el => {
561
- this.dropdownRefs[col.name] = el;
562
- }, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, index.h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && (
563
- // column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
564
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
565
- index.h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
566
- })))));
567
- }
568
- static get watchers() { return {
569
- "columns": [{
570
- "handleColumnsChange": 0
571
- }]
572
- }; }
573
- };
574
- SdThead.style = sdTheadCss();
575
-
576
- const sdTrCss = () => `sd-tr{display:contents}sd-tr *{box-sizing:border-box}.tr{display:table-row}.tr:hover .td{background-color:#F9F9F9}.tr--no-hover:hover .td{background-color:white}.tr--separator:hover .td{background-color:var(--table-separator-color, #eeeeee)}.td{display:table-cell;height:var(--table-body-height, 44px);padding:var(--table-body-padding-y, 0) var(--table-body-padding-x, 16px);border-bottom:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1);background:white;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.td--left{text-align:left}.td--center{text-align:center}.td--right{text-align:right}.td--selected{position:relative;width:var(--table-selectable-width, 48px) !important;max-width:var(--table-selectable-width, 48px) !important;min-width:var(--table-selectable-width, 48px) !important;text-align:center}.td--selected sd-checkbox label{position:relative}.td--selected sd-checkbox label:before{content:"";position:absolute;inset:-6px}.td.sticky-left{position:sticky;background-color:white;z-index:100 !important;left:var(--sticky-left-offset, 0)}.td.sticky-right{position:sticky;background-color:white;z-index:100 !important;right:var(--sticky-right-offset, 0)}.td.sticky-left-edge:after{content:"";position:absolute;top:0;left:100%;right:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset 12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-right-edge:after{content:"";position:absolute;top:0;left:-20px;width:20px;height:100%;z-index:101 !important;box-shadow:inset -12px 0 20px -25px;opacity:0;pointer-events:none;transition:opacity 0.2s}.td.sticky-left-edge.is-scrolled-left{overflow:visible}.td.sticky-left-edge.is-scrolled-left:after{opacity:1}.td.sticky-right-edge.is-scrolled-right{overflow:visible}.td.sticky-right-edge.is-scrolled-right:after{opacity:1}.tr:hover .td.sticky-left,.tr:hover .td.sticky-right{background-color:#F9F9F9}.tr--no-hover:hover .td.sticky-left,.tr--no-hover:hover .td.sticky-right{background-color:white}.tr--separator:hover .td.sticky-left,.tr--separator:hover .td.sticky-right{background-color:var(--table-separator-color, #eeeeee)}.tr--separator .td--separator{height:var(--table-separator-width, 6px);padding:0;background-color:var(--table-separator-color, #eeeeee);border-bottom:none}.tr--separator--dense .td--separator{height:var(--table-separator-dense-width, 4px)}.td--divider-left{border-left:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}.td--divider-right{border-right:var(--table-border-width, 1px) solid var(--table-border-color, #E1E1E1)}`;
577
-
578
- const SdTr = class {
579
- constructor(hostRef) {
580
- index.registerInstance(this, hostRef);
581
- }
582
- get el() { return index.getElement(this); }
583
- /** 테이블 컬럼 목록 */
584
- columns;
585
- /** 행 선택 기능 사용 여부 */
586
- selectable;
587
- /** 고정 컬럼 설정 */
588
- stickyColumn;
589
- /** 행 식별 키 */
590
- rowKey = '';
591
- /** 행 데이터 객체 */
592
- row = {};
593
- /** 구분선 높이 (4 또는 6px, null이면 일반 행) */
594
- separator = null;
595
- tableId = '';
596
- columnWidths = [];
597
- isVisible = true;
598
- spansVersion = 0;
599
- _columns = [];
600
- _selectable = false;
601
- _stickyColumn = { left: 0, right: 0 };
602
- _scrolledLeft = false;
603
- _scrolledRight = false;
604
- _dense = false;
605
- tableEl = null;
606
- componentWillLoad() {
607
- this.row = this.row ?? {};
608
- this.syncTableContext();
609
- this.columnWidths = this.columnWidths ?? [];
610
- this.resolveConfig();
611
- this.columnWidths = this._columns.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
612
- this.updateVisibilitySync();
613
- }
614
- componentDidLoad() {
615
- this.syncTableContext();
616
- }
617
- syncTableContext() {
618
- // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
619
- // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
620
- const closest = this.el.closest('sd-table');
621
- const root = this.el.getRootNode();
622
- const fromShadow = root instanceof ShadowRoot ? root.host : null;
623
- const table = closest ?? fromShadow;
624
- this.tableEl = table;
625
- const fromMethod = table?.getTableIdSync?.();
626
- const fromAttr = table?.getAttribute(constants.TABLE_ID_ATTR);
627
- const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
628
- (fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
629
- '';
630
- if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
631
- this.tableId = resolvedTableId;
632
- }
633
- }
634
- resolveConfig() {
635
- const config = this.tableEl?.getConfigSync?.();
636
- this._columns = this.columns ?? config?.columns ?? [];
637
- this._selectable = this.selectable ?? config?.selectable ?? false;
638
- this._stickyColumn = this.stickyColumn ?? config?.stickyColumn ?? { left: 0, right: 0 };
639
- this._scrolledLeft = config?.scrolledLeft ?? false;
640
- this._scrolledRight = config?.scrolledRight ?? false;
641
- this._dense = config?.dense ?? false;
642
- if (config?.columnWidths && (this.columnWidths ?? []).length === 0) {
643
- this.columnWidths = [...config.columnWidths];
644
- }
645
- }
646
- /** 테이블 설정을 다시 불러옵니다. */
647
- async refreshConfig() {
648
- this.resolveConfig();
649
- }
650
- /** 셀 병합 버전을 갱신해 td를 재렌더링합니다. */
651
- async bumpSpansVersion() {
652
- this.spansVersion = this.spansVersion + 1;
653
- }
654
- /** 페이지네이션에 따른 행 표시 여부를 갱신합니다. */
655
- async updateVisibility() {
656
- this.updateVisibilitySync();
657
- }
658
- updateVisibilitySync() {
659
- const rowIndex = parseInt(this.rowKey, 10);
660
- const pageInfo = this.tableEl?.getPaginationInfoSync?.();
661
- if (!pageInfo) {
662
- this.isVisible = true;
663
- return;
664
- }
665
- this.isVisible = rowIndex >= pageInfo.startIndex && rowIndex < pageInfo.endIndex;
666
- }
667
- /** 컬럼 너비를 업데이트합니다. */
668
- async setColumnWidths(widths) {
669
- this.columnWidths = widths;
670
- }
671
- /** 체크박스 선택 상태를 갱신합니다. */
672
- async refreshSelection() {
673
- const checkbox = this.el.querySelector('sd-checkbox');
674
- if (checkbox) {
675
- checkbox.value = this.isSelected();
676
- }
677
- }
678
- get visibleColumns() {
679
- return this._columns.filter(col => col.visible !== false);
680
- }
681
- formatValue(value) {
682
- if (value === null || value === undefined) {
683
- return '';
684
- }
685
- if (typeof value === 'number') {
686
- return value.toLocaleString();
687
- }
688
- return String(value);
689
- }
690
- getCellValue(column) {
691
- const { field, format, name } = column;
692
- const value = typeof field === 'function'
693
- ? field(this.row)
694
- : field !== ''
695
- ? this.row[field]
696
- : this.row[name];
697
- return format ? format(value, this.row) : this.formatValue(value);
698
- }
699
- getStickyStyle(colIdx) {
700
- if (this.tableEl?.getStickyStyleSync) {
701
- return this.tableEl.getStickyStyleSync(colIdx);
702
- }
703
- const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this._selectable ? 52 : 0);
704
- const rightOffset = this.columnWidths
705
- .filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
706
- .reduce((a, b) => a + b, 0);
707
- const col = this.visibleColumns[colIdx];
708
- const base = {
709
- '--sticky-left-offset': `${leftOffset}px`,
710
- '--sticky-right-offset': `${rightOffset}px`,
711
- };
712
- if (!col?.autoWidth) {
713
- base['width'] = `${this.columnWidths[colIdx]}px`;
714
- base['minWidth'] = `${this.columnWidths[colIdx]}px`;
715
- base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
716
- }
717
- return base;
718
- }
719
- isSelected() {
720
- if (this.tableEl?.isRowSelectedSync) {
721
- return this.tableEl.isRowSelectedSync(this.row);
722
- }
723
- return false;
724
- }
725
- handleSelect() {
726
- if (this.tableEl?.updateRowSelectSync) {
727
- this.tableEl.updateRowSelectSync(this.row);
728
- }
729
- }
730
- getSpanFor(col) {
731
- if (!this.tableEl?.getSpanSync)
732
- return undefined;
733
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
734
- return this.tableEl.getSpanSync(this.rowKey, fieldName);
735
- }
736
- isCovered(colIdx) {
737
- if (!this.tableEl?.isCoveredSync)
738
- return false;
739
- return this.tableEl.isCoveredSync(this.rowKey, colIdx, this._columns);
740
- }
741
- getCellClassFor(col) {
742
- if (!this.tableEl?.getCellClassSync)
743
- return undefined;
744
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
745
- return this.tableEl.getCellClassSync(this.rowKey, fieldName);
746
- }
747
- getFramePaddingStyle(field) {
748
- if (!(this.tableEl?.isCellUseFrameSync?.(this.rowKey, field) ?? false))
749
- return undefined;
750
- return { padding: `${sdTable_config.TABLE_BODY_LAYOUT.framePadding}px` };
751
- }
752
- expandCellClass(classStr) {
753
- if (classStr == null || classStr === '')
754
- return {};
755
- return Object.fromEntries(classStr
756
- .split(/\s+/)
757
- .filter(Boolean)
758
- .map(c => [c, true]));
759
- }
760
- render() {
761
- const stickyLeftCount = this._stickyColumn.left || 0;
762
- const stickyRightCount = this._stickyColumn.right || 0;
763
- const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
764
- const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
765
- const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
766
- const hasRowspan = this.tableEl?.hasRowspanSync?.() ?? false;
767
- const isUseFrameRow = this.tableEl?.hasUseFrameInRowSync?.(this.rowKey) ?? false;
768
- const effectiveDense = this._dense && !isUseFrameRow;
769
- const rowLayoutY = effectiveDense ? sdTable_config.TABLE_BODY_LAYOUT.dense : sdTable_config.TABLE_BODY_LAYOUT.default;
770
- const rowPaddingX = effectiveDense
771
- ? sdTable_config.TABLE_BODY_LAYOUT.densePaddingX
772
- : sdTable_config.TABLE_BODY_LAYOUT.paddingX;
773
- const rowStyle = {
774
- 'display': this.isVisible ? '' : 'none',
775
- '--table-body-height': `${rowLayoutY.height}px`,
776
- '--table-body-padding-y': `${rowLayoutY.paddingY}px`,
777
- '--table-body-padding-x': `${rowPaddingX}px`,
778
- '--table-body-font-family': sdTable_config.TABLE_BODY_TYPOGRAPHY.fontFamily,
779
- '--table-body-font-weight': sdTable_config.TABLE_BODY_TYPOGRAPHY.fontWeight,
780
- '--table-body-font-size': `${sdTable_config.TABLE_BODY_TYPOGRAPHY.fontSize}px`,
781
- '--table-body-line-height': `${sdTable_config.TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
782
- '--table-body-text-decoration': sdTable_config.TABLE_BODY_TYPOGRAPHY.textDecoration,
783
- '--table-border-color': sdTable_config.TABLE_BORDER.color,
784
- '--table-border-width': `${sdTable_config.TABLE_BORDER.width}px`,
785
- '--table-separator-color': sdTable_config.TABLE_SEPARATOR.color,
786
- '--table-separator-width': `${sdTable_config.TABLE_SEPARATOR.width}px`,
787
- '--table-separator-dense-width': `${sdTable_config.TABLE_SEPARATOR.denseWidth}px`,
788
- };
789
- if (this.separator != null) {
790
- const totalCols = this.visibleColumns.length + (this._selectable ? 1 : 0);
791
- const isDense = this.separator === 4;
792
- return (index.h(index.Host, { style: rowStyle }, index.h("tr", { class: { 'tr': true, 'tr--separator': true, 'tr--separator--dense': isDense } }, index.h("td", { colSpan: totalCols, class: "td td--separator" }))));
793
- }
794
- return (index.h(index.Host, { style: rowStyle }, index.h("tr", { class: { 'tr': true, 'tr--no-hover': hasRowspan } }, this._selectable && (index.h("td", { class: {
795
- 'td': true,
796
- 'td--selected': true,
797
- 'sticky-left': true,
798
- 'sticky-left-edge': stickyLeftCount === 0,
799
- 'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
800
- }, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { value: this.isSelected(), onSdUpdate: () => this.handleSelect() }))), stickyLeftCols.map((col, idx) => {
801
- if (this.isCovered(idx))
802
- return null;
803
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
804
- const span = this.getSpanFor(col);
805
- const sdCellClass = this.getCellClassFor(col);
806
- return (index.h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
807
- 'td': true,
808
- [`td--${col.align || 'left'}`]: true,
809
- 'sticky-left': true,
810
- 'sticky-left-edge': idx === stickyLeftCount - 1,
811
- 'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
812
- [`${col.tdClass}`]: Boolean(col.tdClass),
813
- ...this.expandCellClass(sdCellClass),
814
- }, style: { ...this.getStickyStyle(idx), ...this.getFramePaddingStyle(fieldName) } }, index.h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, index.h("span", null, this.getCellValue(col)))));
815
- }), middleCols.map((col, relativeIdx) => {
816
- const actualColIdx = stickyLeftCount + relativeIdx;
817
- if (this.isCovered(actualColIdx))
818
- return null;
819
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
820
- const span = this.getSpanFor(col);
821
- const sdCellClass = this.getCellClassFor(col);
822
- return (index.h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
823
- td: true,
824
- [`td--${col.align || 'left'}`]: true,
825
- [`${col.tdClass}`]: Boolean(col.tdClass),
826
- ...this.expandCellClass(sdCellClass),
827
- }, style: {
828
- ...this.getStickyStyle(actualColIdx),
829
- ...this.getFramePaddingStyle(fieldName),
830
- } }, index.h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, index.h("span", null, this.getCellValue(col)))));
831
- }), stickyRightCols.map((col, relativeIdx) => {
832
- const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
833
- if (this.isCovered(actualColIdx))
834
- return null;
835
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
836
- const span = this.getSpanFor(col);
837
- const sdCellClass = this.getCellClassFor(col);
838
- return (index.h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
839
- 'td': true,
840
- [`td--${col.align || 'left'}`]: true,
841
- 'sticky-right': true,
842
- 'sticky-right-edge': relativeIdx === 0,
843
- 'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
844
- [`${col.tdClass}`]: Boolean(col.tdClass),
845
- ...this.expandCellClass(sdCellClass),
846
- }, style: {
847
- ...this.getStickyStyle(actualColIdx),
848
- ...this.getFramePaddingStyle(fieldName),
849
- } }, index.h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, index.h("span", null, this.getCellValue(col)))));
850
- }))));
851
- }
852
- };
853
- SdTr.style = sdTrCss();
854
-
855
- exports.sd_pagination = SdPagination;
856
- exports.sd_tbody = SdTbody;
857
- exports.sd_thead = SdThead;
858
- exports.sd_tr = SdTr;