@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,853 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, F as Fragment, a as getElement, H as Host } from './index-DDNBPrZh.js';
2
- import { T as TABLE_ID_ATTR } from './constants-sZMi_32I.js';
3
- import { a as TABLE_SELECTABLE_COLUMN_WIDTH, r as resolveTableIconColor, e as resolveSortIconName, c as TABLE_BORDER, f as TABLE_HEADER_RESIZING_BAR, g as TABLE_HEADER_TYPOGRAPHY, h as TABLE_HEADER_COLORS, i as TABLE_HEADER_LAYOUT, T as TABLE_BODY_LAYOUT, j as TABLE_SEPARATOR, b as TABLE_BODY_TYPOGRAPHY } from './sd-table.config-DmOBlnsM.js';
4
- import './component.table-5pkzwl5N.js';
5
- import './system-BJfiMC9H.js';
6
-
7
- const pagination = {
8
- height: "24",
9
- paddingX: "6",
10
- radius: "6",
11
- gap: "12",
12
- move: {
13
- gap: "4"
14
- },
15
- icon: "12",
16
- typography: {
17
- "default": {
18
- 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",
19
- fontSize: "12",
20
- fontWeight: "500",
21
- lineHeight: "20"},
22
- selected: {
23
- fontWeight: "700"}
24
- },
25
- item: {
26
- bg: {
27
- hover: "#EEEEEE",
28
- selected: "#E6F1FF"
29
- },
30
- content: {
31
- "default": "#555555",
32
- hover: "#004290",
33
- selected: "#004290"
34
- }
35
- },
36
- simple: {
37
- gap: "8"
38
- }
39
- };
40
- var paginationTokens = {
41
- pagination: pagination
42
- };
43
-
44
- const PAGINATION_LAYOUT = {
45
- height: `${paginationTokens.pagination.height}px`,
46
- paddingX: `${paginationTokens.pagination.paddingX}px`,
47
- radius: `${paginationTokens.pagination.radius}px`,
48
- gap: `${paginationTokens.pagination.gap}px`,
49
- moveGap: `${paginationTokens.pagination.move.gap}px`,
50
- simpleGap: `${paginationTokens.pagination.simple.gap}px`,
51
- iconSize: Number(paginationTokens.pagination.icon),
52
- };
53
- const PAGINATION_TYPOGRAPHY = {
54
- fontFamily: paginationTokens.pagination.typography.default.fontFamily,
55
- fontSize: `${paginationTokens.pagination.typography.default.fontSize}px`,
56
- lineHeight: `${paginationTokens.pagination.typography.default.lineHeight}px`,
57
- fontWeightDefault: paginationTokens.pagination.typography.default.fontWeight,
58
- fontWeightSelected: paginationTokens.pagination.typography.selected.fontWeight,
59
- };
60
- const PAGINATION_COLORS = {
61
- contentDefault: paginationTokens.pagination.item.content.default,
62
- contentHover: paginationTokens.pagination.item.content.hover,
63
- contentSelected: paginationTokens.pagination.item.content.selected,
64
- bgHover: paginationTokens.pagination.item.bg.hover,
65
- bgSelected: paginationTokens.pagination.item.bg.selected,
66
- // TODO: 토큰 반영 후 교체 — nav 화살표 색상은 현재 토큰에 없음
67
- iconDefault: '#888888',
68
- };
69
-
70
- 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)}`;
71
-
72
- const PER_PAGE = 10;
73
- const BUTTON_WIDTH = {
74
- 1: 24,
75
- 2: 34,
76
- 3: 40,
77
- 4: 48,
78
- 5: 56,
79
- };
80
- const SdPagination = class {
81
- constructor(hostRef) {
82
- registerInstance(this, hostRef);
83
- this.pageChange = createEvent(this, "sdPageChange", 7);
84
- }
85
- /** 현재 페이지 번호 */
86
- currentPage = 1;
87
- /** 마지막 페이지 번호 */
88
- lastPage = 1;
89
- /** true이면 현재/마지막 페이지만 표시하는 단순 모드 */
90
- simple = false;
91
- /** 페이지가 변경될 때 새 페이지 번호를 전달합니다. */
92
- pageChange;
93
- get pageNumbers() {
94
- const start = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;
95
- const end = Math.min(start + PER_PAGE - 1, this.lastPage);
96
- return Array.from({ length: end - start + 1 }, (_, i) => start + i);
97
- }
98
- get buttonWidth() {
99
- const lastPageNum = this.pageNumbers.at(-1) ?? 1;
100
- const maxPageLength = lastPageNum.toString().length;
101
- return BUTTON_WIDTH[maxPageLength] || BUTTON_WIDTH[1];
102
- }
103
- get isFirstGroup() {
104
- return this.currentPage <= PER_PAGE;
105
- }
106
- get isLastGroup() {
107
- const startPageGroup = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;
108
- return startPageGroup + PER_PAGE - 1 >= this.lastPage;
109
- }
110
- handlePageChange = (page) => {
111
- if (page < 1 || page > this.lastPage)
112
- return;
113
- this.currentPage = page;
114
- this.pageChange.emit(page);
115
- };
116
- handleGroupChange = (direction) => {
117
- const delta = direction === 'forward' ? PER_PAGE : -PER_PAGE;
118
- const newPage = Math.min(Math.max(this.currentPage + delta, 1), this.lastPage);
119
- this.handlePageChange(newPage);
120
- };
121
- renderNavButton(iconName, ariaLabel, onClick) {
122
- return (h("button", { type: "button", class: "sd-pagination__nav", "aria-label": ariaLabel, onClick: onClick }, h("sd-icon", { name: iconName, size: PAGINATION_LAYOUT.iconSize, color: PAGINATION_COLORS.iconDefault })));
123
- }
124
- renderPrevButtons() {
125
- if (this.simple) {
126
- if (this.currentPage <= 1)
127
- return null;
128
- return (h(Fragment, null, this.renderNavButton('chevronLeftEnd', 'Go to first page', () => this.handlePageChange(1)), this.renderNavButton('chevronLeft', 'Go to previous page', () => this.handlePageChange(this.currentPage - 1))));
129
- }
130
- if (this.isFirstGroup)
131
- return null;
132
- return (h(Fragment, null, this.renderNavButton('chevronLeftEnd', 'Go to first page', () => this.handlePageChange(1)), this.renderNavButton('chevronLeft', 'Go to previous page group', () => this.handleGroupChange('backward'))));
133
- }
134
- renderNextButtons() {
135
- if (this.simple) {
136
- if (this.currentPage >= this.lastPage)
137
- return null;
138
- return (h(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))));
139
- }
140
- if (this.isLastGroup)
141
- return null;
142
- return (h(Fragment, null, this.renderNavButton('chevronRight', 'Go to next page group', () => this.handleGroupChange('forward')), this.renderNavButton('chevronRightEnd', 'Go to last page', () => this.handlePageChange(this.lastPage))));
143
- }
144
- render() {
145
- const cssVars = {
146
- '--sd-pagination-height': PAGINATION_LAYOUT.height,
147
- '--sd-pagination-padding-x': PAGINATION_LAYOUT.paddingX,
148
- '--sd-pagination-radius': PAGINATION_LAYOUT.radius,
149
- '--sd-pagination-gap': PAGINATION_LAYOUT.gap,
150
- '--sd-pagination-move-gap': PAGINATION_LAYOUT.moveGap,
151
- '--sd-pagination-simple-gap': PAGINATION_LAYOUT.simpleGap,
152
- '--sd-pagination-font-family': PAGINATION_TYPOGRAPHY.fontFamily,
153
- '--sd-pagination-font-size': PAGINATION_TYPOGRAPHY.fontSize,
154
- '--sd-pagination-line-height': PAGINATION_TYPOGRAPHY.lineHeight,
155
- '--sd-pagination-font-weight-default': PAGINATION_TYPOGRAPHY.fontWeightDefault,
156
- '--sd-pagination-font-weight-selected': PAGINATION_TYPOGRAPHY.fontWeightSelected,
157
- '--sd-pagination-content': PAGINATION_COLORS.contentDefault,
158
- '--sd-pagination-content-hover': PAGINATION_COLORS.contentHover,
159
- '--sd-pagination-content-selected': PAGINATION_COLORS.contentSelected,
160
- '--sd-pagination-bg-hover': PAGINATION_COLORS.bgHover,
161
- '--sd-pagination-bg-selected': PAGINATION_COLORS.bgSelected,
162
- '--sd-pagination-item-width': `${this.buttonWidth}px`,
163
- };
164
- return (h("div", { key: '4a67cbb9ed9d3cafbd3d9f99562948e3b3840210', class: {
165
- 'sd-pagination': true,
166
- 'sd-pagination--simple': this.simple,
167
- }, style: cssVars }, h("div", { key: 'f0cc77abd3b03a1525f52fbcd2587b6ad9cd468d', class: "sd-pagination__group sd-pagination__group--prev" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "sd-pagination__info" }, h("span", { class: "sd-pagination__current" }, this.currentPage), h("span", { class: "sd-pagination__divider" }, "/"), h("span", { class: "sd-pagination__last" }, this.lastPage))) : (h("div", { class: "sd-pagination__numbers" }, this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
168
- 'sd-pagination__item': true,
169
- 'sd-pagination__item--selected': this.currentPage === n,
170
- }, onClick: () => this.handlePageChange(n) }, n))))), h("div", { key: 'c4053f5917345cf1e7fcea9f3c2fa0d6b5fa7a3f', class: "sd-pagination__group sd-pagination__group--next" }, this.renderNextButtons())));
171
- }
172
- };
173
- SdPagination.style = sdPaginationCss();
174
-
175
- const sdTbodyCss = () => `:host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}`;
176
-
177
- const SdTbody = class {
178
- constructor(hostRef) {
179
- registerInstance(this, hostRef);
180
- }
181
- get el() { return getElement(this); }
182
- /** 렌더링할 행 데이터 목록 */
183
- rows = [];
184
- tableId = '';
185
- topSpacerHeight = 0;
186
- bottomSpacerHeight = 0;
187
- tableEl = null;
188
- handleRowsChange(newRows) {
189
- const safeRows = newRows ?? [];
190
- if (this.tableEl?.setRowCountSync) {
191
- this.tableEl.setRowCountSync(safeRows.length);
192
- }
193
- }
194
- componentWillLoad() {
195
- this.syncTableContext();
196
- this.rows = this.rows ?? [];
197
- if (this.tableEl?.setRowCountSync) {
198
- this.tableEl.setRowCountSync(this.rows.length);
199
- }
200
- this.el.setSpacersSync = (top, bottom) => {
201
- this.topSpacerHeight = top;
202
- this.bottomSpacerHeight = bottom;
203
- };
204
- }
205
- componentDidLoad() {
206
- this.syncTableContext();
207
- }
208
- syncTableContext() {
209
- // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
210
- // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
211
- const closest = this.el.closest('sd-table');
212
- const root = this.el.getRootNode();
213
- const fromShadow = root instanceof ShadowRoot ? root.host : null;
214
- const table = closest ?? fromShadow;
215
- this.tableEl = table;
216
- const fromMethod = table?.getTableIdSync?.();
217
- const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
218
- const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
219
- (fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
220
- '';
221
- if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
222
- this.tableId = resolvedTableId;
223
- }
224
- }
225
- render() {
226
- return (h(Host, { key: '72061abfda67f548675b6def5d217d2263b693a9', slot: `${this.tableId}-body` }, h("tbody", { key: 'e2ac60a7c395d2a411ac7811851a2916fe762f3c', class: { tbody: true } }, [
227
- this.topSpacerHeight > 0 && (h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
228
- h("slot", { key: 'af37117b1e162581569bcf6d14a8cc3289f9c6d4' }),
229
- this.bottomSpacerHeight > 0 && (h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
230
- ])));
231
- }
232
- static get watchers() { return {
233
- "rows": [{
234
- "handleRowsChange": 0
235
- }]
236
- }; }
237
- };
238
- SdTbody.style = sdTbodyCss();
239
-
240
- 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}`;
241
-
242
- const SdThead = class {
243
- constructor(hostRef) {
244
- registerInstance(this, hostRef);
245
- this.sdColumnSort = createEvent(this, "sdColumnSort", 7);
246
- }
247
- get el() { return getElement(this); }
248
- /** 테이블 컬럼 목록 */
249
- columns;
250
- /** 행 선택 기능 사용 여부 */
251
- selectable;
252
- /** 컬럼 너비 조절 가능 여부 */
253
- resizable;
254
- /** 고정 컬럼 설정 */
255
- stickyColumn;
256
- /** 헤더 고정 여부 */
257
- stickyHeader;
258
- /** 좌측 스크롤 여부 */
259
- scrolledLeft;
260
- /** 우측 스크롤 여부 */
261
- scrolledRight;
262
- /** 전체 선택 체크박스용 행 데이터 */
263
- rows = [];
264
- /** 컬럼 너비 목록 */
265
- columnWidths = [];
266
- /** 컬럼 정렬 버튼 클릭 시 발생합니다. */
267
- sdColumnSort;
268
- tableId = '';
269
- _columns = [];
270
- _selectable = false;
271
- _resizable = false;
272
- _stickyColumn = { left: 0, right: 0 };
273
- _stickyHeader = false;
274
- _scrolledLeft = false;
275
- _scrolledRight = false;
276
- dropdownOpenMap = {};
277
- tableEl = null;
278
- dropdownRefs = {};
279
- dropdownThRefs = {};
280
- dropdownPortals = {};
281
- handleColumnsChange(newCols) {
282
- if (Array.isArray(newCols) && (this.columnWidths ?? []).length === 0) {
283
- this.columnWidths = newCols.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
284
- }
285
- }
286
- disconnectedCallback() {
287
- const portals = this.dropdownPortals ?? {};
288
- Object.values(portals).forEach(portal => {
289
- if (portal?.parentNode != null)
290
- portal.parentNode.removeChild(portal);
291
- });
292
- }
293
- componentWillLoad() {
294
- this.syncTableContext();
295
- this.dropdownOpenMap = this.dropdownOpenMap ?? {};
296
- this.dropdownRefs = this.dropdownRefs ?? {};
297
- this.dropdownThRefs = this.dropdownThRefs ?? {};
298
- this.dropdownPortals = this.dropdownPortals ?? {};
299
- this.columnWidths = Array.isArray(this.columnWidths) ? this.columnWidths : [];
300
- this.resolveConfig();
301
- if ((this.columnWidths ?? []).length === 0) {
302
- this.columnWidths = this._columns.map(c => c.autoWidth ? 0 : parseInt(c.width || '120', 10));
303
- }
304
- }
305
- componentDidLoad() {
306
- this.syncTableContext();
307
- this.resolveConfig();
308
- this.initDropdownPortals();
309
- }
310
- // sd-portal을 body에 붙여 CSS transform 영향 없이 정확한 위치에 패널을 표시한다.
311
- // <slot>을 render에 두지 않고 직접 DOM 이동(slot 속성 제거)으로 Stencil 슬롯 에뮬레이션 충돌을 피한다.
312
- initDropdownPortals() {
313
- const cols = this._columns ?? [];
314
- const hasDropdownCols = cols.filter(c => c.hasDropdown === true);
315
- if (hasDropdownCols.length === 0)
316
- return;
317
- for (const col of hasDropdownCols) {
318
- const colName = col.name;
319
- // 이미 포탈이 생성된 컬럼은 건너뜀 (refreshConfig 재호출 대비)
320
- if ((this.dropdownPortals ?? {})[colName] != null)
321
- continue;
322
- const slotContent = this.el.querySelector(`[slot="dropdown-${colName}"]`);
323
- if (slotContent == null)
324
- continue;
325
- // slot 속성 제거: Stencil 슬롯 에뮬레이션이 재배포하지 못하게 한다
326
- slotContent.removeAttribute('slot');
327
- const portal = document.createElement('sd-portal');
328
- portal.parentRef = this.dropdownThRefs[colName] ?? null;
329
- portal.open = false;
330
- // 첫 open 전까지 포탈 호스트 자체를 숨긴다.
331
- // moveSlotContent()가 open=true 시 children을 독립 wrapper div로 이동하므로 이후 동작에 영향 없음.
332
- portal.style.display = 'none';
333
- portal.addEventListener('sdClose', () => this.closeDropdown(colName));
334
- portal.appendChild(slotContent);
335
- document.body.appendChild(portal);
336
- this.dropdownPortals[colName] = portal;
337
- }
338
- }
339
- syncTableContext() {
340
- // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
341
- // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
342
- const closest = this.el.closest('sd-table');
343
- const root = this.el.getRootNode();
344
- const fromShadow = root instanceof ShadowRoot ? root.host : null;
345
- const table = closest ?? fromShadow;
346
- this.tableEl = table;
347
- const fromMethod = table?.getTableIdSync?.();
348
- const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
349
- const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
350
- (fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
351
- '';
352
- if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
353
- this.tableId = resolvedTableId;
354
- }
355
- }
356
- resolveConfig() {
357
- const config = this.tableEl?.getConfigSync?.();
358
- const resolvedColumns = Array.isArray(this.columns)
359
- ? this.columns
360
- : Array.isArray(config?.columns)
361
- ? config.columns
362
- : [];
363
- this._columns = resolvedColumns;
364
- this._selectable = this.selectable ?? config?.selectable ?? false;
365
- this._resizable = this.resizable ?? config?.resizable ?? false;
366
- this._stickyColumn = this.stickyColumn ?? config?.stickyColumn ?? { left: 0, right: 0 };
367
- this._stickyHeader = this.stickyHeader ?? config?.stickyHeader ?? false;
368
- this._scrolledLeft = this.scrolledLeft ?? config?.scrolledLeft ?? false;
369
- this._scrolledRight = this.scrolledRight ?? config?.scrolledRight ?? false;
370
- if (Array.isArray(config?.columnWidths) && (this.columnWidths ?? []).length === 0) {
371
- this.columnWidths = [...config.columnWidths];
372
- }
373
- if (!Array.isArray(this.columnWidths)) {
374
- this.columnWidths = [];
375
- }
376
- }
377
- /** 테이블 설정을 다시 불러옵니다. */
378
- async refreshConfig() {
379
- this.resolveConfig();
380
- this.initDropdownPortals();
381
- }
382
- /** 컬럼 너비를 업데이트합니다. */
383
- async setColumnWidths(widths) {
384
- this.columnWidths = Array.isArray(widths) ? widths : [];
385
- }
386
- /** 전체 선택 체크박스 상태를 갱신합니다. */
387
- async refreshSelection() {
388
- const checkbox = this.el.querySelector('sd-checkbox');
389
- if (checkbox) {
390
- checkbox.value = this.getIsAllChecked();
391
- }
392
- }
393
- get visibleColumns() {
394
- return this._columns.filter(col => col.visible !== false);
395
- }
396
- getStickyStyle(colIdx) {
397
- if (this.tableEl?.getStickyStyleSync) {
398
- return this.tableEl.getStickyStyleSync(colIdx);
399
- }
400
- const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) +
401
- (this._selectable ? TABLE_SELECTABLE_COLUMN_WIDTH : 0);
402
- const rightOffset = this.columnWidths
403
- .filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
404
- .reduce((a, b) => a + b, 0);
405
- const col = this.visibleColumns[colIdx];
406
- const base = {
407
- '--sticky-left-offset': `${leftOffset}px`,
408
- '--sticky-right-offset': `${rightOffset}px`,
409
- };
410
- if (!col?.autoWidth) {
411
- base['width'] = `${this.columnWidths[colIdx]}px`;
412
- base['minWidth'] = `${this.columnWidths[colIdx]}px`;
413
- base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
414
- }
415
- return base;
416
- }
417
- handleResize(index, event, reversed = false) {
418
- if (this.tableEl?.handleResize) {
419
- this.tableEl.handleResize(index, event, reversed);
420
- }
421
- }
422
- handleColumnSort = (col) => {
423
- this.sdColumnSort.emit({ column: col });
424
- };
425
- toggleDropdown(name) {
426
- const isOpen = this.dropdownOpenMap[name] !== true;
427
- const portals = this.dropdownPortals ?? {};
428
- const newMap = { ...this.dropdownOpenMap };
429
- // _columns 기준으로 순회: portals가 비어도 dropdownOpenMap은 항상 갱신됨
430
- for (const col of (this._columns ?? []).filter(c => c.hasDropdown === true)) {
431
- const shouldBeOpen = col.name === name ? isOpen : false;
432
- newMap[col.name] = shouldBeOpen;
433
- const portal = portals[col.name];
434
- if (portal != null)
435
- portal.open = shouldBeOpen;
436
- }
437
- this.dropdownOpenMap = newMap;
438
- }
439
- closeDropdown(name) {
440
- if (this.dropdownOpenMap[name] !== true)
441
- return;
442
- this.dropdownOpenMap = { ...this.dropdownOpenMap, [name]: false };
443
- const portal = (this.dropdownPortals ?? {})[name];
444
- if (portal != null)
445
- portal.open = false;
446
- }
447
- handleSelectAll(checked) {
448
- const nextChecked = !!checked;
449
- const safeRows = Array.isArray(this.rows) ? this.rows : [];
450
- if (this.tableEl?.toggleSelectAllSync) {
451
- this.tableEl.toggleSelectAllSync(nextChecked, safeRows);
452
- }
453
- }
454
- getIsAllChecked() {
455
- const safeRows = Array.isArray(this.rows) ? this.rows : [];
456
- if (this.tableEl?.getIsAllCheckedSync && safeRows.length > 0) {
457
- return this.tableEl.getIsAllCheckedSync(safeRows);
458
- }
459
- return false;
460
- }
461
- render() {
462
- const safeRows = Array.isArray(this.rows) ? this.rows : [];
463
- const dropdownOpenMap = this.dropdownOpenMap ?? {};
464
- const dropdownRefs = this.dropdownRefs ?? {};
465
- const stickyLeftCount = this._stickyColumn.left || 0;
466
- const stickyRightCount = this._stickyColumn.right || 0;
467
- const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
468
- const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
469
- const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
470
- const lastColIdx = this.visibleColumns.length - 1;
471
- const headStyle = {
472
- '--table-header-height': `${TABLE_HEADER_LAYOUT.height}px`,
473
- '--table-header-padding-x': `${TABLE_HEADER_LAYOUT.paddingX}px`,
474
- '--table-header-gap': `${TABLE_HEADER_LAYOUT.gap}px`,
475
- '--table-header-bg': TABLE_HEADER_COLORS.bg,
476
- '--table-header-font-family': TABLE_HEADER_TYPOGRAPHY.fontFamily,
477
- '--table-header-font-weight': TABLE_HEADER_TYPOGRAPHY.fontWeight,
478
- '--table-header-font-size': `${TABLE_HEADER_TYPOGRAPHY.fontSize}px`,
479
- '--table-header-line-height': `${TABLE_HEADER_TYPOGRAPHY.lineHeight}px`,
480
- '--table-header-text-decoration': TABLE_HEADER_TYPOGRAPHY.textDecoration,
481
- '--table-header-resizer-color': TABLE_HEADER_RESIZING_BAR.color,
482
- '--table-header-resizer-height': `${TABLE_HEADER_RESIZING_BAR.height}px`,
483
- '--table-border-color': TABLE_BORDER.color,
484
- '--table-border-width': `${TABLE_BORDER.width}px`,
485
- };
486
- return (h(Host, { key: '2f2218c9c0ba02fc59eb026944a3e26fbf741f23', slot: `${this.tableId}-head`, style: headStyle }, h("thead", { key: '008fc1ef83c882dd85fd9d6b8490a3246183e758', class: {
487
- 'thead': true,
488
- 'thead--sticky': this._stickyHeader,
489
- } }, h("tr", { key: 'ff679599539ea36d74160d31258bc06c4c6d0fda', class: "tr" }, this._selectable && (h("th", { key: '9fd149c26ec979f3f82eb5b1fad56cf963ee1e7f', class: {
490
- 'th': true,
491
- 'th--selected': true,
492
- 'sticky-left': true,
493
- 'sticky-left-edge': stickyLeftCount === 0,
494
- 'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
495
- }, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { key: 'feab85e049c99a1a565b250f5b0aa0ed6d986d65', value: this.getIsAllChecked(), disabled: safeRows.length === 0, onSdUpdate: (e) => this.handleSelectAll(e.detail) }), h("div", { key: 'bf68afc8990977e607cbd6f25b19f6442b7fbab3', class: "th__bar" }))), stickyLeftCols.map((col, idx) => (h("th", { key: col.name, class: {
496
- 'th': true,
497
- [`${col.thClass}`]: Boolean(col.thClass),
498
- 'sticky-left': true,
499
- 'sticky-left-edge': idx === stickyLeftCount - 1,
500
- 'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
501
- 'th--has-dropdown': col.hasDropdown === true,
502
- }, style: { ...col.thStyle, ...this.getStickyStyle(idx) }, ref: col.hasDropdown === true
503
- ? el => {
504
- this.dropdownThRefs[col.name] = el;
505
- }
506
- : undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
507
- e.stopPropagation();
508
- this.handleColumnSort(col);
509
- }, style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text)))))), col.hasDropdown === true && (h("button", { class: {
510
- 'th__dropdown-trigger': true,
511
- 'th__dropdown-trigger--open': dropdownOpenMap[col.name] === true,
512
- }, ref: el => {
513
- dropdownRefs[col.name] = el;
514
- }, "aria-haspopup": "listbox", "aria-expanded": dropdownOpenMap[col.name] === true ? 'true' : 'false' }, h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && idx !== lastColIdx && (
515
- // column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
516
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
517
- h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
518
- const actualColIdx = stickyLeftCount + relativeIdx;
519
- return (h("th", { key: col.name, class: {
520
- 'th': true,
521
- [`${col.thClass}`]: Boolean(col.thClass),
522
- 'th--has-dropdown': col.hasDropdown === true,
523
- }, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
524
- ? el => {
525
- this.dropdownThRefs[col.name] = el;
526
- }
527
- : undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
528
- e.stopPropagation();
529
- this.handleColumnSort(col);
530
- }, style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text)))))), col.hasDropdown === true && (h("button", { class: {
531
- 'th__dropdown-trigger': true,
532
- 'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
533
- }, ref: el => {
534
- this.dropdownRefs[col.name] = el;
535
- }, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && actualColIdx !== lastColIdx && (
536
- // column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
537
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
538
- h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
539
- }), stickyRightCols.map((col, relativeIdx) => {
540
- const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
541
- return (h("th", { key: col.name, class: {
542
- 'th': true,
543
- [`${col.thClass}`]: Boolean(col.thClass),
544
- 'sticky-right': true,
545
- 'sticky-right-edge': relativeIdx === 0,
546
- 'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
547
- 'th--has-dropdown': col.hasDropdown === true,
548
- }, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) }, ref: col.hasDropdown === true
549
- ? el => {
550
- this.dropdownThRefs[col.name] = el;
551
- }
552
- : undefined, onClick: col.hasDropdown === true ? () => this.toggleDropdown(col.name) : undefined }, h("div", { class: `th__content th__content--${col.align || 'left'}` }, h("div", { class: "th__content--label" }, col.label), col.icon && (h("sd-icon", { name: col.icon, size: "12", color: resolveTableIconColor(col.icon, col.iconColor) })), col.sort && (h("sd-icon", { name: resolveSortIconName(col.sort), size: "12", color: resolveTableIconColor(resolveSortIconName(col.sort), col.iconColor), onClick: (e) => {
553
- e.stopPropagation();
554
- this.handleColumnSort(col);
555
- }, style: { cursor: 'pointer' } })), col.tooltip && (h("sd-tooltip", { ...col.tooltipOptions }, h("div", { slot: "content" }, col.tooltip.map(text => (h("p", null, text)))))), col.hasDropdown === true && (h("button", { class: {
556
- 'th__dropdown-trigger': true,
557
- 'th__dropdown-trigger--open': this.dropdownOpenMap[col.name] === true,
558
- }, ref: el => {
559
- this.dropdownRefs[col.name] = el;
560
- }, "aria-haspopup": "listbox", "aria-expanded": this.dropdownOpenMap[col.name] === true ? 'true' : 'false' }, h("sd-icon", { name: "caretDown", size: "12" })))), this._resizable && (
561
- // column resize 는 마우스 드래그 전용 인터랙션이라 키보드 핸들러를 두지 않는다.
562
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
563
- h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
564
- })))));
565
- }
566
- static get watchers() { return {
567
- "columns": [{
568
- "handleColumnsChange": 0
569
- }]
570
- }; }
571
- };
572
- SdThead.style = sdTheadCss();
573
-
574
- 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)}`;
575
-
576
- const SdTr = class {
577
- constructor(hostRef) {
578
- registerInstance(this, hostRef);
579
- }
580
- get el() { return getElement(this); }
581
- /** 테이블 컬럼 목록 */
582
- columns;
583
- /** 행 선택 기능 사용 여부 */
584
- selectable;
585
- /** 고정 컬럼 설정 */
586
- stickyColumn;
587
- /** 행 식별 키 */
588
- rowKey = '';
589
- /** 행 데이터 객체 */
590
- row = {};
591
- /** 구분선 높이 (4 또는 6px, null이면 일반 행) */
592
- separator = null;
593
- tableId = '';
594
- columnWidths = [];
595
- isVisible = true;
596
- spansVersion = 0;
597
- _columns = [];
598
- _selectable = false;
599
- _stickyColumn = { left: 0, right: 0 };
600
- _scrolledLeft = false;
601
- _scrolledRight = false;
602
- _dense = false;
603
- tableEl = null;
604
- componentWillLoad() {
605
- this.row = this.row ?? {};
606
- this.syncTableContext();
607
- this.columnWidths = this.columnWidths ?? [];
608
- this.resolveConfig();
609
- this.columnWidths = this._columns.map(c => (c.autoWidth ? 0 : parseInt(c.width || '120', 10)));
610
- this.updateVisibilitySync();
611
- }
612
- componentDidLoad() {
613
- this.syncTableContext();
614
- }
615
- syncTableContext() {
616
- // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
617
- // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
618
- const closest = this.el.closest('sd-table');
619
- const root = this.el.getRootNode();
620
- const fromShadow = root instanceof ShadowRoot ? root.host : null;
621
- const table = closest ?? fromShadow;
622
- this.tableEl = table;
623
- const fromMethod = table?.getTableIdSync?.();
624
- const fromAttr = table?.getAttribute(TABLE_ID_ATTR);
625
- const resolvedTableId = (fromMethod != null && fromMethod !== '' && fromMethod !== 'undefined' ? fromMethod : null) ??
626
- (fromAttr != null && fromAttr !== '' && fromAttr !== 'undefined' ? fromAttr : null) ??
627
- '';
628
- if (resolvedTableId !== '' && resolvedTableId !== this.tableId) {
629
- this.tableId = resolvedTableId;
630
- }
631
- }
632
- resolveConfig() {
633
- const config = this.tableEl?.getConfigSync?.();
634
- this._columns = this.columns ?? config?.columns ?? [];
635
- this._selectable = this.selectable ?? config?.selectable ?? false;
636
- this._stickyColumn = this.stickyColumn ?? config?.stickyColumn ?? { left: 0, right: 0 };
637
- this._scrolledLeft = config?.scrolledLeft ?? false;
638
- this._scrolledRight = config?.scrolledRight ?? false;
639
- this._dense = config?.dense ?? false;
640
- if (config?.columnWidths && (this.columnWidths ?? []).length === 0) {
641
- this.columnWidths = [...config.columnWidths];
642
- }
643
- }
644
- /** 테이블 설정을 다시 불러옵니다. */
645
- async refreshConfig() {
646
- this.resolveConfig();
647
- }
648
- /** 셀 병합 버전을 갱신해 td를 재렌더링합니다. */
649
- async bumpSpansVersion() {
650
- this.spansVersion = this.spansVersion + 1;
651
- }
652
- /** 페이지네이션에 따른 행 표시 여부를 갱신합니다. */
653
- async updateVisibility() {
654
- this.updateVisibilitySync();
655
- }
656
- updateVisibilitySync() {
657
- const rowIndex = parseInt(this.rowKey, 10);
658
- const pageInfo = this.tableEl?.getPaginationInfoSync?.();
659
- if (!pageInfo) {
660
- this.isVisible = true;
661
- return;
662
- }
663
- this.isVisible = rowIndex >= pageInfo.startIndex && rowIndex < pageInfo.endIndex;
664
- }
665
- /** 컬럼 너비를 업데이트합니다. */
666
- async setColumnWidths(widths) {
667
- this.columnWidths = widths;
668
- }
669
- /** 체크박스 선택 상태를 갱신합니다. */
670
- async refreshSelection() {
671
- const checkbox = this.el.querySelector('sd-checkbox');
672
- if (checkbox) {
673
- checkbox.value = this.isSelected();
674
- }
675
- }
676
- get visibleColumns() {
677
- return this._columns.filter(col => col.visible !== false);
678
- }
679
- formatValue(value) {
680
- if (value === null || value === undefined) {
681
- return '';
682
- }
683
- if (typeof value === 'number') {
684
- return value.toLocaleString();
685
- }
686
- return String(value);
687
- }
688
- getCellValue(column) {
689
- const { field, format, name } = column;
690
- const value = typeof field === 'function'
691
- ? field(this.row)
692
- : field !== ''
693
- ? this.row[field]
694
- : this.row[name];
695
- return format ? format(value, this.row) : this.formatValue(value);
696
- }
697
- getStickyStyle(colIdx) {
698
- if (this.tableEl?.getStickyStyleSync) {
699
- return this.tableEl.getStickyStyleSync(colIdx);
700
- }
701
- const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this._selectable ? 52 : 0);
702
- const rightOffset = this.columnWidths
703
- .filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
704
- .reduce((a, b) => a + b, 0);
705
- const col = this.visibleColumns[colIdx];
706
- const base = {
707
- '--sticky-left-offset': `${leftOffset}px`,
708
- '--sticky-right-offset': `${rightOffset}px`,
709
- };
710
- if (!col?.autoWidth) {
711
- base['width'] = `${this.columnWidths[colIdx]}px`;
712
- base['minWidth'] = `${this.columnWidths[colIdx]}px`;
713
- base['maxWidth'] = `${this.columnWidths[colIdx]}px`;
714
- }
715
- return base;
716
- }
717
- isSelected() {
718
- if (this.tableEl?.isRowSelectedSync) {
719
- return this.tableEl.isRowSelectedSync(this.row);
720
- }
721
- return false;
722
- }
723
- handleSelect() {
724
- if (this.tableEl?.updateRowSelectSync) {
725
- this.tableEl.updateRowSelectSync(this.row);
726
- }
727
- }
728
- getSpanFor(col) {
729
- if (!this.tableEl?.getSpanSync)
730
- return undefined;
731
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
732
- return this.tableEl.getSpanSync(this.rowKey, fieldName);
733
- }
734
- isCovered(colIdx) {
735
- if (!this.tableEl?.isCoveredSync)
736
- return false;
737
- return this.tableEl.isCoveredSync(this.rowKey, colIdx, this._columns);
738
- }
739
- getCellClassFor(col) {
740
- if (!this.tableEl?.getCellClassSync)
741
- return undefined;
742
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
743
- return this.tableEl.getCellClassSync(this.rowKey, fieldName);
744
- }
745
- getFramePaddingStyle(field) {
746
- if (!(this.tableEl?.isCellUseFrameSync?.(this.rowKey, field) ?? false))
747
- return undefined;
748
- return { padding: `${TABLE_BODY_LAYOUT.framePadding}px` };
749
- }
750
- expandCellClass(classStr) {
751
- if (classStr == null || classStr === '')
752
- return {};
753
- return Object.fromEntries(classStr
754
- .split(/\s+/)
755
- .filter(Boolean)
756
- .map(c => [c, true]));
757
- }
758
- render() {
759
- const stickyLeftCount = this._stickyColumn.left || 0;
760
- const stickyRightCount = this._stickyColumn.right || 0;
761
- const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
762
- const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
763
- const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
764
- const hasRowspan = this.tableEl?.hasRowspanSync?.() ?? false;
765
- const isUseFrameRow = this.tableEl?.hasUseFrameInRowSync?.(this.rowKey) ?? false;
766
- const effectiveDense = this._dense && !isUseFrameRow;
767
- const rowLayoutY = effectiveDense ? TABLE_BODY_LAYOUT.dense : TABLE_BODY_LAYOUT.default;
768
- const rowPaddingX = effectiveDense
769
- ? TABLE_BODY_LAYOUT.densePaddingX
770
- : TABLE_BODY_LAYOUT.paddingX;
771
- const rowStyle = {
772
- 'display': this.isVisible ? '' : 'none',
773
- '--table-body-height': `${rowLayoutY.height}px`,
774
- '--table-body-padding-y': `${rowLayoutY.paddingY}px`,
775
- '--table-body-padding-x': `${rowPaddingX}px`,
776
- '--table-body-font-family': TABLE_BODY_TYPOGRAPHY.fontFamily,
777
- '--table-body-font-weight': TABLE_BODY_TYPOGRAPHY.fontWeight,
778
- '--table-body-font-size': `${TABLE_BODY_TYPOGRAPHY.fontSize}px`,
779
- '--table-body-line-height': `${TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
780
- '--table-body-text-decoration': TABLE_BODY_TYPOGRAPHY.textDecoration,
781
- '--table-border-color': TABLE_BORDER.color,
782
- '--table-border-width': `${TABLE_BORDER.width}px`,
783
- '--table-separator-color': TABLE_SEPARATOR.color,
784
- '--table-separator-width': `${TABLE_SEPARATOR.width}px`,
785
- '--table-separator-dense-width': `${TABLE_SEPARATOR.denseWidth}px`,
786
- };
787
- if (this.separator != null) {
788
- const totalCols = this.visibleColumns.length + (this._selectable ? 1 : 0);
789
- const isDense = this.separator === 4;
790
- return (h(Host, { style: rowStyle }, h("tr", { class: { 'tr': true, 'tr--separator': true, 'tr--separator--dense': isDense } }, h("td", { colSpan: totalCols, class: "td td--separator" }))));
791
- }
792
- return (h(Host, { style: rowStyle }, h("tr", { class: { 'tr': true, 'tr--no-hover': hasRowspan } }, this._selectable && (h("td", { class: {
793
- 'td': true,
794
- 'td--selected': true,
795
- 'sticky-left': true,
796
- 'sticky-left-edge': stickyLeftCount === 0,
797
- 'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
798
- }, style: { '--sticky-left-offset': '0px' } }, h("sd-checkbox", { value: this.isSelected(), onSdUpdate: () => this.handleSelect() }))), stickyLeftCols.map((col, idx) => {
799
- if (this.isCovered(idx))
800
- return null;
801
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
802
- const span = this.getSpanFor(col);
803
- const sdCellClass = this.getCellClassFor(col);
804
- return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
805
- 'td': true,
806
- [`td--${col.align || 'left'}`]: true,
807
- 'sticky-left': true,
808
- 'sticky-left-edge': idx === stickyLeftCount - 1,
809
- 'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
810
- [`${col.tdClass}`]: Boolean(col.tdClass),
811
- ...this.expandCellClass(sdCellClass),
812
- }, style: { ...this.getStickyStyle(idx), ...this.getFramePaddingStyle(fieldName) } }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
813
- }), middleCols.map((col, relativeIdx) => {
814
- const actualColIdx = stickyLeftCount + relativeIdx;
815
- if (this.isCovered(actualColIdx))
816
- return null;
817
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
818
- const span = this.getSpanFor(col);
819
- const sdCellClass = this.getCellClassFor(col);
820
- return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
821
- td: true,
822
- [`td--${col.align || 'left'}`]: true,
823
- [`${col.tdClass}`]: Boolean(col.tdClass),
824
- ...this.expandCellClass(sdCellClass),
825
- }, style: {
826
- ...this.getStickyStyle(actualColIdx),
827
- ...this.getFramePaddingStyle(fieldName),
828
- } }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
829
- }), stickyRightCols.map((col, relativeIdx) => {
830
- const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
831
- if (this.isCovered(actualColIdx))
832
- return null;
833
- const fieldName = typeof col.field === 'string' ? col.field : col.name;
834
- const span = this.getSpanFor(col);
835
- const sdCellClass = this.getCellClassFor(col);
836
- return (h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
837
- 'td': true,
838
- [`td--${col.align || 'left'}`]: true,
839
- 'sticky-right': true,
840
- 'sticky-right-edge': relativeIdx === 0,
841
- 'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
842
- [`${col.tdClass}`]: Boolean(col.tdClass),
843
- ...this.expandCellClass(sdCellClass),
844
- }, style: {
845
- ...this.getStickyStyle(actualColIdx),
846
- ...this.getFramePaddingStyle(fieldName),
847
- } }, h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, h("span", null, this.getCellValue(col)))));
848
- }))));
849
- }
850
- };
851
- SdTr.style = sdTrCss();
852
-
853
- export { SdPagination as sd_pagination, SdTbody as sd_tbody, SdThead as sd_thead, SdTr as sd_tr };