monobill-mintui 0.6.612 → 0.6.613

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 (623) hide show
  1. package/README.md +76 -302
  2. package/bin/component-dependencies.json +131 -0
  3. package/bin/mint-ui.js +446 -0
  4. package/dist/alert.css +3 -0
  5. package/dist/back-button.css +3 -0
  6. package/dist/bottom-navigation.css +3 -0
  7. package/dist/button.css +3 -0
  8. package/dist/card.css +3 -0
  9. package/dist/chart.css +3 -0
  10. package/dist/checkbox.css +3 -0
  11. package/dist/chip.css +3 -0
  12. package/dist/choice.css +3 -0
  13. package/dist/clickable.css +3 -0
  14. package/dist/collapsible.css +3 -0
  15. package/dist/components/alert/Alert.d.ts +1 -32
  16. package/dist/components/alert/Alert.d.ts.map +10 -1
  17. package/dist/components/alert/browser.js +167 -0
  18. package/dist/components/alert/index.cjs +1 -0
  19. package/dist/components/alert/index.d.ts +1 -3
  20. package/dist/components/alert/index.d.ts.map +10 -1
  21. package/dist/components/alert/index.js +155 -0
  22. package/dist/components/back-button/BackButton.d.ts +1 -18
  23. package/dist/components/back-button/BackButton.d.ts.map +10 -1
  24. package/dist/components/back-button/browser.js +241 -0
  25. package/dist/components/back-button/index.cjs +1 -0
  26. package/dist/components/back-button/index.d.ts +1 -3
  27. package/dist/components/back-button/index.d.ts.map +10 -1
  28. package/dist/components/back-button/index.js +229 -0
  29. package/dist/components/bottom-navigation/BottomNavigation.d.ts +1 -10
  30. package/dist/components/bottom-navigation/BottomNavigation.d.ts.map +10 -1
  31. package/dist/components/bottom-navigation/browser.js +97 -0
  32. package/dist/components/bottom-navigation/index.cjs +1 -0
  33. package/dist/components/bottom-navigation/index.d.ts +2 -5
  34. package/dist/components/bottom-navigation/index.d.ts.map +10 -1
  35. package/dist/components/bottom-navigation/index.js +85 -0
  36. package/dist/components/button/Button.d.ts +1 -57
  37. package/dist/components/button/Button.d.ts.map +10 -1
  38. package/dist/components/button/browser.js +18 -0
  39. package/dist/components/button/index.cjs +1 -0
  40. package/dist/components/button/index.d.ts +1 -3
  41. package/dist/components/button/index.d.ts.map +10 -1
  42. package/dist/components/button/index.js +6 -0
  43. package/dist/components/card/Card.d.ts +1 -17
  44. package/dist/components/card/Card.d.ts.map +10 -1
  45. package/dist/components/card/browser.js +25 -0
  46. package/dist/components/card/index.cjs +1 -0
  47. package/dist/components/card/index.d.ts +1 -3
  48. package/dist/components/card/index.d.ts.map +10 -1
  49. package/dist/components/card/index.js +13 -0
  50. package/dist/components/chart/Chart.d.ts +1 -291
  51. package/dist/components/chart/Chart.d.ts.map +10 -1
  52. package/dist/components/chart/browser.js +1331 -0
  53. package/dist/components/chart/index.cjs +37 -0
  54. package/dist/components/chart/index.d.ts +1 -3
  55. package/dist/components/chart/index.d.ts.map +10 -1
  56. package/dist/components/chart/index.js +1319 -0
  57. package/dist/components/checkbox/Checkbox.d.ts +1 -41
  58. package/dist/components/checkbox/Checkbox.d.ts.map +10 -1
  59. package/dist/components/checkbox/browser.js +162 -0
  60. package/dist/components/checkbox/index.cjs +1 -0
  61. package/dist/components/checkbox/index.d.ts +1 -3
  62. package/dist/components/checkbox/index.d.ts.map +10 -1
  63. package/dist/components/checkbox/index.js +150 -0
  64. package/dist/components/chip/Chip.d.ts +1 -16
  65. package/dist/components/chip/Chip.d.ts.map +10 -1
  66. package/dist/components/chip/browser.js +17 -0
  67. package/dist/components/chip/index.cjs +1 -0
  68. package/dist/components/chip/index.d.ts +1 -3
  69. package/dist/components/chip/index.d.ts.map +10 -1
  70. package/dist/components/chip/index.js +5 -0
  71. package/dist/components/choice/Choice.d.ts +1 -27
  72. package/dist/components/choice/Choice.d.ts.map +10 -1
  73. package/dist/components/choice/browser.js +272 -0
  74. package/dist/components/choice/index.cjs +1 -0
  75. package/dist/components/choice/index.d.ts +1 -5
  76. package/dist/components/choice/index.d.ts.map +10 -1
  77. package/dist/components/choice/index.js +260 -0
  78. package/dist/components/chunks/button-B0Yt0MX1.js +380 -0
  79. package/dist/components/chunks/button-BlbLHMts.js +1 -0
  80. package/dist/components/chunks/caret-down-BN9cl4o4.js +1 -0
  81. package/dist/components/chunks/caret-down-Ch6IfR7r.js +9 -0
  82. package/dist/components/chunks/caret-right-CDUwqoen.js +1 -0
  83. package/dist/components/chunks/caret-right-CVOgr4nk.js +9 -0
  84. package/dist/components/chunks/caret-up-3XCuTXSE.js +1 -0
  85. package/dist/components/chunks/caret-up-D_6oa7o1.js +9 -0
  86. package/dist/components/chunks/chip-B04bJM4r.js +1 -0
  87. package/dist/components/chunks/chip-B9whjEvW.js +54 -0
  88. package/dist/components/chunks/close-5tYlQdkk.js +1 -0
  89. package/dist/components/chunks/close-Dg6U0IjZ.js +10 -0
  90. package/dist/components/chunks/icon-C0OLmjDY.js +1 -0
  91. package/dist/components/chunks/icon-CyzR9aVl.js +1 -0
  92. package/dist/components/chunks/icon-dG8sLTBn.js +27 -0
  93. package/dist/components/chunks/icon-gQAtsERy.js +1324 -0
  94. package/dist/components/chunks/input-8bbXzpa5.js +334 -0
  95. package/dist/components/chunks/input-BoiREc6Y.js +1 -0
  96. package/dist/components/chunks/link-BxhPnVaz.js +1 -0
  97. package/dist/components/chunks/link-DKgtBYK6.js +38 -0
  98. package/dist/components/chunks/modal-B8gNdwEl.js +153 -0
  99. package/dist/components/chunks/modal-WYWvk2lZ.js +1 -0
  100. package/dist/components/chunks/popover-BeaGf_JC.js +1 -0
  101. package/dist/components/chunks/popover-gviDCspV.js +188 -0
  102. package/dist/components/chunks/register-element-BFYmIynH.js +53 -0
  103. package/dist/components/chunks/register-element-tCL_F1YI.js +1 -0
  104. package/dist/components/chunks/search-ANUKQi0r.js +9 -0
  105. package/dist/components/chunks/search-B3egXuw4.js +1 -0
  106. package/dist/components/chunks/spinner-BsaFHuS6.js +108 -0
  107. package/dist/components/chunks/spinner-DbTohC6i.js +63 -0
  108. package/dist/components/chunks/stack-D1uh4L79.js +1 -0
  109. package/dist/components/chunks/stack-DyQfjPDh.js +53 -0
  110. package/dist/components/chunks/table-BgboosRK.js +65 -0
  111. package/dist/components/chunks/table-DDUNUwGd.js +1 -0
  112. package/dist/components/chunks/text-BHkEs8U5.js +67 -0
  113. package/dist/components/chunks/text-BmHZbBMo.js +1 -0
  114. package/dist/components/clickable/Clickable.d.ts +1 -14
  115. package/dist/components/clickable/Clickable.d.ts.map +10 -1
  116. package/dist/components/clickable/browser.js +78 -0
  117. package/dist/components/clickable/index.cjs +1 -0
  118. package/dist/components/clickable/index.d.ts +1 -3
  119. package/dist/components/clickable/index.d.ts.map +10 -1
  120. package/dist/components/clickable/index.js +66 -0
  121. package/dist/components/collapsible/Collapsible.d.ts +1 -28
  122. package/dist/components/collapsible/Collapsible.d.ts.map +10 -1
  123. package/dist/components/collapsible/browser.js +170 -0
  124. package/dist/components/collapsible/index.cjs +1 -0
  125. package/dist/components/collapsible/index.d.ts +1 -3
  126. package/dist/components/collapsible/index.d.ts.map +10 -1
  127. package/dist/components/collapsible/index.js +158 -0
  128. package/dist/components/confirm-action/ConfirmAction.d.ts +1 -27
  129. package/dist/components/confirm-action/ConfirmAction.d.ts.map +10 -1
  130. package/dist/components/confirm-action/browser.js +130 -0
  131. package/dist/components/confirm-action/index.cjs +1 -0
  132. package/dist/components/confirm-action/index.d.ts +2 -3
  133. package/dist/components/confirm-action/index.d.ts.map +10 -1
  134. package/dist/components/confirm-action/index.js +118 -0
  135. package/dist/components/date-picker/DatePicker.d.ts +1 -130
  136. package/dist/components/date-picker/DatePicker.d.ts.map +10 -1
  137. package/dist/components/date-picker/browser.js +1288 -0
  138. package/dist/components/date-picker/index.cjs +1 -0
  139. package/dist/components/date-picker/index.d.ts +1 -3
  140. package/dist/components/date-picker/index.d.ts.map +10 -1
  141. package/dist/components/date-picker/index.js +1276 -0
  142. package/dist/components/dropzone/Dropzone.d.ts +1 -59
  143. package/dist/components/dropzone/Dropzone.d.ts.map +10 -1
  144. package/dist/components/dropzone/browser.js +355 -0
  145. package/dist/components/dropzone/index.cjs +1 -0
  146. package/dist/components/dropzone/index.d.ts +1 -3
  147. package/dist/components/dropzone/index.d.ts.map +10 -1
  148. package/dist/components/dropzone/index.js +343 -0
  149. package/dist/components/form/Form.d.ts +1 -133
  150. package/dist/components/form/Form.d.ts.map +10 -1
  151. package/dist/components/form/browser.js +1002 -0
  152. package/dist/components/form/index.cjs +1 -0
  153. package/dist/components/form/index.d.ts +1 -3
  154. package/dist/components/form/index.d.ts.map +10 -1
  155. package/dist/components/form/index.js +990 -0
  156. package/dist/components/grid/Grid.d.ts +1 -16
  157. package/dist/components/grid/Grid.d.ts.map +10 -1
  158. package/dist/components/grid/browser.js +24 -0
  159. package/dist/components/grid/index.cjs +1 -0
  160. package/dist/components/grid/index.d.ts +1 -3
  161. package/dist/components/grid/index.d.ts.map +10 -1
  162. package/dist/components/grid/index.js +12 -0
  163. package/dist/components/icon/Icon.d.ts +1 -16
  164. package/dist/components/icon/Icon.d.ts.map +10 -1
  165. package/dist/components/icon/browser.js +16 -0
  166. package/dist/components/icon/index.cjs +1 -0
  167. package/dist/components/icon/index.d.ts +2 -3
  168. package/dist/components/icon/index.d.ts.map +10 -1
  169. package/dist/components/icon/index.js +4 -0
  170. package/dist/components/input/Input.d.ts +1 -68
  171. package/dist/components/input/Input.d.ts.map +10 -1
  172. package/dist/components/input/browser.js +17 -0
  173. package/dist/components/input/index.cjs +1 -0
  174. package/dist/components/input/index.d.ts +1 -3
  175. package/dist/components/input/index.d.ts.map +10 -1
  176. package/dist/components/input/index.js +5 -0
  177. package/dist/components/link/Link.d.ts +1 -16
  178. package/dist/components/link/Link.d.ts.map +10 -1
  179. package/dist/components/link/browser.js +16 -0
  180. package/dist/components/link/index.cjs +1 -0
  181. package/dist/components/link/index.d.ts +1 -3
  182. package/dist/components/link/index.d.ts.map +10 -1
  183. package/dist/components/link/index.js +4 -0
  184. package/dist/components/modal/Modal.d.ts +1 -38
  185. package/dist/components/modal/Modal.d.ts.map +10 -1
  186. package/dist/components/modal/browser.js +21 -0
  187. package/dist/components/modal/index.cjs +1 -0
  188. package/dist/components/modal/index.d.ts +1 -3
  189. package/dist/components/modal/index.d.ts.map +10 -1
  190. package/dist/components/modal/index.js +9 -0
  191. package/dist/components/navigation/Navigation.d.ts +1 -0
  192. package/dist/components/navigation/Navigation.d.ts.map +10 -0
  193. package/dist/components/navigation/browser.js +198 -0
  194. package/dist/components/navigation/index.cjs +1 -0
  195. package/dist/components/navigation/index.d.ts +1 -0
  196. package/dist/components/navigation/index.d.ts.map +10 -0
  197. package/dist/components/navigation/index.js +186 -0
  198. package/dist/components/off-canvas/OffCanvas.d.ts +1 -46
  199. package/dist/components/off-canvas/OffCanvas.d.ts.map +10 -1
  200. package/dist/components/off-canvas/browser.js +192 -0
  201. package/dist/components/off-canvas/index.cjs +1 -0
  202. package/dist/components/off-canvas/index.d.ts +1 -3
  203. package/dist/components/off-canvas/index.d.ts.map +10 -1
  204. package/dist/components/off-canvas/index.js +180 -0
  205. package/dist/components/page/Page.d.ts +1 -37
  206. package/dist/components/page/Page.d.ts.map +10 -1
  207. package/dist/components/page/browser.js +74 -0
  208. package/dist/components/page/index.cjs +16 -0
  209. package/dist/components/page/index.d.ts +1 -3
  210. package/dist/components/page/index.d.ts.map +10 -1
  211. package/dist/components/page/index.js +62 -0
  212. package/dist/components/popover/Popover.d.ts +1 -64
  213. package/dist/components/popover/Popover.d.ts.map +10 -1
  214. package/dist/components/popover/browser.js +17 -0
  215. package/dist/components/popover/index.cjs +1 -0
  216. package/dist/components/popover/index.d.ts +1 -3
  217. package/dist/components/popover/index.d.ts.map +10 -1
  218. package/dist/components/popover/index.js +5 -0
  219. package/dist/components/resource-table/ResourceTable.d.ts +1 -327
  220. package/dist/components/resource-table/ResourceTable.d.ts.map +10 -1
  221. package/dist/components/resource-table/browser.js +1457 -0
  222. package/dist/components/resource-table/index.cjs +2 -0
  223. package/dist/components/resource-table/index.d.ts +1 -4
  224. package/dist/components/resource-table/index.d.ts.map +10 -1
  225. package/dist/components/resource-table/index.js +1445 -0
  226. package/dist/components/search/Search.d.ts +1 -151
  227. package/dist/components/search/Search.d.ts.map +10 -1
  228. package/dist/components/search/browser.js +681 -0
  229. package/dist/components/search/index.cjs +1 -0
  230. package/dist/components/search/index.d.ts +1 -3
  231. package/dist/components/search/index.d.ts.map +10 -1
  232. package/dist/components/search/index.js +669 -0
  233. package/dist/components/select/Select.d.ts +1 -37
  234. package/dist/components/select/Select.d.ts.map +10 -1
  235. package/dist/components/select/browser.js +285 -0
  236. package/dist/components/select/index.cjs +1 -0
  237. package/dist/components/select/index.d.ts +1 -3
  238. package/dist/components/select/index.d.ts.map +10 -1
  239. package/dist/components/select/index.js +273 -0
  240. package/dist/components/side-navigation/SideNavigation.d.ts +1 -52
  241. package/dist/components/side-navigation/SideNavigation.d.ts.map +10 -1
  242. package/dist/components/side-navigation/browser.js +466 -0
  243. package/dist/components/side-navigation/index.cjs +1 -0
  244. package/dist/components/side-navigation/index.d.ts +5 -8
  245. package/dist/components/side-navigation/index.d.ts.map +10 -1
  246. package/dist/components/side-navigation/index.js +454 -0
  247. package/dist/components/sortable/Sortable.d.ts +1 -62
  248. package/dist/components/sortable/Sortable.d.ts.map +10 -1
  249. package/dist/components/sortable/browser.js +340 -0
  250. package/dist/components/sortable/index.cjs +1 -0
  251. package/dist/components/sortable/index.d.ts +1 -3
  252. package/dist/components/sortable/index.d.ts.map +10 -1
  253. package/dist/components/sortable/index.js +328 -0
  254. package/dist/components/spinner/Spinner.d.ts +1 -13
  255. package/dist/components/spinner/Spinner.d.ts.map +10 -1
  256. package/dist/components/spinner/browser.js +16 -0
  257. package/dist/components/spinner/index.cjs +1 -0
  258. package/dist/components/spinner/index.d.ts +1 -3
  259. package/dist/components/spinner/index.d.ts.map +10 -1
  260. package/dist/components/spinner/index.js +4 -0
  261. package/dist/components/stack/Stack.d.ts +1 -23
  262. package/dist/components/stack/Stack.d.ts.map +10 -1
  263. package/dist/components/stack/browser.js +16 -0
  264. package/dist/components/stack/index.cjs +1 -0
  265. package/dist/components/stack/index.d.ts +1 -3
  266. package/dist/components/stack/index.d.ts.map +10 -1
  267. package/dist/components/stack/index.js +4 -0
  268. package/dist/components/switch/Switch.d.ts +1 -33
  269. package/dist/components/switch/Switch.d.ts.map +10 -1
  270. package/dist/components/switch/browser.js +203 -0
  271. package/dist/components/switch/index.cjs +1 -0
  272. package/dist/components/switch/index.d.ts +1 -3
  273. package/dist/components/switch/index.d.ts.map +10 -1
  274. package/dist/components/switch/index.js +191 -0
  275. package/dist/components/table/Table.d.ts +1 -11
  276. package/dist/components/table/Table.d.ts.map +10 -1
  277. package/dist/components/table/browser.js +16 -0
  278. package/dist/components/table/index.cjs +1 -0
  279. package/dist/components/table/index.d.ts +1 -3
  280. package/dist/components/table/index.d.ts.map +10 -1
  281. package/dist/components/table/index.js +4 -0
  282. package/dist/components/tabs/Tabs.d.ts +1 -20
  283. package/dist/components/tabs/Tabs.d.ts.map +10 -1
  284. package/dist/components/tabs/browser.js +251 -0
  285. package/dist/components/tabs/index.cjs +1 -0
  286. package/dist/components/tabs/index.d.ts +4 -9
  287. package/dist/components/tabs/index.d.ts.map +10 -1
  288. package/dist/components/tabs/index.js +239 -0
  289. package/dist/components/tags/Tags.d.ts +1 -82
  290. package/dist/components/tags/Tags.d.ts.map +10 -1
  291. package/dist/components/tags/browser.js +416 -0
  292. package/dist/components/tags/index.cjs +1 -0
  293. package/dist/components/tags/index.d.ts +1 -3
  294. package/dist/components/tags/index.d.ts.map +10 -1
  295. package/dist/components/tags/index.js +404 -0
  296. package/dist/components/text/Text.d.ts +1 -25
  297. package/dist/components/text/Text.d.ts.map +10 -1
  298. package/dist/components/text/browser.js +16 -0
  299. package/dist/components/text/index.cjs +1 -0
  300. package/dist/components/text/index.d.ts +1 -3
  301. package/dist/components/text/index.d.ts.map +10 -1
  302. package/dist/components/text/index.js +4 -0
  303. package/dist/components/time-picker/TimePicker.d.ts +1 -61
  304. package/dist/components/time-picker/TimePicker.d.ts.map +10 -1
  305. package/dist/components/time-picker/browser.js +366 -0
  306. package/dist/components/time-picker/index.cjs +1 -0
  307. package/dist/components/time-picker/index.d.ts +1 -3
  308. package/dist/components/time-picker/index.d.ts.map +10 -1
  309. package/dist/components/time-picker/index.js +354 -0
  310. package/dist/components/toast/Toast.d.ts +1 -21
  311. package/dist/components/toast/Toast.d.ts.map +10 -1
  312. package/dist/components/toast/browser.js +147 -0
  313. package/dist/components/toast/index.cjs +3 -0
  314. package/dist/components/toast/index.d.ts +3 -3
  315. package/dist/components/toast/index.d.ts.map +10 -1
  316. package/dist/components/toast/index.js +135 -0
  317. package/dist/confirm-action.css +3 -0
  318. package/dist/date-picker.css +3 -0
  319. package/dist/dropzone.css +3 -0
  320. package/dist/form.css +3 -0
  321. package/dist/grid.css +3 -0
  322. package/dist/icon.css +3 -0
  323. package/dist/icons/ai.svg +5 -6
  324. package/dist/icons/bank.svg +1 -1
  325. package/dist/icons/barcode.svg +1 -1
  326. package/dist/icons/basket.svg +1 -1
  327. package/dist/icons/building.svg +1 -1
  328. package/dist/icons/buildings.svg +1 -1
  329. package/dist/icons/calendar.svg +1 -1
  330. package/dist/icons/cash.svg +3 -0
  331. package/dist/icons/check.svg +1 -1
  332. package/dist/icons/close.svg +1 -1
  333. package/dist/icons/coupon.svg +3 -0
  334. package/dist/icons/delivery-location.svg +3 -0
  335. package/dist/icons/desktop.svg +3 -0
  336. package/dist/icons/dollar-sign.svg +1 -1
  337. package/dist/icons/edit.svg +1 -1
  338. package/dist/icons/gift.svg +3 -0
  339. package/dist/icons/grip-lines.svg +2 -2
  340. package/dist/icons/heart.svg +3 -0
  341. package/dist/icons/installments.svg +3 -0
  342. package/dist/icons/inventory.svg +3 -0
  343. package/dist/icons/invoice.svg +3 -0
  344. package/dist/icons/loyalty-points.svg +3 -0
  345. package/dist/icons/membership.svg +3 -0
  346. package/dist/icons/mobile.svg +3 -0
  347. package/dist/icons/order-tracking.svg +7 -0
  348. package/dist/icons/out-of-stock.svg +3 -0
  349. package/dist/icons/package.svg +3 -0
  350. package/dist/icons/percent-discount.svg +3 -0
  351. package/dist/icons/pickup.svg +3 -0
  352. package/dist/icons/plus.svg +1 -1
  353. package/dist/icons/price-label.svg +3 -0
  354. package/dist/icons/product-review.svg +3 -0
  355. package/dist/icons/receipt.svg +3 -0
  356. package/dist/icons/refund.svg +3 -0
  357. package/dist/icons/remove.svg +1 -1
  358. package/dist/icons/return.svg +3 -0
  359. package/dist/icons/sale-burst.svg +3 -0
  360. package/dist/icons/secure-checkout.svg +3 -0
  361. package/dist/icons/shopping-bag.svg +3 -0
  362. package/dist/icons/shopping-cart.svg +3 -0
  363. package/dist/icons/storefront.svg +3 -0
  364. package/dist/icons/support.svg +3 -0
  365. package/dist/icons/tablet.svg +3 -0
  366. package/dist/icons/wallet.svg +3 -0
  367. package/dist/icons/warehouse.svg +3 -0
  368. package/dist/index.cjs +83 -79
  369. package/dist/index.css +253 -0
  370. package/dist/index.d.ts +94 -91
  371. package/dist/index.d.ts.map +10 -1
  372. package/dist/index.js +10695 -10239
  373. package/dist/input.css +3 -0
  374. package/dist/link.css +3 -0
  375. package/dist/mintui-elements.d.ts +156 -0
  376. package/dist/mintui-elements.d.ts.map +10 -0
  377. package/dist/modal.css +3 -0
  378. package/dist/navigation.css +3 -0
  379. package/dist/off-canvas.css +3 -0
  380. package/dist/page.css +3 -0
  381. package/dist/popover.css +3 -0
  382. package/dist/resource-table.css +3 -0
  383. package/dist/search.css +3 -0
  384. package/dist/select.css +3 -0
  385. package/dist/side-navigation.css +3 -0
  386. package/dist/sortable.css +3 -0
  387. package/dist/spinner.css +3 -0
  388. package/dist/stack.css +3 -0
  389. package/dist/switch.css +3 -0
  390. package/dist/table.css +3 -0
  391. package/dist/tabs.css +3 -0
  392. package/dist/tags.css +3 -0
  393. package/dist/text.css +3 -0
  394. package/dist/theme.css +101 -0
  395. package/dist/time-picker.css +3 -0
  396. package/dist/toast.css +3 -0
  397. package/package.json +379 -30
  398. package/dist/components/bottom-navigation/BottomNavItem.d.ts +0 -14
  399. package/dist/components/bottom-navigation/BottomNavItem.d.ts.map +0 -1
  400. package/dist/components/choice/ChoiceOption.d.ts +0 -30
  401. package/dist/components/choice/ChoiceOption.d.ts.map +0 -1
  402. package/dist/components/confirm-action/ConfirmActionApi.d.ts +0 -17
  403. package/dist/components/confirm-action/ConfirmActionApi.d.ts.map +0 -1
  404. package/dist/components/icon/build-icons.d.ts +0 -2
  405. package/dist/components/icon/build-icons.d.ts.map +0 -1
  406. package/dist/components/icon/icons/ai.d.ts +0 -3
  407. package/dist/components/icon/icons/ai.d.ts.map +0 -1
  408. package/dist/components/icon/icons/archive.d.ts +0 -3
  409. package/dist/components/icon/icons/archive.d.ts.map +0 -1
  410. package/dist/components/icon/icons/arrow-down.d.ts +0 -3
  411. package/dist/components/icon/icons/arrow-down.d.ts.map +0 -1
  412. package/dist/components/icon/icons/arrow-left.d.ts +0 -3
  413. package/dist/components/icon/icons/arrow-left.d.ts.map +0 -1
  414. package/dist/components/icon/icons/arrow-right.d.ts +0 -3
  415. package/dist/components/icon/icons/arrow-right.d.ts.map +0 -1
  416. package/dist/components/icon/icons/arrow-up.d.ts +0 -3
  417. package/dist/components/icon/icons/arrow-up.d.ts.map +0 -1
  418. package/dist/components/icon/icons/attach.d.ts +0 -3
  419. package/dist/components/icon/icons/attach.d.ts.map +0 -1
  420. package/dist/components/icon/icons/bank.d.ts +0 -3
  421. package/dist/components/icon/icons/bank.d.ts.map +0 -1
  422. package/dist/components/icon/icons/barcode.d.ts +0 -3
  423. package/dist/components/icon/icons/barcode.d.ts.map +0 -1
  424. package/dist/components/icon/icons/basket.d.ts +0 -3
  425. package/dist/components/icon/icons/basket.d.ts.map +0 -1
  426. package/dist/components/icon/icons/bookmark.d.ts +0 -3
  427. package/dist/components/icon/icons/bookmark.d.ts.map +0 -1
  428. package/dist/components/icon/icons/building.d.ts +0 -3
  429. package/dist/components/icon/icons/building.d.ts.map +0 -1
  430. package/dist/components/icon/icons/buildings.d.ts +0 -3
  431. package/dist/components/icon/icons/buildings.d.ts.map +0 -1
  432. package/dist/components/icon/icons/bullhorn.d.ts +0 -3
  433. package/dist/components/icon/icons/bullhorn.d.ts.map +0 -1
  434. package/dist/components/icon/icons/calendar-day.d.ts +0 -3
  435. package/dist/components/icon/icons/calendar-day.d.ts.map +0 -1
  436. package/dist/components/icon/icons/calendar-empty.d.ts +0 -3
  437. package/dist/components/icon/icons/calendar-empty.d.ts.map +0 -1
  438. package/dist/components/icon/icons/calendar-week.d.ts +0 -3
  439. package/dist/components/icon/icons/calendar-week.d.ts.map +0 -1
  440. package/dist/components/icon/icons/calendar.d.ts +0 -3
  441. package/dist/components/icon/icons/calendar.d.ts.map +0 -1
  442. package/dist/components/icon/icons/caret-down.d.ts +0 -3
  443. package/dist/components/icon/icons/caret-down.d.ts.map +0 -1
  444. package/dist/components/icon/icons/caret-left.d.ts +0 -3
  445. package/dist/components/icon/icons/caret-left.d.ts.map +0 -1
  446. package/dist/components/icon/icons/caret-right.d.ts +0 -3
  447. package/dist/components/icon/icons/caret-right.d.ts.map +0 -1
  448. package/dist/components/icon/icons/caret-up.d.ts +0 -3
  449. package/dist/components/icon/icons/caret-up.d.ts.map +0 -1
  450. package/dist/components/icon/icons/chart-bar.d.ts +0 -3
  451. package/dist/components/icon/icons/chart-bar.d.ts.map +0 -1
  452. package/dist/components/icon/icons/chart-line.d.ts +0 -3
  453. package/dist/components/icon/icons/chart-line.d.ts.map +0 -1
  454. package/dist/components/icon/icons/chat.d.ts +0 -3
  455. package/dist/components/icon/icons/chat.d.ts.map +0 -1
  456. package/dist/components/icon/icons/check.d.ts +0 -3
  457. package/dist/components/icon/icons/check.d.ts.map +0 -1
  458. package/dist/components/icon/icons/clock.d.ts +0 -3
  459. package/dist/components/icon/icons/clock.d.ts.map +0 -1
  460. package/dist/components/icon/icons/close.d.ts +0 -3
  461. package/dist/components/icon/icons/close.d.ts.map +0 -1
  462. package/dist/components/icon/icons/copy.d.ts +0 -3
  463. package/dist/components/icon/icons/copy.d.ts.map +0 -1
  464. package/dist/components/icon/icons/credit-card.d.ts +0 -3
  465. package/dist/components/icon/icons/credit-card.d.ts.map +0 -1
  466. package/dist/components/icon/icons/delete.d.ts +0 -3
  467. package/dist/components/icon/icons/delete.d.ts.map +0 -1
  468. package/dist/components/icon/icons/desktop-screen.d.ts +0 -3
  469. package/dist/components/icon/icons/desktop-screen.d.ts.map +0 -1
  470. package/dist/components/icon/icons/documentation.d.ts +0 -3
  471. package/dist/components/icon/icons/documentation.d.ts.map +0 -1
  472. package/dist/components/icon/icons/dollar-sign.d.ts +0 -3
  473. package/dist/components/icon/icons/dollar-sign.d.ts.map +0 -1
  474. package/dist/components/icon/icons/download.d.ts +0 -3
  475. package/dist/components/icon/icons/download.d.ts.map +0 -1
  476. package/dist/components/icon/icons/duplicate.d.ts +0 -3
  477. package/dist/components/icon/icons/duplicate.d.ts.map +0 -1
  478. package/dist/components/icon/icons/edit.d.ts +0 -3
  479. package/dist/components/icon/icons/edit.d.ts.map +0 -1
  480. package/dist/components/icon/icons/ellipsis.d.ts +0 -3
  481. package/dist/components/icon/icons/ellipsis.d.ts.map +0 -1
  482. package/dist/components/icon/icons/error.d.ts +0 -3
  483. package/dist/components/icon/icons/error.d.ts.map +0 -1
  484. package/dist/components/icon/icons/external-link.d.ts +0 -3
  485. package/dist/components/icon/icons/external-link.d.ts.map +0 -1
  486. package/dist/components/icon/icons/eye.d.ts +0 -3
  487. package/dist/components/icon/icons/eye.d.ts.map +0 -1
  488. package/dist/components/icon/icons/file.d.ts +0 -3
  489. package/dist/components/icon/icons/file.d.ts.map +0 -1
  490. package/dist/components/icon/icons/filter.d.ts +0 -3
  491. package/dist/components/icon/icons/filter.d.ts.map +0 -1
  492. package/dist/components/icon/icons/folder.d.ts +0 -3
  493. package/dist/components/icon/icons/folder.d.ts.map +0 -1
  494. package/dist/components/icon/icons/gavel.d.ts +0 -3
  495. package/dist/components/icon/icons/gavel.d.ts.map +0 -1
  496. package/dist/components/icon/icons/globe.d.ts +0 -3
  497. package/dist/components/icon/icons/globe.d.ts.map +0 -1
  498. package/dist/components/icon/icons/grid.d.ts +0 -3
  499. package/dist/components/icon/icons/grid.d.ts.map +0 -1
  500. package/dist/components/icon/icons/grip-lines.d.ts +0 -3
  501. package/dist/components/icon/icons/grip-lines.d.ts.map +0 -1
  502. package/dist/components/icon/icons/help.d.ts +0 -3
  503. package/dist/components/icon/icons/help.d.ts.map +0 -1
  504. package/dist/components/icon/icons/home.d.ts +0 -3
  505. package/dist/components/icon/icons/home.d.ts.map +0 -1
  506. package/dist/components/icon/icons/image.d.ts +0 -3
  507. package/dist/components/icon/icons/image.d.ts.map +0 -1
  508. package/dist/components/icon/icons/index.cjs +0 -34
  509. package/dist/components/icon/icons/index.d.ts +0 -92
  510. package/dist/components/icon/icons/index.d.ts.map +0 -1
  511. package/dist/components/icon/icons/index.js +0 -752
  512. package/dist/components/icon/icons/info.d.ts +0 -3
  513. package/dist/components/icon/icons/info.d.ts.map +0 -1
  514. package/dist/components/icon/icons/language.d.ts +0 -3
  515. package/dist/components/icon/icons/language.d.ts.map +0 -1
  516. package/dist/components/icon/icons/line-chart.d.ts +0 -3
  517. package/dist/components/icon/icons/line-chart.d.ts.map +0 -1
  518. package/dist/components/icon/icons/link.d.ts +0 -3
  519. package/dist/components/icon/icons/link.d.ts.map +0 -1
  520. package/dist/components/icon/icons/list.d.ts +0 -3
  521. package/dist/components/icon/icons/list.d.ts.map +0 -1
  522. package/dist/components/icon/icons/location.d.ts +0 -3
  523. package/dist/components/icon/icons/location.d.ts.map +0 -1
  524. package/dist/components/icon/icons/lock.d.ts +0 -3
  525. package/dist/components/icon/icons/lock.d.ts.map +0 -1
  526. package/dist/components/icon/icons/login.d.ts +0 -3
  527. package/dist/components/icon/icons/login.d.ts.map +0 -1
  528. package/dist/components/icon/icons/logout.d.ts +0 -3
  529. package/dist/components/icon/icons/logout.d.ts.map +0 -1
  530. package/dist/components/icon/icons/mail.d.ts +0 -3
  531. package/dist/components/icon/icons/mail.d.ts.map +0 -1
  532. package/dist/components/icon/icons/map.d.ts +0 -3
  533. package/dist/components/icon/icons/map.d.ts.map +0 -1
  534. package/dist/components/icon/icons/menu.d.ts +0 -3
  535. package/dist/components/icon/icons/menu.d.ts.map +0 -1
  536. package/dist/components/icon/icons/moon.d.ts +0 -3
  537. package/dist/components/icon/icons/moon.d.ts.map +0 -1
  538. package/dist/components/icon/icons/notifications.d.ts +0 -3
  539. package/dist/components/icon/icons/notifications.d.ts.map +0 -1
  540. package/dist/components/icon/icons/paste.d.ts +0 -3
  541. package/dist/components/icon/icons/paste.d.ts.map +0 -1
  542. package/dist/components/icon/icons/pin.d.ts +0 -3
  543. package/dist/components/icon/icons/pin.d.ts.map +0 -1
  544. package/dist/components/icon/icons/plus.d.ts +0 -3
  545. package/dist/components/icon/icons/plus.d.ts.map +0 -1
  546. package/dist/components/icon/icons/print.d.ts +0 -3
  547. package/dist/components/icon/icons/print.d.ts.map +0 -1
  548. package/dist/components/icon/icons/refresh.d.ts +0 -3
  549. package/dist/components/icon/icons/refresh.d.ts.map +0 -1
  550. package/dist/components/icon/icons/remove.d.ts +0 -3
  551. package/dist/components/icon/icons/remove.d.ts.map +0 -1
  552. package/dist/components/icon/icons/save.d.ts +0 -3
  553. package/dist/components/icon/icons/save.d.ts.map +0 -1
  554. package/dist/components/icon/icons/search.d.ts +0 -3
  555. package/dist/components/icon/icons/search.d.ts.map +0 -1
  556. package/dist/components/icon/icons/settings.d.ts +0 -3
  557. package/dist/components/icon/icons/settings.d.ts.map +0 -1
  558. package/dist/components/icon/icons/share.d.ts +0 -3
  559. package/dist/components/icon/icons/share.d.ts.map +0 -1
  560. package/dist/components/icon/icons/sort-arrows.d.ts +0 -3
  561. package/dist/components/icon/icons/sort-arrows.d.ts.map +0 -1
  562. package/dist/components/icon/icons/sort.d.ts +0 -3
  563. package/dist/components/icon/icons/sort.d.ts.map +0 -1
  564. package/dist/components/icon/icons/star.d.ts +0 -3
  565. package/dist/components/icon/icons/star.d.ts.map +0 -1
  566. package/dist/components/icon/icons/success.d.ts +0 -3
  567. package/dist/components/icon/icons/success.d.ts.map +0 -1
  568. package/dist/components/icon/icons/sun.d.ts +0 -3
  569. package/dist/components/icon/icons/sun.d.ts.map +0 -1
  570. package/dist/components/icon/icons/table.d.ts +0 -3
  571. package/dist/components/icon/icons/table.d.ts.map +0 -1
  572. package/dist/components/icon/icons/tag.d.ts +0 -3
  573. package/dist/components/icon/icons/tag.d.ts.map +0 -1
  574. package/dist/components/icon/icons/trash.d.ts +0 -3
  575. package/dist/components/icon/icons/trash.d.ts.map +0 -1
  576. package/dist/components/icon/icons/truck.d.ts +0 -3
  577. package/dist/components/icon/icons/truck.d.ts.map +0 -1
  578. package/dist/components/icon/icons/unlock.d.ts +0 -3
  579. package/dist/components/icon/icons/unlock.d.ts.map +0 -1
  580. package/dist/components/icon/icons/upload.d.ts +0 -3
  581. package/dist/components/icon/icons/upload.d.ts.map +0 -1
  582. package/dist/components/icon/icons/user-add.d.ts +0 -3
  583. package/dist/components/icon/icons/user-add.d.ts.map +0 -1
  584. package/dist/components/icon/icons/user.d.ts +0 -3
  585. package/dist/components/icon/icons/user.d.ts.map +0 -1
  586. package/dist/components/icon/icons/users.d.ts +0 -3
  587. package/dist/components/icon/icons/users.d.ts.map +0 -1
  588. package/dist/components/icon/icons/video.d.ts +0 -3
  589. package/dist/components/icon/icons/video.d.ts.map +0 -1
  590. package/dist/components/icon/icons/warning.d.ts +0 -3
  591. package/dist/components/icon/icons/warning.d.ts.map +0 -1
  592. package/dist/components/icon/registry.d.ts +0 -15
  593. package/dist/components/icon/registry.d.ts.map +0 -1
  594. package/dist/components/resource-table/ResourceTableContextMenu.d.ts +0 -40
  595. package/dist/components/resource-table/ResourceTableContextMenu.d.ts.map +0 -1
  596. package/dist/components/side-navigation/SideNavigationActionHeader.d.ts +0 -2
  597. package/dist/components/side-navigation/SideNavigationActionHeader.d.ts.map +0 -1
  598. package/dist/components/side-navigation/SideNavigationActionLinks.d.ts +0 -9
  599. package/dist/components/side-navigation/SideNavigationActionLinks.d.ts.map +0 -1
  600. package/dist/components/side-navigation/SideNavigationActionMenu.d.ts +0 -26
  601. package/dist/components/side-navigation/SideNavigationActionMenu.d.ts.map +0 -1
  602. package/dist/components/side-navigation/SideNavigationLink.d.ts +0 -38
  603. package/dist/components/side-navigation/SideNavigationLink.d.ts.map +0 -1
  604. package/dist/components/side-navigation/SideNavigationLinks.d.ts +0 -38
  605. package/dist/components/side-navigation/SideNavigationLinks.d.ts.map +0 -1
  606. package/dist/components/tabs/Tab.d.ts +0 -19
  607. package/dist/components/tabs/Tab.d.ts.map +0 -1
  608. package/dist/components/tabs/TabContent.d.ts +0 -13
  609. package/dist/components/tabs/TabContent.d.ts.map +0 -1
  610. package/dist/components/tabs/TabList.d.ts +0 -12
  611. package/dist/components/tabs/TabList.d.ts.map +0 -1
  612. package/dist/components/toast/ToastApi.d.ts +0 -21
  613. package/dist/components/toast/ToastApi.d.ts.map +0 -1
  614. package/dist/components/top-navigation/TopNavigation.d.ts +0 -65
  615. package/dist/components/top-navigation/TopNavigation.d.ts.map +0 -1
  616. package/dist/components/top-navigation/index.d.ts +0 -4
  617. package/dist/components/top-navigation/index.d.ts.map +0 -1
  618. package/dist/icons/truck.svg +0 -13
  619. package/dist/search-CM-OgatF.js +0 -179
  620. package/dist/search-C_vLUsm7.cjs +0 -1
  621. package/dist/styles.css +0 -3
  622. package/tailwind.preset.cjs +0 -75
  623. package/tailwind.preset.js +0 -97
@@ -0,0 +1,669 @@
1
+ import '../../theme.css'
2
+ import '../../icon.css'
3
+ import '../../chip.css'
4
+ import '../../input.css'
5
+ import '../../button.css'
6
+ import '../../spinner.css'
7
+ import '../../search.css'
8
+ import "../chunks/icon-gQAtsERy.js";
9
+ import { t as e } from "../chunks/register-element-BFYmIynH.js";
10
+ import "../chunks/icon-C0OLmjDY.js";
11
+ import "../chunks/close-Dg6U0IjZ.js";
12
+ import "../chunks/button-B0Yt0MX1.js";
13
+ import "../chunks/chip-B9whjEvW.js";
14
+ import "../chunks/input-8bbXzpa5.js";
15
+ import "../chunks/search-ANUKQi0r.js";
16
+ //#region src/components/search/Search.ts
17
+ var t = class e extends HTMLElement {
18
+ constructor(...e) {
19
+ super(...e), this._shell = null, this._desktopInput = null, this._panel = null, this._panelInner = null, this._resultsId = "", this._panelInput = null, this._panelFiltersWrap = null, this._panelFiltersMainRow = null, this._panelFiltersChips = null, this._panelFiltersShowAllWrap = null, this._panelFiltersShowAllBtn = null, this._panelFiltersMorePanel = null, this._filtersMoreOpen = !1, this._filterOverflowObserver = null, this._filterOverflowZeroWidthRetries = 0, this._desktopFilterWrap = null, this._mobileFilterWrap = null, this._resultsWrap = null, this._stateWrap = null, this._customResultsWrap = null, this._query = "", this._searchOpen = !1, this._selectedFilters = [], this._selectedFilterBackspaceArmed = !1, this._debounceId = null, this._abortController = null, this._docPointerDownHandler = null, this._globalKeydownHandler = null, this._focusOutHandler = null, this._resizeHandler = null, this._scrollHandler = null, this._desktopShortcutHint = null, this._panelSearchBar = null, this._contentObserver = null, this._renderFrame = null;
20
+ }
21
+ static {
22
+ this._filterMorePanelSeq = 0;
23
+ }
24
+ static {
25
+ this._filterChipsOverflowMask = "linear-gradient(to right, #000 0%, #000 max(0%, calc(100% - 3.5rem)), transparent 100%)";
26
+ }
27
+ static get observedAttributes() {
28
+ return [
29
+ "endpoint",
30
+ "search-param",
31
+ "placeholder",
32
+ "filters",
33
+ "filter-param",
34
+ "open-shortcut",
35
+ "open-shortcut-hint",
36
+ "collapse-on-mobile",
37
+ "results-limit"
38
+ ];
39
+ }
40
+ connectedCallback() {
41
+ this.classList.add("mint-search-host"), this._attachGlobalHandlers(), this._attachFocusOutHandler(), this._attachResizeHandler(), this.render(), this._observeContentMutations();
42
+ }
43
+ disconnectedCallback() {
44
+ this._panel?.remove(), this._docPointerDownHandler &&= (document.removeEventListener("pointerdown", this._docPointerDownHandler, !0), null), this._globalKeydownHandler &&= (document.removeEventListener("keydown", this._globalKeydownHandler), null), this._resizeHandler &&= (window.removeEventListener("resize", this._resizeHandler), null), this._scrollHandler &&= (document.removeEventListener("scroll", this._scrollHandler, !0), null), this._focusOutHandler &&= (this.removeEventListener("focusout", this._focusOutHandler, !0), null), this._cancelDebounce(), this._abortSearch(), this._filterOverflowObserver &&= (this._filterOverflowObserver.disconnect(), null), this._contentObserver &&= (this._contentObserver.disconnect(), null), this._renderFrame !== null && (cancelAnimationFrame(this._renderFrame), this._renderFrame = null);
45
+ }
46
+ attributeChangedCallback(e, t, n) {
47
+ t !== n && this.render();
48
+ }
49
+ _scheduleRender() {
50
+ this._renderFrame === null && (this._renderFrame = requestAnimationFrame(() => {
51
+ this._renderFrame = null, this.render();
52
+ }));
53
+ }
54
+ _observeContentMutations() {
55
+ this._contentObserver ||= new MutationObserver(() => {
56
+ this._scheduleRender();
57
+ }), this._contentObserver.disconnect(), this._contentObserver.observe(this, {
58
+ childList: !0,
59
+ attributes: !0,
60
+ attributeFilter: ["slot"]
61
+ });
62
+ }
63
+ _getEndpoint() {
64
+ return (this.getAttribute("endpoint") || "").trim();
65
+ }
66
+ _getSearchParam() {
67
+ return (this.getAttribute("search-param") || "q").trim() || "q";
68
+ }
69
+ _getPlaceholder() {
70
+ return this.getAttribute("placeholder") || "Search";
71
+ }
72
+ _getFilterParam() {
73
+ return (this.getAttribute("filter-param") || "").trim();
74
+ }
75
+ _getFilterOptions() {
76
+ return (this.getAttribute("filters") || "").split(",").map((e) => e.trim()).filter(Boolean);
77
+ }
78
+ _hasSelectedFilters() {
79
+ return this._selectedFilters.length > 0;
80
+ }
81
+ _getFilterChipOverflowReservePx() {
82
+ let e = Math.max(1, this._getFilterOptions().length), t = this._hasSelectedFilters() ? 28 : 56;
83
+ return Math.min(200, t + e * 34);
84
+ }
85
+ _getFilterParamValue() {
86
+ return this._selectedFilters.join(",");
87
+ }
88
+ _getFilterChipLabelText() {
89
+ return this._selectedFilters.join(", ");
90
+ }
91
+ _getCondensedFilterChipLabel(e = 22) {
92
+ if (!this._hasSelectedFilters()) return "";
93
+ let [t = ""] = this._selectedFilters, n = this._selectedFilters.length - 1, r = Math.max(8, e - 2), i = t;
94
+ if (n <= 0) return i.length <= r ? i : `${i.slice(0, Math.max(1, r - 3))}...`;
95
+ let a = `${t}, and ${n} more`;
96
+ return a.length <= r ? a : `${a.slice(0, Math.max(1, r - 3))}...`;
97
+ }
98
+ _isMobileViewport() {
99
+ return window.matchMedia("(max-width: 1099.98px)").matches;
100
+ }
101
+ _collapseOnMobile() {
102
+ let e = this.getAttribute("collapse-on-mobile");
103
+ if (e === null) return !1;
104
+ let t = e.trim().toLowerCase();
105
+ return !(t === "false" || t === "0" || t === "off" || t === "none");
106
+ }
107
+ _primarySearchInput() {
108
+ return this._isMobileViewport() && this._collapseOnMobile() ? this._panelInput : this._desktopInput;
109
+ }
110
+ _isApplePlatform() {
111
+ return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.platform) || /Mac OS/i.test(navigator.userAgent);
112
+ }
113
+ _parseOpenShortcut() {
114
+ let e = (this.getAttribute("open-shortcut") ?? "mod+k").trim().toLowerCase();
115
+ if (!e || e === "none" || e === "false" || e === "off") return {
116
+ disabled: !0,
117
+ wantMod: !1,
118
+ wantMeta: !1,
119
+ wantCtrl: !1,
120
+ wantAlt: !1,
121
+ wantShift: !1,
122
+ key: ""
123
+ };
124
+ let t = e.split("+").map((e) => e.trim()).filter(Boolean);
125
+ if (t.length === 0) return {
126
+ disabled: !0,
127
+ wantMod: !1,
128
+ wantMeta: !1,
129
+ wantCtrl: !1,
130
+ wantAlt: !1,
131
+ wantShift: !1,
132
+ key: ""
133
+ };
134
+ let n = t[t.length - 1], r = new Set(t.slice(0, -1).map((e) => e.toLowerCase()));
135
+ return {
136
+ disabled: !1,
137
+ wantMod: r.has("mod"),
138
+ wantMeta: r.has("meta") || r.has("cmd") || r.has("super"),
139
+ wantCtrl: r.has("ctrl") || r.has("control"),
140
+ wantAlt: r.has("alt"),
141
+ wantShift: r.has("shift"),
142
+ key: n.toLowerCase()
143
+ };
144
+ }
145
+ _eventKeyMatchesShortcutKey(e, t) {
146
+ let n = t.toLowerCase();
147
+ return (e.key.length, e.key.toLowerCase()) === n;
148
+ }
149
+ _openShortcutMatches(e) {
150
+ let t = this._parseOpenShortcut();
151
+ return t.disabled || !t.key || e.repeat || !this._eventKeyMatchesShortcutKey(e, t.key) || t.wantShift !== e.shiftKey || t.wantAlt !== e.altKey ? !1 : t.wantMod || t.wantMeta || t.wantCtrl ? !(t.wantMod && !(e.metaKey || e.ctrlKey) || t.wantMeta && !e.metaKey || t.wantCtrl && !e.ctrlKey) : !!t.wantAlt;
152
+ }
153
+ _getOpenShortcutHintText() {
154
+ let e = this.getAttribute("open-shortcut-hint");
155
+ if (e === "none" || e === "false") return "";
156
+ if (e !== null && e.trim() !== "") return e.trim();
157
+ let t = this._parseOpenShortcut();
158
+ if (t.disabled) return "";
159
+ let n = this._isApplePlatform(), r = [];
160
+ t.wantMod && r.push(n ? "⌘" : "Ctrl"), t.wantMeta && !t.wantMod && r.push(n ? "⌘" : "Meta"), t.wantCtrl && !t.wantMod && r.push("Ctrl"), t.wantAlt && r.push("Alt"), t.wantShift && r.push("Shift");
161
+ let i = t.key.length === 1 ? t.key.toUpperCase() : t.key;
162
+ return i ? t.wantMod && !t.wantMeta && !t.wantCtrl && !t.wantAlt && !t.wantShift && t.key.length === 1 ? `${n ? "⌘" : "Ctrl+"}${i}` : [...r, i].join("+") : "";
163
+ }
164
+ _attachGlobalHandlers() {
165
+ this._globalKeydownHandler || (this._globalKeydownHandler = (e) => {
166
+ if (this._openShortcutMatches(e)) {
167
+ e.preventDefault(), this._openSearch(!0);
168
+ return;
169
+ }
170
+ if (e.key === "Tab" && this._searchOpen) {
171
+ let t = e.composedPath();
172
+ if (this._shell && t.includes(this._shell) || this._panelInner && t.includes(this._panelInner)) {
173
+ let t = this._getSearchFocusableElements();
174
+ if (t.length) {
175
+ let n = document.activeElement, r = n ? t.indexOf(n) : -1, i = e.shiftKey ? -1 : 1, a = r < 0 ? e.shiftKey ? t.length - 1 : 0 : (r + i + t.length) % t.length;
176
+ e.preventDefault(), t[a]?.focus();
177
+ }
178
+ }
179
+ return;
180
+ }
181
+ if (e.key.toLowerCase() === "escape" && this._searchOpen) {
182
+ if (this._filtersMoreOpen) {
183
+ this._filtersMoreOpen = !1, this.render(), requestAnimationFrame(() => this._focusActiveInput());
184
+ return;
185
+ }
186
+ this._closeSearch();
187
+ }
188
+ }, document.addEventListener("keydown", this._globalKeydownHandler)), this._docPointerDownHandler || (this._docPointerDownHandler = (e) => {
189
+ if (!this._searchOpen) return;
190
+ let t = e.composedPath();
191
+ this._filtersMoreOpen && this._panelFiltersWrap && !t.includes(this._panelFiltersWrap) && (this._filtersMoreOpen = !1, this.render(), requestAnimationFrame(() => this._focusActiveInput())), !(this._shell && t.includes(this._shell) || this._panelInner && t.includes(this._panelInner)) && this._closeSearch();
192
+ }, document.addEventListener("pointerdown", this._docPointerDownHandler, !0));
193
+ }
194
+ _attachResizeHandler() {
195
+ this._resizeHandler || (this._resizeHandler = () => {
196
+ this._syncPanelVisibility(), this._syncFilterOverflow();
197
+ }, window.addEventListener("resize", this._resizeHandler, { passive: !0 })), this._scrollHandler || (this._scrollHandler = () => {
198
+ this._searchOpen && this._positionPanel();
199
+ }, document.addEventListener("scroll", this._scrollHandler, !0));
200
+ }
201
+ _attachFocusOutHandler() {
202
+ this._focusOutHandler || (this._focusOutHandler = (e) => {
203
+ if (!this._searchOpen) return;
204
+ let t = e.relatedTarget;
205
+ t && (this._shell && this._shell.contains(t) || this._panelInner && this._panelInner.contains(t) || this._closeSearch());
206
+ }, this.addEventListener("focusout", this._focusOutHandler, !0));
207
+ }
208
+ _emitSearchOpenChange() {
209
+ this.dispatchEvent(new CustomEvent("search-open-change", {
210
+ detail: { open: this._searchOpen },
211
+ bubbles: !0,
212
+ composed: !0
213
+ }));
214
+ }
215
+ _openSearch(e = !1) {
216
+ this._getEndpoint() && (this._searchOpen || (this._searchOpen = !0, this._syncPanelVisibility(), this._emitSearchOpenChange(), e && this._primarySearchInput()?.focus()));
217
+ }
218
+ _closeSearch() {
219
+ this._searchOpen && (this._searchOpen = !1, this._filtersMoreOpen = !1, this._syncPanelVisibility(), this._emitSearchOpenChange());
220
+ }
221
+ _syncPanelVisibility() {
222
+ if (this._panel) {
223
+ this._syncPanelLayoutClass(), this._panel.classList.toggle("is-hidden", !this._searchOpen), this._panel.classList.toggle("is-open", this._searchOpen), this._shell && this._shell.classList.toggle("is-open", this._searchOpen);
224
+ for (let e of [this._desktopInput, this._panelInput]) {
225
+ let t = e?.querySelector("input");
226
+ t && (t.setAttribute("aria-expanded", String(this._searchOpen)), this._resultsId && t.setAttribute("aria-controls", this._resultsId));
227
+ }
228
+ this._positionPanel(), this._searchOpen && this._scheduleFilterOverflowSync();
229
+ }
230
+ }
231
+ _syncPanelLayoutClass() {
232
+ if (!this._panel) return;
233
+ let e = !this._isMobileViewport() || !this._collapseOnMobile();
234
+ this._panel.classList.toggle("mint-search-panel-anchored", e), this._panel.classList.toggle("mint-search-panel-mobile", !e), this._panel.classList.toggle("mint-search-panel-global", this.classList.contains("global-search-control"));
235
+ }
236
+ _positionPanel() {
237
+ if (!this._panel) return;
238
+ if (!(!this._isMobileViewport() || !this._collapseOnMobile())) {
239
+ this._panel.style.left = "", this._panel.style.right = "", this._panel.style.top = "", this._panel.style.bottom = "", this._panel.style.width = "", this._panel.classList.remove("is-open-above"), this._panelInner && (this._panelInner.style.maxHeight = "");
240
+ return;
241
+ }
242
+ let e = this._shell?.getBoundingClientRect();
243
+ if (!e) return;
244
+ let t = window.innerHeight, n = Math.max(0, Math.min(416, t - 16)), r = Math.max(0, t - e.bottom - 4), i = Math.max(0, e.top - 4), a = r < n && i > r, o = Math.min(n, a ? i : r);
245
+ this._panel.classList.toggle("is-open-above", a), this._panelInner && (this._panelInner.style.maxHeight = `${o}px`), this._panel.style.left = `${e.left}px`, this._panel.style.width = `${e.width}px`, this._panel.style.right = "auto", a ? (this._panel.style.top = "auto", this._panel.style.bottom = `${Math.max(0, t - e.top - 4)}px`) : (this._panel.style.top = `${e.bottom - 4}px`, this._panel.style.bottom = "auto");
246
+ }
247
+ _setQuery(e) {
248
+ let t = this._query;
249
+ this._query = e, e !== t && (this._selectedFilterBackspaceArmed = !1), this._desktopInput && (this._desktopInput.value = e), this._panelInput && (this._panelInput.value = e);
250
+ }
251
+ _cancelDebounce() {
252
+ this._debounceId !== null && (window.clearTimeout(this._debounceId), this._debounceId = null);
253
+ }
254
+ _abortSearch() {
255
+ this._abortController &&= (this._abortController.abort(), null);
256
+ }
257
+ _normalizeResults(e) {
258
+ let t = Number.parseInt(this.getAttribute("results-limit") || "", 10), n = Number.isFinite(t) && t > 0 ? Math.min(t, 1e3) : 8;
259
+ return ((e) => {
260
+ if (Array.isArray(e)) return e;
261
+ if (!e || typeof e != "object") return [];
262
+ let t = e;
263
+ for (let e of [
264
+ "results",
265
+ "items",
266
+ "data",
267
+ "products"
268
+ ]) {
269
+ let n = t[e];
270
+ if (Array.isArray(n)) return n;
271
+ }
272
+ return [];
273
+ })(e).map((e) => {
274
+ let t = e || {};
275
+ return {
276
+ title: String(t.title || t.name || t.label || t.email || t.id || "").trim() || "Untitled",
277
+ subtitle: String(t.description || t.category || t.username || "").trim(),
278
+ parent: String(t.parent || t.type || t.entity || t.kind || t.category || "").trim() || void 0
279
+ };
280
+ }).slice(0, n);
281
+ }
282
+ _emitResultsChange(e, t) {
283
+ let n = this._hasSelectedFilters() ? this._getFilterParamValue() : null;
284
+ this.dispatchEvent(new CustomEvent("search-results-change", {
285
+ detail: {
286
+ query: this._query,
287
+ filter: n,
288
+ filters: [...this._selectedFilters],
289
+ results: e,
290
+ raw: t ?? null
291
+ },
292
+ bubbles: !0,
293
+ composed: !0
294
+ }));
295
+ }
296
+ _emitFilterChange() {
297
+ let e = this._hasSelectedFilters() ? this._getFilterParamValue() : null;
298
+ this.dispatchEvent(new CustomEvent("search-filter-change", {
299
+ detail: {
300
+ query: this._query,
301
+ filter: e,
302
+ filters: [...this._selectedFilters]
303
+ },
304
+ bubbles: !0,
305
+ composed: !0
306
+ }));
307
+ }
308
+ _renderState(e) {
309
+ if (this._customResultsWrap && this._customResultsWrap.childElementCount > 0) {
310
+ this._stateWrap && this._stateWrap.classList.add("is-hidden"), this._resultsWrap && this._resultsWrap.classList.add("is-hidden");
311
+ return;
312
+ }
313
+ this._stateWrap && (this._stateWrap.textContent = e, this._stateWrap.classList.remove("is-hidden"), this._resultsWrap && (this._resultsWrap.classList.remove("is-hidden"), this._resultsWrap.innerHTML = ""));
314
+ }
315
+ _renderResults(e) {
316
+ if (this._customResultsWrap && this._customResultsWrap.childElementCount > 0) {
317
+ this._stateWrap && this._stateWrap.classList.add("is-hidden"), this._resultsWrap && this._resultsWrap.classList.add("is-hidden");
318
+ return;
319
+ }
320
+ if (!(!this._resultsWrap || !this._stateWrap)) {
321
+ if (this._resultsWrap.innerHTML = "", e.length === 0) {
322
+ this._renderState("No results found");
323
+ return;
324
+ }
325
+ this._stateWrap.classList.add("is-hidden");
326
+ for (let t of e) {
327
+ let e = document.createElement("button");
328
+ e.type = "button", e.className = "mint-search-result", e.setAttribute("role", "option"), e.setAttribute("aria-selected", "false");
329
+ let n = document.createElement("mint-icon");
330
+ n.setAttribute("name", "search"), n.className = "mint-search-result-icon";
331
+ let r = document.createElement("div");
332
+ r.className = "mint-search-result-copy";
333
+ let i = document.createElement("div");
334
+ if (i.className = "mint-search-result-title", i.textContent = t.title, r.appendChild(i), t.subtitle) {
335
+ let e = document.createElement("div");
336
+ e.className = "mint-search-result-subtitle", e.textContent = t.subtitle, r.appendChild(e);
337
+ }
338
+ e.appendChild(n), e.appendChild(r), e.addEventListener("keydown", (t) => {
339
+ if (t.key === "ArrowDown") {
340
+ t.preventDefault(), this._moveFocusInResults(e, 1);
341
+ return;
342
+ }
343
+ if (t.key === "ArrowUp") {
344
+ t.preventDefault(), this._moveFocusInResults(e, -1);
345
+ return;
346
+ }
347
+ }), e.addEventListener("click", () => {
348
+ let e = this._hasSelectedFilters() ? this._getFilterParamValue() : null;
349
+ this.dispatchEvent(new CustomEvent("search-select", {
350
+ detail: {
351
+ query: this._query,
352
+ filter: e,
353
+ filters: [...this._selectedFilters],
354
+ result: t
355
+ },
356
+ bubbles: !0,
357
+ composed: !0
358
+ })), this._closeSearch();
359
+ }), this._resultsWrap.appendChild(e);
360
+ }
361
+ }
362
+ }
363
+ _fetchSearchResults(e) {
364
+ let t = this._getEndpoint();
365
+ if (!t) return;
366
+ let n = e.trim();
367
+ if (!n) {
368
+ this._emitResultsChange([]), this._renderState("Start typing to search");
369
+ return;
370
+ }
371
+ this._abortSearch(), this._abortController = new AbortController(), this._renderState("Searching...");
372
+ let r = new URLSearchParams();
373
+ r.set(this._getSearchParam(), n);
374
+ let i = this._getFilterParam();
375
+ i && this._hasSelectedFilters() && r.set(i, this._getFilterParamValue());
376
+ let a = t.includes("{query}") ? t.replace("{query}", encodeURIComponent(n)) : `${t}${t.includes("?") ? "&" : "?"}${r.toString()}`;
377
+ fetch(a, { signal: this._abortController.signal }).then((e) => {
378
+ if (!e.ok) throw Error(`Request failed: ${e.status}`);
379
+ return e.json();
380
+ }).then((e) => {
381
+ let t = this._normalizeResults(e);
382
+ this._emitResultsChange(t, e), this._renderResults(t);
383
+ }).catch((e) => {
384
+ e?.name !== "AbortError" && (this._emitResultsChange([]), this._renderState("Unable to load results"));
385
+ });
386
+ }
387
+ _scheduleSearch(e) {
388
+ this._setQuery(e), this._cancelDebounce(), this._debounceId = window.setTimeout(() => this._fetchSearchResults(e), 220);
389
+ }
390
+ _getNativeInputValue(e) {
391
+ if (!e) return "";
392
+ let t = e.querySelector("input, textarea");
393
+ return t ? t.value || "" : e.value || "";
394
+ }
395
+ _getCurrentInputValue() {
396
+ let e = document.activeElement;
397
+ return e && this._desktopInput && this._desktopInput.contains(e) ? this._getNativeInputValue(this._desktopInput) : e && this._panelInput && this._panelInput.contains(e) ? this._getNativeInputValue(this._panelInput) : this._getNativeInputValue(this._primarySearchInput());
398
+ }
399
+ _applyFilterSelectionChange() {
400
+ let e = this._getCurrentInputValue();
401
+ if (this._setQuery(e), this._emitFilterChange(), this.render(), e.trim()) {
402
+ this._scheduleSearch(e);
403
+ return;
404
+ }
405
+ this._cancelDebounce(), this._abortSearch(), this._emitResultsChange([]), this._renderState("Start typing to search");
406
+ }
407
+ _clearAllSelectedFilters() {
408
+ this._selectedFilters = [], this._selectedFilterBackspaceArmed = !1, this._applyFilterSelectionChange();
409
+ }
410
+ _popLastSelectedFilter() {
411
+ this._selectedFilters.length !== 0 && (this._selectedFilters.pop(), this._selectedFilterBackspaceArmed = !1, this._applyFilterSelectionChange());
412
+ }
413
+ _focusActiveInput() {
414
+ let e = this._primarySearchInput();
415
+ e && requestAnimationFrame(() => {
416
+ e.focus();
417
+ });
418
+ }
419
+ _focusHideFiltersControl() {
420
+ let e = this._panelFiltersShowAllBtn;
421
+ e && (e.querySelector("button") ?? e).focus();
422
+ }
423
+ _getFilterChipElements() {
424
+ return this._panelFiltersWrap ? Array.from(this._panelFiltersWrap.querySelectorAll("mint-chip")) : [];
425
+ }
426
+ _ensurePanelFiltersShell() {
427
+ !this._panelFiltersWrap || this._panelFiltersMainRow || (this._panelFiltersWrap.replaceChildren(), this._panelFiltersWrap.className = "mint-search-filters", this._panelFiltersMainRow = document.createElement("div"), this._panelFiltersMainRow.className = "mint-search-filter-row", this._panelFiltersChips = document.createElement("div"), this._panelFiltersChips.className = "mint-search-filter-chips", this._panelFiltersMorePanel = document.createElement("div"), this._panelFiltersMorePanel.id = `mint-search-filter-more-${e._filterMorePanelSeq++}`, this._panelFiltersMorePanel.className = "mint-search-filter-more is-hidden", this._panelFiltersShowAllWrap = document.createElement("div"), this._panelFiltersShowAllWrap.className = "mint-search-filter-more-trigger is-hidden", this._panelFiltersShowAllBtn = document.createElement("mint-button"), this._panelFiltersShowAllBtn.setAttribute("type", "button"), this._panelFiltersShowAllBtn.setAttribute("variant", "ghost"), this._panelFiltersShowAllBtn.setAttribute("tone", "neutral"), this._panelFiltersShowAllBtn.setAttribute("size", "small"), this._panelFiltersShowAllBtn.classList.add("mint-search-filter-more-button"), this._panelFiltersShowAllBtn.setAttribute("aria-expanded", "false"), this._panelFiltersShowAllBtn.setAttribute("aria-controls", this._panelFiltersMorePanel.id), this._panelFiltersShowAllBtn.addEventListener("click", (e) => {
428
+ e.stopPropagation();
429
+ let t = this._filtersMoreOpen;
430
+ this._filtersMoreOpen = !this._filtersMoreOpen, this.render(), t && requestAnimationFrame(() => this._focusActiveInput());
431
+ }), this._panelFiltersShowAllWrap.append(this._panelFiltersShowAllBtn), this._panelFiltersMainRow.append(this._panelFiltersChips, this._panelFiltersShowAllWrap), this._setPanelFiltersShowAllLabel("Show all"), this._panelFiltersWrap.append(this._panelFiltersMainRow, this._panelFiltersMorePanel), typeof ResizeObserver < "u" && !this._filterOverflowObserver && (this._filterOverflowObserver = new ResizeObserver(() => this._syncFilterOverflow()), this._filterOverflowObserver.observe(this._panelFiltersChips), this._filterOverflowObserver.observe(this._panelFiltersMainRow)));
432
+ }
433
+ _setPanelFiltersShowAllLabel(e) {
434
+ let t = this._panelFiltersShowAllBtn;
435
+ if (!t) return;
436
+ for (let e of Array.from(t.childNodes)) e.nodeType === Node.TEXT_NODE && e.remove();
437
+ let n = t.querySelector("button .mint-button-content") || t.querySelector(".mint-button-content");
438
+ if (n) {
439
+ n.textContent = e;
440
+ return;
441
+ }
442
+ let r = t.querySelector(":scope > button");
443
+ if (r) {
444
+ r.replaceChildren(document.createTextNode(e)), t.render?.();
445
+ return;
446
+ }
447
+ t.firstElementChild || t.appendChild(document.createTextNode(e));
448
+ }
449
+ _scheduleFilterOverflowSync() {
450
+ requestAnimationFrame(() => {
451
+ requestAnimationFrame(() => this._syncFilterOverflow());
452
+ });
453
+ }
454
+ _setFilterChipsEdgeFade(t) {
455
+ let n = this._panelFiltersChips;
456
+ n && (t ? (n.style.maskImage = e._filterChipsOverflowMask, n.style.webkitMaskImage = e._filterChipsOverflowMask) : (n.style.maskImage = "", n.style.webkitMaskImage = ""));
457
+ }
458
+ _syncFilterOverflow() {
459
+ if (!this._panelFiltersChips || !this._panelFiltersShowAllWrap || !this._panelFiltersShowAllBtn) return;
460
+ if (this._filtersMoreOpen) {
461
+ this._panelFiltersShowAllWrap.classList.remove("is-hidden"), this._filterOverflowZeroWidthRetries = 0, this._setFilterChipsEdgeFade(!1);
462
+ return;
463
+ }
464
+ let e = this._panelFiltersChips.clientWidth;
465
+ if (e === 0 && this._searchOpen) {
466
+ this._filterOverflowZeroWidthRetries < 10 && (this._filterOverflowZeroWidthRetries += 1, this._scheduleFilterOverflowSync()), this._setFilterChipsEdgeFade(!1);
467
+ return;
468
+ }
469
+ this._filterOverflowZeroWidthRetries = 0;
470
+ let t = this._panelFiltersChips.scrollWidth + this._getFilterChipOverflowReservePx() > e;
471
+ this._panelFiltersShowAllWrap.classList.toggle("is-hidden", !t), this._setFilterChipsEdgeFade(t);
472
+ }
473
+ _getResultFocusableElements() {
474
+ let e = this._customResultsWrap && !this._customResultsWrap.classList.contains("is-hidden") ? this._customResultsWrap : this._resultsWrap;
475
+ return e ? Array.from(e.querySelectorAll("button:not([disabled]), [href], [tabindex]:not([tabindex=\"-1\"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])")) : [];
476
+ }
477
+ _getSearchFocusableElements() {
478
+ return [this._shell, this._panelInner].filter((e) => !!e).flatMap((e) => Array.from(e.querySelectorAll("button:not([disabled]), [href], [tabindex]:not([tabindex=\"-1\"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])"))).filter((e) => {
479
+ if (e.closest(".is-hidden") || e.closest("[aria-hidden=\"true\"]")) return !1;
480
+ let t = window.getComputedStyle(e);
481
+ return t.display !== "none" && t.visibility !== "hidden";
482
+ });
483
+ }
484
+ _focusFirstChipOrResult(e = !1) {
485
+ let t = this._getFilterChipElements(), n = this._getResultFocusableElements();
486
+ if (!e) {
487
+ (t[0] || n[0])?.focus();
488
+ return;
489
+ }
490
+ (n[n.length - 1] || t[t.length - 1])?.focus();
491
+ }
492
+ _moveFocusInResults(e, t) {
493
+ let n = this._getResultFocusableElements();
494
+ if (n.length === 0) return;
495
+ let r = n.indexOf(e);
496
+ if (r === -1) return;
497
+ let i = n[r + t];
498
+ if (i) {
499
+ i.focus();
500
+ return;
501
+ }
502
+ if (t === -1) {
503
+ let e = this._getFilterChipElements(), t = e[e.length - 1];
504
+ t ? t.focus() : this._focusActiveInput();
505
+ }
506
+ }
507
+ _renderSelectedFilter() {
508
+ let e = (e) => {
509
+ if (!e || (e.innerHTML = "", !this._hasSelectedFilters())) return;
510
+ let t = document.createElement("mint-chip");
511
+ t.setAttribute("dismissable", ""), t.title = this._getFilterChipLabelText();
512
+ let n = this._getCondensedFilterChipLabel();
513
+ t.classList.add("mint-search-selected-filter"), this._selectedFilterBackspaceArmed && t.classList.add("is-backspace-armed"), t.textContent = n, t.addEventListener("dismiss", (e) => {
514
+ e.stopPropagation(), this._clearAllSelectedFilters();
515
+ }), e.appendChild(t);
516
+ };
517
+ e(this._desktopFilterWrap), e(this._mobileFilterWrap);
518
+ let t = this._hasSelectedFilters();
519
+ this._desktopInput?.classList.toggle("has-selected-filter", t), this._panelInput?.classList.toggle("has-selected-filter", t), this._syncSelectedFilterInputOffset(this._desktopInput, this._desktopFilterWrap), this._syncSelectedFilterInputOffset(this._panelInput, this._mobileFilterWrap);
520
+ }
521
+ _syncSelectedFilterInputOffset(e, t) {
522
+ if (!e || !t) return;
523
+ let n = t.querySelector("mint-chip");
524
+ if (!n) {
525
+ e.style.removeProperty("--mint-search-filter-chip-width");
526
+ return;
527
+ }
528
+ let r = () => {
529
+ n.isConnected && e.style.setProperty("--mint-search-filter-chip-width", `${n.getBoundingClientRect().width}px`);
530
+ };
531
+ r(), requestAnimationFrame(r);
532
+ }
533
+ _bindInputHandlers(e) {
534
+ let t = () => {
535
+ this._scheduleSearch(this._getNativeInputValue(e));
536
+ };
537
+ e.addEventListener("focusin", () => this._openSearch(!1)), e.addEventListener("input", t), e.addEventListener("search", t), e.addEventListener("change", t), e.addEventListener("keydown", (t) => {
538
+ if (t.key === "ArrowDown") {
539
+ this._searchOpen || this._openSearch(!1), t.preventDefault(), this._focusFirstChipOrResult(!1);
540
+ return;
541
+ }
542
+ if (t.key === "ArrowUp") {
543
+ this._searchOpen || this._openSearch(!1), t.preventDefault(), this._focusFirstChipOrResult(!0);
544
+ return;
545
+ }
546
+ if (t.key !== "Backspace") return;
547
+ let n = this._getNativeInputValue(e);
548
+ if (n !== this._query && this._setQuery(n), !(n.length > 0) && this._hasSelectedFilters()) {
549
+ if (!this._selectedFilterBackspaceArmed) {
550
+ t.preventDefault(), this._selectedFilterBackspaceArmed = !0, this._renderSelectedFilter();
551
+ return;
552
+ }
553
+ t.preventDefault(), this._popLastSelectedFilter();
554
+ }
555
+ });
556
+ }
557
+ openSearch(e = !0) {
558
+ this._openSearch(e);
559
+ }
560
+ closeSearch() {
561
+ this._closeSearch();
562
+ }
563
+ toggleSearch(e = !0) {
564
+ if (this._searchOpen) {
565
+ this._closeSearch();
566
+ return;
567
+ }
568
+ this._openSearch(e);
569
+ }
570
+ isSearchOpen() {
571
+ return this._searchOpen;
572
+ }
573
+ render() {
574
+ let e = this._getEndpoint();
575
+ if (this.classList.toggle("is-hidden", !e), !e) {
576
+ this._searchOpen = !1, this._panel?.classList.add("is-hidden");
577
+ return;
578
+ }
579
+ if (!this._shell) {
580
+ this._shell = document.createElement("div"), this._shell.className = "mint-search-shell", this._desktopFilterWrap = document.createElement("div"), this._desktopFilterWrap.className = "mint-search-filter-slot", this._desktopFilterWrap.setAttribute("slot", "prepend"), this._desktopInput = document.createElement("mint-input"), this._desktopInput.setAttribute("type", "search"), this._desktopInput.setAttribute("icon", "search"), this._desktopInput.setAttribute("aria-label", this.getAttribute("placeholder") || "Search"), this._desktopInput.className = "mint-search-input";
581
+ let e = document.createElement("span");
582
+ e.className = "mint-search-shortcut-hint", e.setAttribute("slot", "append"), this._desktopShortcutHint = e, this._bindInputHandlers(this._desktopInput), this._desktopInput.appendChild(this._desktopFilterWrap), this._desktopInput.appendChild(e), this._shell.appendChild(this._desktopInput), this.appendChild(this._shell);
583
+ }
584
+ if (!this._panel) {
585
+ this._panel = document.createElement("div"), this._panel.className = "mint-search-panel is-hidden";
586
+ let e = document.createElement("div");
587
+ e.className = "mint-search-panel-inner", this._panelInner = e;
588
+ let t = document.createElement("div");
589
+ this._panelSearchBar = t, t.className = "mint-search-panel-searchbar is-hidden", this._mobileFilterWrap = document.createElement("div"), this._mobileFilterWrap.className = "mint-search-filter-slot", this._mobileFilterWrap.setAttribute("slot", "prepend"), this._panelInput = document.createElement("mint-input"), this._panelInput.setAttribute("type", "search"), this._panelInput.setAttribute("aria-label", this.getAttribute("placeholder") || "Search"), this._panelInput.className = "mint-search-input", this._bindInputHandlers(this._panelInput), this._panelInput.appendChild(this._mobileFilterWrap), t.appendChild(this._panelInput), this._customResultsWrap = document.createElement("div"), this._customResultsWrap.className = "mint-search-custom-results is-hidden", this._stateWrap = document.createElement("div"), this._stateWrap.className = "mint-search-state", this._stateWrap.textContent = "Start typing to search", this._stateWrap.setAttribute("role", "status"), this._stateWrap.setAttribute("aria-live", "polite"), this._resultsWrap = document.createElement("div"), this._resultsWrap.className = "mint-search-results", this._resultsId = `mint-search-results-${Math.random().toString(36).slice(2, 10)}`, this._resultsWrap.id = this._resultsId, this._resultsWrap.setAttribute("role", "listbox"), this._resultsWrap.setAttribute("aria-label", "Search results"), this._customResultsWrap.setAttribute("role", "region"), this._customResultsWrap.setAttribute("aria-label", "Search results"), e.appendChild(t), this._panelFiltersWrap = document.createElement("div"), e.appendChild(this._panelFiltersWrap), this._ensurePanelFiltersShell(), e.appendChild(this._customResultsWrap), e.appendChild(this._stateWrap), e.appendChild(this._resultsWrap), this._panel.appendChild(e);
590
+ }
591
+ this._panel.parentElement !== document.body && document.body.appendChild(this._panel);
592
+ let t = this._hasSelectedFilters() ? "" : this._getPlaceholder();
593
+ if (this._desktopInput && this._desktopInput.setAttribute("placeholder", t), this._panelInput && this._panelInput.setAttribute("placeholder", t), this._desktopInput && this._desktopInput.setAttribute("aria-label", this.getAttribute("aria-label") || this._getPlaceholder()), this._panelInput && this._panelInput.setAttribute("aria-label", this.getAttribute("aria-label") || this._getPlaceholder()), this._desktopShortcutHint) {
594
+ let e = this._getOpenShortcutHintText();
595
+ this._desktopShortcutHint.textContent = e, this._desktopShortcutHint.classList.toggle("is-hidden", !e);
596
+ }
597
+ if (this._panelFiltersWrap) {
598
+ this._ensurePanelFiltersShell();
599
+ let e = this._getFilterOptions();
600
+ this._selectedFilters = this._selectedFilters.filter((t) => e.includes(t));
601
+ let t = e.length > 0;
602
+ t || (this._filtersMoreOpen = !1), this._panelFiltersWrap.classList.toggle("is-hidden", !t), this._panelInner?.classList.toggle("has-no-filters", !t), this._panelFiltersChips && this._panelFiltersChips.replaceChildren(), this._panelFiltersMorePanel && this._panelFiltersMorePanel.replaceChildren();
603
+ let n = this._filtersMoreOpen && this._panelFiltersMorePanel ? this._panelFiltersMorePanel : this._panelFiltersChips;
604
+ for (let t of e) {
605
+ if (!n) break;
606
+ let r = document.createElement("mint-chip"), i = this._selectedFilters.includes(t);
607
+ if (i && r.classList.add("is-selected"), r.classList.add("mint-search-filter-chip"), i) {
608
+ let e = document.createElement("span");
609
+ e.textContent = t;
610
+ let n = document.createElement("mint-icon");
611
+ n.setAttribute("name", "close"), n.className = "mint-search-filter-chip-close", n.setAttribute("aria-hidden", "true"), r.append(e, n);
612
+ } else r.textContent = t;
613
+ r.tabIndex = 0, r.setAttribute("role", "button"), r.setAttribute("aria-label", i ? `Remove filter ${t}` : `Filter by ${t}`), r.dataset.mintSearchFilter = t, r.addEventListener("pointerdown", (e) => {
614
+ e.preventDefault();
615
+ });
616
+ let a = (n) => {
617
+ n && n.stopPropagation();
618
+ let r = this._filtersMoreOpen, i = this._selectedFilters.indexOf(t);
619
+ i >= 0 ? this._selectedFilters.splice(i, 1) : this._selectedFilters.push(t), this._selectedFilterBackspaceArmed = !1;
620
+ let a = e.length > 0 && this._selectedFilters.length === e.length, o = this._selectedFilters.length === 0;
621
+ r && (a || o) && (this._filtersMoreOpen = !1), this._emitFilterChange(), this._renderSelectedFilter(), this.render(), this._query.trim() && this._scheduleSearch(this._query), r ? a || o ? this._focusActiveInput() : requestAnimationFrame(() => {
622
+ this._getFilterChipElements().find((e) => e.dataset.mintSearchFilter === t)?.focus();
623
+ }) : this._focusActiveInput();
624
+ };
625
+ r.addEventListener("click", (e) => a(e)), r.addEventListener("keydown", (e) => {
626
+ let t = this._getFilterChipElements(), n = t.indexOf(r);
627
+ if (e.key === "Enter" || e.key === " ") {
628
+ e.preventDefault(), a(e);
629
+ return;
630
+ }
631
+ if (e.key === "ArrowRight") {
632
+ e.preventDefault();
633
+ let r = t[n + 1];
634
+ r && r.focus();
635
+ return;
636
+ }
637
+ if (e.key === "ArrowLeft") {
638
+ e.preventDefault();
639
+ let r = t[n - 1];
640
+ r ? r.focus() : this._filtersMoreOpen ? this._focusHideFiltersControl() : this._focusActiveInput();
641
+ return;
642
+ }
643
+ if (e.key === "ArrowDown") {
644
+ e.preventDefault(), this._getResultFocusableElements()[0]?.focus();
645
+ return;
646
+ }
647
+ if (e.key === "ArrowUp") {
648
+ e.preventDefault(), this._filtersMoreOpen ? this._focusHideFiltersControl() : this._focusActiveInput();
649
+ return;
650
+ }
651
+ }), n.appendChild(r);
652
+ }
653
+ this._panelFiltersChips && this._panelFiltersChips.classList.toggle("is-hidden", this._filtersMoreOpen), this._panelFiltersMorePanel && this._panelFiltersMorePanel.classList.toggle("is-hidden", !this._filtersMoreOpen), this._panelFiltersShowAllBtn && (this._setPanelFiltersShowAllLabel(this._filtersMoreOpen ? "Hide filters" : "Show all"), this._panelFiltersShowAllBtn.setAttribute("aria-expanded", this._filtersMoreOpen ? "true" : "false")), this._panelInner && (this._filtersMoreOpen && t ? this._panelInner.classList.add("is-overflow-visible") : this._panelInner.classList.remove("is-overflow-visible")), this._scheduleFilterOverflowSync();
654
+ }
655
+ if (this._customResultsWrap) {
656
+ Array.from(this.children).filter((e) => e === this._shell || e === this._panel ? !1 : e.getAttribute("slot") === "results").forEach((e) => this._customResultsWrap.appendChild(e));
657
+ let e = this._customResultsWrap.childElementCount > 0;
658
+ this._customResultsWrap.classList.toggle("is-hidden", !e), e ? (this._stateWrap?.classList.add("is-hidden"), this._resultsWrap?.classList.add("is-hidden")) : this._resultsWrap?.classList.remove("is-hidden");
659
+ }
660
+ this._renderSelectedFilter(), this._syncResponsiveChrome(), this._syncPanelVisibility();
661
+ }
662
+ _syncResponsiveChrome() {
663
+ let e = this._collapseOnMobile();
664
+ this._shell && this._shell.classList.toggle("is-collapsed", e), this._panelSearchBar && (this._panelSearchBar.classList.toggle("is-hidden", !e), this._panelSearchBar.classList.toggle("is-collapsed", e));
665
+ }
666
+ };
667
+ customElements.get("mint-search") || e("mint-search", t);
668
+ //#endregion
669
+ export { t as default };