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":"index25.js","sources":["../src/components/Dropdown/index.tsx"],"sourcesContent":["import React, { FC, useState, useRef, useEffect, useLayoutEffect } from 'react';\n\nimport { Popover, PopoverHandle } from 'src/components/Popover';\nimport { Icon } from 'components/Icon';\nimport { Checkbox } from '../Checkbox';\nimport { Button } from '../Button';\nimport { InputWithIcon } from '../InputWithIcon';\nimport { useStableId } from '../../utils/useStableId';\nimport { useCombobox } from '../../utils/a11y/useCombobox';\n\ntype DropdownValue = {\n [key: string]: any;\n};\n\ntype DropdownProps = {\n label?: string;\n firstOptionAsHeading?: boolean;\n ariaLabel?: string;\n ariaLabelledBy?: string;\n type: 'select' | 'multi-select';\n dropDownOptions?: DropdownValue[];\n defaultText?: string;\n selectBy?: string;\n optionsUniqueBy?: string;\n displaySelected?: boolean;\n defaultSelectedValue?: DropdownValue | DropdownValue[];\n customSelectedValue?: string;\n onOptionClick?: (selectedValue: DropdownValue) => void;\n style?: React.CSSProperties;\n renderOptionChip?: (option: DropdownValue, srcOption: boolean) => React.ReactNode;\n className?: string;\n iconColor?: string;\n disabled?: boolean;\n dropdownClassName?: string;\n hasError?: boolean;\n errorMessage?: string;\n onApply?: (selectedValue: DropdownValue[]) => void;\n onClear?: () => void;\n customDropdownContent?: () => React.ReactNode;\n isBorderless?: boolean;\n dropDownSrcAutomationId?: string;\n dropDownSelectAutomationId?: string;\n dropDownContentAutomationId?: string;\n shouldShowSearch?: boolean;\n showSearchIcon?: boolean;\n searchPlaceholder?: string;\n searchResultEmptyMessage?: string;\n /** Controlled selection — when provided, Dropdown won't manage internal selected state */\n selectedValue?: DropdownValue | DropdownValue[];\n /** Controlled open state — when provided, Dropdown won't manage internal open/close */\n isOpen?: boolean;\n /** Callback when open state changes (fires in both controlled and uncontrolled modes) */\n onOpenChange?: (isOpen: boolean) => void;\n /** Custom trigger element — replaces the default bordered div + chevron */\n renderSrcElement?: (props: { isOpen: boolean; selectedValue: DropdownValue[] }) => React.ReactNode;\n /** Render the dropdown panel in a portal (document.body) to escape overflow:hidden containers */\n isWithPortal?: boolean;\n /** Optional ref that will be populated with the Popover wrapper element on mount.\n * Use with setFocusAnchor() to return focus to the dropdown trigger after a modal closes. */\n popoverElementRef?: React.RefObject<HTMLElement | null>;\n};\n\nexport const Dropdown: FC<DropdownProps> = (props) => {\n const isControlledSelection = props.selectedValue !== undefined;\n const isControlledOpen = props.isOpen !== undefined;\n\n const [internalIsOpen, setInternalIsOpen] = useState(false);\n const [searchQuery, setSearchQuery] = useState('');\n const [internalSelectedValues, setInternalSelectedValues] = useState<DropdownValue[]>(() =>\n props?.defaultSelectedValue\n ? Array.isArray(props?.defaultSelectedValue)\n ? props?.defaultSelectedValue\n : [props.defaultSelectedValue]\n : []\n );\n const popoverRef = useRef<HTMLDivElement & PopoverHandle>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const labelId = useStableId(undefined, 'dropdown-label');\n const valueId = useStableId(undefined, 'dropdown-value');\n const listboxId = useStableId(undefined, 'dropdown-listbox');\n\n // Derived state: controlled props take precedence over internal state\n const isDropDownOpen = isControlledOpen ? props.isOpen! : internalIsOpen;\n const selectedDropDownValues = isControlledSelection\n ? (Array.isArray(props.selectedValue) ? props.selectedValue : props.selectedValue ? [props.selectedValue] : [])\n : internalSelectedValues;\n\n const setIsDropDownOpen = (value: boolean) => {\n if (!isControlledOpen) {\n setInternalIsOpen(value);\n }\n props.onOpenChange?.(value);\n };\n\n const setSelectedDropDownValues = (values: DropdownValue[]) => {\n if (!isControlledSelection) {\n setInternalSelectedValues(values);\n }\n };\n\n const {\n selectBy = '',\n optionsUniqueBy = '',\n displaySelected = false,\n dropDownOptions,\n defaultText = 'Select',\n iconColor = 'var(--color-gray-700)',\n disabled = false,\n dropdownClassName = '',\n hasError = false,\n errorMessage = '',\n customDropdownContent = null,\n isBorderless = false,\n shouldShowSearch = false,\n showSearchIcon = true,\n searchPlaceholder = 'Search...',\n searchResultEmptyMessage = 'No results found',\n ariaLabel = '',\n customSelectedValue = '',\n isWithPortal = false,\n firstOptionAsHeading = false\n } = props;\n\n useEffect(() => {\n if (!isControlledSelection) {\n const newValues = props?.defaultSelectedValue\n ? Array.isArray(props?.defaultSelectedValue)\n ? props?.defaultSelectedValue\n : [props.defaultSelectedValue]\n : [];\n setInternalSelectedValues(newValues);\n }\n }, [props?.defaultSelectedValue, isControlledSelection]);\n\n useEffect(() => {\n if (!isDropDownOpen) {\n setSearchQuery('');\n }\n }, [isDropDownOpen]);\n\n // Focus search input when dropdown opens with search enabled\n useEffect(() => {\n if (isDropDownOpen && shouldShowSearch && searchInputRef.current) {\n requestAnimationFrame(() => searchInputRef.current?.focus());\n }\n }, [isDropDownOpen, shouldShowSearch]);\n\n // Populate caller's popoverElementRef with the Popover wrapper element.\n // Runs after mount so popoverRef.current is set.\n useLayoutEffect(() => {\n if (props.popoverElementRef) {\n props.popoverElementRef.current = popoverRef.current?.element ?? null;\n }\n });\n\n const isMultiSelect = props?.type === 'multi-select';\n\n const getFilteredOptions = () => {\n if (!searchQuery.trim()) {\n return dropDownOptions || [];\n }\n return (dropDownOptions || []).filter((option) => {\n const optionValue = option?.[selectBy]?.toString().toLowerCase() || '';\n return optionValue.includes(searchQuery.toLowerCase());\n });\n };\n\n const handleDropDownOptionClick = (dropDownOption: any) => {\n setSelectedDropDownValues([dropDownOption]);\n setIsDropDownOpen(false);\n props?.onOptionClick?.(dropDownOption);\n // Restore focus to the trigger after portal unmounts.\n // Double rAF ensures this runs after React re-renders AND the focus trap safety net,\n // getting the final say on focus.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n popoverRef.current?.focusTrigger();\n });\n });\n };\n\n // Use useCombobox hook for keyboard navigation (only for single-select)\n const filteredOptions = getFilteredOptions();\n const {\n listboxProps,\n getOptionProps,\n highlightedIndex,\n setHighlightedIndex,\n containerProps: comboboxContainerProps,\n inputProps: comboboxInputProps\n } = useCombobox({\n items: isMultiSelect ? [] : filteredOptions, // Only use for single-select\n isOpen: isDropDownOpen && !isMultiSelect,\n onOpenChange: setIsDropDownOpen,\n onSelect: (item: DropdownValue) => {\n handleDropDownOptionClick(item);\n },\n listboxId,\n disabled: isMultiSelect || disabled,\n hasItems: filteredOptions.length > 0\n });\n\n // Second useCombobox for multi-select: provides ARIA props, keyboard navigation, and auto-scroll.\n // Enter/Space are intercepted in multiSelectOnKeyDown to avoid the hook's highlight reset after select.\n const {\n inputProps: multiSelectComboboxInputProps,\n listboxProps: multiSelectListboxProps,\n highlightedIndex: highlightedMultiSelectIndex,\n setHighlightedIndex: setHighlightedMultiSelectIndex\n } = useCombobox({\n items: isMultiSelect ? filteredOptions : [],\n isOpen: isDropDownOpen && isMultiSelect,\n onOpenChange: setIsDropDownOpen,\n onSelect: () => {},\n listboxId,\n disabled: !isMultiSelect,\n loop: false,\n hasItems: filteredOptions.length > 0\n });\n\n const getSelectedDropDownValue = (option: DropdownValue, isSrcOption: boolean = false) => {\n if (isMultiSelect) {\n return defaultText;\n }\n\n // if custom selected value is provided, use it instead of the option value\n if (isSrcOption && customSelectedValue) {\n return customSelectedValue;\n }\n\n return option?.[selectBy] || defaultText;\n };\n\n const clearSelectedDropDownValues = () => {\n setSelectedDropDownValues([]);\n props?.onClear?.();\n };\n\n const optionChip = (option: DropdownValue, srcOption: boolean = false) => {\n if (props?.renderOptionChip) {\n return props?.renderOptionChip(option, srcOption);\n }\n\n if (isMultiSelect && selectedDropDownValues?.length > 0) {\n const firstSelectedLabel = selectedDropDownValues[0]?.[selectBy] || '';\n const remainingCount = selectedDropDownValues.length - 1;\n\n // For multiple selections: text takes remaining space, count takes minimum space needed\n return (\n <div className={`option-chip flex items-center w-full`}>\n <div\n className={`${remainingCount > 0 ? 'w-full' : 'flex-1'} truncate`}\n >{`${defaultText}: ${firstSelectedLabel}`}</div>\n {remainingCount > 0 && <div className=\"flex-shrink-0\">+{remainingCount}</div>}\n </div>\n );\n }\n\n const selectedLabel = getSelectedDropDownValue(option, srcOption);\n const hasVisibleLabel = !!props?.label || !!props?.ariaLabelledBy;\n const showPrefix = srcOption && defaultText && option?.[selectBy] && !customSelectedValue && !hasVisibleLabel;\n\n return (\n <p className={`option-chip flex flex-1 items-center justify-between`}>\n {showPrefix ? `${defaultText}: ${selectedLabel}` : selectedLabel}\n </p>\n );\n };\n\n const renderSearchInput = (extraInputProps: Record<string, any>) => (\n <div className=\" w-full relative flex items-center border-b border-[var(--color-gray-300)]\">\n <InputWithIcon\n leftIcon={showSearchIcon ? { name: 'search', position: 'left', style: { color: 'var(--color-gray-500)' } } : undefined}\n value={searchQuery}\n onChange={(value) => setSearchQuery(value)}\n placeholder={searchPlaceholder}\n style={{ margin: 0, gap: 0 }}\n inputStyle={{ width: '100%', border: 'none', outline: 'none' }}\n automationId=\"se-design-dropdown-search\"\n ariaLabel={searchPlaceholder}\n inputRef={searchInputRef}\n inputProps={extraInputProps}\n />\n </div>\n );\n\n const renderSearchBar = () => {\n if (isMultiSelect) {\n return renderSearchInput({\n ...multiSelectComboboxInputProps,\n onKeyDown: (e: React.KeyboardEvent) => multiSelectOnKeyDown(e, true)\n });\n }\n\n // Single-select: wrap onKeyDown to add Escape → focusTrigger (portal-safe)\n return renderSearchInput({\n ...comboboxInputProps,\n onKeyDown: (e: React.KeyboardEvent) => {\n comboboxInputProps.onKeyDown(e);\n if (e.key === 'Escape') {\n requestAnimationFrame(() => popoverRef.current?.focusTrigger());\n }\n }\n });\n };\n\n const dropDownOptionJsx = (dropDownOption: DropdownValue, index: number) => {\n const optionTxt = dropDownOption[selectBy];\n const dropDownSelectedValue = selectedDropDownValues[0]?.[selectBy] || defaultText;\n const selectByUniqueId = optionsUniqueBy?.length\n ? dropDownOption[optionsUniqueBy] == selectedDropDownValues[0]?.[optionsUniqueBy]\n : true;\n const isOptionSelected = displaySelected && optionTxt === dropDownSelectedValue && selectByUniqueId;\n const isHighlighted = highlightedIndex === index;\n const optionProps = !isMultiSelect ? getOptionProps(index, isOptionSelected) : {};\n\n return (\n <div\n key={dropDownOption.id || dropDownOption.value}\n 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 ${\n isOptionSelected ? 'selected' : ''\n } ${isHighlighted ? 'bg-[var(--color-blue-50)]' : ''}`}\n onClick={() => handleDropDownOptionClick(dropDownOption)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleDropDownOptionClick(dropDownOption);\n } else if (e.key === 'Escape') {\n // Return focus to the Popover trigger on Escape, consistent with the search input path.\n // handlePopoverContentKeyDown in Popover also handles this but is unreliable for the\n // portal case because srcElementRef is not in the portal's DOM ancestry.\n requestAnimationFrame(() => popoverRef.current?.focusTrigger());\n }\n }}\n tabIndex={-1}\n data-automation-id={`dropdown-option-${dropDownOption?.automationId || index}`}\n {...optionProps}\n aria-selected={isOptionSelected ? 'true' : 'false'}\n >\n {optionChip({ ...dropDownOption, isOptionSelected }, false)}\n {isOptionSelected && <Icon name=\"checkmark\" stroke={iconColor} />}\n </div>\n );\n };\n\n const renderDropdownContents = () => {\n return (\n <>\n {props?.label && firstOptionAsHeading && (\n <div\n aria-hidden=\"true\"\n className=\"px-3 pt-2 pb-1 text-[var(--color-gray-650)] text-xs cursor-default select-none\"\n >\n {props.label}\n </div>\n )}\n <div\n className=\"dropdown-content dropdown-options\"\n aria-label={`${defaultText} options`}\n {...listboxProps}\n >\n {shouldShowSearch && renderSearchBar()}\n <div className=\"flex flex-col max-h-80 overflow-y-auto\">\n {filteredOptions.length > 0 ? (\n filteredOptions.map((dropDownOption, index) => dropDownOptionJsx(dropDownOption, index))\n ) : (\n <div\n className=\"px-3 py-4 text-center text-[var(--color-gray-700)] text-sm\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {searchResultEmptyMessage}\n </div>\n )}\n </div>\n </div>\n </>\n );\n };\n\n const handleMultiSelectDropdownOptionClick = (isSelected: boolean, dropDownOption: DropdownValue) => {\n let newSelectedDropDownValues: DropdownValue[] = [];\n if (isSelected) {\n newSelectedDropDownValues = [...selectedDropDownValues, dropDownOption];\n } else {\n newSelectedDropDownValues = selectedDropDownValues?.filter(\n (option) => option[optionsUniqueBy] !== dropDownOption[optionsUniqueBy]\n );\n }\n setSelectedDropDownValues(newSelectedDropDownValues);\n };\n\n const handleApplySelectedDropDownValues = () => {\n popoverRef.current?.togglePopover();\n props?.onApply?.(selectedDropDownValues);\n };\n\n // Wraps the multi-select useCombobox's onKeyDown.\n // - Intercepts Enter/Space to toggle selection without resetting the highlight\n // (the hook resets highlightedIndex to -1 after onSelect, which is wrong for multi-select).\n // - When isSearchInput is true, Space is left for typing.\n // - Adds focusTrigger on Escape (Popover's handler is unreliable for portals).\n const multiSelectOnKeyDown = (e: React.KeyboardEvent, isSearchInput: boolean = false) => {\n if (isSearchInput && e.key === ' ') return;\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (highlightedMultiSelectIndex >= 0 && highlightedMultiSelectIndex < filteredOptions.length) {\n const option = filteredOptions[highlightedMultiSelectIndex];\n const isSelected = selectedDropDownValues.some(\n (v) => v[optionsUniqueBy] === option[optionsUniqueBy]\n );\n handleMultiSelectDropdownOptionClick(!isSelected, option);\n }\n return;\n }\n\n multiSelectComboboxInputProps.onKeyDown(e);\n\n if (e.key === 'Escape') {\n e.stopPropagation();\n requestAnimationFrame(() => popoverRef.current?.focusTrigger());\n }\n };\n\n const multiSelectDropdownOptionJSX = (dropDownOption: DropdownValue, index: number) => {\n const isOptionSelected = selectedDropDownValues.some(\n (option) => option[optionsUniqueBy] === dropDownOption[optionsUniqueBy]\n );\n const optionId = `${listboxId}-option-${index}`;\n const isHighlighted = highlightedMultiSelectIndex === index;\n\n return (\n <div\n key={dropDownOption.id || dropDownOption.value}\n id={optionId}\n role=\"option\"\n aria-selected={isOptionSelected}\n 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 ${\n isHighlighted ? 'bg-[var(--color-blue-50)]' : ''\n }`}\n onClick={() => handleMultiSelectDropdownOptionClick(!isOptionSelected, dropDownOption)}\n data-automation-id={`dropdown-option-${dropDownOption?.automationId || index}`}\n >\n <Checkbox\n tabIndex={-1}\n ariaHidden\n checked={isOptionSelected}\n onChange={() => {}}\n />\n <span className=\"checkbox-label\">{dropDownOption?.label}</span>\n </div>\n );\n };\n\n const renderMultiSelectDropdownContents = () => {\n return (\n <div\n className=\"dropdown-content dropdown-options\"\n onKeyDown={(e) => {\n // Stop all Tab events from reaching Popover's handlePopoverContentKeyDown (which closes on Tab).\n // Forward Tab: search → Clear → Apply → focus exits → useDismissOnFocusOut closes.\n // Shift+Tab: Apply → Clear → search → trigger.\n if (e.key === 'Tab') {\n e.stopPropagation();\n }\n }}\n >\n {shouldShowSearch && renderSearchBar()}\n <div\n {...multiSelectListboxProps}\n aria-label={`${defaultText} options`}\n aria-multiselectable=\"true\"\n style={{ outline: 'none' }}\n {...(!shouldShowSearch ? {\n tabIndex: -1,\n 'aria-activedescendant': multiSelectComboboxInputProps['aria-activedescendant'],\n onKeyDown: (e: React.KeyboardEvent) => multiSelectOnKeyDown(e, false),\n onFocus: () => {\n if (highlightedMultiSelectIndex === -1 && filteredOptions.length > 0) {\n setHighlightedMultiSelectIndex(0);\n }\n }\n } : {})}\n >\n <div className=\"flex flex-col max-h-80 overflow-y-auto\">\n {filteredOptions.length > 0 ? (\n filteredOptions.map((dropDownOption, index) => multiSelectDropdownOptionJSX(dropDownOption, index))\n ) : (\n <div\n className=\"px-3 py-4 text-center text-[var(--color-gray-700)] text-sm\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {searchResultEmptyMessage}\n </div>\n )}\n </div>\n </div>\n <div\n className=\"flex items-center justify-end gap-4 p-3 border-t border-[var(--color-gray-200)]\"\n onKeyDown={(e) => {\n if (e.key === 'Tab' && e.shiftKey) {\n e.preventDefault();\n e.stopPropagation();\n if (shouldShowSearch) {\n searchInputRef.current?.focus();\n } else {\n multiSelectListboxProps.ref.current?.focus();\n }\n }\n }}\n >\n <Button label=\"Clear\" type=\"link\" size=\"sm\" onClick={clearSelectedDropDownValues} automationId=\"se-design-dropdown-clear-button\" />\n <Button label=\"Apply\" type=\"primary\" size=\"sm\" onClick={handleApplySelectedDropDownValues} automationId=\"se-design-dropdown-apply-button\" />\n </div>\n </div>\n );\n };\n\n const renderDropdownSelect = () => {\n const borderColor = isDropDownOpen\n ? 'border-[var(--color-blue-500)]'\n : disabled\n ? 'border-[var(--color-gray-300)]'\n : 'border-[var(--color-gray-600)]';\n const errorBorderColor = hasError ? 'border-[var(--color-red-500)]' : '';\n const dropDownSelectClass = `dropdown-src-element bg-[var(--color-white)] flex px-3 py-2 ${\n isBorderless ? 'border-0' : `border rounded-md ${errorBorderColor ? errorBorderColor : borderColor}`\n } flex items-center ${dropdownClassName}`;\n\n return (\n <div className={dropDownSelectClass}>\n <div\n id={valueId}\n className=\"flex-1 min-w-0\"\n data-automation-id={props?.dropDownSelectAutomationId || 'selected-dropdown-value'}\n >\n {optionChip(selectedDropDownValues[0], true)}\n </div>\n <div className=\"flex-shrink-0 ml-2\" aria-hidden=\"true\">\n <Icon\n name={'chevron'}\n rotation={isDropDownOpen ? '180' : '0'}\n className={`transition-transform`}\n stroke={iconColor}\n />\n </div>\n </div>\n );\n };\n\n const getDropdownAriaLabel = () => {\n const selectedLabel = selectedDropDownValues[0]?.[selectBy];\n if (ariaLabel && selectedLabel) {\n return `${ariaLabel}, ${selectedLabel}`;\n }\n return ariaLabel || defaultText || 'Select option';\n };\n\n // Trigger is always a button that reveals a listbox popup (Select/Listbox pattern).\n // For search-enabled dropdowns, the combobox role lives on the search input inside the popup.\n // This matches React Aria (useSelect), Radix (Select), and Headless UI (Listbox) — all use\n // role=\"button\" with real focus on options, separate from their Combobox components.\n const triggerSourceRole = 'button';\n\n // Trigger is always role=\"button\" — combobox ARIA (aria-activedescendant etc.)\n // lives on the search input inside the popup, not on the trigger.\n // Trigger only needs aria-haspopup + aria-expanded (Popover handles) + aria-controls.\n\n return (\n <div\n className={`se-design-dropdown-container${props?.className ? ` ${props?.className}` : ''}`}\n style={props?.style}\n >\n {props?.label ? (\n <div id={labelId} className={`se-design-dropdown-label ${firstOptionAsHeading ? 'sr-only' : 'mb-[3px] text-[var(--color-gray-700)] text-sm'}`}>\n {props?.label}\n </div>\n ) : !props?.ariaLabelledBy && ariaLabel ? (\n <span id={labelId} className=\"sr-only\">{ariaLabel}</span>\n ) : null}\n <div\n style={props?.style}\n className={`${disabled ? 'bg-[var(--color-gray-50)] rounded-md cursor-not-allowed' : ''}`}\n {...(!isMultiSelect ? {\n ...comboboxContainerProps,\n // Portal content lives in document.body — focus moving into it looks like \"focus out\" to\n // the container's blur handler, causing immediate close. Suppress it; the Popover's own\n // onBlur handler checks both source and portal content and handles dismissal correctly.\n ...(isWithPortal ? { onBlurCapture: undefined } : {})\n } : {})}\n >\n <Popover\n ref={popoverRef}\n isPopoverOpen={isDropDownOpen}\n isWithPortal={isWithPortal}\n renderPopoverContents={\n customDropdownContent\n ? customDropdownContent\n : isMultiSelect\n ? renderMultiSelectDropdownContents\n : renderDropdownContents\n }\n contentWidth={'full'}\n renderPopoverSrcElement={\n props.renderSrcElement\n ? () => props.renderSrcElement!({ isOpen: isDropDownOpen, selectedValue: selectedDropDownValues })\n : renderDropdownSelect\n }\n onPopoverToggle={(value) => {\n setIsDropDownOpen(value);\n if (value && !isMultiSelect && selectedDropDownValues.length > 0) {\n // Highlight the currently selected option when the dropdown opens (APG Select pattern)\n const selectedIndex = filteredOptions.findIndex(\n (option) => optionsUniqueBy\n ? option[optionsUniqueBy] === selectedDropDownValues[0]?.[optionsUniqueBy]\n : option[selectBy] === selectedDropDownValues[0]?.[selectBy]\n );\n if (selectedIndex >= 0) {\n setHighlightedIndex(selectedIndex);\n }\n }\n if (value && isMultiSelect && !shouldShowSearch) {\n // Focus listbox after Popover's own focus-first-on-open (setTimeout 0ms) has fired.\n // Using nested requestAnimationFrame ensures we run after both the Popover timeout\n // and any pending paint, so the listbox DOM is ready and we get the last word on focus.\n requestAnimationFrame(() => requestAnimationFrame(() => multiSelectListboxProps.ref.current?.focus()));\n }\n // When search is enabled, Popover's focus-first-on-open naturally finds the search input.\n }}\n disabled={disabled}\n automationId={props?.dropDownSrcAutomationId}\n popoverContentAutomationId={props?.dropDownContentAutomationId}\n ariaLabelledBy={\n props?.label || props?.ariaLabelledBy || ariaLabel\n ? [props?.label || (!props?.ariaLabelledBy && ariaLabel) ? labelId : props?.ariaLabelledBy, valueId].filter(Boolean).join(' ')\n : undefined\n }\n ariaLabel={!props?.label && !ariaLabel && !props?.ariaLabelledBy ? getDropdownAriaLabel() : undefined}\n sourceRole={triggerSourceRole}\n {...{ 'aria-haspopup': 'listbox' }}\n {...(isDropDownOpen ? { 'aria-controls': listboxId } : {})}\n />\n </div>\n {hasError && <div className=\"text-[var(--color-red-500)] text-sm\">{errorMessage}</div>}\n </div>\n );\n};\n"],"names":["Dropdown","props","isControlledSelection","selectedValue","undefined","isControlledOpen","isOpen","internalIsOpen","setInternalIsOpen","useState","searchQuery","setSearchQuery","internalSelectedValues","setInternalSelectedValues","defaultSelectedValue","Array","isArray","popoverRef","useRef","searchInputRef","labelId","useStableId","valueId","listboxId","isDropDownOpen","selectedDropDownValues","setIsDropDownOpen","value","onOpenChange","setSelectedDropDownValues","values","selectBy","optionsUniqueBy","displaySelected","dropDownOptions","defaultText","iconColor","disabled","dropdownClassName","hasError","errorMessage","customDropdownContent","isBorderless","shouldShowSearch","showSearchIcon","searchPlaceholder","searchResultEmptyMessage","ariaLabel","customSelectedValue","isWithPortal","firstOptionAsHeading","useEffect","newValues","current","requestAnimationFrame","focus","useLayoutEffect","popoverElementRef","element","isMultiSelect","type","getFilteredOptions","trim","filter","option","toString","toLowerCase","includes","handleDropDownOptionClick","dropDownOption","onOptionClick","focusTrigger","filteredOptions","listboxProps","getOptionProps","highlightedIndex","setHighlightedIndex","containerProps","comboboxContainerProps","inputProps","comboboxInputProps","useCombobox","items","onSelect","item","hasItems","length","multiSelectComboboxInputProps","multiSelectListboxProps","highlightedMultiSelectIndex","setHighlightedMultiSelectIndex","loop","getSelectedDropDownValue","isSrcOption","clearSelectedDropDownValues","onClear","optionChip","srcOption","renderOptionChip","firstSelectedLabel","remainingCount","React","createElement","className","selectedLabel","hasVisibleLabel","label","ariaLabelledBy","showPrefix","renderSearchInput","extraInputProps","InputWithIcon","leftIcon","name","position","style","color","onChange","placeholder","margin","gap","inputStyle","width","border","outline","automationId","inputRef","renderSearchBar","onKeyDown","e","multiSelectOnKeyDown","key","dropDownOptionJsx","index","optionTxt","dropDownSelectedValue","selectByUniqueId","isOptionSelected","isHighlighted","optionProps","_extends","id","onClick","preventDefault","tabIndex","Icon","stroke","renderDropdownContents","Fragment","map","role","handleMultiSelectDropdownOptionClick","isSelected","newSelectedDropDownValues","handleApplySelectedDropDownValues","togglePopover","onApply","isSearchInput","some","v","stopPropagation","multiSelectDropdownOptionJSX","optionId","Checkbox","ariaHidden","checked","renderMultiSelectDropdownContents","onFocus","shiftKey","ref","Button","size","renderDropdownSelect","borderColor","errorBorderColor","dropDownSelectClass","dropDownSelectAutomationId","rotation","getDropdownAriaLabel","onBlurCapture","Popover","isPopoverOpen","renderPopoverContents","contentWidth","renderPopoverSrcElement","renderSrcElement","onPopoverToggle","selectedIndex","findIndex","dropDownSrcAutomationId","popoverContentAutomationId","dropDownContentAutomationId","Boolean","join","sourceRole"],"mappings":";;;;;;;;;;;;;;;;;AA8DO,MAAMA,KAA+BC,CAAAA,MAAU;AACpD,QAAMC,IAAwBD,EAAME,kBAAkBC,QAChDC,IAAmBJ,EAAMK,WAAWF,QAEpC,CAACG,GAAgBC,EAAiB,IAAIC,EAAS,EAAK,GACpD,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAE,GAC3C,CAACG,IAAwBC,CAAyB,IAAIJ,EAA0B,MACpFR,GAAOa,uBACHC,MAAMC,QAAQf,GAAOa,oBAAoB,IACvCb,GAAOa,uBACP,CAACb,EAAMa,oBAAoB,IAC7B,EACN,GACMG,IAAaC,GAAuC,IAAI,GACxDC,IAAiBD,GAAyB,IAAI,GAC9CE,IAAUC,EAAYjB,QAAW,gBAAgB,GACjDkB,IAAUD,EAAYjB,QAAW,gBAAgB,GACjDmB,IAAYF,EAAYjB,QAAW,kBAAkB,GAGrDoB,IAAiBnB,IAAmBJ,EAAMK,SAAUC,GACpDkB,IAAyBvB,IAC1Ba,MAAMC,QAAQf,EAAME,aAAa,IAAIF,EAAME,gBAAgBF,EAAME,gBAAgB,CAACF,EAAME,aAAa,IAAI,CAAA,IAC1GS,IAEEc,IAAoBA,CAACC,MAAmB;AAC5C,IAAKtB,KACHG,GAAkBmB,CAAK,GAEzB1B,EAAM2B,eAAeD,CAAK;AAAA,EAC5B,GAEME,IAA4BA,CAACC,MAA4B;AAC7D,IAAK5B,KACHW,EAA0BiB,CAAM;A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D,IACrC,CAAC9C,GAAOyG,SAAU,CAACzG,GAAO0G,kBAAkB5D,IAAa3B,IAAUnB,GAAO0G,gBAAgBrF,CAAO,EAAEyC,OAAOiI,OAAO,EAAEC,KAAK,GAAG,IAC3H7L;AAAAA,IAEN2C,WAAW,CAAC9C,GAAOyG,SAAS,CAAC3D,KAAa,CAAC9C,GAAO0G,iBAAiBuE,GAAAA,IAAyB9K;AAAAA,IAC5F8L,YA5EkB;AAAA,IA6EZ,iBAAiB;AAAA,EAAA,GAClB1K,IAAiB;AAAA,IAAE,iBAAiBD;AAAAA,EAAAA,IAAc,CAAA,CAAE,CAC1D,CACE,GACJgB,KAAY8D,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,EAAA,GAAuC/D,EAAkB,CAClF;AAET;"}
1
+ {"version":3,"file":"index25.js","sources":["../src/components/Dropdown/index.tsx"],"sourcesContent":["import React, { FC, useState, useRef, useEffect, useLayoutEffect } from 'react';\n\nimport { Popover, PopoverHandle } from 'src/components/Popover';\nimport { Icon } from 'components/Icon';\nimport { Checkbox } from '../Checkbox';\nimport { Button } from '../Button';\nimport { InputWithIcon } from '../InputWithIcon';\nimport { useStableId } from '../../utils/useStableId';\nimport { useCombobox } from '../../utils/a11y/useCombobox';\n\ntype DropdownValue = {\n [key: string]: any;\n};\n\ntype DropdownProps = {\n label?: string;\n firstOptionAsHeading?: boolean;\n ariaLabel?: string;\n ariaLabelledBy?: string;\n type: 'select' | 'multi-select';\n dropDownOptions?: DropdownValue[];\n defaultText?: string;\n selectBy?: string;\n optionsUniqueBy?: string;\n displaySelected?: boolean;\n defaultSelectedValue?: DropdownValue | DropdownValue[];\n customSelectedValue?: string;\n onOptionClick?: (selectedValue: DropdownValue) => void;\n style?: React.CSSProperties;\n renderOptionChip?: (option: DropdownValue, srcOption: boolean) => React.ReactNode;\n className?: string;\n iconColor?: string;\n disabled?: boolean;\n dropdownClassName?: string;\n hasError?: boolean;\n errorMessage?: string;\n onApply?: (selectedValue: DropdownValue[]) => void;\n onClear?: () => void;\n customDropdownContent?: () => React.ReactNode;\n isBorderless?: boolean;\n dropDownSrcAutomationId?: string;\n dropDownSelectAutomationId?: string;\n dropDownContentAutomationId?: string;\n shouldShowSearch?: boolean;\n showSearchIcon?: boolean;\n searchPlaceholder?: string;\n searchResultEmptyMessage?: string;\n /** Controlled selection — when provided, Dropdown won't manage internal selected state */\n selectedValue?: DropdownValue | DropdownValue[];\n /** Controlled open state — when provided, Dropdown won't manage internal open/close */\n isOpen?: boolean;\n /** Callback when open state changes (fires in both controlled and uncontrolled modes) */\n onOpenChange?: (isOpen: boolean) => void;\n /** Custom trigger element — replaces the default bordered div + chevron */\n renderSrcElement?: (props: { isOpen: boolean; selectedValue: DropdownValue[] }) => React.ReactNode;\n /** Render the dropdown panel in a portal (document.body) to escape overflow:hidden containers */\n isWithPortal?: boolean;\n /** Optional ref that will be populated with the Popover wrapper element on mount.\n * Use with setFocusAnchor() to return focus to the dropdown trigger after a modal closes. */\n popoverElementRef?: React.RefObject<HTMLElement | null>;\n /** Inline styles forwarded to the Popover content (portal or inline). Useful for min-width overrides. */\n popoverContentStyleProperty?: React.CSSProperties;\n};\n\nexport const Dropdown: FC<DropdownProps> = (props) => {\n const isControlledSelection = props.selectedValue !== undefined;\n const isControlledOpen = props.isOpen !== undefined;\n\n const [internalIsOpen, setInternalIsOpen] = useState(false);\n const [searchQuery, setSearchQuery] = useState('');\n const [internalSelectedValues, setInternalSelectedValues] = useState<DropdownValue[]>(() =>\n props?.defaultSelectedValue\n ? Array.isArray(props?.defaultSelectedValue)\n ? props?.defaultSelectedValue\n : [props.defaultSelectedValue]\n : []\n );\n const popoverRef = useRef<HTMLDivElement & PopoverHandle>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const labelId = useStableId(undefined, 'dropdown-label');\n const valueId = useStableId(undefined, 'dropdown-value');\n const listboxId = useStableId(undefined, 'dropdown-listbox');\n\n // Derived state: controlled props take precedence over internal state\n const isDropDownOpen = isControlledOpen ? props.isOpen! : internalIsOpen;\n const selectedDropDownValues = isControlledSelection\n ? (Array.isArray(props.selectedValue) ? props.selectedValue : props.selectedValue ? [props.selectedValue] : [])\n : internalSelectedValues;\n\n const setIsDropDownOpen = (value: boolean) => {\n if (!isControlledOpen) {\n setInternalIsOpen(value);\n }\n props.onOpenChange?.(value);\n };\n\n const setSelectedDropDownValues = (values: DropdownValue[]) => {\n if (!isControlledSelection) {\n setInternalSelectedValues(values);\n }\n };\n\n const {\n selectBy = '',\n optionsUniqueBy = '',\n displaySelected = false,\n dropDownOptions,\n defaultText = 'Select',\n iconColor = 'var(--color-gray-700)',\n disabled = false,\n dropdownClassName = '',\n hasError = false,\n errorMessage = '',\n customDropdownContent = null,\n isBorderless = false,\n shouldShowSearch = false,\n showSearchIcon = true,\n searchPlaceholder = 'Search...',\n searchResultEmptyMessage = 'No results found',\n ariaLabel = '',\n customSelectedValue = '',\n isWithPortal = false,\n firstOptionAsHeading = false\n } = props;\n\n useEffect(() => {\n if (!isControlledSelection) {\n const newValues = props?.defaultSelectedValue\n ? Array.isArray(props?.defaultSelectedValue)\n ? props?.defaultSelectedValue\n : [props.defaultSelectedValue]\n : [];\n setInternalSelectedValues(newValues);\n }\n }, [props?.defaultSelectedValue, isControlledSelection]);\n\n useEffect(() => {\n if (!isDropDownOpen) {\n setSearchQuery('');\n }\n }, [isDropDownOpen]);\n\n // Focus search input when dropdown opens with search enabled\n useEffect(() => {\n if (isDropDownOpen && shouldShowSearch && searchInputRef.current) {\n requestAnimationFrame(() => searchInputRef.current?.focus());\n }\n }, [isDropDownOpen, shouldShowSearch]);\n\n // Populate caller's popoverElementRef with the Popover wrapper element.\n // Runs after mount so popoverRef.current is set.\n useLayoutEffect(() => {\n if (props.popoverElementRef) {\n props.popoverElementRef.current = popoverRef.current?.element ?? null;\n }\n });\n\n const isMultiSelect = props?.type === 'multi-select';\n\n const getFilteredOptions = () => {\n if (!searchQuery.trim()) {\n return dropDownOptions || [];\n }\n return (dropDownOptions || []).filter((option) => {\n const optionValue = option?.[selectBy]?.toString().toLowerCase() || '';\n return optionValue.includes(searchQuery.toLowerCase());\n });\n };\n\n const handleDropDownOptionClick = (dropDownOption: any) => {\n setSelectedDropDownValues([dropDownOption]);\n setIsDropDownOpen(false);\n props?.onOptionClick?.(dropDownOption);\n // Restore focus to the trigger after portal unmounts.\n // Double rAF ensures this runs after React re-renders AND the focus trap safety net,\n // getting the final say on focus.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n popoverRef.current?.focusTrigger();\n });\n });\n };\n\n // Use useCombobox hook for keyboard navigation (only for single-select)\n const filteredOptions = getFilteredOptions();\n const {\n listboxProps,\n getOptionProps,\n highlightedIndex,\n setHighlightedIndex,\n containerProps: comboboxContainerProps,\n inputProps: comboboxInputProps,\n isKeyboardFocused: isSingleSelectKeyboardFocused\n } = useCombobox({\n items: isMultiSelect ? [] : filteredOptions, // Only use for single-select\n isOpen: isDropDownOpen && !isMultiSelect,\n onOpenChange: setIsDropDownOpen,\n onSelect: (item: DropdownValue) => {\n handleDropDownOptionClick(item);\n },\n listboxId,\n disabled: isMultiSelect || disabled,\n hasItems: filteredOptions.length > 0\n });\n\n // Second useCombobox for multi-select: provides ARIA props, keyboard navigation, and auto-scroll.\n // Enter/Space are intercepted in multiSelectOnKeyDown to avoid the hook's highlight reset after select.\n const {\n inputProps: multiSelectComboboxInputProps,\n listboxProps: multiSelectListboxProps,\n containerProps: multiSelectContainerProps,\n highlightedIndex: highlightedMultiSelectIndex,\n setHighlightedIndex: setHighlightedMultiSelectIndex,\n isKeyboardFocused: isMultiSelectKeyboardFocused\n } = useCombobox({\n items: isMultiSelect ? filteredOptions : [],\n isOpen: isDropDownOpen && isMultiSelect,\n onOpenChange: setIsDropDownOpen,\n onSelect: () => {},\n listboxId,\n disabled: !isMultiSelect,\n loop: false,\n hasItems: filteredOptions.length > 0,\n closeOnTab: false\n });\n\n const getSelectedDropDownValue = (option: DropdownValue, isSrcOption: boolean = false) => {\n if (isMultiSelect) {\n return defaultText;\n }\n\n // if custom selected value is provided, use it instead of the option value\n if (isSrcOption && customSelectedValue) {\n return customSelectedValue;\n }\n\n return option?.[selectBy] || defaultText;\n };\n\n const clearSelectedDropDownValues = () => {\n setSelectedDropDownValues([]);\n props?.onClear?.();\n };\n\n const optionChip = (option: DropdownValue, srcOption: boolean = false) => {\n if (props?.renderOptionChip) {\n return props?.renderOptionChip(option, srcOption);\n }\n\n if (isMultiSelect && selectedDropDownValues?.length > 0) {\n const firstSelectedLabel = selectedDropDownValues[0]?.[selectBy] || '';\n const remainingCount = selectedDropDownValues.length - 1;\n\n // For multiple selections: text takes remaining space, count takes minimum space needed\n return (\n <div className={`option-chip flex items-center w-full`}>\n <div\n className={`${remainingCount > 0 ? 'w-full' : 'flex-1'} truncate`}\n >{`${defaultText}: ${firstSelectedLabel}`}</div>\n {remainingCount > 0 && <div className=\"flex-shrink-0\">+{remainingCount}</div>}\n </div>\n );\n }\n\n const selectedLabel = getSelectedDropDownValue(option, srcOption);\n const hasVisibleLabel = !!props?.label || !!props?.ariaLabelledBy;\n const showPrefix = srcOption && defaultText && option?.[selectBy] && !customSelectedValue && !hasVisibleLabel;\n\n return (\n <p className={`option-chip flex flex-1 items-center justify-between`}>\n {showPrefix ? `${defaultText}: ${selectedLabel}` : selectedLabel}\n </p>\n );\n };\n\n const renderSearchInput = (extraInputProps: Record<string, any>) => (\n <div className=\" w-full relative flex items-center border-b border-[var(--color-gray-300)]\">\n <InputWithIcon\n leftIcon={showSearchIcon ? { name: 'search', position: 'left', style: { color: 'var(--color-gray-500)' } } : undefined}\n value={searchQuery}\n onChange={(value) => setSearchQuery(value)}\n placeholder={searchPlaceholder}\n style={{ margin: 0, gap: 0 }}\n inputStyle={{ width: '100%', border: 'none', outline: 'none' }}\n automationId=\"se-design-dropdown-search\"\n ariaLabel={searchPlaceholder}\n inputRef={searchInputRef}\n inputProps={extraInputProps}\n />\n </div>\n );\n\n const renderSearchBar = () => {\n if (isMultiSelect) {\n return renderSearchInput({\n ...multiSelectComboboxInputProps,\n onKeyDown: (e: React.KeyboardEvent) => multiSelectOnKeyDown(e, true)\n });\n }\n\n // Single-select: wrap onKeyDown to add Escape → focusTrigger (portal-safe)\n return renderSearchInput({\n ...comboboxInputProps,\n onKeyDown: (e: React.KeyboardEvent) => {\n comboboxInputProps.onKeyDown(e);\n if (e.key === 'Escape') {\n requestAnimationFrame(() => popoverRef.current?.focusTrigger());\n }\n }\n });\n };\n\n const dropDownOptionJsx = (dropDownOption: DropdownValue, index: number) => {\n const optionTxt = dropDownOption[selectBy];\n const dropDownSelectedValue = selectedDropDownValues[0]?.[selectBy] || defaultText;\n const selectByUniqueId = optionsUniqueBy?.length\n ? dropDownOption[optionsUniqueBy] == selectedDropDownValues[0]?.[optionsUniqueBy]\n : true;\n const isOptionSelected = displaySelected && optionTxt === dropDownSelectedValue && selectByUniqueId;\n const isHighlighted = highlightedIndex === index;\n const optionProps = !isMultiSelect ? getOptionProps(index, isOptionSelected) : {};\n\n return (\n <div\n key={dropDownOption.id || dropDownOption.value}\n 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 ${\n isOptionSelected ? 'selected' : ''\n } ${isHighlighted ? `bg-[var(--color-gray-100)]${isSingleSelectKeyboardFocused ? ' outline outline-[length:var(--focus-width)] -outline-offset-2 outline-[var(--focus-color)]' : ''}` : ''}`}\n onClick={() => handleDropDownOptionClick(dropDownOption)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleDropDownOptionClick(dropDownOption);\n } else if (e.key === 'Escape') {\n // Return focus to the Popover trigger on Escape, consistent with the search input path.\n // handlePopoverContentKeyDown in Popover also handles this but is unreliable for the\n // portal case because srcElementRef is not in the portal's DOM ancestry.\n requestAnimationFrame(() => popoverRef.current?.focusTrigger());\n }\n }}\n tabIndex={-1}\n data-automation-id={`dropdown-option-${dropDownOption?.automationId || index}`}\n {...optionProps}\n aria-selected={isOptionSelected ? 'true' : 'false'}\n >\n {optionChip({ ...dropDownOption, isOptionSelected }, false)}\n {isOptionSelected && <Icon name=\"checkmark\" stroke={iconColor} />}\n </div>\n );\n };\n\n const renderDropdownContents = () => {\n return (\n <>\n {props?.label && firstOptionAsHeading && (\n <div\n aria-hidden=\"true\"\n className=\"px-3 pt-2 pb-1 text-[var(--color-gray-650)] text-xs cursor-default select-none\"\n >\n {props.label}\n </div>\n )}\n {shouldShowSearch && renderSearchBar()}\n <div\n className=\"dropdown-content dropdown-options\"\n aria-label={`${defaultText} options`}\n {...listboxProps}\n >\n <div className=\"flex flex-col max-h-80 overflow-y-auto\">\n {filteredOptions.length > 0 ? (\n filteredOptions.map((dropDownOption, index) => dropDownOptionJsx(dropDownOption, index))\n ) : (\n <div\n className=\"px-3 py-4 text-center text-[var(--color-gray-700)] text-sm\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {searchResultEmptyMessage}\n </div>\n )}\n </div>\n </div>\n </>\n );\n };\n\n const handleMultiSelectDropdownOptionClick = (isSelected: boolean, dropDownOption: DropdownValue) => {\n let newSelectedDropDownValues: DropdownValue[] = [];\n if (isSelected) {\n newSelectedDropDownValues = [...selectedDropDownValues, dropDownOption];\n } else {\n newSelectedDropDownValues = selectedDropDownValues?.filter(\n (option) => option[optionsUniqueBy] !== dropDownOption[optionsUniqueBy]\n );\n }\n setSelectedDropDownValues(newSelectedDropDownValues);\n };\n\n const handleApplySelectedDropDownValues = () => {\n popoverRef.current?.togglePopover();\n props?.onApply?.(selectedDropDownValues);\n };\n\n // Wraps the multi-select useCombobox's onKeyDown.\n // - Intercepts Enter/Space to toggle selection without resetting the highlight\n // (the hook resets highlightedIndex to -1 after onSelect, which is wrong for multi-select).\n // - When isSearchInput is true, Space is left for typing.\n // - Adds focusTrigger on Escape (Popover's handler is unreliable for portals).\n const multiSelectOnKeyDown = (e: React.KeyboardEvent, isSearchInput: boolean = false) => {\n if (isSearchInput && e.key === ' ') return;\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (highlightedMultiSelectIndex >= 0 && highlightedMultiSelectIndex < filteredOptions.length) {\n const option = filteredOptions[highlightedMultiSelectIndex];\n const isSelected = selectedDropDownValues.some(\n (v) => v[optionsUniqueBy] === option[optionsUniqueBy]\n );\n handleMultiSelectDropdownOptionClick(!isSelected, option);\n }\n return;\n }\n\n multiSelectComboboxInputProps.onKeyDown(e);\n\n if (e.key === 'Escape') {\n e.stopPropagation();\n requestAnimationFrame(() => popoverRef.current?.focusTrigger());\n }\n };\n\n const multiSelectDropdownOptionJSX = (dropDownOption: DropdownValue, index: number) => {\n const isOptionSelected = selectedDropDownValues.some(\n (option) => option[optionsUniqueBy] === dropDownOption[optionsUniqueBy]\n );\n const optionId = `${listboxId}-option-${index}`;\n const isHighlighted = highlightedMultiSelectIndex === index;\n\n return (\n <div\n key={dropDownOption.id || dropDownOption.value}\n id={optionId}\n role=\"option\"\n aria-selected={isOptionSelected}\n 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 ${\n isHighlighted ? `bg-[var(--color-gray-100)]${isMultiSelectKeyboardFocused ? ' outline outline-[length:var(--focus-width)] -outline-offset-2 outline-[var(--focus-color)]' : ''}` : ''\n }`}\n onClick={() => handleMultiSelectDropdownOptionClick(!isOptionSelected, dropDownOption)}\n data-automation-id={`dropdown-option-${dropDownOption?.automationId || index}`}\n >\n <Checkbox\n tabIndex={-1}\n ariaHidden\n checked={isOptionSelected}\n onChange={() => {}}\n className=\"pointer-events-none\"\n />\n <span className=\"checkbox-label\">{dropDownOption?.label}</span>\n </div>\n );\n };\n\n const renderMultiSelectDropdownContents = () => {\n return (\n <div\n className=\"dropdown-content dropdown-options\"\n onKeyDown={(e) => {\n // Stop all Tab events from reaching Popover's handlePopoverContentKeyDown (which closes on Tab).\n // Forward Tab: search → Clear → Apply → focus exits → useDismissOnFocusOut closes.\n // Shift+Tab: Apply → Clear → search → trigger.\n if (e.key === 'Tab') {\n e.stopPropagation();\n }\n }}\n >\n {shouldShowSearch && renderSearchBar()}\n <div\n {...multiSelectListboxProps}\n aria-label={`${defaultText} options`}\n aria-multiselectable=\"true\"\n style={{ outline: 'none' }}\n {...(!shouldShowSearch ? {\n tabIndex: -1,\n 'aria-activedescendant': multiSelectComboboxInputProps['aria-activedescendant'],\n onKeyDown: (e: React.KeyboardEvent) => multiSelectOnKeyDown(e, false),\n onFocus: () => {\n if (highlightedMultiSelectIndex === -1 && filteredOptions.length > 0) {\n setHighlightedMultiSelectIndex(0);\n }\n }\n } : {})}\n >\n <div className=\"flex flex-col max-h-80 overflow-y-auto\">\n {filteredOptions.length > 0 ? (\n filteredOptions.map((dropDownOption, index) => multiSelectDropdownOptionJSX(dropDownOption, index))\n ) : (\n <div\n className=\"px-3 py-4 text-center text-[var(--color-gray-700)] text-sm\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {searchResultEmptyMessage}\n </div>\n )}\n </div>\n </div>\n <div\n className=\"flex items-center justify-end gap-4 p-3 border-t border-[var(--color-gray-200)]\"\n onKeyDown={(e) => {\n if (e.key === 'Tab' && e.shiftKey) {\n e.preventDefault();\n e.stopPropagation();\n if (shouldShowSearch) {\n searchInputRef.current?.focus();\n } else {\n multiSelectListboxProps.ref.current?.focus();\n }\n }\n }}\n >\n <Button label=\"Clear\" type=\"link\" size=\"sm\" onClick={clearSelectedDropDownValues} automationId=\"se-design-dropdown-clear-button\" />\n <Button label=\"Apply\" type=\"primary\" size=\"sm\" onClick={handleApplySelectedDropDownValues} automationId=\"se-design-dropdown-apply-button\" />\n </div>\n </div>\n );\n };\n\n const renderDropdownSelect = () => {\n const borderColor = isDropDownOpen\n ? 'border-[var(--color-blue-500)]'\n : disabled\n ? 'border-[var(--color-gray-300)]'\n : 'border-[var(--color-gray-600)]';\n const errorBorderColor = hasError ? 'border-[var(--color-red-500)]' : '';\n const dropDownSelectClass = `dropdown-src-element bg-[var(--color-white)] flex px-3 py-2 ${\n isBorderless ? 'border-0' : `border rounded-md ${errorBorderColor ? errorBorderColor : borderColor}`\n } flex items-center ${dropdownClassName}`;\n\n return (\n <div className={dropDownSelectClass}>\n <div\n id={valueId}\n className=\"flex-1 min-w-0\"\n data-automation-id={props?.dropDownSelectAutomationId || 'selected-dropdown-value'}\n >\n {optionChip(selectedDropDownValues[0], true)}\n </div>\n <div className=\"flex-shrink-0 ml-2\" aria-hidden=\"true\">\n <Icon\n name={'chevron'}\n rotation={isDropDownOpen ? '180' : '0'}\n className={`transition-transform`}\n stroke={iconColor}\n />\n </div>\n </div>\n );\n };\n\n const getDropdownAriaLabel = () => {\n const selectedLabel = selectedDropDownValues[0]?.[selectBy];\n if (ariaLabel && selectedLabel) {\n return `${ariaLabel}, ${selectedLabel}`;\n }\n return ariaLabel || defaultText || 'Select option';\n };\n\n // Trigger is always a button that reveals a listbox popup (Select/Listbox pattern).\n // For search-enabled dropdowns, the combobox role lives on the search input inside the popup.\n // This matches React Aria (useSelect), Radix (Select), and Headless UI (Listbox) — all use\n // role=\"button\" with real focus on options, separate from their Combobox components.\n const triggerSourceRole = 'button';\n\n // Trigger is always role=\"button\" — combobox ARIA (aria-activedescendant etc.)\n // lives on the search input inside the popup, not on the trigger.\n // Trigger only needs aria-haspopup + aria-expanded (Popover handles) + aria-controls.\n\n return (\n <div\n className={`se-design-dropdown-container${props?.className ? ` ${props?.className}` : ''}`}\n style={props?.style}\n >\n {props?.label ? (\n <div id={labelId} className={`se-design-dropdown-label ${firstOptionAsHeading ? 'sr-only' : 'mb-[3px] text-[var(--color-gray-700)] text-sm'}`}>\n {props?.label}\n </div>\n ) : !props?.ariaLabelledBy && ariaLabel ? (\n <span id={labelId} className=\"sr-only\">{ariaLabel}</span>\n ) : null}\n <div\n style={props?.style}\n className={`${disabled ? 'bg-[var(--color-gray-50)] rounded-md cursor-not-allowed' : ''}`}\n {...(!isMultiSelect ? {\n ...comboboxContainerProps,\n // Portal content lives in document.body — focus moving into it looks like \"focus out\" to\n // the container's blur handler, causing immediate close. Suppress it; the Popover's own\n // onBlur handler checks both source and portal content and handles dismissal correctly.\n ...(isWithPortal ? { onBlurCapture: undefined } : {})\n } : {\n // Multi-select: only spread focus-tracking handlers for isKeyboardFocused.\n // Dismiss is handled by Popover — don't spread onBlurCapture.\n onPointerMove: multiSelectContainerProps.onPointerMove,\n onPointerDown: multiSelectContainerProps.onPointerDown,\n onPointerUp: multiSelectContainerProps.onPointerUp,\n onFocusCapture: multiSelectContainerProps.onFocusCapture,\n onKeyDownCapture: multiSelectContainerProps.onKeyDownCapture\n })}\n >\n <Popover\n ref={popoverRef}\n isPopoverOpen={isDropDownOpen}\n isWithPortal={isWithPortal}\n renderPopoverContents={\n customDropdownContent\n ? customDropdownContent\n : isMultiSelect\n ? renderMultiSelectDropdownContents\n : renderDropdownContents\n }\n contentWidth={'full'}\n popoverContentStyleProperty={props.popoverContentStyleProperty}\n renderPopoverSrcElement={\n props.renderSrcElement\n ? () => props.renderSrcElement!({ isOpen: isDropDownOpen, selectedValue: selectedDropDownValues })\n : renderDropdownSelect\n }\n onPopoverToggle={(value) => {\n setIsDropDownOpen(value);\n if (value && !isMultiSelect && selectedDropDownValues.length > 0) {\n // Highlight the currently selected option when the dropdown opens (APG Select pattern)\n const selectedIndex = filteredOptions.findIndex(\n (option) => optionsUniqueBy\n ? option[optionsUniqueBy] === selectedDropDownValues[0]?.[optionsUniqueBy]\n : option[selectBy] === selectedDropDownValues[0]?.[selectBy]\n );\n if (selectedIndex >= 0) {\n setHighlightedIndex(selectedIndex);\n }\n }\n if (value && isMultiSelect && !shouldShowSearch) {\n // Focus listbox after Popover's own focus-first-on-open (setTimeout 0ms) has fired.\n // Using nested requestAnimationFrame ensures we run after both the Popover timeout\n // and any pending paint, so the listbox DOM is ready and we get the last word on focus.\n requestAnimationFrame(() => requestAnimationFrame(() => multiSelectListboxProps.ref.current?.focus()));\n }\n // When search is enabled, Popover's focus-first-on-open naturally finds the search input.\n }}\n disabled={disabled}\n automationId={props?.dropDownSrcAutomationId}\n popoverContentAutomationId={props?.dropDownContentAutomationId}\n ariaLabelledBy={\n props?.label || props?.ariaLabelledBy || ariaLabel\n ? [props?.label || (!props?.ariaLabelledBy && ariaLabel) ? labelId : props?.ariaLabelledBy, valueId].filter(Boolean).join(' ')\n : undefined\n }\n ariaLabel={!props?.label && !ariaLabel && !props?.ariaLabelledBy ? getDropdownAriaLabel() : undefined}\n sourceRole={triggerSourceRole}\n {...{ 'aria-haspopup': 'listbox' }}\n {...(isDropDownOpen ? { 'aria-controls': listboxId } : {})}\n />\n </div>\n {hasError && <div className=\"text-[var(--color-red-500)] text-sm\">{errorMessage}</div>}\n </div>\n );\n};\n"],"names":["Dropdown","props","isControlledSelection","selectedValue","undefined","isControlledOpen","isOpen","internalIsOpen","setInternalIsOpen","useState","searchQuery","setSearchQuery","internalSelectedValues","setInternalSelectedValues","defaultSelectedValue","Array","isArray","popoverRef","useRef","searchInputRef","labelId","useStableId","valueId","listboxId","isDropDownOpen","selectedDropDownValues","setIsDropDownOpen","value","onOpenChange","setSelectedDropDownValues","values","selectBy","optionsUniqueBy","displaySelected","dropDownOptions","defaultText","iconColor","disabled","dropdownClassName","hasError","errorMessage","customDropdownContent","isBorderless","shouldShowSearch","showSearchIcon","searchPlaceholder","searchResultEmptyMessage","ariaLabel","customSelectedValue","isWithPortal","firstOptionAsHeading","useEffect","newValues","current","requestAnimationFrame","focus","useLayoutEffect","popoverElementRef","element","isMultiSelect","type","getFilteredOptions","trim","filter","option","toString","toLowerCase","includes","handleDropDownOptionClick","dropDownOption","onOptionClick","focusTrigger","filteredOptions","listboxProps","getOptionProps","highlightedIndex","setHighlightedIndex","containerProps","comboboxContainerProps","inputProps","comboboxInputProps","isKeyboardFocused","isSingleSelectKeyboardFocused","useCombobox","items","onSelect","item","hasItems","length","multiSelectComboboxInputProps","multiSelectListboxProps","multiSelectContainerProps","highlightedMultiSelectIndex","setHighlightedMultiSelectIndex","isMultiSelectKeyboardFocused","loop","closeOnTab","getSelectedDropDownValue","isSrcOption","clearSelectedDropDownValues","onClear","optionChip","srcOption","renderOptionChip","firstSelectedLabel","remainingCount","React","createElement","className","selectedLabel","hasVisibleLabel","label","ariaLabelledBy","showPrefix","renderSearchInput","extraInputProps","InputWithIcon","leftIcon","name","position","style","color","onChange","placeholder","margin","gap","inputStyle","width","border","outline","automationId","inputRef","renderSearchBar","onKeyDown","e","multiSelectOnKeyDown","key","dropDownOptionJsx","index","optionTxt","dropDownSelectedValue","selectByUniqueId","isOptionSelected","isHighlighted","optionProps","_extends","id","onClick","preventDefault","tabIndex","Icon","stroke","renderDropdownContents","Fragment","map","role","handleMultiSelectDropdownOptionClick","isSelected","newSelectedDropDownValues","handleApplySelectedDropDownValues","togglePopover","onApply","isSearchInput","some","v","stopPropagation","multiSelectDropdownOptionJSX","optionId","Checkbox","ariaHidden","checked","renderMultiSelectDropdownContents","onFocus","shiftKey","ref","Button","size","renderDropdownSelect","borderColor","errorBorderColor","dropDownSelectClass","dropDownSelectAutomationId","rotation","getDropdownAriaLabel","onPointerMove","onPointerDown","onPointerUp","onFocusCapture","onKeyDownCapture","onBlurCapture","Popover","isPopoverOpen","renderPopoverContents","contentWidth","popoverContentStyleProperty","renderPopoverSrcElement","renderSrcElement","onPopoverToggle","selectedIndex","findIndex","dropDownSrcAutomationId","popoverContentAutomationId","dropDownContentAutomationId","Boolean","join","sourceRole"],"mappings":";;;;;;;;;;;;;;;;;AAgEO,MAAMA,KAA+BC,CAAAA,MAAU;AACpD,QAAMC,IAAwBD,EAAME,kBAAkBC,QAChDC,IAAmBJ,EAAMK,WAAWF,QAEpC,CAACG,GAAgBC,EAAiB,IAAIC,EAAS,EAAK,GACpD,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAE,GAC3C,CAACG,IAAwBC,CAAyB,IAAIJ,EAA0B,MACpFR,GAAOa,uBACHC,MAAMC,QAAQf,GAAOa,oBAAoB,IACvCb,GA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IAC5FyM,YArFkB;AAAA,IAsFZ,iBAAiB;AAAA,EAAA,GAClBrL,IAAiB;AAAA,IAAE,iBAAiBD;AAAAA,EAAAA,IAAc,CAAA,CAAE,CAC1D,CACE,GACJgB,KAAYmE,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,EAAA,GAAuCpE,EAAkB,CAClF;AAET;"}
package/dist/index250.js CHANGED
@@ -1,9 +1,8 @@
1
- function o(p, e, t) {
2
- if (t || arguments.length === 2) for (var r = 0, s = e.length, n; r < s; r++)
3
- (n || !(r in e)) && (n || (n = Array.prototype.slice.call(e, 0, r)), n[r] = e[r]);
4
- return p.concat(n || Array.prototype.slice.call(e));
1
+ import e from "./index253.js";
2
+ function p(o, t) {
3
+ o.prototype = Object.create(t.prototype), o.prototype.constructor = o, e(o, t);
5
4
  }
6
5
  export {
7
- o as __spreadArray
6
+ p as default
8
7
  };
9
8
  //# sourceMappingURL=index250.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index250.js","sources":["../node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"names":["__spreadArray","to","from","pack","i","l","ar"],"mappings":"AAqNO,SAASA,EAAcC,GAAIC,GAAMC,GAAM;AAC5C,MAAIA,KAAQ,UAAU,WAAW,EAAG,UAASC,IAAI,GAAGC,IAAIH,EAAK,QAAQI,GAAIF,IAAIC,GAAGD;AAC5E,KAAIE,KAAM,EAAEF,KAAKF,QACRI,MAAIA,IAAK,MAAM,UAAU,MAAM,KAAKJ,GAAM,GAAGE,CAAC,IACnDE,EAAGF,CAAC,IAAIF,EAAKE,CAAC;AAGtB,SAAOH,EAAG,OAAOK,KAAM,MAAM,UAAU,MAAM,KAAKJ,CAAI,CAAC;AACzD;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index250.js","sources":["../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"],"sourcesContent":["import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };"],"names":["_setPrototypeOf","_inheritsLoose","t","o","setPrototypeOf"],"mappings":"AACA,OAAAA,OAAA;AAAA,SAASC,EAAeC,GAAGC,GAAG;AAC5B,EAAAD,EAAE,YAAY,OAAO,OAAOC,EAAE,SAAS,GAAGD,EAAE,UAAU,cAAcA,GAAGE,EAAeF,GAAGC,CAAC;AAC5F;","x_google_ignoreList":[0]}
package/dist/index251.js CHANGED
@@ -1,41 +1,173 @@
1
- /*!
2
- * content-type
3
- * Copyright(c) 2015 Douglas Christopher Wilson
4
- * MIT Licensed
5
- */
6
- var p = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g, s = /\\([\u000b\u0020-\u00ff])/g, d = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, c = u;
7
- function u(e) {
8
- if (!e)
9
- throw new TypeError("argument string is required");
10
- var r = typeof e == "object" ? y(e) : e;
11
- if (typeof r != "string")
12
- throw new TypeError("argument string is required to be a string");
13
- var n = r.indexOf(";"), a = n !== -1 ? r.slice(0, n).trim() : r.trim();
14
- if (!d.test(a))
15
- throw new TypeError("invalid media type");
16
- var o = new w(a.toLowerCase());
17
- if (n !== -1) {
18
- var f, i, t;
19
- for (p.lastIndex = n; i = p.exec(r); ) {
20
- if (i.index !== n)
21
- throw new TypeError("invalid parameter format");
22
- n += i[0].length, f = i[1].toLowerCase(), t = i[2], t.charCodeAt(0) === 34 && (t = t.slice(1, -1), t.indexOf("\\") !== -1 && (t = t.replace(s, "$1"))), o.parameters[f] = t;
1
+ import { __spreadArray as D } from "./index254.js";
2
+ import { parse as ut } from "./index255.js";
3
+ var g = /* @__PURE__ */ new Map(), Y = function(t) {
4
+ return t.cloneNode(!0);
5
+ }, z = function() {
6
+ return window.location.protocol === "file:";
7
+ }, Z = function(t, o, n) {
8
+ var e = new XMLHttpRequest();
9
+ e.onreadystatechange = function() {
10
+ try {
11
+ if (!/\.svg/i.test(t) && e.readyState === 2) {
12
+ var s = e.getResponseHeader("Content-Type");
13
+ if (!s)
14
+ throw new Error("Content type not found");
15
+ var i = ut(s).type;
16
+ if (!(i === "image/svg+xml" || i === "text/plain"))
17
+ throw new Error("Invalid content type: ".concat(i));
18
+ }
19
+ if (e.readyState === 4) {
20
+ if (e.status === 404 || e.responseXML === null)
21
+ throw new Error(z() ? "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: " + t);
22
+ if (e.status === 200 || z() && e.status === 0)
23
+ n(null, e);
24
+ else
25
+ throw new Error("There was a problem injecting the SVG: " + e.status + " " + e.statusText);
26
+ }
27
+ } catch (a) {
28
+ if (e.abort(), a instanceof Error)
29
+ n(a, e);
30
+ else
31
+ throw a;
23
32
  }
24
- if (n !== r.length)
25
- throw new TypeError("invalid parameter format");
33
+ }, e.open("GET", t), e.withCredentials = o, e.overrideMimeType && e.overrideMimeType("text/xml"), e.send();
34
+ }, v = {}, B = function(t, o) {
35
+ v[t] = v[t] || [], v[t].push(o);
36
+ }, ft = function(t) {
37
+ for (var o = function(i, a) {
38
+ setTimeout(function() {
39
+ if (Array.isArray(v[t])) {
40
+ var u = g.get(t), p = v[t][i];
41
+ u instanceof SVGSVGElement && p(null, Y(u)), u instanceof Error && p(u), i === v[t].length - 1 && delete v[t];
42
+ }
43
+ }, 0);
44
+ }, n = 0, e = v[t].length; n < e; n++)
45
+ o(n);
46
+ }, lt = function(t, o, n) {
47
+ if (g.has(t)) {
48
+ var e = g.get(t);
49
+ if (e === void 0) {
50
+ B(t, n);
51
+ return;
52
+ }
53
+ if (e instanceof SVGSVGElement) {
54
+ n(null, Y(e));
55
+ return;
56
+ }
57
+ }
58
+ g.set(t, void 0), B(t, n), Z(t, o, function(s, i) {
59
+ var a;
60
+ s ? g.set(t, s) : ((a = i.responseXML) === null || a === void 0 ? void 0 : a.documentElement) instanceof SVGSVGElement && g.set(t, i.responseXML.documentElement), ft(t);
61
+ });
62
+ }, ct = function(t, o, n) {
63
+ Z(t, o, function(e, s) {
64
+ var i;
65
+ e ? n(e) : ((i = s.responseXML) === null || i === void 0 ? void 0 : i.documentElement) instanceof SVGSVGElement && n(null, s.responseXML.documentElement);
66
+ });
67
+ }, dt = 0, vt = function() {
68
+ return ++dt;
69
+ }, l = [], J = {}, pt = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xlink", K = function(t, o, n, e, s, i, a) {
70
+ var u = t.getAttribute("data-src") || t.getAttribute("src");
71
+ if (!u) {
72
+ a(new Error("Invalid data-src or src attribute"));
73
+ return;
26
74
  }
27
- return o;
28
- }
29
- function y(e) {
30
- var r;
31
- if (typeof e.getHeader == "function" ? r = e.getHeader("content-type") : typeof e.headers == "object" && (r = e.headers && e.headers["content-type"]), typeof r != "string")
32
- throw new TypeError("content-type header is missing from object");
33
- return r;
34
- }
35
- function w(e) {
36
- this.parameters = /* @__PURE__ */ Object.create(null), this.type = e;
37
- }
75
+ if (l.indexOf(t) !== -1) {
76
+ l.splice(l.indexOf(t), 1), t = null;
77
+ return;
78
+ }
79
+ l.push(t), t.setAttribute("src", "");
80
+ var p = e ? lt : ct;
81
+ p(u, s, function(j, r) {
82
+ if (!r) {
83
+ l.splice(l.indexOf(t), 1), t = null, a(j);
84
+ return;
85
+ }
86
+ var w = t.getAttribute("id");
87
+ w && r.setAttribute("id", w);
88
+ var S = t.getAttribute("title");
89
+ S && r.setAttribute("title", S);
90
+ var E = t.getAttribute("width");
91
+ E && r.setAttribute("width", E);
92
+ var y = t.getAttribute("height");
93
+ y && r.setAttribute("height", y);
94
+ var G = Array.from(new Set(D(D(D([], (r.getAttribute("class") || "").split(" "), !0), ["injected-svg"], !1), (t.getAttribute("class") || "").split(" "), !0))).join(" ").trim();
95
+ r.setAttribute("class", G);
96
+ var b = t.getAttribute("style");
97
+ b && r.setAttribute("style", b), r.setAttribute("data-src", u);
98
+ var R = [].filter.call(t.attributes, function(f) {
99
+ return /^data-\w[\w-]*$/.test(f.name);
100
+ });
101
+ if (Array.prototype.forEach.call(R, function(f) {
102
+ f.name && f.value && r.setAttribute(f.name, f.value);
103
+ }), n) {
104
+ var h = {
105
+ clipPath: ["clip-path"],
106
+ "color-profile": ["color-profile"],
107
+ cursor: ["cursor"],
108
+ filter: ["filter"],
109
+ linearGradient: ["fill", "stroke"],
110
+ marker: ["marker", "marker-start", "marker-mid", "marker-end"],
111
+ mask: ["mask"],
112
+ path: [],
113
+ pattern: ["fill", "stroke"],
114
+ radialGradient: ["fill", "stroke"]
115
+ }, C, d, m, T, k;
116
+ Object.keys(h).forEach(function(f) {
117
+ C = f, m = h[f], d = r.querySelectorAll(C + "[id]");
118
+ for (var nt = function(I, mt) {
119
+ T = d[I].id, k = T + "-" + vt();
120
+ var M;
121
+ Array.prototype.forEach.call(m, function(W) {
122
+ M = r.querySelectorAll("[" + W + '*="' + T + '"]');
123
+ for (var O = 0, st = M.length; O < st; O++) {
124
+ var $ = M[O].getAttribute(W);
125
+ $ && !$.match(new RegExp('url\\("?#' + T + '"?\\)')) || M[O].setAttribute(W, "url(#" + k + ")");
126
+ }
127
+ });
128
+ for (var U = r.querySelectorAll("[*|href]"), H = [], N = 0, at = U.length; N < at; N++) {
129
+ var P = U[N].getAttributeNS(F, "href");
130
+ P && P.toString() === "#" + d[I].id && H.push(U[N]);
131
+ }
132
+ for (var Q = 0, ot = H.length; Q < ot; Q++)
133
+ H[Q].setAttributeNS(F, "href", "#" + k);
134
+ d[I].id = k;
135
+ }, _ = 0, it = d.length; _ < it; _++)
136
+ nt(_);
137
+ });
138
+ }
139
+ r.removeAttribute("xmlns:a");
140
+ for (var x = r.querySelectorAll("script"), L = [], V, q, A = 0, tt = x.length; A < tt; A++)
141
+ q = x[A].getAttribute("type"), (!q || q === "application/ecmascript" || q === "application/javascript" || q === "text/javascript") && (V = x[A].innerText || x[A].textContent, V && L.push(V), r.removeChild(x[A]));
142
+ if (L.length > 0 && (o === "always" || o === "once" && !J[u])) {
143
+ for (var X = 0, et = L.length; X < et; X++)
144
+ new Function(L[X])(window);
145
+ J[u] = !0;
146
+ }
147
+ var rt = r.querySelectorAll("style");
148
+ if (Array.prototype.forEach.call(rt, function(f) {
149
+ f.textContent += "";
150
+ }), r.setAttribute("xmlns", pt), r.setAttribute("xmlns:xlink", F), i(r), !t.parentNode) {
151
+ l.splice(l.indexOf(t), 1), t = null, a(new Error("Parent node is null"));
152
+ return;
153
+ }
154
+ t.parentNode.replaceChild(r, t), l.splice(l.indexOf(t), 1), t = null, a(null, r);
155
+ });
156
+ }, wt = function(t, o) {
157
+ var n = o === void 0 ? {} : o, e = n.afterAll, s = e === void 0 ? function() {
158
+ } : e, i = n.afterEach, a = i === void 0 ? function() {
159
+ } : i, u = n.beforeEach, p = u === void 0 ? function() {
160
+ } : u, j = n.cacheRequests, r = j === void 0 ? !0 : j, w = n.evalScripts, S = w === void 0 ? "never" : w, E = n.httpRequestWithCredentials, y = E === void 0 ? !1 : E, G = n.renumerateIRIElements, b = G === void 0 ? !0 : G;
161
+ if (t && "length" in t)
162
+ for (var R = 0, h = 0, C = t.length; h < C; h++)
163
+ K(t[h], S, b, r, y, p, function(d, m) {
164
+ a(d, m), t && "length" in t && t.length === ++R && s(R);
165
+ });
166
+ else t ? K(t, S, b, r, y, p, function(d, m) {
167
+ a(d, m), s(1), t = null;
168
+ }) : s(0);
169
+ };
38
170
  export {
39
- c as parse
171
+ wt as SVGInjector
40
172
  };
41
173
  //# sourceMappingURL=index251.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index251.js","sources":["../node_modules/content-type/index.js"],"sourcesContent":["/*!\n * content-type\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * RegExp to match *( \";\" parameter ) in RFC 7231 sec 3.1.1.1\n *\n * parameter = token \"=\" ( token / quoted-string )\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n * / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n * / DIGIT / ALPHA\n * ; any VCHAR, except delimiters\n * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\n * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text\n * obs-text = %x80-FF\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n */\nvar PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *(\"(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*\"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex\nvar TEXT_REGEXP = /^[\\u000b\\u0020-\\u007e\\u0080-\\u00ff]+$/ // eslint-disable-line no-control-regex\nvar TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/\n\n/**\n * RegExp to match quoted-pair in RFC 7230 sec 3.2.6\n *\n * quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n * obs-text = %x80-FF\n */\nvar QESC_REGEXP = /\\\\([\\u000b\\u0020-\\u00ff])/g // eslint-disable-line no-control-regex\n\n/**\n * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6\n */\nvar QUOTE_REGEXP = /([\\\\\"])/g\n\n/**\n * RegExp to match type in RFC 7231 sec 3.1.1.1\n *\n * media-type = type \"/\" subtype\n * type = token\n * subtype = token\n */\nvar TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/\n\n/**\n * Module exports.\n * @public\n */\n\nexports.format = format\nexports.parse = parse\n\n/**\n * Format object to media type.\n *\n * @param {object} obj\n * @return {string}\n * @public\n */\n\nfunction format (obj) {\n if (!obj || typeof obj !== 'object') {\n throw new TypeError('argument obj is required')\n }\n\n var parameters = obj.parameters\n var type = obj.type\n\n if (!type || !TYPE_REGEXP.test(type)) {\n throw new TypeError('invalid type')\n }\n\n var string = type\n\n // append parameters\n if (parameters && typeof parameters === 'object') {\n var param\n var params = Object.keys(parameters).sort()\n\n for (var i = 0; i < params.length; i++) {\n param = params[i]\n\n if (!TOKEN_REGEXP.test(param)) {\n throw new TypeError('invalid parameter name')\n }\n\n string += '; ' + param + '=' + qstring(parameters[param])\n }\n }\n\n return string\n}\n\n/**\n * Parse media type to object.\n *\n * @param {string|object} string\n * @return {Object}\n * @public\n */\n\nfunction parse (string) {\n if (!string) {\n throw new TypeError('argument string is required')\n }\n\n // support req/res-like objects as argument\n var header = typeof string === 'object'\n ? getcontenttype(string)\n : string\n\n if (typeof header !== 'string') {\n throw new TypeError('argument string is required to be a string')\n }\n\n var index = header.indexOf(';')\n var type = index !== -1\n ? header.slice(0, index).trim()\n : header.trim()\n\n if (!TYPE_REGEXP.test(type)) {\n throw new TypeError('invalid media type')\n }\n\n var obj = new ContentType(type.toLowerCase())\n\n // parse parameters\n if (index !== -1) {\n var key\n var match\n var value\n\n PARAM_REGEXP.lastIndex = index\n\n while ((match = PARAM_REGEXP.exec(header))) {\n if (match.index !== index) {\n throw new TypeError('invalid parameter format')\n }\n\n index += match[0].length\n key = match[1].toLowerCase()\n value = match[2]\n\n if (value.charCodeAt(0) === 0x22 /* \" */) {\n // remove quotes\n value = value.slice(1, -1)\n\n // remove escapes\n if (value.indexOf('\\\\') !== -1) {\n value = value.replace(QESC_REGEXP, '$1')\n }\n }\n\n obj.parameters[key] = value\n }\n\n if (index !== header.length) {\n throw new TypeError('invalid parameter format')\n }\n }\n\n return obj\n}\n\n/**\n * Get content-type from req/res objects.\n *\n * @param {object}\n * @return {Object}\n * @private\n */\n\nfunction getcontenttype (obj) {\n var header\n\n if (typeof obj.getHeader === 'function') {\n // res-like\n header = obj.getHeader('content-type')\n } else if (typeof obj.headers === 'object') {\n // req-like\n header = obj.headers && obj.headers['content-type']\n }\n\n if (typeof header !== 'string') {\n throw new TypeError('content-type header is missing from object')\n }\n\n return header\n}\n\n/**\n * Quote a string if necessary.\n *\n * @param {string} val\n * @return {string}\n * @private\n */\n\nfunction qstring (val) {\n var str = String(val)\n\n // no need to quote tokens\n if (TOKEN_REGEXP.test(str)) {\n return str\n }\n\n if (str.length > 0 && !TEXT_REGEXP.test(str)) {\n throw new TypeError('invalid parameter value')\n }\n\n return '\"' + str.replace(QUOTE_REGEXP, '\\\\$1') + '\"'\n}\n\n/**\n * Class to represent a content type.\n * @private\n */\nfunction ContentType (type) {\n this.parameters = Object.create(null)\n this.type = type\n}\n"],"names":["PARAM_REGEXP","QESC_REGEXP","TYPE_REGEXP","parse_1","parse","string","header","getcontenttype","index","type","obj","ContentType","key","match","value"],"mappings":";;;;;AAsBA,IAAIA,IAAe,oKAUfC,IAAc,8BAcdC,IAAc,8DAQlBC,IAAgBC;AAmDhB,SAASA,EAAOC,GAAQ;AACtB,MAAI,CAACA;AACH,UAAM,IAAI,UAAU,6BAA6B;AAInD,MAAIC,IAAS,OAAOD,KAAW,WAC3BE,EAAeF,CAAM,IACrBA;AAEJ,MAAI,OAAOC,KAAW;AACpB,UAAM,IAAI,UAAU,4CAA4C;AAGlE,MAAIE,IAAQF,EAAO,QAAQ,GAAG,GAC1BG,IAAOD,MAAU,KACjBF,EAAO,MAAM,GAAGE,CAAK,EAAE,KAAI,IAC3BF,EAAO,KAAI;AAEf,MAAI,CAACJ,EAAY,KAAKO,CAAI;AACxB,UAAM,IAAI,UAAU,oBAAoB;AAG1C,MAAIC,IAAM,IAAIC,EAAYF,EAAK,YAAW,CAAE;AAG5C,MAAID,MAAU,IAAI;AAChB,QAAII,GACAC,GACAC;AAIJ,SAFAd,EAAa,YAAYQ,GAEjBK,IAAQb,EAAa,KAAKM,CAAM,KAAI;AAC1C,UAAIO,EAAM,UAAUL;AAClB,cAAM,IAAI,UAAU,0BAA0B;AAGhD,MAAAA,KAASK,EAAM,CAAC,EAAE,QAClBD,IAAMC,EAAM,CAAC,EAAE,YAAW,GAC1BC,IAAQD,EAAM,CAAC,GAEXC,EAAM,WAAW,CAAC,MAAM,OAE1BA,IAAQA,EAAM,MAAM,GAAG,EAAE,GAGrBA,EAAM,QAAQ,IAAI,MAAM,OAC1BA,IAAQA,EAAM,QAAQb,GAAa,IAAI,KAI3CS,EAAI,WAAWE,CAAG,IAAIE;AAAA,IAC5B;AAEI,QAAIN,MAAUF,EAAO;AACnB,YAAM,IAAI,UAAU,0BAA0B;AAAA,EAEpD;AAEE,SAAOI;AACT;AAUA,SAASH,EAAgBG,GAAK;AAC5B,MAAIJ;AAUJ,MARI,OAAOI,EAAI,aAAc,aAE3BJ,IAASI,EAAI,UAAU,cAAc,IAC5B,OAAOA,EAAI,WAAY,aAEhCJ,IAASI,EAAI,WAAWA,EAAI,QAAQ,cAAc,IAGhD,OAAOJ,KAAW;AACpB,UAAM,IAAI,UAAU,4CAA4C;AAGlE,SAAOA;AACT;AA6BA,SAASK,EAAaF,GAAM;AAC1B,OAAK,aAAa,uBAAO,OAAO,IAAI,GACpC,KAAK,OAAOA;AACd;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index251.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,UAAA;AAAA,IAAIC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AA,EACb,CAAC,IAEDG,EAAS,CAAC;AAEd;","x_google_ignoreList":[0]}
package/dist/index252.js CHANGED
@@ -1,5 +1,14 @@
1
- var p = { exports: {} };
1
+ import { __module as r } from "./index256.js";
2
+ import { __require as e } from "./index257.js";
3
+ import { __require as o } from "./index258.js";
4
+ import { __require as p } from "./index259.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;
2
11
  export {
3
- p as __module
12
+ _ as p
4
13
  };
5
14
  //# sourceMappingURL=index252.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index252.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index252.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]}
package/dist/index253.js CHANGED
@@ -1,11 +1,9 @@
1
- import { __module as e } from "./index256.js";
2
- import { __require as o } from "./index257.js";
3
- import { __require as t } from "./index258.js";
4
- var r;
5
- function p() {
6
- return r ? e.exports : (r = 1, process.env.NODE_ENV === "production" ? e.exports = o() : e.exports = t(), e.exports);
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);
7
5
  }
8
6
  export {
9
- p as __require
7
+ e as default
10
8
  };
11
9
  //# sourceMappingURL=index253.js.map