@sellmate/design-system 1.16.0 → 1.18.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 (298) hide show
  1. package/dist/cjs/component.listItem-Bnh0r_CA.js +53 -0
  2. package/dist/cjs/design-system.cjs.js +1 -1
  3. package/dist/cjs/index.cjs.js +11 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/sd-button_2.cjs.entry.js +54 -0
  6. package/dist/cjs/sd-calendar_2.cjs.entry.js +2 -2
  7. package/dist/cjs/sd-chip-input.cjs.entry.js +236 -18
  8. package/dist/cjs/sd-circle-progress.cjs.entry.js +2 -2
  9. package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
  10. package/dist/cjs/sd-date-picker_7.cjs.entry.js +9 -9
  11. package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
  12. package/dist/cjs/sd-divider.cjs.entry.js +2 -2
  13. package/dist/cjs/sd-dropdown-button.cjs.entry.js +17 -7
  14. package/dist/cjs/sd-field_3.cjs.entry.js +8 -8
  15. package/dist/cjs/sd-ghost-button_2.cjs.entry.js +2 -2
  16. package/dist/cjs/sd-guide.cjs.entry.js +1 -1
  17. package/dist/cjs/sd-key-value-table.cjs.entry.js +45 -9
  18. package/dist/cjs/sd-linear-progress.cjs.entry.js +2 -2
  19. package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
  20. package/dist/cjs/sd-modal-container.cjs.entry.js +8 -1
  21. package/dist/cjs/sd-pagination_4.cjs.entry.js +10 -10
  22. package/dist/cjs/sd-popup.cjs.entry.js +2 -2
  23. package/dist/cjs/sd-portal.cjs.entry.js +16 -12
  24. package/dist/cjs/sd-select-list-item_2.cjs.entry.js +8 -7
  25. package/dist/cjs/{sd-select.config-DrJ4LNVz.js → sd-select.config-C9Ohe1QA.js} +25 -71
  26. package/dist/cjs/sd-select_3.cjs.entry.js +12 -11
  27. package/dist/cjs/sd-switch.cjs.entry.js +1 -1
  28. package/dist/cjs/sd-table.cjs.entry.js +8 -8
  29. package/dist/cjs/{sd-table.config-BjJW74Zx.js → sd-table.config-B7MuRLoR.js} +1 -1
  30. package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
  31. package/dist/cjs/sd-td.cjs.entry.js +1 -1
  32. package/dist/cjs/sd-text-link.cjs.entry.js +4 -4
  33. package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
  34. package/dist/cjs/sd-toast.cjs.entry.js +2 -2
  35. package/dist/cjs/sd-toggle.cjs.entry.js +1 -1
  36. package/dist/cjs/{system-CdAyz3ej.js → system-MjrAugX-.js} +7 -0
  37. package/dist/collection/collection-manifest.json +1 -1
  38. package/dist/collection/components/assets/Bill.js +5 -0
  39. package/dist/collection/components/assets/Coupon.js +5 -0
  40. package/dist/collection/components/assets/Delete.js +5 -0
  41. package/dist/collection/components/assets/Dot.js +5 -0
  42. package/dist/collection/components/assets/Launcher.js +5 -0
  43. package/dist/collection/components/assets/Monitor.js +5 -0
  44. package/dist/collection/components/assets/Shield.js +5 -0
  45. package/dist/collection/components/assets/Sidebar.js +5 -0
  46. package/dist/collection/components/assets/Store.js +5 -0
  47. package/dist/collection/components/assets/index.js +18 -0
  48. package/dist/collection/components/sd-button/sd-button.js +2 -2
  49. package/dist/collection/components/sd-chip-input/sd-chip-input.config.js +29 -0
  50. package/dist/collection/components/sd-chip-input/sd-chip-input.css +50 -0
  51. package/dist/collection/components/sd-chip-input/sd-chip-input.js +321 -19
  52. package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
  53. package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
  54. package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
  55. package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
  56. package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
  57. package/dist/collection/components/sd-divider/sd-divider.js +1 -1
  58. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.config.js +7 -0
  59. package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +10 -7
  60. package/dist/collection/components/sd-field/sd-field.js +5 -5
  61. package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +1 -1
  62. package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +1 -1
  63. package/dist/collection/components/sd-icon/sd-icon.js +1 -1
  64. package/dist/collection/components/sd-input/sd-input.js +2 -2
  65. package/dist/collection/components/sd-key-value-table/sd-key-value-table.config.js +2 -3
  66. package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +2 -2
  67. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +41 -4
  68. package/dist/collection/components/sd-linear-progress/sd-linear-progress.js +1 -1
  69. package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
  70. package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
  71. package/dist/collection/components/sd-modal-container/sd-modal-container.js +8 -1
  72. package/dist/collection/components/sd-number-input/sd-number-input.js +4 -4
  73. package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
  74. package/dist/collection/components/sd-popover/sd-popover.js +2 -2
  75. package/dist/collection/components/sd-popup/sd-popup.js +1 -1
  76. package/dist/collection/components/sd-portal/sd-portal.js +16 -12
  77. package/dist/collection/components/sd-select/sd-select-list-item/sd-select-list-item.js +2 -2
  78. package/dist/collection/components/sd-select/sd-select-list-item-search/sd-select-list-item-search.js +4 -4
  79. package/dist/collection/components/sd-select/sd-select-listbox/sd-select-listbox.js +4 -4
  80. package/dist/collection/components/sd-select/sd-select-trigger/sd-select-trigger.js +2 -2
  81. package/dist/collection/components/sd-select/sd-select.config.js +2 -2
  82. package/dist/collection/components/sd-select/sd-select.js +4 -4
  83. package/dist/collection/components/sd-switch/sd-switch.js +1 -1
  84. package/dist/collection/components/sd-table/sd-table.js +6 -6
  85. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
  86. package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
  87. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
  88. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  89. package/dist/collection/components/sd-tag/sd-tag.js +3 -3
  90. package/dist/collection/components/sd-text-link/sd-text-link.js +4 -4
  91. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  92. package/dist/collection/components/sd-toast/sd-toast.js +3 -3
  93. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  94. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  95. package/dist/collection/components/sd-tooltip/sd-tooltip.js +4 -4
  96. package/dist/collection/utils/modal.js +11 -0
  97. package/dist/components/index.js +1 -1
  98. package/dist/components/{p-DfZ8X4ly.js → p-4HPAPKne.js} +1 -1
  99. package/dist/components/{p-B57sOZvR.js → p-79DExV92.js} +1 -1
  100. package/dist/components/{p-RE577yb-.js → p-AI4YlQmL.js} +1 -1
  101. package/dist/components/{p-B4pLCd0_.js → p-B-4ulKJj.js} +1 -1
  102. package/dist/components/{p-G_N9xEDL.js → p-B3SKaQId.js} +1 -1
  103. package/dist/components/p-BD8OoYud.js +1 -0
  104. package/dist/components/p-BJfiMC9H.js +1 -0
  105. package/dist/components/{p-DknZgTo9.js → p-BLNc_TL-.js} +1 -1
  106. package/dist/components/{p-CLEAGFjW.js → p-BMIgVp9-.js} +1 -1
  107. package/dist/components/{p-vS0t7bWk.js → p-BX5uKVOt.js} +1 -1
  108. package/dist/components/p-BYTrIk62.js +1 -0
  109. package/dist/components/{p-_P21dOPl.js → p-B_5uwji5.js} +1 -1
  110. package/dist/components/{p-DUwrMHYa.js → p-Bzo51vnP.js} +1 -1
  111. package/dist/components/{p-DtG23tkr.js → p-C0tkFuhj.js} +1 -1
  112. package/dist/components/{p-YlaidN9T.js → p-C3wv8gVC.js} +1 -1
  113. package/dist/components/{p-YKESuy-p.js → p-CH6cVc2a.js} +1 -1
  114. package/dist/components/{p-Bfrg9lvO.js → p-CQWZv8vY.js} +1 -1
  115. package/dist/components/{p-BsQf9d7Q.js → p-CXRFEcE_.js} +1 -1
  116. package/dist/components/{p-B-61rIur.js → p-C_r3z9VA.js} +1 -1
  117. package/dist/components/{p-BvAJ_toQ.js → p-Cl5io5TH.js} +1 -1
  118. package/dist/components/p-ClKABgST.js +1 -0
  119. package/dist/components/{p-DGyTYauz.js → p-Cmg10jpN.js} +1 -1
  120. package/dist/components/{p-DeXO3mpJ.js → p-CtWfOIxb.js} +1 -1
  121. package/dist/components/{p-CIZpVJBx.js → p-CzCu_NDl.js} +1 -1
  122. package/dist/components/{p-FGvi8J2D.js → p-DAOeioSV.js} +1 -1
  123. package/dist/components/{p-iGvyLmbb.js → p-DDR0VcRU.js} +1 -1
  124. package/dist/components/{p-CnfnK5aj.js → p-DMS9mQsg.js} +1 -1
  125. package/dist/components/{p-B73U-Zw2.js → p-DTFXzlvq.js} +1 -1
  126. package/dist/components/{p-CHjF0mwj.js → p-DbLQoVx6.js} +1 -1
  127. package/dist/components/p-Dr5Q2ZKB.js +1 -0
  128. package/dist/components/{p-B4UxhQes.js → p-DrSHJYop.js} +1 -1
  129. package/dist/components/p-DvvGi4J_.js +1 -0
  130. package/dist/components/{p-BrzBnO1L.js → p-DyVh4pNL.js} +1 -1
  131. package/dist/components/{p-C_6HUUGg.js → p-Ng3JMPxb.js} +1 -1
  132. package/dist/components/p-U8VaRj9c.js +1 -0
  133. package/dist/components/{p-BY1ItC8N.js → p-hzCGj0On.js} +1 -1
  134. package/dist/components/{p-BMVHvEDw.js → p-qJeUUOyB.js} +1 -1
  135. package/dist/components/sd-action-modal.js +1 -1
  136. package/dist/components/sd-barcode-input.js +1 -1
  137. package/dist/components/sd-button.js +1 -1
  138. package/dist/components/sd-calendar.js +1 -1
  139. package/dist/components/sd-callout.js +1 -1
  140. package/dist/components/sd-checkbox.js +1 -1
  141. package/dist/components/sd-chip-input.js +1 -1
  142. package/dist/components/sd-chip.js +1 -1
  143. package/dist/components/sd-circle-progress.js +1 -1
  144. package/dist/components/sd-confirm-modal.js +1 -1
  145. package/dist/components/sd-date-picker-trigger.js +1 -1
  146. package/dist/components/sd-date-picker.js +1 -1
  147. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  148. package/dist/components/sd-date-range-picker.js +1 -1
  149. package/dist/components/sd-divider.js +1 -1
  150. package/dist/components/sd-dropdown-button.js +1 -1
  151. package/dist/components/sd-field.js +1 -1
  152. package/dist/components/sd-file-picker.js +1 -1
  153. package/dist/components/sd-floating-portal.js +1 -1
  154. package/dist/components/sd-ghost-button.js +1 -1
  155. package/dist/components/sd-guide.js +1 -1
  156. package/dist/components/sd-icon.js +1 -1
  157. package/dist/components/sd-input.js +1 -1
  158. package/dist/components/sd-key-value-table.js +1 -1
  159. package/dist/components/sd-linear-progress.js +1 -1
  160. package/dist/components/sd-loading-container.js +1 -1
  161. package/dist/components/sd-loading-modal.js +1 -1
  162. package/dist/components/sd-modal-container.js +1 -1
  163. package/dist/components/sd-number-input.js +1 -1
  164. package/dist/components/sd-pagination.js +1 -1
  165. package/dist/components/sd-popover.js +1 -1
  166. package/dist/components/sd-popup.js +1 -1
  167. package/dist/components/sd-portal.js +1 -1
  168. package/dist/components/sd-select-list-item-search.js +1 -1
  169. package/dist/components/sd-select-list-item.js +1 -1
  170. package/dist/components/sd-select-listbox.js +1 -1
  171. package/dist/components/sd-select-trigger.js +1 -1
  172. package/dist/components/sd-select.js +1 -1
  173. package/dist/components/sd-switch.js +1 -1
  174. package/dist/components/sd-table.js +1 -1
  175. package/dist/components/sd-tabs.js +1 -1
  176. package/dist/components/sd-tag.js +1 -1
  177. package/dist/components/sd-tbody.js +1 -1
  178. package/dist/components/sd-td.js +1 -1
  179. package/dist/components/sd-text-link.js +1 -1
  180. package/dist/components/sd-textarea.js +1 -1
  181. package/dist/components/sd-thead.js +1 -1
  182. package/dist/components/sd-toast-container.js +1 -1
  183. package/dist/components/sd-toast.js +1 -1
  184. package/dist/components/sd-toggle.js +1 -1
  185. package/dist/components/sd-tooltip.js +1 -1
  186. package/dist/components/sd-tr.js +1 -1
  187. package/dist/design-system/design-system.esm.js +1 -1
  188. package/dist/design-system/index.esm.js +1 -1
  189. package/dist/design-system/{p-13b0db59.entry.js → p-0a772d43.entry.js} +1 -1
  190. package/dist/design-system/p-12306783.entry.js +1 -0
  191. package/dist/design-system/{p-b457611c.entry.js → p-1602a5fa.entry.js} +1 -1
  192. package/dist/design-system/p-1f3c1cca.entry.js +1 -0
  193. package/dist/design-system/{p-3045ffe1.entry.js → p-22484d65.entry.js} +1 -1
  194. package/dist/design-system/p-3caf2c5b.entry.js +1 -0
  195. package/dist/design-system/p-3f7349ae.entry.js +1 -0
  196. package/dist/design-system/{p-b8ea656d.entry.js → p-43529bba.entry.js} +1 -1
  197. package/dist/design-system/p-46da89f2.entry.js +1 -0
  198. package/dist/design-system/{p-a1f756ab.entry.js → p-4e1d76b8.entry.js} +1 -1
  199. package/dist/design-system/{p-03bcd782.entry.js → p-683c3b91.entry.js} +1 -1
  200. package/dist/design-system/{p-99ffe505.entry.js → p-6ce68bf2.entry.js} +1 -1
  201. package/dist/design-system/{p-a5131a43.entry.js → p-80bde621.entry.js} +1 -1
  202. package/dist/design-system/{p-22883fe1.entry.js → p-81aa23d1.entry.js} +1 -1
  203. package/dist/design-system/{p-c78b8822.entry.js → p-827f067b.entry.js} +1 -1
  204. package/dist/design-system/p-8a025f91.entry.js +1 -0
  205. package/dist/design-system/{p-3e62a3ea.entry.js → p-8a84a4fe.entry.js} +1 -1
  206. package/dist/design-system/{p-d2833150.entry.js → p-8f90620b.entry.js} +1 -1
  207. package/dist/design-system/{p-a0775a0c.entry.js → p-9124a1af.entry.js} +1 -1
  208. package/dist/design-system/p-BJfiMC9H.js +1 -0
  209. package/dist/design-system/p-CAFz8W8_.js +1 -0
  210. package/dist/design-system/{p-DGyTYauz.js → p-Cmg10jpN.js} +1 -1
  211. package/dist/design-system/p-U8VaRj9c.js +1 -0
  212. package/dist/design-system/{p-c6307ba4.entry.js → p-a263af1b.entry.js} +1 -1
  213. package/dist/design-system/p-aa312937.entry.js +1 -0
  214. package/dist/design-system/p-b4b20a86.entry.js +1 -0
  215. package/dist/design-system/{p-7eb31041.entry.js → p-bbbc4b27.entry.js} +1 -1
  216. package/dist/design-system/p-bcd7d358.entry.js +1 -0
  217. package/dist/design-system/{p-14340e46.entry.js → p-cc5f5bff.entry.js} +1 -1
  218. package/dist/design-system/{p-8140a225.entry.js → p-d5032f31.entry.js} +1 -1
  219. package/dist/design-system/{p-6d765b25.entry.js → p-e93dda25.entry.js} +1 -1
  220. package/dist/design-system/{p-c4e1641b.entry.js → p-f5190934.entry.js} +1 -1
  221. package/dist/design-system/p-ff939fbd.entry.js +1 -0
  222. package/dist/esm/component.listItem-U8VaRj9c.js +50 -0
  223. package/dist/esm/design-system.js +1 -1
  224. package/dist/esm/index.js +11 -0
  225. package/dist/esm/loader.js +1 -1
  226. package/dist/esm/sd-button_2.entry.js +54 -0
  227. package/dist/esm/sd-calendar_2.entry.js +2 -2
  228. package/dist/esm/sd-chip-input.entry.js +236 -18
  229. package/dist/esm/sd-circle-progress.entry.js +2 -2
  230. package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
  231. package/dist/esm/sd-date-picker_7.entry.js +9 -9
  232. package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
  233. package/dist/esm/sd-divider.entry.js +2 -2
  234. package/dist/esm/sd-dropdown-button.entry.js +17 -7
  235. package/dist/esm/sd-field_3.entry.js +8 -8
  236. package/dist/esm/sd-ghost-button_2.entry.js +2 -2
  237. package/dist/esm/sd-guide.entry.js +1 -1
  238. package/dist/esm/sd-key-value-table.entry.js +45 -9
  239. package/dist/esm/sd-linear-progress.entry.js +2 -2
  240. package/dist/esm/sd-loading-container.entry.js +2 -2
  241. package/dist/esm/sd-modal-container.entry.js +8 -1
  242. package/dist/esm/sd-pagination_4.entry.js +10 -10
  243. package/dist/esm/sd-popup.entry.js +2 -2
  244. package/dist/esm/sd-portal.entry.js +16 -12
  245. package/dist/esm/sd-select-list-item_2.entry.js +8 -7
  246. package/dist/esm/{sd-select.config-DtrsLG0Z.js → sd-select.config-D6ktrl7E.js} +4 -50
  247. package/dist/esm/sd-select_3.entry.js +12 -11
  248. package/dist/esm/sd-switch.entry.js +1 -1
  249. package/dist/esm/{sd-table.config-D9meRqTx.js → sd-table.config-B3wuA5wX.js} +1 -1
  250. package/dist/esm/sd-table.entry.js +8 -8
  251. package/dist/esm/sd-tabs.entry.js +1 -1
  252. package/dist/esm/sd-td.entry.js +1 -1
  253. package/dist/esm/sd-text-link.entry.js +4 -4
  254. package/dist/esm/sd-toast-container.entry.js +1 -1
  255. package/dist/esm/sd-toast.entry.js +2 -2
  256. package/dist/esm/sd-toggle.entry.js +1 -1
  257. package/dist/esm/{system-j2khhcHY.js → system-BJfiMC9H.js} +7 -0
  258. package/dist/types/components/assets/Bill.d.ts +1 -0
  259. package/dist/types/components/assets/Coupon.d.ts +1 -0
  260. package/dist/types/components/assets/Delete.d.ts +1 -0
  261. package/dist/types/components/assets/Dot.d.ts +1 -0
  262. package/dist/types/components/assets/Launcher.d.ts +1 -0
  263. package/dist/types/components/assets/Monitor.d.ts +1 -0
  264. package/dist/types/components/assets/Shield.d.ts +1 -0
  265. package/dist/types/components/assets/Sidebar.d.ts +1 -0
  266. package/dist/types/components/assets/Store.d.ts +1 -0
  267. package/dist/types/components/assets/index.d.ts +9 -0
  268. package/dist/types/components/sd-chip-input/sd-chip-input.config.d.ts +24 -0
  269. package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +15 -0
  270. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +4 -0
  271. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +1 -0
  272. package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +3 -2
  273. package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +5 -0
  274. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +2 -0
  275. package/dist/types/components/sd-portal/sd-portal.d.ts +1 -0
  276. package/dist/types/components.d.ts +39 -0
  277. package/dist/types/utils/modal.d.ts +6 -0
  278. package/hydrate/index.js +547 -204
  279. package/hydrate/index.mjs +547 -204
  280. package/package.json +1 -1
  281. package/dist/components/p-6oSCGUOo.js +0 -1
  282. package/dist/components/p-BWoC-hMr.js +0 -1
  283. package/dist/components/p-C5wgHjtx.js +0 -1
  284. package/dist/components/p-Cftyepf_.js +0 -1
  285. package/dist/components/p-IgBxAXyL.js +0 -1
  286. package/dist/components/p-j2khhcHY.js +0 -1
  287. package/dist/design-system/p-0c5192b8.entry.js +0 -1
  288. package/dist/design-system/p-1652ae55.entry.js +0 -1
  289. package/dist/design-system/p-21fa7f85.entry.js +0 -1
  290. package/dist/design-system/p-2753c6c9.entry.js +0 -1
  291. package/dist/design-system/p-5c6dd20b.entry.js +0 -1
  292. package/dist/design-system/p-71739336.entry.js +0 -1
  293. package/dist/design-system/p-DtrsLG0Z.js +0 -1
  294. package/dist/design-system/p-b22cb811.entry.js +0 -1
  295. package/dist/design-system/p-b576bc21.entry.js +0 -1
  296. package/dist/design-system/p-c1f71355.entry.js +0 -1
  297. package/dist/design-system/p-da90b448.entry.js +0 -1
  298. package/dist/design-system/p-j2khhcHY.js +0 -1
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as i,t as o}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-iGvyLmbb.js";import{d as h}from"./p-CHjF0mwj.js";import{d as a}from"./p-vS0t7bWk.js";import{d}from"./p-DknZgTo9.js";import{d as n}from"./p-B73U-Zw2.js";import{d as c}from"./p-Cftyepf_.js";import{d as p}from"./p-IgBxAXyL.js";import{d as u}from"./p-YKESuy-p.js";import{d as m}from"./p-B57sOZvR.js";import{d as b}from"./p-BWoC-hMr.js";import{d as f}from"./p-CnfnK5aj.js";import{d as g}from"./p-CLEAGFjW.js";import{d as w}from"./p-BvAJ_toQ.js";const y=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),l=Math.max(window.innerHeight-e.bottom-s-i,0),h=Math.max(e.top-s-i,0),a=Math.max(l,h),d=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,a)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,d)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"29ea3526b5ef4a6f64bac810204cb7862a184503",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:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"e23ef16cf8af59d2e9dd6ee39a297c4338e0a056",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"b6811644cb571bb738d604ce31b233ff76a32d16",ref:t=>{this.triggerComponentRef=t},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)&&i("sd-portal",{key:"b9b191bd7eefcb4d69be21f51740dd1cd993a3e7",...e},i("sd-select-listbox",{key:"f04d988c8491eeea284dc4fdce91dadfd33965f8",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function S(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),y);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||h();break;case"sd-field":customElements.get(o(t))||a();break;case"sd-floating-portal":customElements.get(o(t))||d();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||u();break;case"sd-select-list-item-search":customElements.get(o(t))||m();break;case"sd-select-listbox":customElements.get(o(t))||b();break;case"sd-select-trigger":customElements.get(o(t))||f();break;case"sd-tag":customElements.get(o(t))||g();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{y as S,S as d}
1
+ import{p as t,H as e,c as s,h as i,t as o}from"./p-Bg9XySrz.js";import{n as r}from"./p-CCwNgVmC.js";import{d as l}from"./p-DDR0VcRU.js";import{d}from"./p-DbLQoVx6.js";import{d as h}from"./p-BX5uKVOt.js";import{d as a}from"./p-BLNc_TL-.js";import{d as n}from"./p-DTFXzlvq.js";import{d as c}from"./p-ClKABgST.js";import{d as p}from"./p-Dr5Q2ZKB.js";import{d as u}from"./p-CH6cVc2a.js";import{d as m}from"./p-79DExV92.js";import{d as b}from"./p-BD8OoYud.js";import{d as g}from"./p-DMS9mQsg.js";import{d as f}from"./p-BMIgVp9-.js";import{d as w}from"./p-Cl5io5TH.js";const T=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.dropDownShow=s(this,"sdDropDownShow",7)}static VIEWPORT_PADDING=20;static PORTAL_OFFSET_Y=4;static CLOSE_ANIMATION_DURATION=150;get el(){return this}type="default";value=null;options=[];placeholder="선택";dropdownWidth="";maxDropdownWidth="640px";dropdownHeight="260px";disabled=!1;label="";labelWidth="";addonLabel="";addonAlign="start";error=!1;hint="";errorMessage="";rules=[];icon=void 0;labelTooltip="";labelTooltipProps=null;emitValue=!1;width="";useSearch=!1;allSelectedLabel="전체";useSelectAll=!1;isOpen=!1;isAnimatingOut=!1;triggerWidth="200px";resolvedDropdownHeight="260px";resolvedMaxDropdownWidth="640px";focused=!1;hovered=!1;update;dropDownShow;async sdFocus(){this.disabled||await(this.triggerComponentRef?.sdFocus())}async sdOpen(){await new Promise((t=>setTimeout(t,0))),this.disabled||this.isOpen||(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)}triggerRef;triggerComponentRef;closeAnimationTimer;name=r();triggerHasFocus=!1;watchIsOpen(t){this.syncFocusedState(t),this.dropDownShow.emit({isOpen:t})}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}get displayText(){if(this.isMulti){if(!Array.isArray(this.value)||0===this.value.length)return"";const t=this.getNonDisabledLeaves(this.options),e=this.getSelectedOptions();if(t.length>0&&t.every((t=>e.some((e=>e.value===t.value)))))return this.allSelectedLabel??"전체";const s=this.flattenOptions(this.options);return this.value.map((t=>{if(null!=t&&"object"==typeof t){const e=t;return e.label??s.find((t=>t.value===e.value))?.label??""}return s.find((e=>e.value===t))?.label??""})).filter(Boolean).join(", ")}if(null==this.value)return"";if(!this.emitValue&&"object"==typeof this.value&&!Array.isArray(this.value))return this.value.label??"";const t=this.flattenOptions(this.options);return t.find((t=>t.value===this.value))?.label??""}flattenOptions(t){return t.flatMap((t=>t.children?this.flattenOptions(t.children):[t]))}getNonDisabledLeaves(t){return t.flatMap((t=>t.disabled?[]:t.children?this.getNonDisabledLeaves(t.children):[t]))}getSelectedOptions(){const t=this.value;return null!=t&&Array.isArray(t)?this.emitValue?t.map((t=>this.findOriginalOption(t,this.options))).filter((t=>!!t)):t:[]}toMultiValue(t){return this.emitValue?t.map((t=>t.value)):t}parsePixelValue(t,e){const s=Number.parseFloat(t);return Number.isFinite(s)?s:e}updateDropdownViewportConstraints(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect(),s=t.VIEWPORT_PADDING,i=t.PORTAL_OFFSET_Y,o=this.parsePixelValue(this.dropdownHeight,260),r=this.parsePixelValue(this.maxDropdownWidth,640),l=Math.max(window.innerHeight-e.bottom-s-i,0),d=Math.max(e.top-s-i,0),h=Math.max(l,d),a=Math.max(window.innerWidth-2*s,0);this.resolvedDropdownHeight=`${Math.min(o,h)}px`,this.resolvedMaxDropdownWidth=`${Math.min(r,a)}px`}handleViewportResize=()=>{this.isOpen&&this.updateDropdownViewportConstraints()};findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),t.CLOSE_ANIMATION_DURATION))}prepareDropdownGeometry(){this.triggerRef&&(this.triggerWidth=`${this.triggerRef.offsetWidth}px`),this.updateDropdownViewportConstraints()}syncFocusedState(t=this.isOpen){this.focused=t||this.triggerHasFocus}handleTriggerFocus=()=>{this.triggerHasFocus=!0,this.syncFocusedState()};handleTriggerBlur=()=>{this.triggerHasFocus=!1,this.syncFocusedState()};handleTriggerClick=()=>{this.isOpen?this.closeDropdown():(this.prepareDropdownGeometry(),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0)};emitUpdate(t){this.update.emit(t)}handleOptionSelect=t=>{const{option:e,leaves:s}=t;if(this.isMulti)this.handleMultiSelect(e,s);else{this.closeDropdown(),this.value=this.emitValue?e.value:e;const t=this.value;requestAnimationFrame((()=>{this.emitUpdate(t)}))}};handleMultiSelect(t,e){const s=this.getSelectedOptions();let i;if(t.children)if(e.every((t=>s.some((e=>e.value===t.value))))){const t=new Set(e.map((t=>t.value)));i=s.filter((e=>!t.has(e.value)))}else{const t=new Set(s.map((t=>t.value))),o=e.filter((e=>!t.has(e.value)));i=[...s,...o]}else i=s.some((e=>e.value===t.value))?s.filter((e=>e.value!==t.value)):[...s,t];this.value=this.toMultiValue(i),this.emitUpdate(this.value)}connectedCallback(){window.addEventListener("resize",this.handleViewportResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleViewportResize),this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e={open:this.isOpen,parentRef:this.triggerRef,viewportPadding:t.VIEWPORT_PADDING,onSdClose:()=>{this.closeDropdown()}};return i("sd-field",{key:"fced3680a535c60d5750908acf1226426e12182b",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:()=>{this.hovered=!0},onMouseLeave:()=>{this.hovered=!1}},i("div",{key:"38d53e92c022affd40bfc7951bbcdf7e02071446",class:"sd-select",ref:t=>{this.triggerRef=t}},i("sd-select-trigger",{key:"9cd9bdb89db37204f9a5c312d26277da772b1209",ref:t=>{this.triggerComponentRef=t},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)&&i("sd-portal",{key:"8666dc885f3dcbae13011fd312eb72b7e6c906d9",...e},i("sd-select-listbox",{key:"04e6dba3d2837cbef68ded80bd2f89c5bbe9dc01",type:this.type,options:this.options,value:this.value,emitValue:this.emitValue,useSearch:this.useSearch,useSelectAll:this.useSelectAll,triggerWidth:this.dropdownWidth||this.triggerWidth,maxWidth:this.resolvedMaxDropdownWidth,maxHeight:this.resolvedDropdownHeight,onSdOptionSelect:t=>this.handleOptionSelect(t.detail)})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-select{display:inline-flex}sd-select sd-portal{display:none}sd-select .sd-select{position:relative;width:100%;height:100%}"}},[512,"sd-select",{type:[1],value:[1032],options:[16],placeholder:[1],dropdownWidth:[1,"dropdown-width"],maxDropdownWidth:[1,"max-dropdown-width"],dropdownHeight:[1,"dropdown-height"],disabled:[4],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],error:[1028],hint:[1],errorMessage:[1,"error-message"],rules:[16],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],emitValue:[4,"emit-value"],width:[8],useSearch:[4,"use-search"],allSelectedLabel:[1,"all-selected-label"],useSelectAll:[4,"use-select-all"],name:[1],isOpen:[32],isAnimatingOut:[32],triggerWidth:[32],resolvedDropdownHeight:[32],resolvedMaxDropdownWidth:[32],focused:[32],hovered:[32],sdFocus:[64],sdOpen:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function x(){"undefined"!=typeof customElements&&["sd-select","sd-button","sd-checkbox","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-select-list-item","sd-select-list-item-search","sd-select-listbox","sd-select-trigger","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-select":customElements.get(o(t))||customElements.define(o(t),T);break;case"sd-button":customElements.get(o(t))||l();break;case"sd-checkbox":customElements.get(o(t))||d();break;case"sd-field":customElements.get(o(t))||h();break;case"sd-floating-portal":customElements.get(o(t))||a();break;case"sd-ghost-button":customElements.get(o(t))||n();break;case"sd-icon":customElements.get(o(t))||c();break;case"sd-portal":customElements.get(o(t))||p();break;case"sd-select-list-item":customElements.get(o(t))||u();break;case"sd-select-list-item-search":customElements.get(o(t))||m();break;case"sd-select-listbox":customElements.get(o(t))||b();break;case"sd-select-trigger":customElements.get(o(t))||g();break;case"sd-tag":customElements.get(o(t))||f();break;case"sd-tooltip":customElements.get(o(t))||w()}}))}export{T as S,x as d}
@@ -0,0 +1 @@
1
+ import{p as t,H as e,c as s,h as i,t as h}from"./p-Bg9XySrz.js";import{c as o,d as l,f as r,i as n,e as c,E as d,g as a}from"./p-DvvGi4J_.js";import{d as u}from"./p-DbLQoVx6.js";import{d as m}from"./p-ClKABgST.js";import{d as p}from"./p-CH6cVc2a.js";import{d as f}from"./p-79DExV92.js";const x=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.optionSelect=s(this,"sdOptionSelect",7)}type="default";options=[];value=null;emitValue=!1;useSearch=!1;useSelectAll=!1;triggerWidth="200px";maxWidth="640px";maxHeight="260px";searchKeyword="";isScrolled=!1;focusedIndex=-1;optionSelect;listEl;lastScrolledIndex=-1;keydownAttached=!1;suppressHover=!1;get isDepth(){return"default_depth"===this.type||"multi_depth"===this.type}get isMulti(){return"multi"===this.type||"multi_depth"===this.type}static SELECT_ALL_OPTION={value:"__select_all__",label:"전체"};get showSelectAll(){return this.useSelectAll&&this.isMulti&&this.getAllNonDisabledLeaves().length>0}getAllNonDisabledLeaves(){const t=e=>e.flatMap((e=>e.disabled?[]:e.children?t(e.children):[e]));return t(this.options)}get selectAllState(){if(!this.showSelectAll)return!1;const t=this.getAllNonDisabledLeaves();if(0===t.length)return!1;const e=this.getSelectedValues(),s=t.filter((t=>e.has(t.value))).length;return 0!==s&&(s===t.length||null)}get showSearch(){return!!this.useSearch&&(this.isDepth?o(this.options):this.options.length)>=l}get filteredOptions(){if(null==this.searchKeyword||""===this.searchKeyword)return this.options;if(this.isDepth)return r(this.options,this.searchKeyword);const t=this.searchKeyword.toLowerCase();return this.options.filter((e=>{const s=n(e.label)?c(e.label):e.label;return null!=s&&s.toLowerCase().includes(t)}))}get isEmpty(){return this.isDepth?0===o(this.filteredOptions)&&0===this.filteredOptions.length:0===this.filteredOptions.length}getSelectedValues(){return null!=this.value&&Array.isArray(this.value)?this.emitValue?new Set(this.value):new Set(this.value.map((t=>t.value))):new Set}isOptionSelected(t){return this.isMulti?this.getSelectedValues().has(t.value):this.emitValue||null==this.value||"object"!=typeof this.value||Array.isArray(this.value)?this.value===t.value:this.value.value===t.value}getGroupSelectionState(t){if(!this.isMulti||!t.children)return!1;const e=this.getSelectedValues();if(0===e.size)return!1;const s=this.collectVisibleLeaves(t);if(0===s.length)return!1;const i=s.filter((t=>e.has(t.value))).length;return 0!==i&&(i===s.length||null)}getCountInfo(t){if(!this.isMulti||!t.children)return;const e=this.getSelectedValues(),s=this.collectVisibleLeaves(t);return{selected:s.filter((t=>e.has(t.value))).length,total:s.length}}findOriginalOption(t,e){for(const s of e){if(s.value===t)return s;if(s.children){const e=this.findOriginalOption(t,s.children);if(e)return e}}}collectLeaves(t){return t.children?t.children.flatMap((t=>this.collectLeaves(t))):[t]}collectVisibleLeaves(t){if(t.disabled)return[];if(!t.children)return[t];if(0===t.children.length){const e=this.findOriginalOption(t.value,this.options);return e?this.collectLeaves(e).filter((t=>!t.disabled)):[]}return t.children.flatMap((t=>this.collectVisibleLeaves(t)))}get navigableOptions(){const e=[];this.showSelectAll&&e.push(t.SELECT_ALL_OPTION);const s=t=>{for(const i of t){const t=!!i.children;(!t||this.isMulti)&&!i.disabled&&e.push(i),t&&i.children&&i.children.length>0&&s(i.children)}};return s(this.filteredOptions),e}isSelectAllOption(e){return this.showSelectAll&&e.value===t.SELECT_ALL_OPTION.value}emitSelectAll(){if(!this.showSelectAll)return;const e=this.getAllNonDisabledLeaves();this.optionSelect.emit({option:{...t.SELECT_ALL_OPTION,children:e},leaves:e})}handleSelectAllClick=t=>{t.stopPropagation(),this.emitSelectAll()};isOptionFocused(t){if(this.focusedIndex<0)return!1;const e=this.navigableOptions[this.focusedIndex];return null!=e&&e.value===t.value}resetFocusOnFilter(){this.focusedIndex=this.navigableOptions.length>0?0:-1,this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}handleSearchFilter=t=>{this.searchKeyword=t.detail};handleScroll=t=>{this.isScrolled=t.target.scrollTop>0};emitOptionSelect(t){this.optionSelect.emit({option:t,leaves:this.collectVisibleLeaves(t)})}handleOptionClick=t=>{t.stopPropagation(),this.emitOptionSelect(t.detail)};handleOptionHover=t=>{if(this.suppressHover)return;const e=this.navigableOptions.findIndex((e=>e.value===t.value));e>=0&&(this.focusedIndex=e)};releaseHoverSuppress=()=>{this.suppressHover=!1,document.removeEventListener("mousemove",this.releaseHoverSuppress,!0)};handleKeyDown=t=>{const e=this.navigableOptions;if("ArrowDown"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<0?0:(this.focusedIndex+1)%e.length,this.beginHoverSuppression()}else if("ArrowUp"===t.key){if(0===e.length)return;t.preventDefault(),t.stopPropagation(),this.focusedIndex=this.focusedIndex<=0?e.length-1:this.focusedIndex-1,this.beginHoverSuppression()}else if("Enter"===t.key){if(this.focusedIndex<0||this.focusedIndex>=e.length)return;t.preventDefault(),t.stopPropagation();const s=e[this.focusedIndex];this.isSelectAllOption(s)?this.emitSelectAll():this.emitOptionSelect(s)}};beginHoverSuppression(){this.suppressHover||(this.suppressHover=!0,document.addEventListener("mousemove",this.releaseHoverSuppress,!0))}scrollFocusedIntoView(){const t=this.listEl,e=t?.querySelector(".sd-select-list-item--focused");if(!t||!e)return;const s=t.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<s.top?t.scrollTop+=i.top-s.top:i.bottom>s.bottom&&(t.scrollTop+=i.bottom-s.bottom)}connectedCallback(){this.keydownAttached||(document.addEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!0)}disconnectedCallback(){this.keydownAttached&&(document.removeEventListener("keydown",this.handleKeyDown,!0),this.keydownAttached=!1),this.suppressHover&&(document.removeEventListener("mousemove",this.releaseHoverSuppress,!0),this.suppressHover=!1)}componentDidRender(){this.focusedIndex!==this.lastScrolledIndex&&(this.lastScrolledIndex=this.focusedIndex,this.focusedIndex>=0&&this.scrollFocusedIntoView())}renderOptions(t,e=1){return t.map((t=>{const s=!!t.children;return[i("sd-select-list-item",{option:t,depth:e,isSelected:s?this.getGroupSelectionState(t):this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,countInfo:this.getCountInfo(t),onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)}),s&&t.children?this.renderOptions(t.children,e+1):null]}))}render(){return i("div",{key:"fe30af2954ea5669f2071698e6ef9e2b26244d9b",class:"sd-select-listbox",style:{"--listbox-trigger-width":this.triggerWidth??"200px","--listbox-max-width":this.maxWidth??"640px","--listbox-max-height":this.maxHeight??"260px","--listbox-radius":`${a.radius}px`}},this.showSearch&&i("sd-select-list-item-search",{key:"aa7ce87d8c0c7163921445325121562603edd960",isScrolled:this.isScrolled,onSdSearchFilter:this.handleSearchFilter}),i("div",{key:"e8b5b3f73653ddc5096101f7109d427de1efa93a",class:"sd-select-listbox__list",onScroll:this.handleScroll,ref:t=>{this.listEl=t}},this.showSelectAll&&i("sd-select-list-item",{key:"7fbde730eca0b8234475b714ea38a4393425410e",option:t.SELECT_ALL_OPTION,depth:1,isSelected:this.selectAllState,isFocused:this.isOptionFocused(t.SELECT_ALL_OPTION),useCheckbox:!0,onSdListItemClick:this.handleSelectAllClick,onMouseEnter:()=>this.handleOptionHover(t.SELECT_ALL_OPTION)}),this.isEmpty?i("div",{class:"sd-select-listbox__empty"},d):this.isDepth?this.renderOptions(this.filteredOptions):this.filteredOptions.map((t=>i("sd-select-list-item",{option:t,depth:1,isSelected:this.isOptionSelected(t),isFocused:this.isOptionFocused(t),useCheckbox:this.isMulti,onSdListItemClick:this.handleOptionClick,onMouseEnter:()=>this.handleOptionHover(t)})))))}static get watchers(){return{searchKeyword:[{resetFocusOnFilter:0}]}}static get style(){return":host{display:block}:host .sd-select-listbox{display:flex;flex-direction:column;width:var(--listbox-trigger-width);max-width:var(--listbox-max-width);max-height:var(--listbox-max-height);border-radius:var(--listbox-radius);background:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);overflow:hidden;outline:none}:host .sd-select-listbox__list{flex:1;min-height:0;overflow-y:auto;padding-bottom:0}:host .sd-select-listbox__empty{padding:12px;text-align:center;font-size:12px;line-height:20px;color:#888888}"}},[513,"sd-select-listbox",{type:[1],options:[16],value:[8],emitValue:[4,"emit-value"],useSearch:[4,"use-search"],useSelectAll:[4,"use-select-all"],triggerWidth:[1,"trigger-width"],maxWidth:[1,"max-width"],maxHeight:[1,"max-height"],searchKeyword:[32],isScrolled:[32],focusedIndex:[32]},void 0,{searchKeyword:[{resetFocusOnFilter:0}]}]);function b(){"undefined"!=typeof customElements&&["sd-select-listbox","sd-checkbox","sd-icon","sd-select-list-item","sd-select-list-item-search"].forEach((t=>{switch(t){case"sd-select-listbox":customElements.get(h(t))||customElements.define(h(t),x);break;case"sd-checkbox":customElements.get(h(t))||u();break;case"sd-icon":customElements.get(h(t))||m();break;case"sd-select-list-item":customElements.get(h(t))||p();break;case"sd-select-list-item-search":customElements.get(h(t))||f()}}))}export{x as S,b as d}
@@ -0,0 +1 @@
1
+ var r={typography:{feedback:{sm:{regular:{fontSize:"12",fontWeight:"400"}}}},color:{bg:{frame:"#FFFFFF",accent:{default:"#0075FF"}},fg:{primary:"#222222",secondary:"#555555",tertiary:"#888888",success:"#00973C",accent:"#0075FF",inverse:"#FFFFFF"},divider:{default:"#E1E1E1"},blue:{strong:"#0075FF"},darkblue:{strong:"#006AC1"},grey:{strong:"#737373"}},shadow:{spread:{md:{x:"0",y:"0",blur:"24",spread:"0",color:"rgba(34,34,34,0.2)"}}}};export{r as s}
@@ -1 +1 @@
1
- import{p as t,H as n,c as o,h as e,t as i}from"./p-Bg9XySrz.js";const a=t(class t extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=o(this,"sdClose",7)}get el(){return this}to="body";parentRef=null;offset=[0,0];zIndex=998;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;scrollHandler=()=>this.updatePosition();static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent(),window.addEventListener("scroll",this.scrollHandler,!0)}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),window.removeEventListener("scroll",this.scrollHandler,!0),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof n?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",zIndex:(this.zIndex??998).toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const n=this.parentRef.getBoundingClientRect();if(0===n.width&&0===n.height)return;const[o,e]=this.offset??[0,0],i=t.ARROW_SIZE;let a=0,s=0;switch(this.placement??"bottom"){case"top":a=n.top-this.wrapper.offsetHeight+e-i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":a=n.bottom+e+i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"left":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.left-this.wrapper.offsetWidth-o-i;break;case"right":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.right+o+i}Object.assign(this.wrapper.style,{top:`${a}px`,left:`${s}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}handleKeydown(t){"Escape"===t.key&&this.close.emit()}render(){return e("slot",{key:"7931b1b9ee17e2de64a7fa87658ec7d4501f7ecd"})}static get style(){return".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center;justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--with-link{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu--has-close .sd-floating-menu__content{padding-right:28px}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}"}},[772,"sd-floating-portal",{to:[1],parentRef:[16],offset:[16],zIndex:[2,"z-index"],placement:[1],open:[4]},[[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"],[8,"keydown","handleKeydown"]]]);function s(){"undefined"!=typeof customElements&&["sd-floating-portal"].forEach((t=>{"sd-floating-portal"===t&&(customElements.get(i(t))||customElements.define(i(t),a))}))}export{a as S,s as d}
1
+ import{p as t,H as n,c as o,h as e,t as i}from"./p-Bg9XySrz.js";const a=t(class t extends n{constructor(t){super(),!1!==t&&this.__registerHost(),this.close=o(this,"sdClose",7)}get el(){return this}to="body";parentRef=null;offset=[0,0];zIndex=998;placement="bottom";open=!1;close;container;wrapper;rafId;isInsideClick=!1;resizeObserver;mutationObserver;scrollHandler=()=>this.updatePosition();static ARROW_SIZE=11.2;componentDidLoad(){this.container=this.resolveContainer(),this.createWrapper(),this.moveSlotContent(),requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")})),this.observeParent(),window.addEventListener("scroll",this.scrollHandler,!0)}componentDidRender(){this.wrapper&&(this.open?(this.wrapper.style.display="block",requestAnimationFrame((()=>{this.updatePosition(),this.wrapper&&(this.wrapper.style.visibility="visible")}))):(this.wrapper.style.display="none",this.wrapper.style.visibility="hidden"))}disconnectedCallback(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),window.removeEventListener("scroll",this.scrollHandler,!0),this.unobserveParent(),this.wrapper?.remove()}resolveContainer(){const t="string"==typeof this.to?document.querySelector(this.to):this.to;return t instanceof n?t:document.body}createWrapper(){this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{position:"fixed",zIndex:(this.zIndex??998).toString(),transition:"opacity 0.4s",top:"-9999px",left:"-9999px"}),this.container.appendChild(this.wrapper)}moveSlotContent(){this.wrapper&&Array.from(this.el.childNodes).filter((t=>t.nodeType!==Node.COMMENT_NODE)).forEach((t=>this.wrapper.appendChild(t)))}updatePosition(){void 0!==this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame((()=>{if(!this.parentRef||!this.wrapper)return;const n=this.parentRef.getBoundingClientRect();if(0===n.width&&0===n.height)return;const[o,e]=this.offset??[0,0],i=t.ARROW_SIZE;let a=0,s=0;switch(this.placement??"bottom"){case"top":a=n.top-this.wrapper.offsetHeight+e-i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"bottom":a=n.bottom+e+i,s=n.left+n.width/2-this.wrapper.offsetWidth/2+o;break;case"left":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.left-this.wrapper.offsetWidth-o-i;break;case"right":a=n.top+n.height/2-this.wrapper.offsetHeight/2+e,s=n.right+o+i}Object.assign(this.wrapper.style,{top:`${a}px`,left:`${s}px`})}))}observeParent(){this.parentRef&&(this.resizeObserver=new ResizeObserver((()=>this.updatePosition())),this.resizeObserver.observe(this.parentRef),this.mutationObserver=new MutationObserver((()=>this.updatePosition())),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0}))}unobserveParent(){this.resizeObserver?.disconnect(),this.mutationObserver?.disconnect()}handleMouseDown(t){this.isInsideClick=!!(this.wrapper&&this.wrapper.contains(t.target)||this.parentRef&&this.parentRef.contains(t.target))}handleWindowClick(t){this.isInsideClick?this.isInsideClick=!1:this.wrapper?.contains(t.target)||this.close.emit()}handleKeydown(t){"Escape"===t.key&&this.close.emit()}render(){return e("slot",{key:"f20806555ad198c33a62ec938ea7b77200fa1585"})}static get style(){return".sd-floating-menu{width:fit-content;padding:12px 16px;border-radius:6px;font-size:12px;font-weight:500;line-height:20px;position:relative;box-sizing:border-box;background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);animation:sd-floating-fade-in 0.35s ease-out}.sd-floating-menu--top{animation-name:sd-floating-slide-top}.sd-floating-menu--bottom{animation-name:sd-floating-slide-bottom}.sd-floating-menu--left{animation-name:sd-floating-slide-left}.sd-floating-menu--right{animation-name:sd-floating-slide-right}.sd-floating-menu .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--default{background:var(--sd-floating-bg, #07284A);color:var(--sd-floating-content, #FFFFFF);font-weight:500}.sd-floating-menu--default .sd-floating-menu__arrow{color:var(--sd-floating-bg, #07284A)}.sd-floating-menu--danger{background:var(--sd-floating-bg, #FCE6E6);color:var(--sd-floating-content, #FB4444);font-weight:700}.sd-floating-menu--danger .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FCE6E6)}.sd-floating-menu--warning{background:var(--sd-floating-bg, #FEF1EA);color:var(--sd-floating-content, #FF6B00);font-weight:700}.sd-floating-menu--warning .sd-floating-menu__arrow{color:var(--sd-floating-bg, #FEF1EA)}.sd-floating-menu--accent{background:var(--sd-floating-bg, #E6F1FF);color:var(--sd-floating-content, #0075FF);font-weight:700}.sd-floating-menu--accent .sd-floating-menu__arrow{color:var(--sd-floating-bg, #E6F1FF)}.sd-floating-menu__arrow{position:absolute;display:flex;width:16px;height:12px}.sd-floating-menu__arrow svg{width:100%;height:100%}.sd-floating-menu__arrow--top{bottom:-12px;left:50%;transform:translateX(-50%)}.sd-floating-menu__arrow--bottom{top:-12px;left:50%;transform:translateX(-50%) rotate(180deg)}.sd-floating-menu__arrow--left{right:-12px;top:50%;transform:translateY(-50%) rotate(-90deg)}.sd-floating-menu__arrow--right{left:-12px;top:50%;transform:translateY(-50%) rotate(90deg)}.sd-floating-menu__content{font-size:12px;line-height:20px}.sd-floating-menu__content .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px;margin-bottom:4px}.sd-floating-menu__content .sd-floating-menu__messages{font-weight:500}.sd-floating-menu__content .sd-floating-menu__buttons{margin-top:12px;display:flex;gap:8px;align-items:center;justify-content:flex-end}.sd-floating-menu__content .sd-floating-menu__buttons--with-link{justify-content:space-between}.sd-floating-menu--popover{padding:16px 20px}.sd-floating-menu--popover .sd-floating-menu__content{gap:4px}.sd-floating-menu--popover .sd-floating-menu__title{font-size:14px;font-weight:700;line-height:24px}.sd-floating-menu--popover .sd-floating-menu__messages{font-size:12px;font-weight:500;line-height:20px}.sd-floating-menu--closing{animation:sd-floating-fade-out 0.15s ease-in forwards}.sd-floating-menu--closing.sd-floating-menu--top{animation-name:sd-floating-slide-out-top}.sd-floating-menu--closing.sd-floating-menu--bottom{animation-name:sd-floating-slide-out-bottom}.sd-floating-menu--closing.sd-floating-menu--left{animation-name:sd-floating-slide-out-left}.sd-floating-menu--closing.sd-floating-menu--right{animation-name:sd-floating-slide-out-right}.sd-floating-menu--has-close .sd-floating-menu__content{padding-right:28px}.sd-floating-menu__close-button{position:absolute;top:12px;right:12px}@keyframes sd-floating-fade-out{from{opacity:1}to{opacity:0}}@keyframes sd-floating-slide-out-top{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes sd-floating-slide-out-bottom{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes sd-floating-slide-out-left{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes sd-floating-slide-out-right{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes sd-floating-fade-in{from{opacity:0}to{opacity:1}}@keyframes sd-floating-slide-top{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-bottom{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes sd-floating-slide-left{from{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes sd-floating-slide-right{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}"}},[772,"sd-floating-portal",{to:[1],parentRef:[16],offset:[16],zIndex:[2,"z-index"],placement:[1],open:[4]},[[9,"resize","updatePosition"],[9,"mousedown","handleMouseDown"],[8,"click","handleWindowClick"],[8,"keydown","handleKeydown"]]]);function s(){"undefined"!=typeof customElements&&["sd-floating-portal"].forEach((t=>{"sd-floating-portal"===t&&(customElements.get(i(t))||customElements.define(i(t),a))}))}export{a as S,s as d}
@@ -1 +1 @@
1
- import{p as t,H as e,h as n,t as i}from"./p-Bg9XySrz.js";import{d as a}from"./p-Cftyepf_.js";var s={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},g={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},o={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},d={content:"#FB4444",bg:"#FCEFEF"},r={content:"#FF6B00",bg:"#FEF1EA"},c={content:"#916C0D",bg:"#FFF7DD"},p={content:"#00973C",bg:"#E8F9EF"},l={content:"#0075FF",bg:"#E6F1FF"},h={content:"#006AC1",bg:"#EAF5FE"},f={content:"#004290",bg:"#EFF6FF"},u={content:"#737373",bg:"#EEEEEE"};const b=["xs","sm","md"],x=["grey","red","orange","yellow","green","blue","darkblue","indigo"],m={grey:{background:u.bg,content:u.content,icon:u.content},red:{background:d.bg,content:d.content,icon:d.content},orange:{background:r.bg,content:r.content,icon:r.content},yellow:{background:c.bg,content:c.content,icon:c.content},green:{background:p.bg,content:p.content,icon:p.content},blue:{background:l.bg,content:l.content,icon:l.content},darkblue:{background:h.bg,content:h.content,icon:h.content},indigo:{background:f.bg,content:f.content,icon:f.content}},y={xs:{height:`${s.height}px`,paddingX:`${s.paddingX}px`,gap:`${s.gap}px`,fontSize:`${s.typography.fontSize}px`,fontWeight:s.typography.fontWeight,lineHeight:`${s.typography.lineHeight}px`,iconSize:12,radius:`${s.radius}px`},sm:{height:`${g.height}px`,paddingX:`${g.paddingX}px`,gap:`${g.gap}px`,fontSize:`${g.typography.fontSize}px`,fontWeight:g.typography.fontWeight,lineHeight:`${g.typography.lineHeight}px`,iconSize:16,radius:`${g.radius}px`},md:{height:`${o.height}px`,paddingX:`${o.paddingX}px`,gap:`${o.gap}px`,fontSize:`${o.typography.fontSize}px`,fontWeight:o.typography.fontWeight,lineHeight:`${o.typography.lineHeight}px`,iconSize:16,radius:`${o.radius}px`}},F={xs:{...y.xs,radius:"999px"},sm:{...y.sm,radius:"999px"},md:{...y.md,radius:"999px"}},$=Object.fromEntries(["square","pill"].flatMap((t=>b.flatMap((e=>x.map((n=>[`${t}_${e}_${n}`,{shape:t,size:e,color:n,..."square"===t?y[e]:F[e],...m[n]}]))))))),E=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}name="square_sm_grey";label="";icon;isLeft=!0;componentWillLoad(){this.name=this.name??"square_sm_grey"}get resolvedName(){if(!Object.prototype.hasOwnProperty.call($,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return $[this.resolvedName]}renderIcon(t,e){return null==this.icon?null:n("sd-icon",{class:"sd-tag__icon",name:this.icon,size:e,color:t})}render(){const t=this.resolvedConfig,e=this.renderIcon(t.icon,t.iconSize);return n("span",{key:"f5dd5e267ffdde104f36ec7f19390357dbf03610",class:"sd-tag",style:{"--sd-tag-background":t.background,"--sd-tag-content":t.content,"--sd-tag-height":t.height,"--sd-tag-padding-x":t.paddingX,"--sd-tag-gap":t.gap,"--sd-tag-font-size":t.fontSize,"--sd-tag-font-weight":t.fontWeight,"--sd-tag-line-height":t.lineHeight,"--sd-tag-radius":t.radius},"aria-label":this.label||"tag"},this.icon&&this.isLeft&&e,n("span",{key:"53c649171b1bba53bf71bbf8f382c0678f1a3a6f",class:"sd-tag__label"},this.label),this.icon&&!this.isLeft&&e)}static get style(){return"sd-tag{display:inline-flex;width:fit-content;height:fit-content}.sd-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-tag-gap, 5px);min-height:var(--sd-tag-height, 24px);padding:0 var(--sd-tag-padding-x, 8px);border-radius:var(--sd-tag-radius, 4px);background:var(--sd-tag-background, #f3f3f3);color:var(--sd-tag-content, #7a7a7a);box-sizing:border-box;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-tag__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.sd-tag__label{display:inline-flex;align-items:center;justify-content:center;min-width:0;font-size:var(--sd-tag-font-size, 12px);font-weight:var(--sd-tag-font-weight, 700);line-height:var(--sd-tag-line-height, 20px)}"}},[512,"sd-tag",{name:[1],label:[1],icon:[1],isLeft:[4,"is-left"]}]);function k(){"undefined"!=typeof customElements&&["sd-tag","sd-icon"].forEach((t=>{switch(t){case"sd-tag":customElements.get(i(t))||customElements.define(i(t),E);break;case"sd-icon":customElements.get(i(t))||a()}}))}export{E as S,k as d}
1
+ import{p as t,H as e,h as n,t as i}from"./p-Bg9XySrz.js";import{d as a}from"./p-ClKABgST.js";var s={height:"20",paddingX:"8",gap:"4",typography:{fontSize:"11",fontWeight:"500",lineHeight:"18"},radius:"6"},g={height:"24",paddingX:"8",gap:"4",typography:{fontSize:"12",fontWeight:"700",lineHeight:"20"},radius:"6"},o={height:"28",paddingX:"12",gap:"6",typography:{fontSize:"14",fontWeight:"700",lineHeight:"24"},radius:"8"},d={content:"#FB4444",bg:"#FCEFEF"},r={content:"#FF6B00",bg:"#FEF1EA"},c={content:"#916C0D",bg:"#FFF7DD"},l={content:"#00973C",bg:"#E8F9EF"},p={content:"#0075FF",bg:"#E6F1FF"},h={content:"#006AC1",bg:"#EAF5FE"},u={content:"#004290",bg:"#EFF6FF"},f={content:"#737373",bg:"#EEEEEE"};const x=["xs","sm","md"],b=["grey","red","orange","yellow","green","blue","darkblue","indigo"],m={grey:{background:f.bg,content:f.content,icon:f.content},red:{background:d.bg,content:d.content,icon:d.content},orange:{background:r.bg,content:r.content,icon:r.content},yellow:{background:c.bg,content:c.content,icon:c.content},green:{background:l.bg,content:l.content,icon:l.content},blue:{background:p.bg,content:p.content,icon:p.content},darkblue:{background:h.bg,content:h.content,icon:h.content},indigo:{background:u.bg,content:u.content,icon:u.content}},y={xs:{height:`${s.height}px`,paddingX:`${s.paddingX}px`,gap:`${s.gap}px`,fontSize:`${s.typography.fontSize}px`,fontWeight:s.typography.fontWeight,lineHeight:`${s.typography.lineHeight}px`,iconSize:12,radius:`${s.radius}px`},sm:{height:`${g.height}px`,paddingX:`${g.paddingX}px`,gap:`${g.gap}px`,fontSize:`${g.typography.fontSize}px`,fontWeight:g.typography.fontWeight,lineHeight:`${g.typography.lineHeight}px`,iconSize:16,radius:`${g.radius}px`},md:{height:`${o.height}px`,paddingX:`${o.paddingX}px`,gap:`${o.gap}px`,fontSize:`${o.typography.fontSize}px`,fontWeight:o.typography.fontWeight,lineHeight:`${o.typography.lineHeight}px`,iconSize:16,radius:`${o.radius}px`}},F={xs:{...y.xs,radius:"999px"},sm:{...y.sm,radius:"999px"},md:{...y.md,radius:"999px"}},$=Object.fromEntries(["square","pill"].flatMap((t=>x.flatMap((e=>b.map((n=>[`${t}_${e}_${n}`,{shape:t,size:e,color:n,..."square"===t?y[e]:F[e],...m[n]}]))))))),E=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost()}name="square_sm_grey";label="";icon;isLeft=!0;componentWillLoad(){this.name=this.name??"square_sm_grey"}get resolvedName(){if(!Object.prototype.hasOwnProperty.call($,this.name))throw new Error(`Invalid sd-tag name: "${this.name}"`);return this.name}get resolvedConfig(){return $[this.resolvedName]}renderIcon(t,e){return null==this.icon?null:n("sd-icon",{class:"sd-tag__icon",name:this.icon,size:e,color:t})}render(){const t=this.resolvedConfig,e=this.renderIcon(t.icon,t.iconSize);return n("span",{key:"b4d86dee7290a74d73fd27a9a4133c5c0ef9b750",class:"sd-tag",style:{"--sd-tag-background":t.background,"--sd-tag-content":t.content,"--sd-tag-height":t.height,"--sd-tag-padding-x":t.paddingX,"--sd-tag-gap":t.gap,"--sd-tag-font-size":t.fontSize,"--sd-tag-font-weight":t.fontWeight,"--sd-tag-line-height":t.lineHeight,"--sd-tag-radius":t.radius},"aria-label":this.label||"tag"},this.icon&&this.isLeft&&e,n("span",{key:"490c703ca9ce3d0516b1da89fec18045a750d715",class:"sd-tag__label"},this.label),this.icon&&!this.isLeft&&e)}static get style(){return"sd-tag{display:inline-flex;width:fit-content;height:fit-content}.sd-tag{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-tag-gap, 5px);min-height:var(--sd-tag-height, 24px);padding:0 var(--sd-tag-padding-x, 8px);border-radius:var(--sd-tag-radius, 4px);background:var(--sd-tag-background, #f3f3f3);color:var(--sd-tag-content, #7a7a7a);box-sizing:border-box;white-space:nowrap;-webkit-user-select:none;user-select:none}.sd-tag__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center}.sd-tag__label{display:inline-flex;align-items:center;justify-content:center;min-width:0;font-size:var(--sd-tag-font-size, 12px);font-weight:var(--sd-tag-font-weight, 700);line-height:var(--sd-tag-line-height, 20px)}"}},[512,"sd-tag",{name:[1],label:[1],icon:[1],isLeft:[4,"is-left"]}]);function k(){"undefined"!=typeof customElements&&["sd-tag","sd-icon"].forEach((t=>{switch(t){case"sd-tag":customElements.get(i(t))||customElements.define(i(t),E);break;case"sd-icon":customElements.get(i(t))||a()}}))}export{E as S,k as d}
@@ -1 +1 @@
1
- import{p as e,H as d,h as s,t as i}from"./p-Bg9XySrz.js";import{f as l}from"./p-BOJJ_sQS.js";import{d as t}from"./p-iGvyLmbb.js";import{d as o}from"./p-DknZgTo9.js";import{d as r}from"./p-B73U-Zw2.js";import{d as a}from"./p-Cftyepf_.js";import{d as f}from"./p-CLEAGFjW.js";import{d as n}from"./p-BvAJ_toQ.js";const h={start:"flex-start",center:"center",end:"flex-end"},c=l.field.label.sm,p=l.field.label.md,b={sm:{height:c.height,gap:c.gap,icon:c.icon,fontSize:c.typography.fontSize,lineHeight:c.typography.lineHeight,fontWeight:c.typography.fontWeight},md:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight}},g=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],m=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of g){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=l.field.addonLabel,i=this.size in b?this.size:"sm",t=b[i],o={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},r={"--sd-field-error-message-color":l.field.errorMessage.color,"--sd-field-error-message-font-size":`${l.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${l.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":l.field.hint.color,"--sd-field-hint-font-size":`${l.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${l.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${l.field.contents.gap}px`},a=""!==this.label?{"--sd-field-label-height":`${t.height}px`,"--sd-field-label-gap":`${t.gap}px`,"--sd-field-label-font-size":`${t.fontSize}px`,"--sd-field-label-line-height":`${t.lineHeight}px`,"--sd-field-label-font-weight":t.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},f=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":h[this.addonAlign]??h.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"a04858364c6b9afceedba2f5d7ee0e289a6b6782",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...o,...a,...f,...r}},s("div",{key:"898f5af4d213745257b2666cbea56db591792054",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"488ab5c290258d0139f677319f21a55bb6c63876",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"db8c388dd2c4743a287f7567cde4015cafed1d95",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"1049369f52322fb1a4f1b4baf50b1e4ef2e9e59e",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"f0a28d9bdf97730088454c64b71b7cbc1d4dd875",name:this.icon.name,size:this.icon.size??Number(b[this.size in b?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"deee9ef5d166ab4d17451ad9d013b3b9d3d7aebe"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(b[this.size in b?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function _(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),m);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||o();break;case"sd-ghost-button":customElements.get(i(e))||r();break;case"sd-icon":customElements.get(i(e))||a();break;case"sd-tag":customElements.get(i(e))||f();break;case"sd-tooltip":customElements.get(i(e))||n()}}))}export{m as S,_ as d}
1
+ import{p as e,H as d,h as s,t as i}from"./p-Bg9XySrz.js";import{f as l}from"./p-BOJJ_sQS.js";import{d as t}from"./p-DDR0VcRU.js";import{d as o}from"./p-BLNc_TL-.js";import{d as r}from"./p-DTFXzlvq.js";import{d as a}from"./p-ClKABgST.js";import{d as f}from"./p-BMIgVp9-.js";import{d as n}from"./p-Cl5io5TH.js";const h={start:"flex-start",center:"center",end:"flex-end"},c=l.field.label.sm,p=l.field.label.md,b={sm:{height:c.height,gap:c.gap,icon:c.icon,fontSize:c.typography.fontSize,lineHeight:c.typography.lineHeight,fontWeight:c.typography.fontWeight},md:{height:p.height,gap:p.gap,icon:p.icon,fontSize:p.typography.fontSize,lineHeight:p.typography.lineHeight,fontWeight:p.typography.fontWeight}},g=["sd-input","sd-barcode-input","sd-textarea","sd-number-input","sd-select","sd-file-picker","sd-date-picker","sd-date-range-picker","sd-chip-input"],m=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}get el(){return this}name="";rules=[];error=!1;disabled=!1;readonly=!1;hovered=!1;focused=!1;status;hint="";errorMessage="";width="";size="sm";label="";labelWidth="";addonLabel="";addonAlign="start";icon=void 0;labelTooltip="";labelTooltipProps=null;errorMsg="";hostElement=null;get value(){return this.hostElement?.value??null}get fieldStatus(){let e="";return this.disabled?(e="disabled",`sd-field--${e}`):this.readonly?(e="readonly",`sd-field--${e}`):this.focused?(e="focus",`sd-field--${e}`):(this.hovered&&(e="hover"),void 0!==this.status&&(e=this.status),this.error&&(e="error"),""!==e?`sd-field--${e}`:"")}componentDidLoad(){this.hostElement=this.findHostElement(),this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}findHostElement(){for(const e of g){const d=this.el.closest(e);if(d&&"value"in d)return d}return null}registerToForm(){const e=this.el.closest("sd-form");e&&"function"==typeof e.componentOnReady&&e.componentOnReady().then((e=>{e.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const e=this.el.closest("sd-form");e?.componentOnReady().then((e=>{e.sdUnregisterField(this)}))}async sdValidate(){if(!this.rules||0===this.rules.length)return!0;for(const e of this.rules){const d=e(this.value??"");if(!0!==d)return this.setError(!0,d),!1}return this.setError(!1,""),!0}async sdReset(){this.hostElement&&(this.hostElement.value=null),this.setError(!1,"")}async sdResetValidation(){this.setError(!1,"")}async sdFocus(){this.hostElement?.focus?.(),this.hostElement?.scrollIntoView({behavior:"smooth",block:"center"})}setError(e,d){this.errorMsg=d,this.hostElement&&(this.hostElement.error=e)}render(){const e=this.addonLabel,d=l.field.addonLabel,i=this.size in b?this.size:"sm",t=b[i],o={"--sd-field-wrapper-height":`var(--sd-system-size-field-${i}-height)`,"--sd-field-control-radius":`var(--sd-system-radius-field-${i})`,"--sd-field-label-margin-right":`var(--sd-system-space-field-${i}-gap)`},r={"--sd-field-error-message-color":l.field.errorMessage.color,"--sd-field-error-message-font-size":`${l.field.errorMessage.typography.fontSize}px`,"--sd-field-error-message-line-height":`${l.field.errorMessage.typography.lineHeight}px`,"--sd-field-hint-color":l.field.hint.color,"--sd-field-hint-font-size":`${l.field.hint.typography.fontSize}px`,"--sd-field-hint-line-height":`${l.field.hint.typography.lineHeight}px`,"--sd-field-message-gap":`${l.field.contents.gap}px`},a=""!==this.label?{"--sd-field-label-height":`${t.height}px`,"--sd-field-label-gap":`${t.gap}px`,"--sd-field-label-font-size":`${t.fontSize}px`,"--sd-field-label-line-height":`${t.lineHeight}px`,"--sd-field-label-font-weight":t.fontWeight,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-label-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{},f=""!==e?{"--sd-field-addon-padding-x":`${d.paddingX}px`,"--sd-field-addon-font-size":`${d.typography.fontSize}px`,"--sd-field-addon-line-height":`${d.typography.lineHeight}px`,"--sd-field-addon-font-weight":d.typography.fontWeight,"--sd-field-addon-bg":d.bg,"--sd-field-addon-border-color":this.disabled?d.border.disabled:d.border.default,"--sd-field-addon-gap":`${d.gap}px`,"--sd-field-addon-border-width":`${d.border.width}px`,"--sd-field-addon-justify":h[this.addonAlign]??h.start,...""!==this.labelWidth&&0!==this.labelWidth?{"--sd-field-addon-width":"number"==typeof this.labelWidth?`${this.labelWidth}px`:this.labelWidth}:{}}:{};return s("div",{key:"9edafceb24a4fcde7cfb966f421bfb73f1b07617",class:{"sd-field":!0,"sd-field--has-label":""!==this.label,"sd-field--has-addon":""!==e,[this.fieldStatus]:""!==this.fieldStatus},style:{...o,...a,...f,...r}},s("div",{key:"e5c4a8aad05afb40f3eccc492135b2b968ffc646",class:"sd-field__wrapper"},this.renderLabel(this.label),s("div",{key:"e88d62a979eaab9f6794c851813e5f56c3c5c4ac",class:"sd-field__main",style:""!==this.width&&0!==this.width?{width:"number"==typeof this.width?`${this.width}px`:this.width,flex:"none"}:{}},s("div",{key:"be69d7e48d90dda0872ffc43c2a1b4044e99ac00",class:{"sd-field__control":!0,"sd-field__control--has-addon":""!==e}},e&&s("div",{key:"2c631ac0f8b9001cf6344908cf8cbcdf182cc1a7",class:"sd-field__addon"},this.icon&&s("sd-icon",{key:"34a49839ee200cd59c3ff5b84caf5ded2c50f7b0",name:this.icon.name,size:this.icon.size??Number(b[this.size in b?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate}),e),s("slot",{key:"693f20c529e5f2ea84d381e59327392edb7b4c15"})),""!==this.errorMsg||""!==this.errorMessage?s("div",{class:"sd-field__error-message"},""!==this.errorMsg?this.errorMsg:this.errorMessage):""!==this.hint&&s("div",{class:"sd-field__hint"},this.hint))))}renderLabel(e){return null==e||""===e?null:s("label",{class:"sd-field__label"},this.icon&&s("sd-icon",{name:this.icon.name,size:this.icon.size??Number(b[this.size in b?this.size:"sm"].icon),color:this.icon.color,rotate:this.icon.rotate,class:"sd-field__label__icon"}),s("div",{class:"sd-field__label__text"},e),this.labelTooltip&&s("sd-tooltip",{class:"sd-field__label__tooltip",...this.labelTooltipProps},this.labelTooltip))}static get style(){return"sd-field{display:inline-flex;flex-flow:column nowrap;height:fit-content;width:100%}sd-field .sd-field *:focus,sd-field .sd-field *:focus-visible,sd-field .sd-field *:focus-within{outline:none !important}sd-field .sd-field.sd-field--disabled{cursor:not-allowed}sd-field .sd-field.sd-field--disabled .sd-field__wrapper{cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__label-inside{border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--disabled .sd-field__wrapper .sd-field__control{background-color:#E1E1E1;border-color:#CCCCCC;color:#888888;cursor:not-allowed !important}sd-field .sd-field.sd-field--readonly .sd-field__wrapper .sd-field__control{background-color:var(--sd-system-color-field-bg-read-only);color:var(--sd-system-color-field-text-read-only)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label{display:flex;align-items:center;flex-shrink:0;width:var(--sd-field-label-width, auto);height:var(--sd-field-label-height);margin-right:var(--sd-field-label-margin-right)}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__icon{margin-right:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__text{font-size:var(--sd-field-label-font-size);line-height:var(--sd-field-label-line-height);font-weight:var(--sd-field-label-font-weight);color:var(--sd-system-color-field-text-default);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}sd-field .sd-field--has-label .sd-field__wrapper .sd-field__label__tooltip{margin-left:var(--sd-field-label-gap);flex-shrink:0}sd-field .sd-field--has-addon .sd-field__control .sd-field__addon{display:flex;gap:var(--sd-field-addon-gap);align-items:center;justify-content:var(--sd-field-addon-justify, flex-start);white-space:nowrap;box-sizing:border-box;flex-shrink:0;width:var(--sd-field-addon-width, auto);padding:0 var(--sd-field-addon-padding-x);font-size:var(--sd-field-addon-font-size);line-height:var(--sd-field-addon-line-height);font-weight:var(--sd-field-addon-font-weight);background:var(--sd-field-addon-bg);border-right:var(--sd-field-addon-border-width) solid var(--sd-field-addon-border-color);border-radius:calc(var(--sd-field-control-radius) - 1px) 0 0 calc(var(--sd-field-control-radius) - 1px)}sd-field .sd-field__wrapper{width:100%;display:flex;align-items:flex-start;flex-flow:row nowrap;position:relative;color:var(--sd-system-color-field-text-default);-webkit-user-select:none;user-select:none}sd-field .sd-field__wrapper .sd-field__main{flex:1;min-width:0;display:flex;flex-direction:column}sd-field .sd-field__wrapper .sd-field__control{position:relative;height:var(--sd-field-wrapper-height);display:flex;min-width:0;border:1px solid var(--sd-system-color-field-border-default);border-radius:var(--sd-field-control-radius);background:var(--sd-system-color-field-bg-default)}sd-field .sd-field--error .sd-field__wrapper .sd-field__control:not(:hover){border:1px solid var(--sd-system-color-field-border-danger) !important}sd-field .sd-field.sd-field--pass .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-success) !important}sd-field .sd-field:not(.sd-field--disabled):not(.sd-field--readonly) .sd-field__wrapper .sd-field__control:hover{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field.sd-field--focus:not(.sd-field--readonly) .sd-field__wrapper .sd-field__control{border:1px solid var(--sd-system-color-field-border-focus) !important;box-shadow:0px 0px 4px 0px rgba(0, 113, 255, 0.4)}sd-field .sd-field .sd-field__error-message{color:var(--sd-field-error-message-color);font-size:var(--sd-field-error-message-font-size);line-height:var(--sd-field-error-message-line-height);margin-top:var(--sd-field-message-gap)}sd-field .sd-field .sd-field__hint{color:var(--sd-field-hint-color);font-size:var(--sd-field-hint-font-size);line-height:var(--sd-field-hint-line-height);margin-top:var(--sd-field-message-gap)}"}},[772,"sd-field",{name:[1],rules:[16],error:[1028],disabled:[1028],readonly:[1028],hovered:[1028],focused:[1028],status:[1],hint:[1],errorMessage:[1,"error-message"],width:[8],size:[513],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],errorMsg:[32],sdValidate:[64],sdReset:[64],sdResetValidation:[64],sdFocus:[64]}]);function _(){"undefined"!=typeof customElements&&["sd-field","sd-button","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-field":customElements.get(i(e))||customElements.define(i(e),m);break;case"sd-button":customElements.get(i(e))||t();break;case"sd-floating-portal":customElements.get(i(e))||o();break;case"sd-ghost-button":customElements.get(i(e))||r();break;case"sd-icon":customElements.get(i(e))||a();break;case"sd-tag":customElements.get(i(e))||f();break;case"sd-tooltip":customElements.get(i(e))||n()}}))}export{m as S,_ as d}
@@ -0,0 +1 @@
1
+ import{p as e,H as r,h as s,d as t,t as c}from"./p-Bg9XySrz.js";import{p as a}from"./p-D1vaasIp.js";import{s as o}from"./p-BJfiMC9H.js";var i={track:"#EEEEEE",arc:"#2D8DFF"};const l=a.progress.color.label,n=o.color.fg.tertiary,p={primary:{arc:i.arc,track:i.track},inverse:{arc:"#FFFFFF",track:"transparent"},error:{arc:"#E30000",track:i.track},complete:{arc:"#01BB4B",track:i.track}},d=2*Math.PI*34,g=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}indeterminate=!1;value=0;type="primary";label;get clampedValue(){return Number.isFinite(this.value)?Math.max(0,Math.min(100,this.value)):0}render(){const e=p[this.type]??p.primary,r={"--sd-circle-progress-track":e.track,"--sd-circle-progress-arc":e.arc,"--sd-circle-progress-label-color":l,"--sd-circle-progress-percent-color":0===this.clampedValue?n:e.arc},c={};this.indeterminate||(c.strokeDasharray=`${this.clampedValue/100*d} ${d}`,c.strokeDashoffset="0");const a=!this.indeterminate;return s(t,{key:"35b4dc433f5e2bbd02dc3422b286da179472082f",style:r},s("svg",{key:"de1d3e44eccf421491a1107ba234e1562917945b",class:"sd-circle-progress",viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg"},s("circle",{key:"b0a54a2e155222a416a6bdcb75f4fe54d9de8270",class:"sd-circle-progress__track",cx:40,cy:40,r:34,fill:"none","stroke-width":12}),s("circle",{key:"6bc314b3fce758d41a3499e9d87b7158b15777a5",class:"sd-circle-progress__arc",cx:40,cy:40,r:34,fill:"none","stroke-width":12,"stroke-linecap":"round",style:c})),a&&s("span",{key:"16ec46b178d5f2f2f5ad245703c2f4362b8df261",class:"sd-circle-progress__percent"},Math.round(this.clampedValue),"%"),this.label&&s("span",{key:"c199799d2466c75f91f1bc1f20fdb7e71c64ba0e",class:"sd-circle-progress__label"},this.label))}static get style(){return'@charset "UTF-8";sd-circle-progress{display:inline-flex;flex-direction:column;align-items:center;gap:8px}sd-circle-progress .sd-circle-progress{width:80px;height:80px}sd-circle-progress .sd-circle-progress__track{stroke:var(--sd-circle-progress-track)}sd-circle-progress .sd-circle-progress__arc{stroke:var(--sd-circle-progress-arc);transform:rotate(-90deg);transform-origin:center center;transition:stroke-dasharray 0.4s linear, stroke-dashoffset 0.4s linear}sd-circle-progress .sd-circle-progress__percent{text-align:center;color:var(--sd-circle-progress-percent-color);font-family:"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;font-size:16px;font-weight:700;line-height:26px}sd-circle-progress .sd-circle-progress__label{text-align:center;color:var(--sd-circle-progress-label-color);font-family:"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;font-size:12px;font-weight:400;line-height:20px}sd-circle-progress{}sd-circle-progress[indeterminate] .sd-circle-progress{animation:sd-circle-progress-spin 2s linear infinite;transform-origin:center center}sd-circle-progress[indeterminate] .sd-circle-progress__arc{transform:none;transition:none;animation:sd-circle-progress-spin-path 1.5s ease-in-out infinite}@keyframes sd-circle-progress-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes sd-circle-progress-spin-path{0%{stroke-dasharray:1, 340;stroke-dashoffset:0}50%{stroke-dasharray:151, 340;stroke-dashoffset:-60}100%{stroke-dasharray:151, 340;stroke-dashoffset:-211}}'}},[512,"sd-circle-progress",{indeterminate:[516],value:[2],type:[513],label:[1]}]);function f(){"undefined"!=typeof customElements&&["sd-circle-progress"].forEach((e=>{"sd-circle-progress"===e&&(customElements.get(c(e))||customElements.define(c(e),g))}))}export{g as S,f as d}
@@ -1 +1 @@
1
- import{p as e,H as s,c as t,h as i,t as a}from"./p-Bg9XySrz.js";import{n as d}from"./p-CCwNgVmC.js";import{d as r,D as o,a as l}from"./p-Bfrg9lvO.js";import{d as n}from"./p-iGvyLmbb.js";import{d as c}from"./p-YlaidN9T.js";import{d as h}from"./p-vS0t7bWk.js";import{d as p}from"./p-DknZgTo9.js";import{d as m}from"./p-B73U-Zw2.js";import{d as g}from"./p-Cftyepf_.js";import{d as u}from"./p-IgBxAXyL.js";import{d as b}from"./p-CLEAGFjW.js";import{d as f}from"./p-BvAJ_toQ.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD ~ YYYY-MM-DD";selectable;maxRange;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};get displayText(){return null==this.value||""===this.value[0]||""===this.value[1]?"":`${this.value[0]} ~ ${this.value[1]}`}disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=l[this.size]??l.sm;return i("sd-field",{key:"89eaeb8978796508650aec5f3ccdeb7df16fb6f4",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":o.border.default,"--sd-system-color-field-border-focus":o.border.focus,"--sd-system-color-field-bg-default":o.bg.default}},i("div",{key:"f3ce583e53edbc451ab6c0592c0ab2ed87e07a06",class:"sd-date-range-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"53086fd3d15dc2c05364a66fdf767e09c6c19fac",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"5ee1499ee9a224a9c653095e9914ed20cbaca2a1",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-date-range-picker-calendar",{key:"7c7479dacf57c996a708435857d2b5f7900509fd",value:this.value,selectable:this.selectable,maxRange:this.maxRange,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-range-picker",{value:[1040],size:[513],placeholder:[513],selectable:[16],maxRange:[2,"max-range"],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-range-picker","sd-button","sd-date-picker-trigger","sd-date-range-picker-calendar","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-range-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-date-picker-trigger":customElements.get(a(e))||r();break;case"sd-date-range-picker-calendar":customElements.get(a(e))||c();break;case"sd-field":customElements.get(a(e))||h();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||g();break;case"sd-portal":customElements.get(a(e))||u();break;case"sd-tag":customElements.get(a(e))||b();break;case"sd-tooltip":customElements.get(a(e))||f()}}))}export{k as S,y as d}
1
+ import{p as e,H as s,c as t,h as i,t as a}from"./p-Bg9XySrz.js";import{n as d}from"./p-CCwNgVmC.js";import{d as r,D as l,a as o}from"./p-CQWZv8vY.js";import{d as n}from"./p-DDR0VcRU.js";import{d as c}from"./p-C3wv8gVC.js";import{d as h}from"./p-BX5uKVOt.js";import{d as p}from"./p-BLNc_TL-.js";import{d as m}from"./p-DTFXzlvq.js";import{d as g}from"./p-ClKABgST.js";import{d as u}from"./p-Dr5Q2ZKB.js";import{d as b}from"./p-BMIgVp9-.js";import{d as f}from"./p-Cl5io5TH.js";const k=e(class e extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.update=t(this,"sdUpdate",7),this.viewChange=t(this,"sdViewChange",7)}static CLOSE_ANIMATION_DURATION=150;get el(){return this}value=null;size="sm";placeholder="YYYY-MM-DD ~ YYYY-MM-DD";selectable;maxRange;disabled=!1;width="";label="";labelWidth="";addonLabel="";addonAlign="start";hint="";errorMessage="";rules=[];error=!1;icon=void 0;labelTooltip="";labelTooltipProps=null;isOpen=!1;isAnimatingOut=!1;focused=!1;hovered=!1;update;viewChange;triggerRef;formField;closeAnimationTimer;name=d();watchIsOpen(e){this.focused=e}async sdValidate(){return this.formField?.sdValidate()}async sdReset(){return this.formField?.sdReset()}async sdResetValidate(){return this.formField?.sdResetValidation()}closeDropdown(){this.isOpen&&(this.isOpen=!1,this.isAnimatingOut=!0,this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.closeAnimationTimer=setTimeout((()=>{this.isAnimatingOut=!1}),e.CLOSE_ANIMATION_DURATION))}handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closeDropdown():(this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer),this.isAnimatingOut=!1,this.isOpen=!0))};handleSelect=e=>{this.closeDropdown(),this.value=e.detail;const s=this.value;requestAnimationFrame((()=>{this.update.emit(s)}))};handleViewChange=e=>{this.viewChange.emit(e.detail)};get displayText(){return null==this.value||""===this.value[0]||""===this.value[1]?"":`${this.value[0]} ~ ${this.value[1]}`}disconnectedCallback(){this.closeAnimationTimer&&clearTimeout(this.closeAnimationTimer)}render(){const e=o[this.size]??o.sm;return i("sd-field",{key:"89eaeb8978796508650aec5f3ccdeb7df16fb6f4",name:this.name,label:this.label,labelWidth:this.labelWidth,addonLabel:this.addonLabel,addonAlign:this.addonAlign,hint:this.hint,errorMessage:this.errorMessage,width:this.width,rules:this.rules,error:this.error,disabled:this.disabled,focused:this.focused,hovered:this.hovered,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:e=>this.formField=e,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-system-size-field-sm-height":`${e.height}px`,"--sd-system-radius-field-sm":`${e.radius}px`,"--sd-system-color-field-border-default":l.border.default,"--sd-system-color-field-border-focus":l.border.focus,"--sd-system-color-field-bg-default":l.bg.default}},i("div",{key:"f3ce583e53edbc451ab6c0592c0ab2ed87e07a06",class:"sd-date-range-picker",ref:e=>{this.triggerRef=e}},i("sd-date-picker-trigger",{key:"53086fd3d15dc2c05364a66fdf767e09c6c19fac",displayText:this.displayText,placeholder:this.placeholder,disabled:this.disabled,size:this.size,onSdTriggerClick:this.handleTriggerClick})),(this.isOpen||this.isAnimatingOut)&&i("sd-portal",{key:"5ee1499ee9a224a9c653095e9914ed20cbaca2a1",open:this.isOpen,parentRef:this.triggerRef,onSdClose:()=>this.closeDropdown()},i("sd-date-range-picker-calendar",{key:"7c7479dacf57c996a708435857d2b5f7900509fd",value:this.value,selectable:this.selectable,maxRange:this.maxRange,onSdSelect:this.handleSelect,onSdViewChange:this.handleViewChange})))}static get watchers(){return{isOpen:[{watchIsOpen:0}]}}static get style(){return"sd-date-range-picker{display:inline-flex}sd-date-range-picker sd-portal{display:none}sd-date-range-picker .sd-date-range-picker{position:relative;width:100%;height:100%}"}},[512,"sd-date-range-picker",{value:[1040],size:[513],placeholder:[513],selectable:[16],maxRange:[2,"max-range"],disabled:[516],width:[8],label:[1],labelWidth:[8,"label-width"],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],hint:[1],errorMessage:[1,"error-message"],rules:[16],error:[1028],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],name:[1],isOpen:[32],isAnimatingOut:[32],focused:[32],hovered:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64]},void 0,{isOpen:[{watchIsOpen:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-range-picker","sd-button","sd-date-picker-trigger","sd-date-range-picker-calendar","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-portal","sd-tag","sd-tooltip"].forEach((e=>{switch(e){case"sd-date-range-picker":customElements.get(a(e))||customElements.define(a(e),k);break;case"sd-button":customElements.get(a(e))||n();break;case"sd-date-picker-trigger":customElements.get(a(e))||r();break;case"sd-date-range-picker-calendar":customElements.get(a(e))||c();break;case"sd-field":customElements.get(a(e))||h();break;case"sd-floating-portal":customElements.get(a(e))||p();break;case"sd-ghost-button":customElements.get(a(e))||m();break;case"sd-icon":customElements.get(a(e))||g();break;case"sd-portal":customElements.get(a(e))||u();break;case"sd-tag":customElements.get(a(e))||b();break;case"sd-tooltip":customElements.get(a(e))||f()}}))}export{k as S,y as d}
@@ -1 +1 @@
1
- import{p as t,H as i,c as s,h as e,t as h}from"./p-Bg9XySrz.js";import{d as n}from"./p-B73U-Zw2.js";import{d as o}from"./p-Cftyepf_.js";import{d}from"./p-CLEAGFjW.js";var a={default:{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",fontSize:"12",fontWeight:"500",lineHeight:"20"},focus:{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",fontSize:"12",fontWeight:"400",lineHeight:"20"}},r={default:"#F6F6F6",error:"#FCEFEF"},c={default:"#555555",error:"#E30000",focus:"#222222"};const l={height:`${"24"}px`,paddingX:`${"8"}px`,gap:`${"4"}px`,radius:`${"9999"}px`,borderWidth:`${{width:"1"}.width}px`},p={bg:{default:r.default,error:r.error},content:{default:c.default,error:c.error,focus:c.focus}},u={default:{fontFamily:a.default.fontFamily,fontSize:`${a.default.fontSize}px`,fontWeight:a.default.fontWeight,lineHeight:`${a.default.lineHeight}px`},focus:{fontFamily:a.focus.fontFamily,fontSize:`${a.focus.fontSize}px`,fontWeight:a.focus.fontWeight,lineHeight:`${a.focus.lineHeight}px`}},f=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.delete=s(this,"sdRemove",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}name="";value="";error=!1;disabled=!1;editable=!0;placeholder="";rules=[];internalValue="";isEditing=!1;update;delete;focus;blur;inputEl;draftValue="";shouldInitInput=!1;valueChanged(t){const i=t??"",s=this.isEditing;this.internalValue=i,this.draftValue=i,s&&(this.isEditing=!1,this.shouldInitInput=!1,this.inputEl?.blur(),this.blur.emit())}componentWillLoad(){this.internalValue=this.value??""}componentDidLoad(){this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}async sdValidate(){if(!this.rules||0===this.rules.length)return this.error=!1,!0;for(const t of this.rules)if(!0!==t(this.internalValue??""))return this.error=!0,!1;return this.error=!1,!0}async sdReset(){this.internalValue="",this.value="",this.error=!1,this.draftValue="",this.isEditing=!1,this.shouldInitInput=!1}async sdResetValidate(){this.error=!1}async sdResetValidation(){this.error=!1}async sdFocus(){this.disabled||this.enterEditMode()}async sdGetNativeElement(){return this.inputEl??null}get isEditable(){return!1!==this.editable}enterEditMode=()=>{this.disabled||this.isEditing||!this.isEditable||(this.draftValue=this.internalValue,this.shouldInitInput=!0,this.isEditing=!0,this.focus.emit())};commitEdit=async()=>{if(!this.isEditing)return;const t=(this.inputEl?.textContent??this.draftValue).trim(),i=t!==this.draftValue;this.internalValue=t,this.isEditing=!1,this.shouldInitInput=!1,this.value=t,i&&this.update.emit(t),await this.sdValidate(),this.blur.emit()};cancelEdit=()=>{this.isEditing&&(this.internalValue=this.draftValue,this.isEditing=!1,this.shouldInitInput=!1,this.blur.emit())};handleChipClick=()=>{this.disabled||this.isEditing||!this.isEditable||this.enterEditMode()};handleChipKeyDown=t=>{this.disabled||this.isEditing||!this.isEditable||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.enterEditMode())};handleInputChange=t=>{this.internalValue=t.target.textContent??""};handleInputKeyDown=t=>{"Enter"===t.key?(t.preventDefault(),t.stopPropagation(),this.commitEdit()):"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.cancelEdit())};handleInputBlur=()=>{this.commitEdit()};handlePaste=t=>{t.preventDefault();const i=t.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,i)};handleRemoveClick=t=>{t.stopPropagation(),this.disabled||this.delete.emit()};syncInputValue(t){if(!this.inputEl)return;this.inputEl.textContent=t;const i=document.createRange();i.selectNodeContents(this.inputEl),i.collapse(!1);const s=window.getSelection();s?.removeAllRanges(),s?.addRange(i)}registerToForm(){const t=this.el.closest("sd-form");t&&"function"==typeof t.componentOnReady&&t.componentOnReady().then((t=>{t.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const t=this.el.closest("sd-form");t?.componentOnReady().then((t=>{t.sdUnregisterField(this)}))}componentDidUpdate(){this.isEditing&&this.inputEl&&this.shouldInitInput&&(this.inputEl.focus(),this.syncInputValue(this.internalValue),this.shouldInitInput=!1)}resolveState(){return this.isEditing?"focus":this.error?"error":"default"}render(){const t=this.resolveState(),i=u.default,s={"--sd-chip-height":l.height,"--sd-chip-padding-x":l.paddingX,"--sd-chip-gap":l.gap,"--sd-chip-radius":l.radius,"--sd-chip-border-width":l.borderWidth,"--sd-chip-bg":"error"===t?p.bg.error:p.bg.default,"--sd-chip-content":"error"===t?p.content.error:p.content.default,"--sd-chip-border-color":"transparent","--sd-chip-font-family":i.fontFamily,"--sd-chip-font-size":i.fontSize,"--sd-chip-font-weight":i.fontWeight,"--sd-chip-line-height":i.lineHeight};return e("span",{key:"26f863e035272df44fec64b16ebe6c17230d3452",class:{"sd-chip":!0,[`sd-chip--${t}`]:!0,"sd-chip--disabled":this.disabled,"sd-chip--editable":!this.disabled&&this.isEditable},role:this.disabled||!this.isEditable?void 0:"button",tabIndex:this.disabled||this.isEditing||!this.isEditable?-1:0,"aria-disabled":this.disabled?"true":void 0,style:s,onClick:this.handleChipClick,onKeyDown:this.handleChipKeyDown},this.isEditing?e("span",{key:"chip-input",ref:t=>this.inputEl=t,class:"sd-chip__input",role:"textbox",tabindex:this.disabled?-1:0,contentEditable:!this.disabled,"data-placeholder":this.placeholder,spellcheck:!1,onInput:this.handleInputChange,onKeyDown:this.handleInputKeyDown,onBlur:this.handleInputBlur,onPaste:this.handlePaste,onClick:t=>t.stopPropagation()}):[e("span",{key:"chip-label",class:"sd-chip__label"},this.internalValue),!this.disabled&&e("sd-ghost-button",{key:"chip-remove",class:"sd-chip__remove",icon:"close",size:"xxs",ariaLabel:"remove",onClick:this.handleRemoveClick})])}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-chip{display:inline-flex;width:fit-content;max-width:100%;height:fit-content}sd-chip .sd-chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-chip-gap);max-width:100%;height:var(--sd-chip-height);padding:0 var(--sd-chip-padding-x);border-radius:var(--sd-chip-radius);background:var(--sd-chip-bg);color:var(--sd-chip-content);border:var(--sd-chip-border-width) solid var(--sd-chip-border-color);font-family:var(--sd-chip-font-family);font-size:var(--sd-chip-font-size);font-weight:var(--sd-chip-font-weight);line-height:var(--sd-chip-line-height);box-sizing:border-box;white-space:nowrap;overflow:hidden;-webkit-user-select:none;user-select:none}sd-chip .sd-chip--editable:not(.sd-chip--focus){cursor:text}sd-chip .sd-chip--disabled{cursor:not-allowed;opacity:0.6}sd-chip .sd-chip__label{display:inline-flex;align-items:center;min-width:0;overflow:hidden;text-overflow:ellipsis}sd-chip .sd-chip__input{display:inline-block;min-width:1ch;outline:none;background:transparent;color:inherit;font:inherit;white-space:nowrap;cursor:text}sd-chip .sd-chip__input:empty::before{content:attr(data-placeholder);color:inherit;opacity:0.6;pointer-events:none}sd-chip .sd-chip__remove{flex-shrink:0}"}},[512,"sd-chip",{name:[1],value:[1025],error:[1028],disabled:[4],editable:[4],placeholder:[1],rules:[16],internalValue:[32],isEditing:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdResetValidation:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}]}]);function m(){"undefined"!=typeof customElements&&["sd-chip","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-chip":customElements.get(h(t))||customElements.define(h(t),f);break;case"sd-ghost-button":customElements.get(h(t))||n();break;case"sd-icon":customElements.get(h(t))||o();break;case"sd-tag":customElements.get(h(t))||d()}}))}export{u as C,f as S,p as a,l as b,m as d}
1
+ import{p as t,H as i,c as s,h as e,t as h}from"./p-Bg9XySrz.js";import{d as n}from"./p-DTFXzlvq.js";import{d as o}from"./p-ClKABgST.js";import{d}from"./p-BMIgVp9-.js";var a={default:{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",fontSize:"12",fontWeight:"500",lineHeight:"20"},focus:{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",fontSize:"12",fontWeight:"400",lineHeight:"20"}},r={default:"#F6F6F6",error:"#FCEFEF"},c={default:"#555555",error:"#E30000",focus:"#222222"};const l={height:`${"24"}px`,paddingX:`${"8"}px`,gap:`${"4"}px`,radius:`${"9999"}px`,borderWidth:`${{width:"1"}.width}px`},p={bg:{default:r.default,error:r.error},content:{default:c.default,error:c.error,focus:c.focus}},u={default:{fontFamily:a.default.fontFamily,fontSize:`${a.default.fontSize}px`,fontWeight:a.default.fontWeight,lineHeight:`${a.default.lineHeight}px`},focus:{fontFamily:a.focus.fontFamily,fontSize:`${a.focus.fontSize}px`,fontWeight:a.focus.fontWeight,lineHeight:`${a.focus.lineHeight}px`}},f=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.update=s(this,"sdUpdate",7),this.delete=s(this,"sdRemove",7),this.focus=s(this,"sdFocus",7),this.blur=s(this,"sdBlur",7)}get el(){return this}name="";value="";error=!1;disabled=!1;editable=!0;placeholder="";rules=[];internalValue="";isEditing=!1;update;delete;focus;blur;inputEl;draftValue="";shouldInitInput=!1;valueChanged(t){const i=t??"",s=this.isEditing;this.internalValue=i,this.draftValue=i,s&&(this.isEditing=!1,this.shouldInitInput=!1,this.inputEl?.blur(),this.blur.emit())}componentWillLoad(){this.internalValue=this.value??""}componentDidLoad(){this.registerToForm()}disconnectedCallback(){this.unregisterFromForm()}async sdValidate(){if(!this.rules||0===this.rules.length)return this.error=!1,!0;for(const t of this.rules)if(!0!==t(this.internalValue??""))return this.error=!0,!1;return this.error=!1,!0}async sdReset(){this.internalValue="",this.value="",this.error=!1,this.draftValue="",this.isEditing=!1,this.shouldInitInput=!1}async sdResetValidate(){this.error=!1}async sdResetValidation(){this.error=!1}async sdFocus(){this.disabled||this.enterEditMode()}async sdGetNativeElement(){return this.inputEl??null}get isEditable(){return!1!==this.editable}enterEditMode=()=>{this.disabled||this.isEditing||!this.isEditable||(this.draftValue=this.internalValue,this.shouldInitInput=!0,this.isEditing=!0,this.focus.emit())};commitEdit=async()=>{if(!this.isEditing)return;const t=(this.inputEl?.textContent??this.draftValue).trim(),i=t!==this.draftValue;this.internalValue=t,this.isEditing=!1,this.shouldInitInput=!1,this.value=t,i&&this.update.emit(t),await this.sdValidate(),this.blur.emit()};cancelEdit=()=>{this.isEditing&&(this.internalValue=this.draftValue,this.isEditing=!1,this.shouldInitInput=!1,this.blur.emit())};handleChipClick=()=>{this.disabled||this.isEditing||!this.isEditable||this.enterEditMode()};handleChipKeyDown=t=>{this.disabled||this.isEditing||!this.isEditable||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.enterEditMode())};handleInputChange=t=>{this.internalValue=t.target.textContent??""};handleInputKeyDown=t=>{"Enter"===t.key?(t.preventDefault(),t.stopPropagation(),this.commitEdit()):"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.cancelEdit())};handleInputBlur=()=>{this.commitEdit()};handlePaste=t=>{t.preventDefault();const i=t.clipboardData?.getData("text/plain")??"";document.execCommand("insertText",!1,i)};handleRemoveClick=t=>{t.stopPropagation(),this.disabled||this.delete.emit()};syncInputValue(t){if(!this.inputEl)return;this.inputEl.textContent=t;const i=document.createRange();i.selectNodeContents(this.inputEl),i.collapse(!1);const s=window.getSelection();s?.removeAllRanges(),s?.addRange(i)}registerToForm(){const t=this.el.closest("sd-form");t&&"function"==typeof t.componentOnReady&&t.componentOnReady().then((t=>{t.sdRegisterField(this)}))}unregisterFromForm(){if(""===this.name)return;const t=this.el.closest("sd-form");t?.componentOnReady().then((t=>{t.sdUnregisterField(this)}))}componentDidUpdate(){this.isEditing&&this.inputEl&&this.shouldInitInput&&(this.inputEl.focus(),this.syncInputValue(this.internalValue),this.shouldInitInput=!1)}resolveState(){return this.isEditing?"focus":this.error?"error":"default"}render(){const t=this.resolveState(),i=u.default,s={"--sd-chip-height":l.height,"--sd-chip-padding-x":l.paddingX,"--sd-chip-gap":l.gap,"--sd-chip-radius":l.radius,"--sd-chip-border-width":l.borderWidth,"--sd-chip-bg":"error"===t?p.bg.error:p.bg.default,"--sd-chip-content":"error"===t?p.content.error:p.content.default,"--sd-chip-border-color":"transparent","--sd-chip-font-family":i.fontFamily,"--sd-chip-font-size":i.fontSize,"--sd-chip-font-weight":i.fontWeight,"--sd-chip-line-height":i.lineHeight};return e("span",{key:"26f863e035272df44fec64b16ebe6c17230d3452",class:{"sd-chip":!0,[`sd-chip--${t}`]:!0,"sd-chip--disabled":this.disabled,"sd-chip--editable":!this.disabled&&this.isEditable},role:this.disabled||!this.isEditable?void 0:"button",tabIndex:this.disabled||this.isEditing||!this.isEditable?-1:0,"aria-disabled":this.disabled?"true":void 0,style:s,onClick:this.handleChipClick,onKeyDown:this.handleChipKeyDown},this.isEditing?e("span",{key:"chip-input",ref:t=>this.inputEl=t,class:"sd-chip__input",role:"textbox",tabindex:this.disabled?-1:0,contentEditable:!this.disabled,"data-placeholder":this.placeholder,spellcheck:!1,onInput:this.handleInputChange,onKeyDown:this.handleInputKeyDown,onBlur:this.handleInputBlur,onPaste:this.handlePaste,onClick:t=>t.stopPropagation()}):[e("span",{key:"chip-label",class:"sd-chip__label"},this.internalValue),!this.disabled&&e("sd-ghost-button",{key:"chip-remove",class:"sd-chip__remove",icon:"close",size:"xxs",ariaLabel:"remove",onClick:this.handleRemoveClick})])}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return"sd-chip{display:inline-flex;width:fit-content;max-width:100%;height:fit-content}sd-chip .sd-chip{display:inline-flex;align-items:center;justify-content:center;gap:var(--sd-chip-gap);max-width:100%;height:var(--sd-chip-height);padding:0 var(--sd-chip-padding-x);border-radius:var(--sd-chip-radius);background:var(--sd-chip-bg);color:var(--sd-chip-content);border:var(--sd-chip-border-width) solid var(--sd-chip-border-color);font-family:var(--sd-chip-font-family);font-size:var(--sd-chip-font-size);font-weight:var(--sd-chip-font-weight);line-height:var(--sd-chip-line-height);box-sizing:border-box;white-space:nowrap;overflow:hidden;-webkit-user-select:none;user-select:none}sd-chip .sd-chip--editable:not(.sd-chip--focus){cursor:text}sd-chip .sd-chip--disabled{cursor:not-allowed;opacity:0.6}sd-chip .sd-chip__label{display:inline-flex;align-items:center;min-width:0;overflow:hidden;text-overflow:ellipsis}sd-chip .sd-chip__input{display:inline-block;min-width:1ch;outline:none;background:transparent;color:inherit;font:inherit;white-space:nowrap;cursor:text}sd-chip .sd-chip__input:empty::before{content:attr(data-placeholder);color:inherit;opacity:0.6;pointer-events:none}sd-chip .sd-chip__remove{flex-shrink:0}"}},[512,"sd-chip",{name:[1],value:[1025],error:[1028],disabled:[4],editable:[4],placeholder:[1],rules:[16],internalValue:[32],isEditing:[32],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdResetValidation:[64],sdFocus:[64],sdGetNativeElement:[64]},void 0,{value:[{valueChanged:0}]}]);function m(){"undefined"!=typeof customElements&&["sd-chip","sd-ghost-button","sd-icon","sd-tag"].forEach((t=>{switch(t){case"sd-chip":customElements.get(h(t))||customElements.define(h(t),f);break;case"sd-ghost-button":customElements.get(h(t))||n();break;case"sd-icon":customElements.get(h(t))||o();break;case"sd-tag":customElements.get(h(t))||d()}}))}export{u as C,f as S,p as a,l as b,m as d}
@@ -1 +1 @@
1
- import{p as t,H as s,c as i,h as e,t as n}from"./p-Bg9XySrz.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-e0ABNkP6.js";import{d}from"./p-iGvyLmbb.js";import{d as l}from"./p-vS0t7bWk.js";import{d as r}from"./p-DknZgTo9.js";import{d as u}from"./p-B73U-Zw2.js";import{d as h}from"./p-Cftyepf_.js";import{d as p}from"./p-CLEAGFjW.js";import{d as c}from"./p-BvAJ_toQ.js";const f=a.textinput.sm,b=a.textinput.md,m={sm:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:b.height,paddingX:b.paddingX,gap:b.gap,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g={text:a.textinput.text,icon:a.textinput.icon},_=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return this}value=null;type="text";size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;autocomplete="";maxlength;minlength;inputmode;enterkeyhint;spellcheck=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=o();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,s)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(s)):this.focus?.emit(s)};render(){const t=m[this.size]??m.sm;return e("sd-field",{key:"fce402fae267b5700501e44935f23bebc28efb62",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,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${t.fontSize}px`,"--sd-input-line-height":`${t.lineHeight}px`,"--sd-input-font-weight":t.fontWeight,"--sd-input-padding-x":`${t.paddingX}px`,"--sd-input-gap":`${t.gap}px`,"--sd-input-text-color":g.text.default,"--sd-input-placeholder-color":g.text.placeholder,"--sd-input-disabled-color":g.text.disabled,"--sd-input-icon-color":g.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"f7d8f95cf5ee38a7aa2e44940ba39b9eb001064c",class:"sd-input__content"},e("slot",{key:"23f1f770a268a0798293420ce0df9e5cc94e07b2",name:"prefix"}),e("input",{key:"b8c041cc4a8761cf1cf93a8d1af139cd7720d2d8",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type??"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),e("slot",{key:"5a288d50726b21c156da480937b9759e6c76d33a",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&!this.readonly&&e("sd-ghost-button",{key:"b5315624a6fd5fdcb70526b1abea4fbac83641c1",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||this.readonly||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"5ae70d65c531db0bc57d17f85c328a275f7aab2b",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled||this.readonly,class:"sd-input__password-icon",onClick:()=>{this.disabled||this.readonly||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],autocomplete:[1],maxlength:[2],minlength:[2],inputmode:[1],enterkeyhint:[1],spellcheck:[4],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],name:[1],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function v(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),_);break;case"sd-button":customElements.get(n(t))||d();break;case"sd-field":customElements.get(n(t))||l();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||u();break;case"sd-icon":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||p();break;case"sd-tooltip":customElements.get(n(t))||c()}}))}export{_ as S,v as d}
1
+ import{p as t,H as s,c as i,h as e,t as n}from"./p-Bg9XySrz.js";import{n as o}from"./p-CCwNgVmC.js";import{i as a}from"./p-e0ABNkP6.js";import{d as l}from"./p-DDR0VcRU.js";import{d}from"./p-BX5uKVOt.js";import{d as r}from"./p-BLNc_TL-.js";import{d as u}from"./p-DTFXzlvq.js";import{d as h}from"./p-ClKABgST.js";import{d as p}from"./p-BMIgVp9-.js";import{d as c}from"./p-Cl5io5TH.js";const f=a.textinput.sm,b=a.textinput.md,m={sm:{height:f.height,paddingX:f.paddingX,gap:f.gap,radius:f.radius,fontSize:f.typography.fontSize,lineHeight:f.typography.lineHeight,fontWeight:f.typography.fontWeight},md:{height:b.height,paddingX:b.paddingX,gap:b.gap,radius:b.radius,fontSize:b.typography.fontSize,lineHeight:b.typography.lineHeight,fontWeight:b.typography.fontWeight}},g={text:a.textinput.text,icon:a.textinput.icon},_=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.input=i(this,"sdUpdate",7),this.focus=i(this,"sdFocus",7),this.blur=i(this,"sdBlur",7)}get host(){return this}value=null;type="text";size="sm";addonLabel="";addonAlign="start";placeholder="입력해 주세요.";disabled=!1;clearable=!1;width="";rules=[];autoFocus=!1;autocomplete="";maxlength;minlength;inputmode;enterkeyhint;spellcheck=!1;status;hint="";errorMessage="";inputClass="";readonly=!1;error=!1;focused=!1;hovered=!1;label="";labelWidth="";icon=void 0;labelTooltip="";labelTooltipProps=null;inputStyle={};internalValue=null;passwordVisible=!1;nativeEl=void 0;formField;name=o();input;focus;blur;valueChanged(t){this.internalValue=t}internalValueChanged(t){t!==this.value&&(this.value=t,this.input?.emit(this.value))}async sdGetNativeElement(){return this.nativeEl||null}async sdValidate(){this.formField?.sdValidate()}async sdReset(){this.formField?.sdReset()}async sdResetValidate(){this.formField?.sdResetValidation()}async sdFocus(){this.formField?.sdFocus()}componentWillLoad(){null!=this.value&&""!==this.value&&(this.internalValue=this.value)}componentDidLoad(){this.autoFocus&&this.nativeEl?.focus()}handleInput=t=>{this.internalValue=t.target.value};handleFocus=async(t,s)=>{this.focused="focus"===t,"blur"===t?(this.rules&&this.rules.length>0&&await(this.formField?.sdValidate()),this.blur?.emit(s)):this.focus?.emit(s)};render(){const t=m[this.size]??m.sm;return e("sd-field",{key:"64e7a3ba5e223341336248ba31e621b4416987fd",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,readonly:this.readonly,focused:this.focused,hovered:this.hovered,status:this.status,size:this.size,icon:this.icon,labelTooltip:this.labelTooltip,labelTooltipProps:this.labelTooltipProps,ref:t=>this.formField=t,onMouseEnter:()=>this.hovered=!0,onMouseLeave:()=>this.hovered=!1,style:{"--sd-input-font-size":`${t.fontSize}px`,"--sd-input-line-height":`${t.lineHeight}px`,"--sd-input-font-weight":t.fontWeight,"--sd-input-padding-x":`${t.paddingX}px`,"--sd-input-gap":`${t.gap}px`,"--sd-input-text-color":g.text.default,"--sd-input-placeholder-color":g.text.placeholder,"--sd-input-disabled-color":g.text.disabled,"--sd-input-icon-color":g.icon.default,"--sd-system-size-field-sm-height":`${t.height}px`,"--sd-system-radius-field-sm":`${t.radius}px`}},e("label",{key:"b66e286c35cc14c1eb02badcaaff24b38ff0a7b3",class:"sd-input__content"},e("slot",{key:"dc8b900eb2b38c18b85663bc930e810be77bdbd7",name:"prefix"}),e("input",{key:"36d35464338838aaaeff6f728020241d33a493ec",name:this.name,ref:t=>this.nativeEl=t,class:`sd-input__native ${this.inputClass}`,type:"password"===this.type&&this.passwordVisible?"text":this.type??"text",value:this.internalValue||"",placeholder:this.placeholder??"입력해 주세요.",disabled:this.disabled,readonly:this.readonly,autofocus:this.autoFocus,autocomplete:this.autocomplete||void 0,maxlength:this.maxlength,minlength:this.minlength,inputmode:this.inputmode,enterkeyhint:this.enterkeyhint,spellcheck:this.spellcheck,onInput:this.handleInput,onFocus:t=>this.handleFocus("focus",t),onBlur:t=>this.handleFocus("blur",t),style:this.inputStyle}),e("slot",{key:"4f30d4a59794c0692f367d41af4311e191c5427b",name:"suffix"}),this.clearable&&this.internalValue&&!this.disabled&&!this.readonly&&e("sd-ghost-button",{key:"247da41512f20d8e562f345b08bd5bc13486734b",icon:"close",ariaLabel:"clear",size:"xxs",disabled:this.disabled,class:"sd-input__clear-icon",onClick:async()=>{this.disabled||this.readonly||(this.internalValue="",await(this.formField?.sdValidate()))}}),"password"===this.type&&e("sd-ghost-button",{key:"70c596ef0072bf369bd59e2c58d0a6f8c6fd1b11",icon:this.passwordVisible?"visibilityOn":"visibilityOff",ariaLabel:"visibility",size:"xxs",disabled:this.disabled||this.readonly,class:"sd-input__password-icon",onClick:()=>{this.disabled||this.readonly||(this.passwordVisible=!this.passwordVisible)}})))}static get watchers(){return{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}}static get style(){return"sd-icon{display:inline-block;line-height:0}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{-webkit-text-fill-color:#000;-webkit-box-shadow:0 0 0px 1000px #fff inset;box-shadow:0 0 0px 1000px #fff inset;transition:background-color 5000s ease-in-out 0s}sd-input{display:inline-flex}sd-input .sd-input__content{width:100%;height:100%;display:flex;flex-flow:row nowrap;align-items:center;color:var(--sd-input-text-color);font-size:var(--sd-input-font-size);line-height:var(--sd-input-line-height);font-weight:var(--sd-input-font-weight);padding:0 var(--sd-input-padding-x);gap:var(--sd-input-gap)}sd-input .sd-input__content .sd-input__native{width:100%;height:100%;border:none;outline:none;background:transparent;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit}sd-input .sd-input__content .sd-input__native[disabled]{cursor:not-allowed;color:var(--sd-input-disabled-color)}sd-input .sd-input__content .sd-input__native[readonly]{color:var(--sd-system-color-field-text-read-only)}sd-input .sd-input__content .sd-input__native::placeholder{color:var(--sd-input-placeholder-color)}sd-input .sd-input__content .sd-input__clear-icon,sd-input .sd-input__content .sd-input__password-icon{flex-shrink:0}sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[disabled]~.sd-input__password-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__clear-icon,sd-input .sd-input__content .sd-input__native[readonly]~.sd-input__password-icon{cursor:not-allowed;pointer-events:none}"}},[772,"sd-input",{value:[1032],type:[1],size:[1],addonLabel:[1,"addon-label"],addonAlign:[1,"addon-align"],placeholder:[1],disabled:[4],clearable:[4],width:[8],rules:[16],autoFocus:[4,"auto-focus"],autocomplete:[1],maxlength:[2],minlength:[2],inputmode:[1],enterkeyhint:[1],spellcheck:[4],status:[1],hint:[1],errorMessage:[1,"error-message"],inputClass:[1,"input-class"],readonly:[4],error:[1028],focused:[1028],hovered:[1028],label:[1],labelWidth:[8,"label-width"],icon:[16],labelTooltip:[1,"label-tooltip"],labelTooltipProps:[16],inputStyle:[16],name:[1],internalValue:[32],passwordVisible:[32],sdGetNativeElement:[64],sdValidate:[64],sdReset:[64],sdResetValidate:[64],sdFocus:[64]},void 0,{value:[{valueChanged:0}],internalValue:[{internalValueChanged:0}]}]);function v(){"undefined"!=typeof customElements&&["sd-input","sd-button","sd-field","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-input":customElements.get(n(t))||customElements.define(n(t),_);break;case"sd-button":customElements.get(n(t))||l();break;case"sd-field":customElements.get(n(t))||d();break;case"sd-floating-portal":customElements.get(n(t))||r();break;case"sd-ghost-button":customElements.get(n(t))||u();break;case"sd-icon":customElements.get(n(t))||h();break;case"sd-tag":customElements.get(n(t))||p();break;case"sd-tooltip":customElements.get(n(t))||c()}}))}export{_ as S,v as d}
@@ -1 +1 @@
1
- import{p as e,H as a,c as r,h as n,F as d,t}from"./p-Bg9XySrz.js";import{u as i,t as s,W as c,C as l}from"./p-BysikR_g.js";import{d as g}from"./p-laVsm9VM.js";import{d as o}from"./p-B73U-Zw2.js";import{d as h}from"./p-Cftyepf_.js";import{d as p}from"./p-CLEAGFjW.js";const k=(e,a)=>{const[r,n,d]=e.split("-").map(Number),t=new Date(r,n-1,d);return t.setDate(t.getDate()+a),`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`},_={bg:g.datepicker.calendar.range.bg,height:g.datepicker.calendar.range.height,panelGap:g.datepicker.calendar.range.panelGap,divider:g.datepicker.calendar.range.divider},u=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.select=r(this,"sdSelect",7),this.viewChange=r(this,"sdViewChange",7)}value=null;selectable;maxRange;currentYear;currentMonth;pendingStart="";hoverDate="";displayValue=null;select;viewChange;dateUtil=i();componentWillLoad(){this.syncFromValue()}handleValueChange(){this.syncFromValue()}syncFromValue(){const e=this.value?.[0]||s,[a,r]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=r,this.pendingStart="",this.hoverDate="",this.displayValue=this.value?[this.value[0],this.value[1]]:null}get rightYear(){return 12===this.currentMonth?this.currentYear+1:this.currentYear}get rightMonth(){return 12===this.currentMonth?1:this.currentMonth+1}formatDate(e,a,r){return`${e}-${String(a).padStart(2,"0")}-${String(r).padStart(2,"0")}`}buildCells(e,a){const r=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),d=1===a?12:a-1,t=1===a?e-1:e,i=new Date(t,d,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,l=[];for(let e=r-1;e>=0;e--){const a=i-e;l.push({date:this.formatDate(t,d,a),day:a,inCurrentMonth:!1})}for(let r=1;r<=n;r++)l.push({date:this.formatDate(e,a,r),day:r,inCurrentMonth:!0});const g=(7-l.length%7)%7;for(let e=1;e<=g;e++)l.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return l}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:r}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=r,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:r}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=r,this.emitViewChange()};goToday=e=>{e.stopPropagation();const[a,r]=s.split("-").map(Number);this.currentYear===a&&this.currentMonth===r||(this.currentYear=a,this.currentMonth=r,this.emitViewChange())};isDisabled(e){if(this.selectable){const[a,r]=this.selectable;if(null!=a&&""!==a&&e<a)return!0;if(null!=r&&""!==r&&e>r)return!0}if(null!=this.maxRange&&this.maxRange>0&&""!==this.pendingStart){const a=k(this.pendingStart,-this.maxRange),r=k(this.pendingStart,this.maxRange);if(e<a||e>r)return!0}return!1}handleDayClick(e){if(!e.inCurrentMonth)return;if(this.isDisabled(e.date))return;if(""===this.pendingStart||null!=this.displayValue&&""!==this.displayValue[0]&&""!==this.displayValue[1]||e.date<this.pendingStart)return this.pendingStart=e.date,this.displayValue=null,void(this.hoverDate="");const a=[this.pendingStart,e.date];this.pendingStart="",this.hoverDate="",this.displayValue=a,this.select.emit(a)}handleDayHover(e){e.inCurrentMonth&&""!==this.pendingStart&&(this.hoverDate=e.date)}getRangeState(e,a){if(!a)return{inRange:!1,isRangeStart:!1,isRangeEnd:!1,isSelectedEdge:!1};if(""!==this.pendingStart){const a=e===this.pendingStart,r=""!==this.hoverDate&&this.hoverDate>=this.pendingStart?this.hoverDate:"";return{inRange:""!==r&&e>this.pendingStart&&e<=r,isRangeStart:a,isRangeEnd:""!==r&&e===r,isSelectedEdge:a}}if(null!=this.displayValue&&""!==this.displayValue[0]&&""!==this.displayValue[1]){const[a,r]=this.displayValue,n=e===a,d=e===r;return{inRange:e>a&&e<r,isRangeStart:n,isRangeEnd:d,isSelectedEdge:n||d}}return{inRange:!1,isRangeStart:!1,isRangeEnd:!1,isSelectedEdge:!1}}renderHeader(e,a,r){const d=`${e}.${String(a).padStart(2,"0")}`;return n("div",{class:"sd-date-range-picker-calendar__header"},n("div",{class:"sd-date-range-picker-calendar__nav-group sd-date-range-picker-calendar__nav-group-month"},n("sd-ghost-button",{class:{"sd-date-range-picker-calendar__nav-placeholder":!r},ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{class:"sd-date-range-picker-calendar__label sd-date-range-picker-calendar__label-month"},d),n("sd-ghost-button",{class:{"sd-date-range-picker-calendar__nav-placeholder":r},ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth})))}renderYearNav(){return n("div",{class:"sd-date-range-picker-calendar__top-bar"},n("div",{class:"sd-date-range-picker-calendar__year-nav"},n("sd-ghost-button",{ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{class:"sd-date-range-picker-calendar__label"},this.currentYear),n("sd-ghost-button",{ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("button",{type:"button",class:"sd-date-range-picker-calendar__today-button",onClick:this.goToday},"오늘"))}renderPanel(e,a,r){const d=this.buildCells(e,a);return n("div",{class:"sd-date-range-picker-calendar__panel"},this.renderHeader(e,a,r),n("div",{class:"sd-date-range-picker-calendar__week"},c.map((e=>n("span",{key:e,class:"sd-date-range-picker-calendar__week-cell"},e)))),n("div",{class:"sd-date-range-picker-calendar__grid"},d.map((e=>{const{inRange:a,isRangeStart:r,isRangeEnd:d,isSelectedEdge:t}=this.getRangeState(e.date,e.inCurrentMonth),i=e.inCurrentMonth&&s===e.date,c=e.inCurrentMonth&&this.isDisabled(e.date);return n("button",{type:"button",key:e.date,class:{"sd-date-range-picker-calendar__day":!0,"sd-date-range-picker-calendar__day--empty":!e.inCurrentMonth,"sd-date-range-picker-calendar__day--today":i,"sd-date-range-picker-calendar__day--in-range":a,"sd-date-range-picker-calendar__day--range-start":r,"sd-date-range-picker-calendar__day--range-end":d,"sd-date-range-picker-calendar__day--selected":t,"sd-date-range-picker-calendar__day--disabled":c},disabled:!e.inCurrentMonth||c,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>this.handleDayClick(e),onMouseEnter:()=>this.handleDayHover(e)},n("span",{class:"sd-date-range-picker-calendar__day-circle"},e.inCurrentMonth?e.day:""))}))))}render(){return n(d,{key:"91ba95cf0786d59363ac6b72e9c8f91d1802feee"},n("div",{key:"98f66737a15e5c3129dd20f674736115a4fad42e",class:"sd-date-range-picker-calendar",style:{"--calendar-bg":l.bg,"--calendar-padding":`${l.paddingXY}px`,"--calendar-gap":`${l.gap}px`,"--calendar-radius":`${l.radius}px`,"--calendar-header-gap":`${l.header.gap}px`,"--calendar-header-divider":l.header.divider,"--calendar-header-font-size":`${l.header.fontSize}px`,"--calendar-header-line-height":`${l.header.lineHeight}px`,"--calendar-header-font-weight":l.header.fontWeight,"--calendar-week-font-size":`${l.week.fontSize}px`,"--calendar-week-line-height":`${l.week.lineHeight}px`,"--calendar-week-font-weight":l.week.fontWeight,"--calendar-week-color":l.week.color,"--calendar-grid-row-gap":`${l.grid.rowGap}px`,"--calendar-day-size":`${l.day.size}px`,"--calendar-day-circle-size":`${l.day.circleSize}px`,"--calendar-day-circle-radius":`${l.day.circleRadius}px`,"--calendar-day-text":l.day.defaultText,"--calendar-day-hover-text":l.day.hoverText,"--calendar-day-hover-border":l.day.hoverBorder,"--calendar-day-select-bg":l.day.selectBg,"--calendar-day-select-text":l.day.selectText,"--calendar-day-disabled-text":l.day.disabledText,"--calendar-day-font-size":`${l.day.fontSize}px`,"--calendar-day-line-height":`${l.day.lineHeight}px`,"--calendar-day-font-weight":l.day.fontWeight,"--range-bg":_.bg,"--range-height":`${_.height}px`,"--range-panel-gap":`${_.panelGap}px`,"--range-divider":_.divider}},this.renderYearNav(),n("div",{key:"d9f326b485864484ed786cb172d3bd33136987ea",class:"sd-date-range-picker-calendar__panels"},this.renderPanel(this.currentYear,this.currentMonth,!0),n("span",{key:"df7d835ac0da6788f08c7963ed04ed98b7fd6091",class:"sd-date-range-picker-calendar__divider","aria-hidden":"true"}),this.renderPanel(this.rightYear,this.rightMonth,!1))))}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-date-range-picker-calendar{display:block}sd-date-range-picker-calendar .sd-date-range-picker-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);height:364px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);user-select:none}sd-date-range-picker-calendar .sd-date-range-picker-calendar__top-bar{position:relative;display:flex;align-items:center;justify-content:center}sd-date-range-picker-calendar .sd-date-range-picker-calendar__year-nav{display:flex;align-items:center;justify-content:center;gap:var(--calendar-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__today-button{position:absolute;right:0;background:transparent;cursor:pointer;font-size:var(--calendar-week-font-size);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text);min-width:37px;height:24px;line-height:24px;text-align:center}sd-date-range-picker-calendar .sd-date-range-picker-calendar__today-button:hover{text-decoration:underline}sd-date-range-picker-calendar .sd-date-range-picker-calendar__panels{display:flex;flex-direction:row;gap:var(--range-panel-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__divider{flex-shrink:0;width:1px;background:var(--range-divider)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__panel{display:flex;flex-direction:column;gap:var(--calendar-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__header{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__nav-group-month{display:flex;width:100%;align-items:center;gap:var(--calendar-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-date-range-picker-calendar .sd-date-range-picker-calendar__label-month{flex:1}sd-date-range-picker-calendar .sd-date-range-picker-calendar__nav-placeholder{visibility:hidden;pointer-events:none}sd-date-range-picker-calendar .sd-date-range-picker-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-date-range-picker-calendar .sd-date-range-picker-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-size);height:var(--range-height);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day-circle{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day:not(:disabled):hover .sd-date-range-picker-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--today .sd-date-range-picker-calendar__day-circle{font-weight:700}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--in-range{background:var(--range-bg)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-start{background:linear-gradient(to right, transparent 50%, var(--range-bg) 50%)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-end{background:var(--range-bg)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-startsd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-end{background:transparent}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--selected .sd-date-range-picker-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--selected:not(:disabled):hover .sd-date-range-picker-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--disabled{color:var(--calendar-day-disabled-text);cursor:not-allowed}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--disabled:not(.sd-date-range-picker-calendar__day--in-range):not(.sd-date-range-picker-calendar__day--range-start):not(.sd-date-range-picker-calendar__day--range-end){background:none}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--empty{visibility:hidden;pointer-events:none;background:transparent}"}},[512,"sd-date-range-picker-calendar",{value:[16],selectable:[16],maxRange:[2,"max-range"],currentYear:[32],currentMonth:[32],pendingStart:[32],hoverDate:[32],displayValue:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-range-picker-calendar","sd-ghost-button","sd-icon","sd-tag"].forEach((e=>{switch(e){case"sd-date-range-picker-calendar":customElements.get(t(e))||customElements.define(t(e),u);break;case"sd-ghost-button":customElements.get(t(e))||o();break;case"sd-icon":customElements.get(t(e))||h();break;case"sd-tag":customElements.get(t(e))||p()}}))}export{u as S,y as d}
1
+ import{p as e,H as a,c as r,h as n,F as d,t}from"./p-Bg9XySrz.js";import{u as i,t as s,W as c,C as l}from"./p-BysikR_g.js";import{d as g}from"./p-laVsm9VM.js";import{d as o}from"./p-DTFXzlvq.js";import{d as h}from"./p-ClKABgST.js";import{d as p}from"./p-BMIgVp9-.js";const k=(e,a)=>{const[r,n,d]=e.split("-").map(Number),t=new Date(r,n-1,d);return t.setDate(t.getDate()+a),`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`},_={bg:g.datepicker.calendar.range.bg,height:g.datepicker.calendar.range.height,panelGap:g.datepicker.calendar.range.panelGap,divider:g.datepicker.calendar.range.divider},u=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.select=r(this,"sdSelect",7),this.viewChange=r(this,"sdViewChange",7)}value=null;selectable;maxRange;currentYear;currentMonth;pendingStart="";hoverDate="";displayValue=null;select;viewChange;dateUtil=i();componentWillLoad(){this.syncFromValue()}handleValueChange(){this.syncFromValue()}syncFromValue(){const e=this.value?.[0]||s,[a,r]=e.split("-").map(Number);this.currentYear=a,this.currentMonth=r,this.pendingStart="",this.hoverDate="",this.displayValue=this.value?[this.value[0],this.value[1]]:null}get rightYear(){return 12===this.currentMonth?this.currentYear+1:this.currentYear}get rightMonth(){return 12===this.currentMonth?1:this.currentMonth+1}formatDate(e,a,r){return`${e}-${String(a).padStart(2,"0")}-${String(r).padStart(2,"0")}`}buildCells(e,a){const r=new Date(e,a-1,1).getDay(),n=new Date(e,a,0).getDate(),d=1===a?12:a-1,t=1===a?e-1:e,i=new Date(t,d,0).getDate(),s=12===a?1:a+1,c=12===a?e+1:e,l=[];for(let e=r-1;e>=0;e--){const a=i-e;l.push({date:this.formatDate(t,d,a),day:a,inCurrentMonth:!1})}for(let r=1;r<=n;r++)l.push({date:this.formatDate(e,a,r),day:r,inCurrentMonth:!0});const g=(7-l.length%7)%7;for(let e=1;e<=g;e++)l.push({date:this.formatDate(c,s,e),day:e,inCurrentMonth:!1});return l}emitViewChange(){this.viewChange.emit({year:this.currentYear,month:this.currentMonth})}goPrevYear=e=>{e.stopPropagation(),this.currentYear-=1,this.emitViewChange()};goNextYear=e=>{e.stopPropagation(),this.currentYear+=1,this.emitViewChange()};goPrevMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:r}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"prev");this.currentYear=a,this.currentMonth=r,this.emitViewChange()};goNextMonth=e=>{e.stopPropagation();const{newYear:a,newMonth:r}=this.dateUtil.calculateYearMonth(this.currentYear,this.currentMonth,"next");this.currentYear=a,this.currentMonth=r,this.emitViewChange()};goToday=e=>{e.stopPropagation();const[a,r]=s.split("-").map(Number);this.currentYear===a&&this.currentMonth===r||(this.currentYear=a,this.currentMonth=r,this.emitViewChange())};isDisabled(e){if(this.selectable){const[a,r]=this.selectable;if(null!=a&&""!==a&&e<a)return!0;if(null!=r&&""!==r&&e>r)return!0}if(null!=this.maxRange&&this.maxRange>0&&""!==this.pendingStart){const a=k(this.pendingStart,-this.maxRange),r=k(this.pendingStart,this.maxRange);if(e<a||e>r)return!0}return!1}handleDayClick(e){if(!e.inCurrentMonth)return;if(this.isDisabled(e.date))return;if(""===this.pendingStart||null!=this.displayValue&&""!==this.displayValue[0]&&""!==this.displayValue[1]||e.date<this.pendingStart)return this.pendingStart=e.date,this.displayValue=null,void(this.hoverDate="");const a=[this.pendingStart,e.date];this.pendingStart="",this.hoverDate="",this.displayValue=a,this.select.emit(a)}handleDayHover(e){e.inCurrentMonth&&""!==this.pendingStart&&(this.hoverDate=e.date)}getRangeState(e,a){if(!a)return{inRange:!1,isRangeStart:!1,isRangeEnd:!1,isSelectedEdge:!1};if(""!==this.pendingStart){const a=e===this.pendingStart,r=""!==this.hoverDate&&this.hoverDate>=this.pendingStart?this.hoverDate:"";return{inRange:""!==r&&e>this.pendingStart&&e<=r,isRangeStart:a,isRangeEnd:""!==r&&e===r,isSelectedEdge:a}}if(null!=this.displayValue&&""!==this.displayValue[0]&&""!==this.displayValue[1]){const[a,r]=this.displayValue,n=e===a,d=e===r;return{inRange:e>a&&e<r,isRangeStart:n,isRangeEnd:d,isSelectedEdge:n||d}}return{inRange:!1,isRangeStart:!1,isRangeEnd:!1,isSelectedEdge:!1}}renderHeader(e,a,r){const d=`${e}.${String(a).padStart(2,"0")}`;return n("div",{class:"sd-date-range-picker-calendar__header"},n("div",{class:"sd-date-range-picker-calendar__nav-group sd-date-range-picker-calendar__nav-group-month"},n("sd-ghost-button",{class:{"sd-date-range-picker-calendar__nav-placeholder":!r},ariaLabel:"prevMonth",size:"xxs",icon:"chevronLeft",onClick:this.goPrevMonth}),n("span",{class:"sd-date-range-picker-calendar__label sd-date-range-picker-calendar__label-month"},d),n("sd-ghost-button",{class:{"sd-date-range-picker-calendar__nav-placeholder":r},ariaLabel:"nextMonth",size:"xxs",icon:"chevronRight",onClick:this.goNextMonth})))}renderYearNav(){return n("div",{class:"sd-date-range-picker-calendar__top-bar"},n("div",{class:"sd-date-range-picker-calendar__year-nav"},n("sd-ghost-button",{ariaLabel:"prevYear",size:"xxs",icon:"chevronLeft",onClick:this.goPrevYear}),n("span",{class:"sd-date-range-picker-calendar__label"},this.currentYear),n("sd-ghost-button",{ariaLabel:"nextYear",size:"xxs",icon:"chevronRight",onClick:this.goNextYear})),n("button",{type:"button",class:"sd-date-range-picker-calendar__today-button",onClick:this.goToday},"오늘"))}renderPanel(e,a,r){const d=this.buildCells(e,a);return n("div",{class:"sd-date-range-picker-calendar__panel"},this.renderHeader(e,a,r),n("div",{class:"sd-date-range-picker-calendar__week"},c.map((e=>n("span",{key:e,class:"sd-date-range-picker-calendar__week-cell"},e)))),n("div",{class:"sd-date-range-picker-calendar__grid"},d.map((e=>{const{inRange:a,isRangeStart:r,isRangeEnd:d,isSelectedEdge:t}=this.getRangeState(e.date,e.inCurrentMonth),i=e.inCurrentMonth&&s===e.date,c=e.inCurrentMonth&&this.isDisabled(e.date);return n("button",{type:"button",key:e.date,class:{"sd-date-range-picker-calendar__day":!0,"sd-date-range-picker-calendar__day--empty":!e.inCurrentMonth,"sd-date-range-picker-calendar__day--today":i,"sd-date-range-picker-calendar__day--in-range":a,"sd-date-range-picker-calendar__day--range-start":r,"sd-date-range-picker-calendar__day--range-end":d,"sd-date-range-picker-calendar__day--selected":t,"sd-date-range-picker-calendar__day--disabled":c},disabled:!e.inCurrentMonth||c,tabindex:e.inCurrentMonth?void 0:-1,"aria-hidden":e.inCurrentMonth?void 0:"true",onClick:()=>this.handleDayClick(e),onMouseEnter:()=>this.handleDayHover(e)},n("span",{class:"sd-date-range-picker-calendar__day-circle"},e.inCurrentMonth?e.day:""))}))))}render(){return n(d,{key:"71f25effececd0b83d9b33201230dc615ba87a30"},n("div",{key:"f075474fb0be9f8e8562a013532b3cdbaadee069",class:"sd-date-range-picker-calendar",style:{"--calendar-bg":l.bg,"--calendar-padding":`${l.paddingXY}px`,"--calendar-gap":`${l.gap}px`,"--calendar-radius":`${l.radius}px`,"--calendar-header-gap":`${l.header.gap}px`,"--calendar-header-divider":l.header.divider,"--calendar-header-font-size":`${l.header.fontSize}px`,"--calendar-header-line-height":`${l.header.lineHeight}px`,"--calendar-header-font-weight":l.header.fontWeight,"--calendar-week-font-size":`${l.week.fontSize}px`,"--calendar-week-line-height":`${l.week.lineHeight}px`,"--calendar-week-font-weight":l.week.fontWeight,"--calendar-week-color":l.week.color,"--calendar-grid-row-gap":`${l.grid.rowGap}px`,"--calendar-day-size":`${l.day.size}px`,"--calendar-day-circle-size":`${l.day.circleSize}px`,"--calendar-day-circle-radius":`${l.day.circleRadius}px`,"--calendar-day-text":l.day.defaultText,"--calendar-day-hover-text":l.day.hoverText,"--calendar-day-hover-border":l.day.hoverBorder,"--calendar-day-select-bg":l.day.selectBg,"--calendar-day-select-text":l.day.selectText,"--calendar-day-disabled-text":l.day.disabledText,"--calendar-day-font-size":`${l.day.fontSize}px`,"--calendar-day-line-height":`${l.day.lineHeight}px`,"--calendar-day-font-weight":l.day.fontWeight,"--range-bg":_.bg,"--range-height":`${_.height}px`,"--range-panel-gap":`${_.panelGap}px`,"--range-divider":_.divider}},this.renderYearNav(),n("div",{key:"4dfa1d65b971f7d80f0799482c8ce41522200a94",class:"sd-date-range-picker-calendar__panels"},this.renderPanel(this.currentYear,this.currentMonth,!0),n("span",{key:"20149f97a5115115cc49894383ca7f989ba2b904",class:"sd-date-range-picker-calendar__divider","aria-hidden":"true"}),this.renderPanel(this.rightYear,this.rightMonth,!1))))}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"sd-date-range-picker-calendar{display:block}sd-date-range-picker-calendar .sd-date-range-picker-calendar{display:flex;flex-direction:column;gap:var(--calendar-gap);height:364px;padding:var(--calendar-padding);background:var(--calendar-bg);border-radius:var(--calendar-radius);box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.2);user-select:none}sd-date-range-picker-calendar .sd-date-range-picker-calendar__top-bar{position:relative;display:flex;align-items:center;justify-content:center}sd-date-range-picker-calendar .sd-date-range-picker-calendar__year-nav{display:flex;align-items:center;justify-content:center;gap:var(--calendar-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__today-button{position:absolute;right:0;background:transparent;cursor:pointer;font-size:var(--calendar-week-font-size);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text);min-width:37px;height:24px;line-height:24px;text-align:center}sd-date-range-picker-calendar .sd-date-range-picker-calendar__today-button:hover{text-decoration:underline}sd-date-range-picker-calendar .sd-date-range-picker-calendar__panels{display:flex;flex-direction:row;gap:var(--range-panel-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__divider{flex-shrink:0;width:1px;background:var(--range-divider)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__panel{display:flex;flex-direction:column;gap:var(--calendar-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__header{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;gap:var(--calendar-header-gap);font-size:var(--calendar-header-font-size);line-height:var(--calendar-header-line-height);font-weight:var(--calendar-header-font-weight);color:var(--calendar-day-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__nav-group{display:inline-flex;align-items:center;gap:var(--calendar-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__nav-group-month{display:flex;width:100%;align-items:center;gap:var(--calendar-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__label{display:inline-flex;align-items:center;justify-content:center;min-width:40px;text-align:center}sd-date-range-picker-calendar .sd-date-range-picker-calendar__label-month{flex:1}sd-date-range-picker-calendar .sd-date-range-picker-calendar__nav-placeholder{visibility:hidden;pointer-events:none}sd-date-range-picker-calendar .sd-date-range-picker-calendar__week{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size))}sd-date-range-picker-calendar .sd-date-range-picker-calendar__week-cell{display:inline-flex;align-items:center;justify-content:center;height:20px;font-size:var(--calendar-week-font-size);line-height:var(--calendar-week-line-height);font-weight:var(--calendar-week-font-weight);color:var(--calendar-week-color)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__grid{display:grid;grid-template-columns:repeat(7, var(--calendar-day-size));row-gap:var(--calendar-grid-row-gap)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-size);height:var(--range-height);padding:0;border:none;background:transparent;cursor:pointer;font-size:var(--calendar-day-font-size);line-height:var(--calendar-day-line-height);font-weight:var(--calendar-day-font-weight);color:var(--calendar-day-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day-circle{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:var(--calendar-day-circle-size);height:var(--calendar-day-circle-size);border-radius:calc(var(--calendar-day-circle-radius) * 1px);border:1px solid transparent;box-sizing:border-box}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day:not(:disabled):hover .sd-date-range-picker-calendar__day-circle{border-radius:16px;border:1px solid var(--calendar-day-hover-border)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--today .sd-date-range-picker-calendar__day-circle{font-weight:700}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--in-range{background:var(--range-bg)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-start{background:linear-gradient(to right, transparent 50%, var(--range-bg) 50%)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-end{background:var(--range-bg)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-startsd-date-range-picker-calendar .sd-date-range-picker-calendar__day--range-end{background:transparent}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--selected .sd-date-range-picker-calendar__day-circle{border-radius:16px;background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--selected:not(:disabled):hover .sd-date-range-picker-calendar__day-circle{background:var(--calendar-day-select-bg);color:var(--calendar-day-select-text)}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--disabled{color:var(--calendar-day-disabled-text);cursor:not-allowed}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--disabled:not(.sd-date-range-picker-calendar__day--in-range):not(.sd-date-range-picker-calendar__day--range-start):not(.sd-date-range-picker-calendar__day--range-end){background:none}sd-date-range-picker-calendar .sd-date-range-picker-calendar__day--empty{visibility:hidden;pointer-events:none;background:transparent}"}},[512,"sd-date-range-picker-calendar",{value:[16],selectable:[16],maxRange:[2,"max-range"],currentYear:[32],currentMonth:[32],pendingStart:[32],hoverDate:[32],displayValue:[32]},void 0,{value:[{handleValueChange:0}]}]);function y(){"undefined"!=typeof customElements&&["sd-date-range-picker-calendar","sd-ghost-button","sd-icon","sd-tag"].forEach((e=>{switch(e){case"sd-date-range-picker-calendar":customElements.get(t(e))||customElements.define(t(e),u);break;case"sd-ghost-button":customElements.get(t(e))||o();break;case"sd-icon":customElements.get(t(e))||h();break;case"sd-tag":customElements.get(t(e))||p()}}))}export{u as S,y as d}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as i,t as l}from"./p-Bg9XySrz.js";import{L as c,i as d,a as o,b as r}from"./p-C5wgHjtx.js";import{s as m}from"./p-BE4tnQ2Z.js";import{d as a}from"./p-CHjF0mwj.js";import{d as h}from"./p-Cftyepf_.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.listItemClick=s(this,"sdListItemClick",7)}option;depth=1;isSelected=!1;isFocused=!1;useCheckbox=!1;countInfo;listItemClick;get isGroup(){return!!this.option.children}get isSelectable(){return!this.isGroup||this.useCheckbox}get depthKey(){return this.depth<=1?"depth1":2===this.depth?"depth2":"depth3"}get paddingLeft(){return`${c.paddingLeft[this.depthKey]}px`}handleClick=t=>{t.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};handleCheckboxClick=t=>{t.stopPropagation()};handleCheckboxUpdate=t=>{t.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};render(){const t=this.isGroup,e=t&&1===this.depth,s=t&&2===this.depth,l={"--list-item-padding-y":`${c.paddingY}px`,"--list-item-padding-left":this.paddingLeft,"--list-item-padding-right":`${c.paddingRight}px`,"--list-item-gap":`${c.gap}px`,"--list-item-font-size":`${r.fontSize}px`,"--list-item-line-height":`${r.lineHeight}px`,"--list-item-font-weight":r.fontWeight,"--list-item-bg":e?o.depth1.bg:s?o.depth2.bg:o.bg.default,"--list-item-bg-hover":o.bg.hover,"--list-item-color":o.content.default,"--list-item-color-hover":o.content.hover,"--list-item-color-disabled":o.content.disabled,"--list-item-color-selected":o.content.selected,"--list-item-font-weight-selected":r.selectedFontWeight};return e&&(l["--list-item-border-top"]=`${o.depth1.borderWidth}px solid ${o.depth1.border}`),i("div",{key:"55ebe094653cb89d5c70916c3e0a2f4ccb5551f8",role:"option",tabindex:-1,"aria-selected":!0===this.isSelected?"true":"false",class:{"sd-select-list-item":!0,"sd-select-list-item--group":t,"sd-select-list-item--depth1-group":e,"sd-select-list-item--depth2-group":s,"sd-select-list-item--selected":!0===this.isSelected,"sd-select-list-item--indeterminate":null===this.isSelected,"sd-select-list-item--focused":this.isFocused,"sd-select-list-item--selectable":this.isSelectable&&!this.option.disabled,"sd-select-list-item--disabled":!!this.option.disabled},style:l,onClick:this.handleClick},this.useCheckbox&&i("sd-checkbox",{key:"f636931bc20264db98e521b11b819610cda764cd",value:null===this.isSelected?null:!!this.isSelected,disabled:this.option.disabled,inverse:this.isFocused&&!1!==this.isSelected,class:"sd-select-list-item__checkbox",onClick:this.handleCheckboxClick,onSdUpdate:this.handleCheckboxUpdate}),d(this.option.label)?i("span",{class:"sd-select-list-item__label",ref:t=>t&&(t.innerHTML=m(this.option.label))}):i("span",{class:"sd-select-list-item__label"},this.option.label),this.countInfo&&i("span",{key:"89750bc08c03915b738da390f4255e7451aa9d6d",class:"sd-select-list-item__count"},"(",this.countInfo.selected,"/",this.countInfo.total,")"))}static get style(){return"sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}"}},[512,"sd-select-list-item",{option:[16],depth:[2],isSelected:[4,"is-selected"],isFocused:[4,"is-focused"],useCheckbox:[4,"use-checkbox"],countInfo:[16]}]);function p(){"undefined"!=typeof customElements&&["sd-select-list-item","sd-checkbox","sd-icon"].forEach((t=>{switch(t){case"sd-select-list-item":customElements.get(l(t))||customElements.define(l(t),n);break;case"sd-checkbox":customElements.get(l(t))||a();break;case"sd-icon":customElements.get(l(t))||h()}}))}export{n as S,p as d}
1
+ import{p as t,H as e,c as s,h as i,t as l}from"./p-Bg9XySrz.js";import{L as c,i as d,a as o,b as r}from"./p-DvvGi4J_.js";import{s as m}from"./p-BE4tnQ2Z.js";import{d as a}from"./p-DbLQoVx6.js";import{d as h}from"./p-ClKABgST.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.listItemClick=s(this,"sdListItemClick",7)}option;depth=1;isSelected=!1;isFocused=!1;useCheckbox=!1;countInfo;listItemClick;get isGroup(){return!!this.option.children}get isSelectable(){return!this.isGroup||this.useCheckbox}get depthKey(){return this.depth<=1?"depth1":2===this.depth?"depth2":"depth3"}get paddingLeft(){return`${c.paddingLeft[this.depthKey]}px`}handleClick=t=>{t.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};handleCheckboxClick=t=>{t.stopPropagation()};handleCheckboxUpdate=t=>{t.stopPropagation(),!this.option.disabled&&this.isSelectable&&this.listItemClick.emit(this.option)};render(){const t=this.isGroup,e=t&&1===this.depth,s=t&&2===this.depth,l={"--list-item-padding-y":`${c.paddingY}px`,"--list-item-padding-left":this.paddingLeft,"--list-item-padding-right":`${c.paddingRight}px`,"--list-item-gap":`${c.gap}px`,"--list-item-font-size":`${r.fontSize}px`,"--list-item-line-height":`${r.lineHeight}px`,"--list-item-font-weight":r.fontWeight,"--list-item-bg":e?o.depth1.bg:s?o.depth2.bg:o.bg.default,"--list-item-bg-hover":o.bg.hover,"--list-item-color":o.content.default,"--list-item-color-hover":o.content.hover,"--list-item-color-disabled":o.content.disabled,"--list-item-color-selected":o.content.selected,"--list-item-font-weight-selected":r.selectedFontWeight};return e&&(l["--list-item-border-top"]=`${o.depth1.borderWidth}px solid ${o.depth1.border}`),i("div",{key:"c964b0cf5b064c74a7e063be21350bca8124d77d",role:"option",tabindex:-1,"aria-selected":!0===this.isSelected?"true":"false",class:{"sd-select-list-item":!0,"sd-select-list-item--group":t,"sd-select-list-item--depth1-group":e,"sd-select-list-item--depth2-group":s,"sd-select-list-item--selected":!0===this.isSelected,"sd-select-list-item--indeterminate":null===this.isSelected,"sd-select-list-item--focused":this.isFocused,"sd-select-list-item--selectable":this.isSelectable&&!this.option.disabled,"sd-select-list-item--disabled":!!this.option.disabled},style:l,onClick:this.handleClick},this.useCheckbox&&i("sd-checkbox",{key:"981e055f47aa512d18d61ae938b41942197f3088",value:null===this.isSelected?null:!!this.isSelected,disabled:this.option.disabled,inverse:this.isFocused&&!1!==this.isSelected,class:"sd-select-list-item__checkbox",onClick:this.handleCheckboxClick,onSdUpdate:this.handleCheckboxUpdate}),d(this.option.label)?i("span",{class:"sd-select-list-item__label",ref:t=>t&&(t.innerHTML=m(this.option.label))}):i("span",{class:"sd-select-list-item__label"},this.option.label),this.countInfo&&i("span",{key:"ac34372d921afcb3eba0a51bed3dd70b4e8f1d0f",class:"sd-select-list-item__count"},"(",this.countInfo.selected,"/",this.countInfo.total,")"))}static get style(){return"sd-select-list-item{display:block}sd-select-list-item .sd-select-list-item{display:flex;align-items:center;gap:var(--list-item-gap);padding:var(--list-item-padding-y) var(--list-item-padding-right) var(--list-item-padding-y) var(--list-item-padding-left);font-size:var(--list-item-font-size);line-height:var(--list-item-line-height);font-weight:var(--list-item-font-weight);background:var(--list-item-bg);color:var(--list-item-color);cursor:default;user-select:none}sd-select-list-item .sd-select-list-item--selectable{cursor:pointer}sd-select-list-item .sd-select-list-item--depth1-group{border-top:var(--list-item-border-top);font-weight:700}sd-select-list-item .sd-select-list-item--depth2-group{font-weight:500}sd-select-list-item .sd-select-list-item--focused.sd-select-list-item--selectable:not(.sd-select-list-item--disabled){background:var(--list-item-bg-hover);color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--selected:not(.sd-select-list-item--group){font-weight:var(--list-item-font-weight-selected);color:var(--list-item-color-selected)}sd-select-list-item .sd-select-list-item--selected.sd-select-list-item--focused{color:var(--list-item-color-hover)}sd-select-list-item .sd-select-list-item--disabled{color:var(--list-item-color-disabled);cursor:not-allowed}sd-select-list-item .sd-select-list-item__label{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}sd-select-list-item .sd-select-list-item__count{flex-shrink:0;font-weight:500;color:var(--list-item-color-disabled)}sd-select-list-item .sd-select-list-item--group.sd-select-list-item--focused .sd-select-list-item__count{color:#ffffff}sd-select-list-item .sd-select-list-item__checkbox{flex-shrink:0}"}},[512,"sd-select-list-item",{option:[16],depth:[2],isSelected:[4,"is-selected"],isFocused:[4,"is-focused"],useCheckbox:[4,"use-checkbox"],countInfo:[16]}]);function p(){"undefined"!=typeof customElements&&["sd-select-list-item","sd-checkbox","sd-icon"].forEach((t=>{switch(t){case"sd-select-list-item":customElements.get(l(t))||customElements.define(l(t),n);break;case"sd-checkbox":customElements.get(l(t))||a();break;case"sd-icon":customElements.get(l(t))||h()}}))}export{n as S,p as d}
@@ -1 +1 @@
1
- import{p as e,H as i,c as t,h as r,t as s}from"./p-Bg9XySrz.js";import{d as g}from"./p-laVsm9VM.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as a}from"./p-Cftyepf_.js";const n=g.datepicker.sm,o=g.datepicker.md,c={sm:{height:n.height,paddingX:n.paddingX,gap:n.gap,iconSize:n.icon,radius:n.radius,fontSize:n.typography.fontSize,lineHeight:n.typography.lineHeight,fontWeight:n.typography.fontWeight},md:{height:o.height,paddingX:o.paddingX,gap:o.gap,iconSize:o.icon,radius:o.radius,fontSize:o.typography.fontSize,lineHeight:o.typography.lineHeight,fontWeight:o.typography.fontWeight}},p={border:g.datepicker.border,bg:g.datepicker.bg,icon:g.datepicker.icon,text:{...g.datepicker.text,hint:d.field.hint.color}},l=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.triggerClick=t(this,"sdTriggerClick",7)}displayText="";placeholder="YYYY-MM-DD";disabled=!1;size="sm";triggerClick;handleClick=()=>{this.disabled||this.triggerClick.emit()};render(){const e=c[this.size]??c.sm,i=""!==this.displayText;return r("div",{key:"87ada0414ffc6404b27cf4a41ba7c9cb9903f498",role:"button",tabindex:this.disabled?-1:0,class:{"sd-date-picker-trigger":!0,"sd-date-picker-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${e.paddingX}px`,"--trigger-gap":`${e.gap}px`,"--trigger-icon-size":`${e.iconSize}px`,"--trigger-font-size":`${e.fontSize}px`,"--trigger-line-height":`${e.lineHeight}px`,"--trigger-font-weight":e.fontWeight,"--trigger-radius":`${e.radius}px`,"--trigger-text-min-width":("md"===this.size?104:80)+"px","--trigger-text-color":this.disabled?p.text.disabled:i?p.text.default:p.text.hint,"--trigger-icon-color":this.disabled?p.icon.disabled:p.icon.default},onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},r("sd-icon",{key:"e8eee3ed97ab7344e7658b7b22bc91f11aa0b068",name:"date",size:Number(e.iconSize),color:"var(--trigger-icon-color)",class:"sd-date-picker-trigger__icon"}),r("span",{key:"ea25a13a72d00ca31fcddaf0183b520175ef7d93",class:"sd-date-picker-trigger__text"},i?this.displayText:this.placeholder))}static get style(){return"sd-date-picker-trigger{display:block;width:100%;height:100%}sd-date-picker-trigger .sd-date-picker-trigger{display:flex;align-items:center;gap:var(--trigger-gap);width:100%;height:100%;padding:0 var(--trigger-padding-x);cursor:pointer;user-select:none;overflow:hidden;border-radius:var(--trigger-radius)}sd-date-picker-trigger .sd-date-picker-trigger--disabled{cursor:not-allowed}sd-date-picker-trigger .sd-date-picker-trigger__icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}sd-date-picker-trigger .sd-date-picker-trigger__text{flex:1;min-width:var(--trigger-text-min-width, 80px);font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-text-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}"}},[512,"sd-date-picker-trigger",{displayText:[1,"display-text"],placeholder:[1],disabled:[4],size:[1]}]);function h(){"undefined"!=typeof customElements&&["sd-date-picker-trigger","sd-icon"].forEach((e=>{switch(e){case"sd-date-picker-trigger":customElements.get(s(e))||customElements.define(s(e),l);break;case"sd-icon":customElements.get(s(e))||a()}}))}export{p as D,l as S,c as a,h as d}
1
+ import{p as e,H as i,c as t,h as r,t as s}from"./p-Bg9XySrz.js";import{d as g}from"./p-laVsm9VM.js";import{f as d}from"./p-BOJJ_sQS.js";import{d as a}from"./p-ClKABgST.js";const n=g.datepicker.sm,o=g.datepicker.md,c={sm:{height:n.height,paddingX:n.paddingX,gap:n.gap,iconSize:n.icon,radius:n.radius,fontSize:n.typography.fontSize,lineHeight:n.typography.lineHeight,fontWeight:n.typography.fontWeight},md:{height:o.height,paddingX:o.paddingX,gap:o.gap,iconSize:o.icon,radius:o.radius,fontSize:o.typography.fontSize,lineHeight:o.typography.lineHeight,fontWeight:o.typography.fontWeight}},l={border:g.datepicker.border,bg:g.datepicker.bg,icon:g.datepicker.icon,text:{...g.datepicker.text,hint:d.field.hint.color}},p=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.triggerClick=t(this,"sdTriggerClick",7)}displayText="";placeholder="YYYY-MM-DD";disabled=!1;size="sm";triggerClick;handleClick=()=>{this.disabled||this.triggerClick.emit()};render(){const e=c[this.size]??c.sm,i=""!==this.displayText;return r("div",{key:"8ce4e5a7f355e15ad6662efc5d1a697c2f78d455",role:"button",tabindex:this.disabled?-1:0,class:{"sd-date-picker-trigger":!0,"sd-date-picker-trigger--disabled":this.disabled},style:{"--trigger-padding-x":`${e.paddingX}px`,"--trigger-gap":`${e.gap}px`,"--trigger-icon-size":`${e.iconSize}px`,"--trigger-font-size":`${e.fontSize}px`,"--trigger-line-height":`${e.lineHeight}px`,"--trigger-font-weight":e.fontWeight,"--trigger-radius":`${e.radius}px`,"--trigger-text-min-width":("md"===this.size?104:80)+"px","--trigger-text-color":this.disabled?l.text.disabled:i?l.text.default:l.text.hint,"--trigger-icon-color":this.disabled?l.icon.disabled:l.icon.default},onClick:this.handleClick,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())}},r("sd-icon",{key:"31d360adaf1a8a0d613d3809be7c724be9d7a29a",name:"date",size:Number(e.iconSize),color:"var(--trigger-icon-color)",class:"sd-date-picker-trigger__icon"}),r("span",{key:"cf17fb4d5fdaadd99847ec9ce5440214c10a5797",class:"sd-date-picker-trigger__text"},i?this.displayText:this.placeholder))}static get style(){return"sd-date-picker-trigger{display:block;width:100%;height:100%}sd-date-picker-trigger .sd-date-picker-trigger{display:flex;align-items:center;gap:var(--trigger-gap);width:100%;height:100%;padding:0 var(--trigger-padding-x);cursor:pointer;user-select:none;overflow:hidden;border-radius:var(--trigger-radius)}sd-date-picker-trigger .sd-date-picker-trigger--disabled{cursor:not-allowed}sd-date-picker-trigger .sd-date-picker-trigger__icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}sd-date-picker-trigger .sd-date-picker-trigger__text{flex:1;min-width:var(--trigger-text-min-width, 80px);font-size:var(--trigger-font-size);line-height:var(--trigger-line-height);font-weight:var(--trigger-font-weight);color:var(--trigger-text-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}"}},[512,"sd-date-picker-trigger",{displayText:[1,"display-text"],placeholder:[1],disabled:[4],size:[1]}]);function h(){"undefined"!=typeof customElements&&["sd-date-picker-trigger","sd-icon"].forEach((e=>{switch(e){case"sd-date-picker-trigger":customElements.get(s(e))||customElements.define(s(e),p);break;case"sd-icon":customElements.get(s(e))||a()}}))}export{l as D,p as S,c as a,h as d}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as i,d as o,t as r}from"./p-Bg9XySrz.js";import{T as l}from"./p-sZMi_32I.js";import{a,r as h,e as n,c,f as d,g as b,h as p,i as f}from"./p-DGyTYauz.js";import{d as g}from"./p-iGvyLmbb.js";import{d as m}from"./p-CHjF0mwj.js";import{d as y}from"./p-DknZgTo9.js";import{d as u}from"./p-B73U-Zw2.js";import{d as x}from"./p-Cftyepf_.js";import{d as k}from"./p-CLEAGFjW.js";import{d as _}from"./p-BvAJ_toQ.js";const v=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.sdColumnSort=s(this,"sdColumnSort",7)}get el(){return this}columns;selectable;resizable;stickyColumn;stickyHeader;scrolledLeft;scrolledRight;rows=[];columnWidths=[];sdColumnSort;tableId="";_columns=[];_selectable=!1;_resizable=!1;_stickyColumn={left:0,right:0};_stickyHeader=!1;_scrolledLeft=!1;_scrolledRight=!1;tableEl=null;handleColumnsChange(t){Array.isArray(t)&&0===(this.columnWidths??[]).length&&(this.columnWidths=t.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentWillLoad(){this.syncTableContext(),this.columnWidths=Array.isArray(this.columnWidths)?this.columnWidths:[],this.resolveConfig(),0===(this.columnWidths??[]).length&&(this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentDidLoad(){this.syncTableContext(),this.resolveConfig()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),s=e instanceof ShadowRoot?e.host:null,i=t??s;this.tableEl=i;const o=i?.getTableIdSync?.(),r=i?.getAttribute(l),a=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=r&&""!==r&&"undefined"!==r?r:null)??"";""!==a&&a!==this.tableId&&(this.tableId=a)}resolveConfig(){const t=this.tableEl?.getConfigSync?.(),e=Array.isArray(this.columns)?this.columns:Array.isArray(t?.columns)?t.columns:[];this._columns=e,this._selectable=this.selectable??t?.selectable??!1,this._resizable=this.resizable??t?.resizable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._stickyHeader=this.stickyHeader??t?.stickyHeader??!1,this._scrolledLeft=this.scrolledLeft??t?.scrolledLeft??!1,this._scrolledRight=this.scrolledRight??t?.scrolledRight??!1,Array.isArray(t?.columnWidths)&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths]),Array.isArray(this.columnWidths)||(this.columnWidths=[])}async refreshConfig(){this.resolveConfig()}async setColumnWidths(t){this.columnWidths=Array.isArray(t)?t:[]}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.getIsAllChecked())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?a:0),s=this.columnWidths.filter(((e,s)=>s>=this.visibleColumns.length-(this._stickyColumn.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.visibleColumns[t],o={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${s}px`};return i?.autoWidth||(o.width=`${this.columnWidths[t]}px`,o.minWidth=`${this.columnWidths[t]}px`,o.maxWidth=`${this.columnWidths[t]}px`),o}handleResize(t,e,s=!1){this.tableEl?.handleResize&&this.tableEl.handleResize(t,e,s)}handleColumnSort=t=>{this.sdColumnSort.emit({column:t})};handleSelectAll(t){const e=!!t,s=Array.isArray(this.rows)?this.rows:[];this.tableEl?.toggleSelectAllSync&&this.tableEl.toggleSelectAllSync(e,s)}getIsAllChecked(){const t=Array.isArray(this.rows)?this.rows:[];return!!(this.tableEl?.getIsAllCheckedSync&&t.length>0)&&this.tableEl.getIsAllCheckedSync(t)}render(){const t=Array.isArray(this.rows)?this.rows:[],e=this._stickyColumn.left||0,s=this._stickyColumn.right||0,r=this.visibleColumns.slice(0,e),l=this.visibleColumns.slice(e,this.visibleColumns.length-s),a=this.visibleColumns.slice(this.visibleColumns.length-s),g=this.visibleColumns.length-1;return i(o,{key:"822abd0e5ff71d9e55b6478d56c9277009983deb",slot:`${this.tableId}-head`,style:{"--table-header-height":`${f.height}px`,"--table-header-padding-x":`${f.paddingX}px`,"--table-header-gap":`${f.gap}px`,"--table-header-bg":p.bg,"--table-header-font-family":b.fontFamily,"--table-header-font-weight":b.fontWeight,"--table-header-font-size":`${b.fontSize}px`,"--table-header-line-height":`${b.lineHeight}px`,"--table-header-text-decoration":b.textDecoration,"--table-header-resizer-color":d.color,"--table-header-resizer-height":`${d.height}px`,"--table-border-color":c.color,"--table-border-width":`${c.width}px`}},i("thead",{key:"7c690c49eb0d9be48637b8a6e92287fac22bf377",class:{thead:!0,"thead--sticky":this._stickyHeader}},i("tr",{key:"81c64bb5b06d7e8525ebceaf6a229034e90f7a48",class:"tr"},this._selectable&&i("th",{key:"fe00535fb5cd54d053c17b3d3a6fa8869d483b8b",class:{th:!0,"th--selected":!0,"sticky-left":!0,"sticky-left-edge":0===e,"is-scrolled-left":0===e&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},i("sd-checkbox",{key:"de1a3ddf9b3df06d8cc9b85431c31ff84b7b8218",value:this.getIsAllChecked(),disabled:0===t.length,onSdUpdate:t=>this.handleSelectAll(t.detail)}),i("div",{key:"afe516ce212b24abcb075b6e6eb661ffcb6ce297",class:"th__bar"})),r.map(((t,s)=>i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-left":!0,"sticky-left-edge":s===e-1,"is-scrolled-left":s===e-1&&this._scrolledLeft},style:{...t.thStyle,...this.getStickyStyle(s)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&s!==g&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(s,t)})))),l.map(((t,s)=>{const o=e+s;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass)},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&o!==g&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(o,t)}))})),a.map(((t,e)=>{const o=this.visibleColumns.length-s+e;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-right":!0,"sticky-right-edge":0===e,"is-scrolled-right":0===e&&this._scrolledRight},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&i("div",{class:"th__resizer th__resizer--left",onMouseDown:t=>this.handleResize(o,t,!0)}))})))))}static get watchers(){return{columns:[{handleColumnsChange:0}]}}static get style(){return'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__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,"sd-thead",{columns:[16],selectable:[4],resizable:[4],stickyColumn:[16],stickyHeader:[4,"sticky-header"],scrolledLeft:[4,"scrolled-left"],scrolledRight:[4,"scrolled-right"],rows:[16],columnWidths:[1040],tableId:[32],_columns:[32],_selectable:[32],_resizable:[32],_stickyColumn:[32],_stickyHeader:[32],_scrolledLeft:[32],_scrolledRight:[32],refreshConfig:[64],setColumnWidths:[64],refreshSelection:[64]},void 0,{columns:[{handleColumnsChange:0}]}]);function w(){"undefined"!=typeof customElements&&["sd-thead","sd-button","sd-checkbox","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-thead":customElements.get(r(t))||customElements.define(r(t),v);break;case"sd-button":customElements.get(r(t))||g();break;case"sd-checkbox":customElements.get(r(t))||m();break;case"sd-floating-portal":customElements.get(r(t))||y();break;case"sd-ghost-button":customElements.get(r(t))||u();break;case"sd-icon":customElements.get(r(t))||x();break;case"sd-tag":customElements.get(r(t))||k();break;case"sd-tooltip":customElements.get(r(t))||_()}}))}export{v as S,w as d}
1
+ import{p as t,H as e,c as s,h as i,d as o,t as r}from"./p-Bg9XySrz.js";import{T as l}from"./p-sZMi_32I.js";import{a,r as h,e as n,c,f as d,g as b,h as p,i as f}from"./p-Cmg10jpN.js";import{d as g}from"./p-DDR0VcRU.js";import{d as m}from"./p-DbLQoVx6.js";import{d as y}from"./p-BLNc_TL-.js";import{d as u}from"./p-DTFXzlvq.js";import{d as x}from"./p-ClKABgST.js";import{d as k}from"./p-BMIgVp9-.js";import{d as _}from"./p-Cl5io5TH.js";const v=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.sdColumnSort=s(this,"sdColumnSort",7)}get el(){return this}columns;selectable;resizable;stickyColumn;stickyHeader;scrolledLeft;scrolledRight;rows=[];columnWidths=[];sdColumnSort;tableId="";_columns=[];_selectable=!1;_resizable=!1;_stickyColumn={left:0,right:0};_stickyHeader=!1;_scrolledLeft=!1;_scrolledRight=!1;tableEl=null;handleColumnsChange(t){Array.isArray(t)&&0===(this.columnWidths??[]).length&&(this.columnWidths=t.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentWillLoad(){this.syncTableContext(),this.columnWidths=Array.isArray(this.columnWidths)?this.columnWidths:[],this.resolveConfig(),0===(this.columnWidths??[]).length&&(this.columnWidths=this._columns.map((t=>t.autoWidth?0:parseInt(t.width||"120",10))))}componentDidLoad(){this.syncTableContext(),this.resolveConfig()}syncTableContext(){const t=this.el.closest("sd-table"),e=this.el.getRootNode(),s=e instanceof ShadowRoot?e.host:null,i=t??s;this.tableEl=i;const o=i?.getTableIdSync?.(),r=i?.getAttribute(l),a=(null!=o&&""!==o&&"undefined"!==o?o:null)??(null!=r&&""!==r&&"undefined"!==r?r:null)??"";""!==a&&a!==this.tableId&&(this.tableId=a)}resolveConfig(){const t=this.tableEl?.getConfigSync?.(),e=Array.isArray(this.columns)?this.columns:Array.isArray(t?.columns)?t.columns:[];this._columns=e,this._selectable=this.selectable??t?.selectable??!1,this._resizable=this.resizable??t?.resizable??!1,this._stickyColumn=this.stickyColumn??t?.stickyColumn??{left:0,right:0},this._stickyHeader=this.stickyHeader??t?.stickyHeader??!1,this._scrolledLeft=this.scrolledLeft??t?.scrolledLeft??!1,this._scrolledRight=this.scrolledRight??t?.scrolledRight??!1,Array.isArray(t?.columnWidths)&&0===(this.columnWidths??[]).length&&(this.columnWidths=[...t.columnWidths]),Array.isArray(this.columnWidths)||(this.columnWidths=[])}async refreshConfig(){this.resolveConfig()}async setColumnWidths(t){this.columnWidths=Array.isArray(t)?t:[]}async refreshSelection(){const t=this.el.querySelector("sd-checkbox");t&&(t.value=this.getIsAllChecked())}get visibleColumns(){return this._columns.filter((t=>!1!==t.visible))}getStickyStyle(t){if(this.tableEl?.getStickyStyleSync)return this.tableEl.getStickyStyleSync(t);const e=this.columnWidths.slice(0,t).reduce(((t,e)=>t+e),0)+(this._selectable?a:0),s=this.columnWidths.filter(((e,s)=>s>=this.visibleColumns.length-(this._stickyColumn.right||0)&&s>t)).reduce(((t,e)=>t+e),0),i=this.visibleColumns[t],o={"--sticky-left-offset":`${e}px`,"--sticky-right-offset":`${s}px`};return i?.autoWidth||(o.width=`${this.columnWidths[t]}px`,o.minWidth=`${this.columnWidths[t]}px`,o.maxWidth=`${this.columnWidths[t]}px`),o}handleResize(t,e,s=!1){this.tableEl?.handleResize&&this.tableEl.handleResize(t,e,s)}handleColumnSort=t=>{this.sdColumnSort.emit({column:t})};handleSelectAll(t){const e=!!t,s=Array.isArray(this.rows)?this.rows:[];this.tableEl?.toggleSelectAllSync&&this.tableEl.toggleSelectAllSync(e,s)}getIsAllChecked(){const t=Array.isArray(this.rows)?this.rows:[];return!!(this.tableEl?.getIsAllCheckedSync&&t.length>0)&&this.tableEl.getIsAllCheckedSync(t)}render(){const t=Array.isArray(this.rows)?this.rows:[],e=this._stickyColumn.left||0,s=this._stickyColumn.right||0,r=this.visibleColumns.slice(0,e),l=this.visibleColumns.slice(e,this.visibleColumns.length-s),a=this.visibleColumns.slice(this.visibleColumns.length-s),g=this.visibleColumns.length-1;return i(o,{key:"1e352d3996dc6cd60acd20c22c8c426edabaa9ea",slot:`${this.tableId}-head`,style:{"--table-header-height":`${f.height}px`,"--table-header-padding-x":`${f.paddingX}px`,"--table-header-gap":`${f.gap}px`,"--table-header-bg":p.bg,"--table-header-font-family":b.fontFamily,"--table-header-font-weight":b.fontWeight,"--table-header-font-size":`${b.fontSize}px`,"--table-header-line-height":`${b.lineHeight}px`,"--table-header-text-decoration":b.textDecoration,"--table-header-resizer-color":d.color,"--table-header-resizer-height":`${d.height}px`,"--table-border-color":c.color,"--table-border-width":`${c.width}px`}},i("thead",{key:"d76dbdd5b03096197fe09d69c198ab3a5892106c",class:{thead:!0,"thead--sticky":this._stickyHeader}},i("tr",{key:"fb0c1f8ff93ddb8682b07e9b4f55eaf56b1be41a",class:"tr"},this._selectable&&i("th",{key:"a53b9771dbec3ef7f3888bf9fc9393c683356c50",class:{th:!0,"th--selected":!0,"sticky-left":!0,"sticky-left-edge":0===e,"is-scrolled-left":0===e&&this._scrolledLeft},style:{"--sticky-left-offset":"0px"}},i("sd-checkbox",{key:"8dc233b34b68a5daca91a60364ec8faffeb4b21d",value:this.getIsAllChecked(),disabled:0===t.length,onSdUpdate:t=>this.handleSelectAll(t.detail)}),i("div",{key:"bfc496c2468f3f81c1db4ffe70584a9229bd3512",class:"th__bar"})),r.map(((t,s)=>i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-left":!0,"sticky-left-edge":s===e-1,"is-scrolled-left":s===e-1&&this._scrolledLeft},style:{...t.thStyle,...this.getStickyStyle(s)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&s!==g&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(s,t)})))),l.map(((t,s)=>{const o=e+s;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass)},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&o!==g&&i("div",{class:"th__resizer",onMouseDown:t=>this.handleResize(o,t)}))})),a.map(((t,e)=>{const o=this.visibleColumns.length-s+e;return i("th",{key:t.name,class:{th:!0,[`${t.thClass}`]:Boolean(t.thClass),"sticky-right":!0,"sticky-right-edge":0===e,"is-scrolled-right":0===e&&this._scrolledRight},style:{...t.thStyle,...this.getStickyStyle(o)}},i("div",{class:`th__content th__content--${t.align||"left"}`},i("div",{class:"th__content--label"},t.label),t.icon&&i("sd-icon",{name:t.icon,size:"12",color:h(t.icon,t.iconColor)}),t.sort&&i("sd-icon",{name:n(t.sort),size:"12",color:h(n(t.sort),t.iconColor),onClick:()=>this.handleColumnSort(t),style:{cursor:"pointer"}}),t.tooltip&&i("sd-tooltip",{...t.tooltipOptions},i("div",{slot:"content"},t.tooltip.map((t=>i("p",null,t)))))),this._resizable&&i("div",{class:"th__resizer th__resizer--left",onMouseDown:t=>this.handleResize(o,t,!0)}))})))))}static get watchers(){return{columns:[{handleColumnsChange:0}]}}static get style(){return'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__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,"sd-thead",{columns:[16],selectable:[4],resizable:[4],stickyColumn:[16],stickyHeader:[4,"sticky-header"],scrolledLeft:[4,"scrolled-left"],scrolledRight:[4,"scrolled-right"],rows:[16],columnWidths:[1040],tableId:[32],_columns:[32],_selectable:[32],_resizable:[32],_stickyColumn:[32],_stickyHeader:[32],_scrolledLeft:[32],_scrolledRight:[32],refreshConfig:[64],setColumnWidths:[64],refreshSelection:[64]},void 0,{columns:[{handleColumnsChange:0}]}]);function w(){"undefined"!=typeof customElements&&["sd-thead","sd-button","sd-checkbox","sd-floating-portal","sd-ghost-button","sd-icon","sd-tag","sd-tooltip"].forEach((t=>{switch(t){case"sd-thead":customElements.get(r(t))||customElements.define(r(t),v);break;case"sd-button":customElements.get(r(t))||g();break;case"sd-checkbox":customElements.get(r(t))||m();break;case"sd-floating-portal":customElements.get(r(t))||y();break;case"sd-ghost-button":customElements.get(r(t))||u();break;case"sd-icon":customElements.get(r(t))||x();break;case"sd-tag":customElements.get(r(t))||k();break;case"sd-tooltip":customElements.get(r(t))||_()}}))}export{v as S,w as d}