@sellmate/design-system 1.0.75 → 1.0.77

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 (460) hide show
  1. package/dist/cjs/design-system.cjs.js +2 -2
  2. package/dist/cjs/{index-Dptupbm0.js → index-CaGGRpd8.js} +1 -1
  3. package/dist/cjs/index.cjs.js +5 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/sd-action-modal.cjs.entry.js +2 -2
  6. package/dist/cjs/sd-badge.cjs.entry.js +2 -2
  7. package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -2
  8. package/dist/cjs/sd-button-v2_2.cjs.entry.js +3 -3
  9. package/dist/cjs/sd-button_4.cjs.entry.js +10 -13
  10. package/dist/cjs/sd-calendar.cjs.entry.js +1 -1
  11. package/dist/cjs/sd-card.cjs.entry.js +2 -2
  12. package/dist/cjs/sd-checkbox.cjs.entry.js +7 -4
  13. package/dist/cjs/sd-chip.cjs.entry.js +2 -2
  14. package/dist/cjs/sd-circle-progress.cjs.entry.js +3 -3
  15. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +4 -4
  16. package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
  17. package/dist/cjs/sd-date-picker-calendar.cjs.entry.js +2 -2
  18. package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +3 -3
  19. package/dist/cjs/sd-date-picker.cjs.entry.js +3 -3
  20. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +2 -2
  21. package/dist/cjs/sd-date-range-picker.cjs.entry.js +1 -1
  22. package/dist/cjs/sd-dropdown-button.cjs.entry.js +94 -7
  23. package/dist/cjs/sd-file-picker.cjs.entry.js +2 -2
  24. package/dist/cjs/sd-form.cjs.entry.js +1 -1
  25. package/dist/cjs/sd-ghost-button.cjs.entry.js +11 -6
  26. package/dist/cjs/sd-guide.cjs.entry.js +2 -2
  27. package/dist/cjs/{sd-input_2.cjs.entry.js → sd-input.cjs.entry.js} +3 -43
  28. package/dist/cjs/sd-linear-progress.cjs.entry.js +3 -3
  29. package/dist/cjs/sd-loading-container.cjs.entry.js +3 -3
  30. package/dist/cjs/sd-modal-container.cjs.entry.js +77 -69
  31. package/dist/cjs/sd-number-input.cjs.entry.js +4 -4
  32. package/dist/cjs/sd-pagination_5.cjs.entry.js +921 -0
  33. package/dist/cjs/sd-popover.cjs.entry.js +2 -2
  34. package/dist/cjs/sd-portal.cjs.entry.js +2 -2
  35. package/dist/cjs/sd-radio-button.cjs.entry.js +7 -2
  36. package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
  37. package/dist/cjs/sd-radio.cjs.entry.js +1 -1
  38. package/dist/cjs/{sd-select-v2-list-item_4.cjs.entry.js → sd-select-list-item_4.cjs.entry.js} +108 -48
  39. package/dist/cjs/sd-switch.cjs.entry.js +2 -2
  40. package/dist/cjs/sd-table.cjs.entry.js +178 -21
  41. package/dist/cjs/sd-table.config-hnNodd18.js +105 -0
  42. package/dist/cjs/sd-tabs.cjs.entry.js +2 -2
  43. package/dist/cjs/sd-tag.cjs.entry.js +3 -3
  44. package/dist/cjs/sd-td.cjs.entry.js +54 -2
  45. package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
  46. package/dist/cjs/sd-textarea.cjs.entry.js +2 -2
  47. package/dist/cjs/sd-toast-container.cjs.entry.js +2 -2
  48. package/dist/cjs/sd-toast.cjs.entry.js +3 -3
  49. package/dist/cjs/sd-toggle.cjs.entry.js +2 -2
  50. package/dist/cjs/{system-BbCUNhDJ.js → system-DRemSdU1.js} +7 -1
  51. package/dist/cjs/{tooltipArrow-DuANjCfc.js → tooltipArrow-BEff0q3z.js} +1 -1
  52. package/dist/collection/collection-manifest.json +11 -21
  53. package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
  54. package/dist/collection/components/sd-badge/sd-badge.js +1 -1
  55. package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +1 -1
  56. package/dist/collection/components/sd-button-v2/sd-button-v2.js +2 -2
  57. package/dist/collection/components/sd-card/sd-card.js +1 -1
  58. package/dist/collection/components/sd-checkbox/sd-checkbox.js +6 -3
  59. package/dist/collection/components/sd-chip/sd-chip.js +1 -1
  60. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  61. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
  62. package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +1 -1
  63. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  64. package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
  65. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
  66. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
  67. package/dist/collection/components/sd-field/sd-field.js +5 -8
  68. package/dist/collection/components/sd-file-picker/sd-file-picker.js +1 -1
  69. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  70. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +10 -5
  71. package/dist/collection/components/sd-input/sd-input.js +2 -2
  72. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  73. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  74. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  75. package/dist/collection/components/sd-modal-container/sd-modal-container.js +77 -71
  76. package/dist/collection/components/sd-number-input/sd-number-input.js +3 -3
  77. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  78. package/dist/collection/components/sd-portal/sd-portal.js +1 -1
  79. package/dist/collection/components/sd-radio-button/sd-radio-button.js +6 -1
  80. package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.css → sd-select/sd-select-list-item/sd-select-list-item.css} +13 -13
  81. package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.js → sd-select/sd-select-list-item/sd-select-list-item.js} +28 -28
  82. package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.css → sd-select/sd-select-list-item-search/sd-select-list-item-search.css} +11 -11
  83. package/dist/collection/components/{sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.js → sd-select/sd-select-list-item-search/sd-select-list-item-search.js} +13 -13
  84. package/dist/collection/components/{sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.css → sd-select/sd-select-listbox/sd-select-listbox.css} +3 -3
  85. package/dist/collection/components/{sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js → sd-select/sd-select-listbox/sd-select-listbox.js} +133 -33
  86. package/dist/collection/components/{sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.css → sd-select/sd-select-trigger/sd-select-trigger.css} +7 -7
  87. package/dist/collection/components/{sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js → sd-select/sd-select-trigger/sd-select-trigger.js} +12 -12
  88. package/dist/collection/components/sd-select/sd-select.css +3 -47
  89. package/dist/collection/components/sd-select/sd-select.js +413 -294
  90. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  91. package/dist/collection/components/sd-table/sd-table.config.js +81 -0
  92. package/dist/collection/components/sd-table/sd-table.css +17 -9
  93. package/dist/collection/components/sd-table/sd-table.js +179 -21
  94. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +0 -8
  95. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +9 -5
  96. package/dist/collection/components/sd-table/sd-td/sd-td.js +91 -1
  97. package/dist/collection/components/sd-table/sd-thead/sd-thead.css +16 -12
  98. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +58 -9
  99. package/dist/collection/components/sd-table/sd-tr/sd-tr.css +11 -3
  100. package/dist/collection/components/sd-table/sd-tr/sd-tr.js +75 -12
  101. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  102. package/dist/collection/components/sd-tag/sd-tag.js +2 -2
  103. package/dist/collection/components/sd-text-link/sd-text-link.js +3 -3
  104. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  105. package/dist/collection/components/sd-toast/sd-toast.js +2 -2
  106. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  107. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  108. package/dist/collection/components/sd-tooltip/sd-tooltip.js +2 -2
  109. package/dist/collection/utils/modal.js +5 -0
  110. package/dist/collection/utils/testing/index.js +2 -0
  111. package/dist/collection/utils/testing/mocks.js +35 -0
  112. package/dist/components/index.js +1 -1
  113. package/dist/components/p-B6KZfiQ5.js +1 -0
  114. package/dist/components/{p-CTwEbxRN.js → p-BEOrkEV1.js} +1 -1
  115. package/dist/components/p-BJJvCBQs.js +1 -0
  116. package/dist/components/p-BM_PRj8W.js +1 -0
  117. package/dist/components/p-BR_ZAr48.js +1 -0
  118. package/dist/components/p-BeNJfxnb.js +1 -0
  119. package/dist/components/{p-BLwIhCdO.js → p-BfoLbEZx.js} +1 -1
  120. package/dist/components/p-Bm8Fue-a.js +1 -0
  121. package/dist/components/{p-DaAhgdib.js → p-BynnUMVZ.js} +1 -1
  122. package/dist/components/{p-D5HLYqT-.js → p-C52iEAqd.js} +1 -1
  123. package/dist/components/p-C8Dy_x5h.js +1 -0
  124. package/dist/components/{p-C3dI7f7C.js → p-CJAQuJik.js} +1 -1
  125. package/dist/components/{p-iAWNMLXh.js → p-CJqZcEqD.js} +1 -1
  126. package/dist/components/{p-H-9uoufd.js → p-CNm5Qbf-.js} +1 -1
  127. package/dist/components/{p-B3xZdEDI.js → p-CQy5JErK.js} +1 -1
  128. package/dist/components/{p-BgFLSKqC.js → p-CZxeqYuw.js} +1 -1
  129. package/dist/components/{p-SDBnyM8D.js → p-CkgQbCMR.js} +1 -1
  130. package/dist/components/p-CvnC61M9.js +1 -0
  131. package/dist/components/{p-6LtMeKKA.js → p-D1SJ2TMu.js} +1 -1
  132. package/dist/components/{p-BXdEjuI_.js → p-D2FOkhao.js} +1 -1
  133. package/dist/components/p-D66nhMt3.js +1 -0
  134. package/dist/components/p-DDDZWrWj.js +1 -0
  135. package/dist/components/p-DK3vj3bG.js +1 -0
  136. package/dist/components/{p-CZPR_5mk.js → p-DcuLMUdl.js} +1 -1
  137. package/dist/components/p-DxXwz3cY.js +1 -0
  138. package/dist/components/p-NlCzTjK4.js +1 -0
  139. package/dist/components/{p-BZm6KN1s.js → p-RpjjrX78.js} +1 -1
  140. package/dist/components/{p-BM0sVq5Z.js → p-ZH78tQXS.js} +1 -1
  141. package/dist/components/{p-DQfNwvwx.js → p-ZLsQA11g.js} +1 -1
  142. package/dist/components/{p-DdJyzIYe.js → p-eGToaKCt.js} +1 -1
  143. package/dist/components/p-hTUSl23P.js +1 -0
  144. package/dist/components/p-mqa9-iql.js +1 -0
  145. package/dist/components/sd-action-modal.js +1 -1
  146. package/dist/components/sd-badge.js +1 -1
  147. package/dist/components/sd-barcode-input.js +1 -1
  148. package/dist/components/sd-button-v2.js +1 -1
  149. package/dist/components/sd-button.js +1 -1
  150. package/dist/components/sd-calendar.js +1 -1
  151. package/dist/components/sd-card.js +1 -1
  152. package/dist/components/sd-checkbox.js +1 -1
  153. package/dist/components/sd-chip.js +1 -1
  154. package/dist/components/sd-circle-progress.js +1 -1
  155. package/dist/components/sd-confirm-modal.js +1 -1
  156. package/dist/components/sd-date-box.js +1 -1
  157. package/dist/components/sd-date-picker-calendar.js +1 -1
  158. package/dist/components/sd-date-picker-trigger.js +1 -1
  159. package/dist/components/sd-date-picker.js +1 -1
  160. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  161. package/dist/components/sd-date-range-picker.js +1 -1
  162. package/dist/components/sd-dropdown-button.js +1 -1
  163. package/dist/components/sd-field.js +1 -1
  164. package/dist/components/sd-file-picker.js +1 -1
  165. package/dist/components/sd-floating-portal.js +1 -1
  166. package/dist/components/sd-form.js +1 -1
  167. package/dist/components/sd-ghost-button.js +1 -1
  168. package/dist/components/sd-guide.js +1 -1
  169. package/dist/components/sd-icon.js +1 -1
  170. package/dist/components/sd-input.js +1 -1
  171. package/dist/components/sd-linear-progress.js +1 -1
  172. package/dist/components/sd-loading-container.js +1 -1
  173. package/dist/components/sd-loading-modal.js +1 -1
  174. package/dist/components/sd-modal-container.js +1 -1
  175. package/dist/components/sd-number-input.js +1 -1
  176. package/dist/components/sd-pagination.js +1 -1
  177. package/dist/components/sd-popover.js +1 -1
  178. package/dist/components/sd-portal.js +1 -1
  179. package/dist/components/sd-radio-button.js +1 -1
  180. package/dist/components/sd-radio-group.js +1 -1
  181. package/dist/components/sd-radio.js +1 -1
  182. package/dist/components/sd-select-list-item-search.d.ts +11 -0
  183. package/dist/components/sd-select-list-item-search.js +1 -0
  184. package/dist/components/{sd-select-multiple.d.ts → sd-select-list-item.d.ts} +4 -4
  185. package/dist/components/sd-select-list-item.js +1 -0
  186. package/dist/components/{sd-select-option.d.ts → sd-select-listbox.d.ts} +4 -4
  187. package/dist/components/sd-select-listbox.js +1 -0
  188. package/dist/components/{sd-select-group.d.ts → sd-select-trigger.d.ts} +4 -4
  189. package/dist/components/sd-select-trigger.js +1 -0
  190. package/dist/components/sd-select.js +1 -1
  191. package/dist/components/sd-switch.js +1 -1
  192. package/dist/components/sd-table.js +1 -1
  193. package/dist/components/sd-tabs.js +1 -1
  194. package/dist/components/sd-tag.js +1 -1
  195. package/dist/components/sd-tbody.js +1 -1
  196. package/dist/components/sd-td.js +1 -1
  197. package/dist/components/sd-text-link.js +1 -1
  198. package/dist/components/sd-textarea.js +1 -1
  199. package/dist/components/sd-thead.js +1 -1
  200. package/dist/components/sd-toast-container.js +1 -1
  201. package/dist/components/sd-toast.js +1 -1
  202. package/dist/components/sd-toggle.js +1 -1
  203. package/dist/components/sd-tooltip.js +1 -1
  204. package/dist/components/sd-tr.js +1 -1
  205. package/dist/design-system/design-system.css +1 -1
  206. package/dist/design-system/design-system.esm.js +1 -1
  207. package/dist/design-system/index.esm.js +1 -1
  208. package/dist/design-system/{p-dad07e1a.entry.js → p-120df622.entry.js} +1 -1
  209. package/dist/design-system/{p-6af9e663.entry.js → p-28b727df.entry.js} +1 -1
  210. package/dist/design-system/{p-05a1c092.entry.js → p-2cd2fb76.entry.js} +1 -1
  211. package/dist/design-system/p-3f9d60a0.entry.js +1 -0
  212. package/dist/design-system/p-400b3676.entry.js +1 -0
  213. package/dist/design-system/{p-2eb910ec.entry.js → p-41ea33fb.entry.js} +1 -1
  214. package/dist/design-system/{p-c7bcb232.entry.js → p-42906763.entry.js} +1 -1
  215. package/dist/design-system/p-42a8f8a2.entry.js +1 -0
  216. package/dist/design-system/{p-fdcfaa7c.entry.js → p-43ffe7b0.entry.js} +1 -1
  217. package/dist/design-system/p-4ad9a5b8.entry.js +1 -0
  218. package/dist/design-system/{p-3a9559ee.entry.js → p-504033e8.entry.js} +1 -1
  219. package/dist/design-system/p-64d3c984.entry.js +1 -0
  220. package/dist/design-system/{p-ce3d0f9c.entry.js → p-67f88b1a.entry.js} +1 -1
  221. package/dist/design-system/{p-6a3f8588.entry.js → p-68d0fa15.entry.js} +1 -1
  222. package/dist/design-system/p-6dc47f4c.entry.js +1 -0
  223. package/dist/design-system/{p-d6896893.entry.js → p-6f9b0b32.entry.js} +1 -1
  224. package/dist/design-system/{p-3ca5c303.entry.js → p-704dc1f1.entry.js} +1 -1
  225. package/dist/design-system/{p-17cd3a33.entry.js → p-732ee178.entry.js} +1 -1
  226. package/dist/design-system/{p-8200b5f2.entry.js → p-7d892b68.entry.js} +1 -1
  227. package/dist/design-system/{p-16a15368.entry.js → p-809e616c.entry.js} +1 -1
  228. package/dist/design-system/p-80c51996.entry.js +1 -0
  229. package/dist/design-system/{p-b745cd95.entry.js → p-889971bc.entry.js} +1 -1
  230. package/dist/design-system/{p-33bec0e3.entry.js → p-8abc2413.entry.js} +1 -1
  231. package/dist/design-system/{p-bb492ba7.entry.js → p-970f9ea5.entry.js} +1 -1
  232. package/dist/design-system/p-BHmXH7dZ.js +2 -0
  233. package/dist/design-system/{p-BgFLSKqC.js → p-CZxeqYuw.js} +1 -1
  234. package/dist/design-system/p-DDDZWrWj.js +1 -0
  235. package/dist/design-system/p-DG7d45mX.js +1 -0
  236. package/dist/design-system/{p-280dc548.entry.js → p-a69d6a99.entry.js} +1 -1
  237. package/dist/design-system/{p-49f78122.entry.js → p-ab5a94c8.entry.js} +1 -1
  238. package/dist/design-system/{p-f4a00276.entry.js → p-ae626d30.entry.js} +1 -1
  239. package/dist/design-system/p-b9a870bf.entry.js +1 -0
  240. package/dist/design-system/{p-97ebf578.entry.js → p-bab814c5.entry.js} +1 -1
  241. package/dist/design-system/{p-eb29dc9f.entry.js → p-c21f30de.entry.js} +1 -1
  242. package/dist/design-system/p-c863a31d.entry.js +1 -0
  243. package/dist/design-system/{p-a8bde8d9.entry.js → p-cab35b9a.entry.js} +1 -1
  244. package/dist/design-system/p-cea424f6.entry.js +1 -0
  245. package/dist/design-system/p-d8bb2cb4.entry.js +1 -0
  246. package/dist/design-system/p-dd63e10f.entry.js +1 -0
  247. package/dist/design-system/p-e04302a2.entry.js +1 -0
  248. package/dist/design-system/{p-5f6379e9.entry.js → p-e84d1bac.entry.js} +1 -1
  249. package/dist/design-system/p-ebbffddb.entry.js +1 -0
  250. package/dist/design-system/{p-d1dfa0e1.entry.js → p-ec02b3e8.entry.js} +1 -1
  251. package/dist/design-system/{p-8ff967f7.entry.js → p-ed1c4625.entry.js} +1 -1
  252. package/dist/design-system/{p-2d154fe0.entry.js → p-f06038fd.entry.js} +1 -1
  253. package/dist/design-system/{p-2cd2f2dd.entry.js → p-f80d10ad.entry.js} +1 -1
  254. package/dist/design-system/p-fbb7e090.entry.js +1 -0
  255. package/dist/design-system/{p-a9fc2c21.entry.js → p-feb84f87.entry.js} +1 -1
  256. package/dist/esm/design-system.js +3 -3
  257. package/dist/esm/{index-Bp7ytJz5.js → index-BHmXH7dZ.js} +1 -1
  258. package/dist/esm/index.js +5 -0
  259. package/dist/esm/loader.js +3 -3
  260. package/dist/esm/sd-action-modal.entry.js +2 -2
  261. package/dist/esm/sd-badge.entry.js +2 -2
  262. package/dist/esm/sd-barcode-input.entry.js +2 -2
  263. package/dist/esm/sd-button-v2_2.entry.js +3 -3
  264. package/dist/esm/sd-button_4.entry.js +10 -13
  265. package/dist/esm/sd-calendar.entry.js +1 -1
  266. package/dist/esm/sd-card.entry.js +2 -2
  267. package/dist/esm/sd-checkbox.entry.js +7 -4
  268. package/dist/esm/sd-chip.entry.js +2 -2
  269. package/dist/esm/sd-circle-progress.entry.js +3 -3
  270. package/dist/esm/sd-confirm-modal_2.entry.js +4 -4
  271. package/dist/esm/sd-date-box.entry.js +1 -1
  272. package/dist/esm/sd-date-picker-calendar.entry.js +2 -2
  273. package/dist/esm/sd-date-picker-trigger.entry.js +3 -3
  274. package/dist/esm/sd-date-picker.entry.js +3 -3
  275. package/dist/esm/sd-date-range-picker-calendar.entry.js +2 -2
  276. package/dist/esm/sd-date-range-picker.entry.js +1 -1
  277. package/dist/esm/sd-dropdown-button.entry.js +93 -6
  278. package/dist/esm/sd-file-picker.entry.js +2 -2
  279. package/dist/esm/sd-form.entry.js +1 -1
  280. package/dist/esm/sd-ghost-button.entry.js +11 -6
  281. package/dist/esm/sd-guide.entry.js +2 -2
  282. package/dist/esm/{sd-input_2.entry.js → sd-input.entry.js} +4 -43
  283. package/dist/esm/sd-linear-progress.entry.js +3 -3
  284. package/dist/esm/sd-loading-container.entry.js +3 -3
  285. package/dist/esm/sd-modal-container.entry.js +77 -69
  286. package/dist/esm/sd-number-input.entry.js +4 -4
  287. package/dist/esm/sd-pagination_5.entry.js +915 -0
  288. package/dist/esm/sd-popover.entry.js +2 -2
  289. package/dist/esm/sd-portal.entry.js +2 -2
  290. package/dist/esm/sd-radio-button.entry.js +7 -2
  291. package/dist/esm/sd-radio-group.entry.js +1 -1
  292. package/dist/esm/sd-radio.entry.js +1 -1
  293. package/dist/esm/{sd-select-v2-list-item_4.entry.js → sd-select-list-item_4.entry.js} +105 -45
  294. package/dist/esm/sd-switch.entry.js +2 -2
  295. package/dist/esm/sd-table.config-DKkzCQwJ.js +94 -0
  296. package/dist/esm/sd-table.entry.js +178 -21
  297. package/dist/esm/sd-tabs.entry.js +2 -2
  298. package/dist/esm/sd-tag.entry.js +3 -3
  299. package/dist/esm/sd-td.entry.js +54 -2
  300. package/dist/esm/sd-text-link.entry.js +4 -4
  301. package/dist/esm/sd-textarea.entry.js +2 -2
  302. package/dist/esm/sd-toast-container.entry.js +2 -2
  303. package/dist/esm/sd-toast.entry.js +3 -3
  304. package/dist/esm/sd-toggle.entry.js +2 -2
  305. package/dist/esm/{system-BgFLSKqC.js → system-CZxeqYuw.js} +7 -1
  306. package/dist/esm/{tooltipArrow-BHRQVawd.js → tooltipArrow-DZ-N5HBq.js} +1 -1
  307. package/dist/types/components/sd-ghost-button/sd-ghost-button.d.ts +1 -0
  308. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +1 -1
  309. package/dist/types/components/sd-modal-container/sd-modal-container.d.ts +6 -4
  310. package/dist/types/components/sd-radio-button/sd-radio-button.d.ts +1 -0
  311. package/dist/types/components/{sd-select-v2/sd-select-v2-list-item/sd-select-v2-list-item.d.ts → sd-select/sd-select-list-item/sd-select-list-item.d.ts} +4 -4
  312. package/dist/types/components/{sd-select-v2/sd-select-v2-list-item-search/sd-select-v2-list-item-search.d.ts → sd-select/sd-select-list-item-search/sd-select-list-item-search.d.ts} +1 -1
  313. package/dist/types/components/{sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.d.ts → sd-select/sd-select-listbox/sd-select-listbox.d.ts} +15 -6
  314. package/dist/types/components/{sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.d.ts → sd-select/sd-select-trigger/sd-select-trigger.d.ts} +1 -1
  315. package/dist/types/components/{sd-select-v2/sd-select-v2.config.d.ts → sd-select/sd-select.config.d.ts} +12 -12
  316. package/dist/types/components/sd-select/sd-select.d.ts +56 -84
  317. package/dist/types/components/sd-table/constants.d.ts +4 -1
  318. package/dist/types/components/sd-table/sd-table.config.d.ts +64 -0
  319. package/dist/types/components/sd-table/sd-table.d.ts +17 -0
  320. package/dist/types/components/sd-table/sd-td/sd-td.d.ts +8 -0
  321. package/dist/types/components/sd-table/sd-thead/sd-thead.d.ts +5 -0
  322. package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +4 -0
  323. package/dist/types/components.d.ts +1012 -2402
  324. package/dist/types/utils/testing/index.d.ts +2 -0
  325. package/dist/types/utils/testing/mocks.d.ts +4 -0
  326. package/hydrate/index.js +821 -2272
  327. package/hydrate/index.mjs +821 -2272
  328. package/package.json +1 -1
  329. package/dist/cjs/base-dropdown-event-BTPlZ1KF.js +0 -91
  330. package/dist/cjs/sd-pagination_2.cjs.entry.js +0 -427
  331. package/dist/cjs/sd-progress.cjs.entry.js +0 -63
  332. package/dist/cjs/sd-select-dropdown_2.cjs.entry.js +0 -231
  333. package/dist/cjs/sd-select-group.cjs.entry.js +0 -332
  334. package/dist/cjs/sd-select-multiple-group.cjs.entry.js +0 -458
  335. package/dist/cjs/sd-select-multiple.cjs.entry.js +0 -191
  336. package/dist/cjs/sd-select-option-group.cjs.entry.js +0 -68
  337. package/dist/cjs/sd-select.cjs.entry.js +0 -181
  338. package/dist/cjs/sd-tbody.cjs.entry.js +0 -66
  339. package/dist/cjs/sd-thead.cjs.entry.js +0 -179
  340. package/dist/cjs/sd-tr.cjs.entry.js +0 -171
  341. package/dist/cjs/select-keyboard-navigation-CErfIrGV.js +0 -27
  342. package/dist/cjs/table-test.cjs.entry.js +0 -96
  343. package/dist/collection/components/sd-progress/sd-progress.css +0 -63
  344. package/dist/collection/components/sd-progress/sd-progress.js +0 -186
  345. package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.css +0 -30
  346. package/dist/collection/components/sd-select/sd-select-dropdown/sd-select-dropdown.js +0 -444
  347. package/dist/collection/components/sd-select/sd-select-option/sd-select-option.css +0 -36
  348. package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +0 -257
  349. package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.css +0 -23
  350. package/dist/collection/components/sd-select/sd-select-search-input/sd-select-search-input.js +0 -161
  351. package/dist/collection/components/sd-select-group/sd-select-group.css +0 -81
  352. package/dist/collection/components/sd-select-group/sd-select-group.js +0 -1061
  353. package/dist/collection/components/sd-select-multiple/sd-select-multiple.css +0 -54
  354. package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +0 -770
  355. package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.css +0 -79
  356. package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +0 -1183
  357. package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.css +0 -75
  358. package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +0 -305
  359. package/dist/collection/components/sd-select-v2/sd-select-v2.css +0 -11
  360. package/dist/collection/components/sd-select-v2/sd-select-v2.js +0 -819
  361. package/dist/collection/components/table-test/table-test.css +0 -59
  362. package/dist/collection/components/table-test/table-test.js +0 -316
  363. package/dist/components/p-9ZtJl4s6.js +0 -1
  364. package/dist/components/p-BALOEavB.js +0 -1
  365. package/dist/components/p-BZc6lwGD.js +0 -1
  366. package/dist/components/p-Bbs5Ws0k.js +0 -1
  367. package/dist/components/p-Bp0B8tcl.js +0 -1
  368. package/dist/components/p-Btx5sC7s.js +0 -1
  369. package/dist/components/p-CHFGWh0m.js +0 -1
  370. package/dist/components/p-CNAzAL53.js +0 -1
  371. package/dist/components/p-CWEeXx2E.js +0 -1
  372. package/dist/components/p-CgL8_FSD.js +0 -1
  373. package/dist/components/p-CqghR1aS.js +0 -1
  374. package/dist/components/p-Cy6HMEsK.js +0 -1
  375. package/dist/components/p-D8fG9Yt7.js +0 -1
  376. package/dist/components/p-DBex-RJU.js +0 -1
  377. package/dist/components/p-DEBakAhm.js +0 -1
  378. package/dist/components/p-DWMY9O2B.js +0 -1
  379. package/dist/components/p-DuMkBStM.js +0 -1
  380. package/dist/components/p-vQDL-PZ8.js +0 -1
  381. package/dist/components/sd-progress.d.ts +0 -11
  382. package/dist/components/sd-progress.js +0 -1
  383. package/dist/components/sd-select-dropdown.d.ts +0 -11
  384. package/dist/components/sd-select-dropdown.js +0 -1
  385. package/dist/components/sd-select-group.js +0 -1
  386. package/dist/components/sd-select-multiple-group.d.ts +0 -11
  387. package/dist/components/sd-select-multiple-group.js +0 -1
  388. package/dist/components/sd-select-multiple.js +0 -1
  389. package/dist/components/sd-select-option-group.d.ts +0 -11
  390. package/dist/components/sd-select-option-group.js +0 -1
  391. package/dist/components/sd-select-option.js +0 -1
  392. package/dist/components/sd-select-search-input.d.ts +0 -11
  393. package/dist/components/sd-select-search-input.js +0 -1
  394. package/dist/components/sd-select-v2-list-item-search.d.ts +0 -11
  395. package/dist/components/sd-select-v2-list-item-search.js +0 -1
  396. package/dist/components/sd-select-v2-list-item.d.ts +0 -11
  397. package/dist/components/sd-select-v2-list-item.js +0 -1
  398. package/dist/components/sd-select-v2-listbox.d.ts +0 -11
  399. package/dist/components/sd-select-v2-listbox.js +0 -1
  400. package/dist/components/sd-select-v2-trigger.d.ts +0 -11
  401. package/dist/components/sd-select-v2-trigger.js +0 -1
  402. package/dist/components/sd-select-v2.d.ts +0 -11
  403. package/dist/components/sd-select-v2.js +0 -1
  404. package/dist/components/table-test.d.ts +0 -11
  405. package/dist/components/table-test.js +0 -1
  406. package/dist/design-system/p-00612047.entry.js +0 -1
  407. package/dist/design-system/p-07adda3c.entry.js +0 -1
  408. package/dist/design-system/p-1573f415.entry.js +0 -1
  409. package/dist/design-system/p-1b9f6cef.entry.js +0 -1
  410. package/dist/design-system/p-1cc7d81f.entry.js +0 -1
  411. package/dist/design-system/p-1fa6c17f.entry.js +0 -1
  412. package/dist/design-system/p-380198bc.entry.js +0 -1
  413. package/dist/design-system/p-4114eea3.entry.js +0 -1
  414. package/dist/design-system/p-5e300b77.entry.js +0 -1
  415. package/dist/design-system/p-6b537e2f.entry.js +0 -1
  416. package/dist/design-system/p-6e90fb80.entry.js +0 -1
  417. package/dist/design-system/p-711c59fc.entry.js +0 -1
  418. package/dist/design-system/p-7b77c65c.entry.js +0 -1
  419. package/dist/design-system/p-850de8d4.entry.js +0 -1
  420. package/dist/design-system/p-8f88bd67.entry.js +0 -1
  421. package/dist/design-system/p-9fee77f0.entry.js +0 -1
  422. package/dist/design-system/p-BPGLtKk5.js +0 -1
  423. package/dist/design-system/p-Bp7ytJz5.js +0 -2
  424. package/dist/design-system/p-CRdYeSBK.js +0 -1
  425. package/dist/design-system/p-Cy6HMEsK.js +0 -1
  426. package/dist/design-system/p-ba5fea6f.entry.js +0 -1
  427. package/dist/design-system/p-be54d6bd.entry.js +0 -1
  428. package/dist/design-system/p-c3379a6e.entry.js +0 -1
  429. package/dist/design-system/p-cc62c180.entry.js +0 -1
  430. package/dist/design-system/p-ce2210ad.entry.js +0 -1
  431. package/dist/design-system/p-d52f25c6.entry.js +0 -1
  432. package/dist/design-system/p-dbcbbf1e.entry.js +0 -1
  433. package/dist/design-system/p-dc07d618.entry.js +0 -1
  434. package/dist/design-system/p-ef09409c.entry.js +0 -1
  435. package/dist/design-system/p-f8237991.entry.js +0 -1
  436. package/dist/esm/base-dropdown-event-CRdYeSBK.js +0 -89
  437. package/dist/esm/sd-pagination_2.entry.js +0 -424
  438. package/dist/esm/sd-progress.entry.js +0 -61
  439. package/dist/esm/sd-select-dropdown_2.entry.js +0 -228
  440. package/dist/esm/sd-select-group.entry.js +0 -330
  441. package/dist/esm/sd-select-multiple-group.entry.js +0 -456
  442. package/dist/esm/sd-select-multiple.entry.js +0 -189
  443. package/dist/esm/sd-select-option-group.entry.js +0 -66
  444. package/dist/esm/sd-select.entry.js +0 -179
  445. package/dist/esm/sd-tbody.entry.js +0 -64
  446. package/dist/esm/sd-thead.entry.js +0 -177
  447. package/dist/esm/sd-tr.entry.js +0 -169
  448. package/dist/esm/select-keyboard-navigation-Cy6HMEsK.js +0 -25
  449. package/dist/esm/table-test.entry.js +0 -94
  450. package/dist/types/components/sd-progress/sd-progress.d.ts +0 -15
  451. package/dist/types/components/sd-select/sd-select-dropdown/sd-select-dropdown.d.ts +0 -41
  452. package/dist/types/components/sd-select/sd-select-option/sd-select-option.d.ts +0 -23
  453. package/dist/types/components/sd-select/sd-select-search-input/sd-select-search-input.d.ts +0 -11
  454. package/dist/types/components/sd-select-group/sd-select-group.d.ts +0 -86
  455. package/dist/types/components/sd-select-multiple/sd-select-multiple.d.ts +0 -64
  456. package/dist/types/components/sd-select-multiple-group/sd-select-multiple-group.d.ts +0 -110
  457. package/dist/types/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.d.ts +0 -29
  458. package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +0 -71
  459. package/dist/types/components/table-test/table-test.d.ts +0 -46
  460. /package/dist/collection/components/{sd-select-v2/sd-select-v2.config.js → sd-select/sd-select.config.js} +0 -0
@@ -0,0 +1,921 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-CaGGRpd8.js');
4
+ var index$1 = require('./index-BUvXpPc3.js');
5
+ var constants = require('./constants-DJRV1upE.js');
6
+ var sdTable_config = require('./sd-table.config-hnNodd18.js');
7
+ require('./system-DRemSdU1.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
+ };
39
+ var paginationTokens = {
40
+ pagination: pagination
41
+ };
42
+
43
+ const PAGINATION_LAYOUT = {
44
+ height: `${paginationTokens.pagination.height}px`,
45
+ paddingX: `${paginationTokens.pagination.paddingX}px`,
46
+ radius: `${paginationTokens.pagination.radius}px`,
47
+ gap: `${paginationTokens.pagination.gap}px`,
48
+ moveGap: `${paginationTokens.pagination.move.gap}px`,
49
+ iconSize: Number(paginationTokens.pagination.icon),
50
+ };
51
+ const PAGINATION_TYPOGRAPHY = {
52
+ fontFamily: paginationTokens.pagination.typography.default.fontFamily,
53
+ fontSize: `${paginationTokens.pagination.typography.default.fontSize}px`,
54
+ lineHeight: `${paginationTokens.pagination.typography.default.lineHeight}px`,
55
+ fontWeightDefault: paginationTokens.pagination.typography.default.fontWeight,
56
+ fontWeightSelected: paginationTokens.pagination.typography.selected.fontWeight,
57
+ };
58
+ const PAGINATION_COLORS = {
59
+ contentDefault: paginationTokens.pagination.item.content.default,
60
+ contentHover: paginationTokens.pagination.item.content.hover,
61
+ contentSelected: paginationTokens.pagination.item.content.selected,
62
+ bgHover: paginationTokens.pagination.item.bg.hover,
63
+ bgSelected: paginationTokens.pagination.item.bg.selected,
64
+ // TODO: 토큰 반영 후 교체 — nav 화살표 색상은 현재 토큰에 없음
65
+ iconDefault: '#888888',
66
+ };
67
+
68
+ 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-move-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)}`;
69
+
70
+ const PER_PAGE = 10;
71
+ const BUTTON_WIDTH = {
72
+ 1: 24,
73
+ 2: 34,
74
+ 3: 40,
75
+ 4: 48,
76
+ 5: 56,
77
+ };
78
+ const SdPagination = class {
79
+ constructor(hostRef) {
80
+ index.registerInstance(this, hostRef);
81
+ this.pageChange = index.createEvent(this, "sdPageChange", 7);
82
+ }
83
+ currentPage = 1;
84
+ lastPage = 1;
85
+ simple = false;
86
+ pageChange;
87
+ get pageNumbers() {
88
+ const start = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;
89
+ const end = Math.min(start + PER_PAGE - 1, this.lastPage);
90
+ return Array.from({ length: end - start + 1 }, (_, i) => start + i);
91
+ }
92
+ get buttonWidth() {
93
+ const lastPageNum = this.pageNumbers.at(-1) ?? 1;
94
+ const maxPageLength = lastPageNum.toString().length;
95
+ return BUTTON_WIDTH[maxPageLength] || BUTTON_WIDTH[1];
96
+ }
97
+ get isFirstGroup() {
98
+ return this.currentPage <= PER_PAGE;
99
+ }
100
+ get isLastGroup() {
101
+ const startPageGroup = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;
102
+ return startPageGroup + PER_PAGE - 1 >= this.lastPage;
103
+ }
104
+ handlePageChange = (page) => {
105
+ if (page < 1 || page > this.lastPage)
106
+ return;
107
+ this.currentPage = page;
108
+ this.pageChange.emit(page);
109
+ };
110
+ handleGroupChange = (direction) => {
111
+ const delta = direction === 'forward' ? PER_PAGE : -PER_PAGE;
112
+ const newPage = Math.min(Math.max(this.currentPage + delta, 1), this.lastPage);
113
+ this.handlePageChange(newPage);
114
+ };
115
+ renderNavButton(iconName, ariaLabel, onClick) {
116
+ 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 })));
117
+ }
118
+ renderPrevButtons() {
119
+ if (this.simple) {
120
+ if (this.currentPage <= 1)
121
+ return null;
122
+ 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))));
123
+ }
124
+ if (this.isFirstGroup)
125
+ return null;
126
+ 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'))));
127
+ }
128
+ renderNextButtons() {
129
+ if (this.simple) {
130
+ if (this.currentPage >= this.lastPage)
131
+ return null;
132
+ 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))));
133
+ }
134
+ if (this.isLastGroup)
135
+ return null;
136
+ 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))));
137
+ }
138
+ render() {
139
+ const cssVars = {
140
+ '--sd-pagination-height': PAGINATION_LAYOUT.height,
141
+ '--sd-pagination-padding-x': PAGINATION_LAYOUT.paddingX,
142
+ '--sd-pagination-radius': PAGINATION_LAYOUT.radius,
143
+ '--sd-pagination-gap': PAGINATION_LAYOUT.gap,
144
+ '--sd-pagination-move-gap': PAGINATION_LAYOUT.moveGap,
145
+ '--sd-pagination-font-family': PAGINATION_TYPOGRAPHY.fontFamily,
146
+ '--sd-pagination-font-size': PAGINATION_TYPOGRAPHY.fontSize,
147
+ '--sd-pagination-line-height': PAGINATION_TYPOGRAPHY.lineHeight,
148
+ '--sd-pagination-font-weight-default': PAGINATION_TYPOGRAPHY.fontWeightDefault,
149
+ '--sd-pagination-font-weight-selected': PAGINATION_TYPOGRAPHY.fontWeightSelected,
150
+ '--sd-pagination-content': PAGINATION_COLORS.contentDefault,
151
+ '--sd-pagination-content-hover': PAGINATION_COLORS.contentHover,
152
+ '--sd-pagination-content-selected': PAGINATION_COLORS.contentSelected,
153
+ '--sd-pagination-bg-hover': PAGINATION_COLORS.bgHover,
154
+ '--sd-pagination-bg-selected': PAGINATION_COLORS.bgSelected,
155
+ '--sd-pagination-item-width': `${this.buttonWidth}px`,
156
+ };
157
+ return (index.h("div", { key: 'e648886fbec4723b7be767d9e1bfc04004cca234', class: {
158
+ 'sd-pagination': true,
159
+ 'sd-pagination--simple': this.simple,
160
+ }, style: cssVars }, index.h("div", { key: '43ff8b8f6682c4d2b70c5085a6d3199de1d01596', 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: {
161
+ 'sd-pagination__item': true,
162
+ 'sd-pagination__item--selected': this.currentPage === n,
163
+ }, onClick: () => this.handlePageChange(n) }, n))))), index.h("div", { key: '1975d14028485438a728b23d717abfcde8722fcf', class: "sd-pagination__group sd-pagination__group--next" }, this.renderNextButtons())));
164
+ }
165
+ };
166
+ SdPagination.style = sdPaginationCss();
167
+
168
+ const sdSelectCss = () => `sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}`;
169
+
170
+ const SdSelect = class {
171
+ constructor(hostRef) {
172
+ index.registerInstance(this, hostRef);
173
+ this.update = index.createEvent(this, "sdUpdate", 7);
174
+ this.dropDownShow = index.createEvent(this, "sdDropDownShow", 7);
175
+ }
176
+ static VIEWPORT_PADDING = 20;
177
+ static PORTAL_OFFSET_Y = 4;
178
+ static CLOSE_ANIMATION_DURATION = 150;
179
+ get el() { return index.getElement(this); }
180
+ type = 'default';
181
+ value = null;
182
+ options = [];
183
+ placeholder = '선택';
184
+ maxDropdownWidth = '640px';
185
+ dropdownHeight = '260px';
186
+ disabled = false;
187
+ label = '';
188
+ labelWidth = '';
189
+ addonLabel = '';
190
+ addonAlign = 'start';
191
+ error = false;
192
+ hint = '';
193
+ errorMessage = '';
194
+ rules = [];
195
+ icon = undefined;
196
+ labelTooltip = '';
197
+ labelTooltipProps = null;
198
+ emitValue = false;
199
+ width = '';
200
+ useSearch = false;
201
+ allSelectedLabel = '전체';
202
+ useSelectAll = false;
203
+ isOpen = false;
204
+ isAnimatingOut = false;
205
+ triggerWidth = '200px';
206
+ resolvedDropdownHeight = '260px';
207
+ resolvedMaxDropdownWidth = '640px';
208
+ focused = false;
209
+ hovered = false;
210
+ update;
211
+ dropDownShow;
212
+ async sdFocus() {
213
+ if (this.disabled)
214
+ return;
215
+ await this.triggerComponentRef?.sdFocus();
216
+ }
217
+ async sdOpen() {
218
+ // sdFocus 직후 호출 시 트리거 ref/레이아웃이 안정될 때까지 한 틱 대기
219
+ await new Promise(resolve => setTimeout(resolve, 0));
220
+ if (this.disabled || this.isOpen)
221
+ return;
222
+ this.prepareDropdownGeometry();
223
+ if (this.closeAnimationTimer)
224
+ clearTimeout(this.closeAnimationTimer);
225
+ this.isAnimatingOut = false;
226
+ this.isOpen = true;
227
+ }
228
+ triggerRef;
229
+ triggerComponentRef;
230
+ closeAnimationTimer;
231
+ name = index$1.nanoid();
232
+ triggerHasFocus = false;
233
+ watchIsOpen(newValue) {
234
+ this.syncFocusedState(newValue);
235
+ this.dropDownShow.emit({ isOpen: newValue });
236
+ }
237
+ get isMulti() {
238
+ return this.type === 'multi' || this.type === 'multi_depth';
239
+ }
240
+ get displayText() {
241
+ if (this.isMulti) {
242
+ if (!Array.isArray(this.value) || this.value.length === 0)
243
+ return '';
244
+ const nonDisabledLeaves = this.getNonDisabledLeaves(this.options);
245
+ const selected = this.getSelectedOptions();
246
+ const allSelected = nonDisabledLeaves.length > 0 &&
247
+ nonDisabledLeaves.every(leaf => selected.some(s => s.value === leaf.value));
248
+ if (allSelected)
249
+ return this.allSelectedLabel ?? '전체';
250
+ const flat = this.flattenOptions(this.options);
251
+ return this.value
252
+ .map(item => {
253
+ if (item != null && typeof item === 'object') {
254
+ const opt = item;
255
+ return opt.label ?? flat.find(o => o.value === opt.value)?.label ?? '';
256
+ }
257
+ return flat.find(o => o.value === item)?.label ?? '';
258
+ })
259
+ .filter(Boolean)
260
+ .join(', ');
261
+ }
262
+ if (this.value == null)
263
+ return '';
264
+ if (!this.emitValue && typeof this.value === 'object' && !Array.isArray(this.value)) {
265
+ return this.value.label ?? '';
266
+ }
267
+ const flat = this.flattenOptions(this.options);
268
+ const found = flat.find(o => o.value === this.value);
269
+ return found?.label ?? '';
270
+ }
271
+ flattenOptions(options) {
272
+ return options.flatMap(o => (o.children ? this.flattenOptions(o.children) : [o]));
273
+ }
274
+ getNonDisabledLeaves(options) {
275
+ return options.flatMap(o => {
276
+ if (o.disabled)
277
+ return [];
278
+ if (o.children)
279
+ return this.getNonDisabledLeaves(o.children);
280
+ return [o];
281
+ });
282
+ }
283
+ getSelectedOptions() {
284
+ const val = this.value;
285
+ if (!val || !Array.isArray(val))
286
+ return [];
287
+ if (this.emitValue) {
288
+ return val
289
+ .map(v => this.findOriginalOption(v, this.options))
290
+ .filter((o) => !!o);
291
+ }
292
+ return val;
293
+ }
294
+ toMultiValue(options) {
295
+ return this.emitValue ? options.map(o => o.value) : options;
296
+ }
297
+ parsePixelValue(value, fallback) {
298
+ const parsed = Number.parseFloat(value);
299
+ return Number.isFinite(parsed) ? parsed : fallback;
300
+ }
301
+ updateDropdownViewportConstraints() {
302
+ if (!this.triggerRef)
303
+ return;
304
+ const triggerRect = this.triggerRef.getBoundingClientRect();
305
+ const viewportPadding = SdSelect.VIEWPORT_PADDING;
306
+ const offsetY = SdSelect.PORTAL_OFFSET_Y;
307
+ const preferredHeight = this.parsePixelValue(this.dropdownHeight, 260);
308
+ const preferredWidth = this.parsePixelValue(this.maxDropdownWidth, 640);
309
+ const availableBelow = Math.max(window.innerHeight - triggerRect.bottom - viewportPadding - offsetY, 0);
310
+ const availableAbove = Math.max(triggerRect.top - viewportPadding - offsetY, 0);
311
+ const availableHeight = Math.max(availableBelow, availableAbove);
312
+ const availableWidth = Math.max(window.innerWidth - viewportPadding * 2, 0);
313
+ this.resolvedDropdownHeight = `${Math.min(preferredHeight, availableHeight)}px`;
314
+ this.resolvedMaxDropdownWidth = `${Math.min(preferredWidth, availableWidth)}px`;
315
+ }
316
+ handleViewportResize = () => {
317
+ if (!this.isOpen)
318
+ return;
319
+ this.updateDropdownViewportConstraints();
320
+ };
321
+ findOriginalOption(value, options) {
322
+ for (const opt of options) {
323
+ if (opt.value === value)
324
+ return opt;
325
+ if (opt.children) {
326
+ const found = this.findOriginalOption(value, opt.children);
327
+ if (found)
328
+ return found;
329
+ }
330
+ }
331
+ return undefined;
332
+ }
333
+ closeDropdown() {
334
+ if (!this.isOpen)
335
+ return;
336
+ this.isOpen = false;
337
+ this.isAnimatingOut = true;
338
+ if (this.closeAnimationTimer)
339
+ clearTimeout(this.closeAnimationTimer);
340
+ this.closeAnimationTimer = setTimeout(() => {
341
+ this.isAnimatingOut = false;
342
+ }, SdSelect.CLOSE_ANIMATION_DURATION);
343
+ }
344
+ prepareDropdownGeometry() {
345
+ if (this.triggerRef) {
346
+ this.triggerWidth = `${this.triggerRef.offsetWidth}px`;
347
+ }
348
+ this.updateDropdownViewportConstraints();
349
+ }
350
+ syncFocusedState(isOpen = this.isOpen) {
351
+ this.focused = isOpen || this.triggerHasFocus;
352
+ }
353
+ handleTriggerFocus = () => {
354
+ this.triggerHasFocus = true;
355
+ this.syncFocusedState();
356
+ };
357
+ handleTriggerBlur = () => {
358
+ this.triggerHasFocus = false;
359
+ this.syncFocusedState();
360
+ };
361
+ handleTriggerClick = () => {
362
+ if (this.isOpen) {
363
+ this.closeDropdown();
364
+ return;
365
+ }
366
+ this.prepareDropdownGeometry();
367
+ if (this.closeAnimationTimer)
368
+ clearTimeout(this.closeAnimationTimer);
369
+ this.isAnimatingOut = false;
370
+ this.isOpen = true;
371
+ };
372
+ emitUpdate(value) {
373
+ this.update.emit(value);
374
+ }
375
+ handleOptionSelect = (detail) => {
376
+ const { option, leaves } = detail;
377
+ if (this.isMulti) {
378
+ this.handleMultiSelect(option, leaves);
379
+ }
380
+ else {
381
+ this.closeDropdown();
382
+ this.value = this.emitValue ? option.value : option;
383
+ const nextValue = this.value;
384
+ requestAnimationFrame(() => {
385
+ this.emitUpdate(nextValue);
386
+ });
387
+ }
388
+ };
389
+ handleMultiSelect(option, leaves) {
390
+ const selected = this.getSelectedOptions();
391
+ const isGroup = !!option.children;
392
+ let newSelected;
393
+ if (isGroup) {
394
+ const allSelected = leaves.every(l => selected.some(s => s.value === l.value));
395
+ if (allSelected) {
396
+ const leafValues = new Set(leaves.map(l => l.value));
397
+ newSelected = selected.filter(s => !leafValues.has(s.value));
398
+ }
399
+ else {
400
+ const existing = new Set(selected.map(s => s.value));
401
+ const toAdd = leaves.filter(l => !existing.has(l.value));
402
+ newSelected = [...selected, ...toAdd];
403
+ }
404
+ }
405
+ else {
406
+ const exists = selected.some(s => s.value === option.value);
407
+ newSelected = exists ? selected.filter(s => s.value !== option.value) : [...selected, option];
408
+ }
409
+ this.value = this.toMultiValue(newSelected);
410
+ this.emitUpdate(this.value);
411
+ }
412
+ connectedCallback() {
413
+ window.addEventListener('resize', this.handleViewportResize);
414
+ }
415
+ disconnectedCallback() {
416
+ window.removeEventListener('resize', this.handleViewportResize);
417
+ if (this.closeAnimationTimer)
418
+ clearTimeout(this.closeAnimationTimer);
419
+ }
420
+ render() {
421
+ const portalProps = {
422
+ open: this.isOpen,
423
+ parentRef: this.triggerRef,
424
+ viewportPadding: SdSelect.VIEWPORT_PADDING,
425
+ onSdClose: () => {
426
+ this.closeDropdown();
427
+ },
428
+ };
429
+ return (index.h("sd-field", { key: '76625e332090d20e2f66159bba5ee1b9a11320a6', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, onMouseEnter: () => {
430
+ this.hovered = true;
431
+ }, onMouseLeave: () => {
432
+ this.hovered = false;
433
+ } }, index.h("div", { key: '8a0ae8a5e05459128409dbe21779f5e3d91b3a04', class: "sd-select", ref: el => {
434
+ this.triggerRef = el;
435
+ } }, index.h("sd-select-trigger", { key: '6b47231914655a8e197e3b38cd8e37c5214efc17', ref: el => {
436
+ this.triggerComponentRef = el;
437
+ }, displayText: this.displayText, placeholder: this.placeholder, disabled: this.disabled, isOpen: this.isOpen, onSdTriggerClick: this.handleTriggerClick, onSdTriggerFocus: this.handleTriggerFocus, onSdTriggerBlur: this.handleTriggerBlur })), (this.isOpen || this.isAnimatingOut) && (index.h("sd-portal", { key: 'eaed402d276cc94a1324ede9cbf09bc436f8a1db', ...portalProps }, index.h("sd-select-listbox", { key: 'a96f75e06d974c8fd88ac72f083fe4b0ef424a0b', type: this.type, options: this.options, value: this.value, emitValue: this.emitValue, useSearch: this.useSearch, useSelectAll: this.useSelectAll, triggerWidth: this.triggerWidth, maxWidth: this.resolvedMaxDropdownWidth, maxHeight: this.resolvedDropdownHeight, onSdOptionSelect: event => this.handleOptionSelect(event.detail) })))));
438
+ }
439
+ static get watchers() { return {
440
+ "isOpen": [{
441
+ "watchIsOpen": 0
442
+ }]
443
+ }; }
444
+ };
445
+ SdSelect.style = sdSelectCss();
446
+
447
+ const sdTbodyCss = () => `:host{display:contents}:host *{box-sizing:border-box}.tbody{display:table-row-group}`;
448
+
449
+ const SdTbody = class {
450
+ constructor(hostRef) {
451
+ index.registerInstance(this, hostRef);
452
+ }
453
+ get el() { return index.getElement(this); }
454
+ rows = [];
455
+ tableId = '';
456
+ topSpacerHeight = 0;
457
+ bottomSpacerHeight = 0;
458
+ tableEl = null;
459
+ handleRowsChange(newRows) {
460
+ const safeRows = newRows ?? [];
461
+ if (this.tableEl?.setRowCountSync) {
462
+ this.tableEl.setRowCountSync(safeRows.length);
463
+ }
464
+ }
465
+ componentWillLoad() {
466
+ this.syncTableContext();
467
+ this.rows = this.rows ?? [];
468
+ if (this.tableEl?.setRowCountSync) {
469
+ this.tableEl.setRowCountSync(this.rows.length);
470
+ }
471
+ this.el.setSpacersSync = (top, bottom) => {
472
+ this.topSpacerHeight = top;
473
+ this.bottomSpacerHeight = bottom;
474
+ };
475
+ }
476
+ componentDidLoad() {
477
+ this.syncTableContext();
478
+ }
479
+ syncTableContext() {
480
+ // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
481
+ // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
482
+ const closest = this.el.closest('sd-table');
483
+ const root = this.el.getRootNode();
484
+ const fromShadow = root instanceof ShadowRoot ? root.host : null;
485
+ const table = closest ?? fromShadow;
486
+ this.tableEl = table;
487
+ const fromMethod = table?.getTableIdSync?.();
488
+ const fromAttr = table?.getAttribute(constants.TABLE_ID_ATTR);
489
+ const resolvedTableId = (fromMethod && fromMethod !== 'undefined' ? fromMethod : null) ??
490
+ (fromAttr && fromAttr !== 'undefined' ? fromAttr : null) ??
491
+ '';
492
+ if (resolvedTableId && resolvedTableId !== this.tableId) {
493
+ this.tableId = resolvedTableId;
494
+ }
495
+ }
496
+ render() {
497
+ return (index.h(index.Host, { key: 'e474bc09fdec9d48d978ec87620b161220b5236c', slot: `${this.tableId}-body` }, index.h("tbody", { key: 'c74261b3f30c43e8ac8c3bdea1180f17bfc7dbc8', class: { tbody: true } }, [
498
+ this.topSpacerHeight > 0 && (index.h("tr", { key: "spacer-top", class: "tbody__spacer", style: { height: `${this.topSpacerHeight}px`, display: 'block' } })),
499
+ index.h("slot", { key: 'f686e7e8fa81e725a32592a58267d0b5cd7551e6' }),
500
+ this.bottomSpacerHeight > 0 && (index.h("tr", { key: "spacer-bottom", class: "tbody__spacer", style: { height: `${this.bottomSpacerHeight}px`, display: 'block' } })),
501
+ ])));
502
+ }
503
+ static get watchers() { return {
504
+ "rows": [{
505
+ "handleRowsChange": 0
506
+ }]
507
+ }; }
508
+ };
509
+ SdTbody.style = sdTbodyCss();
510
+
511
+ 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:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.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__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}`;
512
+
513
+ const SdThead = class {
514
+ constructor(hostRef) {
515
+ index.registerInstance(this, hostRef);
516
+ this.sdColumnSort = index.createEvent(this, "sdColumnSort", 7);
517
+ }
518
+ get el() { return index.getElement(this); }
519
+ columns;
520
+ selectable;
521
+ resizable;
522
+ stickyColumn;
523
+ stickyHeader;
524
+ scrolledLeft;
525
+ scrolledRight;
526
+ rows = [];
527
+ columnWidths = [];
528
+ sdColumnSort;
529
+ tableId = '';
530
+ _columns = [];
531
+ _selectable = false;
532
+ _resizable = false;
533
+ _stickyColumn = { left: 0, right: 0 };
534
+ _stickyHeader = false;
535
+ _scrolledLeft = false;
536
+ _scrolledRight = false;
537
+ tableEl = null;
538
+ handleColumnsChange(newCols) {
539
+ if (Array.isArray(newCols) && (this.columnWidths ?? []).length === 0) {
540
+ this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));
541
+ }
542
+ }
543
+ componentWillLoad() {
544
+ this.syncTableContext();
545
+ this.columnWidths = Array.isArray(this.columnWidths) ? this.columnWidths : [];
546
+ this.resolveConfig();
547
+ if ((this.columnWidths ?? []).length === 0) {
548
+ this.columnWidths = this._columns.map(c => parseInt(c.width || '120', 10));
549
+ }
550
+ }
551
+ componentDidLoad() {
552
+ this.syncTableContext();
553
+ this.resolveConfig();
554
+ }
555
+ syncTableContext() {
556
+ // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
557
+ // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
558
+ const closest = this.el.closest('sd-table');
559
+ const root = this.el.getRootNode();
560
+ const fromShadow = root instanceof ShadowRoot ? root.host : null;
561
+ const table = closest ?? fromShadow;
562
+ this.tableEl = table;
563
+ const fromMethod = table?.getTableIdSync?.();
564
+ const fromAttr = table?.getAttribute(constants.TABLE_ID_ATTR);
565
+ const resolvedTableId = (fromMethod && fromMethod !== 'undefined' ? fromMethod : null) ??
566
+ (fromAttr && fromAttr !== 'undefined' ? fromAttr : null) ??
567
+ '';
568
+ if (resolvedTableId && resolvedTableId !== this.tableId) {
569
+ this.tableId = resolvedTableId;
570
+ }
571
+ }
572
+ resolveConfig() {
573
+ const config = this.tableEl?.getConfigSync?.();
574
+ const resolvedColumns = Array.isArray(this.columns)
575
+ ? this.columns
576
+ : Array.isArray(config?.columns)
577
+ ? config.columns
578
+ : [];
579
+ this._columns = resolvedColumns;
580
+ this._selectable = this.selectable ?? config?.selectable ?? false;
581
+ this._resizable = this.resizable ?? config?.resizable ?? false;
582
+ this._stickyColumn = this.stickyColumn ?? config?.stickyColumn ?? { left: 0, right: 0 };
583
+ this._stickyHeader = this.stickyHeader ?? config?.stickyHeader ?? false;
584
+ this._scrolledLeft = this.scrolledLeft ?? config?.scrolledLeft ?? false;
585
+ this._scrolledRight = this.scrolledRight ?? config?.scrolledRight ?? false;
586
+ if (Array.isArray(config?.columnWidths) && (this.columnWidths ?? []).length === 0) {
587
+ this.columnWidths = [...config.columnWidths];
588
+ }
589
+ if (!Array.isArray(this.columnWidths)) {
590
+ this.columnWidths = [];
591
+ }
592
+ }
593
+ async refreshConfig() {
594
+ this.resolveConfig();
595
+ }
596
+ async setColumnWidths(widths) {
597
+ this.columnWidths = Array.isArray(widths) ? widths : [];
598
+ }
599
+ async refreshSelection() {
600
+ const checkbox = this.el.querySelector('sd-checkbox');
601
+ if (checkbox) {
602
+ checkbox.value = this.getIsAllChecked();
603
+ }
604
+ }
605
+ get visibleColumns() {
606
+ return this._columns.filter(col => col.visible !== false);
607
+ }
608
+ getStickyStyle(colIdx) {
609
+ if (this.tableEl?.getStickyStyleSync) {
610
+ return this.tableEl.getStickyStyleSync(colIdx);
611
+ }
612
+ const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this._selectable ? 52 : 0);
613
+ const rightOffset = this.columnWidths
614
+ .filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
615
+ .reduce((a, b) => a + b, 0);
616
+ return {
617
+ '--sticky-left-offset': `${leftOffset}px`,
618
+ '--sticky-right-offset': `${rightOffset}px`,
619
+ 'width': `${this.columnWidths[colIdx]}px`,
620
+ 'minWidth': `${this.columnWidths[colIdx]}px`,
621
+ 'maxWidth': `${this.columnWidths[colIdx]}px`,
622
+ };
623
+ }
624
+ handleResize(index, event, reversed = false) {
625
+ if (this.tableEl?.handleResize) {
626
+ this.tableEl.handleResize(index, event, reversed);
627
+ }
628
+ }
629
+ handleColumnSort = (col) => {
630
+ this.sdColumnSort.emit({ column: col });
631
+ };
632
+ handleSelectAll(checked) {
633
+ const nextChecked = !!checked;
634
+ const safeRows = Array.isArray(this.rows) ? this.rows : [];
635
+ if (this.tableEl?.toggleSelectAllSync) {
636
+ this.tableEl.toggleSelectAllSync(nextChecked, safeRows);
637
+ }
638
+ }
639
+ getIsAllChecked() {
640
+ const safeRows = Array.isArray(this.rows) ? this.rows : [];
641
+ if (this.tableEl?.getIsAllCheckedSync && safeRows.length > 0) {
642
+ return this.tableEl.getIsAllCheckedSync(safeRows);
643
+ }
644
+ return false;
645
+ }
646
+ render() {
647
+ const safeRows = Array.isArray(this.rows) ? this.rows : [];
648
+ const stickyLeftCount = this._stickyColumn.left || 0;
649
+ const stickyRightCount = this._stickyColumn.right || 0;
650
+ const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
651
+ const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
652
+ const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
653
+ const headStyle = {
654
+ '--table-header-height': `${sdTable_config.TABLE_HEADER_LAYOUT.height}px`,
655
+ '--table-header-padding-x': `${sdTable_config.TABLE_HEADER_LAYOUT.paddingX}px`,
656
+ '--table-header-gap': `${sdTable_config.TABLE_HEADER_LAYOUT.gap}px`,
657
+ '--table-header-bg': sdTable_config.TABLE_HEADER_COLORS.bg,
658
+ '--table-header-font-family': sdTable_config.TABLE_HEADER_TYPOGRAPHY.fontFamily,
659
+ '--table-header-font-weight': sdTable_config.TABLE_HEADER_TYPOGRAPHY.fontWeight,
660
+ '--table-header-font-size': `${sdTable_config.TABLE_HEADER_TYPOGRAPHY.fontSize}px`,
661
+ '--table-header-line-height': `${sdTable_config.TABLE_HEADER_TYPOGRAPHY.lineHeight}px`,
662
+ '--table-header-text-decoration': sdTable_config.TABLE_HEADER_TYPOGRAPHY.textDecoration,
663
+ '--table-header-resizer-color': sdTable_config.TABLE_HEADER_RESIZING_BAR.color,
664
+ '--table-header-resizer-height': `${sdTable_config.TABLE_HEADER_RESIZING_BAR.height}px`,
665
+ '--table-border-color': sdTable_config.TABLE_BORDER.color,
666
+ '--table-border-width': `${sdTable_config.TABLE_BORDER.width}px`,
667
+ };
668
+ return (index.h(index.Host, { key: 'c4468056cc20a78516e61bccaf4d11c098e83ec6', slot: `${this.tableId}-head`, style: headStyle }, index.h("thead", { key: 'a9befd1728baf2104bfb9132557d5c5c0eb49748', class: {
669
+ 'thead': true,
670
+ 'thead--sticky': this._stickyHeader,
671
+ } }, index.h("tr", { key: 'da786d82d4896b6124becf42f634bcc5b0a6ffb7', class: "tr" }, this._selectable && (index.h("th", { key: 'b257c5475b7e528fbfc52ea85031a4c49bed7b36', class: {
672
+ 'th': true,
673
+ 'th--selected': true,
674
+ 'sticky-left': true,
675
+ 'sticky-left-edge': stickyLeftCount === 0,
676
+ 'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
677
+ }, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { key: '6624026c1811c809eeb5131518ddb8c11f66b541', value: this.getIsAllChecked(), disabled: !safeRows.length, onSdUpdate: (e) => this.handleSelectAll(e.detail) }))), stickyLeftCols.map((col, idx) => (index.h("th", { key: col.name, class: {
678
+ 'th': true,
679
+ [`${col.thClass}`]: Boolean(col.thClass),
680
+ 'sticky-left': true,
681
+ 'sticky-left-edge': idx === stickyLeftCount - 1,
682
+ 'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
683
+ }, style: { ...col.thStyle, ...this.getStickyStyle(idx) } }, 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: () => this.handleColumnSort(col), 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))))))), this._resizable && (index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(idx, evt) }))))), middleCols.map((col, relativeIdx) => {
684
+ const actualColIdx = stickyLeftCount + relativeIdx;
685
+ return (index.h("th", { key: col.name, class: {
686
+ th: true,
687
+ [`${col.thClass}`]: Boolean(col.thClass),
688
+ }, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, 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: () => this.handleColumnSort(col), 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))))))), this._resizable && (index.h("div", { class: "th__resizer", onMouseDown: (evt) => this.handleResize(actualColIdx, evt) }))));
689
+ }), stickyRightCols.map((col, relativeIdx) => {
690
+ const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
691
+ return (index.h("th", { key: col.name, class: {
692
+ 'th': true,
693
+ [`${col.thClass}`]: Boolean(col.thClass),
694
+ 'sticky-right': true,
695
+ 'sticky-right-edge': relativeIdx === 0,
696
+ 'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
697
+ }, style: { ...col.thStyle, ...this.getStickyStyle(actualColIdx) } }, 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: () => this.handleColumnSort(col), 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))))))), this._resizable && (index.h("div", { class: "th__resizer th__resizer--left", onMouseDown: (evt) => this.handleResize(actualColIdx, evt, true) }))));
698
+ })))));
699
+ }
700
+ static get watchers() { return {
701
+ "columns": [{
702
+ "handleColumnsChange": 0
703
+ }]
704
+ }; }
705
+ };
706
+ SdThead.style = sdTheadCss();
707
+
708
+ 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}.td{display:table-cell;height:var(--table-body-height, 44px);padding: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:52px !important;max-width:52px !important;min-width:52px !important;padding:0 10px 0 24px;text-align:left}.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}`;
709
+
710
+ const SdTr = class {
711
+ constructor(hostRef) {
712
+ index.registerInstance(this, hostRef);
713
+ }
714
+ get el() { return index.getElement(this); }
715
+ columns;
716
+ selectable;
717
+ stickyColumn;
718
+ rowKey = '';
719
+ row = {};
720
+ tableId = '';
721
+ columnWidths = [];
722
+ isVisible = true;
723
+ spansVersion = 0;
724
+ _columns = [];
725
+ _selectable = false;
726
+ _stickyColumn = { left: 0, right: 0 };
727
+ _scrolledLeft = false;
728
+ _scrolledRight = false;
729
+ tableEl = null;
730
+ componentWillLoad() {
731
+ this.syncTableContext();
732
+ this.columnWidths = this.columnWidths ?? [];
733
+ this.resolveConfig();
734
+ this.columnWidths = this._columns.map(c => parseInt(c.width || '120', 10));
735
+ this.updateVisibilitySync();
736
+ }
737
+ componentDidLoad() {
738
+ this.syncTableContext();
739
+ }
740
+ syncTableContext() {
741
+ // sd-table이 shadow:true이므로 fallback content로 렌더되면 closest가 경계를 못 넘는다.
742
+ // 그 경우 getRootNode().host(=sd-table)로 폴백한다.
743
+ const closest = this.el.closest('sd-table');
744
+ const root = this.el.getRootNode();
745
+ const fromShadow = root instanceof ShadowRoot ? root.host : null;
746
+ const table = closest ?? fromShadow;
747
+ this.tableEl = table;
748
+ const fromMethod = table?.getTableIdSync?.();
749
+ const fromAttr = table?.getAttribute(constants.TABLE_ID_ATTR);
750
+ const resolvedTableId = (fromMethod && fromMethod !== 'undefined' ? fromMethod : null) ??
751
+ (fromAttr && fromAttr !== 'undefined' ? fromAttr : null) ??
752
+ '';
753
+ if (resolvedTableId && resolvedTableId !== this.tableId) {
754
+ this.tableId = resolvedTableId;
755
+ }
756
+ }
757
+ resolveConfig() {
758
+ const config = this.tableEl?.getConfigSync?.();
759
+ this._columns = this.columns ?? config?.columns ?? [];
760
+ this._selectable = this.selectable ?? config?.selectable ?? false;
761
+ this._stickyColumn = this.stickyColumn ?? config?.stickyColumn ?? { left: 0, right: 0 };
762
+ this._scrolledLeft = config?.scrolledLeft ?? false;
763
+ this._scrolledRight = config?.scrolledRight ?? false;
764
+ if (config?.columnWidths && (this.columnWidths ?? []).length === 0) {
765
+ this.columnWidths = [...config.columnWidths];
766
+ }
767
+ }
768
+ async refreshConfig() {
769
+ this.resolveConfig();
770
+ }
771
+ async bumpSpansVersion() {
772
+ this.spansVersion = this.spansVersion + 1;
773
+ }
774
+ async updateVisibility() {
775
+ this.updateVisibilitySync();
776
+ }
777
+ updateVisibilitySync() {
778
+ const rowIndex = parseInt(this.rowKey, 10);
779
+ const pageInfo = this.tableEl?.getPaginationInfoSync?.();
780
+ if (!pageInfo) {
781
+ this.isVisible = true;
782
+ return;
783
+ }
784
+ this.isVisible = rowIndex >= pageInfo.startIndex && rowIndex < pageInfo.endIndex;
785
+ }
786
+ async setColumnWidths(widths) {
787
+ this.columnWidths = widths;
788
+ }
789
+ async refreshSelection() {
790
+ const checkbox = this.el.querySelector('sd-checkbox');
791
+ if (checkbox) {
792
+ checkbox.value = this.isSelected();
793
+ }
794
+ }
795
+ get visibleColumns() {
796
+ return this._columns.filter(col => col.visible !== false);
797
+ }
798
+ formatValue(value) {
799
+ if (value === null || value === undefined) {
800
+ return '';
801
+ }
802
+ if (typeof value === 'number') {
803
+ return value.toLocaleString();
804
+ }
805
+ return String(value);
806
+ }
807
+ getCellValue(column) {
808
+ const { field, format, name } = column;
809
+ const value = typeof field === 'function' ? field(this.row) : field ? this.row[field] : this.row[name];
810
+ return format ? format(value, this.row) : this.formatValue(value);
811
+ }
812
+ getStickyStyle(colIdx) {
813
+ if (this.tableEl?.getStickyStyleSync) {
814
+ return this.tableEl.getStickyStyleSync(colIdx);
815
+ }
816
+ const leftOffset = this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this._selectable ? 52 : 0);
817
+ const rightOffset = this.columnWidths
818
+ .filter((_, i) => i >= this.visibleColumns.length - (this._stickyColumn.right || 0) && i > colIdx)
819
+ .reduce((a, b) => a + b, 0);
820
+ return {
821
+ '--sticky-left-offset': `${leftOffset}px`,
822
+ '--sticky-right-offset': `${rightOffset}px`,
823
+ 'width': `${this.columnWidths[colIdx]}px`,
824
+ 'minWidth': `${this.columnWidths[colIdx]}px`,
825
+ 'maxWidth': `${this.columnWidths[colIdx]}px`,
826
+ };
827
+ }
828
+ isSelected() {
829
+ if (this.tableEl?.isRowSelectedSync) {
830
+ return this.tableEl.isRowSelectedSync(this.row);
831
+ }
832
+ return false;
833
+ }
834
+ handleSelect() {
835
+ if (this.tableEl?.updateRowSelectSync) {
836
+ this.tableEl.updateRowSelectSync(this.row);
837
+ }
838
+ }
839
+ getSpanFor(col) {
840
+ if (!this.tableEl?.getSpanSync)
841
+ return undefined;
842
+ const fieldName = typeof col.field === 'string' ? col.field : col.name;
843
+ return this.tableEl.getSpanSync(this.rowKey, fieldName);
844
+ }
845
+ isCovered(colIdx) {
846
+ if (!this.tableEl?.isCoveredSync)
847
+ return false;
848
+ return this.tableEl.isCoveredSync(this.rowKey, colIdx, this._columns);
849
+ }
850
+ render() {
851
+ const stickyLeftCount = this._stickyColumn.left || 0;
852
+ const stickyRightCount = this._stickyColumn.right || 0;
853
+ const stickyLeftCols = this.visibleColumns.slice(0, stickyLeftCount);
854
+ const middleCols = this.visibleColumns.slice(stickyLeftCount, this.visibleColumns.length - stickyRightCount);
855
+ const stickyRightCols = this.visibleColumns.slice(this.visibleColumns.length - stickyRightCount);
856
+ const hasRowspan = this.tableEl?.hasRowspanSync?.() ?? false;
857
+ const rowStyle = {
858
+ display: this.isVisible ? '' : 'none',
859
+ '--table-body-height': `${sdTable_config.TABLE_BODY_LAYOUT.default.height}px`,
860
+ '--table-body-padding-x': `${sdTable_config.TABLE_BODY_LAYOUT.paddingX}px`,
861
+ '--table-body-font-family': sdTable_config.TABLE_BODY_TYPOGRAPHY.fontFamily,
862
+ '--table-body-font-weight': sdTable_config.TABLE_BODY_TYPOGRAPHY.fontWeight,
863
+ '--table-body-font-size': `${sdTable_config.TABLE_BODY_TYPOGRAPHY.fontSize}px`,
864
+ '--table-body-line-height': `${sdTable_config.TABLE_BODY_TYPOGRAPHY.lineHeight}px`,
865
+ '--table-body-text-decoration': sdTable_config.TABLE_BODY_TYPOGRAPHY.textDecoration,
866
+ '--table-border-color': sdTable_config.TABLE_BORDER.color,
867
+ '--table-border-width': `${sdTable_config.TABLE_BORDER.width}px`,
868
+ };
869
+ return (index.h(index.Host, { key: '33228ee9f020f915e77f9827e9360087fc2cd565', style: rowStyle }, index.h("tr", { key: '2f308a547ad19584e509543027cf60ff8faec2f8', class: { 'tr': true, 'tr--no-hover': hasRowspan } }, this._selectable && (index.h("td", { key: '94f50aa6fd31a63d8d99e8c6f25faf8ba6f68ddf', class: {
870
+ 'td': true,
871
+ 'td--selected': true,
872
+ 'sticky-left': true,
873
+ 'sticky-left-edge': stickyLeftCount === 0,
874
+ 'is-scrolled-left': stickyLeftCount === 0 && this._scrolledLeft,
875
+ }, style: { '--sticky-left-offset': '0px' } }, index.h("sd-checkbox", { key: 'e8808068b601529c95b8055c16e7af8a746bdccc', value: this.isSelected(), onSdUpdate: () => this.handleSelect() }))), stickyLeftCols.map((col, idx) => {
876
+ if (this.isCovered(idx))
877
+ return null;
878
+ const span = this.getSpanFor(col);
879
+ return (index.h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
880
+ 'td': true,
881
+ [`td--${col.align || 'left'}`]: true,
882
+ 'sticky-left': true,
883
+ 'sticky-left-edge': idx === stickyLeftCount - 1,
884
+ 'is-scrolled-left': idx === stickyLeftCount - 1 && this._scrolledLeft,
885
+ [`${col.tdClass}`]: Boolean(col.tdClass),
886
+ }, style: this.getStickyStyle(idx) }, index.h("slot", { name: `${this.tableId}-${typeof col.field === 'string' ? col.field : col.name}-${this.rowKey}` }, index.h("span", null, this.getCellValue(col)))));
887
+ }), middleCols.map((col, relativeIdx) => {
888
+ const actualColIdx = stickyLeftCount + relativeIdx;
889
+ if (this.isCovered(actualColIdx))
890
+ return null;
891
+ const fieldName = typeof col.field === 'string' ? col.field : col.name;
892
+ const span = this.getSpanFor(col);
893
+ return (index.h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
894
+ td: true,
895
+ [`td--${col.align || 'left'}`]: true,
896
+ [`${col.tdClass}`]: Boolean(col.tdClass),
897
+ }, style: this.getStickyStyle(actualColIdx) }, index.h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, index.h("span", null, this.getCellValue(col)))));
898
+ }), stickyRightCols.map((col, relativeIdx) => {
899
+ const actualColIdx = this.visibleColumns.length - stickyRightCount + relativeIdx;
900
+ if (this.isCovered(actualColIdx))
901
+ return null;
902
+ const fieldName = typeof col.field === 'string' ? col.field : col.name;
903
+ const span = this.getSpanFor(col);
904
+ return (index.h("td", { key: col.name, rowSpan: span?.rowspan, colSpan: span?.colspan, class: {
905
+ 'td': true,
906
+ [`td--${col.align || 'left'}`]: true,
907
+ 'sticky-right': true,
908
+ 'sticky-right-edge': relativeIdx === 0,
909
+ 'is-scrolled-right': relativeIdx === 0 && this._scrolledRight,
910
+ [`${col.tdClass}`]: Boolean(col.tdClass),
911
+ }, style: this.getStickyStyle(actualColIdx) }, index.h("slot", { name: `${this.tableId}-${fieldName}-${this.rowKey}` }, index.h("span", null, this.getCellValue(col)))));
912
+ }))));
913
+ }
914
+ };
915
+ SdTr.style = sdTrCss();
916
+
917
+ exports.sd_pagination = SdPagination;
918
+ exports.sd_select = SdSelect;
919
+ exports.sd_tbody = SdTbody;
920
+ exports.sd_thead = SdThead;
921
+ exports.sd_tr = SdTr;