@sellmate/design-system 1.17.0 → 1.19.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 (301) 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 +263 -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 +40 -13
  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 +12 -11
  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 +367 -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 +3 -3
  66. package/dist/collection/components/sd-key-value-table/sd-key-value-table.css +11 -4
  67. package/dist/collection/components/sd-key-value-table/sd-key-value-table.js +42 -15
  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.css +4 -1
  85. package/dist/collection/components/sd-table/sd-table.js +15 -14
  86. package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +2 -2
  87. package/dist/collection/components/sd-table/sd-td/sd-td.js +1 -1
  88. package/dist/collection/components/sd-table/sd-thead/sd-thead.js +3 -3
  89. package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
  90. package/dist/collection/components/sd-tag/sd-tag.js +3 -3
  91. package/dist/collection/components/sd-text-link/sd-text-link.js +4 -4
  92. package/dist/collection/components/sd-textarea/sd-textarea.js +1 -1
  93. package/dist/collection/components/sd-toast/sd-toast.js +3 -3
  94. package/dist/collection/components/sd-toast-container/sd-toast-container.js +1 -1
  95. package/dist/collection/components/sd-toggle/sd-toggle.js +1 -1
  96. package/dist/collection/components/sd-tooltip/sd-tooltip.js +4 -4
  97. package/dist/collection/utils/modal.js +11 -0
  98. package/dist/components/index.js +1 -1
  99. package/dist/components/{p-DfZ8X4ly.js → p-4HPAPKne.js} +1 -1
  100. package/dist/components/{p-B57sOZvR.js → p-79DExV92.js} +1 -1
  101. package/dist/components/{p-RE577yb-.js → p-AI4YlQmL.js} +1 -1
  102. package/dist/components/{p-B4pLCd0_.js → p-B-4ulKJj.js} +1 -1
  103. package/dist/components/{p-G_N9xEDL.js → p-B3SKaQId.js} +1 -1
  104. package/dist/components/p-BD8OoYud.js +1 -0
  105. package/dist/components/p-BJfiMC9H.js +1 -0
  106. package/dist/components/{p-DknZgTo9.js → p-BLNc_TL-.js} +1 -1
  107. package/dist/components/{p-CLEAGFjW.js → p-BMIgVp9-.js} +1 -1
  108. package/dist/components/{p-vS0t7bWk.js → p-BX5uKVOt.js} +1 -1
  109. package/dist/components/p-BYTrIk62.js +1 -0
  110. package/dist/components/{p-_P21dOPl.js → p-B_5uwji5.js} +1 -1
  111. package/dist/components/{p-DUwrMHYa.js → p-Bzo51vnP.js} +1 -1
  112. package/dist/components/{p-DtG23tkr.js → p-C0tkFuhj.js} +1 -1
  113. package/dist/components/{p-YlaidN9T.js → p-C3wv8gVC.js} +1 -1
  114. package/dist/components/{p-YKESuy-p.js → p-CH6cVc2a.js} +1 -1
  115. package/dist/components/{p-Bfrg9lvO.js → p-CQWZv8vY.js} +1 -1
  116. package/dist/components/{p-BsQf9d7Q.js → p-CXRFEcE_.js} +1 -1
  117. package/dist/components/{p-B-61rIur.js → p-C_r3z9VA.js} +1 -1
  118. package/dist/components/{p-BvAJ_toQ.js → p-Cl5io5TH.js} +1 -1
  119. package/dist/components/p-ClKABgST.js +1 -0
  120. package/dist/components/{p-DGyTYauz.js → p-Cmg10jpN.js} +1 -1
  121. package/dist/components/{p-DeXO3mpJ.js → p-CtWfOIxb.js} +1 -1
  122. package/dist/components/{p-CIZpVJBx.js → p-CzCu_NDl.js} +1 -1
  123. package/dist/components/{p-FGvi8J2D.js → p-DAOeioSV.js} +1 -1
  124. package/dist/components/{p-iGvyLmbb.js → p-DDR0VcRU.js} +1 -1
  125. package/dist/components/{p-CnfnK5aj.js → p-DMS9mQsg.js} +1 -1
  126. package/dist/components/{p-B73U-Zw2.js → p-DTFXzlvq.js} +1 -1
  127. package/dist/components/{p-CHjF0mwj.js → p-DbLQoVx6.js} +1 -1
  128. package/dist/components/p-Dr5Q2ZKB.js +1 -0
  129. package/dist/components/{p-B4UxhQes.js → p-DrSHJYop.js} +1 -1
  130. package/dist/components/p-DvvGi4J_.js +1 -0
  131. package/dist/components/{p-BrzBnO1L.js → p-DyVh4pNL.js} +1 -1
  132. package/dist/components/{p-C_6HUUGg.js → p-Ng3JMPxb.js} +1 -1
  133. package/dist/components/p-U8VaRj9c.js +1 -0
  134. package/dist/components/{p-BY1ItC8N.js → p-hzCGj0On.js} +1 -1
  135. package/dist/components/{p-BMVHvEDw.js → p-qJeUUOyB.js} +1 -1
  136. package/dist/components/sd-action-modal.js +1 -1
  137. package/dist/components/sd-barcode-input.js +1 -1
  138. package/dist/components/sd-button.js +1 -1
  139. package/dist/components/sd-calendar.js +1 -1
  140. package/dist/components/sd-callout.js +1 -1
  141. package/dist/components/sd-checkbox.js +1 -1
  142. package/dist/components/sd-chip-input.js +1 -1
  143. package/dist/components/sd-chip.js +1 -1
  144. package/dist/components/sd-circle-progress.js +1 -1
  145. package/dist/components/sd-confirm-modal.js +1 -1
  146. package/dist/components/sd-date-picker-trigger.js +1 -1
  147. package/dist/components/sd-date-picker.js +1 -1
  148. package/dist/components/sd-date-range-picker-calendar.js +1 -1
  149. package/dist/components/sd-date-range-picker.js +1 -1
  150. package/dist/components/sd-divider.js +1 -1
  151. package/dist/components/sd-dropdown-button.js +1 -1
  152. package/dist/components/sd-field.js +1 -1
  153. package/dist/components/sd-file-picker.js +1 -1
  154. package/dist/components/sd-floating-portal.js +1 -1
  155. package/dist/components/sd-ghost-button.js +1 -1
  156. package/dist/components/sd-guide.js +1 -1
  157. package/dist/components/sd-icon.js +1 -1
  158. package/dist/components/sd-input.js +1 -1
  159. package/dist/components/sd-key-value-table.js +1 -1
  160. package/dist/components/sd-linear-progress.js +1 -1
  161. package/dist/components/sd-loading-container.js +1 -1
  162. package/dist/components/sd-loading-modal.js +1 -1
  163. package/dist/components/sd-modal-container.js +1 -1
  164. package/dist/components/sd-number-input.js +1 -1
  165. package/dist/components/sd-pagination.js +1 -1
  166. package/dist/components/sd-popover.js +1 -1
  167. package/dist/components/sd-popup.js +1 -1
  168. package/dist/components/sd-portal.js +1 -1
  169. package/dist/components/sd-select-list-item-search.js +1 -1
  170. package/dist/components/sd-select-list-item.js +1 -1
  171. package/dist/components/sd-select-listbox.js +1 -1
  172. package/dist/components/sd-select-trigger.js +1 -1
  173. package/dist/components/sd-select.js +1 -1
  174. package/dist/components/sd-switch.js +1 -1
  175. package/dist/components/sd-table.js +1 -1
  176. package/dist/components/sd-tabs.js +1 -1
  177. package/dist/components/sd-tag.js +1 -1
  178. package/dist/components/sd-tbody.js +1 -1
  179. package/dist/components/sd-td.js +1 -1
  180. package/dist/components/sd-text-link.js +1 -1
  181. package/dist/components/sd-textarea.js +1 -1
  182. package/dist/components/sd-thead.js +1 -1
  183. package/dist/components/sd-toast-container.js +1 -1
  184. package/dist/components/sd-toast.js +1 -1
  185. package/dist/components/sd-toggle.js +1 -1
  186. package/dist/components/sd-tooltip.js +1 -1
  187. package/dist/components/sd-tr.js +1 -1
  188. package/dist/design-system/design-system.esm.js +1 -1
  189. package/dist/design-system/index.esm.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-4b15247b.entry.js +1 -0
  199. package/dist/design-system/p-4b626171.entry.js +1 -0
  200. package/dist/design-system/{p-a1f756ab.entry.js → p-4e1d76b8.entry.js} +1 -1
  201. package/dist/design-system/{p-03bcd782.entry.js → p-683c3b91.entry.js} +1 -1
  202. package/dist/design-system/{p-99ffe505.entry.js → p-6ce68bf2.entry.js} +1 -1
  203. package/dist/design-system/{p-a5131a43.entry.js → p-80bde621.entry.js} +1 -1
  204. package/dist/design-system/{p-22883fe1.entry.js → p-81aa23d1.entry.js} +1 -1
  205. package/dist/design-system/{p-c78b8822.entry.js → p-827f067b.entry.js} +1 -1
  206. package/dist/design-system/p-8a025f91.entry.js +1 -0
  207. package/dist/design-system/{p-3e62a3ea.entry.js → p-8a84a4fe.entry.js} +1 -1
  208. package/dist/design-system/{p-d2833150.entry.js → p-8f90620b.entry.js} +1 -1
  209. package/dist/design-system/{p-a0775a0c.entry.js → p-9124a1af.entry.js} +1 -1
  210. package/dist/design-system/p-9d35b674.entry.js +1 -0
  211. package/dist/design-system/p-BJfiMC9H.js +1 -0
  212. package/dist/design-system/p-CAFz8W8_.js +1 -0
  213. package/dist/design-system/{p-DGyTYauz.js → p-Cmg10jpN.js} +1 -1
  214. package/dist/design-system/p-U8VaRj9c.js +1 -0
  215. package/dist/design-system/{p-c6307ba4.entry.js → p-a263af1b.entry.js} +1 -1
  216. package/dist/design-system/p-aa312937.entry.js +1 -0
  217. package/dist/design-system/p-b4b20a86.entry.js +1 -0
  218. package/dist/design-system/{p-7eb31041.entry.js → p-bbbc4b27.entry.js} +1 -1
  219. package/dist/design-system/{p-14340e46.entry.js → p-cc5f5bff.entry.js} +1 -1
  220. package/dist/design-system/{p-8140a225.entry.js → p-d5032f31.entry.js} +1 -1
  221. package/dist/design-system/{p-6d765b25.entry.js → p-e93dda25.entry.js} +1 -1
  222. package/dist/design-system/{p-c4e1641b.entry.js → p-f5190934.entry.js} +1 -1
  223. package/dist/esm/component.listItem-U8VaRj9c.js +50 -0
  224. package/dist/esm/design-system.js +1 -1
  225. package/dist/esm/index.js +11 -0
  226. package/dist/esm/loader.js +1 -1
  227. package/dist/esm/sd-button_2.entry.js +54 -0
  228. package/dist/esm/sd-calendar_2.entry.js +2 -2
  229. package/dist/esm/sd-chip-input.entry.js +263 -18
  230. package/dist/esm/sd-circle-progress.entry.js +2 -2
  231. package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
  232. package/dist/esm/sd-date-picker_7.entry.js +9 -9
  233. package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
  234. package/dist/esm/sd-divider.entry.js +2 -2
  235. package/dist/esm/sd-dropdown-button.entry.js +17 -7
  236. package/dist/esm/sd-field_3.entry.js +8 -8
  237. package/dist/esm/sd-ghost-button_2.entry.js +2 -2
  238. package/dist/esm/sd-guide.entry.js +1 -1
  239. package/dist/esm/sd-key-value-table.entry.js +40 -13
  240. package/dist/esm/sd-linear-progress.entry.js +2 -2
  241. package/dist/esm/sd-loading-container.entry.js +2 -2
  242. package/dist/esm/sd-modal-container.entry.js +8 -1
  243. package/dist/esm/sd-pagination_4.entry.js +10 -10
  244. package/dist/esm/sd-popup.entry.js +2 -2
  245. package/dist/esm/sd-portal.entry.js +16 -12
  246. package/dist/esm/sd-select-list-item_2.entry.js +8 -7
  247. package/dist/esm/{sd-select.config-DtrsLG0Z.js → sd-select.config-D6ktrl7E.js} +4 -50
  248. package/dist/esm/sd-select_3.entry.js +12 -11
  249. package/dist/esm/sd-switch.entry.js +1 -1
  250. package/dist/esm/{sd-table.config-D9meRqTx.js → sd-table.config-B3wuA5wX.js} +1 -1
  251. package/dist/esm/sd-table.entry.js +12 -11
  252. package/dist/esm/sd-tabs.entry.js +1 -1
  253. package/dist/esm/sd-td.entry.js +1 -1
  254. package/dist/esm/sd-text-link.entry.js +4 -4
  255. package/dist/esm/sd-toast-container.entry.js +1 -1
  256. package/dist/esm/sd-toast.entry.js +2 -2
  257. package/dist/esm/sd-toggle.entry.js +1 -1
  258. package/dist/esm/{system-j2khhcHY.js → system-BJfiMC9H.js} +7 -0
  259. package/dist/types/components/assets/Bill.d.ts +1 -0
  260. package/dist/types/components/assets/Coupon.d.ts +1 -0
  261. package/dist/types/components/assets/Delete.d.ts +1 -0
  262. package/dist/types/components/assets/Dot.d.ts +1 -0
  263. package/dist/types/components/assets/Launcher.d.ts +1 -0
  264. package/dist/types/components/assets/Monitor.d.ts +1 -0
  265. package/dist/types/components/assets/Shield.d.ts +1 -0
  266. package/dist/types/components/assets/Sidebar.d.ts +1 -0
  267. package/dist/types/components/assets/Store.d.ts +1 -0
  268. package/dist/types/components/assets/index.d.ts +9 -0
  269. package/dist/types/components/sd-chip-input/sd-chip-input.config.d.ts +24 -0
  270. package/dist/types/components/sd-chip-input/sd-chip-input.d.ts +19 -0
  271. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.config.d.ts +4 -0
  272. package/dist/types/components/sd-dropdown-button/sd-dropdown-button.d.ts +1 -0
  273. package/dist/types/components/sd-key-value-table/sd-key-value-table.config.d.ts +2 -2
  274. package/dist/types/components/sd-key-value-table/sd-key-value-table.d.ts +10 -3
  275. package/dist/types/components/sd-modal-container/sd-modal-container.config.d.ts +2 -0
  276. package/dist/types/components/sd-portal/sd-portal.d.ts +1 -0
  277. package/dist/types/components/sd-table/sd-table.d.ts +1 -1
  278. package/dist/types/components.d.ts +62 -20
  279. package/dist/types/utils/modal.d.ts +6 -0
  280. package/hydrate/index.js +576 -213
  281. package/hydrate/index.mjs +576 -213
  282. package/package.json +3 -3
  283. package/dist/components/p-6oSCGUOo.js +0 -1
  284. package/dist/components/p-BWoC-hMr.js +0 -1
  285. package/dist/components/p-C5wgHjtx.js +0 -1
  286. package/dist/components/p-Cftyepf_.js +0 -1
  287. package/dist/components/p-IgBxAXyL.js +0 -1
  288. package/dist/components/p-j2khhcHY.js +0 -1
  289. package/dist/design-system/p-0c5192b8.entry.js +0 -1
  290. package/dist/design-system/p-13b0db59.entry.js +0 -1
  291. package/dist/design-system/p-1652ae55.entry.js +0 -1
  292. package/dist/design-system/p-21fa7f85.entry.js +0 -1
  293. package/dist/design-system/p-2753c6c9.entry.js +0 -1
  294. package/dist/design-system/p-56a45ef9.entry.js +0 -1
  295. package/dist/design-system/p-71739336.entry.js +0 -1
  296. package/dist/design-system/p-DtrsLG0Z.js +0 -1
  297. package/dist/design-system/p-b22cb811.entry.js +0 -1
  298. package/dist/design-system/p-b576bc21.entry.js +0 -1
  299. package/dist/design-system/p-c1f71355.entry.js +0 -1
  300. package/dist/design-system/p-da90b448.entry.js +0 -1
  301. package/dist/design-system/p-j2khhcHY.js +0 -1
@@ -1,8 +1,9 @@
1
1
  import { h, } from "@stencil/core";
2
2
  import { nanoid } from "nanoid/non-secure";
3
- import { CHIP_INPUT_SIZE_MAP, CHIP_INPUT_COLORS, CHIP_INPUT_LAYOUT, CHIP_INPUT_RESET, } from "./sd-chip-input.config";
3
+ import { CHIP_INPUT_SIZE_MAP, CHIP_INPUT_COLORS, CHIP_INPUT_LAYOUT, CHIP_INPUT_RESET, CHIP_INPUT_MAX_COUNT, CHIP_INPUT_SUGGESTIONS, } from "./sd-chip-input.config";
4
4
  import { CHIP_LAYOUT, CHIP_COLORS, CHIP_TYPOGRAPHY } from "../sd-chip/sd-chip.config";
5
5
  export class SdChipInput {
6
+ static SUGGESTIONS_VIEWPORT_PADDING = 8;
6
7
  host;
7
8
  values = [];
8
9
  errors = [];
@@ -14,6 +15,12 @@ export class SdChipInput {
14
15
  rules = [];
15
16
  error = false;
16
17
  useReset = false;
18
+ maxCount;
19
+ duplicateLabel;
20
+ suggestions = [];
21
+ loadingSuggestions = false;
22
+ recommendedItems = [];
23
+ loadingRecommendedItems = false;
17
24
  // sd-field props
18
25
  label = '';
19
26
  labelWidth = '';
@@ -29,8 +36,12 @@ export class SdChipInput {
29
36
  focused = false;
30
37
  hovered = false;
31
38
  inputValue = '';
39
+ activeSuggestionIndex = -1;
40
+ suppressSuggestions = false;
41
+ suppressRecommendations = false;
32
42
  inputEl;
33
43
  formField;
44
+ chipInputRef;
34
45
  get value() {
35
46
  return this.internalValues;
36
47
  }
@@ -42,6 +53,22 @@ export class SdChipInput {
42
53
  this.internalErrors = [...newErrors];
43
54
  }
44
55
  }
56
+ internalValuesChanged_validate() {
57
+ if (typeof this.formField?.sdValidate === 'function') {
58
+ this.formField.sdValidate();
59
+ }
60
+ }
61
+ suggestionsChanged(newVal) {
62
+ if (!Array.isArray(newVal))
63
+ this.suggestions = [];
64
+ this.activeSuggestionIndex = -1;
65
+ this.suppressSuggestions = false;
66
+ }
67
+ recommendedItemsChanged(newVal) {
68
+ if (!Array.isArray(newVal))
69
+ this.recommendedItems = [];
70
+ this.activeSuggestionIndex = -1;
71
+ }
45
72
  componentWillLoad() {
46
73
  this.internalValues = Array.isArray(this.values) ? [...this.values] : [];
47
74
  if (Array.isArray(this.errors)) {
@@ -49,7 +76,13 @@ export class SdChipInput {
49
76
  }
50
77
  this.inputValue = this.inputValue ?? '';
51
78
  }
79
+ isDuplicateChip(index) {
80
+ const value = this.internalValues[index];
81
+ return this.internalValues.indexOf(value) !== index;
82
+ }
52
83
  getChipError(index) {
84
+ if (this.isDuplicateChip(index))
85
+ return true;
53
86
  if (typeof this.errors === 'function') {
54
87
  return this.errors(this.internalValues?.[index] ?? '');
55
88
  }
@@ -66,6 +99,7 @@ export class SdChipInput {
66
99
  update;
67
100
  focusEvent;
68
101
  blurEvent;
102
+ inputEvent;
69
103
  async sdValidate() {
70
104
  return this.formField?.sdValidate();
71
105
  }
@@ -78,6 +112,31 @@ export class SdChipInput {
78
112
  async sdFocus() {
79
113
  return this.formField?.sdFocus();
80
114
  }
115
+ addChip = (value) => {
116
+ if (this.maxCount != null && this.internalValues.length >= this.maxCount)
117
+ return;
118
+ const next = [...this.internalValues, value];
119
+ this.internalValues = next;
120
+ this.values = next;
121
+ if (Array.isArray(this.errors)) {
122
+ const nextErrors = [...this.internalErrors, false];
123
+ this.internalErrors = nextErrors;
124
+ this.errors = nextErrors;
125
+ }
126
+ if (Array.isArray(this.disabledChips)) {
127
+ this.disabledChips = [...this.disabledChips, false];
128
+ }
129
+ if (this.inputEl != null) {
130
+ this.inputEl.value = '';
131
+ }
132
+ this.inputValue = '';
133
+ this.activeSuggestionIndex = -1;
134
+ this.suppressSuggestions = true;
135
+ this.update.emit(next);
136
+ this.inputEvent.emit('');
137
+ this.inputEl?.focus();
138
+ this.suppressRecommendations = true;
139
+ };
81
140
  handleChipRemove = (index) => {
82
141
  const next = this.internalValues.filter((_, i) => i !== index);
83
142
  this.internalValues = next;
@@ -91,26 +150,54 @@ export class SdChipInput {
91
150
  this.disabledChips = this.disabledChips.filter((_, i) => i !== index);
92
151
  }
93
152
  this.update.emit(next);
153
+ // .focus()는 동기 실행 → handleFocus가 suppressRecommendations=false로 리셋하므로 이후 덮어씀
94
154
  this.inputEl?.focus();
155
+ this.suppressRecommendations = true;
95
156
  };
96
157
  handleKeyDown = (event) => {
97
158
  const input = event.target;
98
- if (event.key === 'Enter' && !event.isComposing && input.value.trim() !== '') {
99
- event.preventDefault();
100
- const next = [...this.internalValues, input.value.trim()];
101
- this.internalValues = next;
102
- this.values = next;
103
- if (Array.isArray(this.errors)) {
104
- const nextErrors = [...this.internalErrors, false];
105
- this.internalErrors = nextErrors;
106
- this.errors = nextErrors;
159
+ const suggestions = this.suggestions ?? [];
160
+ const recommendedItems = this.recommendedItems ?? [];
161
+ const showAutocomplete = this.focused &&
162
+ this.inputValue !== '' &&
163
+ !this.suppressSuggestions &&
164
+ (suggestions.length > 0 || this.loadingSuggestions);
165
+ const showRecommendations = this.focused &&
166
+ this.inputValue === '' &&
167
+ !this.suppressRecommendations &&
168
+ (recommendedItems.length > 0 || this.loadingRecommendedItems);
169
+ const showDropdown = showAutocomplete || showRecommendations;
170
+ const activeItems = showAutocomplete ? suggestions : recommendedItems;
171
+ if (showDropdown) {
172
+ if (event.key === 'ArrowDown') {
173
+ event.preventDefault();
174
+ this.activeSuggestionIndex = Math.min(this.activeSuggestionIndex + 1, activeItems.length - 1);
175
+ return;
107
176
  }
108
- if (Array.isArray(this.disabledChips)) {
109
- this.disabledChips = [...this.disabledChips, false];
177
+ if (event.key === 'ArrowUp') {
178
+ event.preventDefault();
179
+ this.activeSuggestionIndex = Math.max(this.activeSuggestionIndex - 1, -1);
180
+ return;
110
181
  }
111
- input.value = '';
112
- this.inputValue = '';
113
- this.update.emit(next);
182
+ if (event.key === 'Escape') {
183
+ if (showAutocomplete)
184
+ this.suppressSuggestions = true;
185
+ if (showRecommendations)
186
+ this.suppressRecommendations = true;
187
+ this.activeSuggestionIndex = -1;
188
+ return;
189
+ }
190
+ if (event.key === 'Enter' && this.activeSuggestionIndex >= 0) {
191
+ event.preventDefault();
192
+ this.addChip(activeItems[this.activeSuggestionIndex]);
193
+ return;
194
+ }
195
+ }
196
+ if (event.key === 'Enter' && !event.isComposing && input.value.trim() !== '') {
197
+ if (this.maxCount != null && this.internalValues.length >= this.maxCount)
198
+ return;
199
+ event.preventDefault();
200
+ this.addChip(input.value.trim());
114
201
  }
115
202
  else if (event.key === 'Backspace' && input.value === '' && this.internalValues.length > 0) {
116
203
  if (this.getChipDisabled(this.internalValues.length - 1))
@@ -131,16 +218,35 @@ export class SdChipInput {
131
218
  }
132
219
  };
133
220
  handleInput = (event) => {
134
- this.inputValue = event.target.value;
221
+ const value = event.target.value;
222
+ const wasEmpty = this.inputValue === '';
223
+ const isEmpty = value === '';
224
+ if (wasEmpty !== isEmpty) {
225
+ this.activeSuggestionIndex = -1;
226
+ if (isEmpty) {
227
+ this.suppressRecommendations = false;
228
+ }
229
+ }
230
+ this.inputValue = value;
231
+ this.suppressSuggestions = false;
232
+ this.inputEvent.emit(value);
135
233
  };
136
234
  handleFocus = () => {
137
235
  this.focused = true;
236
+ this.suppressRecommendations = false;
138
237
  this.focusEvent.emit();
139
238
  };
140
239
  handleBlur = () => {
141
240
  this.focused = false;
241
+ this.activeSuggestionIndex = -1;
142
242
  this.blurEvent.emit();
143
243
  };
244
+ closeSuggestions = () => {
245
+ this.focused = false;
246
+ this.activeSuggestionIndex = -1;
247
+ this.suppressSuggestions = true;
248
+ this.suppressRecommendations = true;
249
+ };
144
250
  handleContainerClick = () => {
145
251
  if (!this.disabled) {
146
252
  this.inputEl?.focus();
@@ -170,6 +276,18 @@ export class SdChipInput {
170
276
  this.update.emit(next);
171
277
  this.inputEl?.focus();
172
278
  };
279
+ duplicateRule = () => {
280
+ const seen = new Set();
281
+ for (const val of this.internalValues) {
282
+ if (seen.has(val)) {
283
+ if (this.duplicateLabel != null && this.duplicateLabel !== '')
284
+ return `이미 입력된 ${this.duplicateLabel}입니다.`;
285
+ return '중복된 값이 존재합니다.';
286
+ }
287
+ seen.add(val);
288
+ }
289
+ return true;
290
+ };
173
291
  render() {
174
292
  const sizeTokens = CHIP_INPUT_SIZE_MAP[this.size] ?? CHIP_INPUT_SIZE_MAP.sm;
175
293
  const cssVars = {
@@ -197,8 +315,84 @@ export class SdChipInput {
197
315
  '--sd-chip-input-field-font-weight': CHIP_TYPOGRAPHY.focus.fontWeight,
198
316
  '--sd-chip-input-field-line-height': CHIP_TYPOGRAPHY.focus.lineHeight,
199
317
  '--sd-chip-input-field-font-family': CHIP_TYPOGRAPHY.focus.fontFamily,
318
+ '--sd-chip-input-max-count-font-size': CHIP_INPUT_MAX_COUNT.fontSize,
319
+ '--sd-chip-input-max-count-font-weight': CHIP_INPUT_MAX_COUNT.fontWeight,
320
+ '--sd-chip-input-max-count-color': CHIP_INPUT_MAX_COUNT.color,
321
+ '--sd-chip-input-suggestions-radius': CHIP_INPUT_SUGGESTIONS.radius,
322
+ '--sd-chip-input-suggestions-max-height': CHIP_INPUT_SUGGESTIONS.maxHeight,
323
+ '--sd-chip-input-suggestion-padding-y': CHIP_INPUT_SUGGESTIONS.itemPaddingY,
324
+ '--sd-chip-input-suggestion-padding-x': CHIP_INPUT_SUGGESTIONS.itemPaddingX,
325
+ '--sd-chip-input-suggestion-padding-right': CHIP_INPUT_SUGGESTIONS.itemPaddingRight,
326
+ '--sd-chip-input-suggestion-gap': CHIP_INPUT_SUGGESTIONS.itemGap,
327
+ '--sd-chip-input-suggestion-font-size': CHIP_INPUT_SUGGESTIONS.itemFontSize,
328
+ '--sd-chip-input-suggestion-font-weight': CHIP_INPUT_SUGGESTIONS.itemFontWeight,
329
+ '--sd-chip-input-suggestion-font-weight-selected': CHIP_INPUT_SUGGESTIONS.itemFontWeightSelected,
330
+ '--sd-chip-input-suggestion-line-height': CHIP_INPUT_SUGGESTIONS.itemLineHeight,
331
+ '--sd-chip-input-suggestion-font-family': CHIP_INPUT_SUGGESTIONS.itemFontFamily,
332
+ '--sd-chip-input-suggestion-color': CHIP_INPUT_SUGGESTIONS.itemColor,
333
+ '--sd-chip-input-suggestion-color-hover': CHIP_INPUT_SUGGESTIONS.itemColorHover,
334
+ '--sd-chip-input-suggestion-bg-hover': CHIP_INPUT_SUGGESTIONS.itemBgHover,
335
+ '--sd-chip-input-suggestions-empty-color': CHIP_INPUT_SUGGESTIONS.emptyColor,
336
+ '--sd-chip-input-suggestions-empty-font-size': CHIP_INPUT_SUGGESTIONS.emptyFontSize,
337
+ '--sd-chip-input-suggestions-empty-line-height': CHIP_INPUT_SUGGESTIONS.emptyLineHeight,
338
+ };
339
+ const isMaxReached = this.maxCount != null && this.internalValues.length >= this.maxCount;
340
+ const showResetArea = (this.useReset && this.internalValues.length > 0) || this.maxCount != null;
341
+ const suggestions = this.suggestions ?? [];
342
+ const recommendedItems = this.recommendedItems ?? [];
343
+ const showAutocomplete = this.focused &&
344
+ this.inputValue !== '' &&
345
+ !this.suppressSuggestions &&
346
+ (suggestions.length > 0 || this.loadingSuggestions);
347
+ const showRecommendations = this.focused &&
348
+ this.inputValue === '' &&
349
+ !this.suppressRecommendations &&
350
+ (recommendedItems.length > 0 || this.loadingRecommendedItems);
351
+ const showDropdown = showAutocomplete || showRecommendations;
352
+ const dropdownItems = showAutocomplete ? suggestions : recommendedItems;
353
+ const isDropdownLoading = showAutocomplete
354
+ ? this.loadingSuggestions && suggestions.length === 0
355
+ : this.loadingRecommendedItems && recommendedItems.length === 0;
356
+ const suggestionBoxStyle = {
357
+ width: `${this.chipInputRef?.offsetWidth ?? 0}px`,
358
+ display: 'flex',
359
+ flexDirection: 'column',
360
+ boxSizing: 'border-box',
361
+ background: '#FFFFFF',
362
+ borderRadius: CHIP_INPUT_SUGGESTIONS.radius,
363
+ boxShadow: '2px 2px 12px 2px rgba(0, 0, 0, 0.1)',
364
+ maxHeight: CHIP_INPUT_SUGGESTIONS.maxHeight,
365
+ minHeight: '0',
366
+ overflowY: 'auto',
367
+ overflowX: 'hidden',
368
+ outline: 'none',
200
369
  };
201
- return (h("sd-field", { key: 'ea69cfd9fd589f3657f3dff1f73196f684d35d80', name: this.name, label: this.label, labelWidth: this.labelWidth, hint: this.hint, errorMessage: this.errorMessage, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, width: this.width, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("div", { key: 'b4948c02ea157000002661ca9374b300af5e71a8', class: "sd-chip-input", onClick: this.handleContainerClick }, (this.internalValues ?? []).map((value, i) => (h("sd-chip", { key: i, value: value, error: this.getChipError(i), disabled: this.getChipDisabled(i), editable: false, onSdRemove: () => this.handleChipRemove(i) }))), h("div", { key: 'ad36a2c8dd5b8d8ad00d7130da75e92a1fb3b350', class: {
370
+ const suggestionItemStyle = {
371
+ display: 'flex',
372
+ alignItems: 'center',
373
+ gap: CHIP_INPUT_SUGGESTIONS.itemGap,
374
+ padding: `${CHIP_INPUT_SUGGESTIONS.itemPaddingY} ${CHIP_INPUT_SUGGESTIONS.itemPaddingRight} ` +
375
+ `${CHIP_INPUT_SUGGESTIONS.itemPaddingY} ${CHIP_INPUT_SUGGESTIONS.itemPaddingX}`,
376
+ fontSize: CHIP_INPUT_SUGGESTIONS.itemFontSize,
377
+ lineHeight: CHIP_INPUT_SUGGESTIONS.itemLineHeight,
378
+ fontWeight: CHIP_INPUT_SUGGESTIONS.itemFontWeight,
379
+ fontFamily: CHIP_INPUT_SUGGESTIONS.itemFontFamily,
380
+ color: CHIP_INPUT_SUGGESTIONS.itemColor,
381
+ cursor: 'pointer',
382
+ userSelect: 'none',
383
+ whiteSpace: 'nowrap',
384
+ overflow: 'hidden',
385
+ textOverflow: 'ellipsis',
386
+ };
387
+ const suggestionEmptyStyle = {
388
+ padding: '12px',
389
+ textAlign: 'center',
390
+ fontSize: CHIP_INPUT_SUGGESTIONS.emptyFontSize,
391
+ lineHeight: CHIP_INPUT_SUGGESTIONS.emptyLineHeight,
392
+ fontFamily: CHIP_INPUT_SUGGESTIONS.itemFontFamily,
393
+ color: CHIP_INPUT_SUGGESTIONS.emptyColor,
394
+ };
395
+ return (h("sd-field", { key: '33ae95b159edcb8ee407cf8d311428f419f26e95', name: this.name, label: this.label, labelWidth: this.labelWidth, hint: this.hint, errorMessage: this.errorMessage, rules: [this.duplicateRule, ...(this.rules ?? [])], error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, width: this.width, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, h("div", { key: '4f7cd96e4cda06239a7498b8af5f1f3169362028', class: "sd-chip-input", ref: el => (this.chipInputRef = el), onClick: this.handleContainerClick }, (this.internalValues ?? []).map((value, i) => (h("sd-chip", { key: i, value: value, error: this.getChipError(i), disabled: this.getChipDisabled(i), editable: false, onSdRemove: () => this.handleChipRemove(i) }))), !isMaxReached && (h("div", { key: 'dab7b1c520923fdb8cb026141727d8d008b83663', class: {
202
396
  'sd-chip-input__field': true,
203
397
  'sd-chip-input__field--filled': this.inputValue !== '',
204
398
  'sd-chip-input__field--empty': this.inputValue === '' && this.internalValues.length > 0 && !this.focused,
@@ -206,7 +400,20 @@ export class SdChipInput {
206
400
  ? this.inputValue
207
401
  : this.internalValues.length === 0
208
402
  ? this.placeholder
209
- : '' }, h("input", { key: '6ea7cdaa1011543b6c7784561d3752e4ed4a9d7d', ref: el => (this.inputEl = el), class: "sd-chip-input__input", placeholder: this.internalValues.length === 0 ? this.placeholder : '', disabled: this.disabled, size: 1, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur })), this.useReset && this.internalValues.length > 0 && (h("div", { key: '65c366e84ba427704a9c89f6f5c6fdeeb5889554', class: "sd-chip-input__reset" }, this.inputValue === '' && h("span", { key: 'e78f17df8e2fd9a91cc5f0450d22542720adef1b', class: "sd-chip-input__divider" }), h("sd-text-link", { key: '298bd3ce40e0c0c4b91337548d6c6887d5239ccc', icon: "reset", iconColor: CHIP_INPUT_RESET.iconColor, label: "\uC785\uB825 \uCD08\uAE30\uD654", underline: true, disabled: this.disabled, style: { '--sd-text-link-color': CHIP_INPUT_RESET.labelColor }, onSdClick: this.handleResetInput }))))));
403
+ : '' }, h("input", { key: '0aee2d0f30c5af7fccfc2e35e5cee17912712ce9', ref: el => (this.inputEl = el), class: "sd-chip-input__input", placeholder: this.internalValues.length === 0 ? this.placeholder : '', disabled: this.disabled, size: 1, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }))), showResetArea && (h("div", { key: 'b0b508db62d31f6427d5a2def435fec7fc552e92', class: "sd-chip-input__reset" }, this.inputValue === '' && h("span", { key: '30ce147f3bc8070192d95f381fa7f75ad37aab9b', class: "sd-chip-input__divider" }), this.maxCount != null && (h("span", { key: '8c43a2920e55a36ff0c0ab952a52ab3df8d3c98d', class: "sd-chip-input__max-count" }, "\uCD5C\uB300 ", this.maxCount, "\uAC1C")), this.useReset && this.internalValues.length > 0 && (h("sd-text-link", { key: '543316c12760fe16449e2b89a9afb8c43344eab5', icon: "reset", iconColor: CHIP_INPUT_RESET.iconColor, label: "\uC785\uB825 \uCD08\uAE30\uD654", underline: true, disabled: this.disabled, style: { '--sd-text-link-color': CHIP_INPUT_RESET.labelColor }, onSdClick: this.handleResetInput })))), showDropdown && (h("sd-portal", { key: 'c402b8336f7d62213f2b803f80f7a2ffabce2c9d', open: showDropdown, parentRef: this.chipInputRef ?? null, viewportPadding: SdChipInput.SUGGESTIONS_VIEWPORT_PADDING, onSdClose: this.closeSuggestions }, h("div", { key: '4ade4acb535b2db7011699a449afd8c17fe5696d', class: "sd-chip-input__suggestions", role: "listbox", style: suggestionBoxStyle }, isDropdownLoading && (h("div", { key: 'e07a447f7c9a9d376680ddb3af6daf58e0d39167', class: "sd-chip-input__suggestions-empty", style: suggestionEmptyStyle }, "\uBD88\uB7EC\uC624\uB294 \uC911...")), dropdownItems.map((item, i) => (h("div", { key: item, class: {
404
+ 'sd-chip-input__suggestion-item': true,
405
+ 'sd-chip-input__suggestion-item--active': i === this.activeSuggestionIndex,
406
+ }, role: "option", tabIndex: -1, "aria-selected": i === this.activeSuggestionIndex, style: i === this.activeSuggestionIndex
407
+ ? {
408
+ ...suggestionItemStyle,
409
+ background: CHIP_INPUT_SUGGESTIONS.itemBgHover,
410
+ color: CHIP_INPUT_SUGGESTIONS.itemColorHover,
411
+ fontWeight: CHIP_INPUT_SUGGESTIONS.itemFontWeightSelected,
412
+ }
413
+ : suggestionItemStyle, onMouseDown: e => {
414
+ e.preventDefault();
415
+ this.addChip(item);
416
+ } }, item)))))))));
210
417
  }
211
418
  static get is() { return "sd-chip-input"; }
212
419
  static get originalStyleUrls() {
@@ -427,6 +634,120 @@ export class SdChipInput {
427
634
  "attribute": "use-reset",
428
635
  "defaultValue": "false"
429
636
  },
637
+ "maxCount": {
638
+ "type": "number",
639
+ "mutable": false,
640
+ "complexType": {
641
+ "original": "number",
642
+ "resolved": "number | undefined",
643
+ "references": {}
644
+ },
645
+ "required": false,
646
+ "optional": true,
647
+ "docs": {
648
+ "tags": [],
649
+ "text": ""
650
+ },
651
+ "getter": false,
652
+ "setter": false,
653
+ "reflect": false,
654
+ "attribute": "max-count"
655
+ },
656
+ "duplicateLabel": {
657
+ "type": "string",
658
+ "mutable": false,
659
+ "complexType": {
660
+ "original": "string",
661
+ "resolved": "string | undefined",
662
+ "references": {}
663
+ },
664
+ "required": false,
665
+ "optional": true,
666
+ "docs": {
667
+ "tags": [],
668
+ "text": ""
669
+ },
670
+ "getter": false,
671
+ "setter": false,
672
+ "reflect": false,
673
+ "attribute": "duplicate-label"
674
+ },
675
+ "suggestions": {
676
+ "type": "unknown",
677
+ "mutable": true,
678
+ "complexType": {
679
+ "original": "string[]",
680
+ "resolved": "string[]",
681
+ "references": {}
682
+ },
683
+ "required": false,
684
+ "optional": false,
685
+ "docs": {
686
+ "tags": [],
687
+ "text": ""
688
+ },
689
+ "getter": false,
690
+ "setter": false,
691
+ "defaultValue": "[]"
692
+ },
693
+ "loadingSuggestions": {
694
+ "type": "boolean",
695
+ "mutable": false,
696
+ "complexType": {
697
+ "original": "boolean",
698
+ "resolved": "boolean",
699
+ "references": {}
700
+ },
701
+ "required": false,
702
+ "optional": false,
703
+ "docs": {
704
+ "tags": [],
705
+ "text": ""
706
+ },
707
+ "getter": false,
708
+ "setter": false,
709
+ "reflect": false,
710
+ "attribute": "loading-suggestions",
711
+ "defaultValue": "false"
712
+ },
713
+ "recommendedItems": {
714
+ "type": "unknown",
715
+ "mutable": true,
716
+ "complexType": {
717
+ "original": "string[]",
718
+ "resolved": "string[]",
719
+ "references": {}
720
+ },
721
+ "required": false,
722
+ "optional": false,
723
+ "docs": {
724
+ "tags": [],
725
+ "text": ""
726
+ },
727
+ "getter": false,
728
+ "setter": false,
729
+ "defaultValue": "[]"
730
+ },
731
+ "loadingRecommendedItems": {
732
+ "type": "boolean",
733
+ "mutable": false,
734
+ "complexType": {
735
+ "original": "boolean",
736
+ "resolved": "boolean",
737
+ "references": {}
738
+ },
739
+ "required": false,
740
+ "optional": false,
741
+ "docs": {
742
+ "tags": [],
743
+ "text": ""
744
+ },
745
+ "getter": false,
746
+ "setter": false,
747
+ "reflect": false,
748
+ "attribute": "loading-recommended-items",
749
+ "defaultValue": "false"
750
+ },
430
751
  "label": {
431
752
  "type": "string",
432
753
  "mutable": false,
@@ -622,7 +943,10 @@ export class SdChipInput {
622
943
  "internalErrors": {},
623
944
  "focused": {},
624
945
  "hovered": {},
625
- "inputValue": {}
946
+ "inputValue": {},
947
+ "activeSuggestionIndex": {},
948
+ "suppressSuggestions": {},
949
+ "suppressRecommendations": {}
626
950
  };
627
951
  }
628
952
  static get events() {
@@ -671,6 +995,21 @@ export class SdChipInput {
671
995
  "resolved": "void",
672
996
  "references": {}
673
997
  }
998
+ }, {
999
+ "method": "inputEvent",
1000
+ "name": "sdInput",
1001
+ "bubbles": true,
1002
+ "cancelable": true,
1003
+ "composed": true,
1004
+ "docs": {
1005
+ "tags": [],
1006
+ "text": ""
1007
+ },
1008
+ "complexType": {
1009
+ "original": "string",
1010
+ "resolved": "string",
1011
+ "references": {}
1012
+ }
674
1013
  }];
675
1014
  }
676
1015
  static get methods() {
@@ -753,6 +1092,15 @@ export class SdChipInput {
753
1092
  }, {
754
1093
  "propName": "errors",
755
1094
  "methodName": "errorsChanged"
1095
+ }, {
1096
+ "propName": "internalValues",
1097
+ "methodName": "internalValuesChanged_validate"
1098
+ }, {
1099
+ "propName": "suggestions",
1100
+ "methodName": "suggestionsChanged"
1101
+ }, {
1102
+ "propName": "recommendedItems",
1103
+ "methodName": "recommendedItemsChanged"
756
1104
  }];
757
1105
  }
758
1106
  }
@@ -27,7 +27,7 @@ export class SdCircleProgress {
27
27
  }
28
28
  const c = CIRCLE_PROGRESS_VIEWBOX_SIZE / 2;
29
29
  const showPercent = !this.indeterminate;
30
- return (h(Host, { key: '46d74c0edb5a5e8cd0472c83efc45a0efaf353b4', style: hostStyle }, h("svg", { key: '34117c89eb180370a215807e614ad08f4f72b517', class: "sd-circle-progress", viewBox: `0 0 ${CIRCLE_PROGRESS_VIEWBOX_SIZE} ${CIRCLE_PROGRESS_VIEWBOX_SIZE}`, xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: '08ac6f011b6a4b6744ddcf437b1e0a5b96abfc6e', class: "sd-circle-progress__track", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH }), h("circle", { key: '5ae0a53ce10bd5a8b2f316ebd00d3ee28c4336d6', class: "sd-circle-progress__arc", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH, "stroke-linecap": "round", style: arcStyle })), showPercent && (h("span", { key: 'fd52ee1947d41b2117c9ea6e4cc9a448799342e3', class: "sd-circle-progress__percent" }, Math.round(this.clampedValue), "%")), this.label && h("span", { key: 'a58776c4ef67eb900eba97ff4fed138c8f5e8452', class: "sd-circle-progress__label" }, this.label)));
30
+ return (h(Host, { key: '35b4dc433f5e2bbd02dc3422b286da179472082f', style: hostStyle }, h("svg", { key: 'de1d3e44eccf421491a1107ba234e1562917945b', class: "sd-circle-progress", viewBox: `0 0 ${CIRCLE_PROGRESS_VIEWBOX_SIZE} ${CIRCLE_PROGRESS_VIEWBOX_SIZE}`, xmlns: "http://www.w3.org/2000/svg" }, h("circle", { key: 'b0a54a2e155222a416a6bdcb75f4fe54d9de8270', class: "sd-circle-progress__track", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH }), h("circle", { key: '6bc314b3fce758d41a3499e9d87b7158b15777a5', class: "sd-circle-progress__arc", cx: c, cy: c, r: CIRCLE_PROGRESS_RADIUS, fill: "none", "stroke-width": CIRCLE_PROGRESS_STROKE_WIDTH, "stroke-linecap": "round", style: arcStyle })), showPercent && (h("span", { key: '16ec46b178d5f2f2f5ad245703c2f4362b8df261', class: "sd-circle-progress__percent" }, Math.round(this.clampedValue), "%")), this.label && h("span", { key: 'c199799d2466c75f91f1bc1f20fdb7e71c64ba0e', class: "sd-circle-progress__label" }, this.label)));
31
31
  }
32
32
  static get is() { return "sd-circle-progress"; }
33
33
  static get originalStyleUrls() {
@@ -73,9 +73,9 @@ export class SdConfirmModal {
73
73
  const type = this.resolvedType;
74
74
  const iconName = CONFIRM_MODAL_ICON_MAP[type];
75
75
  const iconColor = CONFIRM_MODAL_ICON_COLOR[type];
76
- return (h("div", { key: '4d3ce0662b2d860a4ed6ae3c8177ae75dae4fb92', class: "sd-confirm-modal" }, h("sd-ghost-button", { key: '7c406d59c2470b610a187bf45aa5cd4ab5c6b26b', class: "sd-confirm-modal__close-button", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() }), iconName && (h("sd-icon", { key: '10e3d2c8a87a728df4e3f3be7dfab96475738e2b', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), h("h2", { key: '9cc844c8cefb2fd0dc96871b55fc1c7c6e41c526', class: `sd-confirm-modal__title ${this.titleClass ?? ''}` }, this.modalTitle), h("div", { key: 'bbaa81a02c067d66c4cc19cf805b7a6939231311', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: '31734f096eee6e6a9be770eafa43066c8e763608', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: sanitizeInlineHtml(msg) }))))), this.showContentBox && (h("div", { key: 'a10838fb7c7081fdaa85cdaa33f92ef30c00a888', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
76
+ return (h("div", { key: '51fb051b436cc511aeac2f578832a267e12ef3c4', class: "sd-confirm-modal" }, h("sd-ghost-button", { key: 'dd9605e312eac8b0602ec558ad5439ea3daa7aa7', class: "sd-confirm-modal__close-button", icon: "close", ariaLabel: "close", onClick: () => this.close.emit() }), iconName && (h("sd-icon", { key: '5027ec2d03731338a9197f7b5b910d2adbf83f0e', class: "sd-confirm-modal__icon", name: iconName, size: TITLE_ICON_SIZE, color: iconColor })), h("h2", { key: '8456707355cc779c169b56abc16b0949909b829e', class: `sd-confirm-modal__title ${this.titleClass ?? ''}` }, this.modalTitle), h("div", { key: 'd11cb38e749f54ce5767ba9b5cca0129df742aca', class: "sd-confirm-modal__body" }, (this.topMessage ?? []).length > 0 && (h("div", { key: 'de653458605a9591d7c66d644a143d0f33738b28', class: "sd-confirm-modal__message" }, (this.topMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: sanitizeInlineHtml(msg) }))))), this.showContentBox && (h("div", { key: '0517e400485551ab21f0f5452af764b5ede7a76d', class: "sd-confirm-modal__content-box" }, this.tagContents ? (h("div", { class: "sd-confirm-modal__custom-content", ref: el => {
77
77
  this.customContentRef = el;
78
- } })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && (h("sd-tag", { name: this.tagPreset ?? 'square_sm_grey', label: this.tagLabel })), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: '540f3bb73aa61a1a2a041eba9a22a198c7772914', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: sanitizeInlineHtml(msg) })))))), h("div", { key: '1944aeb4d140c779d0af1304160a86c5056335a8', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button", { key: 'efd463686d98e9d2edc3e1cd7b4f54d8da4fef56', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.cancel.emit() })), h("sd-button", { key: 'b9033fb98acf3de36b7fb3e1969ccf5a7becef39', name: this.resolvedMainButton, label: this.mainButtonLabel ?? '확인', onSdClick: () => this.ok.emit() }))));
78
+ } })) : (h("slot", { onSlotchange: () => this.syncHasSlottedContent() }, this.tagLabel && (h("sd-tag", { name: this.tagPreset ?? 'square_sm_grey', label: this.tagLabel })), this.slotLabel && (h("span", { class: "sd-confirm-modal__slot-label" }, this.slotLabel)))))), (this.bottomMessage ?? []).length > 0 && (h("div", { key: 'd542a08caee30ed7eb1d22ed85a51be6e1f6855e', class: "sd-confirm-modal__message" }, (this.bottomMessage ?? []).map(msg => (h("p", { class: "sd-confirm-modal__message-text", innerHTML: sanitizeInlineHtml(msg) })))))), h("div", { key: '02d012e899969ee55cba43c11d9caeaaff65a348', class: "sd-confirm-modal__button" }, this.subButtonLabel && (h("sd-button", { key: 'fd50d151e515646e5bef5658a1b05b2e26b21461', name: SUB_BUTTON_PRESET, label: this.subButtonLabel, onSdClick: () => this.cancel.emit() })), h("sd-button", { key: '0c2092edf0866a8b1f4f432b176d78eedd9655d6', name: this.resolvedMainButton, label: this.mainButtonLabel ?? '확인', onSdClick: () => this.ok.emit() }))));
79
79
  }
80
80
  static get is() { return "sd-confirm-modal"; }
81
81
  static get originalStyleUrls() {
@@ -33,7 +33,7 @@ export class SdDatePickerTrigger {
33
33
  ? DATEPICKER_COLORS.icon.disabled
34
34
  : DATEPICKER_COLORS.icon.default,
35
35
  };
36
- return (h("div", { key: '87ada0414ffc6404b27cf4a41ba7c9cb9903f498', role: "button", tabindex: this.disabled ? -1 : 0, class: {
36
+ return (h("div", { key: '8ce4e5a7f355e15ad6662efc5d1a697c2f78d455', role: "button", tabindex: this.disabled ? -1 : 0, class: {
37
37
  'sd-date-picker-trigger': true,
38
38
  'sd-date-picker-trigger--disabled': this.disabled,
39
39
  }, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
@@ -41,7 +41,7 @@ export class SdDatePickerTrigger {
41
41
  e.preventDefault();
42
42
  this.handleClick();
43
43
  }
44
- } }, h("sd-icon", { key: 'e8eee3ed97ab7344e7658b7b22bc91f11aa0b068', name: "date", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-date-picker-trigger__icon" }), h("span", { key: 'ea25a13a72d00ca31fcddaf0183b520175ef7d93', class: "sd-date-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder)));
44
+ } }, h("sd-icon", { key: '31d360adaf1a8a0d613d3809be7c724be9d7a29a', name: "date", size: Number(sizeTokens.iconSize), color: "var(--trigger-icon-color)", class: "sd-date-picker-trigger__icon" }), h("span", { key: 'cf17fb4d5fdaadd99847ec9ce5440214c10a5797', class: "sd-date-picker-trigger__text" }, hasValue ? this.displayText : this.placeholder)));
45
45
  }
46
46
  static get is() { return "sd-date-picker-trigger"; }
47
47
  static get originalStyleUrls() {
@@ -93,9 +93,9 @@ export class SdDatePicker {
93
93
  '--sd-system-color-field-border-focus': DATEPICKER_COLORS.border.focus,
94
94
  '--sd-system-color-field-bg-default': DATEPICKER_COLORS.bg.default,
95
95
  };
96
- return (h("sd-field", { key: 'baa957e5534b6587da2ef067ecad4a0934693800', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '652f9f5c6bd5c6ee58f3c89eee45325a98234ac0', class: "sd-date-picker", ref: el => {
96
+ return (h("sd-field", { key: '9e1e5cb7419027db803248a657d0d134be049637', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: 'fbd9adeaa08d19cac34b045aba2b3fbb8d4adc8c', class: "sd-date-picker", ref: el => {
97
97
  this.triggerRef = el;
98
- } }, h("sd-date-picker-trigger", { key: '7b0f81badbcf7ca283afd274b4572e4a6eaa590b', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: '65fbe892e4cdd9d643b5000d69220b5e28972902', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-calendar", { key: 'e9187264f336295907f1d5574810df4a07a0f114', elevated: true, value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
98
+ } }, h("sd-date-picker-trigger", { key: 'd51161c4b1eedcfd90832c9b6d049559ff5df08b', displayText: this.value ?? '', placeholder: this.placeholder, disabled: this.disabled, size: this.size, onSdTriggerClick: this.handleTriggerClick })), (this.isOpen || this.isAnimatingOut) && (h("sd-portal", { key: 'd6588d3991eff39eb717d4211b38d68f093aace5', open: this.isOpen, parentRef: this.triggerRef, onSdClose: () => this.closeDropdown() }, h("sd-calendar", { key: '0dc6a8074fcfa63630aab7f0b126caa9f4c7b234', elevated: true, value: this.value, selectable: this.selectable, onSdUpdate: this.handleSelect, onSdViewChange: this.handleViewChange })))));
99
99
  }
100
100
  static get is() { return "sd-date-picker"; }
101
101
  static get originalStyleUrls() {
@@ -239,7 +239,7 @@ export class SdDateRangePickerCalendar {
239
239
  '--range-panel-gap': `${RANGE_LAYOUT.panelGap}px`,
240
240
  '--range-divider': RANGE_LAYOUT.divider,
241
241
  };
242
- return (h(Fragment, { key: '91ba95cf0786d59363ac6b72e9c8f91d1802feee' }, h("div", { key: '98f66737a15e5c3129dd20f674736115a4fad42e', class: "sd-date-range-picker-calendar", style: cssVars }, this.renderYearNav(), h("div", { key: 'd9f326b485864484ed786cb172d3bd33136987ea', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), h("span", { key: 'df7d835ac0da6788f08c7963ed04ed98b7fd6091', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)))));
242
+ return (h(Fragment, { key: '71f25effececd0b83d9b33201230dc615ba87a30' }, h("div", { key: 'f075474fb0be9f8e8562a013532b3cdbaadee069', class: "sd-date-range-picker-calendar", style: cssVars }, this.renderYearNav(), h("div", { key: '4dfa1d65b971f7d80f0799482c8ce41522200a94', class: "sd-date-range-picker-calendar__panels" }, this.renderPanel(this.currentYear, this.currentMonth, true), h("span", { key: '20149f97a5115115cc49894383ca7f989ba2b904', class: "sd-date-range-picker-calendar__divider", "aria-hidden": "true" }), this.renderPanel(this.rightYear, this.rightMonth, false)))));
243
243
  }
244
244
  static get is() { return "sd-date-range-picker-calendar"; }
245
245
  static get originalStyleUrls() {
@@ -7,7 +7,7 @@ export class SdDivider {
7
7
  const hostStyle = {
8
8
  '--sd-divider-color': DIVIDER_COLORS.default,
9
9
  };
10
- return (h(Host, { key: '8282aae8e5cd26630c54f4347cd26f544672d15d', style: hostStyle }, h("hr", { key: '94df7dc7465b05ecad6527da2c008a4ff503f034', "aria-orientation": this.vertical ? 'vertical' : 'horizontal' })));
10
+ return (h(Host, { key: '886ca68599a925678d7c598daeff3bf653db513d', style: hostStyle }, h("hr", { key: 'e213413f041cda5d18a74f8c0225c840d92f7dac', "aria-orientation": this.vertical ? 'vertical' : 'horizontal' })));
11
11
  }
12
12
  static get is() { return "sd-divider"; }
13
13
  static get originalStyleUrls() {
@@ -51,6 +51,13 @@ export const DROPDOWN_CHEVRON_ICON_SIZE = {
51
51
  sm: 12,
52
52
  md: 16,
53
53
  };
54
+ // 버튼 자체의 min-width (px). split 여부에 따라 chevron 버튼이 추가되므로 별도 값을 지정.
55
+ // TODO: 디자인 토큰으로 관리될 때 대체 예정
56
+ export const DROPDOWN_BUTTON_MIN_WIDTH = {
57
+ xs: { default: 44, split: 60 },
58
+ sm: { default: 70, split: 76 },
59
+ md: { default: 100, split: 106 },
60
+ };
54
61
  export const DROPDOWN_DISABLED_BACKGROUND = buttonTokens.button.bg.disabled;
55
62
  export const DROPDOWN_DISABLED_TEXT = buttonTokens.button.text.disabled;
56
63
  export const DROPDOWN_DISABLED_ICON = buttonTokens.button.icon.disabled;