se-design 1.0.61-dev → 1.0.62-dev

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 (307) hide show
  1. package/dist/assets/colors.css +22 -9
  2. package/dist/assets/icons/command.svg +1 -1
  3. package/dist/assets/style.css +1 -1
  4. package/dist/components/BreadCrumbs/index.d.ts +2 -0
  5. package/dist/components/Button/index.d.ts +5 -1
  6. package/dist/index.js +23 -21
  7. package/dist/index.js.map +1 -1
  8. package/dist/index100.js +1 -1
  9. package/dist/index100.js.map +1 -1
  10. package/dist/index101.js +1 -1
  11. package/dist/index101.js.map +1 -1
  12. package/dist/index102.js +2 -2
  13. package/dist/index102.js.map +1 -1
  14. package/dist/index103.js +1 -1
  15. package/dist/index103.js.map +1 -1
  16. package/dist/index104.js +2 -2
  17. package/dist/index104.js.map +1 -1
  18. package/dist/index105.js +1 -1
  19. package/dist/index105.js.map +1 -1
  20. package/dist/index106.js +1 -1
  21. package/dist/index106.js.map +1 -1
  22. package/dist/index107.js +1 -1
  23. package/dist/index107.js.map +1 -1
  24. package/dist/index108.js +2 -2
  25. package/dist/index108.js.map +1 -1
  26. package/dist/index109.js +1 -1
  27. package/dist/index109.js.map +1 -1
  28. package/dist/index110.js +2 -2
  29. package/dist/index110.js.map +1 -1
  30. package/dist/index111.js +2 -2
  31. package/dist/index111.js.map +1 -1
  32. package/dist/index112.js +2 -2
  33. package/dist/index112.js.map +1 -1
  34. package/dist/index113.js +2 -2
  35. package/dist/index113.js.map +1 -1
  36. package/dist/index114.js +1 -1
  37. package/dist/index114.js.map +1 -1
  38. package/dist/index115.js +1 -1
  39. package/dist/index115.js.map +1 -1
  40. package/dist/index116.js +1 -1
  41. package/dist/index116.js.map +1 -1
  42. package/dist/index117.js +2 -2
  43. package/dist/index117.js.map +1 -1
  44. package/dist/index118.js +2 -2
  45. package/dist/index118.js.map +1 -1
  46. package/dist/index119.js +2 -2
  47. package/dist/index119.js.map +1 -1
  48. package/dist/index120.js +1 -1
  49. package/dist/index120.js.map +1 -1
  50. package/dist/index121.js +1 -1
  51. package/dist/index121.js.map +1 -1
  52. package/dist/index122.js +1 -1
  53. package/dist/index122.js.map +1 -1
  54. package/dist/index123.js +1 -1
  55. package/dist/index123.js.map +1 -1
  56. package/dist/index124.js +1 -1
  57. package/dist/index124.js.map +1 -1
  58. package/dist/index125.js +1 -1
  59. package/dist/index125.js.map +1 -1
  60. package/dist/index126.js +1 -1
  61. package/dist/index126.js.map +1 -1
  62. package/dist/index127.js +1 -1
  63. package/dist/index127.js.map +1 -1
  64. package/dist/index128.js +2 -2
  65. package/dist/index128.js.map +1 -1
  66. package/dist/index129.js +2 -2
  67. package/dist/index129.js.map +1 -1
  68. package/dist/index130.js +1 -1
  69. package/dist/index130.js.map +1 -1
  70. package/dist/index131.js +1 -1
  71. package/dist/index131.js.map +1 -1
  72. package/dist/index132.js +1 -1
  73. package/dist/index132.js.map +1 -1
  74. package/dist/index133.js +1 -1
  75. package/dist/index133.js.map +1 -1
  76. package/dist/index134.js +1 -1
  77. package/dist/index134.js.map +1 -1
  78. package/dist/index135.js +1 -1
  79. package/dist/index135.js.map +1 -1
  80. package/dist/index136.js +2 -2
  81. package/dist/index136.js.map +1 -1
  82. package/dist/index137.js +1 -1
  83. package/dist/index137.js.map +1 -1
  84. package/dist/index138.js +2 -2
  85. package/dist/index138.js.map +1 -1
  86. package/dist/index139.js +2 -2
  87. package/dist/index139.js.map +1 -1
  88. package/dist/index140.js +2 -2
  89. package/dist/index140.js.map +1 -1
  90. package/dist/index141.js +2 -2
  91. package/dist/index141.js.map +1 -1
  92. package/dist/index142.js +1 -1
  93. package/dist/index142.js.map +1 -1
  94. package/dist/index143.js +1 -1
  95. package/dist/index143.js.map +1 -1
  96. package/dist/index144.js +1 -1
  97. package/dist/index144.js.map +1 -1
  98. package/dist/index145.js +1 -1
  99. package/dist/index145.js.map +1 -1
  100. package/dist/index146.js +1 -1
  101. package/dist/index146.js.map +1 -1
  102. package/dist/index147.js +1 -1
  103. package/dist/index147.js.map +1 -1
  104. package/dist/index148.js +1 -1
  105. package/dist/index148.js.map +1 -1
  106. package/dist/index149.js +1 -1
  107. package/dist/index149.js.map +1 -1
  108. package/dist/index15.js +2 -2
  109. package/dist/index150.js +1 -1
  110. package/dist/index150.js.map +1 -1
  111. package/dist/index151.js +1 -1
  112. package/dist/index151.js.map +1 -1
  113. package/dist/index152.js +1 -1
  114. package/dist/index152.js.map +1 -1
  115. package/dist/index153.js +1 -1
  116. package/dist/index153.js.map +1 -1
  117. package/dist/index154.js +1 -1
  118. package/dist/index154.js.map +1 -1
  119. package/dist/index155.js +1 -1
  120. package/dist/index155.js.map +1 -1
  121. package/dist/index156.js +1 -1
  122. package/dist/index156.js.map +1 -1
  123. package/dist/index157.js +1 -1
  124. package/dist/index157.js.map +1 -1
  125. package/dist/index158.js +1 -1
  126. package/dist/index158.js.map +1 -1
  127. package/dist/index159.js +1 -1
  128. package/dist/index159.js.map +1 -1
  129. package/dist/index160.js +1 -1
  130. package/dist/index160.js.map +1 -1
  131. package/dist/index161.js +1 -1
  132. package/dist/index161.js.map +1 -1
  133. package/dist/index162.js +1 -1
  134. package/dist/index162.js.map +1 -1
  135. package/dist/index163.js +1 -1
  136. package/dist/index163.js.map +1 -1
  137. package/dist/index164.js +1 -1
  138. package/dist/index164.js.map +1 -1
  139. package/dist/index165.js +2 -2
  140. package/dist/index165.js.map +1 -1
  141. package/dist/index166.js +2 -2
  142. package/dist/index166.js.map +1 -1
  143. package/dist/index167.js +1 -1
  144. package/dist/index167.js.map +1 -1
  145. package/dist/index168.js +1 -1
  146. package/dist/index168.js.map +1 -1
  147. package/dist/index169.js +2 -2
  148. package/dist/index169.js.map +1 -1
  149. package/dist/index17.js +1 -1
  150. package/dist/index170.js +2 -2
  151. package/dist/index170.js.map +1 -1
  152. package/dist/index171.js +1 -1
  153. package/dist/index171.js.map +1 -1
  154. package/dist/index172.js +1 -1
  155. package/dist/index172.js.map +1 -1
  156. package/dist/index173.js +1 -1
  157. package/dist/index173.js.map +1 -1
  158. package/dist/index174.js +1 -1
  159. package/dist/index174.js.map +1 -1
  160. package/dist/index175.js +1 -1
  161. package/dist/index175.js.map +1 -1
  162. package/dist/index176.js +1 -1
  163. package/dist/index176.js.map +1 -1
  164. package/dist/index177.js +1 -1
  165. package/dist/index177.js.map +1 -1
  166. package/dist/index178.js +1 -1
  167. package/dist/index178.js.map +1 -1
  168. package/dist/index179.js +2 -2
  169. package/dist/index179.js.map +1 -1
  170. package/dist/index18.js +2 -2
  171. package/dist/index180.js +2 -2
  172. package/dist/index180.js.map +1 -1
  173. package/dist/index181.js +2 -2
  174. package/dist/index181.js.map +1 -1
  175. package/dist/index182.js +2 -149
  176. package/dist/index182.js.map +1 -1
  177. package/dist/index183.js +149 -9
  178. package/dist/index183.js.map +1 -1
  179. package/dist/index184.js +8 -5
  180. package/dist/index184.js.map +1 -1
  181. package/dist/index185.js +5 -4
  182. package/dist/index185.js.map +1 -1
  183. package/dist/index186.js +8 -0
  184. package/dist/index186.js.map +1 -0
  185. package/dist/index189.js +20 -58
  186. package/dist/index189.js.map +1 -1
  187. package/dist/index191.js +1 -1
  188. package/dist/index212.js +1 -1
  189. package/dist/index22.js +3 -3
  190. package/dist/index224.js +1 -1
  191. package/dist/index225.js +1 -1
  192. package/dist/index226.js +9 -21
  193. package/dist/index226.js.map +1 -1
  194. package/dist/index227.js +9 -18
  195. package/dist/index227.js.map +1 -1
  196. package/dist/index228.js +4 -9
  197. package/dist/index228.js.map +1 -1
  198. package/dist/index229.js +170 -10
  199. package/dist/index229.js.map +1 -1
  200. package/dist/index230.js +11 -5
  201. package/dist/index230.js.map +1 -1
  202. package/dist/index231.js +22 -170
  203. package/dist/index231.js.map +1 -1
  204. package/dist/index232.js +19 -11
  205. package/dist/index232.js.map +1 -1
  206. package/dist/index24.js +2 -2
  207. package/dist/index24.js.map +1 -1
  208. package/dist/index27.js +1 -1
  209. package/dist/index29.js +1 -1
  210. package/dist/index3.js +23 -21
  211. package/dist/index3.js.map +1 -1
  212. package/dist/index31.js +10 -11
  213. package/dist/index34.js +1 -1
  214. package/dist/index36.js +35 -38
  215. package/dist/index36.js.map +1 -1
  216. package/dist/index37.js +4 -5
  217. package/dist/index37.js.map +1 -1
  218. package/dist/index38.js +3 -3
  219. package/dist/index41.js +7 -8
  220. package/dist/index42.js +6 -7
  221. package/dist/index43.js +16 -16
  222. package/dist/index43.js.map +1 -1
  223. package/dist/index44.js +2 -2
  224. package/dist/index45.js +2 -2
  225. package/dist/index48.js +1 -1
  226. package/dist/index49.js +48 -30
  227. package/dist/index49.js.map +1 -1
  228. package/dist/index5.js +113 -113
  229. package/dist/index50.js +2 -2
  230. package/dist/index50.js.map +1 -1
  231. package/dist/index54.js +21 -22
  232. package/dist/index56.js +2 -2
  233. package/dist/index56.js.map +1 -1
  234. package/dist/index6.js +2 -3
  235. package/dist/index63.js +1 -1
  236. package/dist/index64.js +2 -3
  237. package/dist/index66.js +19 -17
  238. package/dist/index66.js.map +1 -1
  239. package/dist/index68.js +55 -5
  240. package/dist/index68.js.map +1 -1
  241. package/dist/index69.js +5 -9
  242. package/dist/index69.js.map +1 -1
  243. package/dist/index70.js +12 -0
  244. package/dist/index70.js.map +1 -0
  245. package/dist/index72.js +2 -2
  246. package/dist/index72.js.map +1 -1
  247. package/dist/index73.js +2 -2
  248. package/dist/index73.js.map +1 -1
  249. package/dist/index74.js +2 -2
  250. package/dist/index74.js.map +1 -1
  251. package/dist/index75.js +1 -1
  252. package/dist/index75.js.map +1 -1
  253. package/dist/index76.js +1 -1
  254. package/dist/index76.js.map +1 -1
  255. package/dist/index77.js +1 -1
  256. package/dist/index77.js.map +1 -1
  257. package/dist/index78.js +1 -1
  258. package/dist/index78.js.map +1 -1
  259. package/dist/index79.js +1 -1
  260. package/dist/index79.js.map +1 -1
  261. package/dist/index8.js +5 -5
  262. package/dist/index8.js.map +1 -1
  263. package/dist/index80.js +1 -1
  264. package/dist/index80.js.map +1 -1
  265. package/dist/index81.js +1 -1
  266. package/dist/index81.js.map +1 -1
  267. package/dist/index82.js +1 -1
  268. package/dist/index82.js.map +1 -1
  269. package/dist/index83.js +1 -1
  270. package/dist/index83.js.map +1 -1
  271. package/dist/index84.js +1 -1
  272. package/dist/index84.js.map +1 -1
  273. package/dist/index85.js +1 -1
  274. package/dist/index85.js.map +1 -1
  275. package/dist/index86.js +1 -1
  276. package/dist/index86.js.map +1 -1
  277. package/dist/index87.js +1 -1
  278. package/dist/index87.js.map +1 -1
  279. package/dist/index88.js +1 -1
  280. package/dist/index88.js.map +1 -1
  281. package/dist/index89.js +1 -1
  282. package/dist/index89.js.map +1 -1
  283. package/dist/index90.js +1 -1
  284. package/dist/index90.js.map +1 -1
  285. package/dist/index91.js +1 -1
  286. package/dist/index91.js.map +1 -1
  287. package/dist/index92.js +1 -1
  288. package/dist/index92.js.map +1 -1
  289. package/dist/index93.js +1 -1
  290. package/dist/index93.js.map +1 -1
  291. package/dist/index94.js +1 -1
  292. package/dist/index94.js.map +1 -1
  293. package/dist/index95.js +1 -1
  294. package/dist/index95.js.map +1 -1
  295. package/dist/index96.js +1 -1
  296. package/dist/index96.js.map +1 -1
  297. package/dist/index97.js +2 -2
  298. package/dist/index97.js.map +1 -1
  299. package/dist/index98.js +1 -1
  300. package/dist/index98.js.map +1 -1
  301. package/dist/index99.js +2 -2
  302. package/dist/index99.js.map +1 -1
  303. package/package.json +2 -3
  304. package/dist/index188.js +0 -27
  305. package/dist/index188.js.map +0 -1
  306. package/dist/index71.js +0 -5
  307. package/dist/index71.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index183.js","sources":["../src/utils/a11y/elementVisibility.ts"],"sourcesContent":["/**\n * Checks if an element is visible in the DOM.\n * \n * An element is considered visible if:\n * - It exists in the DOM\n * - It's not hidden via CSS (display: none, visibility: hidden)\n * - It has actual dimensions (width > 0 and height > 0)\n * \n * @param element - The element to check, or null\n * @returns true if the element is visible, false otherwise\n * \n * @example\n * const element = document.getElementById('my-element');\n * if (isElementVisible(element)) {\n * // Element is visible\n * }\n */\nexport function isElementVisible(element: HTMLElement | null): boolean {\n if (!element) return false;\n\n // Check computed style for display/visibility\n const style = window.getComputedStyle(element);\n if (style.display === 'none' || style.visibility === 'hidden') {\n return false;\n }\n\n // Check if element has dimensions\n const rect = element.getBoundingClientRect();\n return rect.width > 0 && rect.height > 0;\n}\n"],"names":["isElementVisible","element","style","window","getComputedStyle","display","visibility","rect","getBoundingClientRect","width","height"],"mappings":"AAiBO,SAASA,EAAiBC,GAAsC;AACrE,MAAI,CAACA,EAAS,QAAO;AAGrB,QAAMC,IAAQC,OAAOC,iBAAiBH,CAAO;AAC7C,MAAIC,EAAMG,YAAY,UAAUH,EAAMI,eAAe;AACnD,WAAO;AAIT,QAAMC,IAAON,EAAQO,sBAAAA;AACrB,SAAOD,EAAKE,QAAQ,KAAKF,EAAKG,SAAS;AACzC;"}
1
+ {"version":3,"file":"index183.js","sources":["../node_modules/react-svg/dist/react-svg.esm.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/objectWithoutPropertiesLoose';\nimport _extends from '@babel/runtime/helpers/extends';\nimport _inheritsLoose from '@babel/runtime/helpers/inheritsLoose';\nimport { SVGInjector } from '@tanem/svg-injector';\nimport * as PropTypes from 'prop-types';\nimport * as React from 'react';\n\n// Hat-tip: https://github.com/mui/material-ui/tree/master/packages/mui-utils/src.\nvar ownerWindow = function ownerWindow(node) {\n var doc = (node == null ? void 0 : node.ownerDocument) || document;\n return doc.defaultView || window;\n};\n\n// Hat-tip: https://github.com/developit/preact-compat/blob/master/src/index.js#L402.\nvar shallowDiffers = function shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) {\n return true;\n }\n }\n for (var _i in b) {\n if (a[_i] !== b[_i]) {\n return true;\n }\n }\n return false;\n};\n\nvar _excluded = [\"afterInjection\", \"beforeInjection\", \"desc\", \"evalScripts\", \"fallback\", \"httpRequestWithCredentials\", \"loading\", \"renumerateIRIElements\", \"src\", \"title\", \"useRequestCache\", \"wrapper\"];\nvar svgNamespace = 'http://www.w3.org/2000/svg';\nvar xlinkNamespace = 'http://www.w3.org/1999/xlink';\nvar ReactSVG = /*#__PURE__*/function (_React$Component) {\n function ReactSVG() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.initialState = {\n hasError: false,\n isLoading: true\n };\n _this.state = _this.initialState;\n _this._isMounted = false;\n _this.reactWrapper = void 0;\n _this.nonReactWrapper = void 0;\n _this.refCallback = function (reactWrapper) {\n _this.reactWrapper = reactWrapper;\n };\n return _this;\n }\n _inheritsLoose(ReactSVG, _React$Component);\n var _proto = ReactSVG.prototype;\n _proto.renderSVG = function renderSVG() {\n var _this2 = this;\n /* istanbul ignore else */\n if (this.reactWrapper instanceof ownerWindow(this.reactWrapper).Node) {\n var _this$props = this.props,\n desc = _this$props.desc,\n evalScripts = _this$props.evalScripts,\n httpRequestWithCredentials = _this$props.httpRequestWithCredentials,\n renumerateIRIElements = _this$props.renumerateIRIElements,\n src = _this$props.src,\n title = _this$props.title,\n useRequestCache = _this$props.useRequestCache;\n /* eslint-disable @typescript-eslint/no-non-null-assertion */\n var onError = this.props.onError;\n var beforeInjection = this.props.beforeInjection;\n var afterInjection = this.props.afterInjection;\n var wrapper = this.props.wrapper;\n var nonReactWrapper;\n var nonReactTarget;\n if (wrapper === 'svg') {\n nonReactWrapper = document.createElementNS(svgNamespace, wrapper);\n nonReactWrapper.setAttribute('xmlns', svgNamespace);\n nonReactWrapper.setAttribute('xmlns:xlink', xlinkNamespace);\n nonReactTarget = document.createElementNS(svgNamespace, wrapper);\n } else {\n nonReactWrapper = document.createElement(wrapper);\n nonReactTarget = document.createElement(wrapper);\n }\n nonReactWrapper.appendChild(nonReactTarget);\n nonReactTarget.dataset.src = src;\n this.nonReactWrapper = this.reactWrapper.appendChild(nonReactWrapper);\n var handleError = function handleError(error) {\n _this2.removeSVG();\n if (!_this2._isMounted) {\n onError(error);\n return;\n }\n _this2.setState(function () {\n return {\n hasError: true,\n isLoading: false\n };\n }, function () {\n onError(error);\n });\n };\n var afterEach = function afterEach(error, svg) {\n if (error) {\n handleError(error);\n return;\n }\n // TODO (Tane): It'd be better to cleanly unsubscribe from SVGInjector\n // callbacks instead of tracking a property like this.\n if (_this2._isMounted) {\n _this2.setState(function () {\n return {\n isLoading: false\n };\n }, function () {\n try {\n afterInjection(svg);\n } catch (afterInjectionError) {\n handleError(afterInjectionError);\n }\n });\n }\n };\n var beforeEach = function beforeEach(svg) {\n svg.setAttribute('role', 'img');\n if (desc) {\n var originalDesc = svg.querySelector(':scope > desc');\n if (originalDesc) {\n svg.removeChild(originalDesc);\n }\n var newDesc = document.createElement('desc');\n newDesc.innerHTML = desc;\n svg.prepend(newDesc);\n }\n if (title) {\n var originalTitle = svg.querySelector(':scope > title');\n if (originalTitle) {\n svg.removeChild(originalTitle);\n }\n var newTitle = document.createElement('title');\n newTitle.innerHTML = title;\n svg.prepend(newTitle);\n }\n try {\n beforeInjection(svg);\n } catch (error) {\n handleError(error);\n }\n };\n SVGInjector(nonReactTarget, {\n afterEach: afterEach,\n beforeEach: beforeEach,\n cacheRequests: useRequestCache,\n evalScripts: evalScripts,\n httpRequestWithCredentials: httpRequestWithCredentials,\n renumerateIRIElements: renumerateIRIElements\n });\n }\n };\n _proto.removeSVG = function removeSVG() {\n var _this$nonReactWrapper;\n if ((_this$nonReactWrapper = this.nonReactWrapper) != null && _this$nonReactWrapper.parentNode) {\n this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper);\n this.nonReactWrapper = null;\n }\n };\n _proto.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n this.renderSVG();\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this3 = this;\n if (shallowDiffers(_extends({}, prevProps), this.props)) {\n this.setState(function () {\n return _this3.initialState;\n }, function () {\n _this3.removeSVG();\n _this3.renderSVG();\n });\n }\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this._isMounted = false;\n this.removeSVG();\n };\n _proto.render = function render() {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n var _this$props2 = this.props;\n _this$props2.afterInjection;\n _this$props2.beforeInjection;\n _this$props2.desc;\n _this$props2.evalScripts;\n var Fallback = _this$props2.fallback;\n _this$props2.httpRequestWithCredentials;\n var Loading = _this$props2.loading;\n _this$props2.renumerateIRIElements;\n _this$props2.src;\n _this$props2.title;\n _this$props2.useRequestCache;\n var wrapper = _this$props2.wrapper,\n rest = _objectWithoutPropertiesLoose(_this$props2, _excluded);\n /* eslint-enable @typescript-eslint/no-unused-vars */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var Wrapper = wrapper;\n return /*#__PURE__*/React.createElement(Wrapper, _extends({}, rest, {\n ref: this.refCallback\n }, wrapper === 'svg' ? {\n xmlns: svgNamespace,\n xmlnsXlink: xlinkNamespace\n } : {}), this.state.isLoading && Loading && /*#__PURE__*/React.createElement(Loading, null), this.state.hasError && Fallback && /*#__PURE__*/React.createElement(Fallback, null));\n };\n return ReactSVG;\n}(React.Component);\nReactSVG.defaultProps = {\n afterInjection: function afterInjection() {\n return undefined;\n },\n beforeInjection: function beforeInjection() {\n return undefined;\n },\n desc: '',\n evalScripts: 'never',\n fallback: null,\n httpRequestWithCredentials: false,\n loading: null,\n onError: function onError() {\n return undefined;\n },\n renumerateIRIElements: true,\n title: '',\n useRequestCache: true,\n wrapper: 'div'\n};\nReactSVG.propTypes = {\n afterInjection: PropTypes.func,\n beforeInjection: PropTypes.func,\n desc: PropTypes.string,\n evalScripts: PropTypes.oneOf(['always', 'once', 'never']),\n fallback: PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.string]),\n httpRequestWithCredentials: PropTypes.bool,\n loading: PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.string]),\n onError: PropTypes.func,\n renumerateIRIElements: PropTypes.bool,\n src: PropTypes.string.isRequired,\n title: PropTypes.string,\n useRequestCache: PropTypes.bool,\n wrapper: PropTypes.oneOf(['div', 'span', 'svg'])\n} ;\n\nexport { ReactSVG };\n//# sourceMappingURL=react-svg.esm.js.map\n"],"names":["_objectWithoutPropertiesLoose","_extends","_inheritsLoose","SVGInjector","propTypesExports","React","ownerWindow","node","doc","shallowDiffers","a","b","i","_i","_excluded","svgNamespace","xlinkNamespace","ReactSVG","_React$Component","_this","_len","args","_key","reactWrapper","_proto","_this2","_this$props","desc","evalScripts","httpRequestWithCredentials","renumerateIRIElements","src","title","useRequestCache","onError","beforeInjection","afterInjection","wrapper","nonReactWrapper","nonReactTarget","handleError","error","afterEach","svg","afterInjectionError","beforeEach","originalDesc","newDesc","originalTitle","newTitle","_this$nonReactWrapper","prevProps","_this3","_this$props2","Fallback","Loading","rest","Wrapper","PropTypes.func","PropTypes.string","PropTypes.oneOf","PropTypes.oneOfType","PropTypes.object","PropTypes.bool"],"mappings":"AAOA,OAAAA,OAAA;AAAA,OAAAC,OAAA;AAAA,OAAAC,OAAA;AAAA,SAAA,eAAAC,SAAA;AAAA,SAAA,KAAAC,SAAA;AAAA,YAAAC,OAAA;AACA,IAAIC,IAAc,SAAqBC,GAAM;AAC3C,MAAIC,IAA+BD,GAAK,iBAAkB;AAC1D,SAAOC,EAAI,eAAe;AAC5B,GAGIC,IAAiB,SAAwBC,GAAGC,GAAG;AACjD,WAASC,KAAKF;AACZ,QAAI,EAAEE,KAAKD;AACT,aAAO;AAGX,WAASE,KAAMF;AACb,QAAID,EAAEG,CAAE,MAAMF,EAAEE,CAAE;AAChB,aAAO;AAGX,SAAO;AACT,GAEIC,IAAY,CAAC,kBAAkB,mBAAmB,QAAQ,eAAe,YAAY,8BAA8B,WAAW,yBAAyB,OAAO,SAAS,mBAAmB,SAAS,GACnMC,IAAe,8BACfC,IAAiB,gCACjBC,IAAwB,yBAAUC,GAAkB;AACtD,WAASD,IAAW;AAElB,aADI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AlD,EAAM,cAAckD,GAAS,IAAI,GAAG,KAAK,MAAM,YAAYD,KAAyB,gBAAAjD,EAAM,cAAciD,GAAU,IAAI,CAAC;AAAA,EAClL,GACOrC;AACT,EAAEZ,EAAM,SAAS;AACjBY,EAAS,eAAe;AAAA,EACtB,gBAAgB,WAA0B;AAAA,EAE1C;AAAA,EACA,iBAAiB,WAA2B;AAAA,EAE5C;AAAA,EACA,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AAAA,EACV,4BAA4B;AAAA,EAC5B,SAAS;AAAA,EACT,SAAS,WAAmB;AAAA,EAE5B;AAAA,EACA,uBAAuB;AAAA,EACvB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,SAAS;AACX;AACAA,EAAS,YAAY;AAAA,EACnB,gBAAgByC,EAAAA;AAAAA,EAChB,iBAAiBA,EAAAA;AAAAA,EACjB,MAAMC,EAAAA;AAAAA,EACN,aAAaC,EAAAA,MAAgB,CAAC,UAAU,QAAQ,OAAO,CAAC;AAAA,EACxD,UAAUC,EAAAA,UAAoB,CAACH,EAAAA,MAAgBI,EAAAA,QAAkBH,EAAAA,MAAgB,CAAC;AAAA,EAClF,4BAA4BI,EAAAA;AAAAA,EAC5B,SAASF,EAAAA,UAAoB,CAACH,EAAAA,MAAgBI,EAAAA,QAAkBH,EAAAA,MAAgB,CAAC;AAAA,EACjF,SAASD,EAAAA;AAAAA,EACT,uBAAuBK,EAAAA;AAAAA,EACvB,KAAKJ,EAAAA,OAAiB;AAAA,EACtB,OAAOA,EAAAA;AAAAA,EACP,iBAAiBI,EAAAA;AAAAA,EACjB,SAASH,EAAAA,MAAgB,CAAC,OAAO,QAAQ,KAAK,CAAC;AACjD;","x_google_ignoreList":[0]}
package/dist/index184.js CHANGED
@@ -1,9 +1,12 @@
1
- import { useRef as n } from "react";
2
- function u(e, t = "se-id") {
3
- const r = n("");
4
- return r.current || (r.current = `${t}-${crypto.randomUUID()}`), e || r.current;
1
+ function n(i) {
2
+ if (!i) return !1;
3
+ const t = window.getComputedStyle(i);
4
+ if (t.display === "none" || t.visibility === "hidden")
5
+ return !1;
6
+ const e = i.getBoundingClientRect();
7
+ return e.width > 0 && e.height > 0;
5
8
  }
6
9
  export {
7
- u as useStableId
10
+ n as isElementVisible
8
11
  };
9
12
  //# sourceMappingURL=index184.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index184.js","sources":["../src/utils/useStableId.ts"],"sourcesContent":["import { useRef } from 'react';\n\n/**\n * Generates a stable unique ID for component instances (React 16 compatible).\n * Returns the provided id if given, otherwise generates a stable per-mount id.\n * \n * @param id - Optional explicit id\n * @param prefix - Prefix for auto-generated ids (default: 'se-id')\n * @returns Stable id string\n */\nexport function useStableId(id?: string, prefix: string = 'se-id'): string {\n const autoIdRef = useRef<string>('');\n \n if (!autoIdRef.current) {\n autoIdRef.current = `${prefix}-${crypto.randomUUID()}`;\n }\n \n return id || autoIdRef.current;\n}\n\n\n\n\n\n\n\n"],"names":["useRef","useStableId","id","prefix","autoIdRef","current","crypto","randomUUID"],"mappings":"AAUO,SAAA,UAAAA,SAAA;AAAA,SAASC,EAAYC,GAAaC,IAAiB,SAAiB;AACzE,QAAMC,IAAYJ,EAAe,EAAE;AAEnC,SAAKI,EAAUC,YACbD,EAAUC,UAAU,GAAGF,CAAM,IAAIG,OAAOC,YAAY,KAG/CL,KAAME,EAAUC;AACzB;"}
1
+ {"version":3,"file":"index184.js","sources":["../src/utils/a11y/elementVisibility.ts"],"sourcesContent":["/**\n * Checks if an element is visible in the DOM.\n * \n * An element is considered visible if:\n * - It exists in the DOM\n * - It's not hidden via CSS (display: none, visibility: hidden)\n * - It has actual dimensions (width > 0 and height > 0)\n * \n * @param element - The element to check, or null\n * @returns true if the element is visible, false otherwise\n * \n * @example\n * const element = document.getElementById('my-element');\n * if (isElementVisible(element)) {\n * // Element is visible\n * }\n */\nexport function isElementVisible(element: HTMLElement | null): boolean {\n if (!element) return false;\n\n // Check computed style for display/visibility\n const style = window.getComputedStyle(element);\n if (style.display === 'none' || style.visibility === 'hidden') {\n return false;\n }\n\n // Check if element has dimensions\n const rect = element.getBoundingClientRect();\n return rect.width > 0 && rect.height > 0;\n}\n"],"names":["isElementVisible","element","style","window","getComputedStyle","display","visibility","rect","getBoundingClientRect","width","height"],"mappings":"AAiBO,SAASA,EAAiBC,GAAsC;AACrE,MAAI,CAACA,EAAS,QAAO;AAGrB,QAAMC,IAAQC,OAAOC,iBAAiBH,CAAO;AAC7C,MAAIC,EAAMG,YAAY,UAAUH,EAAMI,eAAe;AACnD,WAAO;AAIT,QAAMC,IAAON,EAAQO,sBAAAA;AACrB,SAAOD,EAAKE,QAAQ,KAAKF,EAAKG,SAAS;AACzC;"}
package/dist/index185.js CHANGED
@@ -1,8 +1,9 @@
1
- function o(...n) {
2
- const t = [...new Set(n.filter((e) => !!e).flatMap((e) => e.trim().split(/\s+/)).filter(Boolean))];
3
- return t.length > 0 ? t.join(" ") : void 0;
1
+ import { useRef as n } from "react";
2
+ function u(e, t = "se-id") {
3
+ const r = n("");
4
+ return r.current || (r.current = `${t}-${crypto.randomUUID()}`), e || r.current;
4
5
  }
5
6
  export {
6
- o as mergeIds
7
+ u as useStableId
7
8
  };
8
9
  //# sourceMappingURL=index185.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index185.js","sources":["../src/utils/mergeIds.ts"],"sourcesContent":["/**\n * Merges multiple ID strings into a single space-separated string.\n * Filters out falsy values and deduplicates IDs while preserving order.\n * \n * Useful for ARIA attributes (aria-describedby, aria-labelledby) and class names.\n * \n * @param ids - Array of id strings (or undefined/null)\n * @returns Merged space-separated id string, or undefined if no valid ids\n * \n * @example\n * mergeIds('error-1', undefined, 'helper-1', 'error-1')\n * // Returns: 'error-1 helper-1'\n */\nexport function mergeIds(...ids: (string | undefined | null)[]): string | undefined {\n const uniqueIds = [\n ...new Set(\n ids\n .filter((id): id is string => Boolean(id))\n .flatMap(id => id.trim().split(/\\s+/))\n .filter(Boolean)\n )\n ];\n \n return uniqueIds.length > 0 ? uniqueIds.join(' ') : undefined;\n}\n"],"names":["mergeIds","ids","uniqueIds","Set","filter","id","Boolean","flatMap","trim","split","length","join","undefined"],"mappings":"AAaO,SAASA,KAAYC,GAAwD;AAClF,QAAMC,IAAY,CAChB,GAAG,IAAIC,IACLF,EACGG,OAAO,CAACC,MAAqBC,EAAQD,CAAG,EACxCE,QAAQF,CAAAA,MAAMA,EAAGG,OAAOC,MAAM,KAAK,CAAC,EACpCL,OAAOE,OAAO,CACnB,CAAC;AAGH,SAAOJ,EAAUQ,SAAS,IAAIR,EAAUS,KAAK,GAAG,IAAIC;AACtD;"}
1
+ {"version":3,"file":"index185.js","sources":["../src/utils/useStableId.ts"],"sourcesContent":["import { useRef } from 'react';\n\n/**\n * Generates a stable unique ID for component instances (React 16 compatible).\n * Returns the provided id if given, otherwise generates a stable per-mount id.\n * \n * @param id - Optional explicit id\n * @param prefix - Prefix for auto-generated ids (default: 'se-id')\n * @returns Stable id string\n */\nexport function useStableId(id?: string, prefix: string = 'se-id'): string {\n const autoIdRef = useRef<string>('');\n \n if (!autoIdRef.current) {\n autoIdRef.current = `${prefix}-${crypto.randomUUID()}`;\n }\n \n return id || autoIdRef.current;\n}\n\n\n\n\n\n\n\n"],"names":["useRef","useStableId","id","prefix","autoIdRef","current","crypto","randomUUID"],"mappings":"AAUO,SAAA,UAAAA,SAAA;AAAA,SAASC,EAAYC,GAAaC,IAAiB,SAAiB;AACzE,QAAMC,IAAYJ,EAAe,EAAE;AAEnC,SAAKI,EAAUC,YACbD,EAAUC,UAAU,GAAGF,CAAM,IAAIG,OAAOC,YAAY,KAG/CL,KAAME,EAAUC;AACzB;"}
@@ -0,0 +1,8 @@
1
+ function o(...n) {
2
+ const t = [...new Set(n.filter((e) => !!e).flatMap((e) => e.trim().split(/\s+/)).filter(Boolean))];
3
+ return t.length > 0 ? t.join(" ") : void 0;
4
+ }
5
+ export {
6
+ o as mergeIds
7
+ };
8
+ //# sourceMappingURL=index186.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index186.js","sources":["../src/utils/mergeIds.ts"],"sourcesContent":["/**\n * Merges multiple ID strings into a single space-separated string.\n * Filters out falsy values and deduplicates IDs while preserving order.\n * \n * Useful for ARIA attributes (aria-describedby, aria-labelledby) and class names.\n * \n * @param ids - Array of id strings (or undefined/null)\n * @returns Merged space-separated id string, or undefined if no valid ids\n * \n * @example\n * mergeIds('error-1', undefined, 'helper-1', 'error-1')\n * // Returns: 'error-1 helper-1'\n */\nexport function mergeIds(...ids: (string | undefined | null)[]): string | undefined {\n const uniqueIds = [\n ...new Set(\n ids\n .filter((id): id is string => Boolean(id))\n .flatMap(id => id.trim().split(/\\s+/))\n .filter(Boolean)\n )\n ];\n \n return uniqueIds.length > 0 ? uniqueIds.join(' ') : undefined;\n}\n"],"names":["mergeIds","ids","uniqueIds","Set","filter","id","Boolean","flatMap","trim","split","length","join","undefined"],"mappings":"AAaO,SAASA,KAAYC,GAAwD;AAClF,QAAMC,IAAY,CAChB,GAAG,IAAIC,IACLF,EACGG,OAAO,CAACC,MAAqBC,EAAQD,CAAG,EACxCE,QAAQF,CAAAA,MAAMA,EAAGG,OAAOC,MAAM,KAAK,CAAC,EACpCL,OAAOE,OAAO,CACnB,CAAC;AAGH,SAAOJ,EAAUQ,SAAS,IAAIR,EAAUS,KAAK,GAAG,IAAIC;AACtD;"}
package/dist/index189.js CHANGED
@@ -1,65 +1,27 @@
1
- import * as o from "react";
2
- function w({
3
- itemIds: t,
4
- tabIndex: p = 0,
5
- defaultFocusedId: l,
6
- orientation: f = "horizontal",
7
- loop: u = !0,
8
- onFocusChange: h
1
+ import * as e from "react";
2
+ function p({
3
+ disabled: t = !1,
4
+ onFocusIn: u,
5
+ onFocusOut: n,
6
+ onEscape: a,
7
+ closeOnEscape: c = !0
9
8
  }) {
10
- const [a, g] = o.useState(l || t[0] || ""), k = o.useRef({});
11
- o.useEffect(() => {
12
- if (t.length > 0 && !t.includes(a)) {
13
- const e = l || t[0] || "";
14
- g(e);
15
- }
16
- }, [t, a, l]);
17
- const v = o.useCallback((e) => {
18
- g(e), h?.(e);
19
- }, [h]), s = o.useCallback((e) => {
20
- if (t.length === 0) return;
21
- const c = t.indexOf(a), n = Math.max(0, c);
22
- let r = n;
23
- switch (e) {
24
- case "first":
25
- r = 0;
26
- break;
27
- case "last":
28
- r = t.length - 1;
29
- break;
30
- case "prev":
31
- u ? r = (n - 1 + t.length) % t.length : r = Math.max(0, n - 1);
32
- break;
33
- case "next":
34
- u ? r = (n + 1) % t.length : r = Math.min(t.length - 1, n + 1);
35
- break;
36
- }
37
- const x = t[r];
38
- x && k.current[x]?.focus();
39
- }, [t, a, u]), i = o.useCallback((e) => ({
40
- ref: (c) => {
41
- k.current[e] = c;
42
- },
43
- tabIndex: a === e ? p : -1
44
- }), [a, p]), b = o.useCallback((e) => {
45
- if (e.key === "Home") {
46
- e.preventDefault(), e.stopPropagation(), s("first");
47
- return;
48
- }
49
- if (e.key === "End") {
50
- e.preventDefault(), e.stopPropagation(), s("last");
51
- return;
52
- }
53
- const c = f === "horizontal" ? "ArrowLeft" : "ArrowUp", n = f === "horizontal" ? "ArrowRight" : "ArrowDown";
54
- e.key === c ? (e.preventDefault(), e.stopPropagation(), s("prev")) : e.key === n && (e.preventDefault(), e.stopPropagation(), s("next"));
55
- }, [f, s]);
9
+ const f = e.useCallback((r) => {
10
+ t || u?.();
11
+ }, [t, u]), s = e.useCallback((r) => {
12
+ if (t) return;
13
+ const o = r.relatedTarget;
14
+ o && r.currentTarget.contains(o) || n?.();
15
+ }, [t, n]), C = e.useCallback((r) => {
16
+ t || !c || r.key !== "Escape" || (r.preventDefault(), a?.());
17
+ }, [t, c, a]);
56
18
  return {
57
- setFocusedId: v,
58
- handleKeyDown: b,
59
- getRovingItemProps: i
19
+ onFocusCapture: f,
20
+ onBlurCapture: s,
21
+ onKeyDownCapture: C
60
22
  };
61
23
  }
62
24
  export {
63
- w as useRovingFocus
25
+ p as useDismissOnFocusOut
64
26
  };
65
27
  //# sourceMappingURL=index189.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index189.js","sources":["../src/utils/a11y/useRovingFocus.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type RovingDirection = 'prev' | 'next' | 'first' | 'last';\n\nexport interface UseRovingFocusOptions {\n /**\n * Array of item IDs in order\n */\n itemIds: string[];\n\n /**\n * The tabIndex to apply to the currently focused item in the roving group.\n * Defaults to 0 \n */\n tabIndex?: number;\n\n /**\n * Initial focused item ID. Defaults to first item.\n */\n defaultFocusedId?: string;\n\n /**\n * Orientation for arrow key mapping.\n * - horizontal: ArrowLeft/ArrowRight\n * - vertical: ArrowUp/ArrowDown\n */\n orientation?: 'horizontal' | 'vertical';\n\n /**\n * Whether navigation wraps around at ends. Defaults to true.\n */\n loop?: boolean;\n\n /**\n * Callback when focus changes\n */\n onFocusChange?: (id: string) => void;\n}\n\nexport interface RovingItemProps {\n ref: (el: HTMLElement | null) => void;\n tabIndex: number;\n}\n\nexport interface UseRovingFocusReturn {\n /**\n * Set focused item ID manually\n */\n setFocusedId: (id: string) => void;\n\n /**\n * Keyboard handler for arrow/Home/End navigation.\n * Attach to each item's onKeyDown.\n */\n handleKeyDown: (e: React.KeyboardEvent) => void;\n\n /**\n * Get props for an item in the roving focus group (ref + tabIndex)\n */\n getRovingItemProps: (id: string) => RovingItemProps;\n}\n\n/**\n * Hook for managing roving focus pattern (roving tabindex).\n * Reusable for composite widgets: tabs, toolbars, menus, listboxes, radio groups.\n *\n * @example\n * const { getRovingItemProps, handleKeyDown } = useRovingFocus({\n * itemIds: ['tab1', 'tab2', 'tab3'],\n * orientation: 'horizontal'\n * });\n *\n * // In render:\n * <button {...getRovingItemProps('tab1')} onKeyDown={handleKeyDown}>Tab 1</button>\n */\nexport function useRovingFocus({\n itemIds,\n tabIndex = 0,\n defaultFocusedId,\n orientation = 'horizontal',\n loop = true,\n onFocusChange\n}: UseRovingFocusOptions): UseRovingFocusReturn {\n const [focusedId, setFocusedIdState] = React.useState<string>(\n defaultFocusedId || itemIds[0] || ''\n );\n\n const itemRefs = React.useRef<Record<string, HTMLElement | null>>({});\n\n // Sync focusedId if itemIds change and current focusedId is no longer valid\n React.useEffect(() => {\n if (itemIds.length > 0 && !itemIds.includes(focusedId)) {\n const newFocusedId = defaultFocusedId || itemIds[0] || '';\n setFocusedIdState(newFocusedId);\n }\n }, [itemIds, focusedId, defaultFocusedId]);\n\n const setFocusedId = React.useCallback(\n (id: string) => {\n setFocusedIdState(id);\n onFocusChange?.(id);\n },\n [onFocusChange]\n );\n\n const moveFocus = React.useCallback(\n (direction: RovingDirection) => {\n if (itemIds.length === 0) return;\n\n const currentIdx = itemIds.indexOf(focusedId);\n const safeIdx = Math.max(0, currentIdx);\n let nextIdx = safeIdx;\n\n switch (direction) {\n case 'first':\n nextIdx = 0;\n break;\n case 'last':\n nextIdx = itemIds.length - 1;\n break;\n case 'prev':\n if (loop) {\n nextIdx = (safeIdx - 1 + itemIds.length) % itemIds.length;\n } else {\n nextIdx = Math.max(0, safeIdx - 1);\n }\n break;\n case 'next':\n if (loop) {\n nextIdx = (safeIdx + 1) % itemIds.length;\n } else {\n nextIdx = Math.min(itemIds.length - 1, safeIdx + 1);\n }\n break;\n }\n\n const nextId = itemIds[nextIdx];\n if (!nextId) return;\n\n // Focus the element\n itemRefs.current[nextId]?.focus();\n // Note: We don't call setFocusedId here because the element's onFocus\n // should handle that (follows \"focus follows DOM focus\" pattern)\n },\n [itemIds, focusedId, loop]\n );\n\n const getRovingItemProps = React.useCallback(\n (id: string): RovingItemProps => ({\n ref: (el: HTMLElement | null) => {\n itemRefs.current[id] = el;\n },\n tabIndex: focusedId === id ? tabIndex : -1\n }),\n [focusedId, tabIndex]\n );\n\n // Keyboard handler for arrow/Home/End navigation\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === 'Home') {\n e.preventDefault();\n e.stopPropagation();\n moveFocus('first');\n return;\n }\n if (e.key === 'End') {\n e.preventDefault();\n e.stopPropagation();\n moveFocus('last');\n return;\n }\n\n const prevKey = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n\n if (e.key === prevKey) {\n e.preventDefault();\n e.stopPropagation();\n moveFocus('prev');\n } else if (e.key === nextKey) {\n e.preventDefault();\n e.stopPropagation();\n moveFocus('next');\n }\n },\n [orientation, moveFocus]\n );\n\n return {\n setFocusedId,\n handleKeyDown,\n getRovingItemProps\n };\n}\n"],"names":["React","useRovingFocus","itemIds","tabIndex","defaultFocusedId","orientation","loop","onFocusChange","focusedId","setFocusedIdState","useState","itemRefs","useRef","useEffect","length","includes","newFocusedId","setFocusedId","useCallback","id","moveFocus","direction","currentIdx","indexOf","safeIdx","Math","max","nextIdx","min","nextId","current","focus","getRovingItemProps","ref","el","handleKeyDown","e","key","preventDefault","stopPropagation","prevKey","nextKey"],"mappings":"AA2EO,YAAAA,OAAA;AAAA,SAASC,EAAe;AAAA,EAC7BC,SAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,kBAAAA;AAAAA,EACAC,aAAAA,IAAc;AAAA,EACdC,MAAAA,IAAO;AAAA,EACPC,eAAAA;AACqB,GAAyB;AAC9C,QAAM,CAACC,GAAWC,CAAiB,IAAIT,EAAMU,SAC3CN,KAAoBF,EAAQ,CAAC,KAAK,EACpC,GAEMS,IAAWX,EAAMY,OAA2C,EAAE;AAGpEZ,EAAAA,EAAMa,UAAU,MAAM;AACpB,QAAIX,EAAQY,SAAS,KAAK,CAACZ,EAAQa,SAASP,CAAS,GAAG;AACtD,YAAMQ,IAAeZ,KAAoBF,EAAQ,CAAC,KAAK;AACvDO,MAAAA,EAAkBO,CAAY;AAAA,IAChC;AAAA,EACF,GAAG,CAACd,GAASM,GAAWJ,CAAgB,CAAC;AAEzC,QAAMa,IAAejB,EAAMkB,YACzB,CAACC,MAAe;AACdV,IAAAA,EAAkBU,CAAE,GACpBZ,IAAgBY,CAAE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G,gBAAAA,GACFnB,EAAU,MAAM;AAChB;AAAA,IACF;AAEA,UAAMoB,IAAUnC,MAAgB,eAAe,cAAc,WACvDoC,IAAUpC,MAAgB,eAAe,eAAe;AAE9D,IAAI+B,EAAEC,QAAQG,KACZJ,EAAEE,eAAAA,GACFF,EAAEG,gBAAAA,GACFnB,EAAU,MAAM,KACPgB,EAAEC,QAAQI,MACnBL,EAAEE,eAAAA,GACFF,EAAEG,gBAAAA,GACFnB,EAAU,MAAM;AAAA,EAEpB,GACA,CAACf,GAAae,CAAS,CACzB;AAEA,SAAO;AAAA,IACLH,cAAAA;AAAAA,IACAkB,eAAAA;AAAAA,IACAH,oBAAAA;AAAAA,EAAAA;AAEJ;"}
1
+ {"version":3,"file":"index189.js","sources":["../src/utils/a11y/useDismissOnFocusOut.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type UseDismissOnFocusOutOptions = {\n /**\n * Disable all handlers (no-ops). Useful when a component provides alternate\n * focus/keyboard behavior (e.g., disabled-trigger tooltip wrapper).\n */\n disabled?: boolean;\n /**\n * Called when focus enters anywhere within the target.\n */\n onFocusIn?: () => void;\n /**\n * Called when focus leaves the target (i.e., focus moves to an element\n * outside the currentTarget).\n */\n onFocusOut?: () => void;\n /**\n * Called when Escape is pressed while focus is within the target.\n */\n onEscape?: () => void;\n /**\n * Whether Escape should trigger dismissal. Default: true.\n */\n closeOnEscape?: boolean;\n};\n\nexport type UseDismissOnFocusOutReturn<T extends HTMLElement = HTMLElement> = {\n onFocusCapture: (e: React.FocusEvent<T>) => void;\n onBlurCapture: (e: React.FocusEvent<T>) => void;\n onKeyDownCapture: (e: React.KeyboardEvent<T>) => void;\n};\n\n/**\n * Returns capture-phase handlers to \"show on focus within\" and \"dismiss on focus out\",\n * with optional Escape-to-dismiss.\n *\n * Intended for non-interactive surfaces like tooltips where content should remain\n * visible while focus stays within the wrapper.\n */\nexport function useDismissOnFocusOut<T extends HTMLElement = HTMLElement>({\n disabled = false,\n onFocusIn,\n onFocusOut,\n onEscape,\n closeOnEscape = true\n}: UseDismissOnFocusOutOptions): UseDismissOnFocusOutReturn<T> {\n const onFocusCapture = React.useCallback(\n (_e: React.FocusEvent<T>) => {\n if (disabled) return;\n onFocusIn?.();\n },\n [disabled, onFocusIn]\n );\n\n const onBlurCapture = React.useCallback(\n (e: React.FocusEvent<T>) => {\n if (disabled) return;\n\n const nextFocused = e.relatedTarget as Node | null;\n if (nextFocused && e.currentTarget.contains(nextFocused)) return;\n\n onFocusOut?.();\n },\n [disabled, onFocusOut]\n );\n\n const onKeyDownCapture = React.useCallback(\n (e: React.KeyboardEvent<T>) => {\n if (disabled || !closeOnEscape || e.key !== 'Escape') return;\n\n e.preventDefault();\n onEscape?.();\n },\n [disabled, closeOnEscape, onEscape]\n );\n\n return { onFocusCapture, onBlurCapture, onKeyDownCapture };\n}\n\n"],"names":["React","useDismissOnFocusOut","disabled","onFocusIn","onFocusOut","onEscape","closeOnEscape","onFocusCapture","useCallback","_e","onBlurCapture","e","nextFocused","relatedTarget","currentTarget","contains","onKeyDownCapture","key","preventDefault"],"mappings":"AAwCO,YAAAA,OAAA;AAAA,SAASC,EAA0D;AAAA,EACxEC,UAAAA,IAAW;AAAA,EACXC,WAAAA;AAAAA,EACAC,YAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,eAAAA,IAAgB;AACW,GAAkC;AAC7D,QAAMC,IAAiBP,EAAMQ,YAC3B,CAACC,MAA4B;AAC3B,IAAIP,KACJC,IAAAA;AAAAA,EACF,GACA,CAACD,GAAUC,CAAS,CACtB,GAEMO,IAAgBV,EAAMQ,YAC1B,CAACG,MAA2B;AAC1B,QAAIT,EAAU;AAEd,UAAMU,IAAcD,EAAEE;AACtB,IAAID,KAAeD,EAAEG,cAAcC,SAASH,CAAW,KAEvDR,IAAAA;AAAAA,EACF,GACA,CAACF,GAAUE,CAAU,CACvB,GAEMY,IAAmBhB,EAAMQ,YAC7B,CAACG,MAA8B;AAC7B,IAAIT,KAAY,CAACI,KAAiBK,EAAEM,QAAQ,aAE5CN,EAAEO,eAAAA,GACFb,IAAAA;AAAAA,EACF,GACA,CAACH,GAAUI,GAAeD,CAAQ,CACpC;AAEA,SAAO;AAAA,IAAEE,gBAAAA;AAAAA,IAAgBG,eAAAA;AAAAA,IAAeM,kBAAAA;AAAAA,EAAAA;AAC1C;"}
package/dist/index191.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useRef as u, useCallback as f, useEffect as P } from "react";
2
2
  import { useComboboxNavigation as y } from "./index225.js";
3
- import { useDismissOnFocusOut as R } from "./index188.js";
3
+ import { useDismissOnFocusOut as R } from "./index189.js";
4
4
  function M({
5
5
  items: l,
6
6
  isOpen: t,
package/dist/index212.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useCallback as d } from "react";
2
- import { useRovingFocus as g } from "./index189.js";
2
+ import { useRovingFocus as g } from "./index68.js";
3
3
  const u = (e, t) => `tab${t ? `-${t}` : ""}-${e}`, c = (e, t) => `panel${t ? `-${t}` : ""}-${e}`;
4
4
  function P({
5
5
  itemIds: e,
package/dist/index22.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import i, { useState as D, useEffect as O } from "react";
2
- import { useStableId as S } from "./index184.js";
3
- import { getA11yNameAttributes as _ } from "./index69.js";
4
- import { mergeIds as $ } from "./index185.js";
2
+ import { useStableId as S } from "./index185.js";
3
+ import { getA11yNameAttributes as _ } from "./index70.js";
4
+ import { mergeIds as $ } from "./index186.js";
5
5
  /* empty css */
6
6
  function b() {
7
7
  return b = Object.assign ? Object.assign.bind() : function(s) {
package/dist/index224.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useRef as E, useLayoutEffect as f } from "react";
2
- import { getFirstFocusableElement as d, getFocusableElements as g } from "./index226.js";
2
+ import { getFirstFocusableElement as d, getFocusableElements as g } from "./index231.js";
3
3
  function y(e, t) {
4
4
  return t === "first" ? d({
5
5
  container: e
package/dist/index225.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useState as m, useEffect as w, useCallback as b } from "react";
2
- import { useScrollActiveIntoView as x } from "./index227.js";
2
+ import { useScrollActiveIntoView as x } from "./index232.js";
3
3
  function E({
4
4
  items: u,
5
5
  isOpen: t,
package/dist/index226.js CHANGED
@@ -1,25 +1,13 @@
1
- const l = ["button:not([disabled])", "[href]", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])", '[tabindex]:not([tabindex="-1"]):not([disabled])', '[contenteditable="true"]'].join(", "), a = [l, '[role="menuitem"]', '[role="option"]', '[role="menuitemcheckbox"]', '[role="menuitemradio"]'].join(", ");
2
- function u({
3
- container: e,
4
- includeRoles: t = !1,
5
- additionalSelectors: r = [],
6
- filterHidden: s = !1
7
- }) {
8
- if (!e) return [];
9
- const d = [t ? a : l, ...r].filter(Boolean).join(", "), i = Array.from(e.querySelectorAll(d));
10
- return s ? i.filter((n) => {
11
- const o = window.getComputedStyle(n);
12
- return o.display !== "none" && o.visibility !== "hidden" && o.opacity !== "0" && !n.hasAttribute("hidden") && n.offsetWidth > 0 && n.offsetHeight > 0;
13
- }) : i;
14
- }
15
- function c(e) {
16
- const t = u(e);
17
- return t.length > 0 ? t[0] : null;
1
+ function r(t, i) {
2
+ if (t == null) return {};
3
+ var o = {};
4
+ for (var e in t) if ({}.hasOwnProperty.call(t, e)) {
5
+ if (i.indexOf(e) !== -1) continue;
6
+ o[e] = t[e];
7
+ }
8
+ return o;
18
9
  }
19
10
  export {
20
- l as FOCUSABLE_SELECTOR,
21
- a as FOCUSABLE_WITH_ROLES_SELECTOR,
22
- c as getFirstFocusableElement,
23
- u as getFocusableElements
11
+ r as default
24
12
  };
25
13
  //# sourceMappingURL=index226.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index226.js","sources":["../src/utils/a11y/focusableElements.ts"],"sourcesContent":["/**\n * Utilities for finding focusable elements within a container.\n * \n * Used for focus management in modals, popovers, and other interactive overlays.\n */\n\n/**\n * Base selector for standard focusable elements.\n * Matches: buttons, links, inputs, selects, textareas, elements with tabindex >= 0, contenteditable.\n */\nexport const FOCUSABLE_SELECTOR = [\n 'button:not([disabled])',\n '[href]',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"]):not([disabled])',\n '[contenteditable=\"true\"]'\n].join(', ');\n\n/**\n * Extended selector that includes ARIA role-based focusable elements.\n * Useful for composite widgets like menus, listboxes, etc.\n */\nexport const FOCUSABLE_WITH_ROLES_SELECTOR = [\n FOCUSABLE_SELECTOR,\n '[role=\"menuitem\"]',\n '[role=\"option\"]',\n '[role=\"menuitemcheckbox\"]',\n '[role=\"menuitemradio\"]'\n].join(', ');\n\n/**\n * Options for getFocusableElements\n */\nexport interface GetFocusableElementsOptions {\n /**\n * Container element to search within. If null/undefined, returns empty array.\n */\n container: HTMLElement | null;\n /**\n * Whether to include role-based focusable elements (menuitem, option, etc.).\n * Default: false (uses base selector only)\n */\n includeRoles?: boolean;\n /**\n * Additional custom selectors to include.\n */\n additionalSelectors?: string[];\n /**\n * Whether to filter out hidden/invisible elements.\n * Default: false (returns all matching elements regardless of visibility)\n */\n filterHidden?: boolean;\n}\n\n/**\n * Get all focusable elements within a container.\n * \n * @example Basic usage (standard focusable elements)\n * ```ts\n * const focusables = getFocusableElements({ container: dialogRef.current });\n * focusables[0]?.focus(); // Focus first element\n * ```\n * \n * @example With role-based elements (for menus/listboxes)\n * ```ts\n * const focusables = getFocusableElements({ \n * container: menuRef.current,\n * includeRoles: true \n * });\n * ```\n * \n * @example With custom selectors\n * ```ts\n * const focusables = getFocusableElements({ \n * container: customWidgetRef.current,\n * additionalSelectors: ['[data-focusable=\"true\"]']\n * });\n * ```\n */\nexport function getFocusableElements({\n container,\n includeRoles = false,\n additionalSelectors = [],\n filterHidden = false\n}: GetFocusableElementsOptions): HTMLElement[] {\n if (!container) return [];\n\n const selector = [\n includeRoles ? FOCUSABLE_WITH_ROLES_SELECTOR : FOCUSABLE_SELECTOR,\n ...additionalSelectors\n ].filter(Boolean).join(', ');\n\n const elements = Array.from(container.querySelectorAll<HTMLElement>(selector));\n\n if (!filterHidden) return elements;\n\n // Filter out hidden/invisible elements\n return elements.filter((el) => {\n const style = window.getComputedStyle(el);\n return (\n style.display !== 'none' &&\n style.visibility !== 'hidden' &&\n style.opacity !== '0' &&\n !el.hasAttribute('hidden') &&\n el.offsetWidth > 0 &&\n el.offsetHeight > 0\n );\n });\n}\n\n/**\n * Get the first focusable element in a container.\n * Returns null if none found.\n */\nexport function getFirstFocusableElement(\n options: GetFocusableElementsOptions\n): HTMLElement | null {\n const focusables = getFocusableElements(options);\n return focusables.length > 0 ? focusables[0] : null;\n}\n\n/**\n * Get the last focusable element in a container.\n * Returns null if none found.\n */\nexport function getLastFocusableElement(\n options: GetFocusableElementsOptions\n): HTMLElement | null {\n const focusables = getFocusableElements(options);\n return focusables.length > 0 ? focusables[focusables.length - 1] : null;\n}\n"],"names":["FOCUSABLE_SELECTOR","join","FOCUSABLE_WITH_ROLES_SELECTOR","getFocusableElements","container","includeRoles","additionalSelectors","filterHidden","selector","filter","Boolean","elements","Array","from","querySelectorAll","el","style","window","getComputedStyle","display","visibility","opacity","hasAttribute","offsetWidth","offsetHeight","getFirstFocusableElement","options","focusables","length"],"mappings":"AAUO,MAAMA,IAAqB,CAChC,0BACA,UACA,yBACA,0BACA,4BACA,mDACA,0BAA0B,EAC1BC,KAAK,IAAI,GAMEC,IAAgC,CAC3CF,GACA,qBACA,mBACA,6BACA,wBAAwB,EACxBC,KAAK,IAAI;AAmDJ,SAASE,EAAqB;AAAA,EACnCC,WAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,qBAAAA,IAAsB,CAAA;AAAA,EACtBC,cAAAA,IAAe;AACY,GAAkB;AAC7C,MAAI,CAACH,EAAW,QAAO,CAAA;AAEvB,QAAMI,IAAW,CACfH,IAAeH,IAAgCF,GAC/C,GAAGM,CAAmB,EACtBG,OAAOC,OAAO,EAAET,KAAK,IAAI,GAErBU,IAAWC,MAAMC,KAAKT,EAAUU,iBAA8BN,CAAQ,CAAC;AAE7E,SAAKD,IAGEI,EAASF,OAAQM,CAAAA,MAAO;AAC7B,UAAMC,IAAQC,OAAOC,iBAAiBH,CAAE;AACxC,WACEC,EAAMG,YAAY,UAClBH,EAAMI,eAAe,YACrBJ,EAAMK,YAAY,OAClB,CAACN,EAAGO,aAAa,QAAQ,KACzBP,EAAGQ,cAAc,KACjBR,EAAGS,eAAe;AAAA,EAEtB,CAAC,IAbyBb;AAc5B;AAMO,SAASc,EACdC,GACoB;AACpB,QAAMC,IAAaxB,EAAqBuB,CAAO;AAC/C,SAAOC,EAAWC,SAAS,IAAID,EAAW,CAAC,IAAI;AACjD;"}
1
+ {"version":3,"file":"index226.js","sources":["../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"sourcesContent":["function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };"],"names":["_objectWithoutPropertiesLoose","r","e","t","n"],"mappings":"AAAA,SAASA,EAA8BC,GAAGC,GAAG;AAC3C,MAAYD,KAAR,KAAW,QAAO,CAAA;AACtB,MAAIE,IAAI,CAAA;AACR,WAASC,KAAKH,EAAG,KAAI,CAAA,EAAG,eAAe,KAAKA,GAAGG,CAAC,GAAG;AACjD,QAAWF,EAAE,QAAQE,CAAC,MAAlB,GAAqB;AACzB,IAAAD,EAAEC,CAAC,IAAIH,EAAEG,CAAC;AAAA,EACZ;AACA,SAAOD;AACT;","x_google_ignoreList":[0]}
package/dist/index227.js CHANGED
@@ -1,22 +1,13 @@
1
- import { useEffect as s } from "react";
2
- const u = {
3
- block: "nearest"
4
- };
5
- function m({
6
- containerRef: t,
7
- activeIndex: o,
8
- itemSelector: r = '[role="option"]',
9
- enabled: c = !0,
10
- scrollOptions: e = u
11
- }) {
12
- s(() => {
13
- if (!c || o < 0 || !t?.current)
14
- return;
15
- const n = t.current.querySelectorAll(r)[o];
16
- n && n.scrollIntoView(e);
17
- }, [o, t, r, c, e]);
1
+ function e() {
2
+ return e = Object.assign ? Object.assign.bind() : function(t) {
3
+ for (var n = 1; n < arguments.length; n++) {
4
+ var a = arguments[n];
5
+ for (var r in a) ({}).hasOwnProperty.call(a, r) && (t[r] = a[r]);
6
+ }
7
+ return t;
8
+ }, e.apply(null, arguments);
18
9
  }
19
10
  export {
20
- m as useScrollActiveIntoView
11
+ e as default
21
12
  };
22
13
  //# sourceMappingURL=index227.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index227.js","sources":["../src/utils/a11y/useScrollActiveIntoView.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport type { RefObject } from 'react';\n\nconst DEFAULT_SCROLL_OPTIONS: ScrollIntoViewOptions = { block: 'nearest' };\n\nexport interface UseScrollActiveIntoViewOptions {\n /**\n * Ref to the container element\n */\n containerRef?: RefObject<HTMLElement | null>;\n \n /**\n * Index of the currently active/highlighted item (-1 if none)\n */\n activeIndex: number;\n \n /**\n * CSS selector for item elements\n * Default: '[role=\"option\"]'\n */\n itemSelector?: string;\n \n /**\n * Whether scrolling is enabled\n * Default: true\n */\n enabled?: boolean;\n \n /**\n * ScrollIntoView options\n * Default: { block: 'nearest' }\n */\n scrollOptions?: ScrollIntoViewOptions;\n}\n\n/**\n * Hook to automatically scroll the active item into view.\n * \n * Useful for aria-activedescendant patterns where DOM focus stays\n * on the container (e.g., input field) but we need to visually show\n * which descendant option is logically active.\n * \n * Common use cases:\n * - Combobox dropdown options\n * - Menu items with virtual focus\n * - Grid cells with keyboard navigation\n * - Tree view items\n * - Listbox options\n * \n * @example\n * ```tsx\n * const [highlightedIndex, setHighlightedIndex] = useState(-1);\n * const listboxRef = useRef<HTMLDivElement>(null);\n * \n * useScrollActiveIntoView({\n * containerRef: listboxRef,\n * activeIndex: highlightedIndex,\n * itemSelector: '[role=\"option\"]'\n * });\n * \n * // Now when highlightedIndex changes, the item scrolls into view\n * ```\n * \n * @example Custom scroll behavior\n * ```tsx\n * useScrollActiveIntoView({\n * containerRef: menuRef,\n * activeIndex: activeMenuIndex,\n * itemSelector: '[role=\"menuitem\"]',\n * scrollOptions: { block: 'center', behavior: 'smooth' }\n * });\n * ```\n */\nexport function useScrollActiveIntoView({\n containerRef,\n activeIndex,\n itemSelector = '[role=\"option\"]',\n enabled = true,\n scrollOptions = DEFAULT_SCROLL_OPTIONS\n}: UseScrollActiveIntoViewOptions): void {\n useEffect(() => {\n // Early returns for disabled states\n if (!enabled || activeIndex < 0 || !containerRef?.current) {\n return;\n }\n \n const container = containerRef.current;\n const items = container.querySelectorAll(itemSelector);\n const activeItem = items[activeIndex] as HTMLElement;\n \n if (activeItem) {\n activeItem.scrollIntoView(scrollOptions);\n }\n }, [activeIndex, containerRef, itemSelector, enabled, scrollOptions]);\n}\n"],"names":["useEffect","DEFAULT_SCROLL_OPTIONS","block","useScrollActiveIntoView","containerRef","activeIndex","itemSelector","enabled","scrollOptions","current","activeItem","querySelectorAll","scrollIntoView"],"mappings":"AAGA,SAAA,aAAAA,SAAA;AAAA,MAAMC,IAAgD;AAAA,EAAEC,OAAO;AAAU;AAsElE,SAASC,EAAwB;AAAA,EACtCC,cAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,SAAAA,IAAU;AAAA,EACVC,eAAAA,IAAgBP;AACc,GAAS;AACvCD,EAAAA,EAAU,MAAM;AAEd,QAAI,CAACO,KAAWF,IAAc,KAAK,CAACD,GAAcK;AAChD;AAKF,UAAMC,IAFYN,EAAaK,QACPE,iBAAiBL,CAAY,EAC5BD,CAAW;AAEpC,IAAIK,KACFA,EAAWE,eAAeJ,CAAa;AAAA,EAE3C,GAAG,CAACH,GAAaD,GAAcE,GAAcC,GAASC,CAAa,CAAC;AACtE;"}
1
+ {"version":3,"file":"index227.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };"],"names":["_extends","n","e","t"],"mappings":"AAAA,SAASA,IAAW;AAClB,SAAOA,IAAW,OAAO,SAAS,OAAO,OAAO,KAAI,IAAK,SAAUC,GAAG;AACpE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AACzC,UAAIC,IAAI,UAAUD,CAAC;AACnB,eAAS,KAAKC,EAAG,EAAC,CAAA,GAAI,eAAe,KAAKA,GAAG,CAAC,MAAMF,EAAE,CAAC,IAAIE,EAAE,CAAC;AAAA,IAChE;AACA,WAAOF;AAAA,EACT,GAAGD,EAAS,MAAM,MAAM,SAAS;AACnC;","x_google_ignoreList":[0]}
package/dist/index228.js CHANGED
@@ -1,13 +1,8 @@
1
- function r(t, i) {
2
- if (t == null) return {};
3
- var o = {};
4
- for (var e in t) if ({}.hasOwnProperty.call(t, e)) {
5
- if (i.indexOf(e) !== -1) continue;
6
- o[e] = t[e];
7
- }
8
- return o;
1
+ import e from "./index233.js";
2
+ function p(o, t) {
3
+ o.prototype = Object.create(t.prototype), o.prototype.constructor = o, e(o, t);
9
4
  }
10
5
  export {
11
- r as default
6
+ p as default
12
7
  };
13
8
  //# sourceMappingURL=index228.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index228.js","sources":["../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"sourcesContent":["function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };"],"names":["_objectWithoutPropertiesLoose","r","e","t","n"],"mappings":"AAAA,SAASA,EAA8BC,GAAGC,GAAG;AAC3C,MAAYD,KAAR,KAAW,QAAO,CAAA;AACtB,MAAIE,IAAI,CAAA;AACR,WAASC,KAAKH,EAAG,KAAI,CAAA,EAAG,eAAe,KAAKA,GAAGG,CAAC,GAAG;AACjD,QAAWF,EAAE,QAAQE,CAAC,MAAlB,GAAqB;AACzB,IAAAD,EAAEC,CAAC,IAAIH,EAAEG,CAAC;AAAA,EACZ;AACA,SAAOD;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index228.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/index229.js CHANGED
@@ -1,13 +1,173 @@
1
- function e() {
2
- return e = Object.assign ? Object.assign.bind() : function(t) {
3
- for (var n = 1; n < arguments.length; n++) {
4
- var a = arguments[n];
5
- for (var r in a) ({}).hasOwnProperty.call(a, r) && (t[r] = a[r]);
6
- }
7
- return t;
8
- }, e.apply(null, arguments);
9
- }
1
+ import { __spreadArray as D } from "./index234.js";
2
+ import { parse as ut } from "./index235.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;
32
+ }
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;
74
+ }
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
+ };
10
170
  export {
11
- e as default
171
+ wt as SVGInjector
12
172
  };
13
173
  //# sourceMappingURL=index229.js.map