@sellmate/design-system 1.17.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 +29 -8
  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 +25 -3
  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 +29 -8
  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 +1 -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 +531 -203
  279. package/hydrate/index.mjs +531 -203
  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-56a45ef9.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,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,11 @@ export class SdChipInput {
14
15
  rules = [];
15
16
  error = false;
16
17
  useReset = false;
18
+ maxCount;
19
+ suggestions = [];
20
+ loadingSuggestions = false;
21
+ recommendedItems = [];
22
+ loadingRecommendedItems = false;
17
23
  // sd-field props
18
24
  label = '';
19
25
  labelWidth = '';
@@ -29,8 +35,12 @@ export class SdChipInput {
29
35
  focused = false;
30
36
  hovered = false;
31
37
  inputValue = '';
38
+ activeSuggestionIndex = -1;
39
+ suppressSuggestions = false;
40
+ suppressRecommendations = false;
32
41
  inputEl;
33
42
  formField;
43
+ chipInputRef;
34
44
  get value() {
35
45
  return this.internalValues;
36
46
  }
@@ -42,6 +52,17 @@ export class SdChipInput {
42
52
  this.internalErrors = [...newErrors];
43
53
  }
44
54
  }
55
+ suggestionsChanged(newVal) {
56
+ if (!Array.isArray(newVal))
57
+ this.suggestions = [];
58
+ this.activeSuggestionIndex = -1;
59
+ this.suppressSuggestions = false;
60
+ }
61
+ recommendedItemsChanged(newVal) {
62
+ if (!Array.isArray(newVal))
63
+ this.recommendedItems = [];
64
+ this.activeSuggestionIndex = -1;
65
+ }
45
66
  componentWillLoad() {
46
67
  this.internalValues = Array.isArray(this.values) ? [...this.values] : [];
47
68
  if (Array.isArray(this.errors)) {
@@ -66,6 +87,7 @@ export class SdChipInput {
66
87
  update;
67
88
  focusEvent;
68
89
  blurEvent;
90
+ inputEvent;
69
91
  async sdValidate() {
70
92
  return this.formField?.sdValidate();
71
93
  }
@@ -78,6 +100,31 @@ export class SdChipInput {
78
100
  async sdFocus() {
79
101
  return this.formField?.sdFocus();
80
102
  }
103
+ addChip = (value) => {
104
+ if (this.maxCount != null && this.internalValues.length >= this.maxCount)
105
+ return;
106
+ const next = [...this.internalValues, value];
107
+ this.internalValues = next;
108
+ this.values = next;
109
+ if (Array.isArray(this.errors)) {
110
+ const nextErrors = [...this.internalErrors, false];
111
+ this.internalErrors = nextErrors;
112
+ this.errors = nextErrors;
113
+ }
114
+ if (Array.isArray(this.disabledChips)) {
115
+ this.disabledChips = [...this.disabledChips, false];
116
+ }
117
+ if (this.inputEl != null) {
118
+ this.inputEl.value = '';
119
+ }
120
+ this.inputValue = '';
121
+ this.activeSuggestionIndex = -1;
122
+ this.suppressSuggestions = true;
123
+ this.update.emit(next);
124
+ this.inputEvent.emit('');
125
+ this.inputEl?.focus();
126
+ this.suppressRecommendations = true;
127
+ };
81
128
  handleChipRemove = (index) => {
82
129
  const next = this.internalValues.filter((_, i) => i !== index);
83
130
  this.internalValues = next;
@@ -91,26 +138,54 @@ export class SdChipInput {
91
138
  this.disabledChips = this.disabledChips.filter((_, i) => i !== index);
92
139
  }
93
140
  this.update.emit(next);
141
+ // .focus()는 동기 실행 → handleFocus가 suppressRecommendations=false로 리셋하므로 이후 덮어씀
94
142
  this.inputEl?.focus();
143
+ this.suppressRecommendations = true;
95
144
  };
96
145
  handleKeyDown = (event) => {
97
146
  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;
147
+ const suggestions = this.suggestions ?? [];
148
+ const recommendedItems = this.recommendedItems ?? [];
149
+ const showAutocomplete = this.focused &&
150
+ this.inputValue !== '' &&
151
+ !this.suppressSuggestions &&
152
+ (suggestions.length > 0 || this.loadingSuggestions);
153
+ const showRecommendations = this.focused &&
154
+ this.inputValue === '' &&
155
+ !this.suppressRecommendations &&
156
+ (recommendedItems.length > 0 || this.loadingRecommendedItems);
157
+ const showDropdown = showAutocomplete || showRecommendations;
158
+ const activeItems = showAutocomplete ? suggestions : recommendedItems;
159
+ if (showDropdown) {
160
+ if (event.key === 'ArrowDown') {
161
+ event.preventDefault();
162
+ this.activeSuggestionIndex = Math.min(this.activeSuggestionIndex + 1, activeItems.length - 1);
163
+ return;
107
164
  }
108
- if (Array.isArray(this.disabledChips)) {
109
- this.disabledChips = [...this.disabledChips, false];
165
+ if (event.key === 'ArrowUp') {
166
+ event.preventDefault();
167
+ this.activeSuggestionIndex = Math.max(this.activeSuggestionIndex - 1, -1);
168
+ return;
110
169
  }
111
- input.value = '';
112
- this.inputValue = '';
113
- this.update.emit(next);
170
+ if (event.key === 'Escape') {
171
+ if (showAutocomplete)
172
+ this.suppressSuggestions = true;
173
+ if (showRecommendations)
174
+ this.suppressRecommendations = true;
175
+ this.activeSuggestionIndex = -1;
176
+ return;
177
+ }
178
+ if (event.key === 'Enter' && this.activeSuggestionIndex >= 0) {
179
+ event.preventDefault();
180
+ this.addChip(activeItems[this.activeSuggestionIndex]);
181
+ return;
182
+ }
183
+ }
184
+ if (event.key === 'Enter' && !event.isComposing && input.value.trim() !== '') {
185
+ if (this.maxCount != null && this.internalValues.length >= this.maxCount)
186
+ return;
187
+ event.preventDefault();
188
+ this.addChip(input.value.trim());
114
189
  }
115
190
  else if (event.key === 'Backspace' && input.value === '' && this.internalValues.length > 0) {
116
191
  if (this.getChipDisabled(this.internalValues.length - 1))
@@ -131,16 +206,35 @@ export class SdChipInput {
131
206
  }
132
207
  };
133
208
  handleInput = (event) => {
134
- this.inputValue = event.target.value;
209
+ const value = event.target.value;
210
+ const wasEmpty = this.inputValue === '';
211
+ const isEmpty = value === '';
212
+ if (wasEmpty !== isEmpty) {
213
+ this.activeSuggestionIndex = -1;
214
+ if (isEmpty) {
215
+ this.suppressRecommendations = false;
216
+ }
217
+ }
218
+ this.inputValue = value;
219
+ this.suppressSuggestions = false;
220
+ this.inputEvent.emit(value);
135
221
  };
136
222
  handleFocus = () => {
137
223
  this.focused = true;
224
+ this.suppressRecommendations = false;
138
225
  this.focusEvent.emit();
139
226
  };
140
227
  handleBlur = () => {
141
228
  this.focused = false;
229
+ this.activeSuggestionIndex = -1;
142
230
  this.blurEvent.emit();
143
231
  };
232
+ closeSuggestions = () => {
233
+ this.focused = false;
234
+ this.activeSuggestionIndex = -1;
235
+ this.suppressSuggestions = true;
236
+ this.suppressRecommendations = true;
237
+ };
144
238
  handleContainerClick = () => {
145
239
  if (!this.disabled) {
146
240
  this.inputEl?.focus();
@@ -197,8 +291,84 @@ export class SdChipInput {
197
291
  '--sd-chip-input-field-font-weight': CHIP_TYPOGRAPHY.focus.fontWeight,
198
292
  '--sd-chip-input-field-line-height': CHIP_TYPOGRAPHY.focus.lineHeight,
199
293
  '--sd-chip-input-field-font-family': CHIP_TYPOGRAPHY.focus.fontFamily,
294
+ '--sd-chip-input-max-count-font-size': CHIP_INPUT_MAX_COUNT.fontSize,
295
+ '--sd-chip-input-max-count-font-weight': CHIP_INPUT_MAX_COUNT.fontWeight,
296
+ '--sd-chip-input-max-count-color': CHIP_INPUT_MAX_COUNT.color,
297
+ '--sd-chip-input-suggestions-radius': CHIP_INPUT_SUGGESTIONS.radius,
298
+ '--sd-chip-input-suggestions-max-height': CHIP_INPUT_SUGGESTIONS.maxHeight,
299
+ '--sd-chip-input-suggestion-padding-y': CHIP_INPUT_SUGGESTIONS.itemPaddingY,
300
+ '--sd-chip-input-suggestion-padding-x': CHIP_INPUT_SUGGESTIONS.itemPaddingX,
301
+ '--sd-chip-input-suggestion-padding-right': CHIP_INPUT_SUGGESTIONS.itemPaddingRight,
302
+ '--sd-chip-input-suggestion-gap': CHIP_INPUT_SUGGESTIONS.itemGap,
303
+ '--sd-chip-input-suggestion-font-size': CHIP_INPUT_SUGGESTIONS.itemFontSize,
304
+ '--sd-chip-input-suggestion-font-weight': CHIP_INPUT_SUGGESTIONS.itemFontWeight,
305
+ '--sd-chip-input-suggestion-font-weight-selected': CHIP_INPUT_SUGGESTIONS.itemFontWeightSelected,
306
+ '--sd-chip-input-suggestion-line-height': CHIP_INPUT_SUGGESTIONS.itemLineHeight,
307
+ '--sd-chip-input-suggestion-font-family': CHIP_INPUT_SUGGESTIONS.itemFontFamily,
308
+ '--sd-chip-input-suggestion-color': CHIP_INPUT_SUGGESTIONS.itemColor,
309
+ '--sd-chip-input-suggestion-color-hover': CHIP_INPUT_SUGGESTIONS.itemColorHover,
310
+ '--sd-chip-input-suggestion-bg-hover': CHIP_INPUT_SUGGESTIONS.itemBgHover,
311
+ '--sd-chip-input-suggestions-empty-color': CHIP_INPUT_SUGGESTIONS.emptyColor,
312
+ '--sd-chip-input-suggestions-empty-font-size': CHIP_INPUT_SUGGESTIONS.emptyFontSize,
313
+ '--sd-chip-input-suggestions-empty-line-height': CHIP_INPUT_SUGGESTIONS.emptyLineHeight,
314
+ };
315
+ const isMaxReached = this.maxCount != null && this.internalValues.length >= this.maxCount;
316
+ const showResetArea = (this.useReset && this.internalValues.length > 0) || this.maxCount != null;
317
+ const suggestions = this.suggestions ?? [];
318
+ const recommendedItems = this.recommendedItems ?? [];
319
+ const showAutocomplete = this.focused &&
320
+ this.inputValue !== '' &&
321
+ !this.suppressSuggestions &&
322
+ (suggestions.length > 0 || this.loadingSuggestions);
323
+ const showRecommendations = this.focused &&
324
+ this.inputValue === '' &&
325
+ !this.suppressRecommendations &&
326
+ (recommendedItems.length > 0 || this.loadingRecommendedItems);
327
+ const showDropdown = showAutocomplete || showRecommendations;
328
+ const dropdownItems = showAutocomplete ? suggestions : recommendedItems;
329
+ const isDropdownLoading = showAutocomplete
330
+ ? this.loadingSuggestions && suggestions.length === 0
331
+ : this.loadingRecommendedItems && recommendedItems.length === 0;
332
+ const suggestionBoxStyle = {
333
+ width: `${this.chipInputRef?.offsetWidth ?? 0}px`,
334
+ display: 'flex',
335
+ flexDirection: 'column',
336
+ boxSizing: 'border-box',
337
+ background: '#FFFFFF',
338
+ borderRadius: CHIP_INPUT_SUGGESTIONS.radius,
339
+ boxShadow: '2px 2px 12px 2px rgba(0, 0, 0, 0.1)',
340
+ maxHeight: CHIP_INPUT_SUGGESTIONS.maxHeight,
341
+ minHeight: '0',
342
+ overflowY: 'auto',
343
+ overflowX: 'hidden',
344
+ outline: 'none',
345
+ };
346
+ const suggestionItemStyle = {
347
+ display: 'flex',
348
+ alignItems: 'center',
349
+ gap: CHIP_INPUT_SUGGESTIONS.itemGap,
350
+ padding: `${CHIP_INPUT_SUGGESTIONS.itemPaddingY} ${CHIP_INPUT_SUGGESTIONS.itemPaddingRight} ` +
351
+ `${CHIP_INPUT_SUGGESTIONS.itemPaddingY} ${CHIP_INPUT_SUGGESTIONS.itemPaddingX}`,
352
+ fontSize: CHIP_INPUT_SUGGESTIONS.itemFontSize,
353
+ lineHeight: CHIP_INPUT_SUGGESTIONS.itemLineHeight,
354
+ fontWeight: CHIP_INPUT_SUGGESTIONS.itemFontWeight,
355
+ fontFamily: CHIP_INPUT_SUGGESTIONS.itemFontFamily,
356
+ color: CHIP_INPUT_SUGGESTIONS.itemColor,
357
+ cursor: 'pointer',
358
+ userSelect: 'none',
359
+ whiteSpace: 'nowrap',
360
+ overflow: 'hidden',
361
+ textOverflow: 'ellipsis',
362
+ };
363
+ const suggestionEmptyStyle = {
364
+ padding: '12px',
365
+ textAlign: 'center',
366
+ fontSize: CHIP_INPUT_SUGGESTIONS.emptyFontSize,
367
+ lineHeight: CHIP_INPUT_SUGGESTIONS.emptyLineHeight,
368
+ fontFamily: CHIP_INPUT_SUGGESTIONS.itemFontFamily,
369
+ color: CHIP_INPUT_SUGGESTIONS.emptyColor,
200
370
  };
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: {
371
+ return (h("sd-field", { key: '6ff0688cd9a076cd81693364bfeb6a98b5bf018e', 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: '0c6ae92de4dcb44ed4fbcd12f1dddef93cec12db', 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: 'df111f3110b444ed296db8c6b7f00d9209f858af', class: {
202
372
  'sd-chip-input__field': true,
203
373
  'sd-chip-input__field--filled': this.inputValue !== '',
204
374
  'sd-chip-input__field--empty': this.inputValue === '' && this.internalValues.length > 0 && !this.focused,
@@ -206,7 +376,20 @@ export class SdChipInput {
206
376
  ? this.inputValue
207
377
  : this.internalValues.length === 0
208
378
  ? 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 }))))));
379
+ : '' }, h("input", { key: '8e170c84cedab36edbdd0a84e7e2e1ac0fba9632', 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: '5b30bb4f89c9d3c9b18870acccad22bd97e1d748', class: "sd-chip-input__reset" }, this.inputValue === '' && h("span", { key: '6fbf74a5a77b70789a609d28f5c4b6dd2aab57ef', class: "sd-chip-input__divider" }), this.maxCount != null && (h("span", { key: 'fbb21a27bdd2aa38870cfd8d16b7e5293769eaf3', class: "sd-chip-input__max-count" }, "\uCD5C\uB300 ", this.maxCount, "\uAC1C")), this.useReset && this.internalValues.length > 0 && (h("sd-text-link", { key: '83626145602b13d7a00ef955a6db59f41c152529', 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: '1682a89b513098f192f776af782aa9ee432574e8', open: showDropdown, parentRef: this.chipInputRef ?? null, viewportPadding: SdChipInput.SUGGESTIONS_VIEWPORT_PADDING, onSdClose: this.closeSuggestions }, h("div", { key: '3efb484bd5616e411824f7014a759a34a9e93d8b', class: "sd-chip-input__suggestions", role: "listbox", style: suggestionBoxStyle }, isDropdownLoading && (h("div", { key: 'b5b1d5e6db03f6fe60864b6c19e9b2c753468447', class: "sd-chip-input__suggestions-empty", style: suggestionEmptyStyle }, "\uBD88\uB7EC\uC624\uB294 \uC911...")), dropdownItems.map((item, i) => (h("div", { key: item, class: {
380
+ 'sd-chip-input__suggestion-item': true,
381
+ 'sd-chip-input__suggestion-item--active': i === this.activeSuggestionIndex,
382
+ }, role: "option", tabIndex: -1, "aria-selected": i === this.activeSuggestionIndex, style: i === this.activeSuggestionIndex
383
+ ? {
384
+ ...suggestionItemStyle,
385
+ background: CHIP_INPUT_SUGGESTIONS.itemBgHover,
386
+ color: CHIP_INPUT_SUGGESTIONS.itemColorHover,
387
+ fontWeight: CHIP_INPUT_SUGGESTIONS.itemFontWeightSelected,
388
+ }
389
+ : suggestionItemStyle, onMouseDown: e => {
390
+ e.preventDefault();
391
+ this.addChip(item);
392
+ } }, item)))))))));
210
393
  }
211
394
  static get is() { return "sd-chip-input"; }
212
395
  static get originalStyleUrls() {
@@ -427,6 +610,101 @@ export class SdChipInput {
427
610
  "attribute": "use-reset",
428
611
  "defaultValue": "false"
429
612
  },
613
+ "maxCount": {
614
+ "type": "number",
615
+ "mutable": false,
616
+ "complexType": {
617
+ "original": "number",
618
+ "resolved": "number | undefined",
619
+ "references": {}
620
+ },
621
+ "required": false,
622
+ "optional": true,
623
+ "docs": {
624
+ "tags": [],
625
+ "text": ""
626
+ },
627
+ "getter": false,
628
+ "setter": false,
629
+ "reflect": false,
630
+ "attribute": "max-count"
631
+ },
632
+ "suggestions": {
633
+ "type": "unknown",
634
+ "mutable": true,
635
+ "complexType": {
636
+ "original": "string[]",
637
+ "resolved": "string[]",
638
+ "references": {}
639
+ },
640
+ "required": false,
641
+ "optional": false,
642
+ "docs": {
643
+ "tags": [],
644
+ "text": ""
645
+ },
646
+ "getter": false,
647
+ "setter": false,
648
+ "defaultValue": "[]"
649
+ },
650
+ "loadingSuggestions": {
651
+ "type": "boolean",
652
+ "mutable": false,
653
+ "complexType": {
654
+ "original": "boolean",
655
+ "resolved": "boolean",
656
+ "references": {}
657
+ },
658
+ "required": false,
659
+ "optional": false,
660
+ "docs": {
661
+ "tags": [],
662
+ "text": ""
663
+ },
664
+ "getter": false,
665
+ "setter": false,
666
+ "reflect": false,
667
+ "attribute": "loading-suggestions",
668
+ "defaultValue": "false"
669
+ },
670
+ "recommendedItems": {
671
+ "type": "unknown",
672
+ "mutable": true,
673
+ "complexType": {
674
+ "original": "string[]",
675
+ "resolved": "string[]",
676
+ "references": {}
677
+ },
678
+ "required": false,
679
+ "optional": false,
680
+ "docs": {
681
+ "tags": [],
682
+ "text": ""
683
+ },
684
+ "getter": false,
685
+ "setter": false,
686
+ "defaultValue": "[]"
687
+ },
688
+ "loadingRecommendedItems": {
689
+ "type": "boolean",
690
+ "mutable": false,
691
+ "complexType": {
692
+ "original": "boolean",
693
+ "resolved": "boolean",
694
+ "references": {}
695
+ },
696
+ "required": false,
697
+ "optional": false,
698
+ "docs": {
699
+ "tags": [],
700
+ "text": ""
701
+ },
702
+ "getter": false,
703
+ "setter": false,
704
+ "reflect": false,
705
+ "attribute": "loading-recommended-items",
706
+ "defaultValue": "false"
707
+ },
430
708
  "label": {
431
709
  "type": "string",
432
710
  "mutable": false,
@@ -622,7 +900,10 @@ export class SdChipInput {
622
900
  "internalErrors": {},
623
901
  "focused": {},
624
902
  "hovered": {},
625
- "inputValue": {}
903
+ "inputValue": {},
904
+ "activeSuggestionIndex": {},
905
+ "suppressSuggestions": {},
906
+ "suppressRecommendations": {}
626
907
  };
627
908
  }
628
909
  static get events() {
@@ -671,6 +952,21 @@ export class SdChipInput {
671
952
  "resolved": "void",
672
953
  "references": {}
673
954
  }
955
+ }, {
956
+ "method": "inputEvent",
957
+ "name": "sdInput",
958
+ "bubbles": true,
959
+ "cancelable": true,
960
+ "composed": true,
961
+ "docs": {
962
+ "tags": [],
963
+ "text": ""
964
+ },
965
+ "complexType": {
966
+ "original": "string",
967
+ "resolved": "string",
968
+ "references": {}
969
+ }
674
970
  }];
675
971
  }
676
972
  static get methods() {
@@ -753,6 +1049,12 @@ export class SdChipInput {
753
1049
  }, {
754
1050
  "propName": "errors",
755
1051
  "methodName": "errorsChanged"
1052
+ }, {
1053
+ "propName": "suggestions",
1054
+ "methodName": "suggestionsChanged"
1055
+ }, {
1056
+ "propName": "recommendedItems",
1057
+ "methodName": "recommendedItemsChanged"
756
1058
  }];
757
1059
  }
758
1060
  }
@@ -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;
@@ -2,7 +2,7 @@ import { h, } from "@stencil/core";
2
2
  import { BaseDropdownEvent } from "../../utils/base-dropdown-event";
3
3
  import { sanitizeInlineHtml } from "../../utils/html/sanitize-inline-html";
4
4
  import { BUTTON_FOCUS_RING_COLOR } from "../sd-button/sd-button.config";
5
- import { DROPDOWN_BUTTON_CONFIG, DROPDOWN_CHEVRON_ICON_SIZE, DROPDOWN_DISABLED_BACKGROUND, DROPDOWN_DISABLED_BORDER, DROPDOWN_DISABLED_ICON, DROPDOWN_DISABLED_TEXT, getDropdownButtonPreset, isDropdownButtonName, PRESET_BORDER_COLORS, PRESET_TEXT_COLORS, PRESET_ICON_COLORS, PRESET_DIVIDER_COLORS, PRESET_HOVER_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_COLORS, PRESET_MENU_ITEM_COLORS, } from "./sd-dropdown-button.config";
5
+ import { DROPDOWN_BUTTON_CONFIG, DROPDOWN_BUTTON_MIN_WIDTH, DROPDOWN_CHEVRON_ICON_SIZE, DROPDOWN_DISABLED_BACKGROUND, DROPDOWN_DISABLED_BORDER, DROPDOWN_DISABLED_ICON, DROPDOWN_DISABLED_TEXT, getDropdownButtonPreset, isDropdownButtonName, PRESET_BORDER_COLORS, PRESET_TEXT_COLORS, PRESET_ICON_COLORS, PRESET_DIVIDER_COLORS, PRESET_HOVER_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS, PRESET_MENU_ITEM_ACTIVE_COLORS, PRESET_MENU_ITEM_COLORS, } from "./sd-dropdown-button.config";
6
6
  export class SdDropdownButton extends BaseDropdownEvent {
7
7
  constructor() {
8
8
  super();
@@ -18,6 +18,7 @@ export class SdDropdownButton extends BaseDropdownEvent {
18
18
  isAnimatingOut = false;
19
19
  itemIndex = -1;
20
20
  triggerRef;
21
+ splitContainerRef;
21
22
  menuRef;
22
23
  closeAnimationTimer;
23
24
  click;
@@ -196,10 +197,11 @@ export class SdDropdownButton extends BaseDropdownEvent {
196
197
  return classes.join(' ');
197
198
  }
198
199
  renderDropdown(preset) {
199
- if ((!this.isOpen && !this.isAnimatingOut) || !this.triggerRef)
200
+ const anchorRef = this.split ? this.splitContainerRef : this.triggerRef;
201
+ if ((!this.isOpen && !this.isAnimatingOut) || !anchorRef)
200
202
  return null;
201
- return (h("sd-portal", { open: this.isOpen, parentRef: this.triggerRef, onSdClose: this.closeDropdown }, h("div", { style: { position: 'absolute', width: '0px', height: '0px' } }, h("div", { class: "sd-dropdown-button__menu", role: "menu", ref: el => (this.menuRef = el), style: {
202
- '--sd-dropdown-button-menu-min-width': `${this.triggerRef.offsetWidth}px`,
203
+ return (h("sd-portal", { open: this.isOpen, parentRef: anchorRef, onSdClose: this.closeDropdown }, h("div", { class: "sd-dropdown-button__menu", role: "menu", ref: el => (this.menuRef = el), style: {
204
+ '--sd-dropdown-button-menu-min-width': `${anchorRef.offsetWidth}px`,
203
205
  '--sd-dropdown-button-menu-item-color': PRESET_MENU_ITEM_COLORS[preset],
204
206
  '--sd-dropdown-button-menu-item-active-bg': PRESET_MENU_ITEM_ACTIVE_BACKGROUNDS[preset],
205
207
  '--sd-dropdown-button-menu-item-active-color': PRESET_MENU_ITEM_ACTIVE_COLORS[preset],
@@ -213,7 +215,7 @@ export class SdDropdownButton extends BaseDropdownEvent {
213
215
  this.itemIndex = index;
214
216
  }
215
217
  } }, item.icon && (h("sd-icon", { class: "sd-dropdown-button__menu-item-icon", name: item.icon, size: 12, color: "var(--sd-dropdown-button-menu-item-current-color)" })), h("span", { class: "sd-dropdown-button__menu-item-label", innerHTML: sanitizeInlineHtml(item.label) })));
216
- })))));
218
+ }))));
217
219
  }
218
220
  renderChevron(size) {
219
221
  const iconName = this.split ? 'etc' : 'caretDown';
@@ -225,10 +227,11 @@ export class SdDropdownButton extends BaseDropdownEvent {
225
227
  render() {
226
228
  const { config, preset } = this.resolvedConfig;
227
229
  const triggerStyle = this.getTriggerStyle(config, preset);
230
+ const minWidth = DROPDOWN_BUTTON_MIN_WIDTH[config.size];
228
231
  if (this.split) {
229
- return (h("div", { class: "sd-dropdown-button sd-dropdown-button--split" }, h("button", { type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen, 'label'), disabled: this.disabled, onClick: this.handleButtonClick, style: triggerStyle }, h("span", { class: "sd-dropdown-button__trigger-label" }, this.label)), h("button", { type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen, 'chevron'), disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": String(this.isOpen), "aria-label": "dropdown toggle", onClick: this.toggleDropdown, ref: el => (this.triggerRef = el), style: triggerStyle }, this.renderChevron(config.size)), this.renderDropdown(preset)));
232
+ return (h("div", { class: "sd-dropdown-button sd-dropdown-button--split", ref: el => (this.splitContainerRef = el), style: { minWidth: `${minWidth.split}px` } }, h("button", { type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen, 'label'), disabled: this.disabled, onClick: this.handleButtonClick, style: triggerStyle }, h("span", { class: "sd-dropdown-button__trigger-label" }, this.label)), h("button", { type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen, 'chevron'), disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": String(this.isOpen), "aria-label": "dropdown toggle", onClick: this.toggleDropdown, ref: el => (this.triggerRef = el), style: triggerStyle }, this.renderChevron(config.size)), this.renderDropdown(preset)));
230
233
  }
231
- return (h("div", { class: "sd-dropdown-button" }, h("button", { type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen), disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": String(this.isOpen), onClick: this.toggleDropdown, ref: el => (this.triggerRef = el), style: triggerStyle }, h("span", { class: "sd-dropdown-button__trigger-label" }, this.label), this.renderChevron(config.size)), this.renderDropdown(preset)));
234
+ return (h("div", { class: "sd-dropdown-button" }, h("button", { type: "button", class: this.getTriggerClasses(preset, config.size, this.disabled, this.isOpen), disabled: this.disabled, "aria-haspopup": "menu", "aria-expanded": String(this.isOpen), onClick: this.toggleDropdown, ref: el => (this.triggerRef = el), style: { ...triggerStyle, minWidth: `${minWidth.default}px` } }, h("span", { class: "sd-dropdown-button__trigger-label" }, this.label), this.renderChevron(config.size)), this.renderDropdown(preset)));
232
235
  }
233
236
  static get is() { return "sd-dropdown-button"; }
234
237
  static get originalStyleUrls() {