se-design 1.0.82 → 1.0.83-dev.2

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 (397) hide show
  1. package/dist/assets/icons/chat.svg +4 -0
  2. package/dist/assets/icons/tag.svg +2 -2
  3. package/dist/assets/style.css +1 -1
  4. package/dist/components/AccessibleDiv/index.d.ts +23 -1
  5. package/dist/components/Dropdown/index.d.ts +2 -0
  6. package/dist/components/DropdownWithInputTags/index.d.ts +3 -0
  7. package/dist/components/Link/index.d.ts +6 -2
  8. package/dist/index.js +62 -54
  9. package/dist/index.js.map +1 -1
  10. package/dist/index100.js +1 -1
  11. package/dist/index100.js.map +1 -1
  12. package/dist/index101.js +1 -1
  13. package/dist/index101.js.map +1 -1
  14. package/dist/index102.js +1 -1
  15. package/dist/index102.js.map +1 -1
  16. package/dist/index103.js +1 -1
  17. package/dist/index103.js.map +1 -1
  18. package/dist/index104.js +1 -1
  19. package/dist/index104.js.map +1 -1
  20. package/dist/index105.js +1 -1
  21. package/dist/index105.js.map +1 -1
  22. package/dist/index106.js +1 -1
  23. package/dist/index106.js.map +1 -1
  24. package/dist/index107.js +1 -1
  25. package/dist/index107.js.map +1 -1
  26. package/dist/index108.js +1 -1
  27. package/dist/index108.js.map +1 -1
  28. package/dist/index109.js +2 -2
  29. package/dist/index109.js.map +1 -1
  30. package/dist/index110.js +2 -2
  31. package/dist/index110.js.map +1 -1
  32. package/dist/index111.js +1 -1
  33. package/dist/index111.js.map +1 -1
  34. package/dist/index112.js +1 -1
  35. package/dist/index112.js.map +1 -1
  36. package/dist/index113.js +2 -2
  37. package/dist/index113.js.map +1 -1
  38. package/dist/index114.js +1 -1
  39. package/dist/index114.js.map +1 -1
  40. package/dist/index115.js +2 -2
  41. package/dist/index115.js.map +1 -1
  42. package/dist/index116.js +1 -1
  43. package/dist/index116.js.map +1 -1
  44. package/dist/index117.js +1 -1
  45. package/dist/index117.js.map +1 -1
  46. package/dist/index118.js +2 -2
  47. package/dist/index118.js.map +1 -1
  48. package/dist/index119.js +2 -2
  49. package/dist/index119.js.map +1 -1
  50. package/dist/index12.js +2 -2
  51. package/dist/index120.js +1 -1
  52. package/dist/index120.js.map +1 -1
  53. package/dist/index121.js +2 -2
  54. package/dist/index121.js.map +1 -1
  55. package/dist/index122.js +2 -2
  56. package/dist/index122.js.map +1 -1
  57. package/dist/index123.js +2 -2
  58. package/dist/index123.js.map +1 -1
  59. package/dist/index124.js +1 -1
  60. package/dist/index124.js.map +1 -1
  61. package/dist/index125.js +2 -2
  62. package/dist/index125.js.map +1 -1
  63. package/dist/index126.js +2 -2
  64. package/dist/index126.js.map +1 -1
  65. package/dist/index127.js +2 -2
  66. package/dist/index127.js.map +1 -1
  67. package/dist/index128.js +1 -1
  68. package/dist/index128.js.map +1 -1
  69. package/dist/index129.js +1 -1
  70. package/dist/index129.js.map +1 -1
  71. package/dist/index13.js +1 -1
  72. package/dist/index130.js +2 -2
  73. package/dist/index130.js.map +1 -1
  74. package/dist/index131.js +2 -2
  75. package/dist/index131.js.map +1 -1
  76. package/dist/index132.js +2 -2
  77. package/dist/index132.js.map +1 -1
  78. package/dist/index133.js +1 -1
  79. package/dist/index133.js.map +1 -1
  80. package/dist/index134.js +1 -1
  81. package/dist/index134.js.map +1 -1
  82. package/dist/index135.js +2 -2
  83. package/dist/index135.js.map +1 -1
  84. package/dist/index136.js +2 -2
  85. package/dist/index136.js.map +1 -1
  86. package/dist/index137.js +1 -1
  87. package/dist/index137.js.map +1 -1
  88. package/dist/index138.js +1 -1
  89. package/dist/index138.js.map +1 -1
  90. package/dist/index139.js +1 -1
  91. package/dist/index139.js.map +1 -1
  92. package/dist/index140.js +1 -1
  93. package/dist/index140.js.map +1 -1
  94. package/dist/index141.js +1 -1
  95. package/dist/index141.js.map +1 -1
  96. package/dist/index142.js +2 -2
  97. package/dist/index142.js.map +1 -1
  98. package/dist/index143.js +1 -1
  99. package/dist/index143.js.map +1 -1
  100. package/dist/index144.js +1 -1
  101. package/dist/index144.js.map +1 -1
  102. package/dist/index145.js +1 -1
  103. package/dist/index145.js.map +1 -1
  104. package/dist/index146.js +2 -2
  105. package/dist/index146.js.map +1 -1
  106. package/dist/index147.js +1 -1
  107. package/dist/index147.js.map +1 -1
  108. package/dist/index148.js +1 -1
  109. package/dist/index148.js.map +1 -1
  110. package/dist/index149.js +1 -1
  111. package/dist/index149.js.map +1 -1
  112. package/dist/index150.js +1 -1
  113. package/dist/index150.js.map +1 -1
  114. package/dist/index151.js +2 -2
  115. package/dist/index151.js.map +1 -1
  116. package/dist/index152.js +2 -2
  117. package/dist/index152.js.map +1 -1
  118. package/dist/index153.js +1 -1
  119. package/dist/index153.js.map +1 -1
  120. package/dist/index154.js +2 -2
  121. package/dist/index154.js.map +1 -1
  122. package/dist/index155.js +1 -1
  123. package/dist/index155.js.map +1 -1
  124. package/dist/index156.js +2 -2
  125. package/dist/index156.js.map +1 -1
  126. package/dist/index157.js +1 -1
  127. package/dist/index157.js.map +1 -1
  128. package/dist/index158.js +2 -2
  129. package/dist/index158.js.map +1 -1
  130. package/dist/index159.js +2 -2
  131. package/dist/index159.js.map +1 -1
  132. package/dist/index16.js +25 -23
  133. package/dist/index16.js.map +1 -1
  134. package/dist/index160.js +1 -1
  135. package/dist/index160.js.map +1 -1
  136. package/dist/index161.js +1 -1
  137. package/dist/index161.js.map +1 -1
  138. package/dist/index162.js +1 -1
  139. package/dist/index162.js.map +1 -1
  140. package/dist/index163.js +1 -1
  141. package/dist/index163.js.map +1 -1
  142. package/dist/index164.js +1 -1
  143. package/dist/index164.js.map +1 -1
  144. package/dist/index165.js +1 -1
  145. package/dist/index165.js.map +1 -1
  146. package/dist/index166.js +1 -1
  147. package/dist/index166.js.map +1 -1
  148. package/dist/index167.js +1 -1
  149. package/dist/index167.js.map +1 -1
  150. package/dist/index168.js +1 -1
  151. package/dist/index168.js.map +1 -1
  152. package/dist/index169.js +1 -1
  153. package/dist/index169.js.map +1 -1
  154. package/dist/index17.js +29 -29
  155. package/dist/index17.js.map +1 -1
  156. package/dist/index170.js +1 -1
  157. package/dist/index170.js.map +1 -1
  158. package/dist/index171.js +1 -1
  159. package/dist/index171.js.map +1 -1
  160. package/dist/index172.js +1 -1
  161. package/dist/index172.js.map +1 -1
  162. package/dist/index173.js +1 -1
  163. package/dist/index173.js.map +1 -1
  164. package/dist/index174.js +1 -1
  165. package/dist/index174.js.map +1 -1
  166. package/dist/index175.js +1 -1
  167. package/dist/index175.js.map +1 -1
  168. package/dist/index176.js +1 -1
  169. package/dist/index176.js.map +1 -1
  170. package/dist/index177.js +1 -1
  171. package/dist/index177.js.map +1 -1
  172. package/dist/index178.js +1 -1
  173. package/dist/index178.js.map +1 -1
  174. package/dist/index179.js +1 -1
  175. package/dist/index179.js.map +1 -1
  176. package/dist/index18.js +85 -63
  177. package/dist/index18.js.map +1 -1
  178. package/dist/index180.js +1 -1
  179. package/dist/index180.js.map +1 -1
  180. package/dist/index181.js +2 -2
  181. package/dist/index181.js.map +1 -1
  182. package/dist/index182.js +1 -1
  183. package/dist/index182.js.map +1 -1
  184. package/dist/index183.js +1 -1
  185. package/dist/index183.js.map +1 -1
  186. package/dist/index184.js +1 -1
  187. package/dist/index184.js.map +1 -1
  188. package/dist/index185.js +2 -2
  189. package/dist/index185.js.map +1 -1
  190. package/dist/index186.js +1 -1
  191. package/dist/index186.js.map +1 -1
  192. package/dist/index187.js +1 -1
  193. package/dist/index187.js.map +1 -1
  194. package/dist/index188.js +1 -1
  195. package/dist/index188.js.map +1 -1
  196. package/dist/index189.js +2 -2
  197. package/dist/index189.js.map +1 -1
  198. package/dist/index19.js +181 -166
  199. package/dist/index19.js.map +1 -1
  200. package/dist/index190.js +1 -1
  201. package/dist/index190.js.map +1 -1
  202. package/dist/index191.js +1 -1
  203. package/dist/index191.js.map +1 -1
  204. package/dist/index192.js +1 -1
  205. package/dist/index192.js.map +1 -1
  206. package/dist/index193.js +1 -1
  207. package/dist/index193.js.map +1 -1
  208. package/dist/index194.js +1 -1
  209. package/dist/index194.js.map +1 -1
  210. package/dist/index195.js +1 -1
  211. package/dist/index195.js.map +1 -1
  212. package/dist/index196.js +2 -2
  213. package/dist/index196.js.map +1 -1
  214. package/dist/index197.js +1 -1
  215. package/dist/index197.js.map +1 -1
  216. package/dist/index198.js +2 -2
  217. package/dist/index198.js.map +1 -1
  218. package/dist/index199.js +2 -149
  219. package/dist/index199.js.map +1 -1
  220. package/dist/index200.js +2 -9
  221. package/dist/index200.js.map +1 -1
  222. package/dist/index201.js +2 -6
  223. package/dist/index201.js.map +1 -1
  224. package/dist/index202.js +2 -5
  225. package/dist/index202.js.map +1 -1
  226. package/dist/index203.js +149 -42
  227. package/dist/index203.js.map +1 -1
  228. package/dist/index204.js +8 -20
  229. package/dist/index204.js.map +1 -1
  230. package/dist/index205.js +9 -0
  231. package/dist/index205.js.map +1 -0
  232. package/dist/index206.js +8 -0
  233. package/dist/index206.js.map +1 -0
  234. package/dist/index207.js +45 -0
  235. package/dist/index207.js.map +1 -0
  236. package/dist/index208.js +24 -0
  237. package/dist/index208.js.map +1 -0
  238. package/dist/{index211.js → index215.js} +1 -1
  239. package/dist/{index211.js.map → index215.js.map} +1 -1
  240. package/dist/{index212.js → index216.js} +13 -9
  241. package/dist/index216.js.map +1 -0
  242. package/dist/{index220.js → index224.js} +1 -1
  243. package/dist/{index220.js.map → index224.js.map} +1 -1
  244. package/dist/index23.js +3 -3
  245. package/dist/{index228.js → index232.js} +1 -1
  246. package/dist/{index228.js.map → index232.js.map} +1 -1
  247. package/dist/{index231.js → index235.js} +1 -1
  248. package/dist/{index231.js.map → index235.js.map} +1 -1
  249. package/dist/index244.js +168 -8
  250. package/dist/index244.js.map +1 -1
  251. package/dist/index245.js +3 -9
  252. package/dist/index245.js.map +1 -1
  253. package/dist/index247.js +18 -169
  254. package/dist/index247.js.map +1 -1
  255. package/dist/index248.js +10 -11
  256. package/dist/index248.js.map +1 -1
  257. package/dist/index249.js +8 -4
  258. package/dist/index249.js.map +1 -1
  259. package/dist/index25.js +175 -161
  260. package/dist/index25.js.map +1 -1
  261. package/dist/index250.js +4 -5
  262. package/dist/index250.js.map +1 -1
  263. package/dist/index251.js +168 -36
  264. package/dist/index251.js.map +1 -1
  265. package/dist/index252.js +11 -2
  266. package/dist/index252.js.map +1 -1
  267. package/dist/index253.js +5 -7
  268. package/dist/index253.js.map +1 -1
  269. package/dist/index254.js +5 -326
  270. package/dist/index254.js.map +1 -1
  271. package/dist/index255.js +36 -48
  272. package/dist/index255.js.map +1 -1
  273. package/dist/index256.js +2 -2
  274. package/dist/index257.js +7 -75
  275. package/dist/index257.js.map +1 -1
  276. package/dist/index258.js +308 -74
  277. package/dist/index258.js.map +1 -1
  278. package/dist/index259.js +45 -47
  279. package/dist/index259.js.map +1 -1
  280. package/dist/index260.js +2 -8
  281. package/dist/index260.js.map +1 -1
  282. package/dist/index261.js +75 -4
  283. package/dist/index261.js.map +1 -1
  284. package/dist/index262.js +89 -48
  285. package/dist/index262.js.map +1 -1
  286. package/dist/index263.js +52 -2
  287. package/dist/index263.js.map +1 -1
  288. package/dist/index264.js +8 -2
  289. package/dist/index264.js.map +1 -1
  290. package/dist/index265.js +8 -0
  291. package/dist/index265.js.map +1 -0
  292. package/dist/index266.js +55 -0
  293. package/dist/index266.js.map +1 -0
  294. package/dist/index267.js +5 -0
  295. package/dist/index267.js.map +1 -0
  296. package/dist/index268.js +5 -0
  297. package/dist/index268.js.map +1 -0
  298. package/dist/index28.js +5 -5
  299. package/dist/index28.js.map +1 -1
  300. package/dist/index29.js +1 -1
  301. package/dist/index3.js +59 -49
  302. package/dist/index3.js.map +1 -1
  303. package/dist/index30.js +1 -1
  304. package/dist/index33.js +1 -1
  305. package/dist/index35.js +1 -1
  306. package/dist/index36.js +2 -2
  307. package/dist/index38.js +209 -194
  308. package/dist/index38.js.map +1 -1
  309. package/dist/index39.js +3 -3
  310. package/dist/index4.js +1 -1
  311. package/dist/index40.js +1 -1
  312. package/dist/index43.js +16 -16
  313. package/dist/index43.js.map +1 -1
  314. package/dist/index45.js +60 -59
  315. package/dist/index45.js.map +1 -1
  316. package/dist/index46.js +3 -3
  317. package/dist/index49.js +1 -1
  318. package/dist/index51.js +1 -1
  319. package/dist/index52.js +2 -2
  320. package/dist/index53.js +1 -1
  321. package/dist/index55.js +2 -2
  322. package/dist/index55.js.map +1 -1
  323. package/dist/index57.js +1 -1
  324. package/dist/index6.js +238 -236
  325. package/dist/index6.js.map +1 -1
  326. package/dist/index61.js +9 -8
  327. package/dist/index61.js.map +1 -1
  328. package/dist/index63.js +1 -1
  329. package/dist/index64.js +35 -34
  330. package/dist/index64.js.map +1 -1
  331. package/dist/index65.js +1 -1
  332. package/dist/index67.js +1 -1
  333. package/dist/index68.js +80 -58
  334. package/dist/index68.js.map +1 -1
  335. package/dist/index7.js +1 -1
  336. package/dist/index70.js +1 -1
  337. package/dist/index75.js +108 -5
  338. package/dist/index75.js.map +1 -1
  339. package/dist/index76.js +18 -54
  340. package/dist/index76.js.map +1 -1
  341. package/dist/index77.js +10 -23
  342. package/dist/index77.js.map +1 -1
  343. package/dist/index78.js +5 -9
  344. package/dist/index78.js.map +1 -1
  345. package/dist/index79.js +62 -0
  346. package/dist/index79.js.map +1 -0
  347. package/dist/index80.js +24 -2
  348. package/dist/index80.js.map +1 -1
  349. package/dist/index81.js +9 -2
  350. package/dist/index81.js.map +1 -1
  351. package/dist/index83.js +1 -1
  352. package/dist/index83.js.map +1 -1
  353. package/dist/index84.js +2 -2
  354. package/dist/index84.js.map +1 -1
  355. package/dist/index85.js +1 -1
  356. package/dist/index85.js.map +1 -1
  357. package/dist/index86.js +2 -2
  358. package/dist/index86.js.map +1 -1
  359. package/dist/index87.js +1 -1
  360. package/dist/index87.js.map +1 -1
  361. package/dist/index88.js +1 -1
  362. package/dist/index88.js.map +1 -1
  363. package/dist/index89.js +1 -1
  364. package/dist/index89.js.map +1 -1
  365. package/dist/index9.js +3 -3
  366. package/dist/index90.js +1 -1
  367. package/dist/index90.js.map +1 -1
  368. package/dist/index91.js +1 -1
  369. package/dist/index91.js.map +1 -1
  370. package/dist/index92.js +1 -1
  371. package/dist/index92.js.map +1 -1
  372. package/dist/index93.js +1 -1
  373. package/dist/index93.js.map +1 -1
  374. package/dist/index94.js +1 -1
  375. package/dist/index94.js.map +1 -1
  376. package/dist/index95.js +1 -1
  377. package/dist/index95.js.map +1 -1
  378. package/dist/index96.js +1 -1
  379. package/dist/index96.js.map +1 -1
  380. package/dist/index97.js +1 -1
  381. package/dist/index97.js.map +1 -1
  382. package/dist/index98.js +1 -1
  383. package/dist/index98.js.map +1 -1
  384. package/dist/index99.js +1 -1
  385. package/dist/index99.js.map +1 -1
  386. package/package.json +1 -1
  387. package/dist/index212.js.map +0 -1
  388. package/dist/index240.js +0 -173
  389. package/dist/index240.js.map +0 -1
  390. package/dist/index241.js +0 -7
  391. package/dist/index241.js.map +0 -1
  392. package/dist/index243.js +0 -22
  393. package/dist/index243.js.map +0 -1
  394. package/dist/index246.js +0 -8
  395. package/dist/index246.js.map +0 -1
  396. package/dist/index82.js +0 -5
  397. package/dist/index82.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index247.js","sources":["../node_modules/@tanem/svg-injector/dist/svg-injector.esm.js"],"sourcesContent":["import { __spreadArray } from 'tslib';\nimport { parse } from 'content-type';\n\nvar cache = new Map();\n\nvar cloneSvg = function cloneSvg(sourceSvg) {\n return sourceSvg.cloneNode(true);\n};\n\nvar isLocal = function isLocal() {\n return window.location.protocol === 'file:';\n};\n\nvar makeAjaxRequest = function makeAjaxRequest(url, httpRequestWithCredentials, callback) {\n var httpRequest = new XMLHttpRequest();\n httpRequest.onreadystatechange = function () {\n try {\n if (!/\\.svg/i.test(url) && httpRequest.readyState === 2) {\n var contentType = httpRequest.getResponseHeader('Content-Type');\n if (!contentType) {\n throw new Error('Content type not found');\n }\n var type = parse(contentType).type;\n if (!(type === 'image/svg+xml' || type === 'text/plain')) {\n throw new Error(\"Invalid content type: \".concat(type));\n }\n }\n if (httpRequest.readyState === 4) {\n if (httpRequest.status === 404 || httpRequest.responseXML === null) {\n throw new Error(isLocal() ? 'Note: SVG injection ajax calls do not work locally without ' + 'adjusting security settings in your browser. Or consider ' + 'using a local webserver.' : 'Unable to load SVG file: ' + url);\n }\n if (httpRequest.status === 200 || isLocal() && httpRequest.status === 0) {\n callback(null, httpRequest);\n } else {\n throw new Error('There was a problem injecting the SVG: ' + httpRequest.status + ' ' + httpRequest.statusText);\n }\n }\n } catch (error) {\n httpRequest.abort();\n if (error instanceof Error) {\n callback(error, httpRequest);\n } else {\n throw error;\n }\n }\n };\n httpRequest.open('GET', url);\n httpRequest.withCredentials = httpRequestWithCredentials;\n if (httpRequest.overrideMimeType) {\n httpRequest.overrideMimeType('text/xml');\n }\n httpRequest.send();\n};\n\nvar requestQueue = {};\nvar queueRequest = function queueRequest(url, callback) {\n requestQueue[url] = requestQueue[url] || [];\n requestQueue[url].push(callback);\n};\nvar processRequestQueue = function processRequestQueue(url) {\n var _loop_1 = function _loop_1(i, len) {\n setTimeout(function () {\n if (Array.isArray(requestQueue[url])) {\n var cacheValue = cache.get(url);\n var callback = requestQueue[url][i];\n if (cacheValue instanceof SVGSVGElement) {\n callback(null, cloneSvg(cacheValue));\n }\n if (cacheValue instanceof Error) {\n callback(cacheValue);\n }\n if (i === requestQueue[url].length - 1) {\n delete requestQueue[url];\n }\n }\n }, 0);\n };\n for (var i = 0, len = requestQueue[url].length; i < len; i++) {\n _loop_1(i);\n }\n};\n\nvar loadSvgCached = function loadSvgCached(url, httpRequestWithCredentials, callback) {\n if (cache.has(url)) {\n var cacheValue = cache.get(url);\n if (cacheValue === undefined) {\n queueRequest(url, callback);\n return;\n }\n if (cacheValue instanceof SVGSVGElement) {\n callback(null, cloneSvg(cacheValue));\n return;\n }\n }\n cache.set(url, undefined);\n queueRequest(url, callback);\n makeAjaxRequest(url, httpRequestWithCredentials, function (error, httpRequest) {\n var _a;\n if (error) {\n cache.set(url, error);\n } else if (((_a = httpRequest.responseXML) === null || _a === void 0 ? void 0 : _a.documentElement) instanceof SVGSVGElement) {\n cache.set(url, httpRequest.responseXML.documentElement);\n }\n processRequestQueue(url);\n });\n};\n\nvar loadSvgUncached = function loadSvgUncached(url, httpRequestWithCredentials, callback) {\n makeAjaxRequest(url, httpRequestWithCredentials, function (error, httpRequest) {\n var _a;\n if (error) {\n callback(error);\n } else if (((_a = httpRequest.responseXML) === null || _a === void 0 ? void 0 : _a.documentElement) instanceof SVGSVGElement) {\n callback(null, httpRequest.responseXML.documentElement);\n }\n });\n};\n\nvar idCounter = 0;\nvar uniqueId = function uniqueId() {\n return ++idCounter;\n};\n\nvar injectedElements = [];\nvar ranScripts = {};\nvar svgNamespace = 'http://www.w3.org/2000/svg';\nvar xlinkNamespace = 'http://www.w3.org/1999/xlink';\nvar injectElement = function injectElement(el, evalScripts, renumerateIRIElements, cacheRequests, httpRequestWithCredentials, beforeEach, callback) {\n var elUrl = el.getAttribute('data-src') || el.getAttribute('src');\n if (!elUrl) {\n callback(new Error('Invalid data-src or src attribute'));\n return;\n }\n if (injectedElements.indexOf(el) !== -1) {\n injectedElements.splice(injectedElements.indexOf(el), 1);\n el = null;\n return;\n }\n injectedElements.push(el);\n el.setAttribute('src', '');\n var loadSvg = cacheRequests ? loadSvgCached : loadSvgUncached;\n loadSvg(elUrl, httpRequestWithCredentials, function (error, svg) {\n if (!svg) {\n injectedElements.splice(injectedElements.indexOf(el), 1);\n el = null;\n callback(error);\n return;\n }\n var elId = el.getAttribute('id');\n if (elId) {\n svg.setAttribute('id', elId);\n }\n var elTitle = el.getAttribute('title');\n if (elTitle) {\n svg.setAttribute('title', elTitle);\n }\n var elWidth = el.getAttribute('width');\n if (elWidth) {\n svg.setAttribute('width', elWidth);\n }\n var elHeight = el.getAttribute('height');\n if (elHeight) {\n svg.setAttribute('height', elHeight);\n }\n var mergedClasses = Array.from(new Set(__spreadArray(__spreadArray(__spreadArray([], (svg.getAttribute('class') || '').split(' '), true), ['injected-svg'], false), (el.getAttribute('class') || '').split(' '), true))).join(' ').trim();\n svg.setAttribute('class', mergedClasses);\n var elStyle = el.getAttribute('style');\n if (elStyle) {\n svg.setAttribute('style', elStyle);\n }\n svg.setAttribute('data-src', elUrl);\n var elData = [].filter.call(el.attributes, function (at) {\n return /^data-\\w[\\w-]*$/.test(at.name);\n });\n Array.prototype.forEach.call(elData, function (dataAttr) {\n if (dataAttr.name && dataAttr.value) {\n svg.setAttribute(dataAttr.name, dataAttr.value);\n }\n });\n if (renumerateIRIElements) {\n var iriElementsAndProperties_1 = {\n clipPath: ['clip-path'],\n 'color-profile': ['color-profile'],\n cursor: ['cursor'],\n filter: ['filter'],\n linearGradient: ['fill', 'stroke'],\n marker: ['marker', 'marker-start', 'marker-mid', 'marker-end'],\n mask: ['mask'],\n path: [],\n pattern: ['fill', 'stroke'],\n radialGradient: ['fill', 'stroke']\n };\n var element_1;\n var elements_1;\n var properties_1;\n var currentId_1;\n var newId_1;\n Object.keys(iriElementsAndProperties_1).forEach(function (key) {\n element_1 = key;\n properties_1 = iriElementsAndProperties_1[key];\n elements_1 = svg.querySelectorAll(element_1 + '[id]');\n var _loop_1 = function _loop_1(a, elementsLen) {\n currentId_1 = elements_1[a].id;\n newId_1 = currentId_1 + '-' + uniqueId();\n var referencingElements;\n Array.prototype.forEach.call(properties_1, function (property) {\n referencingElements = svg.querySelectorAll('[' + property + '*=\"' + currentId_1 + '\"]');\n for (var b = 0, referencingElementLen = referencingElements.length; b < referencingElementLen; b++) {\n var attrValue = referencingElements[b].getAttribute(property);\n if (attrValue && !attrValue.match(new RegExp('url\\\\(\"?#' + currentId_1 + '\"?\\\\)'))) {\n continue;\n }\n referencingElements[b].setAttribute(property, 'url(#' + newId_1 + ')');\n }\n });\n var allLinks = svg.querySelectorAll('[*|href]');\n var links = [];\n for (var c = 0, allLinksLen = allLinks.length; c < allLinksLen; c++) {\n var href = allLinks[c].getAttributeNS(xlinkNamespace, 'href');\n if (href && href.toString() === '#' + elements_1[a].id) {\n links.push(allLinks[c]);\n }\n }\n for (var d = 0, linksLen = links.length; d < linksLen; d++) {\n links[d].setAttributeNS(xlinkNamespace, 'href', '#' + newId_1);\n }\n elements_1[a].id = newId_1;\n };\n for (var a = 0, elementsLen = elements_1.length; a < elementsLen; a++) {\n _loop_1(a);\n }\n });\n }\n svg.removeAttribute('xmlns:a');\n var scripts = svg.querySelectorAll('script');\n var scriptsToEval = [];\n var script;\n var scriptType;\n for (var i = 0, scriptsLen = scripts.length; i < scriptsLen; i++) {\n scriptType = scripts[i].getAttribute('type');\n if (!scriptType || scriptType === 'application/ecmascript' || scriptType === 'application/javascript' || scriptType === 'text/javascript') {\n script = scripts[i].innerText || scripts[i].textContent;\n if (script) {\n scriptsToEval.push(script);\n }\n svg.removeChild(scripts[i]);\n }\n }\n if (scriptsToEval.length > 0 && (evalScripts === 'always' || evalScripts === 'once' && !ranScripts[elUrl])) {\n for (var l = 0, scriptsToEvalLen = scriptsToEval.length; l < scriptsToEvalLen; l++) {\n new Function(scriptsToEval[l])(window);\n }\n ranScripts[elUrl] = true;\n }\n var styleTags = svg.querySelectorAll('style');\n Array.prototype.forEach.call(styleTags, function (styleTag) {\n styleTag.textContent += '';\n });\n svg.setAttribute('xmlns', svgNamespace);\n svg.setAttribute('xmlns:xlink', xlinkNamespace);\n beforeEach(svg);\n if (!el.parentNode) {\n injectedElements.splice(injectedElements.indexOf(el), 1);\n el = null;\n callback(new Error('Parent node is null'));\n return;\n }\n el.parentNode.replaceChild(svg, el);\n injectedElements.splice(injectedElements.indexOf(el), 1);\n el = null;\n callback(null, svg);\n });\n};\n\nvar SVGInjector = function SVGInjector(elements, _a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.afterAll,\n afterAll = _c === void 0 ? function () {\n return undefined;\n } : _c,\n _d = _b.afterEach,\n afterEach = _d === void 0 ? function () {\n return undefined;\n } : _d,\n _e = _b.beforeEach,\n beforeEach = _e === void 0 ? function () {\n return undefined;\n } : _e,\n _f = _b.cacheRequests,\n cacheRequests = _f === void 0 ? true : _f,\n _g = _b.evalScripts,\n evalScripts = _g === void 0 ? 'never' : _g,\n _h = _b.httpRequestWithCredentials,\n httpRequestWithCredentials = _h === void 0 ? false : _h,\n _j = _b.renumerateIRIElements,\n renumerateIRIElements = _j === void 0 ? true : _j;\n if (elements && 'length' in elements) {\n var elementsLoaded_1 = 0;\n for (var i = 0, j = elements.length; i < j; i++) {\n injectElement(elements[i], evalScripts, renumerateIRIElements, cacheRequests, httpRequestWithCredentials, beforeEach, function (error, svg) {\n afterEach(error, svg);\n if (elements && 'length' in elements && elements.length === ++elementsLoaded_1) {\n afterAll(elementsLoaded_1);\n }\n });\n }\n } else if (elements) {\n injectElement(elements, evalScripts, renumerateIRIElements, cacheRequests, httpRequestWithCredentials, beforeEach, function (error, svg) {\n afterEach(error, svg);\n afterAll(1);\n elements = null;\n });\n } else {\n afterAll(0);\n }\n};\n\nexport { SVGInjector };\n//# sourceMappingURL=svg-injector.esm.js.map\n"],"names":["__spreadArray","parse_1","cache","cloneSvg","sourceSvg","isLocal","makeAjaxRequest","url","httpRequestWithCredentials","callback","httpRequest","contentType","type","parse","error","requestQueue","queueRequest","processRequestQueue","_loop_1","len","cacheValue","i","loadSvgCached","_a","loadSvgUncached","idCounter","uniqueId","injectedElements","ranScripts","svgNamespace","xlinkNamespace","injectElement","el","evalScripts","renumerateIRIElements","cacheRequests","beforeEach","elUrl","loadSvg","svg","elId","elTitle","elWidth","elHeight","mergedClasses","elStyle","elData","at","dataAttr","iriElementsAndProperties_1","element_1","elements_1","properties_1","currentId_1","newId_1","key","a","elementsLen","referencingElements","property","b","referencingElementLen","attrValue","allLinks","links","c","allLinksLen","href","d","linksLen","scripts","scriptsToEval","script","scriptType","scriptsLen","l","scriptsToEvalLen","styleTags","styleTag","SVGInjector","elements","_b","_c","afterAll","_d","afterEach","_e","_f","_g","_h","_j","elementsLoaded_1","j"],"mappings":"AAGA,SAAA,iBAAAA,SAAA;AAAA,SAAA,SAAAC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AAC,GACVH,IAAW;AAAA,EACb,CAAC,IAEDG,EAAS,CAAC;AAEd;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index247.js","sources":["../src/utils/a11y/useScrollActiveIntoView.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport type { RefObject } from 'react';\n\nconst DEFAULT_SCROLL_OPTIONS: ScrollIntoViewOptions = { block: 'nearest' };\n\nexport interface UseScrollActiveIntoViewOptions {\n /**\n * Ref to the container element\n */\n containerRef?: RefObject<HTMLElement | null>;\n \n /**\n * Index of the currently active/highlighted item (-1 if none)\n */\n activeIndex: number;\n \n /**\n * CSS selector for item elements\n * Default: '[role=\"option\"]'\n */\n itemSelector?: string;\n \n /**\n * Whether scrolling is enabled\n * Default: true\n */\n enabled?: boolean;\n \n /**\n * ScrollIntoView options\n * Default: { block: 'nearest' }\n */\n scrollOptions?: ScrollIntoViewOptions;\n}\n\n/**\n * Hook to automatically scroll the active item into view.\n * \n * Useful for aria-activedescendant patterns where DOM focus stays\n * on the container (e.g., input field) but we need to visually show\n * which descendant option is logically active.\n * \n * Common use cases:\n * - Combobox dropdown options\n * - Menu items with virtual focus\n * - Grid cells with keyboard navigation\n * - Tree view items\n * - Listbox options\n * \n * @example\n * ```tsx\n * const [highlightedIndex, setHighlightedIndex] = useState(-1);\n * const listboxRef = useRef<HTMLDivElement>(null);\n * \n * useScrollActiveIntoView({\n * containerRef: listboxRef,\n * activeIndex: highlightedIndex,\n * itemSelector: '[role=\"option\"]'\n * });\n * \n * // Now when highlightedIndex changes, the item scrolls into view\n * ```\n * \n * @example Custom scroll behavior\n * ```tsx\n * useScrollActiveIntoView({\n * containerRef: menuRef,\n * activeIndex: activeMenuIndex,\n * itemSelector: '[role=\"menuitem\"]',\n * scrollOptions: { block: 'center', behavior: 'smooth' }\n * });\n * ```\n */\nexport function useScrollActiveIntoView({\n containerRef,\n activeIndex,\n itemSelector = '[role=\"option\"]',\n enabled = true,\n scrollOptions = DEFAULT_SCROLL_OPTIONS\n}: UseScrollActiveIntoViewOptions): void {\n useEffect(() => {\n // Early returns for disabled states\n if (!enabled || activeIndex < 0 || !containerRef?.current) {\n return;\n }\n \n const container = containerRef.current;\n const items = container.querySelectorAll(itemSelector);\n const activeItem = items[activeIndex] as HTMLElement;\n \n if (activeItem) {\n activeItem.scrollIntoView(scrollOptions);\n }\n }, [activeIndex, containerRef, itemSelector, enabled, scrollOptions]);\n}\n"],"names":["useEffect","DEFAULT_SCROLL_OPTIONS","block","useScrollActiveIntoView","containerRef","activeIndex","itemSelector","enabled","scrollOptions","current","activeItem","querySelectorAll","scrollIntoView"],"mappings":"AAGA,SAAA,aAAAA,SAAA;AAAA,MAAMC,IAAgD;AAAA,EAAEC,OAAO;AAAU;AAsElE,SAASC,EAAwB;AAAA,EACtCC,cAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,SAAAA,IAAU;AAAA,EACVC,eAAAA,IAAgBP;AACc,GAAS;AACvCD,EAAAA,EAAU,MAAM;AAEd,QAAI,CAACO,KAAWF,IAAc,KAAK,CAACD,GAAcK;AAChD;AAKF,UAAMC,IAFYN,EAAaK,QACPE,iBAAiBL,CAAY,EAC5BD,CAAW;AAEpC,IAAIK,KACFA,EAAWE,eAAeJ,CAAa;AAAA,EAE3C,GAAG,CAACH,GAAaD,GAAcE,GAAcC,GAASC,CAAa,CAAC;AACtE;"}
package/dist/index248.js CHANGED
@@ -1,14 +1,13 @@
1
- import { __module as r } from "./index252.js";
2
- import { __require as e } from "./index253.js";
3
- import { __require as o } from "./index254.js";
4
- import { __require as p } from "./index255.js";
5
- if (process.env.NODE_ENV !== "production") {
6
- var s = e(), i = !0;
7
- r.exports = o()(s.isElement, i);
8
- } else
9
- r.exports = p()();
10
- var _ = r.exports;
1
+ function r(t, i) {
2
+ if (t == null) return {};
3
+ var o = {};
4
+ for (var e in t) if ({}.hasOwnProperty.call(t, e)) {
5
+ if (i.indexOf(e) !== -1) continue;
6
+ o[e] = t[e];
7
+ }
8
+ return o;
9
+ }
11
10
  export {
12
- _ as p
11
+ r as default
13
12
  };
14
13
  //# sourceMappingURL=index248.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index248.js","sources":["../node_modules/prop-types/index.js"],"sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n"],"names":["ReactIs","require$$0","throwOnDirectAccess","propTypesModule","require$$1","require$$2"],"mappings":";;;;AAOA,IAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,MAAIA,IAAUC,EAAA,GAIVC,IAAsB;AAC1BC,EAAAA,EAAA,UAAiBC,EAAA,EAAqCJ,EAAQ,WAAWE,CAAmB;AAC9F;AAGEC,EAAAA,EAAA,UAAiBE,IAAqC;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index248.js","sources":["../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"sourcesContent":["function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };"],"names":["_objectWithoutPropertiesLoose","r","e","t","n"],"mappings":"AAAA,SAASA,EAA8BC,GAAGC,GAAG;AAC3C,MAAYD,KAAR,KAAW,QAAO,CAAA;AACtB,MAAIE,IAAI,CAAA;AACR,WAASC,KAAKH,EAAG,KAAI,CAAA,EAAG,eAAe,KAAKA,GAAGG,CAAC,GAAG;AACjD,QAAWF,EAAE,QAAQE,CAAC,MAAlB,GAAqB;AACzB,IAAAD,EAAEC,CAAC,IAAIH,EAAEG,CAAC;AAAA,EACZ;AACA,SAAOD;AACT;","x_google_ignoreList":[0]}
package/dist/index249.js CHANGED
@@ -1,7 +1,11 @@
1
- function e(o, r) {
2
- return e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) {
3
- return t.__proto__ = n, t;
4
- }, e(o, r);
1
+ function e() {
2
+ return e = Object.assign ? Object.assign.bind() : function(t) {
3
+ for (var n = 1; n < arguments.length; n++) {
4
+ var a = arguments[n];
5
+ for (var r in a) ({}).hasOwnProperty.call(a, r) && (t[r] = a[r]);
6
+ }
7
+ return t;
8
+ }, e.apply(null, arguments);
5
9
  }
6
10
  export {
7
11
  e as default
@@ -1 +1 @@
1
- {"version":3,"file":"index249.js","sources":["../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"],"sourcesContent":["function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };"],"names":["_setPrototypeOf","t","e"],"mappings":"AAAA,SAASA,EAAgBC,GAAGC,GAAG;AAC7B,SAAOF,IAAkB,OAAO,iBAAiB,OAAO,eAAe,KAAI,IAAK,SAAU,GAAGE,GAAG;AAC9F,WAAO,EAAE,YAAYA,GAAG;AAAA,EAC1B,GAAGF,EAAgBC,GAAGC,CAAC;AACzB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index249.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };"],"names":["_extends","n","e","t"],"mappings":"AAAA,SAASA,IAAW;AAClB,SAAOA,IAAW,OAAO,SAAS,OAAO,OAAO,KAAI,IAAK,SAAUC,GAAG;AACpE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AACzC,UAAIC,IAAI,UAAUD,CAAC;AACnB,eAAS,KAAKC,EAAG,EAAC,CAAA,GAAI,eAAe,KAAKA,GAAG,CAAC,MAAMF,EAAE,CAAC,IAAIE,EAAE,CAAC;AAAA,IAChE;AACA,WAAOF;AAAA,EACT,GAAGD,EAAS,MAAM,MAAM,SAAS;AACnC;","x_google_ignoreList":[0]}
package/dist/index25.js CHANGED
@@ -1,11 +1,11 @@
1
- import n, { useState as F, useRef as ne, useEffect as R, useLayoutEffect as Pe } from "react";
2
- import { Popover as Ae } from "./index19.js";
3
- import { Icon as oe } from "./index6.js";
4
- import { Checkbox as $e } from "./index23.js";
1
+ import o, { useState as K, useRef as ne, useEffect as R, useLayoutEffect as Le } from "react";
2
+ import { Popover as Fe } from "./index19.js";
3
+ import { Icon as re } from "./index6.js";
4
+ import { Checkbox as Oe } from "./index23.js";
5
5
  import { Button as le } from "./index4.js";
6
- import { InputWithIcon as Le } from "./index52.js";
7
- import { useStableId as q } from "./index201.js";
8
- import { useCombobox as re } from "./index68.js";
6
+ import { InputWithIcon as Be } from "./index52.js";
7
+ import { useStableId as q } from "./index205.js";
8
+ import { useCombobox as ae } from "./index68.js";
9
9
  function p() {
10
10
  return p = Object.assign ? Object.assign.bind() : function(t) {
11
11
  for (var g = 1; g < arguments.length; g++) {
@@ -15,32 +15,32 @@ function p() {
15
15
  return t;
16
16
  }, p.apply(null, arguments);
17
17
  }
18
- const je = (t) => {
19
- const g = t.selectedValue !== void 0, x = t.isOpen !== void 0, [S, ae] = F(!1), [V, K] = F(""), [se, T] = F(() => t?.defaultSelectedValue ? Array.isArray(t?.defaultSelectedValue) ? t?.defaultSelectedValue : [t.defaultSelectedValue] : []), y = ne(null), I = ne(null), P = q(void 0, "dropdown-label"), H = q(void 0, "dropdown-value"), C = q(void 0, "dropdown-listbox"), i = x ? t.isOpen : S, r = g ? Array.isArray(t.selectedValue) ? t.selectedValue : t.selectedValue ? [t.selectedValue] : [] : se, D = (e) => {
20
- x || ae(e), t.onOpenChange?.(e);
18
+ const _e = (t) => {
19
+ const g = t.selectedValue !== void 0, x = t.isOpen !== void 0, [S, se] = K(!1), [V, M] = K(""), [ie, T] = K(() => t?.defaultSelectedValue ? Array.isArray(t?.defaultSelectedValue) ? t?.defaultSelectedValue : [t.defaultSelectedValue] : []), b = ne(null), I = ne(null), $ = q(void 0, "dropdown-label"), H = q(void 0, "dropdown-value"), D = q(void 0, "dropdown-listbox"), c = x ? t.isOpen : S, l = g ? Array.isArray(t.selectedValue) ? t.selectedValue : t.selectedValue ? [t.selectedValue] : [] : ie, P = (e) => {
20
+ x || se(e), t.onOpenChange?.(e);
21
21
  }, A = (e) => {
22
22
  g || T(e);
23
23
  }, {
24
24
  selectBy: d = "",
25
25
  optionsUniqueBy: s = "",
26
26
  displaySelected: ce = !1,
27
- dropDownOptions: M,
27
+ dropDownOptions: j,
28
28
  defaultText: u = "Select",
29
- iconColor: j = "var(--color-gray-700)",
29
+ iconColor: U = "var(--color-gray-700)",
30
30
  disabled: k = !1,
31
- dropdownClassName: ie = "",
31
+ dropdownClassName: de = "",
32
32
  hasError: W = !1,
33
- errorMessage: de = "",
33
+ errorMessage: ue = "",
34
34
  customDropdownContent: _ = null,
35
- isBorderless: ue = !1,
35
+ isBorderless: me = !1,
36
36
  shouldShowSearch: h = !1,
37
- showSearchIcon: me = !0,
37
+ showSearchIcon: fe = !0,
38
38
  searchPlaceholder: z = "Search...",
39
39
  searchResultEmptyMessage: J = "No results found",
40
- ariaLabel: b = "",
41
- customSelectedValue: $ = "",
40
+ ariaLabel: y = "",
41
+ customSelectedValue: L = "",
42
42
  isWithPortal: Q = !1,
43
- firstOptionAsHeading: U = !1
43
+ firstOptionAsHeading: X = !1
44
44
  } = t;
45
45
  R(() => {
46
46
  if (!g) {
@@ -48,74 +48,78 @@ const je = (t) => {
48
48
  T(e);
49
49
  }
50
50
  }, [t?.defaultSelectedValue, g]), R(() => {
51
- i || K("");
52
- }, [i]), R(() => {
53
- i && h && I.current && requestAnimationFrame(() => I.current?.focus());
54
- }, [i, h]), Pe(() => {
55
- t.popoverElementRef && (t.popoverElementRef.current = y.current?.element ?? null);
51
+ c || M("");
52
+ }, [c]), R(() => {
53
+ c && h && I.current && requestAnimationFrame(() => I.current?.focus());
54
+ }, [c, h]), Le(() => {
55
+ t.popoverElementRef && (t.popoverElementRef.current = b.current?.element ?? null);
56
56
  });
57
- const a = t?.type === "multi-select", fe = () => V.trim() ? (M || []).filter((e) => (e?.[d]?.toString().toLowerCase() || "").includes(V.toLowerCase())) : M || [], L = (e) => {
58
- A([e]), D(!1), t?.onOptionClick?.(e), requestAnimationFrame(() => {
57
+ const a = t?.type === "multi-select", ge = () => V.trim() ? (j || []).filter((e) => (e?.[d]?.toString().toLowerCase() || "").includes(V.toLowerCase())) : j || [], F = (e) => {
58
+ A([e]), P(!1), t?.onOptionClick?.(e), requestAnimationFrame(() => {
59
59
  requestAnimationFrame(() => {
60
- y.current?.focusTrigger();
60
+ b.current?.focusTrigger();
61
61
  });
62
62
  });
63
- }, c = fe(), {
64
- listboxProps: ge,
63
+ }, i = ge(), {
64
+ listboxProps: ye,
65
65
  getOptionProps: be,
66
- highlightedIndex: ye,
67
- setHighlightedIndex: he,
68
- containerProps: ve,
69
- inputProps: X
70
- } = re({
71
- items: a ? [] : c,
66
+ highlightedIndex: he,
67
+ setHighlightedIndex: ve,
68
+ containerProps: pe,
69
+ inputProps: G,
70
+ isKeyboardFocused: xe
71
+ } = ae({
72
+ items: a ? [] : i,
72
73
  // Only use for single-select
73
- isOpen: i && !a,
74
- onOpenChange: D,
74
+ isOpen: c && !a,
75
+ onOpenChange: P,
75
76
  onSelect: (e) => {
76
- L(e);
77
+ F(e);
77
78
  },
78
- listboxId: C,
79
+ listboxId: D,
79
80
  disabled: a || k,
80
- hasItems: c.length > 0
81
+ hasItems: i.length > 0
81
82
  }), {
82
- inputProps: B,
83
- listboxProps: O,
84
- highlightedIndex: w,
85
- setHighlightedIndex: pe
86
- } = re({
87
- items: a ? c : [],
88
- isOpen: i && a,
89
- onOpenChange: D,
83
+ inputProps: O,
84
+ listboxProps: B,
85
+ containerProps: w,
86
+ highlightedIndex: E,
87
+ setHighlightedIndex: Se,
88
+ isKeyboardFocused: we
89
+ } = ae({
90
+ items: a ? i : [],
91
+ isOpen: c && a,
92
+ onOpenChange: P,
90
93
  onSelect: () => {
91
94
  },
92
- listboxId: C,
95
+ listboxId: D,
93
96
  disabled: !a,
94
97
  loop: !1,
95
- hasItems: c.length > 0
96
- }), xe = (e, o = !1) => a ? u : o && $ ? $ : e?.[d] || u, Se = () => {
98
+ hasItems: i.length > 0,
99
+ closeOnTab: !1
100
+ }), Ee = (e, n = !1) => a ? u : n && L ? L : e?.[d] || u, Ce = () => {
97
101
  A([]), t?.onClear?.();
98
- }, G = (e, o = !1) => {
102
+ }, Y = (e, n = !1) => {
99
103
  if (t?.renderOptionChip)
100
- return t?.renderOptionChip(e, o);
101
- if (a && r?.length > 0) {
102
- const f = r[0]?.[d] || "", E = r.length - 1;
103
- return /* @__PURE__ */ n.createElement("div", {
104
+ return t?.renderOptionChip(e, n);
105
+ if (a && l?.length > 0) {
106
+ const f = l[0]?.[d] || "", C = l.length - 1;
107
+ return /* @__PURE__ */ o.createElement("div", {
104
108
  className: "option-chip flex items-center w-full"
105
- }, /* @__PURE__ */ n.createElement("div", {
106
- className: `${E > 0 ? "w-full" : "flex-1"} truncate`
107
- }, `${u}: ${f}`), E > 0 && /* @__PURE__ */ n.createElement("div", {
109
+ }, /* @__PURE__ */ o.createElement("div", {
110
+ className: `${C > 0 ? "w-full" : "flex-1"} truncate`
111
+ }, `${u}: ${f}`), C > 0 && /* @__PURE__ */ o.createElement("div", {
108
112
  className: "flex-shrink-0"
109
- }, "+", E));
113
+ }, "+", C));
110
114
  }
111
- const l = xe(e, o), m = !!t?.label || !!t?.ariaLabelledBy, v = o && u && e?.[d] && !$ && !m;
112
- return /* @__PURE__ */ n.createElement("p", {
115
+ const r = Ee(e, n), m = !!t?.label || !!t?.ariaLabelledBy, v = n && u && e?.[d] && !L && !m;
116
+ return /* @__PURE__ */ o.createElement("p", {
113
117
  className: "option-chip flex flex-1 items-center justify-between"
114
- }, v ? `${u}: ${l}` : l);
115
- }, Y = (e) => /* @__PURE__ */ n.createElement("div", {
118
+ }, v ? `${u}: ${r}` : r);
119
+ }, Z = (e) => /* @__PURE__ */ o.createElement("div", {
116
120
  className: " w-full relative flex items-center border-b border-[var(--color-gray-300)]"
117
- }, /* @__PURE__ */ n.createElement(Le, {
118
- leftIcon: me ? {
121
+ }, /* @__PURE__ */ o.createElement(Be, {
122
+ leftIcon: fe ? {
119
123
  name: "search",
120
124
  position: "left",
121
125
  style: {
@@ -123,7 +127,7 @@ const je = (t) => {
123
127
  }
124
128
  } : void 0,
125
129
  value: V,
126
- onChange: (o) => K(o),
130
+ onChange: (n) => M(n),
127
131
  placeholder: z,
128
132
  style: {
129
133
  margin: 0,
@@ -138,87 +142,88 @@ const je = (t) => {
138
142
  ariaLabel: z,
139
143
  inputRef: I,
140
144
  inputProps: e
141
- })), Z = () => Y(a ? {
142
- ...B,
143
- onKeyDown: (e) => te(e, !0)
145
+ })), ee = () => Z(a ? {
146
+ ...O,
147
+ onKeyDown: (e) => oe(e, !0)
144
148
  } : {
145
- ...X,
149
+ ...G,
146
150
  onKeyDown: (e) => {
147
- X.onKeyDown(e), e.key === "Escape" && requestAnimationFrame(() => y.current?.focusTrigger());
151
+ G.onKeyDown(e), e.key === "Escape" && requestAnimationFrame(() => b.current?.focusTrigger());
148
152
  }
149
- }), we = (e, o) => {
150
- const l = e[d], m = r[0]?.[d] || u, v = s?.length ? e[s] == r[0]?.[s] : !0, f = ce && l === m && v, E = ye === o, Ve = a ? {} : be(o, f);
151
- return /* @__PURE__ */ n.createElement("div", p({
153
+ }), Ie = (e, n) => {
154
+ const r = e[d], m = l[0]?.[d] || u, v = s?.length ? e[s] == l[0]?.[s] : !0, f = ce && r === m && v, C = he === n, Ae = a ? {} : be(n, f);
155
+ return /* @__PURE__ */ o.createElement("div", p({
152
156
  key: e.id || e.value,
153
- className: `option break-words px-3 py-2 hover:bg-[var(--color-gray-100)] focus:bg-[var(--color-gray-100)] cursor-pointer select-none flex items-center justify-between ${f ? "selected" : ""} ${E ? "bg-[var(--color-blue-50)]" : ""}`,
154
- onClick: () => L(e),
157
+ className: `option break-words px-3 py-2 hover:bg-[var(--color-gray-100)] focus:bg-[var(--color-gray-100)] focus-outline cursor-pointer select-none flex items-center justify-between ${f ? "selected" : ""} ${C ? `bg-[var(--color-gray-100)]${xe ? " outline outline-[length:var(--focus-width)] -outline-offset-2 outline-[var(--focus-color)]" : ""}` : ""}`,
158
+ onClick: () => F(e),
155
159
  onKeyDown: (N) => {
156
- N.key === "Enter" || N.key === " " ? (N.preventDefault(), L(e)) : N.key === "Escape" && requestAnimationFrame(() => y.current?.focusTrigger());
160
+ N.key === "Enter" || N.key === " " ? (N.preventDefault(), F(e)) : N.key === "Escape" && requestAnimationFrame(() => b.current?.focusTrigger());
157
161
  },
158
162
  tabIndex: -1,
159
- "data-automation-id": `dropdown-option-${e?.automationId || o}`
160
- }, Ve, {
163
+ "data-automation-id": `dropdown-option-${e?.automationId || n}`
164
+ }, Ae, {
161
165
  "aria-selected": f ? "true" : "false"
162
- }), G({
166
+ }), Y({
163
167
  ...e,
164
168
  isOptionSelected: f
165
- }, !1), f && /* @__PURE__ */ n.createElement(oe, {
169
+ }, !1), f && /* @__PURE__ */ o.createElement(re, {
166
170
  name: "checkmark",
167
- stroke: j
171
+ stroke: U
168
172
  }));
169
- }, Ee = () => /* @__PURE__ */ n.createElement(n.Fragment, null, t?.label && U && /* @__PURE__ */ n.createElement("div", {
173
+ }, De = () => /* @__PURE__ */ o.createElement(o.Fragment, null, t?.label && X && /* @__PURE__ */ o.createElement("div", {
170
174
  "aria-hidden": "true",
171
175
  className: "px-3 pt-2 pb-1 text-[var(--color-gray-650)] text-xs cursor-default select-none"
172
- }, t.label), /* @__PURE__ */ n.createElement("div", p({
176
+ }, t.label), h && ee(), /* @__PURE__ */ o.createElement("div", p({
173
177
  className: "dropdown-content dropdown-options",
174
178
  "aria-label": `${u} options`
175
- }, ge), h && Z(), /* @__PURE__ */ n.createElement("div", {
179
+ }, ye), /* @__PURE__ */ o.createElement("div", {
176
180
  className: "flex flex-col max-h-80 overflow-y-auto"
177
- }, c.length > 0 ? c.map((e, o) => we(e, o)) : /* @__PURE__ */ n.createElement("div", {
181
+ }, i.length > 0 ? i.map((e, n) => Ie(e, n)) : /* @__PURE__ */ o.createElement("div", {
178
182
  className: "px-3 py-4 text-center text-[var(--color-gray-700)] text-sm",
179
183
  role: "status",
180
184
  "aria-live": "polite"
181
- }, J)))), ee = (e, o) => {
182
- let l = [];
183
- e ? l = [...r, o] : l = r?.filter((m) => m[s] !== o[s]), A(l);
184
- }, Ie = () => {
185
- y.current?.togglePopover(), t?.onApply?.(r);
186
- }, te = (e, o = !1) => {
187
- if (!(o && e.key === " ")) {
185
+ }, J)))), te = (e, n) => {
186
+ let r = [];
187
+ e ? r = [...l, n] : r = l?.filter((m) => m[s] !== n[s]), A(r);
188
+ }, Pe = () => {
189
+ b.current?.togglePopover(), t?.onApply?.(l);
190
+ }, oe = (e, n = !1) => {
191
+ if (!(n && e.key === " ")) {
188
192
  if (e.key === "Enter" || e.key === " ") {
189
- if (e.preventDefault(), w >= 0 && w < c.length) {
190
- const l = c[w], m = r.some((v) => v[s] === l[s]);
191
- ee(!m, l);
193
+ if (e.preventDefault(), E >= 0 && E < i.length) {
194
+ const r = i[E], m = l.some((v) => v[s] === r[s]);
195
+ te(!m, r);
192
196
  }
193
197
  return;
194
198
  }
195
- B.onKeyDown(e), e.key === "Escape" && (e.stopPropagation(), requestAnimationFrame(() => y.current?.focusTrigger()));
199
+ O.onKeyDown(e), e.key === "Escape" && (e.stopPropagation(), requestAnimationFrame(() => b.current?.focusTrigger()));
196
200
  }
197
- }, Ce = (e, o) => {
198
- const l = r.some((f) => f[s] === e[s]), m = `${C}-option-${o}`, v = w === o;
199
- return /* @__PURE__ */ n.createElement("div", {
201
+ }, ke = (e, n) => {
202
+ const r = l.some((f) => f[s] === e[s]), m = `${D}-option-${n}`, v = E === n;
203
+ return /* @__PURE__ */ o.createElement("div", {
200
204
  key: e.id || e.value,
201
205
  id: m,
202
206
  role: "option",
203
- "aria-selected": l,
204
- className: `option px-3 py-2 hover:bg-[var(--color-gray-100)] focus:bg-[var(--color-gray-100)] cursor-pointer select-none flex items-center gap-2 ${v ? "bg-[var(--color-blue-50)]" : ""}`,
205
- onClick: () => ee(!l, e),
206
- "data-automation-id": `dropdown-option-${e?.automationId || o}`
207
- }, /* @__PURE__ */ n.createElement($e, {
207
+ "aria-selected": r,
208
+ className: `option px-3 py-2 hover:bg-[var(--color-gray-100)] focus:bg-[var(--color-gray-100)] cursor-pointer select-none flex items-center gap-2 ${v ? `bg-[var(--color-gray-100)]${we ? " outline outline-[length:var(--focus-width)] -outline-offset-2 outline-[var(--focus-color)]" : ""}` : ""}`,
209
+ onClick: () => te(!r, e),
210
+ "data-automation-id": `dropdown-option-${e?.automationId || n}`
211
+ }, /* @__PURE__ */ o.createElement(Oe, {
208
212
  tabIndex: -1,
209
213
  ariaHidden: !0,
210
- checked: l,
214
+ checked: r,
211
215
  onChange: () => {
212
- }
213
- }), /* @__PURE__ */ n.createElement("span", {
216
+ },
217
+ className: "pointer-events-none"
218
+ }), /* @__PURE__ */ o.createElement("span", {
214
219
  className: "checkbox-label"
215
220
  }, e?.label));
216
- }, De = () => /* @__PURE__ */ n.createElement("div", {
221
+ }, Ne = () => /* @__PURE__ */ o.createElement("div", {
217
222
  className: "dropdown-content dropdown-options",
218
223
  onKeyDown: (e) => {
219
224
  e.key === "Tab" && e.stopPropagation();
220
225
  }
221
- }, h && Z(), /* @__PURE__ */ n.createElement("div", p({}, O, {
226
+ }, h && ee(), /* @__PURE__ */ o.createElement("div", p({}, B, {
222
227
  "aria-label": `${u} options`,
223
228
  "aria-multiselectable": "true",
224
229
  style: {
@@ -226,106 +231,115 @@ const je = (t) => {
226
231
  }
227
232
  }, h ? {} : {
228
233
  tabIndex: -1,
229
- "aria-activedescendant": B["aria-activedescendant"],
230
- onKeyDown: (e) => te(e, !1),
234
+ "aria-activedescendant": O["aria-activedescendant"],
235
+ onKeyDown: (e) => oe(e, !1),
231
236
  onFocus: () => {
232
- w === -1 && c.length > 0 && pe(0);
237
+ E === -1 && i.length > 0 && Se(0);
233
238
  }
234
- }), /* @__PURE__ */ n.createElement("div", {
239
+ }), /* @__PURE__ */ o.createElement("div", {
235
240
  className: "flex flex-col max-h-80 overflow-y-auto"
236
- }, c.length > 0 ? c.map((e, o) => Ce(e, o)) : /* @__PURE__ */ n.createElement("div", {
241
+ }, i.length > 0 ? i.map((e, n) => ke(e, n)) : /* @__PURE__ */ o.createElement("div", {
237
242
  className: "px-3 py-4 text-center text-[var(--color-gray-700)] text-sm",
238
243
  role: "status",
239
244
  "aria-live": "polite"
240
- }, J))), /* @__PURE__ */ n.createElement("div", {
245
+ }, J))), /* @__PURE__ */ o.createElement("div", {
241
246
  className: "flex items-center justify-end gap-4 p-3 border-t border-[var(--color-gray-200)]",
242
247
  onKeyDown: (e) => {
243
- e.key === "Tab" && e.shiftKey && (e.preventDefault(), e.stopPropagation(), h ? I.current?.focus() : O.ref.current?.focus());
248
+ e.key === "Tab" && e.shiftKey && (e.preventDefault(), e.stopPropagation(), h ? I.current?.focus() : B.ref.current?.focus());
244
249
  }
245
- }, /* @__PURE__ */ n.createElement(le, {
250
+ }, /* @__PURE__ */ o.createElement(le, {
246
251
  label: "Clear",
247
252
  type: "link",
248
253
  size: "sm",
249
- onClick: Se,
254
+ onClick: Ce,
250
255
  automationId: "se-design-dropdown-clear-button"
251
- }), /* @__PURE__ */ n.createElement(le, {
256
+ }), /* @__PURE__ */ o.createElement(le, {
252
257
  label: "Apply",
253
258
  type: "primary",
254
259
  size: "sm",
255
- onClick: Ie,
260
+ onClick: Pe,
256
261
  automationId: "se-design-dropdown-apply-button"
257
- }))), ke = () => {
258
- const e = i ? "border-[var(--color-blue-500)]" : k ? "border-[var(--color-gray-300)]" : "border-[var(--color-gray-600)]", o = W ? "border-[var(--color-red-500)]" : "", l = `dropdown-src-element bg-[var(--color-white)] flex px-3 py-2 ${ue ? "border-0" : `border rounded-md ${o || e}`} flex items-center ${ie}`;
259
- return /* @__PURE__ */ n.createElement("div", {
260
- className: l
261
- }, /* @__PURE__ */ n.createElement("div", {
262
+ }))), Ve = () => {
263
+ const e = c ? "border-[var(--color-blue-500)]" : k ? "border-[var(--color-gray-300)]" : "border-[var(--color-gray-600)]", n = W ? "border-[var(--color-red-500)]" : "", r = `dropdown-src-element bg-[var(--color-white)] flex px-3 py-2 ${me ? "border-0" : `border rounded-md ${n || e}`} flex items-center ${de}`;
264
+ return /* @__PURE__ */ o.createElement("div", {
265
+ className: r
266
+ }, /* @__PURE__ */ o.createElement("div", {
262
267
  id: H,
263
268
  className: "flex-1 min-w-0",
264
269
  "data-automation-id": t?.dropDownSelectAutomationId || "selected-dropdown-value"
265
- }, G(r[0], !0)), /* @__PURE__ */ n.createElement("div", {
270
+ }, Y(l[0], !0)), /* @__PURE__ */ o.createElement("div", {
266
271
  className: "flex-shrink-0 ml-2",
267
272
  "aria-hidden": "true"
268
- }, /* @__PURE__ */ n.createElement(oe, {
273
+ }, /* @__PURE__ */ o.createElement(re, {
269
274
  name: "chevron",
270
- rotation: i ? "180" : "0",
275
+ rotation: c ? "180" : "0",
271
276
  className: "transition-transform",
272
- stroke: j
277
+ stroke: U
273
278
  })));
274
- }, Ne = () => {
275
- const e = r[0]?.[d];
276
- return b && e ? `${b}, ${e}` : b || u || "Select option";
279
+ }, $e = () => {
280
+ const e = l[0]?.[d];
281
+ return y && e ? `${y}, ${e}` : y || u || "Select option";
277
282
  };
278
- return /* @__PURE__ */ n.createElement("div", {
283
+ return /* @__PURE__ */ o.createElement("div", {
279
284
  className: `se-design-dropdown-container${t?.className ? ` ${t?.className}` : ""}`,
280
285
  style: t?.style
281
- }, t?.label ? /* @__PURE__ */ n.createElement("div", {
282
- id: P,
283
- className: `se-design-dropdown-label ${U ? "sr-only" : "mb-[3px] text-[var(--color-gray-700)] text-sm"}`
284
- }, t?.label) : !t?.ariaLabelledBy && b ? /* @__PURE__ */ n.createElement("span", {
285
- id: P,
286
+ }, t?.label ? /* @__PURE__ */ o.createElement("div", {
287
+ id: $,
288
+ className: `se-design-dropdown-label ${X ? "sr-only" : "mb-[3px] text-[var(--color-gray-700)] text-sm"}`
289
+ }, t?.label) : !t?.ariaLabelledBy && y ? /* @__PURE__ */ o.createElement("span", {
290
+ id: $,
286
291
  className: "sr-only"
287
- }, b) : null, /* @__PURE__ */ n.createElement("div", p({
292
+ }, y) : null, /* @__PURE__ */ o.createElement("div", p({
288
293
  style: t?.style,
289
294
  className: `${k ? "bg-[var(--color-gray-50)] rounded-md cursor-not-allowed" : ""}`
290
- }, a ? {} : {
291
- ...ve,
295
+ }, a ? {
296
+ // Multi-select: only spread focus-tracking handlers for isKeyboardFocused.
297
+ // Dismiss is handled by Popover — don't spread onBlurCapture.
298
+ onPointerMove: w.onPointerMove,
299
+ onPointerDown: w.onPointerDown,
300
+ onPointerUp: w.onPointerUp,
301
+ onFocusCapture: w.onFocusCapture,
302
+ onKeyDownCapture: w.onKeyDownCapture
303
+ } : {
304
+ ...pe,
292
305
  // Portal content lives in document.body — focus moving into it looks like "focus out" to
293
306
  // the container's blur handler, causing immediate close. Suppress it; the Popover's own
294
307
  // onBlur handler checks both source and portal content and handles dismissal correctly.
295
308
  ...Q ? {
296
309
  onBlurCapture: void 0
297
310
  } : {}
298
- }), /* @__PURE__ */ n.createElement(Ae, p({
299
- ref: y,
300
- isPopoverOpen: i,
311
+ }), /* @__PURE__ */ o.createElement(Fe, p({
312
+ ref: b,
313
+ isPopoverOpen: c,
301
314
  isWithPortal: Q,
302
- renderPopoverContents: _ || (a ? De : Ee),
315
+ renderPopoverContents: _ || (a ? Ne : De),
303
316
  contentWidth: "full",
317
+ popoverContentStyleProperty: t.popoverContentStyleProperty,
304
318
  renderPopoverSrcElement: t.renderSrcElement ? () => t.renderSrcElement({
305
- isOpen: i,
306
- selectedValue: r
307
- }) : ke,
319
+ isOpen: c,
320
+ selectedValue: l
321
+ }) : Ve,
308
322
  onPopoverToggle: (e) => {
309
- if (D(e), e && !a && r.length > 0) {
310
- const o = c.findIndex((l) => s ? l[s] === r[0]?.[s] : l[d] === r[0]?.[d]);
311
- o >= 0 && he(o);
323
+ if (P(e), e && !a && l.length > 0) {
324
+ const n = i.findIndex((r) => s ? r[s] === l[0]?.[s] : r[d] === l[0]?.[d]);
325
+ n >= 0 && ve(n);
312
326
  }
313
- e && a && !h && requestAnimationFrame(() => requestAnimationFrame(() => O.ref.current?.focus()));
327
+ e && a && !h && requestAnimationFrame(() => requestAnimationFrame(() => B.ref.current?.focus()));
314
328
  },
315
329
  disabled: k,
316
330
  automationId: t?.dropDownSrcAutomationId,
317
331
  popoverContentAutomationId: t?.dropDownContentAutomationId,
318
- ariaLabelledBy: t?.label || t?.ariaLabelledBy || b ? [t?.label || !t?.ariaLabelledBy && b ? P : t?.ariaLabelledBy, H].filter(Boolean).join(" ") : void 0,
319
- ariaLabel: !t?.label && !b && !t?.ariaLabelledBy ? Ne() : void 0,
332
+ ariaLabelledBy: t?.label || t?.ariaLabelledBy || y ? [t?.label || !t?.ariaLabelledBy && y ? $ : t?.ariaLabelledBy, H].filter(Boolean).join(" ") : void 0,
333
+ ariaLabel: !t?.label && !y && !t?.ariaLabelledBy ? $e() : void 0,
320
334
  sourceRole: "button",
321
335
  "aria-haspopup": "listbox"
322
- }, i ? {
323
- "aria-controls": C
324
- } : {}))), W && /* @__PURE__ */ n.createElement("div", {
336
+ }, c ? {
337
+ "aria-controls": D
338
+ } : {}))), W && /* @__PURE__ */ o.createElement("div", {
325
339
  className: "text-[var(--color-red-500)] text-sm"
326
- }, de));
340
+ }, ue));
327
341
  };
328
342
  export {
329
- je as Dropdown
343
+ _e as Dropdown
330
344
  };
331
345
  //# sourceMappingURL=index25.js.map