@xplortech/apollo-core 2.12.0 → 3.0.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 (551) hide show
  1. package/.typings/apollo-components.html-data.json +61 -0
  2. package/AGENTS.md +4 -4
  3. package/README.md +30 -3
  4. package/build/components/modal.css +1 -1
  5. package/build/components/table-body.css +1 -0
  6. package/build/components/table-footer-cell.css +1 -0
  7. package/build/components/table-footer.css +1 -0
  8. package/build/components/table-row.css +1 -0
  9. package/build/components/top-nav.css +1 -1
  10. package/build/components-manifest.json +13 -1
  11. package/build/core.css +1 -1
  12. package/build/style.css +1 -1
  13. package/dist/apollo-core/apollo-core.css +1 -1
  14. package/dist/apollo-core/apollo-core.esm.js +1 -1
  15. package/dist/apollo-core/{p-d37488d4.entry.js → p-0368a1df.entry.js} +1 -1
  16. package/dist/apollo-core/p-056a99e4.entry.js +1 -0
  17. package/dist/apollo-core/p-068e3532.entry.js +1 -0
  18. package/dist/apollo-core/{p-121d1a4b.entry.js → p-06a9a27b.entry.js} +1 -1
  19. package/dist/apollo-core/{p-9747cf43.entry.js → p-0958c719.entry.js} +1 -1
  20. package/dist/apollo-core/p-0a0a6e43.entry.js +1 -0
  21. package/dist/apollo-core/{p-643c8038.entry.js → p-149ddd12.entry.js} +1 -1
  22. package/dist/apollo-core/p-1a94c2d9.entry.js +1 -0
  23. package/dist/apollo-core/{p-efa21ec0.entry.js → p-2139f9f6.entry.js} +1 -1
  24. package/dist/apollo-core/{p-76f64d65.entry.js → p-28bce81a.entry.js} +1 -1
  25. package/dist/apollo-core/{p-1a417191.entry.js → p-2938ab4f.entry.js} +1 -1
  26. package/dist/apollo-core/{p-4e61587f.entry.js → p-2c995d80.entry.js} +1 -1
  27. package/dist/apollo-core/p-2faa7b9c.entry.js +1 -0
  28. package/dist/apollo-core/p-30b1b700.entry.js +1 -0
  29. package/dist/apollo-core/p-32084caf.entry.js +1 -0
  30. package/dist/apollo-core/p-38586952.entry.js +1 -0
  31. package/dist/apollo-core/{p-707b1918.entry.js → p-47bda204.entry.js} +1 -1
  32. package/dist/apollo-core/{p-f199ad66.entry.js → p-4a2323b3.entry.js} +1 -1
  33. package/dist/apollo-core/{p-c25aebe5.entry.js → p-4ad79534.entry.js} +1 -1
  34. package/dist/apollo-core/{p-e4ae3f60.entry.js → p-4d4acd1f.entry.js} +1 -1
  35. package/dist/apollo-core/p-50fae269.entry.js +1 -0
  36. package/dist/apollo-core/{p-7f105d63.entry.js → p-54903322.entry.js} +1 -1
  37. package/dist/apollo-core/{p-8a81ef98.entry.js → p-5730d96c.entry.js} +1 -1
  38. package/dist/apollo-core/{p-46d21684.entry.js → p-581b702c.entry.js} +1 -1
  39. package/dist/apollo-core/{p-853418be.entry.js → p-5d9a593e.entry.js} +1 -1
  40. package/dist/apollo-core/{p-e00ed4f4.entry.js → p-60cb3cfb.entry.js} +1 -1
  41. package/dist/apollo-core/p-722b145a.entry.js +1 -0
  42. package/dist/apollo-core/p-75e5bfe0.entry.js +1 -0
  43. package/dist/apollo-core/p-77fe3cc1.entry.js +1 -0
  44. package/dist/apollo-core/{p-26861d09.entry.js → p-790709c0.entry.js} +1 -1
  45. package/dist/apollo-core/{p-7976cd3b.entry.js → p-82812126.entry.js} +1 -1
  46. package/dist/apollo-core/{p-c427a31d.entry.js → p-83bb7607.entry.js} +1 -1
  47. package/dist/apollo-core/p-8664d88b.entry.js +1 -0
  48. package/dist/apollo-core/{p-3d9c90ee.entry.js → p-9064badb.entry.js} +1 -1
  49. package/dist/apollo-core/{p-5ca18bc1.entry.js → p-91895c40.entry.js} +1 -1
  50. package/dist/apollo-core/p-969d5cca.entry.js +1 -0
  51. package/dist/apollo-core/p-99a79cf4.entry.js +1 -0
  52. package/dist/apollo-core/p-abdf199b.entry.js +1 -0
  53. package/dist/apollo-core/p-ae8a5f66.entry.js +1 -0
  54. package/dist/apollo-core/{p-9b0174b1.entry.js → p-af8ebf49.entry.js} +1 -1
  55. package/dist/apollo-core/p-b29025b2.entry.js +1 -0
  56. package/dist/apollo-core/{p-fd2756d8.entry.js → p-b45179fb.entry.js} +1 -1
  57. package/dist/apollo-core/p-b5a61076.entry.js +1 -0
  58. package/dist/apollo-core/p-bf7d8e18.entry.js +1 -0
  59. package/dist/apollo-core/p-c48e4884.entry.js +1 -0
  60. package/dist/apollo-core/{p-b537f72d.entry.js → p-ca4652b3.entry.js} +1 -1
  61. package/dist/apollo-core/{p-bb22ed2a.entry.js → p-cb5b15c2.entry.js} +1 -1
  62. package/dist/apollo-core/p-cc57f20d.entry.js +1 -0
  63. package/dist/apollo-core/{p-fef6c256.entry.js → p-cdacfcd4.entry.js} +1 -1
  64. package/dist/apollo-core/{p-616c5a32.entry.js → p-cdb5b5c4.entry.js} +1 -1
  65. package/dist/apollo-core/p-d0bc7c45.entry.js +1 -0
  66. package/dist/apollo-core/{p-ff8acf15.entry.js → p-d41b8f46.entry.js} +1 -1
  67. package/dist/apollo-core/{p-9bf2ff9f.entry.js → p-d443291f.entry.js} +1 -1
  68. package/dist/apollo-core/p-d724c419.entry.js +1 -0
  69. package/dist/apollo-core/p-d9070ae5.entry.js +1 -0
  70. package/dist/apollo-core/p-dca48977.entry.js +1 -0
  71. package/dist/apollo-core/p-e1833287.entry.js +1 -0
  72. package/dist/apollo-core/{p-601b3ab5.entry.js → p-e2890eb1.entry.js} +1 -1
  73. package/dist/apollo-core/p-e2b73b60.entry.js +1 -0
  74. package/dist/apollo-core/p-e7e445b0.entry.js +1 -0
  75. package/dist/apollo-core/p-f1c103ff.entry.js +1 -0
  76. package/dist/apollo-core/{p-0463c29f.entry.js → p-f3a2c79b.entry.js} +1 -1
  77. package/dist/apollo-core/p-ffc2f0cf.entry.js +1 -0
  78. package/dist/cjs/apollo-core.cjs.js +1 -1
  79. package/dist/cjs/index-3cBvw409.js +16 -0
  80. package/dist/cjs/loader.cjs.js +1 -1
  81. package/dist/cjs/xpl-accordion.cjs.entry.js +2 -2
  82. package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
  83. package/dist/cjs/xpl-avatar_3.cjs.entry.js +5 -4
  84. package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
  85. package/dist/cjs/xpl-badge.cjs.entry.js +1 -1
  86. package/dist/cjs/xpl-banner.cjs.entry.js +2 -2
  87. package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +1 -1
  88. package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +1 -1
  89. package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
  90. package/dist/cjs/xpl-button.cjs.entry.js +1 -1
  91. package/dist/cjs/xpl-calendar.cjs.entry.js +1 -1
  92. package/dist/cjs/xpl-checkbox.cjs.entry.js +3 -3
  93. package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
  94. package/dist/cjs/xpl-content-area.cjs.entry.js +1 -1
  95. package/dist/cjs/xpl-dashboard.cjs.entry.js +1 -1
  96. package/dist/cjs/xpl-data-card.cjs.entry.js +2 -2
  97. package/dist/cjs/xpl-dropdown_4.cjs.entry.js +14 -11
  98. package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +2 -2
  99. package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +2 -2
  100. package/dist/cjs/xpl-dynamic-table.cjs.entry.js +2 -2
  101. package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
  102. package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
  103. package/dist/cjs/xpl-header-accordion.cjs.entry.js +1 -1
  104. package/dist/cjs/xpl-icon.cjs.entry.js +2 -2
  105. package/dist/cjs/xpl-input-color.cjs.entry.js +13 -13
  106. package/dist/cjs/xpl-input-phone.cjs.entry.js +5 -5
  107. package/dist/cjs/xpl-input-time.cjs.entry.js +2 -2
  108. package/dist/cjs/xpl-input_4.cjs.entry.js +15 -14
  109. package/dist/cjs/xpl-large-card.cjs.entry.js +1 -1
  110. package/dist/cjs/xpl-list.cjs.entry.js +2 -2
  111. package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
  112. package/dist/cjs/xpl-modal.cjs.entry.js +50 -21
  113. package/dist/cjs/xpl-nav-header-menu.cjs.entry.js +2 -2
  114. package/dist/cjs/xpl-nav-item.cjs.entry.js +2 -2
  115. package/dist/cjs/xpl-pagination.cjs.entry.js +4 -4
  116. package/dist/cjs/xpl-panel.cjs.entry.js +2 -2
  117. package/dist/cjs/xpl-popover.cjs.entry.js +4 -4
  118. package/dist/cjs/xpl-progress-bar.cjs.entry.js +2 -2
  119. package/dist/cjs/xpl-progress-indicator.cjs.entry.js +1 -1
  120. package/dist/cjs/xpl-secondary-nav.cjs.entry.js +1 -1
  121. package/dist/cjs/xpl-select_2.cjs.entry.js +8 -8
  122. package/dist/cjs/xpl-side-nav-header-item.cjs.entry.js +2 -2
  123. package/dist/cjs/xpl-side-nav-item.cjs.entry.js +2 -2
  124. package/dist/cjs/xpl-side-nav-section.cjs.entry.js +5 -5
  125. package/dist/cjs/xpl-side-nav.cjs.entry.js +7 -3
  126. package/dist/cjs/xpl-skeleton.cjs.entry.js +1 -1
  127. package/dist/cjs/xpl-slideout.cjs.entry.js +1 -1
  128. package/dist/cjs/xpl-tab-panel.cjs.entry.js +2 -2
  129. package/dist/cjs/xpl-table-body.cjs.entry.js +14 -0
  130. package/dist/cjs/xpl-table-footer-cell.cjs.entry.js +18 -0
  131. package/dist/cjs/xpl-table-footer.cjs.entry.js +14 -0
  132. package/dist/cjs/xpl-table-header.cjs.entry.js +1 -1
  133. package/dist/cjs/xpl-table-row.cjs.entry.js +20 -0
  134. package/dist/cjs/xpl-table.cjs.entry.js +5 -5
  135. package/dist/cjs/xpl-tabs.cjs.entry.js +5 -5
  136. package/dist/cjs/xpl-toast.cjs.entry.js +2 -2
  137. package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
  138. package/dist/cjs/xpl-toolbar.cjs.entry.js +2 -2
  139. package/dist/cjs/xpl-tooltip.cjs.entry.js +1 -1
  140. package/dist/cjs/xpl-top-nav-item.cjs.entry.js +2 -2
  141. package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +2 -2
  142. package/dist/cjs/xpl-top-nav.cjs.entry.js +5 -5
  143. package/dist/cjs/xpl-utility-bar.cjs.entry.js +1 -1
  144. package/dist/collection/collection-manifest.json +4 -0
  145. package/dist/collection/components/xpl-accordion/xpl-accordion.js +2 -2
  146. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +1 -1
  147. package/dist/collection/components/xpl-avatar/xpl-avatar.js +1 -0
  148. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
  149. package/dist/collection/components/xpl-badge/xpl-badge.js +1 -1
  150. package/dist/collection/components/xpl-banner/xpl-banner.js +2 -2
  151. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +1 -1
  152. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +1 -1
  153. package/dist/collection/components/xpl-button/xpl-button.js +1 -1
  154. package/dist/collection/components/xpl-button-row/xpl-button-row.js +1 -1
  155. package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
  156. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +3 -3
  157. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
  158. package/dist/collection/components/xpl-content-area/xpl-content-area.js +1 -1
  159. package/dist/collection/components/xpl-dashboard/xpl-dashboard.js +1 -1
  160. package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
  161. package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
  162. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
  163. package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
  164. package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
  165. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +10 -7
  166. package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +2 -2
  167. package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
  168. package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
  169. package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
  170. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
  171. package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +1 -1
  172. package/dist/collection/components/xpl-icon/xpl-icon.js +2 -2
  173. package/dist/collection/components/xpl-input/xpl-input-color/color-utils.js +5 -5
  174. package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
  175. package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
  176. package/dist/collection/components/xpl-input/xpl-input-file/xpl-input-file.js +4 -4
  177. package/dist/collection/components/xpl-input/xpl-input-phone/xpl-input-phone.js +5 -5
  178. package/dist/collection/components/xpl-input/xpl-input-search/xpl-input-search.js +1 -1
  179. package/dist/collection/components/xpl-input/xpl-input-time/xpl-input-time.js +2 -2
  180. package/dist/collection/components/xpl-input/xpl-input.js +7 -6
  181. package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
  182. package/dist/collection/components/xpl-list/xpl-list.js +2 -2
  183. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +1 -1
  184. package/dist/collection/components/xpl-modal/xpl-modal.js +50 -21
  185. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +2 -2
  186. package/dist/collection/components/xpl-pagination/xpl-pagination.js +4 -4
  187. package/dist/collection/components/xpl-panel/xpl-panel.js +2 -2
  188. package/dist/collection/components/xpl-popover/xpl-popover.js +4 -4
  189. package/dist/collection/components/xpl-progress-bar/xpl-progress-bar.js +2 -2
  190. package/dist/collection/components/xpl-progress-indicator/xpl-progress-indicator.js +1 -1
  191. package/dist/collection/components/xpl-radio/xpl-radio.js +3 -3
  192. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +1 -1
  193. package/dist/collection/components/xpl-select/select.shared.js +82 -0
  194. package/dist/collection/components/xpl-select/xpl-select.js +6 -6
  195. package/dist/collection/components/xpl-side-nav/xpl-side-nav-header-item/xpl-side-nav-header-item.js +2 -2
  196. package/dist/collection/components/xpl-side-nav/xpl-side-nav-item/xpl-side-nav-item.js +2 -2
  197. package/dist/collection/components/xpl-side-nav/xpl-side-nav-section/xpl-side-nav-section.js +5 -5
  198. package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +8 -4
  199. package/dist/collection/components/xpl-skeleton/xpl-skeleton.js +1 -1
  200. package/dist/collection/components/xpl-slideout/xpl-slideout.js +1 -1
  201. package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +2 -2
  202. package/dist/collection/components/xpl-table/xpl-table-body/xpl-table-body.js +7 -0
  203. package/dist/collection/components/xpl-table/xpl-table-footer/xpl-table-footer.js +7 -0
  204. package/dist/collection/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.js +37 -0
  205. package/dist/collection/components/xpl-table/xpl-table-row/xpl-table-row.js +78 -0
  206. package/dist/collection/components/xpl-table/xpl-table.js +5 -5
  207. package/dist/collection/components/xpl-table-header/xpl-table-header.js +1 -1
  208. package/dist/collection/components/xpl-tabs/tabs.shared.js +0 -33
  209. package/dist/collection/components/xpl-tabs/xpl-tabs.js +5 -5
  210. package/dist/collection/components/xpl-tag/xpl-tag.js +2 -2
  211. package/dist/collection/components/xpl-toast/xpl-toast.js +2 -2
  212. package/dist/collection/components/xpl-toggle/xpl-toggle.js +3 -3
  213. package/dist/collection/components/xpl-toolbar/xpl-toolbar.js +2 -2
  214. package/dist/collection/components/xpl-tooltip/xpl-tooltip.js +1 -1
  215. package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
  216. package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
  217. package/dist/collection/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.js +2 -2
  218. package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +5 -5
  219. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +1 -1
  220. package/dist/components/index.d.ts +8 -0
  221. package/dist/components/index.js +1 -1
  222. package/dist/components/p-9VnxPQLs.js +1 -0
  223. package/dist/components/p-B2oLZUDD.js +1 -0
  224. package/dist/components/p-BYYFsuD3.js +1 -0
  225. package/dist/components/p-BZtxVB1R.js +1 -0
  226. package/dist/components/{p-BGqQbjLl.js → p-BdpZR4KO.js} +1 -1
  227. package/dist/components/{p-DywQ3S73.js → p-Chpgh5SL.js} +1 -1
  228. package/dist/components/{p-2jYZ7ACH.js → p-CiHTfk3E.js} +1 -1
  229. package/dist/components/p-CnVGKN63.js +1 -0
  230. package/dist/components/p-Cz7zDaI4.js +1 -0
  231. package/dist/components/{p-CjbPCnPP.js → p-D--kzomA.js} +1 -1
  232. package/dist/components/p-D4rv6CNJ.js +1 -0
  233. package/dist/components/{p-Dzp5p-eh.js → p-DAb-txW3.js} +1 -1
  234. package/dist/components/p-DYmvElhR.js +1 -0
  235. package/dist/components/{p-DsRsm61K.js → p-EfW0v54z.js} +1 -1
  236. package/dist/components/{p-DWUJ_jsx.js → p-JyNpXfDe.js} +1 -1
  237. package/dist/components/{p-DS2Kv5fl.js → p-U0JYwf4c.js} +1 -1
  238. package/dist/components/p-YG9Jza0y.js +1 -0
  239. package/dist/components/{p-imCMp2Nl.js → p-l3EZ-agL.js} +1 -1
  240. package/dist/components/p-oIn1krdu.js +1 -0
  241. package/dist/components/p-wIU7KUhA.js +1 -0
  242. package/dist/components/{p-BnTsRbko.js → p-xFsB212F.js} +1 -1
  243. package/dist/components/p-xtOHikY0.js +1 -0
  244. package/dist/components/xpl-accordion.js +1 -1
  245. package/dist/components/xpl-application-shell.js +1 -1
  246. package/dist/components/xpl-avatar.js +1 -1
  247. package/dist/components/xpl-backdrop.js +1 -1
  248. package/dist/components/xpl-badge.js +1 -1
  249. package/dist/components/xpl-banner.js +1 -1
  250. package/dist/components/xpl-breadcrumb-item.js +1 -1
  251. package/dist/components/xpl-breadcrumbs.js +1 -1
  252. package/dist/components/xpl-button-row.js +1 -1
  253. package/dist/components/xpl-button.js +1 -1
  254. package/dist/components/xpl-calendar.js +1 -1
  255. package/dist/components/xpl-checkbox.js +1 -1
  256. package/dist/components/xpl-choicelist.js +1 -1
  257. package/dist/components/xpl-content-area.js +1 -1
  258. package/dist/components/xpl-dashboard.js +1 -1
  259. package/dist/components/xpl-data-card.js +1 -1
  260. package/dist/components/xpl-divider.js +1 -1
  261. package/dist/components/xpl-dropdown-group.js +1 -1
  262. package/dist/components/xpl-dropdown-heading.js +1 -1
  263. package/dist/components/xpl-dropdown-option.js +1 -1
  264. package/dist/components/xpl-dropdown.js +1 -1
  265. package/dist/components/xpl-dynamic-table-cell.js +1 -1
  266. package/dist/components/xpl-dynamic-table-row.js +1 -1
  267. package/dist/components/xpl-dynamic-table.js +1 -1
  268. package/dist/components/xpl-grid-item.js +1 -1
  269. package/dist/components/xpl-grid.js +1 -1
  270. package/dist/components/xpl-header-accordion.js +1 -1
  271. package/dist/components/xpl-icon.js +1 -1
  272. package/dist/components/xpl-input-color.js +1 -1
  273. package/dist/components/xpl-input-date.js +1 -1
  274. package/dist/components/xpl-input-file.js +1 -1
  275. package/dist/components/xpl-input-phone.js +1 -1
  276. package/dist/components/xpl-input-search.js +1 -1
  277. package/dist/components/xpl-input-time.js +1 -1
  278. package/dist/components/xpl-input.js +1 -1
  279. package/dist/components/xpl-large-card.js +1 -1
  280. package/dist/components/xpl-list-item.js +1 -1
  281. package/dist/components/xpl-list.js +1 -1
  282. package/dist/components/xpl-main-nav.js +1 -1
  283. package/dist/components/xpl-modal.js +1 -1
  284. package/dist/components/xpl-nav-header-menu.js +1 -1
  285. package/dist/components/xpl-nav-item.js +1 -1
  286. package/dist/components/xpl-pagination.js +1 -1
  287. package/dist/components/xpl-panel.js +1 -1
  288. package/dist/components/xpl-popover.js +1 -1
  289. package/dist/components/xpl-progress-bar.js +1 -1
  290. package/dist/components/xpl-progress-indicator.js +1 -1
  291. package/dist/components/xpl-radio.js +1 -1
  292. package/dist/components/xpl-secondary-nav.js +1 -1
  293. package/dist/components/xpl-select.js +1 -1
  294. package/dist/components/xpl-side-nav-header-item.js +1 -1
  295. package/dist/components/xpl-side-nav-item.js +1 -1
  296. package/dist/components/xpl-side-nav-section.js +1 -1
  297. package/dist/components/xpl-side-nav.js +1 -1
  298. package/dist/components/xpl-skeleton.js +1 -1
  299. package/dist/components/xpl-slideout.js +1 -1
  300. package/dist/components/xpl-spotlight.js +1 -1
  301. package/dist/components/xpl-tab-panel.js +1 -1
  302. package/dist/components/xpl-tab.js +1 -1
  303. package/dist/components/xpl-table-body.d.ts +11 -0
  304. package/dist/components/xpl-table-body.js +1 -0
  305. package/dist/components/xpl-table-footer-cell.d.ts +11 -0
  306. package/dist/components/xpl-table-footer-cell.js +1 -0
  307. package/dist/components/xpl-table-footer.d.ts +11 -0
  308. package/dist/components/xpl-table-footer.js +1 -0
  309. package/dist/components/xpl-table-header-cell.js +1 -1
  310. package/dist/components/xpl-table-header.js +1 -1
  311. package/dist/components/xpl-table-row.d.ts +11 -0
  312. package/dist/components/xpl-table-row.js +1 -0
  313. package/dist/components/xpl-table.js +1 -1
  314. package/dist/components/xpl-tabs.js +1 -1
  315. package/dist/components/xpl-tag.js +1 -1
  316. package/dist/components/xpl-toast.js +1 -1
  317. package/dist/components/xpl-toggle.js +1 -1
  318. package/dist/components/xpl-toolbar.js +1 -1
  319. package/dist/components/xpl-tooltip.js +1 -1
  320. package/dist/components/xpl-top-nav-item.js +1 -1
  321. package/dist/components/xpl-top-nav-menu.js +1 -1
  322. package/dist/components/xpl-top-nav.js +1 -1
  323. package/dist/components/xpl-utility-bar.js +1 -1
  324. package/dist/docs/xpl-modal/readme.md +18 -2
  325. package/dist/docs/xpl-table/xpl-table-body/readme.md +16 -0
  326. package/dist/docs/xpl-table/xpl-table-footer/readme.md +16 -0
  327. package/dist/docs/xpl-table/xpl-table-footer-cell/readme.md +31 -0
  328. package/dist/docs/xpl-table/xpl-table-row/readme.md +34 -0
  329. package/dist/docs.json +207 -6
  330. package/dist/esm/apollo-core.js +1 -1
  331. package/dist/esm/index-ukZKsqqq.js +16 -0
  332. package/dist/esm/loader.js +1 -1
  333. package/dist/esm/xpl-accordion.entry.js +2 -2
  334. package/dist/esm/xpl-application-shell.entry.js +1 -1
  335. package/dist/esm/xpl-avatar_3.entry.js +5 -4
  336. package/dist/esm/xpl-backdrop.entry.js +1 -1
  337. package/dist/esm/xpl-badge.entry.js +1 -1
  338. package/dist/esm/xpl-banner.entry.js +2 -2
  339. package/dist/esm/xpl-breadcrumb-item.entry.js +1 -1
  340. package/dist/esm/xpl-breadcrumbs.entry.js +1 -1
  341. package/dist/esm/xpl-button-row.entry.js +1 -1
  342. package/dist/esm/xpl-button.entry.js +1 -1
  343. package/dist/esm/xpl-calendar.entry.js +1 -1
  344. package/dist/esm/xpl-checkbox.entry.js +3 -3
  345. package/dist/esm/xpl-choicelist.entry.js +1 -1
  346. package/dist/esm/xpl-content-area.entry.js +1 -1
  347. package/dist/esm/xpl-dashboard.entry.js +1 -1
  348. package/dist/esm/xpl-data-card.entry.js +2 -2
  349. package/dist/esm/xpl-dropdown_4.entry.js +14 -11
  350. package/dist/esm/xpl-dynamic-table-cell.entry.js +2 -2
  351. package/dist/esm/xpl-dynamic-table-row.entry.js +2 -2
  352. package/dist/esm/xpl-dynamic-table.entry.js +2 -2
  353. package/dist/esm/xpl-grid-item.entry.js +1 -1
  354. package/dist/esm/xpl-grid.entry.js +1 -1
  355. package/dist/esm/xpl-header-accordion.entry.js +1 -1
  356. package/dist/esm/xpl-icon.entry.js +2 -2
  357. package/dist/esm/xpl-input-color.entry.js +13 -13
  358. package/dist/esm/xpl-input-phone.entry.js +5 -5
  359. package/dist/esm/xpl-input-time.entry.js +2 -2
  360. package/dist/esm/xpl-input_4.entry.js +15 -14
  361. package/dist/esm/xpl-large-card.entry.js +1 -1
  362. package/dist/esm/xpl-list.entry.js +2 -2
  363. package/dist/esm/xpl-main-nav.entry.js +1 -1
  364. package/dist/esm/xpl-modal.entry.js +50 -21
  365. package/dist/esm/xpl-nav-header-menu.entry.js +2 -2
  366. package/dist/esm/xpl-nav-item.entry.js +2 -2
  367. package/dist/esm/xpl-pagination.entry.js +4 -4
  368. package/dist/esm/xpl-panel.entry.js +2 -2
  369. package/dist/esm/xpl-popover.entry.js +4 -4
  370. package/dist/esm/xpl-progress-bar.entry.js +2 -2
  371. package/dist/esm/xpl-progress-indicator.entry.js +1 -1
  372. package/dist/esm/xpl-secondary-nav.entry.js +1 -1
  373. package/dist/esm/xpl-select_2.entry.js +8 -8
  374. package/dist/esm/xpl-side-nav-header-item.entry.js +2 -2
  375. package/dist/esm/xpl-side-nav-item.entry.js +2 -2
  376. package/dist/esm/xpl-side-nav-section.entry.js +5 -5
  377. package/dist/esm/xpl-side-nav.entry.js +8 -4
  378. package/dist/esm/xpl-skeleton.entry.js +1 -1
  379. package/dist/esm/xpl-slideout.entry.js +1 -1
  380. package/dist/esm/xpl-tab-panel.entry.js +2 -2
  381. package/dist/esm/xpl-table-body.entry.js +12 -0
  382. package/dist/esm/xpl-table-footer-cell.entry.js +16 -0
  383. package/dist/esm/xpl-table-footer.entry.js +12 -0
  384. package/dist/esm/xpl-table-header.entry.js +1 -1
  385. package/dist/esm/xpl-table-row.entry.js +18 -0
  386. package/dist/esm/xpl-table.entry.js +5 -5
  387. package/dist/esm/xpl-tabs.entry.js +5 -5
  388. package/dist/esm/xpl-toast.entry.js +2 -2
  389. package/dist/esm/xpl-toggle.entry.js +3 -3
  390. package/dist/esm/xpl-toolbar.entry.js +2 -2
  391. package/dist/esm/xpl-tooltip.entry.js +1 -1
  392. package/dist/esm/xpl-top-nav-item.entry.js +2 -2
  393. package/dist/esm/xpl-top-nav-menu.entry.js +2 -2
  394. package/dist/esm/xpl-top-nav.entry.js +5 -5
  395. package/dist/esm/xpl-utility-bar.entry.js +1 -1
  396. package/dist/types/components/xpl-modal/xpl-modal.d.ts +7 -1
  397. package/dist/types/components/xpl-select/select.shared.d.ts +23 -0
  398. package/dist/types/components/xpl-table/xpl-table-body/xpl-table-body.d.ts +3 -0
  399. package/dist/types/components/xpl-table/xpl-table-footer/xpl-table-footer.d.ts +3 -0
  400. package/dist/types/components/xpl-table/xpl-table-footer-cell/xpl-table-footer-cell.d.ts +4 -0
  401. package/dist/types/components/xpl-table/xpl-table-row/xpl-table-row.d.ts +6 -0
  402. package/dist/types/components/xpl-tabs/tabs.shared.d.ts +0 -2
  403. package/dist/types/components.d.ts +98 -0
  404. package/hydrate/index.js +302 -176
  405. package/hydrate/index.mjs +302 -176
  406. package/package.json +42 -46
  407. package/dist/apollo-core/p-0095174c.entry.js +0 -1
  408. package/dist/apollo-core/p-020ecd66.entry.js +0 -1
  409. package/dist/apollo-core/p-091411e3.entry.js +0 -1
  410. package/dist/apollo-core/p-0be4dbb8.entry.js +0 -1
  411. package/dist/apollo-core/p-1139fac0.entry.js +0 -1
  412. package/dist/apollo-core/p-140a96c7.entry.js +0 -1
  413. package/dist/apollo-core/p-26b6a0ed.entry.js +0 -1
  414. package/dist/apollo-core/p-39e71d86.entry.js +0 -1
  415. package/dist/apollo-core/p-3dd1de49.entry.js +0 -1
  416. package/dist/apollo-core/p-4129d971.entry.js +0 -1
  417. package/dist/apollo-core/p-5afc9831.entry.js +0 -1
  418. package/dist/apollo-core/p-5d25a84a.entry.js +0 -1
  419. package/dist/apollo-core/p-5e5c5016.entry.js +0 -1
  420. package/dist/apollo-core/p-638fd9b1.entry.js +0 -1
  421. package/dist/apollo-core/p-724c5038.entry.js +0 -1
  422. package/dist/apollo-core/p-80a11cad.entry.js +0 -1
  423. package/dist/apollo-core/p-875e0eaa.entry.js +0 -1
  424. package/dist/apollo-core/p-8ddbf2e2.entry.js +0 -1
  425. package/dist/apollo-core/p-a33b0943.entry.js +0 -1
  426. package/dist/apollo-core/p-ba41bbd5.entry.js +0 -1
  427. package/dist/apollo-core/p-cde21f72.entry.js +0 -1
  428. package/dist/apollo-core/p-d288c1d1.entry.js +0 -1
  429. package/dist/apollo-core/p-d3f2b8b8.entry.js +0 -1
  430. package/dist/apollo-core/p-dfaba114.entry.js +0 -1
  431. package/dist/apollo-core/p-e2a16242.entry.js +0 -1
  432. package/dist/apollo-core/p-ec488f9c.entry.js +0 -1
  433. package/dist/apollo-core/p-f2bfe6a6.entry.js +0 -1
  434. package/dist/collection/components/xpl-accordion/accordion.stories.js +0 -84
  435. package/dist/collection/components/xpl-application-shell/application-shell.stories.js +0 -755
  436. package/dist/collection/components/xpl-avatar/avatar.stories.js +0 -157
  437. package/dist/collection/components/xpl-backdrop/backdrop.stories.js +0 -38
  438. package/dist/collection/components/xpl-badge/badge.stories.js +0 -104
  439. package/dist/collection/components/xpl-banner/banner.stories.js +0 -69
  440. package/dist/collection/components/xpl-breadcrumbs/breadcrumbs.stories.js +0 -139
  441. package/dist/collection/components/xpl-button/button.stories.js +0 -144
  442. package/dist/collection/components/xpl-button-row/button-row.stories.js +0 -68
  443. package/dist/collection/components/xpl-calendar/calendar.stories.js +0 -71
  444. package/dist/collection/components/xpl-checkbox/checkbox.stories.js +0 -92
  445. package/dist/collection/components/xpl-choicelist/choicelist.stories.js +0 -162
  446. package/dist/collection/components/xpl-content-area/content-area.stories.js +0 -44
  447. package/dist/collection/components/xpl-dashboard/dashboard.stories.js +0 -57
  448. package/dist/collection/components/xpl-data-card/data-card.stories.js +0 -170
  449. package/dist/collection/components/xpl-divider/divider.stories.js +0 -47
  450. package/dist/collection/components/xpl-dropdown/dropdown.stories.js +0 -395
  451. package/dist/collection/components/xpl-dynamic-table/dynamic-table.stories.js +0 -169
  452. package/dist/collection/components/xpl-grid/grid.stories.js +0 -85
  453. package/dist/collection/components/xpl-header-accordion/header-accordion.stories.js +0 -56
  454. package/dist/collection/components/xpl-icon/icons.stories.js +0 -161
  455. package/dist/collection/components/xpl-input/input.stories.js +0 -712
  456. package/dist/collection/components/xpl-large-card/large-card.stories.js +0 -155
  457. package/dist/collection/components/xpl-list/list.stories.js +0 -398
  458. package/dist/collection/components/xpl-main-nav/main-nav.stories.js +0 -312
  459. package/dist/collection/components/xpl-modal/modal.stories.js +0 -100
  460. package/dist/collection/components/xpl-pagination/pagination.stories.js +0 -65
  461. package/dist/collection/components/xpl-panel/panel.stories.js +0 -62
  462. package/dist/collection/components/xpl-popover/popover.stories.js +0 -174
  463. package/dist/collection/components/xpl-progress-bar/progress-bar.stories.js +0 -105
  464. package/dist/collection/components/xpl-progress-indicator/progress-indicator.stories.js +0 -126
  465. package/dist/collection/components/xpl-radio/radio.stories.js +0 -115
  466. package/dist/collection/components/xpl-secondary-nav/secondary-nav.stories.js +0 -83
  467. package/dist/collection/components/xpl-select/select.stories.js +0 -300
  468. package/dist/collection/components/xpl-side-nav/side-nav.stories.js +0 -1070
  469. package/dist/collection/components/xpl-skeleton/skeleton.stories.js +0 -80
  470. package/dist/collection/components/xpl-slideout/slideout.stories.js +0 -122
  471. package/dist/collection/components/xpl-spotlight/spotlight.stories.js +0 -392
  472. package/dist/collection/components/xpl-table/table.stories.js +0 -156
  473. package/dist/collection/components/xpl-table-header/table-header.stories.js +0 -134
  474. package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +0 -83
  475. package/dist/collection/components/xpl-tabs/segment-control.stories.js +0 -40
  476. package/dist/collection/components/xpl-tabs/tabs.stories.js +0 -43
  477. package/dist/collection/components/xpl-tag/tag.stories.js +0 -159
  478. package/dist/collection/components/xpl-toast/toast.stories.js +0 -112
  479. package/dist/collection/components/xpl-toggle/toggle.stories.js +0 -95
  480. package/dist/collection/components/xpl-toolbar/toolbar.stories.js +0 -39
  481. package/dist/collection/components/xpl-tooltip/tooltip.stories.js +0 -67
  482. package/dist/collection/components/xpl-top-nav/top-nav.stories.js +0 -764
  483. package/dist/collection/components/xpl-utility-bar/utility-bar.stories.js +0 -94
  484. package/dist/components/p-Bseq_BgD.js +0 -1
  485. package/dist/components/p-CCgZCY_A.js +0 -1
  486. package/dist/components/p-CJzsLWeV.js +0 -1
  487. package/dist/components/p-CRKY79vL.js +0 -1
  488. package/dist/components/p-Cjxw-qOg.js +0 -1
  489. package/dist/components/p-D6JUVA1x.js +0 -1
  490. package/dist/components/p-DFGw0APN.js +0 -1
  491. package/dist/components/p-DLLQBDCb.js +0 -1
  492. package/dist/components/p-Di1NDy0w.js +0 -1
  493. package/dist/components/p-DkM7jyQB.js +0 -1
  494. package/dist/components/p-Mehog36m.js +0 -1
  495. package/dist/components/p-RYnBuuDE.js +0 -1
  496. package/dist/css/typography.stories.js +0 -153
  497. package/dist/types/components/xpl-accordion/accordion.stories.d.ts +0 -46
  498. package/dist/types/components/xpl-application-shell/application-shell.stories.d.ts +0 -46
  499. package/dist/types/components/xpl-avatar/avatar.stories.d.ts +0 -39
  500. package/dist/types/components/xpl-backdrop/backdrop.stories.d.ts +0 -23
  501. package/dist/types/components/xpl-badge/badge.stories.d.ts +0 -87
  502. package/dist/types/components/xpl-banner/banner.stories.d.ts +0 -79
  503. package/dist/types/components/xpl-breadcrumbs/breadcrumbs.stories.d.ts +0 -40
  504. package/dist/types/components/xpl-button/button.stories.d.ts +0 -136
  505. package/dist/types/components/xpl-button-row/button-row.stories.d.ts +0 -34
  506. package/dist/types/components/xpl-calendar/calendar.stories.d.ts +0 -45
  507. package/dist/types/components/xpl-checkbox/checkbox.stories.d.ts +0 -51
  508. package/dist/types/components/xpl-choicelist/choicelist.stories.d.ts +0 -30
  509. package/dist/types/components/xpl-content-area/content-area.stories.d.ts +0 -19
  510. package/dist/types/components/xpl-dashboard/dashboard.stories.d.ts +0 -22
  511. package/dist/types/components/xpl-data-card/data-card.stories.d.ts +0 -113
  512. package/dist/types/components/xpl-divider/divider.stories.d.ts +0 -28
  513. package/dist/types/components/xpl-dropdown/dropdown.stories.d.ts +0 -177
  514. package/dist/types/components/xpl-dynamic-table/dynamic-table.stories.d.ts +0 -30
  515. package/dist/types/components/xpl-grid/grid.stories.d.ts +0 -109
  516. package/dist/types/components/xpl-header-accordion/header-accordion.stories.d.ts +0 -32
  517. package/dist/types/components/xpl-icon/icons.stories.d.ts +0 -31
  518. package/dist/types/components/xpl-input/input.stories.d.ts +0 -441
  519. package/dist/types/components/xpl-large-card/large-card.stories.d.ts +0 -57
  520. package/dist/types/components/xpl-list/list.stories.d.ts +0 -385
  521. package/dist/types/components/xpl-main-nav/main-nav.stories.d.ts +0 -19
  522. package/dist/types/components/xpl-modal/modal.stories.d.ts +0 -103
  523. package/dist/types/components/xpl-pagination/pagination.stories.d.ts +0 -31
  524. package/dist/types/components/xpl-panel/panel.stories.d.ts +0 -30
  525. package/dist/types/components/xpl-popover/popover.stories.d.ts +0 -21
  526. package/dist/types/components/xpl-progress-bar/progress-bar.stories.d.ts +0 -62
  527. package/dist/types/components/xpl-progress-indicator/progress-indicator.stories.d.ts +0 -64
  528. package/dist/types/components/xpl-radio/radio.stories.d.ts +0 -96
  529. package/dist/types/components/xpl-secondary-nav/secondary-nav.stories.d.ts +0 -8
  530. package/dist/types/components/xpl-select/select.stories.d.ts +0 -158
  531. package/dist/types/components/xpl-side-nav/side-nav.stories.d.ts +0 -173
  532. package/dist/types/components/xpl-skeleton/skeleton.stories.d.ts +0 -36
  533. package/dist/types/components/xpl-slideout/slideout.stories.d.ts +0 -124
  534. package/dist/types/components/xpl-spotlight/spotlight.stories.d.ts +0 -203
  535. package/dist/types/components/xpl-table/table.stories.d.ts +0 -67
  536. package/dist/types/components/xpl-table-header/table-header.stories.d.ts +0 -80
  537. package/dist/types/components/xpl-table-header-cell/table-header-cell.stories.d.ts +0 -36
  538. package/dist/types/components/xpl-tabs/segment-control.stories.d.ts +0 -134
  539. package/dist/types/components/xpl-tabs/tabs.stories.d.ts +0 -107
  540. package/dist/types/components/xpl-tag/tag.stories.d.ts +0 -68
  541. package/dist/types/components/xpl-toast/toast.stories.d.ts +0 -70
  542. package/dist/types/components/xpl-toggle/toggle.stories.d.ts +0 -53
  543. package/dist/types/components/xpl-toolbar/toolbar.stories.d.ts +0 -35
  544. package/dist/types/components/xpl-tooltip/tooltip.stories.d.ts +0 -29
  545. package/dist/types/components/xpl-top-nav/top-nav.stories.d.ts +0 -549
  546. package/dist/types/components/xpl-utility-bar/utility-bar.stories.d.ts +0 -27
  547. package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/.storybook/utils/story-function.d.ts +0 -11
  548. package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/.storybook/utils/wait-for-hydration.d.ts +0 -1
  549. package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/src/css/typography.stories.d.ts +0 -76
  550. /package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/{src/utils → utils}/form-bindings.d.ts +0 -0
  551. /package/dist/types/home/runner/work/apollo/apollo/packages/apollo-core/.stencil/{src/utils → utils}/story-vrt.d.ts +0 -0
@@ -0,0 +1 @@
1
+ import{p as t,H as e,d as i,h as s,c as n,t as a}from"./p-BSHdGbmH.js";import{d as o}from"./p-xtOHikY0.js";import{d as r}from"./p-CnVGKN63.js";import{d as h}from"./p-YG9Jza0y.js";import{d as l}from"./p-DAb-txW3.js";import{d as c}from"./p-l3EZ-agL.js";import{i as p}from"./p-Dqb1pIRo.js";import{d}from"./p-BZtxVB1R.js";import{d as u}from"./p-JyNpXfDe.js";import{d as m}from"./p-U0JYwf4c.js";import{v as f}from"./p-CK3_k8jD.js";import{d as b}from"./p-BdpZR4KO.js";const x=(t,e,i)=>{const s=(i/=100)*(e/=100),n=s*(1-Math.abs(t/60%2-1)),a=i-s;let o=0,r=0,h=0;return t<60?(o=s,r=n,h=0):t<120?(o=n,r=s,h=0):t<180?(o=0,r=s,h=n):t<240?(o=0,r=n,h=s):t<300?(o=n,r=0,h=s):(o=s,r=0,h=n),{r:Math.round(255*(o+a)),g:Math.round(255*(r+a)),b:Math.round(255*(h+a))}},g=(t,e,i)=>[t,e,i].map((t=>t.toString(16).padStart(2,"0"))).join(""),C=t=>{if(t.startsWith("#")){if(!/^#([a-fA-F\d]{6})$/.test(t))throw new Error("xpl-input-color: Only 6-digit hex format supported (e.g. #aabbcc)");const e=t.toLowerCase().slice(1),i=parseInt(e.slice(0,2),16),s=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16);return{hex:e,r:i,g:s,b:n,a:1}}if(t.startsWith("rgba")||t.startsWith("rgb")){const e=t.match(/[\d.]+/g)?.map(Number);if(!e||e.length<3)throw new Error("xpl-input-color: Invalid rgba/rgb format");const[i,s,n,a=1]=e,o=t=>t.toString(16).padStart(2,"0");return{hex:`${o(i)}${o(s)}${o(n)}`.toLowerCase(),r:i,g:s,b:n,a}}if(t.startsWith("hsla")||t.startsWith("hsl")){const e=t.match(/[\d.]+/g)?.map(Number);if(!e||e.length<3)throw new Error("xpl-input-color: Invalid hsla/hsl format");const[i,s,n,a=1]=e,o=((t,e,i,s)=>{i/=100;const n=e=>(e+t/30)%12,a=(e/=100)*Math.min(i,1-i),o=t=>i-a*Math.max(-1,Math.min(n(t)-3,Math.min(9-n(t),1)));return`rgba(${Math.round(255*o(0))}, ${Math.round(255*o(8))}, ${Math.round(255*o(4))}, ${s})`})(i,s,n,a),r=o.match(/[\d.]+/g)?.map(Number);if(!r||r.length<3)throw new Error("xpl-input-color: Invalid hsla/hsl format");const[h,l,c]=r;return{hex:g(h,l,c).toLowerCase(),r:h,g:l,b:c,a}}throw new Error("xpl-input-color: Unsupported color format")},y=t=>t.a&&1!==t.a?`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`:`#${t.hex}`,v=[{countryCode:"US",dialCode:"+1",name:"United States"},{countryCode:"CA",dialCode:"+1",name:"Canada"},{countryCode:"GB",dialCode:"+44",name:"United Kingdom"},{countryCode:"AU",dialCode:"+61",name:"Australia"},{countryCode:"DE",dialCode:"+49",name:"Germany"},{countryCode:"FR",dialCode:"+33",name:"France"},{countryCode:"ES",dialCode:"+34",name:"Spain"},{countryCode:"IT",dialCode:"+39",name:"Italy"},{countryCode:"NL",dialCode:"+31",name:"Netherlands"},{countryCode:"BE",dialCode:"+32",name:"Belgium"},{countryCode:"AT",dialCode:"+43",name:"Austria"},{countryCode:"CH",dialCode:"+41",name:"Switzerland"},{countryCode:"PL",dialCode:"+48",name:"Poland"},{countryCode:"IE",dialCode:"+353",name:"Ireland"},{countryCode:"PT",dialCode:"+351",name:"Portugal"},{countryCode:"SE",dialCode:"+46",name:"Sweden"},{countryCode:"NO",dialCode:"+47",name:"Norway"},{countryCode:"DK",dialCode:"+45",name:"Denmark"},{countryCode:"FI",dialCode:"+358",name:"Finland"},{countryCode:"NZ",dialCode:"+64",name:"New Zealand"},{countryCode:"JP",dialCode:"+81",name:"Japan"},{countryCode:"CN",dialCode:"+86",name:"China"},{countryCode:"IN",dialCode:"+91",name:"India"},{countryCode:"BR",dialCode:"+55",name:"Brazil"},{countryCode:"MX",dialCode:"+52",name:"Mexico"},{countryCode:"ZA",dialCode:"+27",name:"South Africa"},{countryCode:"SG",dialCode:"+65",name:"Singapore"},{countryCode:"HK",dialCode:"+852",name:"Hong Kong"},{countryCode:"KR",dialCode:"+82",name:"South Korea"}];function $(t){return v.find((e=>e.countryCode===t))}function k(t){return(t||"").replace(/\D/g,"")}function E(t){switch(t){case"US":case"CA":case"MX":case"JP":case"IN":case"KR":return 10;case"GB":case"DE":case"AT":case"CH":case"BR":case"CN":return 11;case"AU":case"FR":return 9;default:return 15}}function w(t,e){if(!t)return"";const i=t.replace(/\D/g,"");switch(e){case"US":case"CA":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=6?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,6)} ${t.slice(6,e)}`}(i);case"GB":return function(t){const e=Math.min(t.length,11);return e<=4?t.slice(0,e):e<=7?`${t.slice(0,4)} ${t.slice(4,e)}`:`${t.slice(0,4)} ${t.slice(4,7)} ${t.slice(7,e)}`}(i);case"AU":return function(t){const e=Math.min(t.length,9);return e<=1?t.slice(0,e):e<=4?`${t.slice(0,1)} ${t.slice(1,e)}`:e<=7?`${t.slice(0,1)} ${t.slice(1,4)} ${t.slice(4,e)}`:`${t.slice(0,1)} ${t.slice(1,4)} ${t.slice(4,7)} ${t.slice(7,e)}`}(i);case"DE":case"AT":case"CH":return function(t){const e=Math.min(t.length,11);return e<=3?t.slice(0,e):`${t.slice(0,3)} ${t.slice(3,e)}`}(i);case"FR":return function(t){const e=Math.min(t.length,9),i=[];let s=0;for(e>0&&(i.push(t.slice(0,1)),s=1);s<e&&s+2<=e;)i.push(t.slice(s,s+2)),s+=2;return s<e&&i.push(t.slice(s)),i.join(" ")}(i);case"BR":return function(t){const e=Math.min(t.length,11);return e<=2?e?`(${t}`:"":e<=6||7===e?`(${t.slice(0,2)}) ${t.slice(2,e)}`:`(${t.slice(0,2)}) ${t.slice(2,7)}-${t.slice(7,e)}`}(i);case"MX":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=6?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,6)} ${t.slice(6,e)}`}(i);case"JP":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)}-${t.slice(3,e)}`:`${t.slice(0,3)}-${t.slice(3,7)}-${t.slice(7,e)}`}(i);case"CN":return function(t){const e=Math.min(t.length,11);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,7)} ${t.slice(7,e)}`}(i);case"IN":return function(t){const e=Math.min(t.length,10);return e<=5?t.slice(0,e):`${t.slice(0,5)} ${t.slice(5,e)}`}(i);case"KR":return function(t){const e=Math.min(t.length,10);return e<=3?t.slice(0,e):e<=7?`${t.slice(0,3)} ${t.slice(3,e)}`:`${t.slice(0,3)} ${t.slice(3,7)} ${t.slice(7,e)}`}(i);default:return function(t){const e=t.length;if(e<=3)return t;const i=[];let s=0;for(;s<e;){const n=e-s>=4?4:3;i.push(t.slice(s,s+n)),s+=n}return i.join(" ")}(i)}}function S(t){const[e,i]=t.split(":"),s=Number(e)>=12?"PM":"AM";return[(Number(e)%12||12).toString(),i,s]}const _=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.max="23:59",this.min="00:00",this.step=30,this.mode="single",this.timeFormat="24h",this.allowCustomOption=!1,this.showOptions=!1,this.options=[],this.handleInput=t=>{const e=t.target,i=e.value?.replace(/[^0-9:apmAPM]/g,"");this.value=i},this.handleFocus=()=>{this.showOptions=!0},this.handleBlur=()=>{const t=function(t){if(!t||""===t.trim()||0===t.replace(/[^0-9]/g,"").length)return null;let e=t.trim().toLowerCase();e=e.replace(/(\d)\s+(am|pm)/g,"$1$2"),/^\d{1,2}(am|pm)?$/.test(e)&&(e=e.replace(/(am|pm)?$/,":00$1")),/^\d{1,2}$/.test(e)&&(e=`${e}:00`),/^\d{1,2}:\d{1}$/.test(e)&&(e=`${e}0`);const[i,s]=e.split(":"),n=s.replace(/[^0-9]/g,""),a=e.includes("am");return e.includes("pm")||a?a?`${(Number(i)%12).toString().padStart(2,"0")}:${n}`:`${Number(i)%12+12}:${n}`:`${i.padStart(2,"0")}:${n}`}(this.value??"");this.value=t??void 0},this.handleClick=()=>{this.showOptions=!0}}onValueChange(t){this.valueChange.emit(t),this.updateState(t)}updateState(t){this.formattedValue=this.formatDisplayedTime(t),this.amPm=this.formatDisplayedAmPm(t),this.validateValue()}formatDisplayedTime(t){if(!t)return"";if("12h"===this.timeFormat&&t.includes(":")){const[e,i]=S(t);return`${e}:${i}`}return t}formatDisplayedAmPm(t){if(!t||"12h"!==this.timeFormat)return"";const[,,e]=S(t);return e}validateValue(){if(!this.value)return void(this.hasErrorState=this.required?"required":null);if(!this.value.includes(":")||this.value.trim().length<4||this.value.trim().length>5)return void(this.hasErrorState="Invalid time format, must be HH:MM");const t=String(this.min??"00:00"),e=String(this.max??"23:59");this.hasErrorState=this.value<t||this.value>e?"Out of range":this.allowCustomOption||this.options.some((t=>t.value===this.value))?null:"Invalid option"}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}componentDidLoad(){"range"===this.mode&&console.warn("Range mode is not supported for time inputs at this time."),this.dropdown?.addEventListener("isOpenChange",(t=>{this.showOptions=t.detail}))}componentWillLoad(){this.options=this.getOptions(),this.value&&this.updateState(this.value)}getOptions(){return function(t,e,i,s){const n=t=>{const[e,i]=t.split(":").map(Number);return 60*e+i},a=n(e.toString()),o=n(i.toString()),r=[];for(let e=a;e<=o;e+=t)r.push((h=e,`${Math.floor(h/60).toString().padStart(2,"0")}:${(h%60).toString().padStart(2,"0")}`));var h;return r.map((t=>({label:"12h"===s?function(t){const[e,i,s]=S(t);return`${e}:${i} ${s}`}(t):t,value:t})))}(this.step,String(this.min??"00:00"),String(this.max??"23:59"),this.timeFormat??"24h").map((({label:t,value:e})=>({label:t,value:e,onClick:()=>{this.value=e,this.showOptions=!1}})))}render(){return s(n,{key:"5494cc0a537152b9d8dfa03e5281b21e6bb6eee2",class:{"xpl-input-time":!0,[`xpl-input-time--mode-${this.mode}`]:!0,"xpl-input-time--error":!!this.hasErrorState}},s("xpl-input",{key:"0d32784cd9fc8acacae1854a966bb426fa135fb5",pre:s("xpl-icon",{class:"xpl-input-time__clock-icon",icon:"clock",size:24}),post:"12h"===this.timeFormat?this.amPm||"AM":void 0,type:"text",_id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,onInput:this.handleInput,value:this.formattedValue,onFocusEvent:this.handleFocus,onBlurEvent:this.handleBlur,onClick:this.handleClick}),!this.readonly&&!this.disabled&&s("xpl-dropdown",{key:"206c668ca8ee29ceffaf14f14acd90fb076fc0ae",options:this.options,isOpen:this.showOptions,ref:t=>{this.dropdown=t??void 0},class:"xpl-input-time__dropdown"}))}static get watchers(){return{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}}},[0,"xpl-input-time",{inputId:[1,"input-id"],disabled:[4],name:[1],required:[4],readonly:[4],value:[1537],placeholder:[1],max:[8],min:[8],step:[2],mode:[1],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],formattedValue:[32],hasErrorState:[32],showOptions:[32],options:[32],amPm:[32]},void 0,{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}]);function M(){"undefined"!=typeof customElements&&["xpl-input-time","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time"].forEach((t=>{switch(t){case"xpl-input-time":customElements.get(a(t))||customElements.define(a(t),_);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||h();break;case"xpl-dropdown-option":customElements.get(a(t))||l();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||P();break;case"xpl-input-color":customElements.get(a(t))||A();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||u();break;case"xpl-input-phone":customElements.get(a(t))||F();break;case"xpl-input-search":customElements.get(a(t))||m();break;case"xpl-input-time":customElements.get(a(t))||M()}}))}function I(t){return t.toLowerCase().replace(/ /g,"-")}const D=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.valueChange=i(this,"valueChange",7),this.lastCursorRef=0,this.lastFormattedRef="",this.dropdownOpen=!1,this.hasErrorState=null,this.nationalNumber="",this.searchQuery="",this.triggerId=`xpl-input-phone-trigger-${f()}`,this.defaultCountry="US",this.isInternational=!0,this.handleTriggerClick=()=>{this.isEditable&&(this.dropdownOpen=!this.dropdownOpen)},this.handleNumberInput=t=>{const e=t.target,i=e.value||"";let s;if(this.lastCursorRef=e.selectionStart??0,this.lastFormattedRef=i,this.isInternational&&i.startsWith("+")){const t=k(i),e=this.effectiveDialCode.slice(1).replace(/\D/g,"");s=e&&t.startsWith(e)?t.slice(e.length):t}else s=k(i);const n=E(this.effectiveCountryCode);s.length>n&&(s=s.slice(0,n)),this.nationalNumber=s,this.emitValue(),e.value=this.displayValue},this.handleClear=()=>{this.nationalNumber="",this.emitValue(),this.inputEl?.focus()},this.handleDropdownUpdate=(t,{component:e})=>{const i=e??this.dropdownRef;if(!i)return;const{options:s}=i;if(s?.length){const t=s.reduce(((t,e)=>[...t,...e.groupName?e.options??[]:[e]]),[]).find((t=>t.isSelected));if(t?.value){const e=$(t.value);e&&(this.selectedCountry=e,this.emitValue(),this.inputEl?.focus())}}}}onDropdownOpenChange(t){t&&(this.searchQuery="")}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValueChange(t){if(null==t||""===t){const t=$(this.defaultCountry??"US")||v[0];return this.selectedCountry=t,void(this.nationalNumber="")}const e=function(t){if(!t||!t.startsWith("+"))return null;const e=t.slice(1).replace(/\D/g,"");if(!e.length)return null;const i=[...v].sort(((t,e)=>e.dialCode.replace(/\D/g,"").length-t.dialCode.replace(/\D/g,"").length)).find((t=>{const i=t.dialCode.slice(1).replace(/\D/g,"");return e.startsWith(i)}));if(!i)return null;const s=i.dialCode.slice(1).replace(/\D/g,""),n=e.slice(s.length);return{dialCode:i.dialCode,nationalNumber:n}}(t);if(e)if(this.selectedCountry?.dialCode===e.dialCode)this.nationalNumber=e.nationalNumber;else{const t=$(this.defaultCountry??"US"),s=(t?.dialCode===e.dialCode?t:void 0)??(i=e.dialCode,v.find((t=>t.dialCode===i)));s&&(this.selectedCountry=s,this.nationalNumber=e.nationalNumber)}else this.selectedCountry||(this.selectedCountry=$(this.defaultCountry??"US")||v[0]);var i}componentWillLoad(){this.value?this.onValueChange(this.value):this.selectedCountry=$(this.defaultCountry??"US")||v[0]}componentDidUpdate(){if(this.inputEl&&this.lastFormattedRef&&"function"==typeof this.inputEl.setSelectionRange){const t=function(t,e,i){if(i>=t.length)return e.length;const s=k(t.slice(0,i)).length;let n=0,a=0;for(let t=0;t<e.length;t+=1){if(/\d/.test(e[t])&&(a+=1,a>=s)){n=t+(a===s?1:0);break}n=t+1}return Math.min(n,e.length)}(this.lastFormattedRef,this.displayValue,this.lastCursorRef);this.inputEl.setSelectionRange(t,t),this.lastFormattedRef=""}else this.inputEl&&this.lastFormattedRef&&(this.lastFormattedRef="")}get effectiveCountryCode(){return this.selectedCountry?.countryCode??this.defaultCountry??"US"}get effectiveDialCode(){return this.selectedCountry?.dialCode??"+1"}get isEditable(){return!this.disabled&&!this.readonly}get orderedCountries(){const t=this.preferredCountries||[],e=v.filter((e=>!t.includes(e.countryCode)));return[...t.map((t=>$(t))).filter((t=>void 0!==t)),...e]}get filteredCountries(){const t=this.searchQuery.trim().toLowerCase();return t?this.orderedCountries.filter((e=>e.name.toLowerCase().includes(t)||e.dialCode.includes(t)||e.countryCode.toLowerCase().includes(t))):this.orderedCountries}get displayValue(){return this.nationalNumber?w(this.nationalNumber,this.effectiveCountryCode):""}get effectivePlaceholder(){if(this.placeholder)return this.placeholder;const t=this.selectedCountry;return t?function(t){switch(t){case"US":case"CA":case"MX":default:return"000 000 0000";case"GB":return"0000 000 0000";case"AU":return"0 000 000 000";case"DE":case"AT":case"CH":return"000 0000000";case"FR":return"0 00 00 00 00";case"BR":return"00 00000 0000";case"JP":case"CN":case"KR":return"000 0000 0000";case"IN":return"00000 00000"}}(t.countryCode):""}get dropdownOptions(){return this.filteredCountries.map((t=>({icon:I(t.name),label:`${t.name} (${t.dialCode})`,value:t.countryCode,isSelected:this.selectedCountry?.countryCode===t.countryCode})))}get maxInputLength(){const t=E(this.effectiveCountryCode);return w("9".repeat(t),this.effectiveCountryCode).length}emitValue(){const t=this.nationalNumber?function(t,e){const i=(t.slice(1)+e).replace(/\D/g,"");return i.length?`+${i}`:""}(this.effectiveDialCode,this.nationalNumber):"";this.value=t||void 0,this.valueChange.emit(t||""),this.validate()}validate(){this.hasErrorState=!this.required||this.nationalNumber.trim()?null:"required"}render(){return s(n,{key:"124c8feabed1cf383f2eb65e77dd2517c96ea01c",class:{"xpl-input-phone":!0,"xpl-input-phone--error":!!this.hasErrorState||!!this.error,"xpl-input-phone--open":this.dropdownOpen,"xpl-input-phone--domestic":!this.isInternational}},s("div",{key:"6b2a17efd488aa18ac8dea1e86d12884ceb51e90",class:"xpl-input-wrapper"},this.isInternational&&s("button",{key:"d3f8e42841532f8c37a131545007af3213c1b9e0",type:"button",id:this.triggerId,class:"xpl-input-phone__trigger",disabled:this.disabled,"aria-haspopup":"listbox","aria-expanded":this.dropdownOpen?"true":"false","aria-label":"Select country",onClick:this.handleTriggerClick},this.selectedCountry?.name&&s("xpl-icon",{key:"cb52527ba28d95a93cba734bb6d1b3ab8e14a388",class:"xpl-input-phone__flag",icon:I(this.selectedCountry.name),size:24,"aria-hidden":"true"}),s("xpl-icon",{key:"7942dae0973871635b7b64e0697d8c25352ac3bf",class:"xpl-input-phone__trigger-icon",icon:"chevron-down",size:20,"aria-hidden":"true"})),s("div",{key:"24b810a9e03c7774ad6576cc9f03888d5da9d3aa",class:"xpl-input-phone__input-wrap"},this.isInternational&&s("span",{key:"eb7684aad427a10615c23326a2a2628a4a12fbb0",class:"xpl-input-phone__dial-code"},this.effectiveDialCode),s("input",{key:"8e429f156e36f101413e1d5168bb38a2ca9bdebf",ref:t=>{this.inputEl=t??void 0},type:"tel",id:this.inputId,class:"xpl-input-phone__input",name:this.name,disabled:this.disabled,readonly:this.readonly,required:this.required,"aria-invalid":this.hasErrorState||this.error?"true":"false",placeholder:this.effectivePlaceholder,autocomplete:this.isInternational?"tel-national":"tel",inputmode:"numeric",maxlength:this.maxInputLength,value:this.displayValue,onInput:this.handleNumberInput}),this.nationalNumber&&this.isEditable&&s("button",{key:"403e1b9e35a7bfd2ba356c16c4d5e9178541f876",type:"button",class:"xpl-input-phone__clear","aria-label":"Clear phone number",onClick:this.handleClear},s("xpl-icon",{key:"aee1381d3a7dcec64c708ecfa67266eef442850e",icon:"x-circle",size:16})))),this.isInternational&&this.isEditable&&s("xpl-dropdown",{key:"9d14a65f3ac538b4e420151927a0c349adf3688d",ref:t=>{this.dropdownRef=t??void 0},isOpen:this.dropdownOpen,triggerId:this.triggerId,anchorToTrigger:!0,closeOnSelect:!0,mode:"single",options:this.dropdownOptions,update:this.handleDropdownUpdate,onIsOpenChange:t=>{this.dropdownOpen=t.detail},"aria-label":"Country"},s("div",{key:"87006a8a90ef37032775247a387896f065ce5673",slot:"header",class:"xpl-input-phone__search-wrap"},s("xpl-input",{key:"26a99c318081e3215fa779191ee8a0f9c127489f",class:"xpl-input-phone__search",type:"text",label:"",placeholder:"Search",value:this.searchQuery,autocomplete:"off",onInputEvent:t=>{this.searchQuery=t.detail??""}},s("xpl-icon",{key:"4aee182e975ed805524ac93e3a34f055266b693b",slot:"pre",class:"xpl-input-phone__search-icon",icon:"magnifier",size:20})))))}get el(){return this}static get watchers(){return{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}}},[0,"xpl-input-phone",{defaultCountry:[1,"default-country"],disabled:[4],error:[4],inputId:[1,"input-id"],isInternational:[4,"is-international"],name:[1],placeholder:[1],preferredCountries:[16],readonly:[4],required:[4],value:[1537],dropdownOpen:[32],hasErrorState:[32],nationalNumber:[32],searchQuery:[32],selectedCountry:[32],triggerId:[32]},void 0,{dropdownOpen:[{onDropdownOpenChange:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValueChange:0}]}]);function F(){"undefined"!=typeof customElements&&["xpl-input-phone","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time"].forEach((t=>{switch(t){case"xpl-input-phone":customElements.get(a(t))||customElements.define(a(t),D);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||h();break;case"xpl-dropdown-option":customElements.get(a(t))||l();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||P();break;case"xpl-input-color":customElements.get(a(t))||A();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||u();break;case"xpl-input-phone":customElements.get(a(t))||F();break;case"xpl-input-search":customElements.get(a(t))||m();break;case"xpl-input-time":customElements.get(a(t))||M()}}))}const N={hex:"",r:0,g:0,b:0,a:1},O=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.inputChange=i(this,"inputChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.placeholder="Select color",this.eyeDropperSupported=!1,this.colorInputElements={},this.handleMove=t=>{const{slGrid:e}=this.colorInputElements;if(!e)return;const i=e.getBoundingClientRect(),s="touches"in t?t.touches[0].clientY:t.clientY,n=Math.max(0,Math.min(("touches"in t?t.touches[0].clientX:t.clientX)-i.left,i.width)),a=Math.max(0,Math.min(s-i.top,i.height)),o=n/i.width,r=a/i.height,h=x(this.hue,100,100),l=(255*(1-o)+o*h.r)*(1-r),c=(255*(1-o)+o*h.g)*(1-r),p=(255*(1-o)+o*h.b)*(1-r),d={r:Math.round(l),g:Math.round(c),b:Math.round(p),hex:g(Math.round(l),Math.round(c),Math.round(p)),a:this.colorValues.a};this.colorValues=d},this.startDrag=t=>{t.preventDefault(),this.handleMove(t),window.addEventListener("mousemove",this.handleMove),window.addEventListener("mouseup",this.stopDrag),window.addEventListener("touchmove",this.handleMove),window.addEventListener("touchend",this.stopDrag)},this.stopDrag=()=>{window.removeEventListener("mousemove",this.handleMove),window.removeEventListener("mouseup",this.stopDrag),window.removeEventListener("touchmove",this.handleMove),window.removeEventListener("touchend",this.stopDrag)},this.onHexInputChange=t=>{const e=t.detail?t.detail.trim().replace(/#/g,""):"";if(e){const[t,i,s]=(t=>{const e=t?.match(/\w\w/g);return e?e.map((t=>parseInt(t,16))):[0,0,0]})(e);this.colorValues={hex:e,r:t,g:i,b:s,a:this.colorValues.a??1}}else this.colorValues={...N}},this.onRgbaInputChange=(t,e)=>{const i=parseFloat(e.detail);if(Number.isNaN(i))return void(this.hasErrorState=`invalid value from ${t.name}: ${i}`);const s={...this.colorValues};switch(t.name){case"color-r-input":s.r=i;break;case"color-g-input":s.g=i;break;case"color-b-input":s.b=i;break;case"color-a-input":s.a=i;break;default:this.hasErrorState=`unhandled input: ${t.name}`}s.hex=g(s.r,s.g,s.b),this.colorValues=s},this.onSliderInputChange=t=>{const e=parseFloat(t.value);if(Number.isNaN(e))this.hasErrorState=`invalid value from ${t.name}: ${e}`;else switch(t.name){case"color-hue-slider":this.colorValues=C(`hsla(${e}, 100%, 50%, 1)`),this.hue=e;break;case"color-alpha-slider":this.colorValues={...this.colorValues,a:e};break;default:this.hasErrorState=`unhandled input: ${t.name}`}}}valueChanged(t){this.hasErrorState=this.required&&!t.hex?"required":null,this.inputChange.emit(t.hex?y(t):"")}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}onValuePropChange(t){this.syncColorFromValue(t)}syncColorFromValue(t){if(t)try{this.colorValues=C(t),this.hue=(()=>{const t=this.colorValues.r/255,e=this.colorValues.g/255,i=this.colorValues.b/255,s=Math.max(t,e,i),n=Math.min(t,e,i),a=s-n;let o=0,r=0;const h=(s+n)/2;if(0!==a){switch(r=a/(1-Math.abs(2*h-1)),s){case t:o=(e-i)/a%6;break;case e:o=(i-t)/a+2;break;case i:o=(t-e)/a+4}o*=60,o<0&&(o+=360)}return{hue:Math.round(o),saturation:Math.round(100*r),lightness:Math.round(100*h)}})().hue}catch{this.hasErrorState="invalid color format",this.hue=0}else this.colorValues={...N},this.hasErrorState=null,this.hue=0}componentWillLoad(){this.syncColorFromValue(this.value)}componentDidLoad(){p()&&(this.eyeDropperSupported="EyeDropper"in window);const{r:t,g:e,b:i,a:s,hue:n,alpha:a,hex:o}=this.colorInputElements;o?.addEventListener("valueChange",(t=>{this.onHexInputChange(t),t.stopPropagation()})),[t,e,i,s].forEach((t=>{t?.addEventListener("valueChange",(e=>{this.onRgbaInputChange(t,e),e.stopPropagation()}))})),[n,a].forEach((t=>{t?.addEventListener("input",(()=>{this.onSliderInputChange(t)}))}))}async openEyeDropper(){try{const t=window.EyeDropper;if(!t)throw new Error("EyeDropper API is not available");const e=new t,i=await e.open();this.colorValues=C(i.sRGBHex)}catch(t){this.hasErrorState=`eyedropper cancelled or failed: ${t}`}}render(){const{r:t,g:e,b:i,a}=this.colorValues,o=x(this.hue,100,100),{x:r,y:h}=((t,e,i,s)=>{const{s:n,v:a}=((t,e,i,s)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),a=n-Math.min(t,e,i);let o=0;return o=0===a?0:n===t?(e-i)/a%6:n===e?(i-t)/a+2:(t-e)/a+4,o=Math.round(60*o),o<0&&(o+=360),{h:s??o,s:0===n?0:a/n,v:n}})(e.r,e.g,e.b,t);return{x:Math.round(n*i),y:Math.round((1-a)*s)}})(this.hue,{r:t,g:e,b:i},288,160),l={left:`${r}px`,top:`${h}px`,background:`rgb(${t}, ${e}, ${i})`};return s(n,{key:"2c4bff1c1b56afdc1b4192a2d7c1e0a1f5ebc073",class:"xpl-input-color"},s("xpl-popover",{key:"ba545a5022a532ef2fde8c795bee19f2680514c1",disabled:this.disabled,display:"menu"},s("div",{key:"180e066079da1a97ba31bcaf66d443df8a0c48ca",slot:"trigger"},s("div",{key:"c3cc0cb1484c4111b60b736b750571552437d0cf",class:{"xpl-input-color__display":!0,"xpl-input-color__display--disabled":!!this.disabled,"xpl-input-color__display--error":!!this.hasErrorState}},s("span",{key:"72aaff4e9a54da1f766d1de85bd58216c866a4b7",class:"xpl-input-color__color",style:{background:y(this.colorValues)}}),this.colorValues.hex?s("span",{class:"xpl-input-color__value"},y(this.colorValues)):s("span",{class:"xpl-input-color__placeholder"},this.placeholder),this.eyeDropperSupported&&!this.hideEyeDropper&&s("xpl-icon",{key:"f55cfde9a119e9f0de379bc1bfb5b5d4b53aa992",size:20,icon:"eye-dropper",class:"xpl-input-color__icon",onClick:t=>{t.stopPropagation(),this.openEyeDropper()}}))),s("div",{key:"f80f215000d3a906d65f7f6673c6d8eaabe3fc6d",class:"xpl-input-color__menu"},s("div",{key:"4701c99f8a528900c34005b7c26d9fa544b664d8",class:"xpl-input-color__sl-grid",ref:t=>{this.colorInputElements.slGrid=t??void 0},style:{background:["linear-gradient(to top, #000, #0000)","linear-gradient(to right, #fff, #fff0)",`rgb(${o.r} ${o.g} ${o.b})`].join(", ")},onMouseDown:this.startDrag,onTouchStart:this.startDrag},s("div",{key:"3e0ec5c0821dfed35190053f5e4f147cb7b55eb0",class:"xpl-input-color__sl-thumb",style:l})),s("div",{key:"1b278a13c88aa663a2b8217fbc3524ee213e0f3b",class:"xpl-input-color__grid"},s("input",{key:"5e35bdd6e7776848a2d2eb32a00deb3ec349c21d",type:"range",min:"0",max:"360",value:this.hue,class:"xpl-input-color__slider xpl-input-color__hue",name:"color-hue-slider",ref:t=>{this.colorInputElements.hue=t??void 0}}),s("input",{key:"1119341201878e5c8511fa3e241afba15eab6d9b",type:"range",min:"0",max:"1",step:"0.01",value:a,class:"xpl-input-color__slider xpl-input-color__alpha",name:"color-alpha-slider",ref:t=>{this.colorInputElements.alpha=t??void 0},style:{backgroundImage:[`linear-gradient(to right, rgb(${t} ${e} ${i} / 0) 0%, rgb(${t} ${e} ${i} / 1) 100%)`,"linear-gradient(45deg, #ccc 25%, transparent 25%)","linear-gradient(-45deg, #ccc 25%, transparent 25%)","linear-gradient(45deg, transparent 75%, #ccc 75%)","linear-gradient(-45deg, transparent 75%, #ccc 75%)"].join(", ")}}),s("div",{key:"3804928b107e92bddbc3afa3fa883caafddbd06b",class:"xpl-input-color__preview",style:{background:`rgba(${t}, ${e}, ${i}, ${a})`}})),s("div",{key:"86961ee31d82724a76f6598bd547c8e650e27f24",class:"xpl-input-color__inputs"},["hex","r","g","b","a"].map((t=>s("xpl-input",{key:t,label:t.toLocaleUpperCase(),name:`color-${t}-input`,placeholder:"hex"===t?"793EF7":"0",value:String(this.colorValues[t]),ref:e=>{this.colorInputElements[t]=e??void 0}})))))))}static get watchers(){return{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}}},[0,"xpl-input-color",{value:[1],placeholder:[1],disabled:[4],required:[4],hideEyeDropper:[4,"hide-eye-dropper"],hasErrorState:[32],colorValues:[32],eyeDropperSupported:[32],hue:[32]},void 0,{colorValues:[{valueChanged:0}],hasErrorState:[{onHasErrorStateChanged:0}],value:[{onValuePropChange:0}]}]);function A(){"undefined"!=typeof customElements&&["xpl-input-color","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input-color":customElements.get(a(t))||customElements.define(a(t),O);break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||P();break;case"xpl-input-color":customElements.get(a(t))||A();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||u();break;case"xpl-input-phone":customElements.get(a(t))||F();break;case"xpl-input-search":customElements.get(a(t))||m();break;case"xpl-input-time":customElements.get(a(t))||M();break;case"xpl-popover":customElements.get(a(t))||b()}}))}const V=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.blurEvent=i(this,"blurEvent",7),this.focusEvent=i(this,"focusEvent",7),this.inputEvent=i(this,"inputEvent",7),this.search=i(this,"search",7),this.valueChange=i(this,"valueChange",7),this.multiline=!1,this.dateFormat="Y-m-d",this.timeFormat="24h",this.allowCustomOption=!1,this.mode="single",this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.defaultCountry="US",this.isInternational=!0,this.ariaLabel="",this.type="text",this.handleChildValueChange=t=>{t.stopPropagation(),this.valueChange.emit(t.detail)},this.valueChanged=t=>{this.valueChange.emit(t.target.value)},this.characterCount=0,this.passwordVisible=!1,this.hasPreSlotContent=!1,this.handleBlur=t=>{this.blurEvent.emit(t)},this.handleFocus=t=>{this.focusEvent.emit(t)},this.handleInput=t=>{this.multiline&&this.updateCharacterCount();const{value:e}=t.target;this.inputEvent.emit(e)},this.handleSearchBlurForward=t=>{const{detail:e}=t;e&&(t.stopPropagation(),this.blurEvent.emit(e))},this.handleSearchCommit=t=>{t.stopPropagation(),this.search.emit(t.detail)},this.handleSearchFocusForward=t=>{const{detail:e}=t;e&&(t.stopPropagation(),this.focusEvent.emit(e))}}connectedCallback(){this.syncPreSlotContent(),this.connectPreSlotObserver()}disconnectedCallback(){void 0!==this.preSlotSyncTimeoutId&&(clearTimeout(this.preSlotSyncTimeoutId),this.preSlotSyncTimeoutId=void 0),this.disconnectPreSlotObserver()}componentWillLoad(){null!=this._id&&""!==this._id||(this._id=f()),this.multiline&&void 0!==this.maxCharacterCount&&(this.characterCount=void 0!==this.value?this.value.length:0),this.syncPreSlotContent()}componentWillRender(){this.disconnectPreSlotObserver()}componentDidRender(){this.schedulePreSlotSync()}async setFocus(){"search"!==this.type?this.input?.focus():await(this.searchInputRef?.setFocus())}connectPreSlotObserver(){this.disconnectPreSlotObserver(),this.multiline||"search"===this.type||"undefined"==typeof MutationObserver||(this.preSlotObserver=new MutationObserver((()=>{this.schedulePreSlotSync()})),this.preSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectPreSlotObserver(){this.preSlotObserver?.disconnect(),this.preSlotObserver=void 0}schedulePreSlotSync(){void 0!==this.preSlotSyncTimeoutId&&clearTimeout(this.preSlotSyncTimeoutId),this.preSlotSyncTimeoutId=setTimeout((()=>{this.preSlotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncPreSlotContent(),this.connectPreSlotObserver())}),0)}syncPreSlotContent(){if(this.multiline||"search"===this.type)return;const t=Array.from(this.el.querySelectorAll('[slot="pre"]')).some((t=>t.closest("xpl-input")===this.el));t!==this.hasPreSlotContent&&(this.hasPreSlotContent=t)}updateCharacterCount(){this.characterCount=this.input?.value.length??0}renderInput(){switch(this.type){case"file":return s("xpl-input-file",{accept:this.accept,disabled:this.disabled,hideAcceptText:this.hideAcceptText,hideFileNames:this.hideFileNames,hideTriggerOnSelect:this.hideTriggerOnSelect,multiple:this.multiple,name:this.name,onInputChange:this.handleChildValueChange,_id:this._id},s("slot",{name:"trigger"}));case"color":return s("xpl-input-color",{disabled:this.disabled,value:this.value,placeholder:this.placeholder,required:this.required,hideEyeDropper:this.hideEyeDropper,onInputChange:this.handleChildValueChange});case"date":return s("xpl-input-date",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,post:this.post,pre:this.pre,max:this.max,min:this.min,dateFormat:this.dateFormat,mode:this.mode,onValueChange:this.handleChildValueChange});case"time":return s("xpl-input-time",{inputId:this._id,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,max:this.max,min:this.min,step:this.step,mode:this.mode,timeFormat:this.timeFormat,allowCustomOption:this.allowCustomOption,onValueChange:this.handleChildValueChange});case"phone":return s("xpl-input-phone",{inputId:this._id,disabled:this.disabled,error:void 0!==this.error,name:this.name,required:this.required,readonly:this.readonly,value:this.value,placeholder:this.placeholder,defaultCountry:this.defaultCountry,preferredCountries:this.preferredCountries,isInternational:this.isInternational,onValueChange:this.handleChildValueChange});case"search":{const t=Boolean((this.label??"").trim()),e=void 0!==this.error,i=e&&(this.error?.length??0)>0;return s("xpl-input-search",{ariaLabel:(this.ariaLabel??"").trim()||"Search",autocomplete:this.autocomplete??"off",disabled:this.disabled,errorMessageId:i?`${this._id}-error`:void 0,hasError:e,hasVisibleLabel:t,inputId:this._id??"",name:this.name,onBlurEvent:this.handleSearchBlurForward,onFocusEvent:this.handleSearchFocusForward,onSearch:this.handleSearchCommit,onValueChange:this.handleChildValueChange,placeholder:this.placeholder??"Search",readonly:this.readonly,ref:t=>{this.searchInputRef=t??void 0},required:this.required,shape:this.shape??"rounded",value:this.value??""})}default:return s("div",{class:"xpl-input-wrapper"},!this.multiline&&s("label",{class:{"xpl-input-pre":!0,"xpl-input-pre--hidden":!this.pre&&!this.hasPreSlotContent},htmlFor:this._id},s("slot",{name:"pre"},this.pre)),this.multiline?s("textarea",{disabled:this.disabled,id:this._id,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t??void 0},required:this.required,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput},this.value):s("input",{autocomplete:this.autocomplete,disabled:this.disabled,id:this._id,max:this.max,min:this.min,name:this.name,placeholder:this.placeholder,readonly:this.readonly,ref:t=>{this.input=t??void 0},required:this.required,step:this.step,type:this.type,value:this.value,onChange:this.valueChanged,onFocus:this.handleFocus,onBlur:this.handleBlur,onInput:this.handleInput}),"password"===this.type&&s("button",{"aria-label":"Toggle password visibility",class:"xpl-input-password",onClick:()=>{this.passwordVisible=!this.passwordVisible},role:"presentation"},s("xpl-icon",{icon:this.passwordVisible?"eye-closed":"eye",size:24})),this.post&&!this.multiline&&s("label",{class:"xpl-input-post",htmlFor:this._id},this.post),this.multiline&&void 0!==this.maxCharacterCount&&s("span",{class:"xpl-input-characters"},this.characterCount,"/",this.maxCharacterCount))}}render(){let t=!1;return(void 0!==this.error||this.multiline&&void 0!==this.maxCharacterCount&&this.characterCount>this.maxCharacterCount)&&(t=!0),s(n,{key:"94a5e19a36756ac43ebbe6d3996a2ffbf475da24",class:{"xpl-input":!0,"xpl-input--disabled":!!this.disabled,"xpl-input--error":t,"xpl-input--readonly":!!this.readonly,[`xpl-input--${this.type}`]:!0}},this.label&&s("label",{key:"d41b5e5245483e2ea235c910f85cd6a21b100dec",class:"xpl-input-label",htmlFor:this._id},this.label,this.description&&s("small",{key:"c9d55823b8b97678b2f5f4374446c3693e6dceaa"},this.description)),this.renderInput(),(this.error?.length??0)>0&&s("label",{key:"20e5a1d2af06e571f0757aa60633438f79a6a17d",class:"xpl-input-error",htmlFor:this._id,id:`${this._id}-error`},s("xpl-icon",{key:"a193ee5f1d3e0d8479fa8dfd66ab27edeb400d30",icon:"circle-warning",size:16}),s("span",{key:"acf686fe036d1a1e9cb944ff773dda86e90ff39a"},this.error)))}get el(){return this}},[260,"xpl-input",{_id:[1],description:[1],disabled:[4],error:[1],label:[1],name:[1],required:[4],readonly:[4],value:[1],autocomplete:[1],placeholder:[1],post:[1],pre:[1],max:[8],min:[8],step:[2],multiline:[4],maxCharacterCount:[2,"max-character-count"],dateFormat:[1,"date-format"],timeFormat:[1,"time-format"],allowCustomOption:[4,"allow-custom-option"],mode:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],hideEyeDropper:[4,"hide-eye-dropper"],defaultCountry:[1,"default-country"],preferredCountries:[16],isInternational:[4,"is-international"],ariaLabel:[1,"aria-label"],shape:[1],type:[1],characterCount:[32],passwordVisible:[32],hasPreSlotContent:[32],setFocus:[64]}]);function P(){"undefined"!=typeof customElements&&["xpl-input","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-input","xpl-input-color","xpl-input-date","xpl-input-file","xpl-input-phone","xpl-input-search","xpl-input-time","xpl-popover"].forEach((t=>{switch(t){case"xpl-input":customElements.get(a(t))||customElements.define(a(t),V);break;case"xpl-dropdown":customElements.get(a(t))||o();break;case"xpl-dropdown-group":customElements.get(a(t))||r();break;case"xpl-dropdown-heading":customElements.get(a(t))||h();break;case"xpl-dropdown-option":customElements.get(a(t))||l();break;case"xpl-icon":customElements.get(a(t))||c();break;case"xpl-input":customElements.get(a(t))||P();break;case"xpl-input-color":customElements.get(a(t))||A();break;case"xpl-input-date":customElements.get(a(t))||d();break;case"xpl-input-file":customElements.get(a(t))||u();break;case"xpl-input-phone":customElements.get(a(t))||F();break;case"xpl-input-search":customElements.get(a(t))||m();break;case"xpl-input-time":customElements.get(a(t))||M();break;case"xpl-popover":customElements.get(a(t))||b()}}))}export{V as I,O as a,A as b,D as c,P as d,F as e,_ as f,M as g}
@@ -1 +1 @@
1
- import{p as e,H as t,d as s,h as i,F as n,c as o,t as l}from"./p-BSHdGbmH.js";import{t as a}from"./p-CzwViN3U.js";import{i as h}from"./p-Dqb1pIRo.js";import{d as c}from"./p-Di1NDy0w.js";import{d}from"./p-Mehog36m.js";import{d as r}from"./p-RYnBuuDE.js";import{d as p}from"./p-Dzp5p-eh.js";import{d as u}from"./p-imCMp2Nl.js";import{d as m}from"./p-CjbPCnPP.js";import{v as b}from"./p-CK3_k8jD.js";let g;function f(e){return e.label||e.value||""}function x(e){return e.value||e.label||""}function v(e){return e.flatMap((e=>e.groupName&&e.options?e.options:[e]))}const w=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectChange=s(this,"selectChange",7),this.changeEvent=s(this,"changeEvent",7),this.dropdownStateChange=s(this,"dropdownStateChange",7),this.triggerDropdown=s(this,"triggerDropdown",7),this.choices=[],this.selectIcon="chevron-down",this.dropdownPlacement="bottom-start",this.mode="single",this.truncate=!0,this.active=!1,this.id=b(),this.keepFocus=!1,this.visibleChoices=1/0,this.choicesState=[],this.value=this.calculateValue(),this.dropdownOpenState=!1,this.container=null,this.dropdown=null,this.handleResizeThrottled=a((()=>{this.maybeTruncateChoices()}),250),this.handleTabKeyDown=e=>{"Tab"===e.key&&(this.keepFocus=!0)},this.handleTagRemove=e=>{const t=t=>e?.value&&t.value===e.value||e?.label&&t.label===e.label;this.choicesState=this.choicesState.map((e=>({...e,isSelected:!t(e)&&e.isSelected,options:e.options?.map((e=>({...e,isSelected:!t(e)&&e.isSelected})))})))},this.handleDropdownScroll=e=>{const t=this.dropdown?.querySelector(".xpl-dropdown-list");if(!t)return;const{scrollTop:s,scrollHeight:i,clientHeight:n}=t;(0===s&&e.deltaY<0||s+n>=i&&e.deltaY>0)&&e.preventDefault()}}onChoicesPropChanged(e){this.choicesState=this.initializeChoicesState()}onSelectedValuesPropChanged(){this.choicesState=this.initializeChoicesState()}onChoicesStateChanged(){this.update()}handleValueStateChange(e){this.selectChange.emit(e),this.changeEvent.emit("single"===this.mode?e:e?.length?e.split("|"):[]),this.customDisplayValue&&null!==this.container&&(this.container.querySelectorAll(".custom-display-value").forEach((t=>{t.classList.toggle("display-active",e.length>0),t.classList.toggle("display-inactive",0===e.length)})),this.container.querySelectorAll(".placeholder").forEach((t=>{t.classList.toggle("placeholder-hidden",e.length>0)})))}onDropdownOpenStateChanged(e){this.dropdownStateChange.emit(e)}initializeChoicesState(){return(this.choices??[]).map((e=>{const t="string"==typeof this.selectedValues?[this.selectedValues]:this.selectedValues;return{...e,isSelected:e.isSelected||!0===t?.includes(x(e)),options:e.options?.map((e=>({...e,isSelected:e.isSelected||!0===t?.includes(x(e))})))}}))}maybeTruncateChoices(){if(!h())return;if("single"===this.mode||!this.truncate)return;const e=this.container?.getBoundingClientRect().width;let t=0,s=0;const i=v(this.choicesState)?.filter((e=>e.isSelected));if(!i.length)return;const n=i.length;i.forEach(((n,o)=>(s+=function(e){const t=h()?(void 0===g&&(g=document.createElement("canvas").getContext("2d"),g&&(g.font="14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif")),g):null;return t?t.measureText(e).width+44:0}(f(i[o])),s>(e??0)-140||(t+=1),null))),t>=n&&(t=1/0),t<1&&(t=1),this.visibleChoices=t}closeDropdown(){this.dropdown?.isOpen&&(this.dropdown.isOpen=!1,this.active=!1)}calculateValue(){const e=v(this.choicesState).filter((e=>e.isSelected));return e.length?"single"===this.mode?x(e[0]):e.map((e=>x(e))).join("|"):""}update(){this.value=this.calculateValue(),this.maybeTruncateChoices()}renderLabel(){return this.label||this.description?i("label",{class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.label,this.description&&i("small",{class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)):null}renderSelectedTags(){let e=0;const t=v(this.choicesState).filter((e=>e.isSelected));return t.length?t.map(((s,n)=>e>=this.visibleChoices?null:(e+=1,i("xpl-tag",{onClose:()=>this.handleTagRemove(t[n])},f(t[n]))))):null}renderError(){return this.error?i("label",{class:"xpl-input-error",htmlFor:this.id},i("xpl-icon",{icon:"circle-warning"}),this.error):null}componentWillLoad(){this.choicesState=this.initializeChoicesState()}handleClickEvent(e){const t=e.target.closest(".xpl-select");null!==t&&t===this.container||this.closeDropdown()}handleKeyDown(e){"Escape"===e.key&&(this.active||this.container?.contains(document.activeElement))&&this.closeDropdown()}handleResize(){this.handleResizeThrottled()}componentDidLoad(){void 0!==this.truncateRafId&&cancelAnimationFrame(this.truncateRafId),this.truncateRafId=requestAnimationFrame((()=>{this.truncateRafId=void 0,this.maybeTruncateChoices()}))}disconnectedCallback(){this.handleResizeThrottled?.cancel(),void 0!==this.truncateRafId&&(cancelAnimationFrame(this.truncateRafId),this.truncateRafId=void 0)}handleDropdownTrigger(){if(this.disabled)return;const e=this.dropdown?.isOpen??!1,t=!e;this.triggerDropdown.emit({prevState:e,nextState:t}).defaultPrevented||(this.dropdownOpenState=t,this.dropdown&&(this.dropdown.isOpen=t))}async reset(){this.closeDropdown(),this.choicesState=this.choicesState.map((e=>({...e,isSelected:!1,options:e.options?.map((e=>({...e,isSelected:!1})))})))}render(){const e=v(this.choicesState).filter((e=>e.isSelected)),t=e[0]?.label||e[0]?.value,s=e.length>1&&this.visibleChoices<1/0&&this.truncate&&!this.customDisplayValue,l=`+ ${Math.abs(this.choicesState.filter((e=>e.isSelected)).length-this.visibleChoices)} more`;return i(o,{key:"efb901a6da94614137b07be9c89b3777e65f60d9",class:{"xpl-select":!0,"xpl-select--disabled":!!this.disabled,"xpl-select--no-truncate":!this.truncate,[this.classNames??""]:!!this.classNames},onKeyDown:this.handleTabKeyDown,ref:e=>{this.container=e}},this.renderLabel(),i("div",{key:"6d4b42bf301188182be36b7b9adfde4669771a22",class:{"xpl-input":!0,"xpl-input--disabled":!!this.disabled,"xpl-input--error":void 0!==this.error}},i("div",{key:"3687745a851d263557bb9d0f7c2d7eaa4546daa9",class:"xpl-input-wrapper"},i("button",{key:"6fa71fa27e684134b9e3ee915b8548a127dfbdf6",class:"xpl-select__trigger",disabled:this.disabled,id:this.id,onKeyDown:this.handleTabKeyDown,onClick:e=>{e.preventDefault(),this.handleDropdownTrigger()},type:"button"},i("div",{key:"00975fd72169662e5314f48634722c18c10e8bd9",class:{"xpl-select-value":!0,"xpl-select-value--active":"multi"===this.mode&&this.value.length>0,"has-value":this.value.length>0}},(()=>this.customDisplayValue?i(n,null,i("div",{class:{"custom-display-value":!0,"custom-display-value--inactive":0===this.value.length}},i("slot",{name:"custom-display-value"})),i("span",{class:{"xpl-placeholder--hidden":this.value.length>0}},this.placeholder)):"single"===this.mode?t||this.placeholder:this.value.length>0?this.renderSelectedTags():this.placeholder)(),s&&l),i("xpl-icon",{key:"b17474211ca60ee3e70c7b3427f50b8c47dcb57c",class:"xpl-select__chevron-down",icon:this.selectIcon??"chevron-down"}))),!this.disabled&&i("xpl-dropdown",{key:"793f48f587c8db42de0bdcefb20d9f2dd05eec83",ref:e=>{this.dropdown=e??null},isOpen:this.dropdownOpenState,options:this.choicesState,selectedValues:this.selectedValues,mode:this.mode,triggerId:this.id,update:(e,{component:t})=>{const{options:s}=t;s&&s.length>0&&(this.choicesState=s)},onIsOpenChange:e=>{this.dropdownOpenState=e.detail},onWheel:this.handleDropdownScroll,anchorToTrigger:!0,flipFallbackPlacements:this.dropdownFlipFallbackPlacements,placement:this.dropdownPlacement}),this.renderError()),i("input",{key:"beadce243c290f7d191d29961446285f332759af",type:"hidden",name:this.name,value:this.value}))}static get watchers(){return{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}}},[260,"xpl-select",{choices:[16],selectIcon:[1,"select-icon"],description:[1],disabled:[4],dropdownFlipFallbackPlacements:[16],dropdownPlacement:[1,"dropdown-placement"],error:[1],label:[1],mode:[1],name:[1],placeholder:[1],truncate:[4],customDisplayValue:[4,"custom-display-value"],selectedValues:[1,"selected-values"],classNames:[1,"class-names"],active:[32],id:[32],keepFocus:[32],visibleChoices:[32],choicesState:[32],value:[32],dropdownOpenState:[32],reset:[64]},[[8,"click","handleClickEvent"],[8,"keydown","handleKeyDown"],[9,"resize","handleResize"]],{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}]);function C(){"undefined"!=typeof customElements&&["xpl-select","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-tag"].forEach((e=>{switch(e){case"xpl-select":customElements.get(l(e))||customElements.define(l(e),w);break;case"xpl-dropdown":customElements.get(l(e))||c();break;case"xpl-dropdown-group":customElements.get(l(e))||d();break;case"xpl-dropdown-heading":customElements.get(l(e))||r();break;case"xpl-dropdown-option":customElements.get(l(e))||p();break;case"xpl-icon":customElements.get(l(e))||u();break;case"xpl-tag":customElements.get(l(e))||m()}}))}export{w as S,C as d}
1
+ import{p as e,H as t,d as s,h as i,F as n,c as o,t as l}from"./p-BSHdGbmH.js";import{t as a}from"./p-CzwViN3U.js";import{i as h}from"./p-Dqb1pIRo.js";import{d as c}from"./p-xtOHikY0.js";import{d}from"./p-CnVGKN63.js";import{d as r}from"./p-YG9Jza0y.js";import{d as p}from"./p-DAb-txW3.js";import{d as u}from"./p-l3EZ-agL.js";import{d as m}from"./p-D--kzomA.js";import{v as b}from"./p-CK3_k8jD.js";let g;function x(e){return e.label||e.value||""}function f(e){return e.value||e.label||""}function v(e){return e.flatMap((e=>e.groupName&&e.options?e.options:[e]))}const w=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectChange=s(this,"selectChange",7),this.changeEvent=s(this,"changeEvent",7),this.dropdownStateChange=s(this,"dropdownStateChange",7),this.triggerDropdown=s(this,"triggerDropdown",7),this.choices=[],this.selectIcon="chevron-down",this.dropdownPlacement="bottom-start",this.mode="single",this.truncate=!0,this.active=!1,this.id=b(),this.keepFocus=!1,this.visibleChoices=1/0,this.choicesState=[],this.value=this.calculateValue(),this.dropdownOpenState=!1,this.container=null,this.dropdown=null,this.handleResizeThrottled=a((()=>{this.maybeTruncateChoices()}),250),this.handleTabKeyDown=e=>{"Tab"===e.key&&(this.keepFocus=!0)},this.handleTagRemove=e=>{const t=t=>e?.value&&t.value===e.value||e?.label&&t.label===e.label;this.choicesState=this.choicesState.map((e=>({...e,isSelected:!t(e)&&e.isSelected,options:e.options?.map((e=>({...e,isSelected:!t(e)&&e.isSelected})))})))},this.handleDropdownScroll=e=>{const t=this.dropdown?.querySelector(".xpl-dropdown-list");if(!t)return;const{scrollTop:s,scrollHeight:i,clientHeight:n}=t;(0===s&&e.deltaY<0||s+n>=i&&e.deltaY>0)&&e.preventDefault()}}onChoicesPropChanged(e){this.choicesState=this.initializeChoicesState()}onSelectedValuesPropChanged(){this.choicesState=this.initializeChoicesState()}onChoicesStateChanged(){this.update()}handleValueStateChange(e){this.selectChange.emit(e),this.changeEvent.emit("single"===this.mode?e:e?.length?e.split("|"):[]),this.customDisplayValue&&null!==this.container&&(this.container.querySelectorAll(".custom-display-value").forEach((t=>{t.classList.toggle("display-active",e.length>0),t.classList.toggle("display-inactive",0===e.length)})),this.container.querySelectorAll(".placeholder").forEach((t=>{t.classList.toggle("placeholder-hidden",e.length>0)})))}onDropdownOpenStateChanged(e){this.dropdownStateChange.emit(e)}initializeChoicesState(){return(this.choices??[]).map((e=>{const t="string"==typeof this.selectedValues?[this.selectedValues]:this.selectedValues;return{...e,isSelected:e.isSelected||!0===t?.includes(f(e)),options:e.options?.map((e=>({...e,isSelected:e.isSelected||!0===t?.includes(f(e))})))}}))}maybeTruncateChoices(){if(!h())return;if("single"===this.mode||!this.truncate)return;const e=this.container?.getBoundingClientRect().width;let t=0,s=0;const i=v(this.choicesState)?.filter((e=>e.isSelected));if(!i.length)return;const n=i.length;i.forEach(((n,o)=>(s+=function(e){const t=h()?(void 0===g&&(g=document.createElement("canvas").getContext("2d"),g&&(g.font="14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif")),g):null;return t?t.measureText(e).width+44:0}(x(i[o])),s>(e??0)-140||(t+=1),null))),t>=n&&(t=1/0),t<1&&(t=1),this.visibleChoices=t}closeDropdown(){this.dropdown?.isOpen&&(this.dropdown.isOpen=!1,this.active=!1)}calculateValue(){const e=v(this.choicesState).filter((e=>e.isSelected));return e.length?"single"===this.mode?f(e[0]):e.map((e=>f(e))).join("|"):""}update(){this.value=this.calculateValue(),this.maybeTruncateChoices()}renderLabel(){return this.label||this.description?i("label",{class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.label,this.description&&i("small",{class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)):null}renderSelectedTags(){let e=0;const t=v(this.choicesState).filter((e=>e.isSelected));return t.length?t.map(((s,n)=>e>=this.visibleChoices?null:(e+=1,i("xpl-tag",{onClose:()=>this.handleTagRemove(t[n])},x(t[n]))))):null}renderError(){return this.error?i("label",{class:"xpl-input-error",htmlFor:this.id},i("xpl-icon",{icon:"circle-warning"}),this.error):null}componentWillLoad(){this.choicesState=this.initializeChoicesState()}handleClickEvent(e){const t=e.target.closest(".xpl-select");null!==t&&t===this.container||this.closeDropdown()}handleKeyDown(e){"Escape"===e.key&&(this.active||this.container?.contains(document.activeElement))&&this.closeDropdown()}handleResize(){this.handleResizeThrottled()}componentDidLoad(){void 0!==this.truncateRafId&&cancelAnimationFrame(this.truncateRafId),this.truncateRafId=requestAnimationFrame((()=>{this.truncateRafId=void 0,this.maybeTruncateChoices()}))}disconnectedCallback(){this.handleResizeThrottled?.cancel(),void 0!==this.truncateRafId&&(cancelAnimationFrame(this.truncateRafId),this.truncateRafId=void 0)}handleDropdownTrigger(){if(this.disabled)return;const e=this.dropdown?.isOpen??!1,t=!e;this.triggerDropdown.emit({prevState:e,nextState:t}).defaultPrevented||(this.dropdownOpenState=t,this.dropdown&&(this.dropdown.isOpen=t))}async reset(){this.closeDropdown(),this.choicesState=this.choicesState.map((e=>({...e,isSelected:!1,options:e.options?.map((e=>({...e,isSelected:!1})))})))}render(){const e=v(this.choicesState).filter((e=>e.isSelected)),t=e[0]?.label||e[0]?.value,s=e.length>1&&this.visibleChoices<1/0&&this.truncate&&!this.customDisplayValue,l=`+ ${Math.abs(this.choicesState.filter((e=>e.isSelected)).length-this.visibleChoices)} more`;return i(o,{key:"b080c68630c2c0c6bfeffb6ce27c9b9363898ecc",class:{"xpl-select":!0,"xpl-select--disabled":!!this.disabled,"xpl-select--no-truncate":!this.truncate,[this.classNames??""]:!!this.classNames},onKeyDown:this.handleTabKeyDown,ref:e=>{this.container=e}},this.renderLabel(),i("div",{key:"c2913a9da7988d4e24fd788718637bcebd93fcb6",class:{"xpl-input":!0,"xpl-input--disabled":!!this.disabled,"xpl-input--error":void 0!==this.error}},i("div",{key:"58ea7fdb31c591b2726258d786ca5550219bcd89",class:"xpl-input-wrapper"},i("button",{key:"c4c2b2f0a90cd4ef407b8797fd65b86062387678",class:"xpl-select__trigger",disabled:this.disabled,id:this.id,onKeyDown:this.handleTabKeyDown,onClick:e=>{e.preventDefault(),this.handleDropdownTrigger()},type:"button"},i("div",{key:"7ddc58167d4363991c92d90ee6e0881f04bc725f",class:{"xpl-select-value":!0,"xpl-select-value--active":"multi"===this.mode&&this.value.length>0,"has-value":this.value.length>0}},(()=>this.customDisplayValue?i(n,null,i("div",{class:{"custom-display-value":!0,"custom-display-value--inactive":0===this.value.length}},i("slot",{name:"custom-display-value"})),i("span",{class:{"xpl-placeholder--hidden":this.value.length>0}},this.placeholder)):"single"===this.mode?t||this.placeholder:this.value.length>0?this.renderSelectedTags():this.placeholder)(),s&&l),i("xpl-icon",{key:"8640f1e46263c802edf0e9b18f53d2eb6b2a78a3",class:"xpl-select__chevron-down",icon:this.selectIcon??"chevron-down"}))),!this.disabled&&i("xpl-dropdown",{key:"6fb8d97e175894715a6dbc6ed17bc5b15829ed13",ref:e=>{this.dropdown=e??null},isOpen:this.dropdownOpenState,options:this.choicesState,selectedValues:this.selectedValues,mode:this.mode,triggerId:this.id,update:(e,{component:t})=>{const{options:s}=t;s&&s.length>0&&(this.choicesState=s)},onIsOpenChange:e=>{this.dropdownOpenState=e.detail},onWheel:this.handleDropdownScroll,anchorToTrigger:!0,flipFallbackPlacements:this.dropdownFlipFallbackPlacements,placement:this.dropdownPlacement}),this.renderError()),i("input",{key:"734ef739b61de3320ce777994853cb90ab8271d2",type:"hidden",name:this.name,value:this.value}))}static get watchers(){return{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}}},[260,"xpl-select",{choices:[16],selectIcon:[1,"select-icon"],description:[1],disabled:[4],dropdownFlipFallbackPlacements:[16],dropdownPlacement:[1,"dropdown-placement"],error:[1],label:[1],mode:[1],name:[1],placeholder:[1],truncate:[4],customDisplayValue:[4,"custom-display-value"],selectedValues:[1,"selected-values"],classNames:[1,"class-names"],active:[32],id:[32],keepFocus:[32],visibleChoices:[32],choicesState:[32],value:[32],dropdownOpenState:[32],reset:[64]},[[8,"click","handleClickEvent"],[8,"keydown","handleKeyDown"],[9,"resize","handleResize"]],{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}]);function C(){"undefined"!=typeof customElements&&["xpl-select","xpl-dropdown","xpl-dropdown-group","xpl-dropdown-heading","xpl-dropdown-option","xpl-icon","xpl-tag"].forEach((e=>{switch(e){case"xpl-select":customElements.get(l(e))||customElements.define(l(e),w);break;case"xpl-dropdown":customElements.get(l(e))||c();break;case"xpl-dropdown-group":customElements.get(l(e))||d();break;case"xpl-dropdown-heading":customElements.get(l(e))||r();break;case"xpl-dropdown-option":customElements.get(l(e))||p();break;case"xpl-icon":customElements.get(l(e))||u();break;case"xpl-tag":customElements.get(l(e))||m()}}))}export{w as S,C as d}
@@ -1 +1 @@
1
- import{p as e,H as i,d as t,h as s,c as l,t as a}from"./p-BSHdGbmH.js";import{d as n}from"./p-imCMp2Nl.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.inputChange=t(this,"inputChange",7),this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.files=null,this.openFileDialog=()=>{this.disabled||this.fileInput?.click()},this.handleFileChange=e=>{const i=e.target;this.files=i.files?Array.from(i.files):null},this.onRemoveFileByIndex=e=>{this.files=(this.files??[]).filter(((i,t)=>t!==e))}}onFilesChange(e){this.inputChange.emit({type:"file",value:e})}async removeFileByIndex(e){this.onRemoveFileByIndex(e)}render(){return s(l,{key:"62b134a3517ea8e5d9c0ba8a0f0c0ba56413a05b",class:{"xpl-input-file":!0,"xpl-input-file--hide-trigger-on-select":!!this.hideTriggerOnSelect,"xpl-input-file--disabled":!!this.disabled}},s("span",{key:"8f3aa455cf7fe9f27dbab609969dfac1bf4b1a3a",class:{"xpl-input-file__trigger-wrapper":!0,"xpl-input-file__trigger-wrapper--hidden":!!this.hideTriggerOnSelect&&(this.files?.length??0)>0},role:"button",tabIndex:0,onClick:this.openFileDialog},s("slot",{key:"3d5d42f659cd78b9f54e008113a2ff99ddaa4a03",name:"trigger"})),(this.files?.length??0)>0&&!this.hideFileNames&&s("ul",{key:"d827f178ba04e03d8879b1cf81674226b3f265c7",class:"xpl-input-file__file-list"},(this.files??[]).map(((e,i)=>s("li",{class:"xpl-input-file__file-item"},s("span",{class:"xpl-input-file__file-name"},e.name),s("xpl-icon",{icon:"x-circle",size:24,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.onRemoveFileByIndex(i)},class:"xpl-input-file__remove-icon"}))))),this.accept&&!this.hideAcceptText&&s("span",{key:"3bc1ab3c72d4039a2635b9ceb4a22f4a98875632",class:"xpl-input-file__accept"},"Accepted file types: ",this.accept),s("input",{key:"23f6d50b87fe8e4b315670c73565bc50ca592ed5",onChange:this.handleFileChange,type:"file",ref:e=>{this.fileInput=e??void 0},hidden:!0,accept:this.accept,multiple:this.multiple,name:this.name}))}get el(){return this}static get watchers(){return{files:[{onFilesChange:0}]}}},[260,"xpl-input-file",{disabled:[4],name:[1],_id:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],files:[32],removeFileByIndex:[64]},void 0,{files:[{onFilesChange:0}]}]);function p(){"undefined"!=typeof customElements&&["xpl-input-file","xpl-icon"].forEach((e=>{switch(e){case"xpl-input-file":customElements.get(a(e))||customElements.define(a(e),c);break;case"xpl-icon":customElements.get(a(e))||n()}}))}export{c as I,p as d}
1
+ import{p as e,H as i,d as t,h as s,c as l,t as n}from"./p-BSHdGbmH.js";import{d as a}from"./p-l3EZ-agL.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.inputChange=t(this,"inputChange",7),this.accept="",this.multiple=!1,this.hideTriggerOnSelect=!1,this.hideFileNames=!1,this.hideAcceptText=!1,this.files=null,this.openFileDialog=()=>{this.disabled||this.fileInput?.click()},this.handleFileChange=e=>{const i=e.target;this.files=i.files?Array.from(i.files):null},this.onRemoveFileByIndex=e=>{this.files=(this.files??[]).filter(((i,t)=>t!==e))}}onFilesChange(e){this.inputChange.emit({type:"file",value:e})}async removeFileByIndex(e){this.onRemoveFileByIndex(e)}render(){return s(l,{key:"baa52af5a8ee6222ff745cece6e59d9480165af6",class:{"xpl-input-file":!0,"xpl-input-file--hide-trigger-on-select":!!this.hideTriggerOnSelect,"xpl-input-file--disabled":!!this.disabled}},s("span",{key:"802ed05f26bd1e2a618f5e09bea7370fe69a4718",class:{"xpl-input-file__trigger-wrapper":!0,"xpl-input-file__trigger-wrapper--hidden":!!this.hideTriggerOnSelect&&(this.files?.length??0)>0},role:"button",tabIndex:0,onClick:this.openFileDialog},s("slot",{key:"487381f2b34d2ad528f1b32f976e5513c1e29c11",name:"trigger"})),(this.files?.length??0)>0&&!this.hideFileNames&&s("ul",{key:"fe7b503a89a65af02cbb39b93b518b2dde790a34",class:"xpl-input-file__file-list"},(this.files??[]).map(((e,i)=>s("li",{class:"xpl-input-file__file-item"},s("span",{class:"xpl-input-file__file-name"},e.name),s("xpl-icon",{icon:"x-circle",size:24,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.onRemoveFileByIndex(i)},class:"xpl-input-file__remove-icon"}))))),this.accept&&!this.hideAcceptText&&s("span",{key:"6e5e54426f2b33858b374d09014ec0096fa43bb4",class:"xpl-input-file__accept"},"Accepted file types: ",this.accept),s("input",{key:"81d08e97d8d2c8a59640348e295261f9acd439cc",onChange:this.handleFileChange,type:"file",ref:e=>{this.fileInput=e??void 0},hidden:!0,accept:this.accept,multiple:this.multiple,name:this.name}))}get el(){return this}static get watchers(){return{files:[{onFilesChange:0}]}}},[260,"xpl-input-file",{disabled:[4],name:[1],_id:[1],accept:[1],multiple:[4],hideTriggerOnSelect:[4,"hide-trigger-on-select"],hideFileNames:[4,"hide-file-names"],hideAcceptText:[4,"hide-accept-text"],files:[32],removeFileByIndex:[64]},void 0,{files:[{onFilesChange:0}]}]);function p(){"undefined"!=typeof customElements&&["xpl-input-file","xpl-icon"].forEach((e=>{switch(e){case"xpl-input-file":customElements.get(n(e))||customElements.define(n(e),c);break;case"xpl-icon":customElements.get(n(e))||a()}}))}export{c as I,p as d}
@@ -1 +1 @@
1
- import{p as s,H as t,d as i,h as e,c as h,t as a}from"./p-BSHdGbmH.js";import{d as r}from"./p-imCMp2Nl.js";const n=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.blurEvent=i(this,"blurEvent",7),this.focusEvent=i(this,"focusEvent",7),this.inputEvent=i(this,"inputEvent",7),this.search=i(this,"search",7),this.valueChange=i(this,"valueChange",7),this.hasAncestorForm=!1,this.ariaLabel="Search",this.autocomplete="off",this.disabled=!1,this.hasError=!1,this.hasVisibleLabel=!1,this.placeholder="Search",this.readonly=!1,this.required=!1,this.shape="rounded",this.value="",this.handleInnerFormSubmit=s=>{s.preventDefault(),this.disabled||this.readonly||this.emitSearchCommit(this.value.trim())},this.handleClear=s=>{s.preventDefault(),this.disabled||this.readonly||(this.value="",this.valueChange.emit(""),this.inputEvent.emit(""),this.inputEl?.focus())},this.handleInput=s=>{const t=s.target;this.value=t.value,this.valueChange.emit(t.value),this.inputEvent.emit(t.value)},this.handleKeyDown=s=>{"Enter"===s.key&&(this.disabled||this.readonly||s.target.form||(s.preventDefault(),this.emitSearchCommit(this.value.trim())))},this.handleFocus=s=>{this.focusEvent.emit(s)},this.handleBlur=s=>{this.blurEvent.emit(s)}}connectedCallback(){this.syncAncestorFormFlag()}async setFocus(){this.inputEl?.focus()}syncAncestorFormFlag(){const s=this.el,t=Boolean(s&&"function"==typeof s.closest&&s.closest("form"));this.hasAncestorForm!==t&&(this.hasAncestorForm=t)}get hasValue(){return void 0!==this.value&&this.value.length>0}get resolvedInputAriaLabel(){if(!this.hasVisibleLabel)return(this.ariaLabel??"").trim()||"Search"}get rendersInnerSearchForm(){return!this.hasAncestorForm}emitSearchCommit(s){this.search.emit(s)}renderShell(){const s=e("div",{class:"xpl-input-search__shell"},e("span",{class:"xpl-input-search__icon","aria-hidden":"true"},e("xpl-icon",{icon:"magnifier",size:20})),e("input",{"aria-describedby":this.hasError?this.errorMessageId:void 0,"aria-invalid":this.hasError?"true":void 0,"aria-label":this.resolvedInputAriaLabel,autocomplete:this.autocomplete,class:"xpl-input-search__input",disabled:this.disabled,id:this.inputId,name:this.name,onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,placeholder:this.placeholder,readonly:this.readonly,ref:s=>{this.inputEl=s??void 0},required:this.required,role:"searchbox",type:"text",value:this.value}),e("button",{"aria-hidden":this.hasValue?void 0:"true","aria-label":"Clear search",class:"xpl-input-search__clear",disabled:this.disabled||this.readonly,onClick:this.handleClear,type:"button"},e("xpl-icon",{icon:"circle-xmark",size:16})));return this.rendersInnerSearchForm?e("form",{class:"xpl-input-search__form",onSubmit:this.handleInnerFormSubmit},s):s}render(){return e(h,{key:"017e5d3958dccf6ca1096cd623ffd49b302a5ab3",class:{"xpl-input-search":!0,"xpl-input-search--disabled":this.disabled,"xpl-input-search--error":this.hasError,"xpl-input-search--has-value":this.hasValue,"xpl-input-search--readonly":this.readonly,"xpl-input-search--shape-box":"box"===this.shape}},this.renderShell())}get el(){return this}},[0,"xpl-input-search",{ariaLabel:[1,"aria-label"],autocomplete:[1],disabled:[4],errorMessageId:[1,"error-message-id"],hasError:[4,"has-error"],hasVisibleLabel:[4,"has-visible-label"],inputId:[1,"input-id"],name:[1],placeholder:[1],readonly:[4],required:[4],shape:[1],value:[1025],hasAncestorForm:[32],setFocus:[64]}]);function l(){"undefined"!=typeof customElements&&["xpl-input-search","xpl-icon"].forEach((s=>{switch(s){case"xpl-input-search":customElements.get(a(s))||customElements.define(a(s),n);break;case"xpl-icon":customElements.get(a(s))||r()}}))}export{n as I,l as d}
1
+ import{p as s,H as t,d as i,h as e,c as h,t as a}from"./p-BSHdGbmH.js";import{d as r}from"./p-l3EZ-agL.js";const n=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.blurEvent=i(this,"blurEvent",7),this.focusEvent=i(this,"focusEvent",7),this.inputEvent=i(this,"inputEvent",7),this.search=i(this,"search",7),this.valueChange=i(this,"valueChange",7),this.hasAncestorForm=!1,this.ariaLabel="Search",this.autocomplete="off",this.disabled=!1,this.hasError=!1,this.hasVisibleLabel=!1,this.placeholder="Search",this.readonly=!1,this.required=!1,this.shape="rounded",this.value="",this.handleInnerFormSubmit=s=>{s.preventDefault(),this.disabled||this.readonly||this.emitSearchCommit(this.value.trim())},this.handleClear=s=>{s.preventDefault(),this.disabled||this.readonly||(this.value="",this.valueChange.emit(""),this.inputEvent.emit(""),this.inputEl?.focus())},this.handleInput=s=>{const t=s.target;this.value=t.value,this.valueChange.emit(t.value),this.inputEvent.emit(t.value)},this.handleKeyDown=s=>{"Enter"===s.key&&(this.disabled||this.readonly||s.target.form||(s.preventDefault(),this.emitSearchCommit(this.value.trim())))},this.handleFocus=s=>{this.focusEvent.emit(s)},this.handleBlur=s=>{this.blurEvent.emit(s)}}connectedCallback(){this.syncAncestorFormFlag()}async setFocus(){this.inputEl?.focus()}syncAncestorFormFlag(){const s=this.el,t=Boolean(s&&"function"==typeof s.closest&&s.closest("form"));this.hasAncestorForm!==t&&(this.hasAncestorForm=t)}get hasValue(){return void 0!==this.value&&this.value.length>0}get resolvedInputAriaLabel(){if(!this.hasVisibleLabel)return(this.ariaLabel??"").trim()||"Search"}get rendersInnerSearchForm(){return!this.hasAncestorForm}emitSearchCommit(s){this.search.emit(s)}renderShell(){const s=e("div",{class:"xpl-input-search__shell"},e("span",{class:"xpl-input-search__icon","aria-hidden":"true"},e("xpl-icon",{icon:"magnifier",size:20})),e("input",{"aria-describedby":this.hasError?this.errorMessageId:void 0,"aria-invalid":this.hasError?"true":void 0,"aria-label":this.resolvedInputAriaLabel,autocomplete:this.autocomplete,class:"xpl-input-search__input",disabled:this.disabled,id:this.inputId,name:this.name,onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,placeholder:this.placeholder,readonly:this.readonly,ref:s=>{this.inputEl=s??void 0},required:this.required,role:"searchbox",type:"text",value:this.value}),e("button",{"aria-hidden":this.hasValue?void 0:"true","aria-label":"Clear search",class:"xpl-input-search__clear",disabled:this.disabled||this.readonly,onClick:this.handleClear,type:"button"},e("xpl-icon",{icon:"circle-xmark",size:16})));return this.rendersInnerSearchForm?e("form",{class:"xpl-input-search__form",onSubmit:this.handleInnerFormSubmit},s):s}render(){return e(h,{key:"4a152d3a8db620391334488e1c6c3cdbe9250ba3",class:{"xpl-input-search":!0,"xpl-input-search--disabled":this.disabled,"xpl-input-search--error":this.hasError,"xpl-input-search--has-value":this.hasValue,"xpl-input-search--readonly":this.readonly,"xpl-input-search--shape-box":"box"===this.shape}},this.renderShell())}get el(){return this}},[0,"xpl-input-search",{ariaLabel:[1,"aria-label"],autocomplete:[1],disabled:[4],errorMessageId:[1,"error-message-id"],hasError:[4,"has-error"],hasVisibleLabel:[4,"has-visible-label"],inputId:[1,"input-id"],name:[1],placeholder:[1],readonly:[4],required:[4],shape:[1],value:[1025],hasAncestorForm:[32],setFocus:[64]}]);function l(){"undefined"!=typeof customElements&&["xpl-input-search","xpl-icon"].forEach((s=>{switch(s){case"xpl-input-search":customElements.get(a(s))||customElements.define(a(s),n);break;case"xpl-icon":customElements.get(a(s))||r()}}))}export{n as I,l as d}
@@ -0,0 +1 @@
1
+ import{p as e,H as d,h as n,c as s,t as o}from"./p-BSHdGbmH.js";const a=e(class extends d{constructor(e){super(),!1!==e&&this.__registerHost()}render(){return n(s,{key:"04265224adcc5b65f53d2e35d0cfef470931ce41",class:{"xpl-dropdown-heading":!0},role:"presentation"},n("span",{key:"27293255cdfe35d207f3f0155beae3dc4b737e0d"},this.label||n("slot",{key:"b5bbee144360b2e5da681864e3dae6c2cafd2552",name:"heading"})))}},[260,"xpl-dropdown-heading",{label:[1]}]);function t(){"undefined"!=typeof customElements&&["xpl-dropdown-heading"].forEach((e=>{"xpl-dropdown-heading"===e&&(customElements.get(o(e))||customElements.define(o(e),a))}))}export{a as D,t as d}