se-design 1.0.67-dev → 1.0.68-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 (221) hide show
  1. package/dist/assets/style.css +1 -1
  2. package/dist/components/Banner/index.d.ts +2 -0
  3. package/dist/index10.js.map +1 -1
  4. package/dist/index100.js.map +1 -1
  5. package/dist/index101.js.map +1 -1
  6. package/dist/index102.js.map +1 -1
  7. package/dist/index103.js.map +1 -1
  8. package/dist/index104.js.map +1 -1
  9. package/dist/index105.js.map +1 -1
  10. package/dist/index106.js.map +1 -1
  11. package/dist/index107.js.map +1 -1
  12. package/dist/index108.js.map +1 -1
  13. package/dist/index109.js.map +1 -1
  14. package/dist/index11.js.map +1 -1
  15. package/dist/index110.js.map +1 -1
  16. package/dist/index111.js.map +1 -1
  17. package/dist/index112.js.map +1 -1
  18. package/dist/index113.js.map +1 -1
  19. package/dist/index114.js.map +1 -1
  20. package/dist/index115.js.map +1 -1
  21. package/dist/index116.js.map +1 -1
  22. package/dist/index117.js.map +1 -1
  23. package/dist/index118.js.map +1 -1
  24. package/dist/index119.js.map +1 -1
  25. package/dist/index12.js.map +1 -1
  26. package/dist/index120.js.map +1 -1
  27. package/dist/index121.js.map +1 -1
  28. package/dist/index122.js.map +1 -1
  29. package/dist/index123.js.map +1 -1
  30. package/dist/index124.js.map +1 -1
  31. package/dist/index125.js.map +1 -1
  32. package/dist/index126.js.map +1 -1
  33. package/dist/index127.js.map +1 -1
  34. package/dist/index128.js.map +1 -1
  35. package/dist/index129.js.map +1 -1
  36. package/dist/index13.js.map +1 -1
  37. package/dist/index130.js.map +1 -1
  38. package/dist/index131.js.map +1 -1
  39. package/dist/index132.js.map +1 -1
  40. package/dist/index133.js.map +1 -1
  41. package/dist/index134.js.map +1 -1
  42. package/dist/index135.js.map +1 -1
  43. package/dist/index136.js.map +1 -1
  44. package/dist/index137.js.map +1 -1
  45. package/dist/index138.js.map +1 -1
  46. package/dist/index139.js.map +1 -1
  47. package/dist/index140.js.map +1 -1
  48. package/dist/index141.js.map +1 -1
  49. package/dist/index142.js.map +1 -1
  50. package/dist/index143.js.map +1 -1
  51. package/dist/index144.js.map +1 -1
  52. package/dist/index145.js.map +1 -1
  53. package/dist/index146.js.map +1 -1
  54. package/dist/index147.js.map +1 -1
  55. package/dist/index148.js.map +1 -1
  56. package/dist/index149.js.map +1 -1
  57. package/dist/index15.js.map +1 -1
  58. package/dist/index150.js.map +1 -1
  59. package/dist/index151.js.map +1 -1
  60. package/dist/index152.js.map +1 -1
  61. package/dist/index153.js.map +1 -1
  62. package/dist/index154.js.map +1 -1
  63. package/dist/index155.js.map +1 -1
  64. package/dist/index156.js.map +1 -1
  65. package/dist/index157.js.map +1 -1
  66. package/dist/index158.js.map +1 -1
  67. package/dist/index159.js.map +1 -1
  68. package/dist/index16.js.map +1 -1
  69. package/dist/index160.js.map +1 -1
  70. package/dist/index161.js.map +1 -1
  71. package/dist/index162.js.map +1 -1
  72. package/dist/index163.js.map +1 -1
  73. package/dist/index164.js.map +1 -1
  74. package/dist/index165.js.map +1 -1
  75. package/dist/index166.js.map +1 -1
  76. package/dist/index167.js.map +1 -1
  77. package/dist/index168.js.map +1 -1
  78. package/dist/index169.js.map +1 -1
  79. package/dist/index17.js.map +1 -1
  80. package/dist/index170.js.map +1 -1
  81. package/dist/index171.js.map +1 -1
  82. package/dist/index172.js.map +1 -1
  83. package/dist/index173.js.map +1 -1
  84. package/dist/index174.js.map +1 -1
  85. package/dist/index175.js.map +1 -1
  86. package/dist/index176.js.map +1 -1
  87. package/dist/index177.js.map +1 -1
  88. package/dist/index178.js.map +1 -1
  89. package/dist/index179.js.map +1 -1
  90. package/dist/index18.js.map +1 -1
  91. package/dist/index180.js.map +1 -1
  92. package/dist/index181.js.map +1 -1
  93. package/dist/index182.js.map +1 -1
  94. package/dist/index183.js.map +1 -1
  95. package/dist/index184.js.map +1 -1
  96. package/dist/index185.js.map +1 -1
  97. package/dist/index186.js.map +1 -1
  98. package/dist/index187.js.map +1 -1
  99. package/dist/index188.js.map +1 -1
  100. package/dist/index189.js.map +1 -1
  101. package/dist/index19.js.map +1 -1
  102. package/dist/index192.js.map +1 -1
  103. package/dist/index194.js.map +1 -1
  104. package/dist/index196.js.map +1 -1
  105. package/dist/index20.js.map +1 -1
  106. package/dist/index204.js.map +1 -1
  107. package/dist/index21.js.map +1 -1
  108. package/dist/index215.js.map +1 -1
  109. package/dist/index216.js.map +1 -1
  110. package/dist/index22.js.map +1 -1
  111. package/dist/index227.js.map +1 -1
  112. package/dist/index228.js.map +1 -1
  113. package/dist/index229.js +1 -1
  114. package/dist/index229.js.map +1 -1
  115. package/dist/index23.js.map +1 -1
  116. package/dist/index230.js.map +1 -1
  117. package/dist/index232.js.map +1 -1
  118. package/dist/index233.js.map +1 -1
  119. package/dist/index234.js.map +1 -1
  120. package/dist/index235.js.map +1 -1
  121. package/dist/index236.js.map +1 -1
  122. package/dist/index237.js.map +1 -1
  123. package/dist/index238.js.map +1 -1
  124. package/dist/index24.js.map +1 -1
  125. package/dist/index240.js.map +1 -1
  126. package/dist/index241.js.map +1 -1
  127. package/dist/index242.js.map +1 -1
  128. package/dist/index244.js.map +1 -1
  129. package/dist/index245.js.map +1 -1
  130. package/dist/index246.js.map +1 -1
  131. package/dist/index249.js.map +1 -1
  132. package/dist/index25.js.map +1 -1
  133. package/dist/index26.js.map +1 -1
  134. package/dist/index27.js.map +1 -1
  135. package/dist/index28.js.map +1 -1
  136. package/dist/index29.js +57 -55
  137. package/dist/index29.js.map +1 -1
  138. package/dist/index3.js.map +1 -1
  139. package/dist/index30.js.map +1 -1
  140. package/dist/index31.js +11 -10
  141. package/dist/index31.js.map +1 -1
  142. package/dist/index32.js.map +1 -1
  143. package/dist/index33.js.map +1 -1
  144. package/dist/index34.js.map +1 -1
  145. package/dist/index35.js.map +1 -1
  146. package/dist/index36.js.map +1 -1
  147. package/dist/index37.js.map +1 -1
  148. package/dist/index38.js.map +1 -1
  149. package/dist/index39.js.map +1 -1
  150. package/dist/index4.js.map +1 -1
  151. package/dist/index40.js.map +1 -1
  152. package/dist/index41.js +8 -7
  153. package/dist/index41.js.map +1 -1
  154. package/dist/index42.js +7 -6
  155. package/dist/index42.js.map +1 -1
  156. package/dist/index43.js.map +1 -1
  157. package/dist/index44.js.map +1 -1
  158. package/dist/index45.js.map +1 -1
  159. package/dist/index46.js.map +1 -1
  160. package/dist/index47.js.map +1 -1
  161. package/dist/index48.js.map +1 -1
  162. package/dist/index49.js.map +1 -1
  163. package/dist/index5.js +72 -72
  164. package/dist/index5.js.map +1 -1
  165. package/dist/index50.js +13 -13
  166. package/dist/index50.js.map +1 -1
  167. package/dist/index51.js.map +1 -1
  168. package/dist/index52.js.map +1 -1
  169. package/dist/index53.js.map +1 -1
  170. package/dist/index54.js +17 -16
  171. package/dist/index54.js.map +1 -1
  172. package/dist/index55.js.map +1 -1
  173. package/dist/index56.js.map +1 -1
  174. package/dist/index57.js.map +1 -1
  175. package/dist/index58.js.map +1 -1
  176. package/dist/index59.js.map +1 -1
  177. package/dist/index6.js +7 -6
  178. package/dist/index6.js.map +1 -1
  179. package/dist/index60.js.map +1 -1
  180. package/dist/index61.js.map +1 -1
  181. package/dist/index62.js.map +1 -1
  182. package/dist/index63.js.map +1 -1
  183. package/dist/index64.js +2 -1
  184. package/dist/index64.js.map +1 -1
  185. package/dist/index66.js.map +1 -1
  186. package/dist/index67.js.map +1 -1
  187. package/dist/index68.js.map +1 -1
  188. package/dist/index69.js.map +1 -1
  189. package/dist/index7.js.map +1 -1
  190. package/dist/index70.js.map +1 -1
  191. package/dist/index72.js.map +1 -1
  192. package/dist/index73.js.map +1 -1
  193. package/dist/index74.js.map +1 -1
  194. package/dist/index75.js.map +1 -1
  195. package/dist/index76.js.map +1 -1
  196. package/dist/index77.js.map +1 -1
  197. package/dist/index78.js.map +1 -1
  198. package/dist/index79.js.map +1 -1
  199. package/dist/index8.js.map +1 -1
  200. package/dist/index80.js.map +1 -1
  201. package/dist/index81.js.map +1 -1
  202. package/dist/index82.js.map +1 -1
  203. package/dist/index83.js.map +1 -1
  204. package/dist/index84.js.map +1 -1
  205. package/dist/index85.js.map +1 -1
  206. package/dist/index86.js.map +1 -1
  207. package/dist/index87.js.map +1 -1
  208. package/dist/index88.js.map +1 -1
  209. package/dist/index89.js.map +1 -1
  210. package/dist/index9.js.map +1 -1
  211. package/dist/index90.js.map +1 -1
  212. package/dist/index91.js.map +1 -1
  213. package/dist/index92.js.map +1 -1
  214. package/dist/index93.js.map +1 -1
  215. package/dist/index94.js.map +1 -1
  216. package/dist/index95.js.map +1 -1
  217. package/dist/index96.js.map +1 -1
  218. package/dist/index97.js.map +1 -1
  219. package/dist/index98.js.map +1 -1
  220. package/dist/index99.js.map +1 -1
  221. package/package.json +2 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index62.js","sources":["../src/components/GuidedTour/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Icon, RotationTypes } from '../Icon';\nimport { Button } from '../Button';\nimport { debounce } from 'src/utils/debounce';\n\n// Constants\nconst ANIMATION_DURATION_MS = 500;\nconst VIEWPORT_MARGIN_PX = 50;\nconst SCROLL_DEBOUNCE_MS = 150;\n\nconst ARROW_STYLES = {\n 'top-left': { rotate: '315', class: '-top-5 left-0' },\n 'top-right': { rotate: '45', class: '-top-5 right-0' },\n 'bottom-left': { rotate: '225', class: '-bottom-5 left-0' },\n 'bottom-right': { rotate: '135', class: '-bottom-5 right-0' }\n};\n\nexport type TooltipArrowPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nexport interface GuidedTourStep {\n targetElementSelector: string;\n iframeSelector?: string;\n content: string;\n tooltipPosition?:\n | 'top-left'\n | 'top-right'\n | 'top-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'bottom-center'\n | 'left-top'\n | 'left-center'\n | 'left-bottom'\n | 'right-top'\n | 'right-center'\n | 'right-bottom';\n tooltipPositionOffset?: {\n horizontal?: number;\n vertical?: number;\n };\n isOptionalStep?: boolean;\n automationId?: string;\n waitForElement?: boolean;\n zIndex?: number;\n isDropdownStep?: boolean;\n}\n\nexport interface GuidedTourProps {\n steps: GuidedTourStep[];\n screenBaseElementSelector?: string;\n onClose: () => void;\n tooltipBackgroundColor?: string;\n tooltipTextColor?: string;\n maxWidth?: number;\n automationId?: string;\n}\n\ninterface TooltipPosition {\n top: number;\n left: number;\n}\n\n// Helper to get the iframe's content document\nconst getIframeDocument = (iframeSelector: string): Document | null => {\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n console.warn(`Iframe not found: ${iframeSelector}`);\n return null;\n }\n\n try {\n return iframe.contentDocument || iframe.contentWindow?.document || null;\n } catch (error) {\n console.error('Cannot access iframe document:', error);\n return null;\n }\n};\n\n// Helper to get target element from main document or iframe\nconst getTargetElement = (selector: string, iframeSelector?: string): HTMLElement | null => {\n if (!iframeSelector) {\n return document.querySelector(selector);\n }\n\n const iframeDoc = getIframeDocument(iframeSelector);\n return iframeDoc ? iframeDoc.querySelector(selector) : null;\n};\n\n// Helper to get adjusted bounding rect accounting for iframe position\nconst getAdjustedBoundingRect = (element: HTMLElement, iframeSelector?: string): DOMRect => {\n const rect = element.getBoundingClientRect();\n\n if (!iframeSelector) {\n return rect;\n }\n\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n return rect;\n }\n\n const iframeRect = iframe.getBoundingClientRect();\n\n // Get iframe's computed styles to account for borders\n const borderLeft = iframe.clientLeft || 0;\n const borderTop = iframe.clientTop || 0;\n\n // Adjust coordinates relative to the main document\n return new DOMRect(\n rect.left + iframeRect.left + borderLeft,\n rect.top + iframeRect.top + borderTop,\n rect.width,\n rect.height\n );\n};\n\n// Determines the arrow position based on the tooltip position\nconst getArrowPosition = (position?: GuidedTourStep['tooltipPosition']): TooltipArrowPosition => {\n switch (position) {\n case 'left-bottom':\n case 'left-center':\n case 'bottom-left':\n return 'top-right';\n case 'right-bottom':\n case 'right-center':\n case 'bottom-right':\n case 'bottom-center':\n return 'top-left';\n case 'top-left':\n case 'left-top':\n return 'bottom-right';\n case 'top-right':\n case 'top-center':\n case 'right-top':\n return 'bottom-left';\n default:\n return 'top-left';\n }\n};\n\n// Gets current scroll position for window or container\nconst getScrollPosition = (): { x: number; y: number } => ({\n x: window.scrollX || window.pageXOffset,\n y: window.scrollY || window.pageYOffset\n});\n\n// Helper to wait for an element to appear using requestAnimationFrame\nconst waitForElement = (\n selector: string,\n callback: (element: HTMLElement) => void,\n iframeSelector?: string\n): (() => void) => {\n let rafId: number;\n\n const checkElement = () => {\n const element = getTargetElement(selector, iframeSelector);\n if (element) {\n callback(element);\n } else {\n rafId = requestAnimationFrame(checkElement);\n }\n };\n\n rafId = requestAnimationFrame(checkElement);\n\n // Return cleanup function\n return () => {\n if (rafId) {\n cancelAnimationFrame(rafId);\n }\n };\n};\n\nexport const GuidedTour: FC<GuidedTourProps> = ({\n steps,\n screenBaseElementSelector,\n onClose,\n tooltipBackgroundColor = '#E04E05',\n tooltipTextColor = 'var(--color-white)',\n maxWidth = 350\n}) => {\n const [currentStepIndex, setCurrentStepIndex] = useState<number>(0);\n const previousTooltipPositionRef = useRef<TooltipPosition | null>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n\n // To handle navigation to the next step\n const navigateToNextStep = () => {\n if (currentStepIndex < steps.length - 1) {\n setCurrentStepIndex(currentStepIndex + 1);\n } else {\n onClose?.();\n }\n };\n\n const handleTargetElementClick = () => {\n navigateToNextStep();\n };\n\n // To handle clicks outside current target\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n const handleBodyClick = (event: MouseEvent) => {\n const target = event.target as Node;\n const currentTargetElement = getTargetElement(currentStep?.targetElementSelector, currentStep?.iframeSelector);\n const tooltipElement = tooltipRef.current;\n\n // Ignore clicks on the tooltip itself\n if (tooltipElement && tooltipElement.contains(target)) {\n return;\n }\n\n // Check if click is outside current target element\n if (currentTargetElement && !currentTargetElement.contains(target)) {\n // If dropdown step, go to next step on any outside click\n if (currentStep?.isDropdownStep) {\n navigateToNextStep();\n return;\n }\n\n // Otherwise, check if click is on last step's target to close tour\n const lastStep = steps[steps.length - 1];\n const lastStepTargetElement = getTargetElement(lastStep.targetElementSelector, lastStep.iframeSelector);\n\n if (lastStepTargetElement && lastStepTargetElement.contains(target)) {\n onClose();\n }\n }\n };\n\n // Wait for tooltip positioning animation to complete before listening\n const timeoutId = setTimeout(() => {\n document.body.addEventListener('mousedown', handleBodyClick, true);\n }, ANIMATION_DURATION_MS + SCROLL_DEBOUNCE_MS);\n\n return () => {\n clearTimeout(timeoutId);\n document.body.removeEventListener('mousedown', handleBodyClick, true);\n };\n }, [currentStepIndex, steps, onClose]);\n\n // Initialize tooltip styles\n useEffect(() => {\n setCurrentStepIndex(0);\n previousTooltipPositionRef.current = null;\n\n const tooltipElement = tooltipRef.current;\n if (tooltipElement) {\n tooltipElement.style.maxWidth = `${maxWidth}px`;\n tooltipElement.style.backgroundColor = tooltipBackgroundColor;\n tooltipElement.style.color = tooltipTextColor;\n }\n }, [maxWidth, tooltipBackgroundColor, tooltipTextColor]);\n\n // To position and manage the current step\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n if (!currentStep?.targetElementSelector) {\n onClose?.();\n return;\n }\n\n const scrollableContainer = screenBaseElementSelector\n ? (document.querySelector(screenBaseElementSelector) as HTMLElement)\n : null;\n\n const tooltipElement = tooltipRef.current;\n if (!tooltipElement) return;\n\n let targetElement: HTMLElement | null = null;\n let cleanupWait: (() => void) | null = null;\n let handleScroll: (ReturnType<typeof debounce> & (() => void)) | null = null;\n\n const hasScrollableContainer = Boolean(\n scrollableContainer && scrollableContainer.scrollHeight > scrollableContainer.clientHeight\n );\n\n const viewportDimensions = {\n height: scrollableContainer?.clientHeight || window.innerHeight,\n width: scrollableContainer?.clientWidth || window.innerWidth\n };\n\n const initializeStep = (element: HTMLElement) => {\n targetElement = element;\n targetElement.addEventListener('click', handleTargetElementClick);\n\n // To calculate the tooltip position relative to the target element\n const calculateTooltipPosition = (\n targetRect: DOMRect,\n tooltipWidth: number,\n tooltipHeight: number,\n scroll: { x: number; y: number }\n ): TooltipPosition => {\n const position = currentStep.tooltipPosition || 'bottom-center';\n const offsetVertical = currentStep.tooltipPositionOffset?.vertical || 0;\n const offsetHorizontal = currentStep.tooltipPositionOffset?.horizontal || 0;\n\n let top = 0;\n let left = 0;\n\n // To calculate the position based on the tooltip position prop and the offset\n switch (position) {\n case 'bottom-center':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'bottom-left':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'bottom-right':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'top-center':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'top-left':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'top-right':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'left-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'right-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n default:\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n }\n\n return { top, left };\n };\n\n // To apply the position to the tooltip with optional animation\n const applyTooltipPosition = (position: TooltipPosition, shouldAnimate: boolean) => {\n tooltipElement.style.position = 'absolute';\n\n const applyStyles = () => {\n tooltipElement.style.top = `${position.top}px`;\n tooltipElement.style.left = `${position.left}px`;\n };\n\n if (shouldAnimate && previousTooltipPositionRef.current) {\n // Animate to new position immediately\n tooltipElement.style.transition = `top ${ANIMATION_DURATION_MS}ms ease-in-out, left ${ANIMATION_DURATION_MS}ms ease-in-out`;\n applyStyles();\n previousTooltipPositionRef.current = position;\n } else {\n // Direct positioning without animation for first time\n applyStyles();\n previousTooltipPositionRef.current = position;\n }\n };\n\n const positionTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n // Wait for tooltip to be rendered with valid dimensions\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(positionTooltip);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n const position = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(position, shouldAnimate);\n };\n\n // To handle scroll events with debouncing to prevent excessive repositioning\n handleScroll = debounce(() => {\n if (!targetElement || !tooltipElement) return;\n\n // Preserve current position for animation\n const currentPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n\n if (!previousTooltipPositionRef.current && (currentPosition.top !== 0 || currentPosition.left !== 0)) {\n previousTooltipPositionRef.current = currentPosition;\n }\n\n positionTooltip();\n\n // Update reference after animation completes\n if (previousTooltipPositionRef.current) {\n setTimeout(() => {\n const finalPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n if (finalPosition.top !== 0 || finalPosition.left !== 0) {\n previousTooltipPositionRef.current = finalPosition;\n }\n }, ANIMATION_DURATION_MS);\n }\n }, SCROLL_DEBOUNCE_MS);\n\n // Checks if both target and tooltip are fully visible in viewport\n const areElementsVisible = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipLeftViewport: number,\n tooltipWidth: number,\n tooltipHeight: number\n ): boolean => {\n const combinedBoundingBox = {\n top: Math.min(targetRect.top, tooltipTopViewport),\n bottom: Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight),\n left: Math.min(targetRect.left, tooltipLeftViewport),\n right: Math.max(targetRect.right, tooltipLeftViewport + tooltipWidth)\n };\n\n if (scrollableContainer) {\n const containerRect = scrollableContainer.getBoundingClientRect();\n return (\n combinedBoundingBox.top >= containerRect.top + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= containerRect.top + containerRect.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= containerRect.left + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= containerRect.left + containerRect.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n }\n\n return (\n combinedBoundingBox.top >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= viewportDimensions.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= viewportDimensions.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n };\n\n // Calculates the scroll position needed to make both target and tooltip in viewport\n const calculateScrollToCenter = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipHeight: number\n ): number | null => {\n const combinedTop = Math.min(targetRect.top, tooltipTopViewport);\n const combinedBottom = Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight);\n const combinedHeight = combinedBottom - combinedTop;\n\n // Determine scroll context (container or window)\n const isContainer = Boolean(scrollableContainer && hasScrollableContainer);\n const containerRect = isContainer ? scrollableContainer!.getBoundingClientRect() : null;\n\n const viewportHeight = isContainer ? containerRect!.height : window.innerHeight;\n const currentScroll = isContainer ? scrollableContainer!.scrollTop : getScrollPosition().y;\n const maxScroll = isContainer\n ? scrollableContainer!.scrollHeight - scrollableContainer!.clientHeight\n : document.documentElement.scrollHeight - window.innerHeight;\n\n const availableHeight = viewportHeight - 2 * VIEWPORT_MARGIN_PX;\n\n // To calculate the center point\n let centerPoint: number;\n\n if (combinedHeight > availableHeight) {\n // Combined area too tall - center the target element only\n const targetCenter = (targetRect.top + targetRect.bottom) / 2;\n centerPoint = isContainer ? targetCenter - containerRect!.top + currentScroll : targetCenter + currentScroll;\n } else {\n // Center the combined area (target + tooltip)\n const combinedCenter = (combinedTop + combinedBottom) / 2;\n centerPoint = isContainer\n ? combinedCenter - containerRect!.top + currentScroll\n : combinedCenter + currentScroll;\n }\n\n // Calculate final scroll position and clamp to valid range\n const scrollPosition = centerPoint - viewportHeight / 2;\n return Math.max(0, Math.min(scrollPosition, maxScroll));\n };\n\n // To initialize the tooltip positioning and handle scrolling if needed\n const initializeTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n const waitForDimensions = () => {\n if (!tooltipElement || !targetElement) return;\n\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(waitForDimensions);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n\n // Calculate tooltip position in absolute coordinates\n const tooltipAbsolutePosition = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n // Convert to viewport coordinates for visibility check\n const tooltipViewportPosition = {\n top: tooltipAbsolutePosition.top - scroll.y,\n left: tooltipAbsolutePosition.left - scroll.x\n };\n\n // Check if both elements are visible\n const isVisible = areElementsVisible(\n targetRect,\n tooltipViewportPosition.top,\n tooltipViewportPosition.left,\n tooltipDimensions.width,\n tooltipDimensions.height\n );\n\n if (!isVisible) {\n // Calculate scroll needed to make both visible\n const requiredScrollY = calculateScrollToCenter(\n targetRect,\n tooltipViewportPosition.top,\n tooltipDimensions.height\n );\n\n if (requiredScrollY !== null) {\n const scrollElement = hasScrollableContainer && scrollableContainer ? scrollableContainer : window;\n scrollElement.scrollTo({ top: requiredScrollY, behavior: 'auto' });\n\n // Position tooltip immediately after instant scroll\n requestAnimationFrame(() => positionTooltip());\n } else {\n // Cannot fit with scrolling, position anyway\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n } else {\n // Both are visible, position tooltip\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n };\n\n waitForDimensions();\n };\n\n window.addEventListener('scroll', handleScroll, { passive: true });\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.addEventListener('scroll', handleScroll, { passive: true });\n }\n\n // Add scroll listener for iframe if target is inside iframe\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.addEventListener('scroll', handleScroll, { passive: true });\n }\n }\n\n initializeTooltip();\n };\n\n // Check if we need to wait for the element or get it immediately\n if (currentStep.waitForElement) {\n // Wait for element to appear\n cleanupWait = waitForElement(currentStep.targetElementSelector, initializeStep, currentStep.iframeSelector);\n } else {\n const element = getTargetElement(currentStep.targetElementSelector, currentStep.iframeSelector);\n if (!element) return;\n initializeStep(element);\n }\n\n return () => {\n if (cleanupWait) {\n cleanupWait();\n }\n if (targetElement) {\n targetElement.removeEventListener('click', handleTargetElementClick);\n }\n if (handleScroll) {\n window.removeEventListener('scroll', handleScroll);\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.removeEventListener('scroll', handleScroll);\n }\n // Clean up iframe scroll listener\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.removeEventListener('scroll', handleScroll);\n }\n }\n // Cancel any pending debounced calls\n (handleScroll as ReturnType<typeof debounce> & (() => void)).cancel();\n }\n };\n }, [currentStepIndex, steps, onClose, screenBaseElementSelector, maxWidth]);\n\n // Don't render if all steps completed\n if (currentStepIndex >= steps.length) {\n return null;\n }\n\n const currentStep = steps[currentStepIndex];\n const arrowPosition = getArrowPosition(currentStep?.tooltipPosition);\n const arrowStyle = ARROW_STYLES[arrowPosition];\n\n return createPortal(\n <div\n ref={tooltipRef}\n className={`guided-tour-tooltip relative rounded-md p-1`}\n data-automation-id={`${currentStep?.automationId || 'guided-tour'}-tooltip`}\n style={{ zIndex: currentStep?.zIndex || 1300 }}\n >\n <Icon\n name=\"arrow-head\"\n fill={tooltipBackgroundColor}\n rotation={arrowStyle.rotate as RotationTypes}\n className={`guided-tour-tooltip-arrow absolute ${arrowStyle.class}`}\n />\n <div className=\"guided-tour-tooltip-content flex flex-col gap-2\">\n <p>{currentStep?.content}</p>\n {currentStep?.isOptionalStep && (\n <Button type=\"link\" label=\"Got it\" className=\"!text-white !underline\" onClick={handleTargetElementClick} />\n )}\n </div>\n </div>,\n document.body\n );\n};\n"],"names":["ANIMATION_DURATION_MS","VIEWPORT_MARGIN_PX","SCROLL_DEBOUNCE_MS","ARROW_STYLES","rotate","class","getIframeDocument","iframeSelector","iframe","document","querySelector","console","warn","contentDocument","contentWindow","error","getTargetElement","selector","iframeDoc","getAdjustedBoundingRect","element","rect","getBoundingClientRect","iframeRect","borderLeft","clientLeft","borderTop","clientTop","DOMRect","left","top","width","height","getArrowPosition","position","getScrollPosition","x","window","scrollX","pageXOffset","y","scrollY","pageYOffset","waitForElement","callback","rafId","checkElement","requestAnimationFrame","cancelAnimationFrame","GuidedTour","steps","screenBaseElementSelector","onClose","tooltipBackgroundColor","tooltipTextColor","maxWidth","currentStepIndex","setCurrentStepIndex","useState","previousTooltipPositionRef","useRef","tooltipRef","navigateToNextStep","length","handleTargetElementClick","useEffect","currentStep","handleBodyClick","event","target","currentTargetElement","targetElementSelector","tooltipElement","current","contains","isDropdownStep","lastStep","lastStepTargetElement","timeoutId","setTimeout","body","addEventListener","clearTimeout","removeEventListener","style","backgroundColor","color","scrollableContainer","targetElement","cleanupWait","handleScroll","hasScrollableContainer","Boolean","scrollHeight","clientHeight","viewportDimensions","innerHeight","clientWidth","innerWidth","initializeStep","calculateTooltipPosition","targetRect","tooltipWidth","tooltipHeight","scroll","tooltipPosition","offsetVertical","tooltipPositionOffset","vertical","offsetHorizontal","horizontal","bottom","right","applyTooltipPosition","shouldAnimate","applyStyles","transition","positionTooltip","tooltipDimensions","offsetWidth","offsetHeight","debounce","currentPosition","parseFloat","finalPosition","areElementsVisible","tooltipTopViewport","tooltipLeftViewport","combinedBoundingBox","Math","min","max","containerRect","calculateScrollToCenter","combinedTop","combinedBottom","combinedHeight","isContainer","viewportHeight","currentScroll","scrollTop","maxScroll","documentElement","availableHeight","centerPoint","targetCenter","combinedCenter","scrollPosition","initializeTooltip","waitForDimensions","tooltipAbsolutePosition","tooltipViewportPosition","requiredScrollY","scrollElement","scrollTo","behavior","passive","iframeWindow","defaultView","cancel","arrowPosition","arrowStyle","createPortal","React","createElement","ref","className","automationId","zIndex","Icon","name","fill","rotation","content","isOptionalStep","Button","type","label","onClick"],"mappings":";;;;;AAOA,MAAMA,IAAwB,KACxBC,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AAAAA,IACLyG,WAAW;AAAA,IACX,sBAAoB,GAAGpG,GAAaqG,gBAAgB,aAAa;AAAA,IACjEnF,OAAO;AAAA,MAAEoF,QAAQtG,GAAasG,UAAU;AAAA,IAAA;AAAA,EAAK,GAE7CL,gBAAAA,EAAAC,cAACK,IAAI;AAAA,IACHC,MAAK;AAAA,IACLC,MAAMtH;AAAAA,IACNuH,UAAUX,EAAW7J;AAAAA,IACrBkK,WAAW,sCAAsCL,EAAW5J,KAAK;AAAA,EAAA,CAClE,GACD8J,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKE,WAAU;AAAA,EAAA,GACbH,gBAAAA,EAAAC,cAAA,KAAA,MAAIlG,GAAa2G,OAAW,GAC3B3G,GAAa4G,kBACZX,gBAAAA,EAAAC,cAACW,IAAM;AAAA,IAACC,MAAK;AAAA,IAAOC,OAAM;AAAA,IAASX,WAAU;AAAA,IAAyBY,SAASlH;AAAAA,EAAAA,CAA2B,CAEzG,CACF,GACLvD,SAASuE,IACX;AACF;"}
1
+ {"version":3,"file":"index62.js","sources":["../src/components/GuidedTour/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Icon, RotationTypes } from '../Icon';\nimport { Button } from '../Button';\nimport { debounce } from 'src/utils/debounce';\n\n// Constants\nconst ANIMATION_DURATION_MS = 500;\nconst VIEWPORT_MARGIN_PX = 50;\nconst SCROLL_DEBOUNCE_MS = 150;\n\nconst ARROW_STYLES = {\n 'top-left': { rotate: '315', class: '-top-5 left-0' },\n 'top-right': { rotate: '45', class: '-top-5 right-0' },\n 'bottom-left': { rotate: '225', class: '-bottom-5 left-0' },\n 'bottom-right': { rotate: '135', class: '-bottom-5 right-0' }\n};\n\nexport type TooltipArrowPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nexport interface GuidedTourStep {\n targetElementSelector: string;\n iframeSelector?: string;\n content: string;\n tooltipPosition?:\n | 'top-left'\n | 'top-right'\n | 'top-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'bottom-center'\n | 'left-top'\n | 'left-center'\n | 'left-bottom'\n | 'right-top'\n | 'right-center'\n | 'right-bottom';\n tooltipPositionOffset?: {\n horizontal?: number;\n vertical?: number;\n };\n isOptionalStep?: boolean;\n automationId?: string;\n waitForElement?: boolean;\n zIndex?: number;\n isDropdownStep?: boolean;\n}\n\nexport interface GuidedTourProps {\n steps: GuidedTourStep[];\n screenBaseElementSelector?: string;\n onClose: () => void;\n tooltipBackgroundColor?: string;\n tooltipTextColor?: string;\n maxWidth?: number;\n automationId?: string;\n}\n\ninterface TooltipPosition {\n top: number;\n left: number;\n}\n\n// Helper to get the iframe's content document\nconst getIframeDocument = (iframeSelector: string): Document | null => {\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n console.warn(`Iframe not found: ${iframeSelector}`);\n return null;\n }\n\n try {\n return iframe.contentDocument || iframe.contentWindow?.document || null;\n } catch (error) {\n console.error('Cannot access iframe document:', error);\n return null;\n }\n};\n\n// Helper to get target element from main document or iframe\nconst getTargetElement = (selector: string, iframeSelector?: string): HTMLElement | null => {\n if (!iframeSelector) {\n return document.querySelector(selector);\n }\n\n const iframeDoc = getIframeDocument(iframeSelector);\n return iframeDoc ? iframeDoc.querySelector(selector) : null;\n};\n\n// Helper to get adjusted bounding rect accounting for iframe position\nconst getAdjustedBoundingRect = (element: HTMLElement, iframeSelector?: string): DOMRect => {\n const rect = element.getBoundingClientRect();\n\n if (!iframeSelector) {\n return rect;\n }\n\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n return rect;\n }\n\n const iframeRect = iframe.getBoundingClientRect();\n\n // Get iframe's computed styles to account for borders\n const borderLeft = iframe.clientLeft || 0;\n const borderTop = iframe.clientTop || 0;\n\n // Adjust coordinates relative to the main document\n return new DOMRect(\n rect.left + iframeRect.left + borderLeft,\n rect.top + iframeRect.top + borderTop,\n rect.width,\n rect.height\n );\n};\n\n// Determines the arrow position based on the tooltip position\nconst getArrowPosition = (position?: GuidedTourStep['tooltipPosition']): TooltipArrowPosition => {\n switch (position) {\n case 'left-bottom':\n case 'left-center':\n case 'bottom-left':\n return 'top-right';\n case 'right-bottom':\n case 'right-center':\n case 'bottom-right':\n case 'bottom-center':\n return 'top-left';\n case 'top-left':\n case 'left-top':\n return 'bottom-right';\n case 'top-right':\n case 'top-center':\n case 'right-top':\n return 'bottom-left';\n default:\n return 'top-left';\n }\n};\n\n// Gets current scroll position for window or container\nconst getScrollPosition = (): { x: number; y: number } => ({\n x: window.scrollX || window.pageXOffset,\n y: window.scrollY || window.pageYOffset\n});\n\n// Helper to wait for an element to appear using requestAnimationFrame\nconst waitForElement = (\n selector: string,\n callback: (element: HTMLElement) => void,\n iframeSelector?: string\n): (() => void) => {\n let rafId: number;\n\n const checkElement = () => {\n const element = getTargetElement(selector, iframeSelector);\n if (element) {\n callback(element);\n } else {\n rafId = requestAnimationFrame(checkElement);\n }\n };\n\n rafId = requestAnimationFrame(checkElement);\n\n // Return cleanup function\n return () => {\n if (rafId) {\n cancelAnimationFrame(rafId);\n }\n };\n};\n\nexport const GuidedTour: FC<GuidedTourProps> = ({\n steps,\n screenBaseElementSelector,\n onClose,\n tooltipBackgroundColor = '#E04E05',\n tooltipTextColor = 'var(--color-white)',\n maxWidth = 350\n}) => {\n const [currentStepIndex, setCurrentStepIndex] = useState<number>(0);\n const previousTooltipPositionRef = useRef<TooltipPosition | null>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n\n // To handle navigation to the next step\n const navigateToNextStep = () => {\n if (currentStepIndex < steps.length - 1) {\n setCurrentStepIndex(currentStepIndex + 1);\n } else {\n onClose?.();\n }\n };\n\n const handleTargetElementClick = () => {\n navigateToNextStep();\n };\n\n // To handle clicks outside current target\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n const handleBodyClick = (event: MouseEvent) => {\n const target = event.target as Node;\n const currentTargetElement = getTargetElement(currentStep?.targetElementSelector, currentStep?.iframeSelector);\n const tooltipElement = tooltipRef.current;\n\n // Ignore clicks on the tooltip itself\n if (tooltipElement && tooltipElement.contains(target)) {\n return;\n }\n\n // Check if click is outside current target element\n if (currentTargetElement && !currentTargetElement.contains(target)) {\n // If dropdown step, go to next step on any outside click\n if (currentStep?.isDropdownStep) {\n navigateToNextStep();\n return;\n }\n\n // Otherwise, check if click is on last step's target to close tour\n const lastStep = steps[steps.length - 1];\n const lastStepTargetElement = getTargetElement(lastStep.targetElementSelector, lastStep.iframeSelector);\n\n if (lastStepTargetElement && lastStepTargetElement.contains(target)) {\n onClose();\n }\n }\n };\n\n // Wait for tooltip positioning animation to complete before listening\n const timeoutId = setTimeout(() => {\n document.body.addEventListener('mousedown', handleBodyClick, true);\n }, ANIMATION_DURATION_MS + SCROLL_DEBOUNCE_MS);\n\n return () => {\n clearTimeout(timeoutId);\n document.body.removeEventListener('mousedown', handleBodyClick, true);\n };\n }, [currentStepIndex, steps, onClose]);\n\n // Initialize tooltip styles\n useEffect(() => {\n setCurrentStepIndex(0);\n previousTooltipPositionRef.current = null;\n\n const tooltipElement = tooltipRef.current;\n if (tooltipElement) {\n tooltipElement.style.maxWidth = `${maxWidth}px`;\n tooltipElement.style.backgroundColor = tooltipBackgroundColor;\n tooltipElement.style.color = tooltipTextColor;\n }\n }, [maxWidth, tooltipBackgroundColor, tooltipTextColor]);\n\n // To position and manage the current step\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n if (!currentStep?.targetElementSelector) {\n onClose?.();\n return;\n }\n\n const scrollableContainer = screenBaseElementSelector\n ? (document.querySelector(screenBaseElementSelector) as HTMLElement)\n : null;\n\n const tooltipElement = tooltipRef.current;\n if (!tooltipElement) return;\n\n let targetElement: HTMLElement | null = null;\n let cleanupWait: (() => void) | null = null;\n let handleScroll: (ReturnType<typeof debounce> & (() => void)) | null = null;\n\n const hasScrollableContainer = Boolean(\n scrollableContainer && scrollableContainer.scrollHeight > scrollableContainer.clientHeight\n );\n\n const viewportDimensions = {\n height: scrollableContainer?.clientHeight || window.innerHeight,\n width: scrollableContainer?.clientWidth || window.innerWidth\n };\n\n const initializeStep = (element: HTMLElement) => {\n targetElement = element;\n targetElement.addEventListener('click', handleTargetElementClick);\n\n // To calculate the tooltip position relative to the target element\n const calculateTooltipPosition = (\n targetRect: DOMRect,\n tooltipWidth: number,\n tooltipHeight: number,\n scroll: { x: number; y: number }\n ): TooltipPosition => {\n const position = currentStep.tooltipPosition || 'bottom-center';\n const offsetVertical = currentStep.tooltipPositionOffset?.vertical || 0;\n const offsetHorizontal = currentStep.tooltipPositionOffset?.horizontal || 0;\n\n let top = 0;\n let left = 0;\n\n // To calculate the position based on the tooltip position prop and the offset\n switch (position) {\n case 'bottom-center':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'bottom-left':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'bottom-right':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'top-center':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'top-left':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'top-right':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'left-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'right-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n default:\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n }\n\n return { top, left };\n };\n\n // To apply the position to the tooltip with optional animation\n const applyTooltipPosition = (position: TooltipPosition, shouldAnimate: boolean) => {\n tooltipElement.style.position = 'absolute';\n\n const applyStyles = () => {\n tooltipElement.style.top = `${position.top}px`;\n tooltipElement.style.left = `${position.left}px`;\n };\n\n if (shouldAnimate && previousTooltipPositionRef.current) {\n // Animate to new position immediately\n tooltipElement.style.transition = `top ${ANIMATION_DURATION_MS}ms ease-in-out, left ${ANIMATION_DURATION_MS}ms ease-in-out`;\n applyStyles();\n previousTooltipPositionRef.current = position;\n } else {\n // Direct positioning without animation for first time\n applyStyles();\n previousTooltipPositionRef.current = position;\n }\n };\n\n const positionTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n // Wait for tooltip to be rendered with valid dimensions\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(positionTooltip);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n const position = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(position, shouldAnimate);\n };\n\n // To handle scroll events with debouncing to prevent excessive repositioning\n handleScroll = debounce(() => {\n if (!targetElement || !tooltipElement) return;\n\n // Preserve current position for animation\n const currentPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n\n if (!previousTooltipPositionRef.current && (currentPosition.top !== 0 || currentPosition.left !== 0)) {\n previousTooltipPositionRef.current = currentPosition;\n }\n\n positionTooltip();\n\n // Update reference after animation completes\n if (previousTooltipPositionRef.current) {\n setTimeout(() => {\n const finalPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n if (finalPosition.top !== 0 || finalPosition.left !== 0) {\n previousTooltipPositionRef.current = finalPosition;\n }\n }, ANIMATION_DURATION_MS);\n }\n }, SCROLL_DEBOUNCE_MS);\n\n // Checks if both target and tooltip are fully visible in viewport\n const areElementsVisible = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipLeftViewport: number,\n tooltipWidth: number,\n tooltipHeight: number\n ): boolean => {\n const combinedBoundingBox = {\n top: Math.min(targetRect.top, tooltipTopViewport),\n bottom: Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight),\n left: Math.min(targetRect.left, tooltipLeftViewport),\n right: Math.max(targetRect.right, tooltipLeftViewport + tooltipWidth)\n };\n\n if (scrollableContainer) {\n const containerRect = scrollableContainer.getBoundingClientRect();\n return (\n combinedBoundingBox.top >= containerRect.top + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= containerRect.top + containerRect.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= containerRect.left + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= containerRect.left + containerRect.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n }\n\n return (\n combinedBoundingBox.top >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= viewportDimensions.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= viewportDimensions.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n };\n\n // Calculates the scroll position needed to make both target and tooltip in viewport\n const calculateScrollToCenter = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipHeight: number\n ): number | null => {\n const combinedTop = Math.min(targetRect.top, tooltipTopViewport);\n const combinedBottom = Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight);\n const combinedHeight = combinedBottom - combinedTop;\n\n // Determine scroll context (container or window)\n const isContainer = Boolean(scrollableContainer && hasScrollableContainer);\n const containerRect = isContainer ? scrollableContainer!.getBoundingClientRect() : null;\n\n const viewportHeight = isContainer ? containerRect!.height : window.innerHeight;\n const currentScroll = isContainer ? scrollableContainer!.scrollTop : getScrollPosition().y;\n const maxScroll = isContainer\n ? scrollableContainer!.scrollHeight - scrollableContainer!.clientHeight\n : document.documentElement.scrollHeight - window.innerHeight;\n\n const availableHeight = viewportHeight - 2 * VIEWPORT_MARGIN_PX;\n\n // To calculate the center point\n let centerPoint: number;\n\n if (combinedHeight > availableHeight) {\n // Combined area too tall - center the target element only\n const targetCenter = (targetRect.top + targetRect.bottom) / 2;\n centerPoint = isContainer ? targetCenter - containerRect!.top + currentScroll : targetCenter + currentScroll;\n } else {\n // Center the combined area (target + tooltip)\n const combinedCenter = (combinedTop + combinedBottom) / 2;\n centerPoint = isContainer\n ? combinedCenter - containerRect!.top + currentScroll\n : combinedCenter + currentScroll;\n }\n\n // Calculate final scroll position and clamp to valid range\n const scrollPosition = centerPoint - viewportHeight / 2;\n return Math.max(0, Math.min(scrollPosition, maxScroll));\n };\n\n // To initialize the tooltip positioning and handle scrolling if needed\n const initializeTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n const waitForDimensions = () => {\n if (!tooltipElement || !targetElement) return;\n\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(waitForDimensions);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n\n // Calculate tooltip position in absolute coordinates\n const tooltipAbsolutePosition = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n // Convert to viewport coordinates for visibility check\n const tooltipViewportPosition = {\n top: tooltipAbsolutePosition.top - scroll.y,\n left: tooltipAbsolutePosition.left - scroll.x\n };\n\n // Check if both elements are visible\n const isVisible = areElementsVisible(\n targetRect,\n tooltipViewportPosition.top,\n tooltipViewportPosition.left,\n tooltipDimensions.width,\n tooltipDimensions.height\n );\n\n if (!isVisible) {\n // Calculate scroll needed to make both visible\n const requiredScrollY = calculateScrollToCenter(\n targetRect,\n tooltipViewportPosition.top,\n tooltipDimensions.height\n );\n\n if (requiredScrollY !== null) {\n const scrollElement = hasScrollableContainer && scrollableContainer ? scrollableContainer : window;\n scrollElement.scrollTo({ top: requiredScrollY, behavior: 'auto' });\n\n // Position tooltip immediately after instant scroll\n requestAnimationFrame(() => positionTooltip());\n } else {\n // Cannot fit with scrolling, position anyway\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n } else {\n // Both are visible, position tooltip\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n };\n\n waitForDimensions();\n };\n\n window.addEventListener('scroll', handleScroll, { passive: true });\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.addEventListener('scroll', handleScroll, { passive: true });\n }\n\n // Add scroll listener for iframe if target is inside iframe\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.addEventListener('scroll', handleScroll, { passive: true });\n }\n }\n\n initializeTooltip();\n };\n\n // Check if we need to wait for the element or get it immediately\n if (currentStep.waitForElement) {\n // Wait for element to appear\n cleanupWait = waitForElement(currentStep.targetElementSelector, initializeStep, currentStep.iframeSelector);\n } else {\n const element = getTargetElement(currentStep.targetElementSelector, currentStep.iframeSelector);\n if (!element) return;\n initializeStep(element);\n }\n\n return () => {\n if (cleanupWait) {\n cleanupWait();\n }\n if (targetElement) {\n targetElement.removeEventListener('click', handleTargetElementClick);\n }\n if (handleScroll) {\n window.removeEventListener('scroll', handleScroll);\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.removeEventListener('scroll', handleScroll);\n }\n // Clean up iframe scroll listener\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.removeEventListener('scroll', handleScroll);\n }\n }\n // Cancel any pending debounced calls\n (handleScroll as ReturnType<typeof debounce> & (() => void)).cancel();\n }\n };\n }, [currentStepIndex, steps, onClose, screenBaseElementSelector, maxWidth]);\n\n // Don't render if all steps completed\n if (currentStepIndex >= steps.length) {\n return null;\n }\n\n const currentStep = steps[currentStepIndex];\n const arrowPosition = getArrowPosition(currentStep?.tooltipPosition);\n const arrowStyle = ARROW_STYLES[arrowPosition];\n\n return createPortal(\n <div\n ref={tooltipRef}\n className={`guided-tour-tooltip relative rounded-md p-1`}\n data-automation-id={`${currentStep?.automationId || 'guided-tour'}-tooltip`}\n style={{ zIndex: currentStep?.zIndex || 1300 }}\n >\n <Icon\n name=\"arrow-head\"\n fill={tooltipBackgroundColor}\n rotation={arrowStyle.rotate as RotationTypes}\n className={`guided-tour-tooltip-arrow absolute ${arrowStyle.class}`}\n />\n <div className=\"guided-tour-tooltip-content flex flex-col gap-2\">\n <p>{currentStep?.content}</p>\n {currentStep?.isOptionalStep && (\n <Button type=\"link\" label=\"Got it\" className=\"!text-white !underline\" onClick={handleTargetElementClick} />\n )}\n </div>\n </div>,\n document.body\n );\n};\n"],"names":["ANIMATION_DURATION_MS","VIEWPORT_MARGIN_PX","SCROLL_DEBOUNCE_MS","ARROW_STYLES","rotate","class","getIframeDocument","iframeSelector","iframe","document","querySelector","warn","contentDocument","contentWindow","error","getTargetElement","selector","iframeDoc","getAdjustedBoundingRect","element","rect","getBoundingClientRect","iframeRect","borderLeft","clientLeft","borderTop","clientTop","DOMRect","left","top","width","height","getArrowPosition","position","getScrollPosition","x","window","scrollX","pageXOffset","y","scrollY","pageYOffset","waitForElement","callback","rafId","checkElement","requestAnimationFrame","cancelAnimationFrame","GuidedTour","steps","screenBaseElementSelector","onClose","tooltipBackgroundColor","tooltipTextColor","maxWidth","currentStepIndex","setCurrentStepIndex","useState","previousTooltipPositionRef","useRef","tooltipRef","navigateToNextStep","length","handleTargetElementClick","useEffect","currentStep","handleBodyClick","event","target","currentTargetElement","targetElementSelector","tooltipElement","current","contains","isDropdownStep","lastStep","lastStepTargetElement","timeoutId","setTimeout","body","addEventListener","clearTimeout","removeEventListener","style","backgroundColor","color","scrollableContainer","targetElement","cleanupWait","handleScroll","hasScrollableContainer","Boolean","scrollHeight","clientHeight","viewportDimensions","innerHeight","clientWidth","innerWidth","initializeStep","calculateTooltipPosition","targetRect","tooltipWidth","tooltipHeight","scroll","tooltipPosition","offsetVertical","tooltipPositionOffset","vertical","offsetHorizontal","horizontal","bottom","right","applyTooltipPosition","shouldAnimate","applyStyles","transition","positionTooltip","tooltipDimensions","offsetWidth","offsetHeight","debounce","currentPosition","parseFloat","finalPosition","areElementsVisible","tooltipTopViewport","tooltipLeftViewport","combinedBoundingBox","Math","min","max","containerRect","calculateScrollToCenter","combinedTop","combinedBottom","combinedHeight","isContainer","viewportHeight","currentScroll","scrollTop","maxScroll","documentElement","availableHeight","centerPoint","targetCenter","combinedCenter","scrollPosition","initializeTooltip","waitForDimensions","tooltipAbsolutePosition","tooltipViewportPosition","requiredScrollY","scrollElement","scrollTo","behavior","passive","iframeWindow","defaultView","cancel","arrowPosition","arrowStyle","createPortal","createElement","ref","className","automationId","zIndex","Icon","name","fill","rotation","React","content","isOptionalStep","Button","type","label","onClick"],"mappings":";;;;;AAOA,MAAMA,IAAwB,KACxBC,IAAqB,IACrBC,IAAqB,KAErBC,KAAe;AAAA,EACnB,YAAY;AAAA,IAAEC,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAgB;AAAA,EACpD,aAAa;AAAA,IAAED,QAAQ;AAAA,IAAMC,OAAO;AAAA,EAAiB;AAAA,EACrD,eAAe;AAAA,IAAED,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAmB;AAAA,EAC1D,gBAAgB;AAAA,IAAED,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAoB;AAC9D,GAgDMC,IAAoBA,CAACC,MAA4C;AAC/DC,QAAAA,IAASC,SAASC,cAAcH,CAAc;AACpD,MAAI,CAACC;AACKG,mBAAAA,KAAK,qBAAqBJ,CAAc,EAAE,GAC3C;AAGL,MAAA;AACF,WAAOC,EAAOI,mBAAmBJ,EAAOK,eAAeJ,YAAY;AAAA,WAC5DK,GAAO;AACNA,mBAAAA,MAAM,kCAAkCA,CAAK,GAC9C;AAAA,EACT;AACF,GAGMC,IAAmBA,CAACC,GAAkBT,MAAgD;AAC1F,MAAI,CAACA;AACIE,WAAAA,SAASC,cAAcM,CAAQ;AAGlCC,QAAAA,IAAYX,EAAkBC,CAAc;AAClD,SAAOU,IAAYA,EAAUP,cAAcM,CAAQ,IAAI;AACzD,GAGME,IAA0BA,CAACC,GAAsBZ,MAAqC;AACpFa,QAAAA,IAAOD,EAAQE;AAErB,MAAI,CAACd;AACIa,WAAAA;AAGHZ,QAAAA,IAASC,SAASC,cAAcH,CAAc;AACpD,MAAI,CAACC;AACIY,WAAAA;AAGHE,QAAAA,IAAad,EAAOa,yBAGpBE,IAAaf,EAAOgB,cAAc,GAClCC,IAAYjB,EAAOkB,aAAa;AAGtC,SAAO,IAAIC,QACTP,EAAKQ,OAAON,EAAWM,OAAOL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AAGnG,GAAaoG,gBAAgB,aAAa;AAAA,IACjElF,OAAO;AAAA,MAAEmF,QAAQrG,GAAaqG,UAAU;AAAA,IAAK;AAAA,EAAA,GAE7CJ,gBAAAA,EAAAA,cAACK,IAAI;AAAA,IACHC,MAAK;AAAA,IACLC,MAAMrH;AAAAA,IACNsH,UAAUV,EAAW5J;AAAAA,IACrBgK,WAAW,sCAAsCJ,EAAW3J,KAAK;AAAA,EAAA,CAClE,GACD6J,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKE,WAAU;AAAA,EACbO,GAAAA,gBAAAA,EAAAT,cAAIjG,KAAAA,MAAAA,GAAa2G,OAAW,GAC3B3G,GAAa4G,kBACZX,gBAAAA,EAAAA,cAACY,IAAM;AAAA,IAACC,MAAK;AAAA,IAAOC,OAAM;AAAA,IAASZ,WAAU;AAAA,IAAyBa,SAASlH;AAAAA,EAA2B,CAAA,CAEzG,CACF,GACLtD,SAASsE,IACX;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index63.js","sources":["../src/components/Link/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { getA11yNameAttributes } from '../../utils/a11y';\nimport './style.scss';\n\n/**\n * Allows native anchor attributes (aria-*, data-*, etc.) to be passed through,\n * but keeps our own href/onClick/aria-label/aria-labelledby/aria-describedby typing.\n */\ntype NativeAnchorProps = Omit<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n 'href' | 'onClick' | 'target' | 'rel' | 'aria-label' | 'aria-labelledby' | 'aria-describedby'\n>;\n\nexport interface LinkProps extends NativeAnchorProps {\n /**\n * URL to navigate to (required for actual links)\n */\n href: string;\n /**\n * Link text content (string only)\n */\n label: string;\n /**\n * If true, automatically adds target=\"_blank\" and rel=\"noopener noreferrer\"\n * Also appends \" (opens in a new tab)\" to aria-label for screen readers\n */\n external?: boolean;\n /**\n * Accessible name for the link. Use when link text is generic or unclear.\n * Prefer ariaLabelledBy when a visible label exists.\n */\n ariaLabel?: string;\n /**\n * ID(s) of element(s) that label this link.\n * Preferred over ariaLabel when a visible label exists (keeps SR and visual text in sync).\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) that describe this link.\n * Provides additional context announced after the accessible name.\n */\n ariaDescribedBy?: string;\n /**\n * Click handler (e.g., for analytics tracking)\n */\n onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n /**\n * Custom class name\n */\n className?: string;\n /**\n * Automation ID for testing\n */\n automationId?: string;\n /**\n * Override target (if you need something other than \"_blank\" for external links).\n * Note: If external={true} and target is provided, the provided target will be used.\n */\n target?: string;\n /**\n * Override rel (if you need something other than \"noopener noreferrer\" for external links).\n * Note: If external={true} and rel is provided, the provided rel will be used.\n */\n rel?: string;\n}\n\nconst EXTERNAL_LINK_ARIA_SUFFIX = ' (opens in a new tab)';\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n href,\n label,\n external = false,\n className = '',\n automationId = '',\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n onClick,\n target,\n rel,\n ...props\n },\n ref\n ) => {\n // Handle external link attributes\n // If external={true}, default to target=\"_blank\" and rel=\"noopener noreferrer\"\n // Explicit target/rel props can override these defaults\n const targetAttr = external ? (target ?? '_blank') : target;\n const relAttr = external ? (rel ?? 'noopener noreferrer') : rel;\n\n // Compute accessible name/description props with correct precedence\n // Precedence: ariaLabelledBy > ariaLabel > visible text content\n const accessibleNameProps = getA11yNameAttributes({\n // External link aria-label enhancement for screen readers:\n // When external={true}, always append \"(opens in a new tab)\"\n ariaLabel:\n external ? `${ariaLabel ?? label}${EXTERNAL_LINK_ARIA_SUFFIX}` : ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy\n });\n\n const linkClassName = ['se-design-link', 'focus-outline', 'focus-visible:underline', className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <a\n ref={ref}\n href={href}\n target={targetAttr}\n rel={relAttr}\n className={linkClassName}\n data-automation-id={automationId}\n onClick={onClick}\n {...props}\n {...accessibleNameProps}\n >\n {label}\n </a>\n );\n }\n);\n\nLink.displayName = 'Link';\n"],"names":["EXTERNAL_LINK_ARIA_SUFFIX","Link","href","label","external","className","automationId","ariaLabel","ariaLabelledBy","ariaDescribedBy","onClick","target","rel","props","ref","targetAttr","relAttr","accessibleNameProps","getA11yNameAttributes","linkClassName","filter","Boolean","join","React","createElement","_extends","displayName"],"mappings":";;;;;;;;;;;;AAkEA,MAAMA,IAA4B,yBAErBC,sBACX,CACE;AAAA,EACEC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,WAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,iBAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,QAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACA,GAAGC;AACL,GACAC,MACG;AAIH,QAAMC,IAAaX,IAAYO,KAAU,WAAYA,GAC/CK,IAAUZ,IAAYQ,KAAO,wBAAyBA,GAItDK,IAAsBC,EAAsB;AAAA;AAAA;AAAA,IAGhDX,WACEH,IAAW,GAAGG,KAAaJ,CAAK,GAAGH,CAAyB,KAAKO;AAAAA,IACnEC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,EAAAA,CACD,GAEKU,IAAgB,CAAC,kBAAkB,iBAAiB,2BAA2Bd,CAAS,EAC3Fe,OAAOC,OAAO,EACdC,KAAK,GAAG;AAEX,SACEC,gBAAAA,EAAAC,cAAA,KAAAC,EAAA;AAAA,IACEX,KAAAA;AAAAA,IACAZ,MAAAA;AAAAA,IACAS,QAAQI;AAAAA,IACRH,KAAKI;AAAAA,IACLX,WAAWc;AAAAA,IACX,sBAAoBb;AAAAA,IACpBI,SAAAA;AAAAA,EAAAA,GACIG,GACAI,CAAmB,GAEtBd,CACA;AAEP,CACF;AAEAF,EAAKyB,cAAc;"}
1
+ {"version":3,"file":"index63.js","sources":["../src/components/Link/index.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { getA11yNameAttributes } from '../../utils/a11y';\nimport './style.scss';\n\n/**\n * Allows native anchor attributes (aria-*, data-*, etc.) to be passed through,\n * but keeps our own href/onClick/aria-label/aria-labelledby/aria-describedby typing.\n */\ntype NativeAnchorProps = Omit<\n React.AnchorHTMLAttributes<HTMLAnchorElement>,\n 'href' | 'onClick' | 'target' | 'rel' | 'aria-label' | 'aria-labelledby' | 'aria-describedby'\n>;\n\nexport interface LinkProps extends NativeAnchorProps {\n /**\n * URL to navigate to (required for actual links)\n */\n href: string;\n /**\n * Link text content (string only)\n */\n label: string;\n /**\n * If true, automatically adds target=\"_blank\" and rel=\"noopener noreferrer\"\n * Also appends \" (opens in a new tab)\" to aria-label for screen readers\n */\n external?: boolean;\n /**\n * Accessible name for the link. Use when link text is generic or unclear.\n * Prefer ariaLabelledBy when a visible label exists.\n */\n ariaLabel?: string;\n /**\n * ID(s) of element(s) that label this link.\n * Preferred over ariaLabel when a visible label exists (keeps SR and visual text in sync).\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) that describe this link.\n * Provides additional context announced after the accessible name.\n */\n ariaDescribedBy?: string;\n /**\n * Click handler (e.g., for analytics tracking)\n */\n onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n /**\n * Custom class name\n */\n className?: string;\n /**\n * Automation ID for testing\n */\n automationId?: string;\n /**\n * Override target (if you need something other than \"_blank\" for external links).\n * Note: If external={true} and target is provided, the provided target will be used.\n */\n target?: string;\n /**\n * Override rel (if you need something other than \"noopener noreferrer\" for external links).\n * Note: If external={true} and rel is provided, the provided rel will be used.\n */\n rel?: string;\n}\n\nconst EXTERNAL_LINK_ARIA_SUFFIX = ' (opens in a new tab)';\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n (\n {\n href,\n label,\n external = false,\n className = '',\n automationId = '',\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n onClick,\n target,\n rel,\n ...props\n },\n ref\n ) => {\n // Handle external link attributes\n // If external={true}, default to target=\"_blank\" and rel=\"noopener noreferrer\"\n // Explicit target/rel props can override these defaults\n const targetAttr = external ? (target ?? '_blank') : target;\n const relAttr = external ? (rel ?? 'noopener noreferrer') : rel;\n\n // Compute accessible name/description props with correct precedence\n // Precedence: ariaLabelledBy > ariaLabel > visible text content\n const accessibleNameProps = getA11yNameAttributes({\n // External link aria-label enhancement for screen readers:\n // When external={true}, always append \"(opens in a new tab)\"\n ariaLabel:\n external ? `${ariaLabel ?? label}${EXTERNAL_LINK_ARIA_SUFFIX}` : ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy\n });\n\n const linkClassName = ['se-design-link', 'focus-outline', 'focus-visible:underline', className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <a\n ref={ref}\n href={href}\n target={targetAttr}\n rel={relAttr}\n className={linkClassName}\n data-automation-id={automationId}\n onClick={onClick}\n {...props}\n {...accessibleNameProps}\n >\n {label}\n </a>\n );\n }\n);\n\nLink.displayName = 'Link';\n"],"names":["EXTERNAL_LINK_ARIA_SUFFIX","Link","href","label","external","className","automationId","ariaLabel","ariaLabelledBy","ariaDescribedBy","onClick","target","rel","props","ref","targetAttr","relAttr","accessibleNameProps","getA11yNameAttributes","linkClassName","filter","Boolean","join","React","createElement","_extends","displayName"],"mappings":";;;;;;;;;;;;AAkEA,MAAMA,IAA4B,yBAErBC,sBACX,CACE;AAAA,EACEC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,WAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,iBAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,QAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACA,GAAGC;AACL,GACAC,MACG;AAIGC,QAAAA,IAAaX,IAAYO,KAAU,WAAYA,GAC/CK,IAAUZ,IAAYQ,KAAO,wBAAyBA,GAItDK,IAAsBC,EAAsB;AAAA;AAAA;AAAA,IAGhDX,WACEH,IAAW,GAAGG,KAAaJ,CAAK,GAAGH,CAAyB,KAAKO;AAAAA,IACnEC,gBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,EAAAA,CACD,GAEKU,IAAgB,CAAC,kBAAkB,iBAAiB,2BAA2Bd,CAAS,EAC3Fe,OAAOC,OAAO,EACdC,KAAK,GAAG;AAGTC,SAAAA,gBAAAA,EAAAC,cAAA,KAAAC,EAAA;AAAA,IACEX,KAAAA;AAAAA,IACAZ,MAAAA;AAAAA,IACAS,QAAQI;AAAAA,IACRH,KAAKI;AAAAA,IACLX,WAAWc;AAAAA,IACX,sBAAoBb;AAAAA,IACpBI,SAAAA;AAAAA,EACIG,GAAAA,GACAI,CAAmB,GAEtBd,CACA;AAEP,CACF;AAEAF,EAAKyB,cAAc;"}
package/dist/index64.js CHANGED
@@ -137,6 +137,7 @@ const O = {
137
137
  }));
138
138
  };
139
139
  export {
140
- ca as Paywall
140
+ ca as Paywall,
141
+ ca as default
141
142
  };
142
143
  //# sourceMappingURL=index64.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index64.js","sources":["../src/components/Paywall/index.tsx"],"sourcesContent":["import React, { FC, ReactNode, useRef } from 'react';\nimport { Button } from 'src/components/Button';\nimport { Badge } from 'src/components/Badge';\nimport { Icon } from 'src/components/Icon';\nimport { Link } from 'src/components/Link';\nimport { CustomModal } from 'src/components/CustomModal';\nimport { useFocusTrap } from 'src/utils/a11y';\nimport { useStableId } from 'src/utils/useStableId';\nimport './style.scss';\n\n/** Variant: with bullet points list, or description only */\nexport type PaywallVariant = 'with-points' | 'description-only';\n\n/** Size: small (656×384) or large (768×500) – sets modal dimensions and media panel proportion */\nexport type PaywallSize = 'sm' | 'lg';\n\n/** Feature list item: plain string (uses default/list icon) or object with text and optional per-item icon */\nexport type PaywallFeatureItem = string | { text: string; icon?: ReactNode };\n\nconst PAYWALL_SIZE_DIMENSIONS: Record<PaywallSize, { width: string; height: string }> = {\n lg: { width: '768px', height: '500px' },\n sm: { width: '656px', height: '384px' },\n};\n\nexport interface PaywallProps {\n isOpen: boolean;\n onClose: () => void;\n trigger?: ReactNode;\n modalWidth?: string;\n modalHeight?: string;\n variant: PaywallVariant;\n size?: PaywallSize;\n availabilityLabel?: string;\n availabilityBadgeText: string;\n title: string;\n description: string;\n learnMoreLinkText?: string;\n learnMoreHref?: string;\n onLearnMoreClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n featureListDesc?: string;\n featuresList?: PaywallFeatureItem[];\n featureItemIcon?: ReactNode;\n mediaContent?: ReactNode;\n laterButtonText: string;\n purchaseButtonText: string;\n onLaterClick?: () => void;\n onPurchaseClick?: () => void;\n className?: string;\n modalContentClassName?: string;\n automationId?: string;\n id?: string;\n}\n\n/** Paywall – always shown in a modal. Pass isOpen/onClose and optionally a trigger. */\nexport const Paywall: FC<PaywallProps> = ({\n isOpen,\n onClose,\n trigger,\n modalWidth,\n modalHeight,\n variant,\n size = 'lg',\n availabilityLabel = 'Available on ',\n availabilityBadgeText,\n title,\n description,\n learnMoreLinkText,\n learnMoreHref,\n onLearnMoreClick,\n featureListDesc,\n featuresList = [],\n featureItemIcon,\n mediaContent,\n laterButtonText,\n purchaseButtonText,\n onLaterClick,\n onPurchaseClick,\n className = '',\n modalContentClassName = '',\n automationId = '',\n id: providedId,\n}) => {\n const modalRef = useRef<HTMLDivElement>(null);\n const titleId = useStableId(providedId, 'paywall-title');\n\n useFocusTrap({\n enabled: isOpen,\n containerRef: modalRef,\n restoreFocus: true,\n initialFocus: '.paywall-card-btn-later',\n });\n\n const handleLaterClick = () => {\n onLaterClick?.();\n onClose();\n };\n\n const dimensions = PAYWALL_SIZE_DIMENSIONS[size];\n const width = modalWidth ?? dimensions.width;\n const height = modalHeight ?? dimensions.height;\n\n const withPoints = variant === 'with-points' && size === 'lg';\n const normalizedFeatures = featuresList.map((item): { text: string; icon?: ReactNode } =>\n typeof item === 'string' ? { text: item } : { text: item.text, icon: item.icon }\n );\n const showFeatures = withPoints && normalizedFeatures.length > 0;\n const defaultIcon = featureItemIcon ?? <Icon name=\"info\" />;\n\n const content = (\n <section\n className={`paywall paywall-ctn paywall-ctn--${size} ${className}`}\n data-automation-id={automationId}\n >\n <div className=\"paywall-card\">\n <div className=\"paywall-card-content\">\n <span className=\"paywall-card-availability\">\n <span className=\"paywall-card-availability-label\">{availabilityLabel}</span>\n <Badge\n label={availabilityBadgeText}\n className=\"paywall-card-badge\"\n bgColor=\"var(--color-yellow-100)\"\n textColor=\"var(--color-yellow-700)\"\n />\n </span>\n <h3 id={titleId} className=\"paywall-card-title\">{title}</h3>\n <p className=\"paywall-card-description\">\n {description}\n {learnMoreLinkText && learnMoreHref && (\n <Link\n href={learnMoreHref}\n label={learnMoreLinkText}\n external\n className=\"paywall-card-learn-more\"\n onClick={onLearnMoreClick}\n />\n )}\n </p>\n {withPoints && featureListDesc && (\n <p className=\"paywall-card-features-intro\">{featureListDesc}</p>\n )}\n {showFeatures && (\n <ul className=\"paywall-card-features-list\">\n {normalizedFeatures.map((item) => (\n <li key={item.text} className=\"paywall-card-feature-item\">\n <span className=\"paywall-card-feature-icon\" aria-hidden>\n {item.icon ?? defaultIcon}\n </span>\n <span>{item.text}</span>\n </li>\n ))}\n </ul>\n )}\n <div className=\"paywall-card-actions\">\n <Button\n type=\"ghost\"\n size=\"md\"\n label={laterButtonText}\n onClick={handleLaterClick}\n className=\"paywall-card-btn-later\"\n />\n <Button\n type=\"primary\"\n size=\"md\"\n label={purchaseButtonText}\n onClick={onPurchaseClick}\n className=\"paywall-card-btn-purchase\"\n />\n </div>\n </div>\n <div className=\"paywall-card-media\">\n {mediaContent}\n </div>\n </div>\n </section>\n );\n\n const modalContent = (\n <div\n ref={modalRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n className={`paywall-modal-content ${modalContentClassName}`}\n style={{ height, minHeight: height }}\n >\n {content}\n </div>\n );\n\n return (\n <>\n {trigger && <span className=\"paywall-trigger\">{trigger}</span>}\n <CustomModal\n isOpen={isOpen}\n onModalClick={() => {}}\n renderModalContent={() => modalContent}\n width={width}\n contentClassName=\"paywall-modal-content-wrapper\"\n automationId={automationId}\n />\n </>\n );\n};\n\nexport default Paywall;\n"],"names":["React__default","useRef","Button","Badge","Icon","Link","CustomModal","useFocusTrap","useStableId","PAYWALL_SIZE_DIMENSIONS","lg","width","height","sm","Paywall","isOpen","onClose","trigger","modalWidth","modalHeight","variant","size","availabilityLabel","availabilityBadgeText","title","description","learnMoreLinkText","learnMoreHref","onLearnMoreClick","featureListDesc","featuresList","featureItemIcon","mediaContent","laterButtonText","purchaseButtonText","onLaterClick","onPurchaseClick","className","modalContentClassName","automationId","id","providedId","modalRef","titleId","enabled","containerRef","restoreFocus","initialFocus","handleLaterClick","dimensions","withPoints","normalizedFeatures","map","item","text","icon","showFeatures","length","defaultIcon","React","createElement","name","content","label","bgColor","textColor","href","external","onClick","key","type","modalContent","ref","role","style","minHeight","Fragment","onModalClick","renderModalContent","contentClassName"],"mappings":"AAmBA,OAAAA,KAAA,UAAAC,SAAA;AAAA,SAAA,UAAAC,SAAA;AAAA,SAAA,SAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,SAAA,eAAAC,SAAA;AAAA,SAAA,gBAAAC,SAAA;AAAA,SAAA,eAAAC,SAAA;AAAA,OAAA;AAAA,MAAMC,IAAkF;AAAA,EACtFC,IAAI;AAAA,IAAEC,OAAO;AAAA,IAASC,QAAQ;AAAA,EAAA;AAAA,EAC9BC,IAAI;AAAA,IAAEF,OAAO;AAAA,IAASC,QAAQ;AAAA,EAAA;AAChC,GAgCaE,KAA4BA,CAAC;AAAA,EACxCC,QAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,YAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,MAAAA,IA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tsx"],"sourcesContent":["import React, { FC, ReactNode, useRef } from 'react';\nimport { Button } from 'src/components/Button';\nimport { Badge } from 'src/components/Badge';\nimport { Icon } from 'src/components/Icon';\nimport { Link } from 'src/components/Link';\nimport { CustomModal } from 'src/components/CustomModal';\nimport { useFocusTrap } from 'src/utils/a11y';\nimport { useStableId } from 'src/utils/useStableId';\nimport './style.scss';\n\n/** Variant: with bullet points list, or description only */\nexport type PaywallVariant = 'with-points' | 'description-only';\n\n/** Size: small (656×384) or large (768×500) – sets modal dimensions and media panel proportion */\nexport type PaywallSize = 'sm' | 'lg';\n\n/** Feature list item: plain string (uses default/list icon) or object with text and optional per-item icon */\nexport type PaywallFeatureItem = string | { text: string; icon?: ReactNode };\n\nconst PAYWALL_SIZE_DIMENSIONS: Record<PaywallSize, { width: string; height: string }> = {\n lg: { width: '768px', height: '500px' },\n sm: { width: '656px', height: '384px' },\n};\n\nexport interface PaywallProps {\n isOpen: boolean;\n onClose: () => void;\n trigger?: ReactNode;\n modalWidth?: string;\n modalHeight?: string;\n variant: PaywallVariant;\n size?: PaywallSize;\n availabilityLabel?: string;\n availabilityBadgeText: string;\n title: string;\n description: string;\n learnMoreLinkText?: string;\n learnMoreHref?: string;\n onLearnMoreClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n featureListDesc?: string;\n featuresList?: PaywallFeatureItem[];\n featureItemIcon?: ReactNode;\n mediaContent?: ReactNode;\n laterButtonText: string;\n purchaseButtonText: string;\n onLaterClick?: () => void;\n onPurchaseClick?: () => void;\n className?: string;\n modalContentClassName?: string;\n automationId?: string;\n id?: string;\n}\n\n/** Paywall – always shown in a modal. Pass isOpen/onClose and optionally a trigger. */\nexport const Paywall: FC<PaywallProps> = ({\n isOpen,\n onClose,\n trigger,\n modalWidth,\n modalHeight,\n variant,\n size = 'lg',\n availabilityLabel = 'Available on ',\n availabilityBadgeText,\n title,\n description,\n learnMoreLinkText,\n learnMoreHref,\n onLearnMoreClick,\n featureListDesc,\n featuresList = [],\n featureItemIcon,\n mediaContent,\n laterButtonText,\n purchaseButtonText,\n onLaterClick,\n onPurchaseClick,\n className = '',\n modalContentClassName = '',\n automationId = '',\n id: providedId,\n}) => {\n const modalRef = useRef<HTMLDivElement>(null);\n const titleId = useStableId(providedId, 'paywall-title');\n\n useFocusTrap({\n enabled: isOpen,\n containerRef: modalRef,\n restoreFocus: true,\n initialFocus: '.paywall-card-btn-later',\n });\n\n const handleLaterClick = () => {\n onLaterClick?.();\n onClose();\n };\n\n const dimensions = PAYWALL_SIZE_DIMENSIONS[size];\n const width = modalWidth ?? dimensions.width;\n const height = modalHeight ?? dimensions.height;\n\n const withPoints = variant === 'with-points' && size === 'lg';\n const normalizedFeatures = featuresList.map((item): { text: string; icon?: ReactNode } =>\n typeof item === 'string' ? { text: item } : { text: item.text, icon: item.icon }\n );\n const showFeatures = withPoints && normalizedFeatures.length > 0;\n const defaultIcon = featureItemIcon ?? <Icon name=\"info\" />;\n\n const content = (\n <section\n className={`paywall paywall-ctn paywall-ctn--${size} ${className}`}\n data-automation-id={automationId}\n >\n <div className=\"paywall-card\">\n <div className=\"paywall-card-content\">\n <span className=\"paywall-card-availability\">\n <span className=\"paywall-card-availability-label\">{availabilityLabel}</span>\n <Badge\n label={availabilityBadgeText}\n className=\"paywall-card-badge\"\n bgColor=\"var(--color-yellow-100)\"\n textColor=\"var(--color-yellow-700)\"\n />\n </span>\n <h3 id={titleId} className=\"paywall-card-title\">{title}</h3>\n <p className=\"paywall-card-description\">\n {description}\n {learnMoreLinkText && learnMoreHref && (\n <Link\n href={learnMoreHref}\n label={learnMoreLinkText}\n external\n className=\"paywall-card-learn-more\"\n onClick={onLearnMoreClick}\n />\n )}\n </p>\n {withPoints && featureListDesc && (\n <p className=\"paywall-card-features-intro\">{featureListDesc}</p>\n )}\n {showFeatures && (\n <ul className=\"paywall-card-features-list\">\n {normalizedFeatures.map((item) => (\n <li key={item.text} className=\"paywall-card-feature-item\">\n <span className=\"paywall-card-feature-icon\" aria-hidden>\n {item.icon ?? defaultIcon}\n </span>\n <span>{item.text}</span>\n </li>\n ))}\n </ul>\n )}\n <div className=\"paywall-card-actions\">\n <Button\n type=\"ghost\"\n size=\"md\"\n label={laterButtonText}\n onClick={handleLaterClick}\n className=\"paywall-card-btn-later\"\n />\n <Button\n type=\"primary\"\n size=\"md\"\n label={purchaseButtonText}\n onClick={onPurchaseClick}\n className=\"paywall-card-btn-purchase\"\n />\n </div>\n </div>\n <div className=\"paywall-card-media\">\n {mediaContent}\n </div>\n </div>\n </section>\n );\n\n const modalContent = (\n <div\n ref={modalRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={titleId}\n className={`paywall-modal-content ${modalContentClassName}`}\n style={{ height, minHeight: height }}\n >\n {content}\n </div>\n );\n\n return (\n <>\n {trigger && <span className=\"paywall-trigger\">{trigger}</span>}\n <CustomModal\n isOpen={isOpen}\n onModalClick={() => {}}\n renderModalContent={() => modalContent}\n width={width}\n contentClassName=\"paywall-modal-content-wrapper\"\n automationId={automationId}\n />\n </>\n );\n};\n\nexport default Paywall;\n"],"names":["React__default","useRef","Button","Badge","Icon","Link","CustomModal","useFocusTrap","useStableId","PAYWALL_SIZE_DIMENSIONS","lg","width","height","sm","Paywall","isOpen","onClose","trigger","modalWidth","modalHeight","variant","size","availabilityLabel","availabilityBadgeText","title","description","learnMoreLinkText","learnMoreHref","onLearnMoreClick","featureListDesc","featuresList","featureItemIcon","mediaContent","laterButtonText","purchaseButtonText","onLaterClick","onPurchaseClick","className","modalContentClassName","automationId","id","providedId","modalRef","titleId","enabled","containerRef","restoreFocus","initialFocus","handleLaterClick","dimensions","withPoints","normalizedFeatures","map","item","text","icon","showFeatures","length","defaultIcon","createElement","name","content","React","label","bgColor","textColor","href","external","onClick","key","type","modalContent","ref","role","style","minHeight","Fragment","onModalClick","renderModalContent","contentClassName"],"mappings":"AAmBA,OAAAA,KAAA,UAAAC,SAAA;AAAA,SAAA,UAAAC,SAAA;AAAA,SAAA,SAAAC,SA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IAAO;AAAA,KAElCiD,CACE;AAILC,SAAAA,gBAAAA,EAAAH,cAAAG,EAAAc,UAAA,MACG3D,KAAW6C,gBAAAA,EAAAH,cAAA,QAAA;AAAA,IAAMtB,WAAU;AAAA,EAAmBpB,GAAAA,CAAc,GAC7D6C,gBAAAA,EAAAH,cAACrD,GAAW;AAAA,IACVS,QAAAA;AAAAA,IACA8D,cAAcA,MAAM;AAAA,IAAC;AAAA,IACrBC,oBAAoBA,MAAMP;AAAAA,IAC1B5D,OAAAA;AAAAA,IACAoE,kBAAiB;AAAA,IACjBxC,cAAAA;AAAAA,EACD,CAAA,CACD;AAEN;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index66.js","sources":["../src/utils/a11y/useAccessiblePress.ts"],"sourcesContent":["import * as React from 'react';\nimport { isVirtualClick } from '../virtualClick';\n\n/**\n * Hook for accessible press interactions (pointer vs keyboard vs virtual click).\n *\n * Handles:\n * - Pointer intent tracking (mouse/touch)\n * - Virtual click detection (NVDA browse mode, etc.)\n * - Routing to appropriate handler (onClick vs onKeyboardActivate)\n * - For non-native elements: Enter/Space → activation\n * - Optional stopPropagation and preventDefault\n *\n * @example\n * // Native button (isNative=true, the default)\n * const { pressProps } = useAccessiblePress({ onClick, disabled });\n * <button {...pressProps}>Click me</button>\n *\n * @example\n * // Non-native element (div acting as button)\n * const { pressProps, role, tabIndex } = useAccessiblePress({ onClick, isNative: false });\n * <div role={role} tabIndex={tabIndex} {...pressProps}>Click me</div>\n *\n * @example\n * // Element nested inside clickable parent (prevent event bubbling)\n * const { pressProps, tabIndex } = useAccessiblePress({ \n * onClick, \n * isNative: false, \n * stopPropagation: true \n * });\n * <div role=\"button\" tabIndex={tabIndex} {...pressProps}>Click me</div>\n */\n\ntype InputKind = 'pointer' | 'keyboard' | 'virtual';\n\nexport type UseAccessiblePressOptions = {\n /**\n * Whether the element is disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the element is in a loading state (will also disable)\n */\n loading?: boolean;\n\n /**\n * Handler for pointer/touch activations (or all activations if onKeyboardActivate is not provided)\n */\n onClick?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /**\n * Handler for keyboard + assistive tech virtual activation.\n * If omitted, onClick is used for all activations.\n */\n onKeyboardActivate?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /**\n * If true, this is a native <button> (or other native pressable) and we MUST NOT add Enter/Space handling.\n * Default: true\n */\n isNative?: boolean;\n\n /**\n * Only for non-native elements (div/span). Defaults to 'button'.\n */\n role?: string;\n\n /**\n * Only for non-native elements. Defaults to 0.\n */\n tabIndex?: number;\n\n /**\n * If true, calls e.stopPropagation() before invoking onClick handler.\n * Useful when element is nested inside another clickable element.\n * Default: false\n */\n stopPropagation?: boolean;\n\n /**\n * If true, calls e.preventDefault() before invoking onClick handler.\n * Note: For non-native elements, preventDefault is already called on Space/Enter keys.\n * Default: false\n */\n preventDefault?: boolean;\n\n /**\n * Toggle/pressed state. When true or false, sets aria-pressed on the element (e.g. selected color swatch).\n * Omit for non-toggle buttons.\n */\n pressed?: boolean;\n};\n\nexport type UseAccessiblePressReturn = {\n /**\n * Props to spread onto the element. Includes event handlers and ARIA attributes.\n * Does NOT include role/tabIndex — apply those separately.\n */\n pressProps: React.HTMLAttributes<HTMLElement> & {\n 'aria-disabled'?: 'true';\n 'aria-busy'?: 'true';\n 'aria-pressed'?: boolean;\n };\n\n /**\n * Combined disabled state (disabled || loading)\n */\n isDisabled: boolean;\n\n /**\n * Role for non-native elements (e.g., 'button', 'menuitem').\n * Only returned when isNative=false.\n */\n role?: string;\n\n /**\n * TabIndex for non-native elements.\n * Returns -1 when disabled, otherwise the provided tabIndex (default 0).\n * Only returned when isNative=false.\n */\n tabIndex?: number;\n};\n\nexport function useAccessiblePress({\n disabled = false,\n loading = false,\n onClick,\n onKeyboardActivate,\n isNative = true,\n role = 'button',\n tabIndex = 0,\n stopPropagation = false,\n preventDefault = false,\n pressed\n}: UseAccessiblePressOptions = {}): UseAccessiblePressReturn {\n const isDisabled = disabled || loading;\n const lastWasPointerRef = React.useRef(false);\n\n const markPointer = React.useCallback(() => {\n lastWasPointerRef.current = true;\n }, []);\n\n const handleClick = React.useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (isDisabled) return;\n\n // Handle event control flags\n if (stopPropagation) e.stopPropagation();\n if (preventDefault) e.preventDefault();\n\n const virtual = isVirtualClick(e.nativeEvent as any);\n const isPointer = lastWasPointerRef.current;\n lastWasPointerRef.current = false;\n\n const input: InputKind = virtual ? 'virtual' : isPointer ? 'pointer' : 'keyboard';\n\n // If we have a keyboard handler, route keyboard + virtual clicks there.\n if ((input === 'keyboard' || input === 'virtual') && onKeyboardActivate) {\n onKeyboardActivate(e);\n return;\n }\n\n onClick?.(e);\n },\n [isDisabled, onClick, onKeyboardActivate, stopPropagation, preventDefault]\n );\n\n // Only used for non-native elements: Enter/Space should trigger click(), reusing the same click routing.\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLElement>) => {\n if (isDisabled) return;\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Trigger native click event so all routing goes through handleClick\n (e.currentTarget as HTMLElement).click();\n }\n },\n [isDisabled]\n );\n\n const pressProps: UseAccessiblePressReturn['pressProps'] = {\n onPointerDown: markPointer,\n onMouseDown: markPointer,\n onTouchStart: markPointer,\n onClick: handleClick,\n 'aria-disabled': isDisabled ? 'true' : undefined,\n 'aria-busy': loading ? 'true' : undefined,\n 'aria-pressed': pressed\n };\n\n // For non-native elements, add Enter/Space handling\n if (!isNative) {\n pressProps.onKeyDown = handleKeyDown;\n }\n\n // Return role/tabIndex separately (only for non-native elements)\n const result: UseAccessiblePressReturn = { pressProps, isDisabled };\n\n if (!isNative) {\n result.role = role;\n result.tabIndex = isDisabled ? -1 : tabIndex;\n }\n\n return result;\n}\n\n"],"names":["React","isVirtualClick","useAccessiblePress","disabled","loading","onClick","onKeyboardActivate","isNative","role","tabIndex","stopPropagation","preventDefault","pressed","isDisabled","lastWasPointerRef","useRef","markPointer","useCallback","current","handleClick","e","virtual","nativeEvent","isPointer","input","handleKeyDown","key","currentTarget","click","pressProps","onPointerDown","onMouseDown","onTouchStart","undefined","onKeyDown","result"],"mappings":"AA4HO,YAAAA,OAAA;AAAA,SAAA,kBAAAC,SAAA;AAAA,SAASC,EAAmB;AAAA,EACjCC,UAAAA,IAAW;AAAA,EACXC,SAAAA,IAAU;AAAA,EACVC,SAAAA;AAAAA,EACAC,oBAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,MAAAA,IAAO;AAAA,EACPC,UAAAA,IAAW;AAAA,EACXC,iBAAAA,IAAkB;AAAA,EAClBC,gBAAAA,IAAiB;AAAA,EACjBC,SAAAA;AACyB,IAAI,IAA8B;AAC3D,QAAMC,IAAaV,KAAYC,GACzBU,IAAoBd,EAAMe,OAAO,EAAK,GAEtCC,IAAchB,EAAMiB,YAAY,MAAM;AAC1CH,IAAAA,EAAkBI,UAAU;AAAA,EAC9B,GAAG,CAAA,CAAE,GAECC,IAAcnB,EAAMiB,YACxB,CAACG,MAAqC;AACpC,QAAIP,EAAY;AAGhB,IAAIH,OAAmBA,gBAAAA,GACnBC,OAAkBA,eAAAA;AAEtB,UAAMU,IAAUpB,EAAemB,EAAEE,WAAkB,GAC7CC,IAAYT,EAAkBI;AACpCJ,IAAAA,EAAkBI,UAAU;AAE5B,UAAMM,IAAmBH,IAAU,YAAYE,IAAY,YAAY;AAGvE,SAAKC,MAAU,cAAcA,MAAU,cAAclB,GAAoB;AACvEA,MAAAA,EAAmBc,CAAC;AACpB;AAAA,IACF;AAEAf,IAAAA,IAAUe,CAAC;AAAA,EACb,GACA,CAACP,GAAYR,GAASC,GAAoBI,GAAiBC,CAAc,CAC3E,GAGMc,IAAgBzB,EAAMiB,YAC1B,CAACG,MAAwC;AACvC,IAAIP,MAEAO,EAAEM,QAAQ,WAAWN,EAAEM,QAAQ,SACjCN,EAAET,eAAAA,GAEDS,EAAEO,cAA8BC,MAAAA;AAAAA,EAErC,GACA,CAACf,CAAU,CACb,GAEMgB,IAAqD;AAAA,IACzDC,eAAed;AAAAA,IACfe,aAAaf;AAAAA,IACbgB,cAAchB;AAAAA,IACdX,SAASc;AAAAA,IACT,iBAAiBN,IAAa,SAASoB;AAAAA,IACvC,aAAa7B,IAAU,SAAS6B;AAAAA,IAChC,gBAAgBrB;AAAAA,EAAAA;AAIlB,EAAKL,MACHsB,EAAWK,YAAYT;AAIzB,QAAMU,IAAmC;AAAA,IAAEN,YAAAA;AAAAA,IAAYhB,YAAAA;AAAAA,EAAAA;AAEvD,SAAKN,MACH4B,EAAO3B,OAAOA,GACd2B,EAAO1B,WAAWI,IAAa,KAAKJ,IAG/B0B;AACT;"}
1
+ {"version":3,"file":"index66.js","sources":["../src/utils/a11y/useAccessiblePress.ts"],"sourcesContent":["import * as React from 'react';\nimport { isVirtualClick } from '../virtualClick';\n\n/**\n * Hook for accessible press interactions (pointer vs keyboard vs virtual click).\n *\n * Handles:\n * - Pointer intent tracking (mouse/touch)\n * - Virtual click detection (NVDA browse mode, etc.)\n * - Routing to appropriate handler (onClick vs onKeyboardActivate)\n * - For non-native elements: Enter/Space → activation\n * - Optional stopPropagation and preventDefault\n *\n * @example\n * // Native button (isNative=true, the default)\n * const { pressProps } = useAccessiblePress({ onClick, disabled });\n * <button {...pressProps}>Click me</button>\n *\n * @example\n * // Non-native element (div acting as button)\n * const { pressProps, role, tabIndex } = useAccessiblePress({ onClick, isNative: false });\n * <div role={role} tabIndex={tabIndex} {...pressProps}>Click me</div>\n *\n * @example\n * // Element nested inside clickable parent (prevent event bubbling)\n * const { pressProps, tabIndex } = useAccessiblePress({ \n * onClick, \n * isNative: false, \n * stopPropagation: true \n * });\n * <div role=\"button\" tabIndex={tabIndex} {...pressProps}>Click me</div>\n */\n\ntype InputKind = 'pointer' | 'keyboard' | 'virtual';\n\nexport type UseAccessiblePressOptions = {\n /**\n * Whether the element is disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the element is in a loading state (will also disable)\n */\n loading?: boolean;\n\n /**\n * Handler for pointer/touch activations (or all activations if onKeyboardActivate is not provided)\n */\n onClick?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /**\n * Handler for keyboard + assistive tech virtual activation.\n * If omitted, onClick is used for all activations.\n */\n onKeyboardActivate?: (e: React.MouseEvent<HTMLElement>) => void;\n\n /**\n * If true, this is a native <button> (or other native pressable) and we MUST NOT add Enter/Space handling.\n * Default: true\n */\n isNative?: boolean;\n\n /**\n * Only for non-native elements (div/span). Defaults to 'button'.\n */\n role?: string;\n\n /**\n * Only for non-native elements. Defaults to 0.\n */\n tabIndex?: number;\n\n /**\n * If true, calls e.stopPropagation() before invoking onClick handler.\n * Useful when element is nested inside another clickable element.\n * Default: false\n */\n stopPropagation?: boolean;\n\n /**\n * If true, calls e.preventDefault() before invoking onClick handler.\n * Note: For non-native elements, preventDefault is already called on Space/Enter keys.\n * Default: false\n */\n preventDefault?: boolean;\n\n /**\n * Toggle/pressed state. When true or false, sets aria-pressed on the element (e.g. selected color swatch).\n * Omit for non-toggle buttons.\n */\n pressed?: boolean;\n};\n\nexport type UseAccessiblePressReturn = {\n /**\n * Props to spread onto the element. Includes event handlers and ARIA attributes.\n * Does NOT include role/tabIndex — apply those separately.\n */\n pressProps: React.HTMLAttributes<HTMLElement> & {\n 'aria-disabled'?: 'true';\n 'aria-busy'?: 'true';\n 'aria-pressed'?: boolean;\n };\n\n /**\n * Combined disabled state (disabled || loading)\n */\n isDisabled: boolean;\n\n /**\n * Role for non-native elements (e.g., 'button', 'menuitem').\n * Only returned when isNative=false.\n */\n role?: string;\n\n /**\n * TabIndex for non-native elements.\n * Returns -1 when disabled, otherwise the provided tabIndex (default 0).\n * Only returned when isNative=false.\n */\n tabIndex?: number;\n};\n\nexport function useAccessiblePress({\n disabled = false,\n loading = false,\n onClick,\n onKeyboardActivate,\n isNative = true,\n role = 'button',\n tabIndex = 0,\n stopPropagation = false,\n preventDefault = false,\n pressed\n}: UseAccessiblePressOptions = {}): UseAccessiblePressReturn {\n const isDisabled = disabled || loading;\n const lastWasPointerRef = React.useRef(false);\n\n const markPointer = React.useCallback(() => {\n lastWasPointerRef.current = true;\n }, []);\n\n const handleClick = React.useCallback(\n (e: React.MouseEvent<HTMLElement>) => {\n if (isDisabled) return;\n\n // Handle event control flags\n if (stopPropagation) e.stopPropagation();\n if (preventDefault) e.preventDefault();\n\n const virtual = isVirtualClick(e.nativeEvent as any);\n const isPointer = lastWasPointerRef.current;\n lastWasPointerRef.current = false;\n\n const input: InputKind = virtual ? 'virtual' : isPointer ? 'pointer' : 'keyboard';\n\n // If we have a keyboard handler, route keyboard + virtual clicks there.\n if ((input === 'keyboard' || input === 'virtual') && onKeyboardActivate) {\n onKeyboardActivate(e);\n return;\n }\n\n onClick?.(e);\n },\n [isDisabled, onClick, onKeyboardActivate, stopPropagation, preventDefault]\n );\n\n // Only used for non-native elements: Enter/Space should trigger click(), reusing the same click routing.\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLElement>) => {\n if (isDisabled) return;\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Trigger native click event so all routing goes through handleClick\n (e.currentTarget as HTMLElement).click();\n }\n },\n [isDisabled]\n );\n\n const pressProps: UseAccessiblePressReturn['pressProps'] = {\n onPointerDown: markPointer,\n onMouseDown: markPointer,\n onTouchStart: markPointer,\n onClick: handleClick,\n 'aria-disabled': isDisabled ? 'true' : undefined,\n 'aria-busy': loading ? 'true' : undefined,\n 'aria-pressed': pressed\n };\n\n // For non-native elements, add Enter/Space handling\n if (!isNative) {\n pressProps.onKeyDown = handleKeyDown;\n }\n\n // Return role/tabIndex separately (only for non-native elements)\n const result: UseAccessiblePressReturn = { pressProps, isDisabled };\n\n if (!isNative) {\n result.role = role;\n result.tabIndex = isDisabled ? -1 : tabIndex;\n }\n\n return result;\n}\n\n"],"names":["React","isVirtualClick","useAccessiblePress","disabled","loading","onClick","onKeyboardActivate","isNative","role","tabIndex","stopPropagation","preventDefault","pressed","isDisabled","lastWasPointerRef","useRef","markPointer","useCallback","current","handleClick","e","virtual","nativeEvent","isPointer","input","handleKeyDown","key","currentTarget","click","pressProps","onPointerDown","onMouseDown","onTouchStart","undefined","onKeyDown","result"],"mappings":"AA4HO,YAAAA,OAAA;AAAA,SAAA,kBAAAC,SAAA;AAAA,SAASC,EAAmB;AAAA,EACjCC,UAAAA,IAAW;AAAA,EACXC,SAAAA,IAAU;AAAA,EACVC,SAAAA;AAAAA,EACAC,oBAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,MAAAA,IAAO;AAAA,EACPC,UAAAA,IAAW;AAAA,EACXC,iBAAAA,IAAkB;AAAA,EAClBC,gBAAAA,IAAiB;AAAA,EACjBC,SAAAA;AACyB,IAAI,IAA8B;AAC3D,QAAMC,IAAaV,KAAYC,GACzBU,IAAoBd,EAAMe,OAAO,EAAK,GAEtCC,IAAchB,EAAMiB,YAAY,MAAM;AAC1CH,IAAAA,EAAkBI,UAAU;AAAA,EAC9B,GAAG,CAAE,CAAA,GAECC,IAAcnB,EAAMiB,YACxB,CAACG,MAAqC;AACpC,QAAIP,EAAY;AAGZH,IAAAA,OAAmBA,mBACnBC,OAAkBA;AAEhBU,UAAAA,IAAUpB,EAAemB,EAAEE,WAAkB,GAC7CC,IAAYT,EAAkBI;AACpCJ,IAAAA,EAAkBI,UAAU;AAE5B,UAAMM,IAAmBH,IAAU,YAAYE,IAAY,YAAY;AAGvE,SAAKC,MAAU,cAAcA,MAAU,cAAclB,GAAoB;AACvEA,MAAAA,EAAmBc,CAAC;AACpB;AAAA,IACF;AAEAf,IAAAA,IAAUe,CAAC;AAAA,EAAA,GAEb,CAACP,GAAYR,GAASC,GAAoBI,GAAiBC,CAAc,CAC3E,GAGMc,IAAgBzB,EAAMiB,YAC1B,CAACG,MAAwC;AACvC,IAAIP,MAEAO,EAAEM,QAAQ,WAAWN,EAAEM,QAAQ,SACjCN,EAAET,eAAe,GAEhBS,EAAEO,cAA8BC;EACnC,GAEF,CAACf,CAAU,CACb,GAEMgB,IAAqD;AAAA,IACzDC,eAAed;AAAAA,IACfe,aAAaf;AAAAA,IACbgB,cAAchB;AAAAA,IACdX,SAASc;AAAAA,IACT,iBAAiBN,IAAa,SAASoB;AAAAA,IACvC,aAAa7B,IAAU,SAAS6B;AAAAA,IAChC,gBAAgBrB;AAAAA,EAAAA;AAIlB,EAAKL,MACHsB,EAAWK,YAAYT;AAIzB,QAAMU,IAAmC;AAAA,IAAEN,YAAAA;AAAAA,IAAYhB,YAAAA;AAAAA,EAAAA;AAEvD,SAAKN,MACH4B,EAAO3B,OAAOA,GACPC,EAAAA,WAAWI,IAAa,KAAKJ,IAG/B0B;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index67.js","sources":["../src/utils/a11y/useFocusManagement.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { DependencyList } from 'react';\n\nexport interface UseFocusManagementOptions {\n /**\n * CSS selector to query the primary focus target.\n * Default: 'h1'\n */\n targetSelector?: string;\n /**\n * Fallback element id if selector target is not found.\n * Default: 'main-content'\n */\n fallbackId?: string;\n}\n\n/**\n * Generic focus management hook for route/state driven UI transitions.\n * Useful for both route changes and in-page multi-step wizards.\n * \n * Always skips first render and uses animation frame for safe DOM timing.\n */\nexport function useFocusManagement(\n dependencies: DependencyList,\n {\n targetSelector = '#main-content h1',\n fallbackId = 'main-content'\n }: UseFocusManagementOptions = {}\n): void {\n const isFirstRender = useRef(true);\n\n useEffect(() => {\n // Always skip first render\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n const focusTarget = () => {\n const el = (document.querySelector(targetSelector) || document.getElementById(fallbackId)) as HTMLElement;\n if (el) {\n if (!el.hasAttribute('tabindex')) el.setAttribute('tabindex', '-1');\n el.focus();\n }\n };\n\n // Always use animation frame for safe DOM timing\n const rafId = requestAnimationFrame(focusTarget);\n return () => cancelAnimationFrame(rafId);\n }, dependencies);\n}\n"],"names":["useFocusManagement","dependencies","targetSelector","fallbackId","isFirstRender","useRef","useEffect","current","rafId","requestAnimationFrame","focusTarget","el","document","querySelector","getElementById","hasAttribute","setAttribute","focus","cancelAnimationFrame"],"mappings":";AAsBO,SAASA,EACdC,GACA;AAAA,EACEC,gBAAAA,IAAiB;AAAA,EACjBC,YAAAA,IAAa;AACY,IAAI,IACzB;AACN,QAAMC,IAAgBC,EAAO,EAAI;AAEjCC,EAAAA,EAAU,MAAM;AAEd,QAAIF,EAAcG,SAAS;AACzBH,MAAAA,EAAcG,UAAU;AACxB;AAAA,IACF;AAWA,UAAMC,IAAQC,sBATMC,MAAM;AACxB,YAAMC,IAAMC,SAASC,cAAcX,CAAc,KAAKU,SAASE,eAAeX,CAAU;AACxF,MAAIQ,MACGA,EAAGI,aAAa,UAAU,KAAGJ,EAAGK,aAAa,YAAY,IAAI,GAClEL,EAAGM,MAAAA;AAAAA,IAEP,CAG+C;AAC/C,WAAO,MAAMC,qBAAqBV,CAAK;AAAA,EACzC,GAAGP,CAAY;AACjB;"}
1
+ {"version":3,"file":"index67.js","sources":["../src/utils/a11y/useFocusManagement.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { DependencyList } from 'react';\n\nexport interface UseFocusManagementOptions {\n /**\n * CSS selector to query the primary focus target.\n * Default: 'h1'\n */\n targetSelector?: string;\n /**\n * Fallback element id if selector target is not found.\n * Default: 'main-content'\n */\n fallbackId?: string;\n}\n\n/**\n * Generic focus management hook for route/state driven UI transitions.\n * Useful for both route changes and in-page multi-step wizards.\n * \n * Always skips first render and uses animation frame for safe DOM timing.\n */\nexport function useFocusManagement(\n dependencies: DependencyList,\n {\n targetSelector = '#main-content h1',\n fallbackId = 'main-content'\n }: UseFocusManagementOptions = {}\n): void {\n const isFirstRender = useRef(true);\n\n useEffect(() => {\n // Always skip first render\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n const focusTarget = () => {\n const el = (document.querySelector(targetSelector) || document.getElementById(fallbackId)) as HTMLElement;\n if (el) {\n if (!el.hasAttribute('tabindex')) el.setAttribute('tabindex', '-1');\n el.focus();\n }\n };\n\n // Always use animation frame for safe DOM timing\n const rafId = requestAnimationFrame(focusTarget);\n return () => cancelAnimationFrame(rafId);\n }, dependencies);\n}\n"],"names":["useFocusManagement","dependencies","targetSelector","fallbackId","isFirstRender","useRef","useEffect","current","rafId","requestAnimationFrame","focusTarget","el","document","querySelector","getElementById","hasAttribute","setAttribute","focus","cancelAnimationFrame"],"mappings":";AAsBO,SAASA,EACdC,GACA;AAAA,EACEC,gBAAAA,IAAiB;AAAA,EACjBC,YAAAA,IAAa;AACY,IAAI,IACzB;AACAC,QAAAA,IAAgBC,EAAO,EAAI;AAEjCC,EAAAA,EAAU,MAAM;AAEd,QAAIF,EAAcG,SAAS;AACzBH,MAAAA,EAAcG,UAAU;AACxB;AAAA,IACF;AAWMC,UAAAA,IAAQC,sBATMC,MAAM;AACxB,YAAMC,IAAMC,SAASC,cAAcX,CAAc,KAAKU,SAASE,eAAeX,CAAU;AACxF,MAAIQ,MACGA,EAAGI,aAAa,UAAU,KAAMC,EAAAA,aAAa,YAAY,IAAI,GAClEL,EAAGM,MAAM;AAAA,IACX,CAI6C;AACxC,WAAA,MAAMC,qBAAqBV,CAAK;AAAA,KACtCP,CAAY;AACjB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index68.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 * - grid: all four arrow keys (Left/Right move by 1, Up/Down move by `cols`)\n */\n orientation?: 'horizontal' | 'vertical' | 'grid';\n\n /**\n * Number of columns in the grid. Required when orientation is 'grid'.\n * ArrowUp/ArrowDown navigate by this many items in the flat itemIds array.\n */\n cols?: number;\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, grids.\n *\n * @example\n * // 1D (toolbar/tabs):\n * const { getRovingItemProps, handleKeyDown } = useRovingFocus({\n * itemIds: ['tab1', 'tab2', 'tab3'],\n * orientation: 'horizontal'\n * });\n *\n * // 2D (grid — flat itemIds, cols for row-jump math):\n * const { getRovingItemProps, handleKeyDown } = useRovingFocus({\n * itemIds: ['r0c0', 'r0c1', 'r0c2', 'r1c0', 'r1c1', 'r1c2'],\n * orientation: 'grid',\n * cols: 3\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 cols,\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, step: number = 1) => {\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 - step + itemIds.length) % itemIds.length;\n } else {\n nextIdx = Math.max(0, safeIdx - step);\n }\n break;\n case 'next':\n if (loop) {\n nextIdx = (safeIdx + step) % itemIds.length;\n } else {\n nextIdx = Math.min(itemIds.length - 1, safeIdx + step);\n }\n break;\n }\n\n const nextId = itemIds[nextIdx];\n if (!nextId) return;\n\n itemRefs.current[nextId]?.focus();\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 let direction: RovingDirection | null = null;\n let step = 1;\n\n if (e.key === 'Home') {\n direction = 'first';\n } else if (e.key === 'End') {\n direction = 'last';\n } else {\n // Horizontal axis (Left/Right) — active for 'horizontal' and 'grid'\n if (orientation !== 'vertical') {\n if (e.key === 'ArrowLeft') direction = 'prev';\n else if (e.key === 'ArrowRight') direction = 'next';\n }\n // Vertical axis (Up/Down) — active for 'vertical' and 'grid'\n if (!direction && orientation !== 'horizontal') {\n if (e.key === 'ArrowUp') direction = 'prev';\n else if (e.key === 'ArrowDown') direction = 'next';\n if (direction && cols) step = cols;\n }\n }\n\n if (direction) {\n e.preventDefault();\n e.stopPropagation();\n moveFocus(direction, step);\n }\n },\n [orientation, cols, moveFocus]\n );\n\n return {\n setFocusedId,\n handleKeyDown,\n getRovingItemProps\n };\n}\n"],"names":["React","useRovingFocus","itemIds","tabIndex","defaultFocusedId","orientation","cols","loop","onFocusChange","focusedId","setFocusedIdState","useState","itemRefs","useRef","useEffect","length","includes","newFocusedId","setFocusedId","useCallback","id","moveFocus","direction","step","currentIdx","indexOf","safeIdx","Math","max","nextIdx","min","nextId","current","focus","getRovingItemProps","ref","el","handleKeyDown","e","key","preventDefault","stopPropagation"],"mappings":"AA0FO,YAAAA,OAAA;AAAA,SAASC,EAAe;AAAA,EAC7BC,SAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,kBAAAA;AAAAA,EACAC,aAAAA,IAAc;AAAA,EACdC,MAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,eAAAA;AACqB,GAAyB;AAC9C,QAAM,CAACC,GAAWC,CAAiB,IAAIV,EAAMW,SAC3CP,KAAoBF,EAAQ,CAAC,KAAK,EACpC,GAEMU,IAAWZ,EAAMa,OAA2C,EAAE;AAGpEb,EAAAA,EAAMc,UAAU,MAAM;AACpB,QAAIZ,EAAQa,SAAS,KAAK,CAACb,EAAQc,SAASP,CAAS,GAAG;AACtD,YAAMQ,IAAeb,KAAoBF,EAAQ,CAAC,KAAK;AACvDQ,MAAAA,EAAkBO,CAAY;AAAA,IAChC;AAAA,EACF,GAAG,CAACf,GAASO,GAAWL,CAAgB,CAAC;AAEzC,QAAMc,IAAelB,EAAMmB,YACzB,CAACC,MAAe;AACdV,IAAAA,EAAkBU,CAAE,GACpBZ,IAAgBY,CAAE;AAAA,EACpB,GACA,CAACZ,CAAa,CAChB,GAEMa,IAAYrB,EAAMmB,YACtB,CAACG,GAA4BC,IAAe,MAAM;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Q,YAAWjB,IAAY,SAC5BgB,EAAEC,QAAQ,gBAAajB,IAAY,SACxCA,KAAahB,MAAMiB,IAAOjB,MAI9BgB,MACFgB,EAAEE,eAAAA,GACFF,EAAEG,gBAAAA,GACFpB,EAAUC,GAAWC,CAAI;AAAA,EAE7B,GACA,CAAClB,GAAaC,GAAMe,CAAS,CAC/B;AAEA,SAAO;AAAA,IACLH,cAAAA;AAAAA,IACAmB,eAAAA;AAAAA,IACAH,oBAAAA;AAAAA,EAAAA;AAEJ;"}
1
+ {"version":3,"file":"index68.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 * - grid: all four arrow keys (Left/Right move by 1, Up/Down move by `cols`)\n */\n orientation?: 'horizontal' | 'vertical' | 'grid';\n\n /**\n * Number of columns in the grid. Required when orientation is 'grid'.\n * ArrowUp/ArrowDown navigate by this many items in the flat itemIds array.\n */\n cols?: number;\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, grids.\n *\n * @example\n * // 1D (toolbar/tabs):\n * const { getRovingItemProps, handleKeyDown } = useRovingFocus({\n * itemIds: ['tab1', 'tab2', 'tab3'],\n * orientation: 'horizontal'\n * });\n *\n * // 2D (grid — flat itemIds, cols for row-jump math):\n * const { getRovingItemProps, handleKeyDown } = useRovingFocus({\n * itemIds: ['r0c0', 'r0c1', 'r0c2', 'r1c0', 'r1c1', 'r1c2'],\n * orientation: 'grid',\n * cols: 3\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 cols,\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, step: number = 1) => {\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 - step + itemIds.length) % itemIds.length;\n } else {\n nextIdx = Math.max(0, safeIdx - step);\n }\n break;\n case 'next':\n if (loop) {\n nextIdx = (safeIdx + step) % itemIds.length;\n } else {\n nextIdx = Math.min(itemIds.length - 1, safeIdx + step);\n }\n break;\n }\n\n const nextId = itemIds[nextIdx];\n if (!nextId) return;\n\n itemRefs.current[nextId]?.focus();\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 let direction: RovingDirection | null = null;\n let step = 1;\n\n if (e.key === 'Home') {\n direction = 'first';\n } else if (e.key === 'End') {\n direction = 'last';\n } else {\n // Horizontal axis (Left/Right) — active for 'horizontal' and 'grid'\n if (orientation !== 'vertical') {\n if (e.key === 'ArrowLeft') direction = 'prev';\n else if (e.key === 'ArrowRight') direction = 'next';\n }\n // Vertical axis (Up/Down) — active for 'vertical' and 'grid'\n if (!direction && orientation !== 'horizontal') {\n if (e.key === 'ArrowUp') direction = 'prev';\n else if (e.key === 'ArrowDown') direction = 'next';\n if (direction && cols) step = cols;\n }\n }\n\n if (direction) {\n e.preventDefault();\n e.stopPropagation();\n moveFocus(direction, step);\n }\n },\n [orientation, cols, moveFocus]\n );\n\n return {\n setFocusedId,\n handleKeyDown,\n getRovingItemProps\n };\n}\n"],"names":["React","useRovingFocus","itemIds","tabIndex","defaultFocusedId","orientation","cols","loop","onFocusChange","focusedId","setFocusedIdState","useState","itemRefs","useRef","useEffect","length","includes","newFocusedId","setFocusedId","useCallback","id","moveFocus","direction","step","currentIdx","indexOf","safeIdx","Math","max","nextIdx","min","nextId","current","focus","getRovingItemProps","ref","el","handleKeyDown","e","key","preventDefault","stopPropagation"],"mappings":"AA0FO,YAAAA,OAAA;AAAA,SAAS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AAKG,IAAI5B,EAAQa,SAAS,GAAGW,IAAUH,CAAI;AAEvD;AAAA,IACJ;AAEMQ,UAAAA,IAAS7B,EAAQ2B,CAAO;AAC9B,IAAKE,KAEIC,EAAAA,QAAQD,CAAM,GAAGE,MAAM;AAAA,EAElC,GAAA,CAAC/B,GAASO,GAAWF,CAAI,CAC3B,GAEM2B,IAAqBlC,EAAMmB,YAC/B,CAACC,OAAiC;AAAA,IAChCe,KAAKA,CAACC,MAA2B;AACtBJ,MAAAA,EAAAA,QAAQZ,CAAE,IAAIgB;AAAAA,IACzB;AAAA,IACAjC,UAAUM,MAAcW,IAAKjB,IAAW;AAAA,EAE1C,IAAA,CAACM,GAAWN,CAAQ,CACtB,GAGMkC,IAAgBrC,EAAMmB,YAC1B,CAACmB,MAA2B;AAC1B,QAAIhB,IAAoC,MACpCC,IAAO;AAEPe,IAAAA,EAAEC,QAAQ,SACAjB,IAAA,UACHgB,EAAEC,QAAQ,QACPjB,IAAA,UAGRjB,MAAgB,eACdiC,EAAEC,QAAQ,cAAyBjB,IAAA,SAC9BgB,EAAEC,QAAQ,iBAA0BjB,IAAA,UAG3C,CAACA,KAAajB,MAAgB,iBAC5BiC,EAAEC,QAAQ,YAAuBjB,IAAA,SAC5BgB,EAAEC,QAAQ,gBAAyBjB,IAAA,SACxCA,KAAahB,MAAaA,IAAAA,MAI9BgB,MACFgB,EAAEE,eAAe,GACjBF,EAAEG,gBAAgB,GAClBpB,EAAUC,GAAWC,CAAI;AAAA,EAG7B,GAAA,CAAClB,GAAaC,GAAMe,CAAS,CAC/B;AAEO,SAAA;AAAA,IACLH,cAAAA;AAAAA,IACAmB,eAAAA;AAAAA,IACAH,oBAAAA;AAAAA,EAAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index69.js","sources":["../src/utils/virtualClick.ts"],"sourcesContent":["/**\n * Input/virtual click detection helpers.\n */\n\nconst isAndroid = () =>\n typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);\n\nexport const isVirtualClick = (event: MouseEvent | PointerEvent): boolean => {\n const pointerType = 'pointerType' in event ? event.pointerType : undefined;\n\n // JAWS/NVDA with Firefox.\n if (pointerType === '' && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on listener type.\n if (isAndroid() && pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n\n // Most browsers: virtual click has detail === 0 and no pointerType.\n return event.detail === 0 && !pointerType;\n};\n\n\n"],"names":["isAndroid","navigator","test","userAgent","isVirtualClick","event","pointerType","undefined","isTrusted","type","buttons","detail"],"mappings":"AAIA,MAAMA,IAAYA,MAChB,OAAOC,YAAc,OAAe,WAAWC,KAAKD,UAAUE,SAAS,GAE5DC,IAAiBA,CAACC,MAA8C;AAC3E,QAAMC,IAAc,iBAAiBD,IAAQA,EAAMC,cAAcC;AAGjE,SAAID,MAAgB,MAAMD,EAAMG,YACvB,KAILR,EAAAA,KAAeM,IACVD,EAAMI,SAAS,WAAWJ,EAAMK,YAAY,IAI9CL,EAAMM,WAAW,KAAK,CAACL;AAChC;"}
1
+ {"version":3,"file":"index69.js","sources":["../src/utils/virtualClick.ts"],"sourcesContent":["/**\n * Input/virtual click detection helpers.\n */\n\nconst isAndroid = () =>\n typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);\n\nexport const isVirtualClick = (event: MouseEvent | PointerEvent): boolean => {\n const pointerType = 'pointerType' in event ? event.pointerType : undefined;\n\n // JAWS/NVDA with Firefox.\n if (pointerType === '' && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on listener type.\n if (isAndroid() && pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n\n // Most browsers: virtual click has detail === 0 and no pointerType.\n return event.detail === 0 && !pointerType;\n};\n\n\n"],"names":["isAndroid","navigator","test","userAgent","isVirtualClick","event","pointerType","undefined","isTrusted","type","buttons","detail"],"mappings":"AAIA,MAAMA,IAAYA,MAChB,OAAOC,YAAc,OAAe,WAAWC,KAAKD,UAAUE,SAAS,GAE5DC,IAAiBA,CAACC,MAA8C;AAC3E,QAAMC,IAAc,iBAAiBD,IAAQA,EAAMC,cAAcC;AAG7DD,SAAAA,MAAgB,MAAMD,EAAMG,YACvB,KAILR,OAAeM,IACVD,EAAMI,SAAS,WAAWJ,EAAMK,YAAY,IAI9CL,EAAMM,WAAW,KAAK,CAACL;AAChC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index7.js","sources":["../src/components/SplitButton/index.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\nimport { MenuItemProps } from 'src/components/MenuItem';\nimport { MenuList } from 'src/components/MenuList';\n\nexport interface SplitButtonProps {\n /**\n * Button contents\n */\n label: string;\n /**\n * Optional click handler\n */\n onClick?: () => void;\n /**\n * Optional click handler for dropdown\n */\n onDropdownClick?: () => void;\n menuItems?: MenuItemProps[];\n /**\n * Automation ID for testing\n */\n automationId?: string;\n}\n\nexport const SplitButton: FC<SplitButtonProps> = (props) => {\n const { label, onDropdownClick = () => {}, menuItems = [], automationId = '', ...remainingProps } = props;\n const [isOpen, setIsOpen] = useState(false);\n\n const handleDropdownClick = () => {\n setIsOpen(!isOpen);\n onDropdownClick();\n };\n\n return (\n <div className={'se-design-split-button flex items-center relative'} data-automation-id={automationId}>\n <button\n type=\"button\"\n className=\"px-8 py-2.5 rounded-l text-sm bg-[var(--color-blue-500)] text-[var(--color-white)] border-r border-[var(--color-white)]\"\n {...remainingProps}\n >\n {label}\n </button>\n <button type=\"button\" className=\"bg-[var(--color-blue-500)] rounded-r\" onClick={handleDropdownClick} data-automation-id=\"split-button-dropdown-button\">\n <svg\n className={`${isOpen ? 'rotate-180' : ''} transition-all`}\n width=\"35\"\n height=\"40\"\n viewBox=\"0 0 35 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0H32C33.6569 0 35 1.34315 35 3V37C35 38.6569 33.6569 40 32 40H0V0Z\" fill=\"transparent\" />\n <path d=\"M18 23.5L14 19.5L22 19.5L18 23.5Z\" fill=\"white\" />\n </svg>\n </button>\n {isOpen && (\n <div className=\"absolute top-full mt-1 w-max\">\n <MenuList items={menuItems} />\n </div>\n )}\n </div>\n );\n};\n"],"names":["SplitButton","props","label","onDropdownClick","menuItems","automationId","remainingProps","isOpen","setIsOpen","useState","handleDropdownClick","React","createElement","className","_extends","type","onClick","width","height","viewBox","fill","xmlns","d","MenuList","items"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,IAAqCC,CAAAA,MAAU;AAC1D,QAAM;AAAA,IAAEC,OAAAA;AAAAA,IAAOC,iBAAAA,IAAkBA,MAAM;AAAA,IAAC;AAAA,IAAGC,WAAAA,IAAY,CAAA;AAAA,IAAIC,cAAAA,IAAe;AAAA,IAAI,GAAGC;AAAAA,EAAAA,IAAmBL,GAC9F,CAACM,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpCC,IAAsBA,MAAM;AAChCF,IAAAA,EAAU,CAACD,CAAM,GACjBJ,EAAAA;AAAAA,EACF;AAEA,SACEQ,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAW;AAAA,IAAqD,sBAAoBR;AAAAA,EAAAA,GACvFM,gBAAAA,EAAAC,cAAA,UAAAE,EAAA;AAAA,IACEC,MAAK;AAAA,IACLF,WAAU;AAAA,EAAA,GACNP,CAAc,GAEjBJ,CACK,GACRS,gBAAAA,EAAAC,cAAA,UAAA;AAAA,IAAQG,MAAK;AAAA,IAASF,WAAU;AAAA,IAAuCG,SAASN;AAAAA,IAAqB,sBAAmB;AAAA,EAAA,GACtHC,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACEC,WAAW,GAAGN,IAAS,eAAe,EAAE;AAAA,IACxCU,OAAM;AAAA,IACNC,QAAO;AAAA,IACPC,SAAQ;AAAA,IACRC,MAAK;AAAA,IACLC,OAAM;AAAA,EAAA,GAENV,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMU,GAAE;AAAA,IAAwEF,MAAK;AAAA,EAAA,CAAe,GACpGT,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMU,GAAE;AAAA,IAAoCF,MAAK;AAAA,EAAA,CAAS,CACvD,CACC,GACPb,KACCI,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,EAAA,GACbF,gBAAAA,EAAAC,cAACW,GAAQ;AAAA,IAACC,OAAOpB;AAAAA,EAAAA,CAAY,CAC1B,CAEJ;AAET;"}
1
+ {"version":3,"file":"index7.js","sources":["../src/components/SplitButton/index.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\nimport { MenuItemProps } from 'src/components/MenuItem';\nimport { MenuList } from 'src/components/MenuList';\n\nexport interface SplitButtonProps {\n /**\n * Button contents\n */\n label: string;\n /**\n * Optional click handler\n */\n onClick?: () => void;\n /**\n * Optional click handler for dropdown\n */\n onDropdownClick?: () => void;\n menuItems?: MenuItemProps[];\n /**\n * Automation ID for testing\n */\n automationId?: string;\n}\n\nexport const SplitButton: FC<SplitButtonProps> = (props) => {\n const { label, onDropdownClick = () => {}, menuItems = [], automationId = '', ...remainingProps } = props;\n const [isOpen, setIsOpen] = useState(false);\n\n const handleDropdownClick = () => {\n setIsOpen(!isOpen);\n onDropdownClick();\n };\n\n return (\n <div className={'se-design-split-button flex items-center relative'} data-automation-id={automationId}>\n <button\n type=\"button\"\n className=\"px-8 py-2.5 rounded-l text-sm bg-[var(--color-blue-500)] text-[var(--color-white)] border-r border-[var(--color-white)]\"\n {...remainingProps}\n >\n {label}\n </button>\n <button type=\"button\" className=\"bg-[var(--color-blue-500)] rounded-r\" onClick={handleDropdownClick} data-automation-id=\"split-button-dropdown-button\">\n <svg\n className={`${isOpen ? 'rotate-180' : ''} transition-all`}\n width=\"35\"\n height=\"40\"\n viewBox=\"0 0 35 40\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0H32C33.6569 0 35 1.34315 35 3V37C35 38.6569 33.6569 40 32 40H0V0Z\" fill=\"transparent\" />\n <path d=\"M18 23.5L14 19.5L22 19.5L18 23.5Z\" fill=\"white\" />\n </svg>\n </button>\n {isOpen && (\n <div className=\"absolute top-full mt-1 w-max\">\n <MenuList items={menuItems} />\n </div>\n )}\n </div>\n );\n};\n"],"names":["SplitButton","props","label","onDropdownClick","menuItems","automationId","remainingProps","isOpen","setIsOpen","useState","handleDropdownClick","React","createElement","className","_extends","type","onClick","width","height","viewBox","fill","xmlns","d","MenuList","items"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,IAAqCC,CAAUA,MAAA;AACpD,QAAA;AAAA,IAAEC,OAAAA;AAAAA,IAAOC,iBAAAA,IAAkBA,MAAM;AAAA,IAAC;AAAA,IAAGC,WAAAA,IAAY,CAAE;AAAA,IAAEC,cAAAA,IAAe;AAAA,IAAI,GAAGC;AAAAA,EAAmBL,IAAAA,GAC9F,CAACM,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpCC,IAAsBA,MAAM;AAChCF,IAAAA,EAAU,CAACD,CAAM,GACDJ;EAAA;AAIhBQ,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAW;AAAA,IAAqD,sBAAoBR;AAAAA,EACvFM,GAAAA,gBAAAA,EAAAC,cAAA,UAAAE,EAAA;AAAA,IACEC,MAAK;AAAA,IACLF,WAAU;AAAA,EAAA,GACNP,CAAc,GAEjBJ,CACK,GACRS,gBAAAA,EAAAC,cAAA,UAAA;AAAA,IAAQG,MAAK;AAAA,IAASF,WAAU;AAAA,IAAuCG,SAASN;AAAAA,IAAqB,sBAAmB;AAAA,EAAA,GACtHE,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IACEC,WAAW,GAAGN,IAAS,eAAe,EAAE;AAAA,IACxCU,OAAM;AAAA,IACNC,QAAO;AAAA,IACPC,SAAQ;AAAA,IACRC,MAAK;AAAA,IACLC,OAAM;AAAA,EAAA,GAENT,gBAAAA,EAAAA,cAAA,QAAA;AAAA,IAAMU,GAAE;AAAA,IAAwEF,MAAK;AAAA,EAAA,CAAe,GACpGR,gBAAAA,EAAAA,cAAA,QAAA;AAAA,IAAMU,GAAE;AAAA,IAAoCF,MAAK;AAAA,EAAS,CAAA,CACvD,CACC,GACPb,KACCI,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,EAAA,GACbD,gBAAAA,EAAAA,cAACW,GAAQ;AAAA,IAACC,OAAOpB;AAAAA,EAAY,CAAA,CAC1B,CAEJ;AAET;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index70.js","sources":["../src/utils/a11y/accessibleName.ts"],"sourcesContent":["/**\n * Accessible name/description utilities following WCAG precedence rules.\n * \n * **When to use:**\n * - `ariaLabelledBy`: visible label exists (preferred - keeps SR and visual text in sync)\n * - `ariaLabel`: no visible label (e.g., icon-only buttons)\n * - `ariaDescribedBy`: additional context needed (warnings, hints, constraints)\n * \n * **Precedence:** ariaLabelledBy > ariaLabel > visible text content\n * \n * @example Icon-only button\n * ```tsx\n * <Button iconProps={{ name: 'close' }} ariaLabel=\"Close dialog\" />\n * ```\n * \n * @example Disambiguate generic labels\n * ```tsx\n * <Button label=\"Edit\" ariaLabel=\"Edit name\" />\n * <Button label=\"Edit\" ariaLabel=\"Edit email\" />\n * ```\n */\n\nexport type AccessibleNameInput = {\n /** Accessible name when no visible label exists (icon-only buttons). */\n ariaLabel?: string;\n /** ID(s) of visible element(s) that label this control. Preferred over ariaLabel. */\n ariaLabelledBy?: string;\n /** ID(s) of element(s) providing additional description (additive). */\n ariaDescribedBy?: string;\n};\n\n/**\n * Returns ARIA attributes with correct precedence.\n * Prefer ariaLabelledBy > ariaLabel. ariaDescribedBy is always additive.\n */\nexport function getA11yNameAttributes({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy\n}: AccessibleNameInput): Record<string, string> {\n const props: Record<string, string> = {};\n\n if (ariaLabelledBy) props['aria-labelledby'] = ariaLabelledBy;\n else if (ariaLabel) props['aria-label'] = ariaLabel;\n\n if (ariaDescribedBy) props['aria-describedby'] = ariaDescribedBy;\n\n return props;\n}\n"],"names":["getA11yNameAttributes","ariaLabel","ariaLabelledBy","ariaDescribedBy","props"],"mappings":"AAmCO,SAASA,EAAsB;AAAA,EACpCC,WAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,iBAAAA;AACmB,GAA2B;AAC9C,QAAMC,IAAgC,CAAA;AAEtC,SAAIF,IAAgBE,EAAM,iBAAiB,IAAIF,IACtCD,MAAWG,EAAM,YAAY,IAAIH,IAEtCE,MAAiBC,EAAM,kBAAkB,IAAID,IAE1CC;AACT;"}
1
+ {"version":3,"file":"index70.js","sources":["../src/utils/a11y/accessibleName.ts"],"sourcesContent":["/**\n * Accessible name/description utilities following WCAG precedence rules.\n * \n * **When to use:**\n * - `ariaLabelledBy`: visible label exists (preferred - keeps SR and visual text in sync)\n * - `ariaLabel`: no visible label (e.g., icon-only buttons)\n * - `ariaDescribedBy`: additional context needed (warnings, hints, constraints)\n * \n * **Precedence:** ariaLabelledBy > ariaLabel > visible text content\n * \n * @example Icon-only button\n * ```tsx\n * <Button iconProps={{ name: 'close' }} ariaLabel=\"Close dialog\" />\n * ```\n * \n * @example Disambiguate generic labels\n * ```tsx\n * <Button label=\"Edit\" ariaLabel=\"Edit name\" />\n * <Button label=\"Edit\" ariaLabel=\"Edit email\" />\n * ```\n */\n\nexport type AccessibleNameInput = {\n /** Accessible name when no visible label exists (icon-only buttons). */\n ariaLabel?: string;\n /** ID(s) of visible element(s) that label this control. Preferred over ariaLabel. */\n ariaLabelledBy?: string;\n /** ID(s) of element(s) providing additional description (additive). */\n ariaDescribedBy?: string;\n};\n\n/**\n * Returns ARIA attributes with correct precedence.\n * Prefer ariaLabelledBy > ariaLabel. ariaDescribedBy is always additive.\n */\nexport function getA11yNameAttributes({\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy\n}: AccessibleNameInput): Record<string, string> {\n const props: Record<string, string> = {};\n\n if (ariaLabelledBy) props['aria-labelledby'] = ariaLabelledBy;\n else if (ariaLabel) props['aria-label'] = ariaLabel;\n\n if (ariaDescribedBy) props['aria-describedby'] = ariaDescribedBy;\n\n return props;\n}\n"],"names":["getA11yNameAttributes","ariaLabel","ariaLabelledBy","ariaDescribedBy","props"],"mappings":"AAmCO,SAASA,EAAsB;AAAA,EACpCC,WAAAA;AAAAA,EACAC,gBAAAA;AAAAA,EACAC,iBAAAA;AACmB,GAA2B;AAC9C,QAAMC,IAAgC,CAAA;AAElCF,SAAAA,IAAsBE,EAAA,iBAAiB,IAAIF,IACtCD,MAAiBG,EAAA,YAAY,IAAIH,IAEtCE,MAAuBC,EAAA,kBAAkB,IAAID,IAE1CC;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index72.js","sources":["../src/assets/icons/ai-off.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M11.0179%2013.3597L12.27%2010.855L13.5222%2013.3597C13.9204%2014.1563%2014.5662%2014.8021%2015.3627%2015.2004L17.8682%2016.4531L15.3627%2017.7059C14.5662%2018.1041%2013.9204%2018.75%2013.5222%2019.5465L12.27%2022.0513L11.0179%2019.5465C10.6197%2018.75%209.97387%2018.1041%209.17738%2017.7059L6.67188%2016.4531L9.17738%2015.2004C9.97387%2014.8021%2010.6197%2014.1563%2011.0179%2013.3597Z'%20fill='%23415575'/%3e%3cpath%20d='M19.0159%207.18859L19.4685%206.2832L19.9211%207.18859C20.3193%207.98511%2020.9651%208.63098%2021.7616%209.02923L22.6674%209.48215L21.7616%209.93506C20.9651%2010.3333%2020.3193%2010.9792%2019.9211%2011.7757L19.4685%2012.6811L19.0159%2011.7757C18.6177%2010.9792%2017.9719%2010.3333%2017.1754%209.93506L16.2695%209.48215L17.1754%209.02923C17.9719%208.63098%2018.6177%207.98511%2019.0159%207.18859Z'%20fill='%23415575'/%3e%3cpath%20d='M19.0159%2021.3561L19.4685%2020.4507L19.9211%2021.3561C20.3193%2022.1526%2020.9651%2022.7985%2021.7616%2023.1967L22.6674%2023.6496L21.7616%2024.1025C20.9651%2024.5008%2020.3193%2025.1467%2019.9211%2025.9432L19.4685%2026.8486L19.0159%2025.9432C18.6177%2025.1467%2017.9719%2024.5008%2017.1754%2024.1025L16.2695%2023.6496L17.1754%2023.1967C17.9719%2022.7985%2018.6177%2022.1526%2019.0159%2021.3561Z'%20fill='%23415575'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_0"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index72.js","sources":["../src/assets/icons/ai-off.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='white'/%3e%3cpath%20d='M11.0179%2013.3597L12.27%2010.855L13.5222%2013.3597C13.9204%2014.1563%2014.5662%2014.8021%2015.3627%2015.2004L17.8682%2016.4531L15.3627%2017.7059C14.5662%2018.1041%2013.9204%2018.75%2013.5222%2019.5465L12.27%2022.0513L11.0179%2019.5465C10.6197%2018.75%209.97387%2018.1041%209.17738%2017.7059L6.67188%2016.4531L9.17738%2015.2004C9.97387%2014.8021%2010.6197%2014.1563%2011.0179%2013.3597Z'%20fill='%23415575'/%3e%3cpath%20d='M19.0159%207.18859L19.4685%206.2832L19.9211%207.18859C20.3193%207.98511%2020.9651%208.63098%2021.7616%209.02923L22.6674%209.48215L21.7616%209.93506C20.9651%2010.3333%2020.3193%2010.9792%2019.9211%2011.7757L19.4685%2012.6811L19.0159%2011.7757C18.6177%2010.9792%2017.9719%2010.3333%2017.1754%209.93506L16.2695%209.48215L17.1754%209.02923C17.9719%208.63098%2018.6177%207.98511%2019.0159%207.18859Z'%20fill='%23415575'/%3e%3cpath%20d='M19.0159%2021.3561L19.4685%2020.4507L19.9211%2021.3561C20.3193%2022.1526%2020.9651%2022.7985%2021.7616%2023.1967L22.6674%2023.6496L21.7616%2024.1025C20.9651%2024.5008%2020.3193%2025.1467%2019.9211%2025.9432L19.4685%2026.8486L19.0159%2025.9432C18.6177%2025.1467%2017.9719%2024.5008%2017.1754%2024.1025L16.2695%2023.6496L17.1754%2023.1967C17.9719%2022.7985%2018.6177%2022.1526%2019.0159%2021.3561Z'%20fill='%23415575'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_0"],"mappings":"AAAA,MAAeA,IAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index73.js","sources":["../src/assets/icons/ai-search.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='21'%20height='20'%20viewBox='0%200%2021%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.8'%3e%3cg%20clip-path='url(%23clip0_11623_94780)'%3e%3cpath%20d='M8.93929%2014.7575C12.1504%2014.7575%2014.7536%2012.1543%2014.7536%208.94319C14.7536%205.73205%2012.1504%203.12891%208.93929%203.12891C5.72814%203.12891%203.125%205.73205%203.125%208.94319C3.125%2012.1543%205.72814%2014.7575%208.93929%2014.7575Z'%20stroke='%23D8E8F6'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.8642%2016.872L13.0469%2013.0547'%20stroke='%23D8E8F6'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.4688%201.47559C13.0214%202.58108%2013.918%203.47752%2015.0234%204.03027L15.9619%204.5L15.0234%204.96973C13.918%205.52248%2013.0214%206.41892%2012.4688%207.52441L12%208.46191L11.5313%207.52441C10.9786%206.41892%2010.082%205.52248%208.97656%204.96973L8.03711%204.5L8.97656%204.03027C10.082%203.47752%2010.9786%202.58108%2011.5313%201.47559L12%200.538086L12.4688%201.47559Z'%20fill='white'%20stroke='%233E8BD1'%20stroke-width='1.375'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11623_94780'%3e%3crect%20width='16'%20height='18'%20fill='white'%20transform='translate(2)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\""],"names":["__vite_glob_0_1"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index73.js","sources":["../src/assets/icons/ai-search.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='21'%20height='20'%20viewBox='0%200%2021%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20opacity='0.8'%3e%3cg%20clip-path='url(%23clip0_11623_94780)'%3e%3cpath%20d='M8.93929%2014.7575C12.1504%2014.7575%2014.7536%2012.1543%2014.7536%208.94319C14.7536%205.73205%2012.1504%203.12891%208.93929%203.12891C5.72814%203.12891%203.125%205.73205%203.125%208.94319C3.125%2012.1543%205.72814%2014.7575%208.93929%2014.7575Z'%20stroke='%23D8E8F6'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.8642%2016.872L13.0469%2013.0547'%20stroke='%23D8E8F6'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.4688%201.47559C13.0214%202.58108%2013.918%203.47752%2015.0234%204.03027L15.9619%204.5L15.0234%204.96973C13.918%205.52248%2013.0214%206.41892%2012.4688%207.52441L12%208.46191L11.5313%207.52441C10.9786%206.41892%2010.082%205.52248%208.97656%204.96973L8.03711%204.5L8.97656%204.03027C10.082%203.47752%2010.9786%202.58108%2011.5313%201.47559L12%200.538086L12.4688%201.47559Z'%20fill='white'%20stroke='%233E8BD1'%20stroke-width='1.375'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_11623_94780'%3e%3crect%20width='16'%20height='18'%20fill='white'%20transform='translate(2)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\""],"names":["__vite_glob_0_1"],"mappings":"AAAA,MAAeA,IAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index74.js","sources":["../src/assets/icons/ai-stars.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.4958%207.65801L9.58298%205.83203L8.67016%207.65801C8.37987%208.23869%207.90907%208.70953%207.32841%208.99985L5.50189%209.91312L7.32841%2010.8264C7.90907%2011.1167%208.37987%2011.5876%208.67016%2012.1682L9.58298%2013.9942L10.4958%2012.1682C10.7861%2011.5876%2011.2569%2011.1167%2011.8375%2010.8264L13.6641%209.91312L11.8375%208.99986C11.2569%208.70953%2010.7861%208.23869%2010.4958%207.65801Z'%20fill='%23415575'%20stroke='%23415575'/%3e%3cpath%20d='M4.66587%203.16003L4.33592%202.5L4.00597%203.16003C3.71568%203.7407%203.24488%204.21155%202.66423%204.50187L2.00387%204.83205L2.66422%205.16223C3.24487%205.45255%203.71568%205.9234%204.00597%206.50407L4.33592%207.1641L4.66587%206.50407C4.95615%205.9234%205.42696%205.45255%206.00761%205.16223L6.66797%204.83205L6.00761%204.50187C5.42696%204.21155%204.95615%203.7407%204.66587%203.16003Z'%20fill='%23415575'%20stroke='%23415575'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_2"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index74.js","sources":["../src/assets/icons/ai-stars.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='16'%20height='17'%20viewBox='0%200%2016%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.4958%207.65801L9.58298%205.83203L8.67016%207.65801C8.37987%208.23869%207.90907%208.70953%207.32841%208.99985L5.50189%209.91312L7.32841%2010.8264C7.90907%2011.1167%208.37987%2011.5876%208.67016%2012.1682L9.58298%2013.9942L10.4958%2012.1682C10.7861%2011.5876%2011.2569%2011.1167%2011.8375%2010.8264L13.6641%209.91312L11.8375%208.99986C11.2569%208.70953%2010.7861%208.23869%2010.4958%207.65801Z'%20fill='%23415575'%20stroke='%23415575'/%3e%3cpath%20d='M4.66587%203.16003L4.33592%202.5L4.00597%203.16003C3.71568%203.7407%203.24488%204.21155%202.66423%204.50187L2.00387%204.83205L2.66422%205.16223C3.24487%205.45255%203.71568%205.9234%204.00597%206.50407L4.33592%207.1641L4.66587%206.50407C4.95615%205.9234%205.42696%205.45255%206.00761%205.16223L6.66797%204.83205L6.00761%204.50187C5.42696%204.21155%204.95615%203.7407%204.66587%203.16003Z'%20fill='%23415575'%20stroke='%23415575'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_2"],"mappings":"AAAA,MAAeA,IAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index75.js","sources":["../src/assets/icons/ai.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3crect%20width='24'%20height='24'%20rx='12'%20fill='url(%23paint0_linear_11822_95435)'/%3e%3cpath%20d='M8.2639%2010.0192L9.20301%208.14062L10.1421%2010.0192C10.4408%2010.6166%2010.9251%2011.101%2011.5225%2011.3997L13.4016%2012.3392L11.5225%2013.2788C10.9251%2013.5775%2010.4408%2014.0619%2010.1421%2014.6593L9.20301%2016.5379L8.2639%2014.6593C7.96526%2014.0619%207.48089%2013.5775%206.88352%2013.2788L5.00439%2012.3392L6.88352%2011.3997C7.48089%2011.101%207.96526%2010.6166%208.2639%2010.0192Z'%20fill='%239335F0'/%3e%3cpath%20d='M14.2629%205.39193L14.6023%204.71289L14.9418%205.39193C15.2404%205.98932%2015.7248%206.47373%2016.3222%206.77241L17.0015%207.1121L16.3222%207.45178C15.7248%207.75047%2015.2404%208.23487%2014.9418%208.83227L14.6023%209.51131L14.2629%208.83227C13.9642%208.23487%2013.4799%207.75047%2012.8825%207.45178L12.2031%207.1121L12.8825%206.77241C13.4799%206.47373%2013.9642%205.98932%2014.2629%205.39193Z'%20fill='%239335F0'/%3e%3cpath%20d='M14.2629%2016.0169L14.6023%2015.3379L14.9418%2016.0169C15.2404%2016.6143%2015.7248%2017.0987%2016.3222%2017.3974L17.0015%2017.7371L16.3222%2018.0768C15.7248%2018.3755%2015.2404%2018.8599%2014.9418%2019.4573L14.6023%2020.1363L14.2629%2019.4573C13.9642%2018.8599%2013.4799%2018.3755%2012.8825%2018.0768L12.2031%2017.7371L12.8825%2017.3974C13.4799%2017.0987%2013.9642%2016.6143%2014.2629%2016.0169Z'%20fill='%239335F0'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_11822_95435'%20x1='12'%20y1='3.06538e-07'%20x2='22.2857'%20y2='24'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F2E1FF'/%3e%3cstop%20offset='1'%20stop-color='%23E3BDFE'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\""],"names":["__vite_glob_0_3"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index75.js","sources":["../src/assets/icons/ai.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3crect%20width='24'%20height='24'%20rx='12'%20fill='url(%23paint0_linear_11822_95435)'/%3e%3cpath%20d='M8.2639%2010.0192L9.20301%208.14062L10.1421%2010.0192C10.4408%2010.6166%2010.9251%2011.101%2011.5225%2011.3997L13.4016%2012.3392L11.5225%2013.2788C10.9251%2013.5775%2010.4408%2014.0619%2010.1421%2014.6593L9.20301%2016.5379L8.2639%2014.6593C7.96526%2014.0619%207.48089%2013.5775%206.88352%2013.2788L5.00439%2012.3392L6.88352%2011.3997C7.48089%2011.101%207.96526%2010.6166%208.2639%2010.0192Z'%20fill='%239335F0'/%3e%3cpath%20d='M14.2629%205.39193L14.6023%204.71289L14.9418%205.39193C15.2404%205.98932%2015.7248%206.47373%2016.3222%206.77241L17.0015%207.1121L16.3222%207.45178C15.7248%207.75047%2015.2404%208.23487%2014.9418%208.83227L14.6023%209.51131L14.2629%208.83227C13.9642%208.23487%2013.4799%207.75047%2012.8825%207.45178L12.2031%207.1121L12.8825%206.77241C13.4799%206.47373%2013.9642%205.98932%2014.2629%205.39193Z'%20fill='%239335F0'/%3e%3cpath%20d='M14.2629%2016.0169L14.6023%2015.3379L14.9418%2016.0169C15.2404%2016.6143%2015.7248%2017.0987%2016.3222%2017.3974L17.0015%2017.7371L16.3222%2018.0768C15.7248%2018.3755%2015.2404%2018.8599%2014.9418%2019.4573L14.6023%2020.1363L14.2629%2019.4573C13.9642%2018.8599%2013.4799%2018.3755%2012.8825%2018.0768L12.2031%2017.7371L12.8825%2017.3974C13.4799%2017.0987%2013.9642%2016.6143%2014.2629%2016.0169Z'%20fill='%239335F0'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_11822_95435'%20x1='12'%20y1='3.06538e-07'%20x2='22.2857'%20y2='24'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F2E1FF'/%3e%3cstop%20offset='1'%20stop-color='%23E3BDFE'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\""],"names":["__vite_glob_0_3"],"mappings":"AAAA,MAAeA,IAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index76.js","sources":["../src/assets/icons/all-space.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5121_25308)'%3e%3cpath%20d='M6.77349%2010.3359H1.71958C1.3912%2010.3359%201.125%2010.6021%201.125%2010.9305V15.9844C1.125%2016.3128%201.3912%2016.579%201.71958%2016.579H6.77349C7.10186%2016.579%207.36806%2016.3128%207.36806%2015.9844V10.9305C7.36806%2010.6021%207.10186%2010.3359%206.77349%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.9888%2010.3359H10.9349C10.6065%2010.3359%2010.3403%2010.6021%2010.3403%2010.9305V15.9844C10.3403%2016.3128%2010.6065%2016.579%2010.9349%2016.579H15.9888C16.3171%2016.579%2016.5834%2016.3128%2016.5834%2015.9844V10.9305C16.5834%2010.6021%2016.3171%2010.3359%2015.9888%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3921%201.125H6.33823C6.00986%201.125%205.74365%201.3912%205.74365%201.71958V6.77349C5.74365%207.10186%206.00986%207.36806%206.33823%207.36806H11.3921C11.7205%207.36806%2011.9867%207.10186%2011.9867%206.77349V1.71958C11.9867%201.3912%2011.7205%201.125%2011.3921%201.125Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5121_25308'%3e%3crect%20width='18'%20height='18'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\""],"names":["__vite_glob_0_4"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index76.js","sources":["../src/assets/icons/all-space.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5121_25308)'%3e%3cpath%20d='M6.77349%2010.3359H1.71958C1.3912%2010.3359%201.125%2010.6021%201.125%2010.9305V15.9844C1.125%2016.3128%201.3912%2016.579%201.71958%2016.579H6.77349C7.10186%2016.579%207.36806%2016.3128%207.36806%2015.9844V10.9305C7.36806%2010.6021%207.10186%2010.3359%206.77349%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.9888%2010.3359H10.9349C10.6065%2010.3359%2010.3403%2010.6021%2010.3403%2010.9305V15.9844C10.3403%2016.3128%2010.6065%2016.579%2010.9349%2016.579H15.9888C16.3171%2016.579%2016.5834%2016.3128%2016.5834%2015.9844V10.9305C16.5834%2010.6021%2016.3171%2010.3359%2015.9888%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3921%201.125H6.33823C6.00986%201.125%205.74365%201.3912%205.74365%201.71958V6.77349C5.74365%207.10186%206.00986%207.36806%206.33823%207.36806H11.3921C11.7205%207.36806%2011.9867%207.10186%2011.9867%206.77349V1.71958C11.9867%201.3912%2011.7205%201.125%2011.3921%201.125Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5121_25308'%3e%3crect%20width='18'%20height='18'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\""],"names":["__vite_glob_0_4"],"mappings":"AAAA,MAAeA,IAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index77.js","sources":["../src/assets/icons/arrow-head.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20transform='rotate(45)'%3e%3cpath%20fillRule='evenodd'%20clipRule='evenodd'%20d='M4.10624%2012.3651C4.22961%2012.6989%204.54783%2012.9205%204.90372%2012.9205C5.27396%2012.9205%205.60164%2012.6809%205.7139%2012.3281L7.24454%207.51754C7.28945%207.37641%207.39461%207.26245%207.53169%207.20637L12.3767%205.22431C12.6992%205.09241%2012.9098%204.77864%2012.9098%204.43029C12.9098%204.05897%2012.6709%203.72979%2012.3179%203.61467L1.3937%200.0524441C1.01297%20-0.0717039%200.59479%200.0284601%200.311625%200.311623C0.0179321%200.605312%20-0.0779839%201.04307%200.0659951%201.43266L4.10624%2012.3651Z'%20fill='%23E04E05'%20/%3e%3c/svg%3e\""],"names":["__vite_glob_0_5"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index77.js","sources":["../src/assets/icons/arrow-head.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20transform='rotate(45)'%3e%3cpath%20fillRule='evenodd'%20clipRule='evenodd'%20d='M4.10624%2012.3651C4.22961%2012.6989%204.54783%2012.9205%204.90372%2012.9205C5.27396%2012.9205%205.60164%2012.6809%205.7139%2012.3281L7.24454%207.51754C7.28945%207.37641%207.39461%207.26245%207.53169%207.20637L12.3767%205.22431C12.6992%205.09241%2012.9098%204.77864%2012.9098%204.43029C12.9098%204.05897%2012.6709%203.72979%2012.3179%203.61467L1.3937%200.0524441C1.01297%20-0.0717039%200.59479%200.0284601%200.311625%200.311623C0.0179321%200.605312%20-0.0779839%201.04307%200.0659951%201.43266L4.10624%2012.3651Z'%20fill='%23E04E05'%20/%3e%3c/svg%3e\""],"names":["__vite_glob_0_5"],"mappings":"AAAA,MAAeA,IAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index78.js","sources":["../src/assets/icons/attachment.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='8'%20height='11'%20viewBox='0%200%208%2011'%20fill='none'%3e%3cpath%20d='M5.2%207.9359L5.2%203.32051C5.2%202.75407%204.66274%202.29487%204%202.29487C3.33726%202.29487%202.8%202.75407%202.8%203.32051L2.8%208.70513C2.8%209.69641%203.7402%2010.5%204.9%2010.5C6.0598%2010.5%207%209.69641%207%208.70513L7%203.0641C7%201.64799%205.65685%200.5%204%200.5C2.34315%200.5%201%201.64799%201%203.0641L1%207.9359'%20stroke='%23415575'%20stroke-width='0.8'%20stroke-linecap='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_6"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index78.js","sources":["../src/assets/icons/attachment.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='8'%20height='11'%20viewBox='0%200%208%2011'%20fill='none'%3e%3cpath%20d='M5.2%207.9359L5.2%203.32051C5.2%202.75407%204.66274%202.29487%204%202.29487C3.33726%202.29487%202.8%202.75407%202.8%203.32051L2.8%208.70513C2.8%209.69641%203.7402%2010.5%204.9%2010.5C6.0598%2010.5%207%209.69641%207%208.70513L7%203.0641C7%201.64799%205.65685%200.5%204%200.5C2.34315%200.5%201%201.64799%201%203.0641L1%207.9359'%20stroke='%23415575'%20stroke-width='0.8'%20stroke-linecap='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_6"],"mappings":"AAAA,MAAeA,IAAA;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index79.js","sources":["../src/assets/icons/back.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.2727%2010.0535H2'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.49198%2014.5454L2%2010.0535L6.49198%205.56149'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_7"],"mappings":"AAAA,MAAAA,IAAe;"}
1
+ {"version":3,"file":"index79.js","sources":["../src/assets/icons/back.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.2727%2010.0535H2'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.49198%2014.5454L2%2010.0535L6.49198%205.56149'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_7"],"mappings":"AAAA,MAAeA,IAAA;"}