@commercetools/nimbus 2.0.0 → 2.0.1-rc2
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.
- package/dist/chunks/{DateField-DZwn3cIj.es.js → DateField-B-4ymU5i.es.js} +2 -2
- package/dist/chunks/{DateField-DZwn3cIj.es.js.map → DateField-B-4ymU5i.es.js.map} +1 -1
- package/dist/chunks/{DatePicker-B2Nf_0Sq.es.js → DatePicker-ByxT1sNF.es.js} +2 -2
- package/dist/chunks/{DatePicker-B2Nf_0Sq.es.js.map → DatePicker-ByxT1sNF.es.js.map} +1 -1
- package/dist/chunks/accordion-B2FLWAh5.cjs.js.map +1 -1
- package/dist/chunks/accordion-CKDnNkVv.es.js.map +1 -1
- package/dist/chunks/calendar-V0KeNCQ3.cjs.js.map +1 -1
- package/dist/chunks/calendar-lD6G93R9.es.js.map +1 -1
- package/dist/chunks/collapsible-motion-C7M_CLNI.cjs.js.map +1 -1
- package/dist/chunks/collapsible-motion-CSrKjF8X.es.js.map +1 -1
- package/dist/chunks/combobox-B5UxZWSX.cjs.js.map +1 -1
- package/dist/chunks/combobox-D_7gr3DY.es.js.map +1 -1
- package/dist/chunks/{date-input-Cap8-3zj.es.js → date-input-Do1wXp3t.es.js} +2 -2
- package/dist/chunks/{date-input-Cap8-3zj.es.js.map → date-input-Do1wXp3t.es.js.map} +1 -1
- package/dist/chunks/{date-picker-ChZ8H-MT.es.js → date-picker-ClYge74a.es.js} +5 -5
- package/dist/chunks/{date-picker-ChZ8H-MT.es.js.map → date-picker-ClYge74a.es.js.map} +1 -1
- package/dist/chunks/{date-range-picker-DGWMdcAN.es.js → date-range-picker-KRcGUZW-.es.js} +5 -5
- package/dist/chunks/{date-range-picker-DGWMdcAN.es.js.map → date-range-picker-KRcGUZW-.es.js.map} +1 -1
- package/dist/chunks/group-BqUFlw5R.cjs.js.map +1 -1
- package/dist/chunks/group-CWADf2vF.es.js.map +1 -1
- package/dist/chunks/icon-CenxuChf.es.js.map +1 -1
- package/dist/chunks/icon-D39U--jA.cjs.js.map +1 -1
- package/dist/chunks/kbd-BaeV_DL-.cjs.js.map +1 -1
- package/dist/chunks/kbd-CH9rYghB.es.js.map +1 -1
- package/dist/chunks/menu-D-vE6ZpM.es.js.map +1 -1
- package/dist/chunks/menu-DIepV2KZ.cjs.js.map +1 -1
- package/dist/chunks/popover-CfEq5G5-.cjs.js.map +1 -1
- package/dist/chunks/popover-DNaC7CwB.es.js.map +1 -1
- package/dist/chunks/range-calendar-DBpl6y5i.es.js.map +1 -1
- package/dist/chunks/range-calendar-_dZfAsdG.cjs.js.map +1 -1
- package/dist/chunks/rich-text-input-BC8CBVio.es.js.map +1 -1
- package/dist/chunks/rich-text-input-Da5WFZ3l.cjs.js.map +1 -1
- package/dist/chunks/separator-CvRn_J0r.cjs.js.map +1 -1
- package/dist/chunks/separator-DJGUFG-o.es.js.map +1 -1
- package/dist/chunks/split-button-BO52sL7h.cjs.js.map +1 -1
- package/dist/chunks/split-button-BxyZmuNi.es.js.map +1 -1
- package/dist/chunks/switch-01hEhL9A.es.js.map +1 -1
- package/dist/chunks/switch-CdLhBEPq.cjs.js.map +1 -1
- package/dist/chunks/tabs-CJ0OAUSR.cjs.js.map +1 -1
- package/dist/chunks/tabs-Dhte-RCe.es.js.map +1 -1
- package/dist/chunks/tag-group-Btt0egzG.cjs.js.map +1 -1
- package/dist/chunks/tag-group-D2dgXSsV.es.js.map +1 -1
- package/dist/chunks/{time-input--a_qv-Jk.es.js → time-input-DDrB_c0M.es.js} +2 -2
- package/dist/chunks/{time-input--a_qv-Jk.es.js.map → time-input-DDrB_c0M.es.js.map} +1 -1
- package/dist/chunks/tooltip-BPTOkK7W.cjs.js.map +1 -1
- package/dist/chunks/tooltip-sgakxhiy.es.js.map +1 -1
- package/dist/components/date-input.es.js +1 -1
- package/dist/components/date-picker.es.js +1 -1
- package/dist/components/date-range-picker.es.js +1 -1
- package/dist/components/time-input.es.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +34 -0
- package/dist/index.es.js +201 -196
- package/dist/index.es.js.map +1 -1
- package/dist/setup-jsdom-polyfills.cjs +1 -1
- package/dist/setup-jsdom-polyfills.cjs.map +1 -1
- package/dist/setup-jsdom-polyfills.es.js +37 -2
- package/dist/setup-jsdom-polyfills.es.js.map +1 -1
- package/package.json +9 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-sgakxhiy.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+overlays@3.30.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/overlays/dist/useModal.mjs","../../../../node_modules/.pnpm/@react-aria+tooltip@3.8.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/tooltip/dist/useTooltip.mjs","../../../../node_modules/.pnpm/@react-aria+tooltip@3.8.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/tooltip/dist/useTooltipTrigger.mjs","../../../../node_modules/.pnpm/@react-stately+tooltip@3.5.8_react@19.1.0/node_modules/@react-stately/tooltip/dist/useTooltipTriggerState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.13.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-aria-components/dist/Tooltip.mjs","../../src/components/tooltip/components/tooltip.root.tsx","../../src/components/tooltip/tooltip.slots.ts","../../src/components/tooltip/components/tooltip.content.tsx","../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import {useUNSAFE_PortalContext as $96b38030c423d352$export$9fc1347d4195ccb3} from \"./PortalProvider.mjs\";\nimport $4AOtR$react, {useContext as $4AOtR$useContext, useState as $4AOtR$useState, useMemo as $4AOtR$useMemo, useEffect as $4AOtR$useEffect} from \"react\";\nimport $4AOtR$reactdom from \"react-dom\";\nimport {useIsSSR as $4AOtR$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $f57aed4a881a3485$var$Context = /*#__PURE__*/ (0, $4AOtR$react).createContext(null);\nfunction $f57aed4a881a3485$export$178405afcd8c5eb(props) {\n let { children: children } = props;\n let parent = (0, $4AOtR$useContext)($f57aed4a881a3485$var$Context);\n let [modalCount, setModalCount] = (0, $4AOtR$useState)(0);\n let context = (0, $4AOtR$useMemo)(()=>({\n parent: parent,\n modalCount: modalCount,\n addModal () {\n setModalCount((count)=>count + 1);\n if (parent) parent.addModal();\n },\n removeModal () {\n setModalCount((count)=>count - 1);\n if (parent) parent.removeModal();\n }\n }), [\n parent,\n modalCount\n ]);\n return /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$var$Context.Provider, {\n value: context\n }, children);\n}\nfunction $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {\n let context = (0, $4AOtR$useContext)($f57aed4a881a3485$var$Context);\n return {\n modalProviderProps: {\n 'aria-hidden': context && context.modalCount > 0 ? true : undefined\n }\n };\n}\n/**\n * Creates a root node that will be aria-hidden if there are other modals open.\n */ function $f57aed4a881a3485$var$OverlayContainerDOM(props) {\n let { modalProviderProps: modalProviderProps } = $f57aed4a881a3485$export$d9aaed4c3ece1bc0();\n return /*#__PURE__*/ (0, $4AOtR$react).createElement(\"div\", {\n \"data-overlay-container\": true,\n ...props,\n ...modalProviderProps\n });\n}\nfunction $f57aed4a881a3485$export$bf688221f59024e5(props) {\n return /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$export$178405afcd8c5eb, null, /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$var$OverlayContainerDOM, props));\n}\nfunction $f57aed4a881a3485$export$b47c3594eab58386(props) {\n let isSSR = (0, $4AOtR$useIsSSR)();\n let { portalContainer: portalContainer = isSSR ? null : document.body, ...rest } = props;\n let { getContainer: getContainer } = (0, $96b38030c423d352$export$9fc1347d4195ccb3)();\n if (!props.portalContainer && getContainer) portalContainer = getContainer();\n (0, $4AOtR$react).useEffect(()=>{\n if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest('[data-overlay-container]')) throw new Error('An OverlayContainer must not be inside another container. Please change the portalContainer prop.');\n }, [\n portalContainer\n ]);\n if (!portalContainer) return null;\n let contents = /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$export$bf688221f59024e5, rest);\n return /*#__PURE__*/ (0, $4AOtR$reactdom).createPortal(contents, portalContainer);\n}\nfunction $f57aed4a881a3485$export$33ffd74ebf07f060(options) {\n // Add aria-hidden to all parent providers on mount, and restore on unmount.\n let context = (0, $4AOtR$useContext)($f57aed4a881a3485$var$Context);\n if (!context) throw new Error('Modal is not contained within a provider');\n (0, $4AOtR$useEffect)(()=>{\n if ((options === null || options === void 0 ? void 0 : options.isDisabled) || !context || !context.parent) return;\n // The immediate context is from the provider containing this modal, so we only\n // want to trigger aria-hidden on its parents not on the modal provider itself.\n context.parent.addModal();\n return ()=>{\n if (context && context.parent) context.parent.removeModal();\n };\n }, [\n context,\n context.parent,\n options === null || options === void 0 ? void 0 : options.isDisabled\n ]);\n return {\n modalProps: {\n 'data-ismodal': !(options === null || options === void 0 ? void 0 : options.isDisabled)\n }\n };\n}\n\n\nexport {$f57aed4a881a3485$export$178405afcd8c5eb as ModalProvider, $f57aed4a881a3485$export$d9aaed4c3ece1bc0 as useModalProvider, $f57aed4a881a3485$export$bf688221f59024e5 as OverlayProvider, $f57aed4a881a3485$export$b47c3594eab58386 as OverlayContainer, $f57aed4a881a3485$export$33ffd74ebf07f060 as useModal};\n//# sourceMappingURL=useModal.module.js.map\n","import {filterDOMProps as $kwmr2$filterDOMProps, mergeProps as $kwmr2$mergeProps} from \"@react-aria/utils\";\nimport {useHover as $kwmr2$useHover} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $326e436e94273fe1$export$1c4b08e0eca38426(props, state) {\n let domProps = (0, $kwmr2$filterDOMProps)(props, {\n labelable: true\n });\n let { hoverProps: hoverProps } = (0, $kwmr2$useHover)({\n onHoverStart: ()=>state === null || state === void 0 ? void 0 : state.open(true),\n onHoverEnd: ()=>state === null || state === void 0 ? void 0 : state.close()\n });\n return {\n tooltipProps: (0, $kwmr2$mergeProps)(domProps, hoverProps, {\n role: 'tooltip'\n })\n };\n}\n\n\nexport {$326e436e94273fe1$export$1c4b08e0eca38426 as useTooltip};\n//# sourceMappingURL=useTooltip.module.js.map\n","import {getInteractionModality as $6VwSn$getInteractionModality, isFocusVisible as $6VwSn$isFocusVisible, useHover as $6VwSn$useHover, useFocusable as $6VwSn$useFocusable} from \"@react-aria/interactions\";\nimport {useId as $6VwSn$useId, mergeProps as $6VwSn$mergeProps} from \"@react-aria/utils\";\nimport {useRef as $6VwSn$useRef, useEffect as $6VwSn$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nfunction $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {\n let { isDisabled: isDisabled, trigger: trigger } = props;\n let tooltipId = (0, $6VwSn$useId)();\n let isHovered = (0, $6VwSn$useRef)(false);\n let isFocused = (0, $6VwSn$useRef)(false);\n let handleShow = ()=>{\n if (isHovered.current || isFocused.current) state.open(isFocused.current);\n };\n let handleHide = (immediate)=>{\n if (!isHovered.current && !isFocused.current) state.close(immediate);\n };\n (0, $6VwSn$useEffect)(()=>{\n let onKeyDown = (e)=>{\n if (ref && ref.current) // Escape after clicking something can give it keyboard focus\n // dismiss tooltip on esc key press\n {\n if (e.key === 'Escape') {\n e.stopPropagation();\n state.close(true);\n }\n }\n };\n if (state.isOpen) {\n document.addEventListener('keydown', onKeyDown, true);\n return ()=>{\n document.removeEventListener('keydown', onKeyDown, true);\n };\n }\n }, [\n ref,\n state\n ]);\n let onHoverStart = ()=>{\n if (trigger === 'focus') return;\n // In chrome, if you hover a trigger, then another element obscures it, due to keyboard\n // interactions for example, hover will end. When hover is restored after that element disappears,\n // focus moves on for example, then the tooltip will reopen. We check the modality to know if the hover\n // is the result of moving the mouse.\n if ((0, $6VwSn$getInteractionModality)() === 'pointer') isHovered.current = true;\n else isHovered.current = false;\n handleShow();\n };\n let onHoverEnd = ()=>{\n if (trigger === 'focus') return;\n // no matter how the trigger is left, we should close the tooltip\n isFocused.current = false;\n isHovered.current = false;\n handleHide();\n };\n let onPressStart = ()=>{\n // no matter how the trigger is pressed, we should close the tooltip\n isFocused.current = false;\n isHovered.current = false;\n handleHide(true);\n };\n let onFocus = ()=>{\n let isVisible = (0, $6VwSn$isFocusVisible)();\n if (isVisible) {\n isFocused.current = true;\n handleShow();\n }\n };\n let onBlur = ()=>{\n isFocused.current = false;\n isHovered.current = false;\n handleHide(true);\n };\n let { hoverProps: hoverProps } = (0, $6VwSn$useHover)({\n isDisabled: isDisabled,\n onHoverStart: onHoverStart,\n onHoverEnd: onHoverEnd\n });\n let { focusableProps: focusableProps } = (0, $6VwSn$useFocusable)({\n isDisabled: isDisabled,\n onFocus: onFocus,\n onBlur: onBlur\n }, ref);\n return {\n triggerProps: {\n 'aria-describedby': state.isOpen ? tooltipId : undefined,\n ...(0, $6VwSn$mergeProps)(focusableProps, hoverProps, {\n onPointerDown: onPressStart,\n onKeyDown: onPressStart\n }),\n tabIndex: undefined\n },\n tooltipProps: {\n id: tooltipId\n }\n };\n}\n\n\nexport {$4e1b34546679e357$export$a6da6c504e4bba8b as useTooltipTrigger};\n//# sourceMappingURL=useTooltipTrigger.module.js.map\n","import {useMemo as $50cCT$useMemo, useRef as $50cCT$useRef, useEffect as $50cCT$useEffect} from \"react\";\nimport {useOverlayTriggerState as $50cCT$useOverlayTriggerState} from \"@react-stately/overlays\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nconst $8796f90736e175cb$var$TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design\nconst $8796f90736e175cb$var$TOOLTIP_COOLDOWN = 500;\nlet $8796f90736e175cb$var$tooltips = {};\nlet $8796f90736e175cb$var$tooltipId = 0;\nlet $8796f90736e175cb$var$globalWarmedUp = false;\nlet $8796f90736e175cb$var$globalWarmUpTimeout = null;\nlet $8796f90736e175cb$var$globalCooldownTimeout = null;\nfunction $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {\n let { delay: delay = $8796f90736e175cb$var$TOOLTIP_DELAY, closeDelay: closeDelay = $8796f90736e175cb$var$TOOLTIP_COOLDOWN } = props;\n let { isOpen: isOpen, open: open, close: close } = (0, $50cCT$useOverlayTriggerState)(props);\n let id = (0, $50cCT$useMemo)(()=>`${++$8796f90736e175cb$var$tooltipId}`, []);\n let closeTimeout = (0, $50cCT$useRef)(null);\n let closeCallback = (0, $50cCT$useRef)(close);\n let ensureTooltipEntry = ()=>{\n $8796f90736e175cb$var$tooltips[id] = hideTooltip;\n };\n let closeOpenTooltips = ()=>{\n for(let hideTooltipId in $8796f90736e175cb$var$tooltips)if (hideTooltipId !== id) {\n $8796f90736e175cb$var$tooltips[hideTooltipId](true);\n delete $8796f90736e175cb$var$tooltips[hideTooltipId];\n }\n };\n let showTooltip = ()=>{\n if (closeTimeout.current) clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeOpenTooltips();\n ensureTooltipEntry();\n $8796f90736e175cb$var$globalWarmedUp = true;\n open();\n if ($8796f90736e175cb$var$globalWarmUpTimeout) {\n clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);\n $8796f90736e175cb$var$globalWarmUpTimeout = null;\n }\n if ($8796f90736e175cb$var$globalCooldownTimeout) {\n clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);\n $8796f90736e175cb$var$globalCooldownTimeout = null;\n }\n };\n let hideTooltip = (immediate)=>{\n if (immediate || closeDelay <= 0) {\n if (closeTimeout.current) clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeCallback.current();\n } else if (!closeTimeout.current) closeTimeout.current = setTimeout(()=>{\n closeTimeout.current = null;\n closeCallback.current();\n }, closeDelay);\n if ($8796f90736e175cb$var$globalWarmUpTimeout) {\n clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);\n $8796f90736e175cb$var$globalWarmUpTimeout = null;\n }\n if ($8796f90736e175cb$var$globalWarmedUp) {\n if ($8796f90736e175cb$var$globalCooldownTimeout) clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);\n $8796f90736e175cb$var$globalCooldownTimeout = setTimeout(()=>{\n delete $8796f90736e175cb$var$tooltips[id];\n $8796f90736e175cb$var$globalCooldownTimeout = null;\n $8796f90736e175cb$var$globalWarmedUp = false;\n }, Math.max($8796f90736e175cb$var$TOOLTIP_COOLDOWN, closeDelay));\n }\n };\n let warmupTooltip = ()=>{\n closeOpenTooltips();\n ensureTooltipEntry();\n if (!isOpen && !$8796f90736e175cb$var$globalWarmUpTimeout && !$8796f90736e175cb$var$globalWarmedUp) $8796f90736e175cb$var$globalWarmUpTimeout = setTimeout(()=>{\n $8796f90736e175cb$var$globalWarmUpTimeout = null;\n $8796f90736e175cb$var$globalWarmedUp = true;\n showTooltip();\n }, delay);\n else if (!isOpen) showTooltip();\n };\n (0, $50cCT$useEffect)(()=>{\n closeCallback.current = close;\n }, [\n close\n ]);\n (0, $50cCT$useEffect)(()=>{\n return ()=>{\n if (closeTimeout.current) clearTimeout(closeTimeout.current);\n let tooltip = $8796f90736e175cb$var$tooltips[id];\n if (tooltip) delete $8796f90736e175cb$var$tooltips[id];\n };\n }, [\n id\n ]);\n return {\n isOpen: isOpen,\n open: (immediate)=>{\n if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();\n else showTooltip();\n },\n close: hideTooltip\n };\n}\n\n\nexport {$8796f90736e175cb$export$4d40659c25ecb50b as useTooltipTriggerState};\n//# sourceMappingURL=useTooltipTriggerState.module.js.map\n","import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {OverlayArrowContext as $44f671af83e7d9e0$export$2de4954e8ae13b9f} from \"./OverlayArrow.mjs\";\nimport {useTooltipTrigger as $cCslV$useTooltipTrigger, OverlayContainer as $cCslV$OverlayContainer, useOverlayPosition as $cCslV$useOverlayPosition, mergeProps as $cCslV$mergeProps, useTooltip as $cCslV$useTooltip} from \"react-aria\";\nimport {useExitAnimation as $cCslV$useExitAnimation, useEnterAnimation as $cCslV$useEnterAnimation, filterDOMProps as $cCslV$filterDOMProps} from \"@react-aria/utils\";\nimport {FocusableProvider as $cCslV$FocusableProvider} from \"@react-aria/focus\";\nimport {useTooltipTriggerState as $cCslV$useTooltipTriggerState} from \"react-stately\";\nimport $cCslV$react, {createContext as $cCslV$createContext, useRef as $cCslV$useRef, forwardRef as $cCslV$forwardRef, useContext as $cCslV$useContext} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\nconst $4e3b923658d69c60$export$7a7623236eec67fa = /*#__PURE__*/ (0, $cCslV$createContext)(null);\nconst $4e3b923658d69c60$export$39ae08fa83328b12 = /*#__PURE__*/ (0, $cCslV$createContext)(null);\nfunction $4e3b923658d69c60$export$8c610744efcf8a1d(props) {\n let state = (0, $cCslV$useTooltipTriggerState)(props);\n let ref = (0, $cCslV$useRef)(null);\n let { triggerProps: triggerProps, tooltipProps: tooltipProps } = (0, $cCslV$useTooltipTrigger)(props, state, ref);\n return /*#__PURE__*/ (0, $cCslV$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n $4e3b923658d69c60$export$7a7623236eec67fa,\n state\n ],\n [\n $4e3b923658d69c60$export$39ae08fa83328b12,\n {\n ...tooltipProps,\n triggerRef: ref\n }\n ]\n ]\n }, /*#__PURE__*/ (0, $cCslV$react).createElement((0, $cCslV$FocusableProvider), {\n ...triggerProps,\n ref: ref\n }, props.children));\n}\nconst $4e3b923658d69c60$export$28c660c63b792dea = /*#__PURE__*/ (0, $cCslV$forwardRef)(function Tooltip({ UNSTABLE_portalContainer: UNSTABLE_portalContainer, ...props }, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $4e3b923658d69c60$export$39ae08fa83328b12);\n let contextState = (0, $cCslV$useContext)($4e3b923658d69c60$export$7a7623236eec67fa);\n let localState = (0, $cCslV$useTooltipTriggerState)(props);\n let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;\n let isExiting = (0, $cCslV$useExitAnimation)(ref, state.isOpen) || props.isExiting || false;\n if (!state.isOpen && !isExiting) return null;\n return /*#__PURE__*/ (0, $cCslV$react).createElement((0, $cCslV$OverlayContainer), {\n portalContainer: UNSTABLE_portalContainer\n }, /*#__PURE__*/ (0, $cCslV$react).createElement($4e3b923658d69c60$var$TooltipInner, {\n ...props,\n tooltipRef: ref,\n isExiting: isExiting\n }));\n});\nfunction $4e3b923658d69c60$var$TooltipInner(props) {\n let state = (0, $cCslV$useContext)($4e3b923658d69c60$export$7a7623236eec67fa);\n let arrowRef = (0, $cCslV$useRef)(null);\n let { overlayProps: overlayProps, arrowProps: arrowProps, placement: placement, triggerAnchorPoint: triggerAnchorPoint } = (0, $cCslV$useOverlayPosition)({\n placement: props.placement || 'top',\n targetRef: props.triggerRef,\n overlayRef: props.tooltipRef,\n arrowRef: arrowRef,\n offset: props.offset,\n crossOffset: props.crossOffset,\n isOpen: state.isOpen,\n arrowBoundaryOffset: props.arrowBoundaryOffset,\n shouldFlip: props.shouldFlip,\n containerPadding: props.containerPadding,\n onClose: ()=>state.close(true)\n });\n let isEntering = (0, $cCslV$useEnterAnimation)(props.tooltipRef, !!placement) || props.isEntering || false;\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-Tooltip',\n values: {\n placement: placement,\n isEntering: isEntering,\n isExiting: props.isExiting,\n state: state\n }\n });\n props = (0, $cCslV$mergeProps)(props, overlayProps);\n let { tooltipProps: tooltipProps } = (0, $cCslV$useTooltip)(props, state);\n let DOMProps = (0, $cCslV$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $cCslV$react).createElement(\"div\", {\n ...(0, $cCslV$mergeProps)(DOMProps, renderProps, tooltipProps),\n ref: props.tooltipRef,\n style: {\n ...overlayProps.style,\n '--trigger-anchor-point': triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : undefined,\n ...renderProps.style\n },\n \"data-placement\": placement !== null && placement !== void 0 ? placement : undefined,\n \"data-entering\": isEntering || undefined,\n \"data-exiting\": props.isExiting || undefined\n }, /*#__PURE__*/ (0, $cCslV$react).createElement((0, $44f671af83e7d9e0$export$2de4954e8ae13b9f).Provider, {\n value: {\n ...arrowProps,\n placement: placement,\n ref: arrowRef\n }\n }, renderProps.children));\n}\n\n\nexport {$4e3b923658d69c60$export$7a7623236eec67fa as TooltipTriggerStateContext, $4e3b923658d69c60$export$39ae08fa83328b12 as TooltipContext, $4e3b923658d69c60$export$8c610744efcf8a1d as TooltipTrigger, $4e3b923658d69c60$export$28c660c63b792dea as Tooltip};\n//# sourceMappingURL=Tooltip.module.js.map\n","import React from \"react\";\nimport { TooltipTrigger } from \"react-aria-components\";\nimport type { TooltipTriggerComponentProps } from \"react-aria-components\";\n\n/**\n * # Tooltip\n *\n * A contextual popup that displays a description for an element.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/tooltip}\n */\nexport function TooltipRoot({\n // Match delays to current ui-kit tooltip\n delay = 300,\n closeDelay = 200,\n ...props\n}: TooltipTriggerComponentProps) {\n // Note: In React 19, ref forwarding is automatic for function components\n // The ref should be placed on the trigger element directly when needed\n return <TooltipTrigger delay={delay} closeDelay={closeDelay} {...props} />;\n}\n\nTooltipRoot.displayName = \"Tooltip.Root\";\n","import { createRecipeContext } from \"@chakra-ui/react\";\n\nimport type { TooltipRootSlotProps } from \"./tooltip.types\";\nimport type { SlotComponent } from \"../utils/slot-types\";\n\nconst { withContext } = createRecipeContext({ key: \"tooltip\" });\n\n/**\n * Root component that provides the styling context for the Tooltip component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const TooltipRootSlot: SlotComponent<\n HTMLDivElement,\n TooltipRootSlotProps\n> = withContext<HTMLDivElement, TooltipRootSlotProps>(\"div\");\n","import { Tooltip as RATooltip } from \"react-aria-components\";\nimport { TooltipRootSlot } from \"../tooltip.slots\";\nimport type { TooltipProps } from \"../tooltip.types\";\n\n/**\n * TooltipContent\n * ============================================================\n * A contextual popup that displays a description for an element, uses `Tooltip` component from `react-aria-components`.\n *\n * Features:\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLDivElement' attributes (including aria- & data-attributes)\n * - allows overriding styles by using style-props\n *\n * Further Context:\n * - [React Aria Components Tooltip Documentation](https://react-spectrum.adobe.com/react-aria/Tooltip.html)\n * - [ARIA Tooltip Pattern](https://www.w3.org/TR/wai-aria-1.2/#tooltip)\n */\nexport function TooltipContent({\n children,\n placement = \"bottom\",\n ref,\n ...props\n}: TooltipProps & { ref?: React.Ref<HTMLDivElement> }) {\n return (\n <TooltipRootSlot ref={ref} asChild {...props}>\n <RATooltip placement={placement} {...props}>\n {children}\n </RATooltip>\n </TooltipRootSlot>\n );\n}\n\nTooltipContent.displayName = \"Tooltip.Content\";\n","import { TooltipRoot } from \"./components/tooltip.root\";\nimport { TooltipContent } from \"./components/tooltip.content\";\n\n// Exports for internal use by react-docgen\nexport { TooltipRoot as _TooltipRoot, TooltipContent as _TooltipContent };\n\n// Export compound component object\nexport const Tooltip = {\n Root: TooltipRoot,\n Content: TooltipContent,\n};\n"],"names":["$f57aed4a881a3485$var$Context","$4AOtR$react","$f57aed4a881a3485$export$178405afcd8c5eb","props","children","parent","$4AOtR$useContext","modalCount","setModalCount","$4AOtR$useState","context","$4AOtR$useMemo","count","$f57aed4a881a3485$export$d9aaed4c3ece1bc0","$f57aed4a881a3485$var$OverlayContainerDOM","modalProviderProps","$f57aed4a881a3485$export$bf688221f59024e5","$f57aed4a881a3485$export$b47c3594eab58386","isSSR","$4AOtR$useIsSSR","portalContainer","rest","getContainer","$96b38030c423d352$export$9fc1347d4195ccb3","contents","$4AOtR$reactdom","$326e436e94273fe1$export$1c4b08e0eca38426","state","domProps","$kwmr2$filterDOMProps","hoverProps","$kwmr2$useHover","$kwmr2$mergeProps","$4e1b34546679e357$export$a6da6c504e4bba8b","ref","isDisabled","trigger","tooltipId","$6VwSn$useId","isHovered","$6VwSn$useRef","isFocused","handleShow","handleHide","immediate","$6VwSn$useEffect","onKeyDown","e","onHoverStart","$6VwSn$getInteractionModality","onHoverEnd","onPressStart","onFocus","$6VwSn$isFocusVisible","onBlur","$6VwSn$useHover","focusableProps","$6VwSn$useFocusable","$6VwSn$mergeProps","$8796f90736e175cb$var$TOOLTIP_DELAY","$8796f90736e175cb$var$TOOLTIP_COOLDOWN","$8796f90736e175cb$var$tooltips","$8796f90736e175cb$var$tooltipId","$8796f90736e175cb$var$globalWarmedUp","$8796f90736e175cb$var$globalWarmUpTimeout","$8796f90736e175cb$var$globalCooldownTimeout","$8796f90736e175cb$export$4d40659c25ecb50b","delay","closeDelay","isOpen","open","close","$50cCT$useOverlayTriggerState","id","$50cCT$useMemo","closeTimeout","$50cCT$useRef","closeCallback","ensureTooltipEntry","hideTooltip","closeOpenTooltips","hideTooltipId","showTooltip","warmupTooltip","$50cCT$useEffect","$4e3b923658d69c60$export$7a7623236eec67fa","$cCslV$createContext","$4e3b923658d69c60$export$39ae08fa83328b12","$4e3b923658d69c60$export$8c610744efcf8a1d","$cCslV$useTooltipTriggerState","$cCslV$useRef","triggerProps","tooltipProps","$cCslV$useTooltipTrigger","$cCslV$react","$64fa3d84918910a7$export$2881499e37b75b9a","$cCslV$FocusableProvider","$4e3b923658d69c60$export$28c660c63b792dea","$cCslV$forwardRef","UNSTABLE_portalContainer","$64fa3d84918910a7$export$29f1550f4b0d4415","contextState","$cCslV$useContext","localState","isExiting","$cCslV$useExitAnimation","$cCslV$OverlayContainer","$4e3b923658d69c60$var$TooltipInner","arrowRef","overlayProps","arrowProps","placement","triggerAnchorPoint","$cCslV$useOverlayPosition","isEntering","$cCslV$useEnterAnimation","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","$cCslV$mergeProps","$cCslV$useTooltip","DOMProps","$cCslV$filterDOMProps","$44f671af83e7d9e0$export$2de4954e8ae13b9f","TooltipRoot","jsx","TooltipTrigger","withContext","createRecipeContext","TooltipRootSlot","TooltipContent","RATooltip","Tooltip"],"mappings":";;;;;;;;;;;;AAmBA,MAAMA,IAAkDC,gBAAAA,EAAc,cAAc,IAAI;AACxF,SAASC,GAAyCC,GAAO;AACrD,MAAI,EAAE,UAAUC,EAAQ,IAAKD,GACzBE,IAAaC,EAAmBN,CAA6B,GAC7D,CAACO,GAAYC,CAAa,IAAQC,EAAiB,CAAC,GACpDC,IAAcC,EAAgB,OAAK;AAAA,IAC/B,QAAQN;AAAA,IACR,YAAYE;AAAA,IACZ,WAAY;AACR,MAAAC,EAAc,CAACI,MAAQA,IAAQ,CAAC,GAC5BP,KAAQA,EAAO,SAAQ;AAAA,IAC/B;AAAA,IACA,cAAe;AACX,MAAAG,EAAc,CAACI,MAAQA,IAAQ,CAAC,GAC5BP,KAAQA,EAAO,YAAW;AAAA,IAClC;AAAA,EACZ,IAAY;AAAA,IACJA;AAAA,IACAE;AAAA,EACR,CAAK;AACD,SAAyBN,gBAAAA,EAAc,cAAcD,EAA8B,UAAU;AAAA,IACzF,OAAOU;AAAA,EACf,GAAON,CAAQ;AACf;AACA,SAASS,KAA4C;AACjD,MAAIH,IAAcJ,EAAmBN,CAA6B;AAClE,SAAO;AAAA,IACH,oBAAoB;AAAA,MAChB,eAAeU,KAAWA,EAAQ,aAAa,IAAI,KAAO;AAAA,IACtE;AAAA,EACA;AACA;AAGI,SAASI,GAA0CX,GAAO;AAC1D,MAAI,EAAE,oBAAoBY,EAAkB,IAAKF,GAAyC;AAC1F,SAAyBZ,gBAAAA,EAAc,cAAc,OAAO;AAAA,IACxD,0BAA0B;AAAA,IAC1B,GAAGE;AAAA,IAC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AA2C,UAAU;AAAA,IACtG,OAAO;AAAA,MACH,GAAGZ;AAAA,MACH,WAAWC;AAAA,MACX,KAAKH;AAAA,IACjB;AAAA,EACA,GAAOQ,EAAY,QAAQ,CAAC;AAC5B;ACxGO,SAASO,EAAY;AAAA;AAAA,EAE1B,OAAAxD,IAAQ;AAAA,EACR,YAAAC,IAAa;AAAA,EACb,GAAGjE;AACL,GAAiC;AAG/B,SAAO,gBAAAyH,EAACC,IAAA,EAAe,OAAA1D,GAAc,YAAAC,GAAyB,GAAGjE,GAAO;AAC1E;AAEAwH,EAAY,cAAc;ACjB1B,MAAM,EAAE,aAAAG,GAAA,IAAgB,gBAAAC,GAAoB,EAAE,KAAK,WAAW,GAMjDC,KAGT,gBAAAF,GAAkD,KAAK;ACIpD,SAASG,EAAe;AAAA,EAC7B,UAAA7H;AAAA,EACA,WAAA2G,IAAY;AAAA,EACZ,KAAA7E;AAAA,EACA,GAAG/B;AACL,GAAuD;AACrD,SACE,gBAAAyH,EAACI,IAAA,EAAgB,KAAA9F,GAAU,SAAO,IAAE,GAAG/B,GACrC,UAAA,gBAAAyH,EAACM,IAAA,EAAU,WAAAnB,GAAuB,GAAG5G,GAClC,UAAAC,GACH,GACF;AAEJ;AAEA6H,EAAe,cAAc;AC1BtB,MAAME,KAAU;AAAA,EACrB,MAAMR;AAAA,EACN,SAASM;AACX;","x_google_ignoreList":[0,1,2,3,4]}
|
|
1
|
+
{"version":3,"file":"tooltip-sgakxhiy.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+overlays@3.30.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/overlays/dist/useModal.mjs","../../../../node_modules/.pnpm/@react-aria+tooltip@3.8.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/tooltip/dist/useTooltip.mjs","../../../../node_modules/.pnpm/@react-aria+tooltip@3.8.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/tooltip/dist/useTooltipTrigger.mjs","../../../../node_modules/.pnpm/@react-stately+tooltip@3.5.8_react@19.1.0/node_modules/@react-stately/tooltip/dist/useTooltipTriggerState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.13.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-aria-components/dist/Tooltip.mjs","../../src/components/tooltip/components/tooltip.root.tsx","../../src/components/tooltip/tooltip.slots.ts","../../src/components/tooltip/components/tooltip.content.tsx","../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import {useUNSAFE_PortalContext as $96b38030c423d352$export$9fc1347d4195ccb3} from \"./PortalProvider.mjs\";\nimport $4AOtR$react, {useContext as $4AOtR$useContext, useState as $4AOtR$useState, useMemo as $4AOtR$useMemo, useEffect as $4AOtR$useEffect} from \"react\";\nimport $4AOtR$reactdom from \"react-dom\";\nimport {useIsSSR as $4AOtR$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $f57aed4a881a3485$var$Context = /*#__PURE__*/ (0, $4AOtR$react).createContext(null);\nfunction $f57aed4a881a3485$export$178405afcd8c5eb(props) {\n let { children: children } = props;\n let parent = (0, $4AOtR$useContext)($f57aed4a881a3485$var$Context);\n let [modalCount, setModalCount] = (0, $4AOtR$useState)(0);\n let context = (0, $4AOtR$useMemo)(()=>({\n parent: parent,\n modalCount: modalCount,\n addModal () {\n setModalCount((count)=>count + 1);\n if (parent) parent.addModal();\n },\n removeModal () {\n setModalCount((count)=>count - 1);\n if (parent) parent.removeModal();\n }\n }), [\n parent,\n modalCount\n ]);\n return /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$var$Context.Provider, {\n value: context\n }, children);\n}\nfunction $f57aed4a881a3485$export$d9aaed4c3ece1bc0() {\n let context = (0, $4AOtR$useContext)($f57aed4a881a3485$var$Context);\n return {\n modalProviderProps: {\n 'aria-hidden': context && context.modalCount > 0 ? true : undefined\n }\n };\n}\n/**\n * Creates a root node that will be aria-hidden if there are other modals open.\n */ function $f57aed4a881a3485$var$OverlayContainerDOM(props) {\n let { modalProviderProps: modalProviderProps } = $f57aed4a881a3485$export$d9aaed4c3ece1bc0();\n return /*#__PURE__*/ (0, $4AOtR$react).createElement(\"div\", {\n \"data-overlay-container\": true,\n ...props,\n ...modalProviderProps\n });\n}\nfunction $f57aed4a881a3485$export$bf688221f59024e5(props) {\n return /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$export$178405afcd8c5eb, null, /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$var$OverlayContainerDOM, props));\n}\nfunction $f57aed4a881a3485$export$b47c3594eab58386(props) {\n let isSSR = (0, $4AOtR$useIsSSR)();\n let { portalContainer: portalContainer = isSSR ? null : document.body, ...rest } = props;\n let { getContainer: getContainer } = (0, $96b38030c423d352$export$9fc1347d4195ccb3)();\n if (!props.portalContainer && getContainer) portalContainer = getContainer();\n (0, $4AOtR$react).useEffect(()=>{\n if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest('[data-overlay-container]')) throw new Error('An OverlayContainer must not be inside another container. Please change the portalContainer prop.');\n }, [\n portalContainer\n ]);\n if (!portalContainer) return null;\n let contents = /*#__PURE__*/ (0, $4AOtR$react).createElement($f57aed4a881a3485$export$bf688221f59024e5, rest);\n return /*#__PURE__*/ (0, $4AOtR$reactdom).createPortal(contents, portalContainer);\n}\nfunction $f57aed4a881a3485$export$33ffd74ebf07f060(options) {\n // Add aria-hidden to all parent providers on mount, and restore on unmount.\n let context = (0, $4AOtR$useContext)($f57aed4a881a3485$var$Context);\n if (!context) throw new Error('Modal is not contained within a provider');\n (0, $4AOtR$useEffect)(()=>{\n if ((options === null || options === void 0 ? void 0 : options.isDisabled) || !context || !context.parent) return;\n // The immediate context is from the provider containing this modal, so we only\n // want to trigger aria-hidden on its parents not on the modal provider itself.\n context.parent.addModal();\n return ()=>{\n if (context && context.parent) context.parent.removeModal();\n };\n }, [\n context,\n context.parent,\n options === null || options === void 0 ? void 0 : options.isDisabled\n ]);\n return {\n modalProps: {\n 'data-ismodal': !(options === null || options === void 0 ? void 0 : options.isDisabled)\n }\n };\n}\n\n\nexport {$f57aed4a881a3485$export$178405afcd8c5eb as ModalProvider, $f57aed4a881a3485$export$d9aaed4c3ece1bc0 as useModalProvider, $f57aed4a881a3485$export$bf688221f59024e5 as OverlayProvider, $f57aed4a881a3485$export$b47c3594eab58386 as OverlayContainer, $f57aed4a881a3485$export$33ffd74ebf07f060 as useModal};\n//# sourceMappingURL=useModal.module.js.map\n","import {filterDOMProps as $kwmr2$filterDOMProps, mergeProps as $kwmr2$mergeProps} from \"@react-aria/utils\";\nimport {useHover as $kwmr2$useHover} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $326e436e94273fe1$export$1c4b08e0eca38426(props, state) {\n let domProps = (0, $kwmr2$filterDOMProps)(props, {\n labelable: true\n });\n let { hoverProps: hoverProps } = (0, $kwmr2$useHover)({\n onHoverStart: ()=>state === null || state === void 0 ? void 0 : state.open(true),\n onHoverEnd: ()=>state === null || state === void 0 ? void 0 : state.close()\n });\n return {\n tooltipProps: (0, $kwmr2$mergeProps)(domProps, hoverProps, {\n role: 'tooltip'\n })\n };\n}\n\n\nexport {$326e436e94273fe1$export$1c4b08e0eca38426 as useTooltip};\n//# sourceMappingURL=useTooltip.module.js.map\n","import {getInteractionModality as $6VwSn$getInteractionModality, isFocusVisible as $6VwSn$isFocusVisible, useHover as $6VwSn$useHover, useFocusable as $6VwSn$useFocusable} from \"@react-aria/interactions\";\nimport {useId as $6VwSn$useId, mergeProps as $6VwSn$mergeProps} from \"@react-aria/utils\";\nimport {useRef as $6VwSn$useRef, useEffect as $6VwSn$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nfunction $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {\n let { isDisabled: isDisabled, trigger: trigger } = props;\n let tooltipId = (0, $6VwSn$useId)();\n let isHovered = (0, $6VwSn$useRef)(false);\n let isFocused = (0, $6VwSn$useRef)(false);\n let handleShow = ()=>{\n if (isHovered.current || isFocused.current) state.open(isFocused.current);\n };\n let handleHide = (immediate)=>{\n if (!isHovered.current && !isFocused.current) state.close(immediate);\n };\n (0, $6VwSn$useEffect)(()=>{\n let onKeyDown = (e)=>{\n if (ref && ref.current) // Escape after clicking something can give it keyboard focus\n // dismiss tooltip on esc key press\n {\n if (e.key === 'Escape') {\n e.stopPropagation();\n state.close(true);\n }\n }\n };\n if (state.isOpen) {\n document.addEventListener('keydown', onKeyDown, true);\n return ()=>{\n document.removeEventListener('keydown', onKeyDown, true);\n };\n }\n }, [\n ref,\n state\n ]);\n let onHoverStart = ()=>{\n if (trigger === 'focus') return;\n // In chrome, if you hover a trigger, then another element obscures it, due to keyboard\n // interactions for example, hover will end. When hover is restored after that element disappears,\n // focus moves on for example, then the tooltip will reopen. We check the modality to know if the hover\n // is the result of moving the mouse.\n if ((0, $6VwSn$getInteractionModality)() === 'pointer') isHovered.current = true;\n else isHovered.current = false;\n handleShow();\n };\n let onHoverEnd = ()=>{\n if (trigger === 'focus') return;\n // no matter how the trigger is left, we should close the tooltip\n isFocused.current = false;\n isHovered.current = false;\n handleHide();\n };\n let onPressStart = ()=>{\n // no matter how the trigger is pressed, we should close the tooltip\n isFocused.current = false;\n isHovered.current = false;\n handleHide(true);\n };\n let onFocus = ()=>{\n let isVisible = (0, $6VwSn$isFocusVisible)();\n if (isVisible) {\n isFocused.current = true;\n handleShow();\n }\n };\n let onBlur = ()=>{\n isFocused.current = false;\n isHovered.current = false;\n handleHide(true);\n };\n let { hoverProps: hoverProps } = (0, $6VwSn$useHover)({\n isDisabled: isDisabled,\n onHoverStart: onHoverStart,\n onHoverEnd: onHoverEnd\n });\n let { focusableProps: focusableProps } = (0, $6VwSn$useFocusable)({\n isDisabled: isDisabled,\n onFocus: onFocus,\n onBlur: onBlur\n }, ref);\n return {\n triggerProps: {\n 'aria-describedby': state.isOpen ? tooltipId : undefined,\n ...(0, $6VwSn$mergeProps)(focusableProps, hoverProps, {\n onPointerDown: onPressStart,\n onKeyDown: onPressStart\n }),\n tabIndex: undefined\n },\n tooltipProps: {\n id: tooltipId\n }\n };\n}\n\n\nexport {$4e1b34546679e357$export$a6da6c504e4bba8b as useTooltipTrigger};\n//# sourceMappingURL=useTooltipTrigger.module.js.map\n","import {useMemo as $50cCT$useMemo, useRef as $50cCT$useRef, useEffect as $50cCT$useEffect} from \"react\";\nimport {useOverlayTriggerState as $50cCT$useOverlayTriggerState} from \"@react-stately/overlays\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nconst $8796f90736e175cb$var$TOOLTIP_DELAY = 1500; // this seems to be a 1.5 second delay, check with design\nconst $8796f90736e175cb$var$TOOLTIP_COOLDOWN = 500;\nlet $8796f90736e175cb$var$tooltips = {};\nlet $8796f90736e175cb$var$tooltipId = 0;\nlet $8796f90736e175cb$var$globalWarmedUp = false;\nlet $8796f90736e175cb$var$globalWarmUpTimeout = null;\nlet $8796f90736e175cb$var$globalCooldownTimeout = null;\nfunction $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {\n let { delay: delay = $8796f90736e175cb$var$TOOLTIP_DELAY, closeDelay: closeDelay = $8796f90736e175cb$var$TOOLTIP_COOLDOWN } = props;\n let { isOpen: isOpen, open: open, close: close } = (0, $50cCT$useOverlayTriggerState)(props);\n let id = (0, $50cCT$useMemo)(()=>`${++$8796f90736e175cb$var$tooltipId}`, []);\n let closeTimeout = (0, $50cCT$useRef)(null);\n let closeCallback = (0, $50cCT$useRef)(close);\n let ensureTooltipEntry = ()=>{\n $8796f90736e175cb$var$tooltips[id] = hideTooltip;\n };\n let closeOpenTooltips = ()=>{\n for(let hideTooltipId in $8796f90736e175cb$var$tooltips)if (hideTooltipId !== id) {\n $8796f90736e175cb$var$tooltips[hideTooltipId](true);\n delete $8796f90736e175cb$var$tooltips[hideTooltipId];\n }\n };\n let showTooltip = ()=>{\n if (closeTimeout.current) clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeOpenTooltips();\n ensureTooltipEntry();\n $8796f90736e175cb$var$globalWarmedUp = true;\n open();\n if ($8796f90736e175cb$var$globalWarmUpTimeout) {\n clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);\n $8796f90736e175cb$var$globalWarmUpTimeout = null;\n }\n if ($8796f90736e175cb$var$globalCooldownTimeout) {\n clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);\n $8796f90736e175cb$var$globalCooldownTimeout = null;\n }\n };\n let hideTooltip = (immediate)=>{\n if (immediate || closeDelay <= 0) {\n if (closeTimeout.current) clearTimeout(closeTimeout.current);\n closeTimeout.current = null;\n closeCallback.current();\n } else if (!closeTimeout.current) closeTimeout.current = setTimeout(()=>{\n closeTimeout.current = null;\n closeCallback.current();\n }, closeDelay);\n if ($8796f90736e175cb$var$globalWarmUpTimeout) {\n clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);\n $8796f90736e175cb$var$globalWarmUpTimeout = null;\n }\n if ($8796f90736e175cb$var$globalWarmedUp) {\n if ($8796f90736e175cb$var$globalCooldownTimeout) clearTimeout($8796f90736e175cb$var$globalCooldownTimeout);\n $8796f90736e175cb$var$globalCooldownTimeout = setTimeout(()=>{\n delete $8796f90736e175cb$var$tooltips[id];\n $8796f90736e175cb$var$globalCooldownTimeout = null;\n $8796f90736e175cb$var$globalWarmedUp = false;\n }, Math.max($8796f90736e175cb$var$TOOLTIP_COOLDOWN, closeDelay));\n }\n };\n let warmupTooltip = ()=>{\n closeOpenTooltips();\n ensureTooltipEntry();\n if (!isOpen && !$8796f90736e175cb$var$globalWarmUpTimeout && !$8796f90736e175cb$var$globalWarmedUp) $8796f90736e175cb$var$globalWarmUpTimeout = setTimeout(()=>{\n $8796f90736e175cb$var$globalWarmUpTimeout = null;\n $8796f90736e175cb$var$globalWarmedUp = true;\n showTooltip();\n }, delay);\n else if (!isOpen) showTooltip();\n };\n (0, $50cCT$useEffect)(()=>{\n closeCallback.current = close;\n }, [\n close\n ]);\n (0, $50cCT$useEffect)(()=>{\n return ()=>{\n if (closeTimeout.current) clearTimeout(closeTimeout.current);\n let tooltip = $8796f90736e175cb$var$tooltips[id];\n if (tooltip) delete $8796f90736e175cb$var$tooltips[id];\n };\n }, [\n id\n ]);\n return {\n isOpen: isOpen,\n open: (immediate)=>{\n if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();\n else showTooltip();\n },\n close: hideTooltip\n };\n}\n\n\nexport {$8796f90736e175cb$export$4d40659c25ecb50b as useTooltipTriggerState};\n//# sourceMappingURL=useTooltipTriggerState.module.js.map\n","import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {OverlayArrowContext as $44f671af83e7d9e0$export$2de4954e8ae13b9f} from \"./OverlayArrow.mjs\";\nimport {useTooltipTrigger as $cCslV$useTooltipTrigger, OverlayContainer as $cCslV$OverlayContainer, useOverlayPosition as $cCslV$useOverlayPosition, mergeProps as $cCslV$mergeProps, useTooltip as $cCslV$useTooltip} from \"react-aria\";\nimport {useExitAnimation as $cCslV$useExitAnimation, useEnterAnimation as $cCslV$useEnterAnimation, filterDOMProps as $cCslV$filterDOMProps} from \"@react-aria/utils\";\nimport {FocusableProvider as $cCslV$FocusableProvider} from \"@react-aria/focus\";\nimport {useTooltipTriggerState as $cCslV$useTooltipTriggerState} from \"react-stately\";\nimport $cCslV$react, {createContext as $cCslV$createContext, useRef as $cCslV$useRef, forwardRef as $cCslV$forwardRef, useContext as $cCslV$useContext} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\nconst $4e3b923658d69c60$export$7a7623236eec67fa = /*#__PURE__*/ (0, $cCslV$createContext)(null);\nconst $4e3b923658d69c60$export$39ae08fa83328b12 = /*#__PURE__*/ (0, $cCslV$createContext)(null);\nfunction $4e3b923658d69c60$export$8c610744efcf8a1d(props) {\n let state = (0, $cCslV$useTooltipTriggerState)(props);\n let ref = (0, $cCslV$useRef)(null);\n let { triggerProps: triggerProps, tooltipProps: tooltipProps } = (0, $cCslV$useTooltipTrigger)(props, state, ref);\n return /*#__PURE__*/ (0, $cCslV$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n $4e3b923658d69c60$export$7a7623236eec67fa,\n state\n ],\n [\n $4e3b923658d69c60$export$39ae08fa83328b12,\n {\n ...tooltipProps,\n triggerRef: ref\n }\n ]\n ]\n }, /*#__PURE__*/ (0, $cCslV$react).createElement((0, $cCslV$FocusableProvider), {\n ...triggerProps,\n ref: ref\n }, props.children));\n}\nconst $4e3b923658d69c60$export$28c660c63b792dea = /*#__PURE__*/ (0, $cCslV$forwardRef)(function Tooltip({ UNSTABLE_portalContainer: UNSTABLE_portalContainer, ...props }, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $4e3b923658d69c60$export$39ae08fa83328b12);\n let contextState = (0, $cCslV$useContext)($4e3b923658d69c60$export$7a7623236eec67fa);\n let localState = (0, $cCslV$useTooltipTriggerState)(props);\n let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;\n let isExiting = (0, $cCslV$useExitAnimation)(ref, state.isOpen) || props.isExiting || false;\n if (!state.isOpen && !isExiting) return null;\n return /*#__PURE__*/ (0, $cCslV$react).createElement((0, $cCslV$OverlayContainer), {\n portalContainer: UNSTABLE_portalContainer\n }, /*#__PURE__*/ (0, $cCslV$react).createElement($4e3b923658d69c60$var$TooltipInner, {\n ...props,\n tooltipRef: ref,\n isExiting: isExiting\n }));\n});\nfunction $4e3b923658d69c60$var$TooltipInner(props) {\n let state = (0, $cCslV$useContext)($4e3b923658d69c60$export$7a7623236eec67fa);\n let arrowRef = (0, $cCslV$useRef)(null);\n let { overlayProps: overlayProps, arrowProps: arrowProps, placement: placement, triggerAnchorPoint: triggerAnchorPoint } = (0, $cCslV$useOverlayPosition)({\n placement: props.placement || 'top',\n targetRef: props.triggerRef,\n overlayRef: props.tooltipRef,\n arrowRef: arrowRef,\n offset: props.offset,\n crossOffset: props.crossOffset,\n isOpen: state.isOpen,\n arrowBoundaryOffset: props.arrowBoundaryOffset,\n shouldFlip: props.shouldFlip,\n containerPadding: props.containerPadding,\n onClose: ()=>state.close(true)\n });\n let isEntering = (0, $cCslV$useEnterAnimation)(props.tooltipRef, !!placement) || props.isEntering || false;\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-Tooltip',\n values: {\n placement: placement,\n isEntering: isEntering,\n isExiting: props.isExiting,\n state: state\n }\n });\n props = (0, $cCslV$mergeProps)(props, overlayProps);\n let { tooltipProps: tooltipProps } = (0, $cCslV$useTooltip)(props, state);\n let DOMProps = (0, $cCslV$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $cCslV$react).createElement(\"div\", {\n ...(0, $cCslV$mergeProps)(DOMProps, renderProps, tooltipProps),\n ref: props.tooltipRef,\n style: {\n ...overlayProps.style,\n '--trigger-anchor-point': triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : undefined,\n ...renderProps.style\n },\n \"data-placement\": placement !== null && placement !== void 0 ? placement : undefined,\n \"data-entering\": isEntering || undefined,\n \"data-exiting\": props.isExiting || undefined\n }, /*#__PURE__*/ (0, $cCslV$react).createElement((0, $44f671af83e7d9e0$export$2de4954e8ae13b9f).Provider, {\n value: {\n ...arrowProps,\n placement: placement,\n ref: arrowRef\n }\n }, renderProps.children));\n}\n\n\nexport {$4e3b923658d69c60$export$7a7623236eec67fa as TooltipTriggerStateContext, $4e3b923658d69c60$export$39ae08fa83328b12 as TooltipContext, $4e3b923658d69c60$export$8c610744efcf8a1d as TooltipTrigger, $4e3b923658d69c60$export$28c660c63b792dea as Tooltip};\n//# sourceMappingURL=Tooltip.module.js.map\n","import React from \"react\";\nimport { TooltipTrigger } from \"react-aria-components\";\nimport type { TooltipTriggerComponentProps } from \"react-aria-components\";\n\n/**\n * # Tooltip\n *\n * A contextual popup that displays a description for an element.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/tooltip}\n */\nexport function TooltipRoot({\n // Match delays to current ui-kit tooltip\n delay = 300,\n closeDelay = 200,\n ...props\n}: TooltipTriggerComponentProps) {\n // Note: In React 19, ref forwarding is automatic for function components\n // The ref should be placed on the trigger element directly when needed\n return <TooltipTrigger delay={delay} closeDelay={closeDelay} {...props} />;\n}\n\nTooltipRoot.displayName = \"Tooltip.Root\";\n","import { createRecipeContext } from \"@chakra-ui/react\";\n\nimport type { TooltipRootSlotProps } from \"./tooltip.types\";\nimport type { SlotComponent } from \"@/utils/slot-types\";\n\nconst { withContext } = createRecipeContext({ key: \"tooltip\" });\n\n/**\n * Root component that provides the styling context for the Tooltip component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const TooltipRootSlot: SlotComponent<\n HTMLDivElement,\n TooltipRootSlotProps\n> = withContext<HTMLDivElement, TooltipRootSlotProps>(\"div\");\n","import { Tooltip as RATooltip } from \"react-aria-components\";\nimport { TooltipRootSlot } from \"../tooltip.slots\";\nimport type { TooltipProps } from \"../tooltip.types\";\n\n/**\n * TooltipContent\n * ============================================================\n * A contextual popup that displays a description for an element, uses `Tooltip` component from `react-aria-components`.\n *\n * Features:\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLDivElement' attributes (including aria- & data-attributes)\n * - allows overriding styles by using style-props\n *\n * Further Context:\n * - [React Aria Components Tooltip Documentation](https://react-spectrum.adobe.com/react-aria/Tooltip.html)\n * - [ARIA Tooltip Pattern](https://www.w3.org/TR/wai-aria-1.2/#tooltip)\n */\nexport function TooltipContent({\n children,\n placement = \"bottom\",\n ref,\n ...props\n}: TooltipProps & { ref?: React.Ref<HTMLDivElement> }) {\n return (\n <TooltipRootSlot ref={ref} asChild {...props}>\n <RATooltip placement={placement} {...props}>\n {children}\n </RATooltip>\n </TooltipRootSlot>\n );\n}\n\nTooltipContent.displayName = \"Tooltip.Content\";\n","import { TooltipRoot } from \"./components/tooltip.root\";\nimport { TooltipContent } from \"./components/tooltip.content\";\n\n// Exports for internal use by react-docgen\nexport { TooltipRoot as _TooltipRoot, TooltipContent as _TooltipContent };\n\n// Export compound component object\nexport const Tooltip = {\n Root: TooltipRoot,\n Content: TooltipContent,\n};\n"],"names":["$f57aed4a881a3485$var$Context","$4AOtR$react","$f57aed4a881a3485$export$178405afcd8c5eb","props","children","parent","$4AOtR$useContext","modalCount","setModalCount","$4AOtR$useState","context","$4AOtR$useMemo","count","$f57aed4a881a3485$export$d9aaed4c3ece1bc0","$f57aed4a881a3485$var$OverlayContainerDOM","modalProviderProps","$f57aed4a881a3485$export$bf688221f59024e5","$f57aed4a881a3485$export$b47c3594eab58386","isSSR","$4AOtR$useIsSSR","portalContainer","rest","getContainer","$96b38030c423d352$export$9fc1347d4195ccb3","contents","$4AOtR$reactdom","$326e436e94273fe1$export$1c4b08e0eca38426","state","domProps","$kwmr2$filterDOMProps","hoverProps","$kwmr2$useHover","$kwmr2$mergeProps","$4e1b34546679e357$export$a6da6c504e4bba8b","ref","isDisabled","trigger","tooltipId","$6VwSn$useId","isHovered","$6VwSn$useRef","isFocused","handleShow","handleHide","immediate","$6VwSn$useEffect","onKeyDown","e","onHoverStart","$6VwSn$getInteractionModality","onHoverEnd","onPressStart","onFocus","$6VwSn$isFocusVisible","onBlur","$6VwSn$useHover","focusableProps","$6VwSn$useFocusable","$6VwSn$mergeProps","$8796f90736e175cb$var$TOOLTIP_DELAY","$8796f90736e175cb$var$TOOLTIP_COOLDOWN","$8796f90736e175cb$var$tooltips","$8796f90736e175cb$var$tooltipId","$8796f90736e175cb$var$globalWarmedUp","$8796f90736e175cb$var$globalWarmUpTimeout","$8796f90736e175cb$var$globalCooldownTimeout","$8796f90736e175cb$export$4d40659c25ecb50b","delay","closeDelay","isOpen","open","close","$50cCT$useOverlayTriggerState","id","$50cCT$useMemo","closeTimeout","$50cCT$useRef","closeCallback","ensureTooltipEntry","hideTooltip","closeOpenTooltips","hideTooltipId","showTooltip","warmupTooltip","$50cCT$useEffect","$4e3b923658d69c60$export$7a7623236eec67fa","$cCslV$createContext","$4e3b923658d69c60$export$39ae08fa83328b12","$4e3b923658d69c60$export$8c610744efcf8a1d","$cCslV$useTooltipTriggerState","$cCslV$useRef","triggerProps","tooltipProps","$cCslV$useTooltipTrigger","$cCslV$react","$64fa3d84918910a7$export$2881499e37b75b9a","$cCslV$FocusableProvider","$4e3b923658d69c60$export$28c660c63b792dea","$cCslV$forwardRef","UNSTABLE_portalContainer","$64fa3d84918910a7$export$29f1550f4b0d4415","contextState","$cCslV$useContext","localState","isExiting","$cCslV$useExitAnimation","$cCslV$OverlayContainer","$4e3b923658d69c60$var$TooltipInner","arrowRef","overlayProps","arrowProps","placement","triggerAnchorPoint","$cCslV$useOverlayPosition","isEntering","$cCslV$useEnterAnimation","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","$cCslV$mergeProps","$cCslV$useTooltip","DOMProps","$cCslV$filterDOMProps","$44f671af83e7d9e0$export$2de4954e8ae13b9f","TooltipRoot","jsx","TooltipTrigger","withContext","createRecipeContext","TooltipRootSlot","TooltipContent","RATooltip","Tooltip"],"mappings":";;;;;;;;;;;;AAmBA,MAAMA,IAAkDC,gBAAAA,EAAc,cAAc,IAAI;AACxF,SAASC,GAAyCC,GAAO;AACrD,MAAI,EAAE,UAAUC,EAAQ,IAAKD,GACzBE,IAAaC,EAAmBN,CAA6B,GAC7D,CAACO,GAAYC,CAAa,IAAQC,EAAiB,CAAC,GACpDC,IAAcC,EAAgB,OAAK;AAAA,IAC/B,QAAQN;AAAA,IACR,YAAYE;AAAA,IACZ,WAAY;AACR,MAAAC,EAAc,CAACI,MAAQA,IAAQ,CAAC,GAC5BP,KAAQA,EAAO,SAAQ;A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AgB,KAAA9F,GAAU,SAAO,IAAE,GAAG/B,GACrC,UAAA,gBAAAyH,EAACM,IAAA,EAAU,WAAAnB,GAAuB,GAAG5G,GAClC,UAAAC,GACH,GACF;AAEJ;AAEA6H,EAAe,cAAc;AC1BtB,MAAME,KAAU;AAAA,EACrB,MAAMR;AAAA,EACN,SAASM;AACX;","x_google_ignoreList":[0,1,2,3,4]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const ae=require("./chunks/index-CRFg4Mhx.cjs.js"),Q=require("./chunks/rich-text-input-Da5WFZ3l.cjs.js"),m=require("react"),ie=require("./chunks/avatar-_o-uSXYy.cjs.js"),ue=require("./chunks/box-CWni3A32.cjs.js"),ce=require("./chunks/button-B5OOW-2z.cjs.js"),le=require("./chunks/code-q31e3vT2.cjs.js"),x=require("./chunks/combobox-B5UxZWSX.cjs.js"),se=require("./chunks/dialog-CKwC3dk3.cjs.js"),Y=require("./chunks/field-errors-D2re_C_c.cjs.js"),Dt=require("@chakra-ui/react/flex"),de=require("./chunks/group-BqUFlw5R.cjs.js"),pe=require("./chunks/heading-BTacGwo9.cjs.js"),me=require("./chunks/icon-button-vWPrT-bR.cjs.js"),fe=require("./chunks/icon-toggle-button-eLrsWehe.cjs.js"),ge=require("./chunks/image-CGOYoc2s.cjs.js"),be=require("./chunks/kbd-BaeV_DL-.cjs.js"),ye=require("./chunks/link-DpU4rPCp.cjs.js"),E=require("./chunks/list-DJC9BmoC.cjs.js"),A=require("./chunks/draggable-list-MGvr5-A-.cjs.js"),Ce=require("./chunks/simple-grid-Cd2MJxSX.cjs.js"),Rt=require("@chakra-ui/react/table"),Te=require("./chunks/text-CCW9kDT_.cjs.js"),G=require("./chunks/tooltip-BPTOkK7W.cjs.js"),he=require("./chunks/make-element-focusable-oedzOY_M.cjs.js"),Z=require("./chunks/nimbus-provider-WX_qUCxo.cjs.js"),ve=require("./chunks/checkbox-Dod-yTj4.cjs.js"),qe=require("./chunks/collapsible-motion-C7M_CLNI.cjs.js"),Se=require("./chunks/stack-CIN13EDn.cjs.js"),we=require("./chunks/visually-hidden-tTYCAVoQ.cjs.js"),Ie=require("./chunks/text-input-DZdkCbdd.cjs.js"),De=require("./chunks/number-input-wMW-o4di.cjs.js"),Re=require("./chunks/grid-Chuw1xje.cjs.js"),k=require("./chunks/select-DMsU6bk9.cjs.js"),_e=require("./chunks/separator-CvRn_J0r.cjs.js"),ke=require("./chunks/spacer-BvQD2vU1.cjs.js"),D=require("./chunks/accordion-B2FLWAh5.cjs.js"),R=require("./chunks/alert-CPHjPe4-.cjs.js"),Le=require("./chunks/badge-mMpNb3Qj.cjs.js"),F=require("./chunks/card-BPEsGx1J.cjs.js"),w=require("./chunks/form-field-CIGQxVVS.cjs.js"),xe=require("./chunks/icon-D39U--jA.cjs.js"),Ee=require("./chunks/inline-svg-Yb2OyzRw.cjs.js"),Ae=require("./chunks/loading-spinner-DQM-6XnY.cjs.js"),Fe=require("./chunks/password-input-6SMjhXSO.cjs.js"),Be=require("./chunks/search-input-BefkmgPy.cjs.js"),Me=require("./chunks/split-button-BO52sL7h.cjs.js"),Pe=require("./chunks/time-input-zXykDANk.cjs.js"),Oe=require("./chunks/multiline-text-input-B9TBDieZ.cjs.js"),Ke=require("./chunks/money-input-Cu_J86Eu.cjs.js"),H=require("./chunks/radio-input-Dp05SXja.cjs.js"),Ge=require("./chunks/switch-CdLhBEPq.cjs.js"),He=require("./chunks/tag-group-Btt0egzG.cjs.js"),Ne=require("./chunks/toggle-button-DxMZsem4.cjs.js"),N=require("./chunks/toggle-button-group-CE2Urvj8.cjs.js"),Ue=require("./chunks/date-input-DvOM0DLT.cjs.js"),je=require("./chunks/calendar-V0KeNCQ3.cjs.js"),Ve=require("./chunks/date-picker-CZAoPNsT.cjs.js"),ze=require("./chunks/progress-bar-Bhp7W6Eo.cjs.js"),$e=require("./chunks/range-calendar-_dZfAsdG.cjs.js"),q=require("./chunks/menu-DIepV2KZ.cjs.js"),We=require("./chunks/date-range-picker-iENzosfN.cjs.js"),Xe=require("./chunks/toolbar-DV0l5MqA.cjs.js"),b=require("./chunks/data-table-C51WU0Cc.cjs.js"),Qe=require("./chunks/pagination-BWdg8s6g.cjs.js"),Ye=require("./chunks/drawer-DzW9wBMk.cjs.js"),_=require("./chunks/tabs-CJ0OAUSR.cjs.js"),Ze=require("./chunks/localized-field-C7Vribb2.cjs.js");require("react/jsx-runtime");const J=["shift","alt","meta","mod","ctrl","control"],Je={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function I(e){return(Je[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function ee(e){return J.includes(e)}function M(e,t=","){return e.toLowerCase().split(t)}function P(e,t="+",o=">",i=!1,u){let n=[],a=!1;e=e.trim(),e.includes(o)?(a=!0,n=e.toLocaleLowerCase().split(o).map(g=>I(g))):n=e.toLocaleLowerCase().split(t).map(g=>I(g));const d={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod"),useKey:i},l=n.filter(g=>!J.includes(g));return{...d,keys:l,description:u,isSequence:a,hotkey:e}}const S=new Set;function U(e){return Array.isArray(e)}function et(e,t=","){return(U(e)?e:e.split(t)).every(o=>S.has(o.trim().toLowerCase()))}function tt(e){const t=Array.isArray(e)?e:[e];S.has("meta")&&S.forEach(o=>!ee(o)&&S.delete(o.toLowerCase())),t.forEach(o=>S.add(o.toLowerCase()))}function ot(e){const t=Array.isArray(e)?e:[e];e==="meta"?S.clear():t.forEach(o=>S.delete(o.toLowerCase()))}function rt(e,t,o){(typeof o=="function"&&o(e,t)||o===!0)&&e.preventDefault()}function nt(e,t,o){return typeof o=="function"?o(e,t):o===!0||o===void 0}const at=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function it(e){return te(e,at)}function te(e,t=!1){const{target:o,composed:i}=e;let u,n;return ut(o)&&i?(u=e.composedPath()[0]&&e.composedPath()[0].tagName,n=e.composedPath()[0]&&e.composedPath()[0].role):(u=o&&o.tagName,n=o&&o.role),U(t)?!!(u&&t&&t.some(a=>a.toLowerCase()===u.toLowerCase()||a===n)):!!(u&&t&&t)}function ut(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function ct(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(o=>t.includes(o))||e.includes("*"):!0}const lt=(e,t,o=!1)=>{const{alt:i,meta:u,mod:n,shift:a,ctrl:d,keys:l,useKey:g}=t,{code:y,key:r,ctrlKey:s,metaKey:C,shiftKey:T,altKey:p}=e,f=I(y);if(g&&l?.length===1&&l.includes(r))return!0;if(!l?.includes(f)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(f))return!1;if(!o){if(i!==p&&f!=="alt"||a!==T&&f!=="shift")return!1;if(n){if(!C&&!s)return!1}else if(u!==C&&f!=="meta"&&f!=="os"||d!==s&&f!=="ctrl"&&f!=="control")return!1}return l&&l.length===1&&l.includes(f)?!0:l?et(l):!l},st=m.createContext(void 0),dt=()=>m.useContext(st);function oe(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((o,i)=>o&&oe(e[i],t[i]),!0):e===t}const pt=m.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),mt=()=>m.useContext(pt);function ft(e){const t=m.useRef(void 0);return oe(t.current,e)||(t.current=e),t.current}const $=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},gt=typeof window<"u"?m.useLayoutEffect:m.useEffect;function bt(e,t,o,i){const u=m.useRef(null),n=m.useRef(!1),a=Array.isArray(o)?Array.isArray(i)?void 0:i:o,d=U(e)?e.join(a?.delimiter):e,l=Array.isArray(o)?o:Array.isArray(i)?i:void 0,g=m.useCallback(t,l??[]),y=m.useRef(g);l?y.current=g:y.current=t;const r=ft(a),{activeScopes:s}=mt(),C=dt();return gt(()=>{if(r?.enabled===!1||!ct(s,r?.scopes))return;let T=[],p;const f=(c,z=!1)=>{if(!(it(c)&&!te(c,r?.enableOnFormTags))){if(u.current!==null){const v=u.current.getRootNode();if((v instanceof Document||v instanceof ShadowRoot)&&v.activeElement!==u.current&&!u.current.contains(v.activeElement)){$(c);return}}c.target?.isContentEditable&&!r?.enableOnContentEditable||M(d,r?.delimiter).forEach(v=>{if(v.includes(r?.splitKey??"+")&&v.includes(r?.sequenceSplitKey??">")){console.warn(`Hotkey ${v} contains both ${r?.splitKey??"+"} and ${r?.sequenceSplitKey??">"} which is not supported.`);return}const h=P(v,r?.splitKey,r?.sequenceSplitKey,r?.useKey,r?.description);if(h.isSequence){p=setTimeout(()=>{T=[]},r?.sequenceTimeoutMs??1e3);const B=h.useKey?c.key:I(c.code);if(ee(B.toLowerCase()))return;T.push(B);const ne=h.keys?.[T.length-1];if(B!==ne){T=[],p&&clearTimeout(p);return}T.length===h.keys?.length&&(y.current(c,h),p&&clearTimeout(p),T=[])}else if(lt(c,h,r?.ignoreModifiers)||h.keys?.includes("*")){if(r?.ignoreEventWhen?.(c)||z&&n.current)return;if(rt(c,h,r?.preventDefault),!nt(c,h,r?.enabled)){$(c);return}y.current(c,h),z||(n.current=!0)}})}},j=c=>{c.code!==void 0&&(tt(I(c.code)),(r?.keydown===void 0&&r?.keyup!==!0||r?.keydown)&&f(c))},V=c=>{c.code!==void 0&&(ot(I(c.code)),n.current=!1,r?.keyup&&f(c,!0))},L=u.current||a?.document||document;return L.addEventListener("keyup",V,a?.eventListenerOptions),L.addEventListener("keydown",j,a?.eventListenerOptions),C&&M(d,r?.delimiter).forEach(c=>C.addHotkey(P(c,r?.splitKey,r?.sequenceSplitKey,r?.useKey,r?.description))),()=>{L.removeEventListener("keyup",V,a?.eventListenerOptions),L.removeEventListener("keydown",j,a?.eventListenerOptions),C&&M(d,r?.delimiter).forEach(c=>C.removeHotkey(P(c,r?.splitKey,r?.sequenceSplitKey,r?.useKey,r?.description))),T=[],p&&clearTimeout(p)}},[d,r,s]),u}function yt(){var e=m.useRef(!1),t=m.useCallback(function(){return e.current},[]);return m.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}var Ct=function(e){e===void 0&&(e={});var t=m.useState(e),o=t[0],i=t[1],u=m.useCallback(function(n){i(function(a){return Object.assign({},a,n instanceof Function?n(a):n)})},[]);return[o,u]},O,W;function Tt(){return W||(W=1,O=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],i=0;i<e.rangeCount;i++)o.push(e.getRangeAt(i));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||o.forEach(function(u){e.addRange(u)}),t&&t.focus()}}),O}var K,X;function ht(){if(X)return K;X=1;var e=Tt(),t={"text/plain":"Text","text/html":"Url",default:"Text"},o="Copy to clipboard: #{key}, Enter";function i(n){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return n.replace(/#{\s*key\s*}/g,a)}function u(n,a){var d,l,g,y,r,s,C=!1;a||(a={}),d=a.debug||!1;try{g=e(),y=document.createRange(),r=document.getSelection(),s=document.createElement("span"),s.textContent=n,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(p){if(p.stopPropagation(),a.format)if(p.preventDefault(),typeof p.clipboardData>"u"){d&&console.warn("unable to use e.clipboardData"),d&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=t[a.format]||t.default;window.clipboardData.setData(f,n)}else p.clipboardData.clearData(),p.clipboardData.setData(a.format,n);a.onCopy&&(p.preventDefault(),a.onCopy(p.clipboardData))}),document.body.appendChild(s),y.selectNodeContents(s),r.addRange(y);var T=document.execCommand("copy");if(!T)throw new Error("copy command was unsuccessful");C=!0}catch(p){d&&console.error("unable to copy using execCommand: ",p),d&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",n),a.onCopy&&a.onCopy(window.clipboardData),C=!0}catch(f){d&&console.error("unable to copy using clipboardData: ",f),d&&console.error("falling back to prompt"),l=i("message"in a?a.message:o),window.prompt(l,n)}}finally{r&&(typeof r.removeRange=="function"?r.removeRange(y):r.removeAllRanges()),s&&document.body.removeChild(s),g()}return C}return K=u,K}var vt=ht();const qt=Q.getDefaultExportFromCjs(vt);var St=function(){var e=yt(),t=Ct({value:void 0,error:void 0,noUserInteraction:!0}),o=t[0],i=t[1],u=m.useCallback(function(n){if(e()){var a,d;try{if(typeof n!="string"&&typeof n!="number"){var l=new Error("Cannot copy typeof "+typeof n+" to clipboard, must be a string");process.env.NODE_ENV==="development"&&console.error(l),i({value:n,error:l,noUserInteraction:!0});return}else if(n===""){var l=new Error("Cannot copy empty string to clipboard.");process.env.NODE_ENV==="development"&&console.error(l),i({value:n,error:l,noUserInteraction:!0});return}d=n.toString(),a=qt(d),i({value:d,error:void 0,noUserInteraction:a})}catch(g){i({value:d,error:g,noUserInteraction:a})}}},[]);return[o,u]};function wt(){const[e,t]=m.useState(o());function o(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return m.useEffect(()=>{const i=document.documentElement,u=new MutationObserver(()=>{const n=o();t(n)});return u.observe(i,{attributes:!0,attributeFilter:["style"]}),()=>u.disconnect()},[]),e}function re(){const{resolvedTheme:e,setTheme:t}=Z.z();return{colorMode:e,setColorMode:t,toggleColorMode:()=>{t(e==="light"?"dark":"light")}}}function It(e,t){const{colorMode:o}=re();return o==="light"?e:t}exports.system=ae.system;exports.RichTextInput=Q.RichTextInput;exports.Avatar=ie.Avatar;exports.Box=ue.Box;exports.Button=ce.Button;exports.Code=le.Code;exports.ComboBox=x.ComboBox;exports._ComboBoxOption=x.ComboBoxOption;exports._ComboBoxOptionGroup=x.ComboBoxOptionGroup;exports._ComboBoxRoot=x.ComboBoxRoot;exports.Dialog=se.Dialog;exports.FieldErrorTypes=Y.FieldErrorTypes;exports.FieldErrors=Y.FieldErrors;exports.Group=de.Group;exports.Heading=pe.Heading;exports.IconButton=me.IconButton;exports.IconToggleButton=fe.IconToggleButton;exports.Image=ge.Image;exports.Kbd=be.Kbd;exports.Link=ye.Link;exports.List=E.List;exports._ListIndicator=E.ListIndicator;exports._ListItem=E.ListItem;exports._ListRoot=E.ListRoot;exports.DraggableList=A.DraggableList;exports._DraggableListField=A.DraggableListField;exports._DraggableListItem=A.DraggableListItem;exports._DraggableListRoot=A.DraggableListRoot;exports.SimpleGrid=Ce.SimpleGrid;exports.Text=Te.Text;exports.Tooltip=G.Tooltip;exports._TooltipContent=G.TooltipContent;exports._TooltipRoot=G.TooltipRoot;exports.MakeElementFocusable=he.MakeElementFocusable;exports.NimbusProvider=Z.NimbusProvider;exports.Checkbox=ve.Checkbox;exports.CollapsibleMotion=qe.CollapsibleMotion;exports.Stack=Se.Stack;exports.VisuallyHidden=we.VisuallyHidden;exports.TextInput=Ie.TextInput;exports.NumberInput=De.NumberInput;exports.Grid=Re.Grid;exports.Select=k.Select;exports._SelectOption=k.SelectOption;exports._SelectOptionGroup=k.SelectOptionGroup;exports._SelectOptions=k.SelectOptions;exports._SelectRoot=k.SelectRoot;exports.Separator=_e.Separator;exports.Spacer=ke.Spacer;exports.Accordion=D.Accordion;exports._AccordionContent=D.AccordionContent;exports._AccordionHeader=D.AccordionHeader;exports._AccordionHeaderRightContent=D.AccordionHeaderRightContentSlot;exports._AccordionItem=D.AccordionItem;exports._AccordionRoot=D.AccordionRoot;exports.Alert=R.Alert;exports._AlertActions=R.AlertActions;exports._AlertDescription=R.AlertDescription;exports._AlertDismissButton=R.AlertDismissButton;exports._AlertRoot=R.AlertRoot;exports._AlertTitle=R.AlertTitle;exports.Badge=Le.Badge;exports.Card=F.Card;exports._CardContent=F.CardContent;exports._CardHeader=F.CardHeader;exports._CardRoot=F.CardRoot;exports.FormField=w.FormField;exports._FormFieldDescription=w.FormFieldDescription;exports._FormFieldError=w.FormFieldError;exports._FormFieldInfoBox=w.FormFieldInfoBox;exports._FormFieldInput=w.FormFieldInput;exports._FormFieldLabel=w.FormFieldLabel;exports._FormFieldRoot=w.FormFieldRoot;exports.Icon=xe.Icon;exports.InlineSvg=Ee.InlineSvg;exports.LoadingSpinner=Ae.LoadingSpinner;exports.PasswordInput=Fe.PasswordInput;exports.SearchInput=Be.SearchInput;exports.SplitButton=Me.SplitButton;exports.TimeInput=Pe.TimeInput;exports.MultilineTextInput=Oe.MultilineTextInput;exports.MoneyInput=Ke.MoneyInput;exports.RadioInput=H.RadioInput;exports._RadioInputOption=H.RadioInputOption;exports._RadioInputRoot=H.RadioInputRoot;exports.Switch=Ge.Switch;exports.TagGroup=He.TagGroup;exports.ToggleButton=Ne.ToggleButton;exports.ToggleButtonGroup=N.ToggleButtonGroup;exports._ToggleButtonGroupButton=N.ToggleButtonGroupButton;exports._ToggleButtonGroupRoot=N.ToggleButtonGroupRoot;exports.DateInput=Ue.DateInput;exports.Calendar=je.Calendar;exports.DatePicker=Ve.DatePicker;exports.ProgressBar=ze.ProgressBar;exports.RangeCalendar=$e.RangeCalendar;exports.Menu=q.Menu;exports._MenuContent=q.MenuContent;exports._MenuItem=q.MenuItem;exports._MenuRoot=q.MenuRoot;exports._MenuSection=q.MenuSection;exports._MenuSubmenu=q.MenuSubmenu;exports._MenuSubmenuTrigger=q.MenuSubmenuTrigger;exports._MenuTrigger=q.MenuTrigger;exports.DateRangePicker=We.DateRangePicker;exports.Toolbar=Xe.Toolbar;exports.DataTable=b.DataTable;exports._DataTableBody=b.DataTableBody;exports._DataTableCell=b.DataTableCell;exports._DataTableColumn=b.DataTableColumn;exports._DataTableExpandButton=b.DataTableExpandButton;exports._DataTableFooter=b.DataTableFooter;exports._DataTableHeader=b.DataTableHeader;exports._DataTableNestedIcon=b.DataTableNestedIcon;exports._DataTableRoot=b.DataTableRoot;exports._DataTableRow=b.DataTableRow;exports._DataTableSelectionCell=b.DataTableSelectionCell;exports._DataTableTable=b.DataTableTable;exports.Pagination=Qe.Pagination;exports.Drawer=Ye.Drawer;exports.Tabs=_.Tabs;exports._Tab=_.Tab;exports._TabList=_.TabList;exports._TabPanel=_.TabPanel;exports._TabPanels=_.TabPanels;exports._TabsRoot=_.TabsRoot;exports.LocalizedField=Ze.LocalizedField;exports.useColorMode=re;exports.useColorModeValue=It;exports.useColorScheme=wt;exports.useCopyToClipboard=St;exports.useHotkeys=bt;
|
|
1
|
+
"use strict";const ae=require("./chunks/index-CRFg4Mhx.cjs.js"),Q=require("./chunks/rich-text-input-Da5WFZ3l.cjs.js"),m=require("react"),ie=require("./chunks/avatar-_o-uSXYy.cjs.js"),ue=require("./chunks/box-CWni3A32.cjs.js"),ce=require("./chunks/button-B5OOW-2z.cjs.js"),se=require("./chunks/code-q31e3vT2.cjs.js"),L=require("./chunks/combobox-B5UxZWSX.cjs.js"),le=require("./chunks/dialog-CKwC3dk3.cjs.js"),Y=require("./chunks/field-errors-D2re_C_c.cjs.js"),_t=require("@chakra-ui/react/flex"),de=require("./chunks/group-BqUFlw5R.cjs.js"),pe=require("./chunks/heading-BTacGwo9.cjs.js"),me=require("./chunks/icon-button-vWPrT-bR.cjs.js"),fe=require("./chunks/icon-toggle-button-eLrsWehe.cjs.js"),ge=require("./chunks/image-CGOYoc2s.cjs.js"),be=require("./chunks/kbd-BaeV_DL-.cjs.js"),ye=require("./chunks/link-DpU4rPCp.cjs.js"),E=require("./chunks/list-DJC9BmoC.cjs.js"),A=require("./chunks/draggable-list-MGvr5-A-.cjs.js"),Ce=require("./chunks/simple-grid-Cd2MJxSX.cjs.js"),kt=require("@chakra-ui/react/table"),Te=require("./chunks/text-CCW9kDT_.cjs.js"),G=require("./chunks/tooltip-BPTOkK7W.cjs.js"),he=require("./chunks/make-element-focusable-oedzOY_M.cjs.js"),Z=require("./chunks/nimbus-provider-WX_qUCxo.cjs.js"),ve=require("./chunks/checkbox-Dod-yTj4.cjs.js"),Se=require("./chunks/collapsible-motion-C7M_CLNI.cjs.js"),qe=require("./chunks/stack-CIN13EDn.cjs.js"),we=require("./chunks/visually-hidden-tTYCAVoQ.cjs.js"),Ie=require("./chunks/text-input-DZdkCbdd.cjs.js"),De=require("./chunks/number-input-wMW-o4di.cjs.js"),Re=require("./chunks/grid-Chuw1xje.cjs.js"),k=require("./chunks/select-DMsU6bk9.cjs.js"),_e=require("./chunks/separator-CvRn_J0r.cjs.js"),ke=require("./chunks/spacer-BvQD2vU1.cjs.js"),D=require("./chunks/accordion-B2FLWAh5.cjs.js"),R=require("./chunks/alert-CPHjPe4-.cjs.js"),xe=require("./chunks/badge-mMpNb3Qj.cjs.js"),F=require("./chunks/card-BPEsGx1J.cjs.js"),w=require("./chunks/form-field-CIGQxVVS.cjs.js"),Le=require("./chunks/icon-D39U--jA.cjs.js"),Ee=require("./chunks/inline-svg-Yb2OyzRw.cjs.js"),Ae=require("./chunks/loading-spinner-DQM-6XnY.cjs.js"),Fe=require("./chunks/password-input-6SMjhXSO.cjs.js"),Be=require("./chunks/search-input-BefkmgPy.cjs.js"),Me=require("./chunks/split-button-BO52sL7h.cjs.js"),Pe=require("./chunks/time-input-zXykDANk.cjs.js"),Oe=require("./chunks/multiline-text-input-B9TBDieZ.cjs.js"),Ke=require("./chunks/money-input-Cu_J86Eu.cjs.js"),H=require("./chunks/radio-input-Dp05SXja.cjs.js"),Ge=require("./chunks/switch-CdLhBEPq.cjs.js"),He=require("./chunks/tag-group-Btt0egzG.cjs.js"),Ne=require("./chunks/toggle-button-DxMZsem4.cjs.js"),N=require("./chunks/toggle-button-group-CE2Urvj8.cjs.js"),Ue=require("./chunks/date-input-DvOM0DLT.cjs.js"),je=require("./chunks/calendar-V0KeNCQ3.cjs.js"),Ve=require("./chunks/date-picker-CZAoPNsT.cjs.js"),ze=require("./chunks/progress-bar-Bhp7W6Eo.cjs.js"),$e=require("./chunks/range-calendar-_dZfAsdG.cjs.js"),S=require("./chunks/menu-DIepV2KZ.cjs.js"),We=require("./chunks/date-range-picker-iENzosfN.cjs.js"),Xe=require("./chunks/toolbar-DV0l5MqA.cjs.js"),b=require("./chunks/data-table-C51WU0Cc.cjs.js"),Qe=require("./chunks/pagination-BWdg8s6g.cjs.js"),Ye=require("./chunks/drawer-DzW9wBMk.cjs.js"),_=require("./chunks/tabs-CJ0OAUSR.cjs.js"),Ze=require("./chunks/localized-field-C7Vribb2.cjs.js");require("react/jsx-runtime");const Je=require("./chunks/extractStyleProps-Dk3fpLyQ.cjs.js"),J=["shift","alt","meta","mod","ctrl","control"],et={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function I(e){return(et[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function ee(e){return J.includes(e)}function M(e,t=","){return e.toLowerCase().split(t)}function P(e,t="+",o=">",i=!1,u){let n=[],a=!1;e=e.trim(),e.includes(o)?(a=!0,n=e.toLocaleLowerCase().split(o).map(g=>I(g))):n=e.toLocaleLowerCase().split(t).map(g=>I(g));const d={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod"),useKey:i},s=n.filter(g=>!J.includes(g));return{...d,keys:s,description:u,isSequence:a,hotkey:e}}const q=new Set;function U(e){return Array.isArray(e)}function tt(e,t=","){return(U(e)?e:e.split(t)).every(o=>q.has(o.trim().toLowerCase()))}function ot(e){const t=Array.isArray(e)?e:[e];q.has("meta")&&q.forEach(o=>!ee(o)&&q.delete(o.toLowerCase())),t.forEach(o=>q.add(o.toLowerCase()))}function rt(e){const t=Array.isArray(e)?e:[e];e==="meta"?q.clear():t.forEach(o=>q.delete(o.toLowerCase()))}function nt(e,t,o){(typeof o=="function"&&o(e,t)||o===!0)&&e.preventDefault()}function at(e,t,o){return typeof o=="function"?o(e,t):o===!0||o===void 0}const it=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function ut(e){return te(e,it)}function te(e,t=!1){const{target:o,composed:i}=e;let u,n;return ct(o)&&i?(u=e.composedPath()[0]&&e.composedPath()[0].tagName,n=e.composedPath()[0]&&e.composedPath()[0].role):(u=o&&o.tagName,n=o&&o.role),U(t)?!!(u&&t&&t.some(a=>a.toLowerCase()===u.toLowerCase()||a===n)):!!(u&&t&&t)}function ct(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function st(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(o=>t.includes(o))||e.includes("*"):!0}const lt=(e,t,o=!1)=>{const{alt:i,meta:u,mod:n,shift:a,ctrl:d,keys:s,useKey:g}=t,{code:y,key:r,ctrlKey:l,metaKey:C,shiftKey:T,altKey:p}=e,f=I(y);if(g&&s?.length===1&&s.includes(r))return!0;if(!s?.includes(f)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(f))return!1;if(!o){if(i!==p&&f!=="alt"||a!==T&&f!=="shift")return!1;if(n){if(!C&&!l)return!1}else if(u!==C&&f!=="meta"&&f!=="os"||d!==l&&f!=="ctrl"&&f!=="control")return!1}return s&&s.length===1&&s.includes(f)?!0:s?tt(s):!s},dt=m.createContext(void 0),pt=()=>m.useContext(dt);function oe(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((o,i)=>o&&oe(e[i],t[i]),!0):e===t}const mt=m.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),ft=()=>m.useContext(mt);function gt(e){const t=m.useRef(void 0);return oe(t.current,e)||(t.current=e),t.current}const $=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},bt=typeof window<"u"?m.useLayoutEffect:m.useEffect;function yt(e,t,o,i){const u=m.useRef(null),n=m.useRef(!1),a=Array.isArray(o)?Array.isArray(i)?void 0:i:o,d=U(e)?e.join(a?.delimiter):e,s=Array.isArray(o)?o:Array.isArray(i)?i:void 0,g=m.useCallback(t,s??[]),y=m.useRef(g);s?y.current=g:y.current=t;const r=gt(a),{activeScopes:l}=ft(),C=pt();return bt(()=>{if(r?.enabled===!1||!st(l,r?.scopes))return;let T=[],p;const f=(c,z=!1)=>{if(!(ut(c)&&!te(c,r?.enableOnFormTags))){if(u.current!==null){const v=u.current.getRootNode();if((v instanceof Document||v instanceof ShadowRoot)&&v.activeElement!==u.current&&!u.current.contains(v.activeElement)){$(c);return}}c.target?.isContentEditable&&!r?.enableOnContentEditable||M(d,r?.delimiter).forEach(v=>{if(v.includes(r?.splitKey??"+")&&v.includes(r?.sequenceSplitKey??">")){console.warn(`Hotkey ${v} contains both ${r?.splitKey??"+"} and ${r?.sequenceSplitKey??">"} which is not supported.`);return}const h=P(v,r?.splitKey,r?.sequenceSplitKey,r?.useKey,r?.description);if(h.isSequence){p=setTimeout(()=>{T=[]},r?.sequenceTimeoutMs??1e3);const B=h.useKey?c.key:I(c.code);if(ee(B.toLowerCase()))return;T.push(B);const ne=h.keys?.[T.length-1];if(B!==ne){T=[],p&&clearTimeout(p);return}T.length===h.keys?.length&&(y.current(c,h),p&&clearTimeout(p),T=[])}else if(lt(c,h,r?.ignoreModifiers)||h.keys?.includes("*")){if(r?.ignoreEventWhen?.(c)||z&&n.current)return;if(nt(c,h,r?.preventDefault),!at(c,h,r?.enabled)){$(c);return}y.current(c,h),z||(n.current=!0)}})}},j=c=>{c.code!==void 0&&(ot(I(c.code)),(r?.keydown===void 0&&r?.keyup!==!0||r?.keydown)&&f(c))},V=c=>{c.code!==void 0&&(rt(I(c.code)),n.current=!1,r?.keyup&&f(c,!0))},x=u.current||a?.document||document;return x.addEventListener("keyup",V,a?.eventListenerOptions),x.addEventListener("keydown",j,a?.eventListenerOptions),C&&M(d,r?.delimiter).forEach(c=>C.addHotkey(P(c,r?.splitKey,r?.sequenceSplitKey,r?.useKey,r?.description))),()=>{x.removeEventListener("keyup",V,a?.eventListenerOptions),x.removeEventListener("keydown",j,a?.eventListenerOptions),C&&M(d,r?.delimiter).forEach(c=>C.removeHotkey(P(c,r?.splitKey,r?.sequenceSplitKey,r?.useKey,r?.description))),T=[],p&&clearTimeout(p)}},[d,r,l]),u}function Ct(){var e=m.useRef(!1),t=m.useCallback(function(){return e.current},[]);return m.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}var Tt=function(e){e===void 0&&(e={});var t=m.useState(e),o=t[0],i=t[1],u=m.useCallback(function(n){i(function(a){return Object.assign({},a,n instanceof Function?n(a):n)})},[]);return[o,u]},O,W;function ht(){return W||(W=1,O=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],i=0;i<e.rangeCount;i++)o.push(e.getRangeAt(i));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||o.forEach(function(u){e.addRange(u)}),t&&t.focus()}}),O}var K,X;function vt(){if(X)return K;X=1;var e=ht(),t={"text/plain":"Text","text/html":"Url",default:"Text"},o="Copy to clipboard: #{key}, Enter";function i(n){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return n.replace(/#{\s*key\s*}/g,a)}function u(n,a){var d,s,g,y,r,l,C=!1;a||(a={}),d=a.debug||!1;try{g=e(),y=document.createRange(),r=document.getSelection(),l=document.createElement("span"),l.textContent=n,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(p){if(p.stopPropagation(),a.format)if(p.preventDefault(),typeof p.clipboardData>"u"){d&&console.warn("unable to use e.clipboardData"),d&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=t[a.format]||t.default;window.clipboardData.setData(f,n)}else p.clipboardData.clearData(),p.clipboardData.setData(a.format,n);a.onCopy&&(p.preventDefault(),a.onCopy(p.clipboardData))}),document.body.appendChild(l),y.selectNodeContents(l),r.addRange(y);var T=document.execCommand("copy");if(!T)throw new Error("copy command was unsuccessful");C=!0}catch(p){d&&console.error("unable to copy using execCommand: ",p),d&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",n),a.onCopy&&a.onCopy(window.clipboardData),C=!0}catch(f){d&&console.error("unable to copy using clipboardData: ",f),d&&console.error("falling back to prompt"),s=i("message"in a?a.message:o),window.prompt(s,n)}}finally{r&&(typeof r.removeRange=="function"?r.removeRange(y):r.removeAllRanges()),l&&document.body.removeChild(l),g()}return C}return K=u,K}var St=vt();const qt=Q.getDefaultExportFromCjs(St);var wt=function(){var e=Ct(),t=Tt({value:void 0,error:void 0,noUserInteraction:!0}),o=t[0],i=t[1],u=m.useCallback(function(n){if(e()){var a,d;try{if(typeof n!="string"&&typeof n!="number"){var s=new Error("Cannot copy typeof "+typeof n+" to clipboard, must be a string");process.env.NODE_ENV==="development"&&console.error(s),i({value:n,error:s,noUserInteraction:!0});return}else if(n===""){var s=new Error("Cannot copy empty string to clipboard.");process.env.NODE_ENV==="development"&&console.error(s),i({value:n,error:s,noUserInteraction:!0});return}d=n.toString(),a=qt(d),i({value:d,error:void 0,noUserInteraction:a})}catch(g){i({value:d,error:g,noUserInteraction:a})}}},[]);return[o,u]};function It(){const[e,t]=m.useState(o());function o(){return document.documentElement.style.getPropertyValue("color-scheme")||localStorage.getItem("theme")||"light"}return m.useEffect(()=>{const i=document.documentElement,u=new MutationObserver(()=>{const n=o();t(n)});return u.observe(i,{attributes:!0,attributeFilter:["style"]}),()=>u.disconnect()},[]),e}function re(){const{resolvedTheme:e,setTheme:t}=Z.z();return{colorMode:e,setColorMode:t,toggleColorMode:()=>{t(e==="light"?"dark":"light")}}}function Dt(e,t){const{colorMode:o}=re();return o==="light"?e:t}const Rt=()=>{};exports.system=ae.system;exports.RichTextInput=Q.RichTextInput;exports.Avatar=ie.Avatar;exports.Box=ue.Box;exports.Button=ce.Button;exports.Code=se.Code;exports.ComboBox=L.ComboBox;exports._ComboBoxOption=L.ComboBoxOption;exports._ComboBoxOptionGroup=L.ComboBoxOptionGroup;exports._ComboBoxRoot=L.ComboBoxRoot;exports.Dialog=le.Dialog;exports.FieldErrorTypes=Y.FieldErrorTypes;exports.FieldErrors=Y.FieldErrors;exports.Group=de.Group;exports.Heading=pe.Heading;exports.IconButton=me.IconButton;exports.IconToggleButton=fe.IconToggleButton;exports.Image=ge.Image;exports.Kbd=be.Kbd;exports.Link=ye.Link;exports.List=E.List;exports._ListIndicator=E.ListIndicator;exports._ListItem=E.ListItem;exports._ListRoot=E.ListRoot;exports.DraggableList=A.DraggableList;exports._DraggableListField=A.DraggableListField;exports._DraggableListItem=A.DraggableListItem;exports._DraggableListRoot=A.DraggableListRoot;exports.SimpleGrid=Ce.SimpleGrid;exports.Text=Te.Text;exports.Tooltip=G.Tooltip;exports._TooltipContent=G.TooltipContent;exports._TooltipRoot=G.TooltipRoot;exports.MakeElementFocusable=he.MakeElementFocusable;exports.NimbusProvider=Z.NimbusProvider;exports.Checkbox=ve.Checkbox;exports.CollapsibleMotion=Se.CollapsibleMotion;exports.Stack=qe.Stack;exports.VisuallyHidden=we.VisuallyHidden;exports.TextInput=Ie.TextInput;exports.NumberInput=De.NumberInput;exports.Grid=Re.Grid;exports.Select=k.Select;exports._SelectOption=k.SelectOption;exports._SelectOptionGroup=k.SelectOptionGroup;exports._SelectOptions=k.SelectOptions;exports._SelectRoot=k.SelectRoot;exports.Separator=_e.Separator;exports.Spacer=ke.Spacer;exports.Accordion=D.Accordion;exports._AccordionContent=D.AccordionContent;exports._AccordionHeader=D.AccordionHeader;exports._AccordionHeaderRightContent=D.AccordionHeaderRightContentSlot;exports._AccordionItem=D.AccordionItem;exports._AccordionRoot=D.AccordionRoot;exports.Alert=R.Alert;exports._AlertActions=R.AlertActions;exports._AlertDescription=R.AlertDescription;exports._AlertDismissButton=R.AlertDismissButton;exports._AlertRoot=R.AlertRoot;exports._AlertTitle=R.AlertTitle;exports.Badge=xe.Badge;exports.Card=F.Card;exports._CardContent=F.CardContent;exports._CardHeader=F.CardHeader;exports._CardRoot=F.CardRoot;exports.FormField=w.FormField;exports._FormFieldDescription=w.FormFieldDescription;exports._FormFieldError=w.FormFieldError;exports._FormFieldInfoBox=w.FormFieldInfoBox;exports._FormFieldInput=w.FormFieldInput;exports._FormFieldLabel=w.FormFieldLabel;exports._FormFieldRoot=w.FormFieldRoot;exports.Icon=Le.Icon;exports.InlineSvg=Ee.InlineSvg;exports.LoadingSpinner=Ae.LoadingSpinner;exports.PasswordInput=Fe.PasswordInput;exports.SearchInput=Be.SearchInput;exports.SplitButton=Me.SplitButton;exports.TimeInput=Pe.TimeInput;exports.MultilineTextInput=Oe.MultilineTextInput;exports.MoneyInput=Ke.MoneyInput;exports.RadioInput=H.RadioInput;exports._RadioInputOption=H.RadioInputOption;exports._RadioInputRoot=H.RadioInputRoot;exports.Switch=Ge.Switch;exports.TagGroup=He.TagGroup;exports.ToggleButton=Ne.ToggleButton;exports.ToggleButtonGroup=N.ToggleButtonGroup;exports._ToggleButtonGroupButton=N.ToggleButtonGroupButton;exports._ToggleButtonGroupRoot=N.ToggleButtonGroupRoot;exports.DateInput=Ue.DateInput;exports.Calendar=je.Calendar;exports.DatePicker=Ve.DatePicker;exports.ProgressBar=ze.ProgressBar;exports.RangeCalendar=$e.RangeCalendar;exports.Menu=S.Menu;exports._MenuContent=S.MenuContent;exports._MenuItem=S.MenuItem;exports._MenuRoot=S.MenuRoot;exports._MenuSection=S.MenuSection;exports._MenuSubmenu=S.MenuSubmenu;exports._MenuSubmenuTrigger=S.MenuSubmenuTrigger;exports._MenuTrigger=S.MenuTrigger;exports.DateRangePicker=We.DateRangePicker;exports.Toolbar=Xe.Toolbar;exports.DataTable=b.DataTable;exports._DataTableBody=b.DataTableBody;exports._DataTableCell=b.DataTableCell;exports._DataTableColumn=b.DataTableColumn;exports._DataTableExpandButton=b.DataTableExpandButton;exports._DataTableFooter=b.DataTableFooter;exports._DataTableHeader=b.DataTableHeader;exports._DataTableNestedIcon=b.DataTableNestedIcon;exports._DataTableRoot=b.DataTableRoot;exports._DataTableRow=b.DataTableRow;exports._DataTableSelectionCell=b.DataTableSelectionCell;exports._DataTableTable=b.DataTableTable;exports.Pagination=Qe.Pagination;exports.Drawer=Ye.Drawer;exports.Tabs=_.Tabs;exports._Tab=_.Tab;exports._TabList=_.TabList;exports._TabPanel=_.TabPanel;exports._TabPanels=_.TabPanels;exports._TabsRoot=_.TabsRoot;exports.LocalizedField=Ze.LocalizedField;exports.extractStyleProps=Je.extractStyleProps;exports.noop=Rt;exports.useColorMode=re;exports.useColorModeValue=Dt;exports.useColorScheme=It;exports.useCopyToClipboard=wt;exports.useHotkeys=yt;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../node_modules/.pnpm/react-hotkeys-hook@5.2.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-hotkeys-hook/packages/react-hotkeys-hook/dist/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useMountedState.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useSetState.js","../../../node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js","../../../node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useCopyToClipboard.js","../src/hooks/use-color-scheme/use-color-scheme.ts","../src/hooks/use-color-mode/use-color-mode.ts","../src/hooks/use-color-mode-value/use-color-mode-value.ts"],"sourcesContent":["import { createContext as T, useContext as M, useState as A, useCallback as w, useRef as S, useLayoutEffect as z, useEffect as J } from \"react\";\nimport { jsx as b } from \"react/jsx-runtime\";\nconst j = [\"shift\", \"alt\", \"meta\", \"mod\", \"ctrl\", \"control\"], Q = {\n esc: \"escape\",\n return: \"enter\",\n left: \"arrowleft\",\n right: \"arrowright\",\n up: \"arrowup\",\n down: \"arrowdown\",\n ShiftLeft: \"shift\",\n ShiftRight: \"shift\",\n AltLeft: \"alt\",\n AltRight: \"alt\",\n MetaLeft: \"meta\",\n MetaRight: \"meta\",\n OSLeft: \"meta\",\n OSRight: \"meta\",\n ControlLeft: \"ctrl\",\n ControlRight: \"ctrl\"\n};\nfunction K(e) {\n return (Q[e.trim()] || e.trim()).toLowerCase().replace(/key|digit|numpad/, \"\");\n}\nfunction D(e) {\n return j.includes(e);\n}\nfunction H(e, r = \",\") {\n return e.toLowerCase().split(r);\n}\nfunction P(e, r = \"+\", o = \">\", i = !1, u) {\n let n = [], c = !1;\n e = e.trim(), e.includes(o) ? (c = !0, n = e.toLocaleLowerCase().split(o).map((f) => K(f))) : n = e.toLocaleLowerCase().split(r).map((f) => K(f));\n const y = {\n alt: n.includes(\"alt\"),\n ctrl: n.includes(\"ctrl\") || n.includes(\"control\"),\n shift: n.includes(\"shift\"),\n meta: n.includes(\"meta\"),\n mod: n.includes(\"mod\"),\n useKey: i\n }, d = n.filter((f) => !j.includes(f));\n return {\n ...y,\n keys: d,\n description: u,\n isSequence: c,\n hotkey: e\n };\n}\ntypeof document < \"u\" && (document.addEventListener(\"keydown\", (e) => {\n e.code !== void 0 && I([K(e.code)]);\n}), document.addEventListener(\"keyup\", (e) => {\n e.code !== void 0 && _([K(e.code)]);\n})), typeof window < \"u\" && (window.addEventListener(\"blur\", () => {\n L.clear();\n}), window.addEventListener(\"contextmenu\", () => {\n setTimeout(() => {\n L.clear();\n }, 0);\n}));\nconst L = /* @__PURE__ */ new Set();\nfunction R(e) {\n return Array.isArray(e);\n}\nfunction U(e, r = \",\") {\n return (R(e) ? e : e.split(r)).every((i) => L.has(i.trim().toLowerCase()));\n}\nfunction I(e) {\n const r = Array.isArray(e) ? e : [e];\n L.has(\"meta\") && L.forEach((o) => !D(o) && L.delete(o.toLowerCase())), r.forEach((o) => L.add(o.toLowerCase()));\n}\nfunction _(e) {\n const r = Array.isArray(e) ? e : [e];\n e === \"meta\" ? L.clear() : r.forEach((o) => L.delete(o.toLowerCase()));\n}\nfunction V(e, r, o) {\n (typeof o == \"function\" && o(e, r) || o === !0) && e.preventDefault();\n}\nfunction X(e, r, o) {\n return typeof o == \"function\" ? o(e, r) : o === !0 || o === void 0;\n}\nconst Y = [\n \"input\",\n \"textarea\",\n \"select\",\n \"searchbox\",\n \"slider\",\n \"spinbutton\",\n \"menuitem\",\n \"menuitemcheckbox\",\n \"menuitemradio\",\n \"option\",\n \"radio\",\n \"textbox\"\n];\nfunction Z(e) {\n return F(e, Y);\n}\nfunction F(e, r = !1) {\n const { target: o, composed: i } = e;\n let u, n;\n return ee(o) && i ? (u = e.composedPath()[0] && e.composedPath()[0].tagName, n = e.composedPath()[0] && e.composedPath()[0].role) : (u = o && o.tagName, n = o && o.role), R(r) ? !!(u && r && r.some((c) => c.toLowerCase() === u.toLowerCase() || c === n)) : !!(u && r && r);\n}\nfunction ee(e) {\n return !!e.tagName && !e.tagName.startsWith(\"-\") && e.tagName.includes(\"-\");\n}\nfunction te(e, r) {\n return e.length === 0 && r ? (console.warn(\n 'A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'\n ), !0) : r ? e.some((o) => r.includes(o)) || e.includes(\"*\") : !0;\n}\nconst re = (e, r, o = !1) => {\n const { alt: i, meta: u, mod: n, shift: c, ctrl: y, keys: d, useKey: f } = r, { code: p, key: t, ctrlKey: a, metaKey: l, shiftKey: g, altKey: k } = e, m = K(p);\n if (f && d?.length === 1 && d.includes(t))\n return !0;\n if (!d?.includes(m) && ![\"ctrl\", \"control\", \"unknown\", \"meta\", \"alt\", \"shift\", \"os\"].includes(m))\n return !1;\n if (!o) {\n if (i !== k && m !== \"alt\" || c !== g && m !== \"shift\")\n return !1;\n if (n) {\n if (!l && !a)\n return !1;\n } else if (u !== l && m !== \"meta\" && m !== \"os\" || y !== a && m !== \"ctrl\" && m !== \"control\")\n return !1;\n }\n return d && d.length === 1 && d.includes(m) ? !0 : d ? U(d) : !d;\n}, $ = T(void 0), oe = () => M($);\nfunction ne({ addHotkey: e, removeHotkey: r, children: o }) {\n return /* @__PURE__ */ b($.Provider, { value: { addHotkey: e, removeHotkey: r }, children: o });\n}\nfunction x(e, r) {\n return e && r && typeof e == \"object\" && typeof r == \"object\" ? Object.keys(e).length === Object.keys(r).length && // @ts-expect-error TS7053\n Object.keys(e).reduce((o, i) => o && x(e[i], r[i]), !0) : e === r;\n}\nconst W = T({\n hotkeys: [],\n activeScopes: [],\n // This array has to be empty instead of containing '*' as default, to check if the provider is set or not\n toggleScope: () => {\n },\n enableScope: () => {\n },\n disableScope: () => {\n }\n}), se = () => M(W), de = ({ initiallyActiveScopes: e = [\"*\"], children: r }) => {\n const [o, i] = A(e), [u, n] = A([]), c = w((t) => {\n i((a) => a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), y = w((t) => {\n i((a) => a.filter((l) => l !== t));\n }, []), d = w((t) => {\n i((a) => a.includes(t) ? a.filter((l) => l !== t) : a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), f = w((t) => {\n n((a) => [...a, t]);\n }, []), p = w((t) => {\n n((a) => a.filter((l) => !x(l, t)));\n }, []);\n return /* @__PURE__ */ b(\n W.Provider,\n {\n value: { activeScopes: o, hotkeys: u, enableScope: c, disableScope: y, toggleScope: d },\n children: /* @__PURE__ */ b(ne, { addHotkey: f, removeHotkey: p, children: r })\n }\n );\n};\nfunction ie(e) {\n const r = S(void 0);\n return x(r.current, e) || (r.current = e), r.current;\n}\nconst N = (e) => {\n e.stopPropagation(), e.preventDefault(), e.stopImmediatePropagation();\n}, ue = typeof window < \"u\" ? z : J;\nfunction fe(e, r, o, i) {\n const u = S(null), n = S(!1), c = Array.isArray(o) ? Array.isArray(i) ? void 0 : i : o, y = R(e) ? e.join(c?.delimiter) : e, d = Array.isArray(o) ? o : Array.isArray(i) ? i : void 0, f = w(r, d ?? []), p = S(f);\n d ? p.current = f : p.current = r;\n const t = ie(c), { activeScopes: a } = se(), l = oe();\n return ue(() => {\n if (t?.enabled === !1 || !te(a, t?.scopes))\n return;\n let g = [], k;\n const m = (s, B = !1) => {\n if (!(Z(s) && !F(s, t?.enableOnFormTags))) {\n if (u.current !== null) {\n const v = u.current.getRootNode();\n if ((v instanceof Document || v instanceof ShadowRoot) && v.activeElement !== u.current && !u.current.contains(v.activeElement)) {\n N(s);\n return;\n }\n }\n s.target?.isContentEditable && !t?.enableOnContentEditable || H(y, t?.delimiter).forEach((v) => {\n if (v.includes(t?.splitKey ?? \"+\") && v.includes(t?.sequenceSplitKey ?? \">\")) {\n console.warn(\n `Hotkey ${v} contains both ${t?.splitKey ?? \"+\"} and ${t?.sequenceSplitKey ?? \">\"} which is not supported.`\n );\n return;\n }\n const h = P(\n v,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n );\n if (h.isSequence) {\n k = setTimeout(() => {\n g = [];\n }, t?.sequenceTimeoutMs ?? 1e3);\n const C = h.useKey ? s.key : K(s.code);\n if (D(C.toLowerCase()))\n return;\n g.push(C);\n const G = h.keys?.[g.length - 1];\n if (C !== G) {\n g = [], k && clearTimeout(k);\n return;\n }\n g.length === h.keys?.length && (p.current(s, h), k && clearTimeout(k), g = []);\n } else if (re(s, h, t?.ignoreModifiers) || h.keys?.includes(\"*\")) {\n if (t?.ignoreEventWhen?.(s) || B && n.current)\n return;\n if (V(s, h, t?.preventDefault), !X(s, h, t?.enabled)) {\n N(s);\n return;\n }\n p.current(s, h), B || (n.current = !0);\n }\n });\n }\n }, O = (s) => {\n s.code !== void 0 && (I(K(s.code)), (t?.keydown === void 0 && t?.keyup !== !0 || t?.keydown) && m(s));\n }, q = (s) => {\n s.code !== void 0 && (_(K(s.code)), n.current = !1, t?.keyup && m(s, !0));\n }, E = u.current || c?.document || document;\n return E.addEventListener(\"keyup\", q, c?.eventListenerOptions), E.addEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.addHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), () => {\n E.removeEventListener(\"keyup\", q, c?.eventListenerOptions), E.removeEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.removeHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), g = [], k && clearTimeout(k);\n };\n }, [y, t, a]), u;\n}\nfunction le(e = !1) {\n const [r, o] = A(/* @__PURE__ */ new Set()), [i, u] = A(!1), n = w(\n (f) => {\n f.code !== void 0 && (f.preventDefault(), f.stopPropagation(), o((p) => {\n const t = new Set(p);\n return t.add(K(e ? f.key : f.code)), t;\n }));\n },\n [e]\n ), c = w(() => {\n typeof document < \"u\" && (document.removeEventListener(\"keydown\", n), u(!1));\n }, [n]), y = w(() => {\n o(/* @__PURE__ */ new Set()), typeof document < \"u\" && (c(), document.addEventListener(\"keydown\", n), u(!0));\n }, [n, c]), d = w(() => {\n o(/* @__PURE__ */ new Set());\n }, []);\n return [r, { start: y, stop: c, resetKeys: d, isRecording: i }];\n}\nexport {\n de as HotkeysProvider,\n U as isHotkeyPressed,\n fe as useHotkeys,\n se as useHotkeysContext,\n le as useRecordHotkeys\n};\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useMountedState() {\n var mountedRef = useRef(false);\n var get = useCallback(function () { return mountedRef.current; }, []);\n useEffect(function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []);\n return get;\n}\n","import { useCallback, useState } from 'react';\nvar useSetState = function (initialState) {\n if (initialState === void 0) { initialState = {}; }\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var setState = useCallback(function (patch) {\n set(function (prevState) {\n return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch);\n });\n }, []);\n return [state, setState];\n};\nexport default useSetState;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","import writeText from 'copy-to-clipboard';\nimport { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useCopyToClipboard = function () {\n var isMounted = useMountedState();\n var _a = useSetState({\n value: undefined,\n error: undefined,\n noUserInteraction: true,\n }), state = _a[0], setState = _a[1];\n var copyToClipboard = useCallback(function (value) {\n if (!isMounted()) {\n return;\n }\n var noUserInteraction;\n var normalizedValue;\n try {\n // only strings and numbers casted to strings can be copied to clipboard\n if (typeof value !== 'string' && typeof value !== 'number') {\n var error = new Error(\"Cannot copy typeof \" + typeof value + \" to clipboard, must be a string\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n // empty strings are also considered invalid\n else if (value === '') {\n var error = new Error(\"Cannot copy empty string to clipboard.\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n normalizedValue = value.toString();\n noUserInteraction = writeText(normalizedValue);\n setState({\n value: normalizedValue,\n error: undefined,\n noUserInteraction: noUserInteraction,\n });\n }\n catch (error) {\n setState({\n value: normalizedValue,\n error: error,\n noUserInteraction: noUserInteraction,\n });\n }\n }, []);\n return [state, copyToClipboard];\n};\nexport default useCopyToClipboard;\n","import { useEffect, useState } from \"react\";\n\n/**\n * Hook that provides access to the current color scheme value.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook monitors the color-scheme CSS property on the document's HTML element\n * and returns the current value. It automatically updates when the color scheme changes,\n * either through direct style changes or theme updates stored in localStorage.\n *\n * The hook observes mutations to the HTML element's style attribute to detect\n * color scheme changes and re-renders the component when changes occur.\n *\n * @returns The current color scheme value as a string ('light', 'dark')\n */\nexport function useColorScheme() {\n const [colorScheme, setColorScheme] = useState(getCurrentColorScheme());\n\n // Helper function to get the current color-scheme from the <html> tag\n function getCurrentColorScheme() {\n return (\n document.documentElement.style.getPropertyValue(\"color-scheme\") ||\n localStorage.getItem(\"theme\") ||\n \"light\"\n );\n }\n\n useEffect(() => {\n const htmlElement = document.documentElement;\n\n const observer = new MutationObserver(() => {\n const newColorScheme = getCurrentColorScheme();\n setColorScheme(newColorScheme);\n });\n\n // Observe changes to the 'style' attribute of the <html> element\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return colorScheme;\n}\n","\"use client\";\nimport { useTheme } from \"next-themes\";\n\n/**\n * Hook for managing color mode (light/dark theme) state.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook provides access to the current color mode and functions to change it.\n * It integrates with the next-themes library to handle theme persistence and system preference detection.\n *\n * @returns An object containing:\n * - `colorMode`: The current resolved theme ('light' | 'dark' | 'system' | undefined)\n * - `setColorMode`: Function to set a specific color mode\n * - `toggleColorMode`: Function to toggle between light and dark modes\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { colorMode, toggleColorMode } = useColorMode();\n *\n * return (\n * <button onClick={toggleColorMode}>\n * Current mode: {colorMode}\n * </button>\n * );\n * }\n * ```\n */\n\nexport function useColorMode() {\n const { resolvedTheme, setTheme } = useTheme();\n const toggleColorMode = () => {\n setTheme(resolvedTheme === \"light\" ? \"dark\" : \"light\");\n };\n return {\n colorMode: resolvedTheme,\n setColorMode: setTheme,\n toggleColorMode,\n };\n}\n","import { useColorMode } from \"./../use-color-mode\";\n\n/**\n * Hook that returns a value based on the current color mode.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * @param light - The value to return when the color mode is light\n * @param dark - The value to return when the color mode is dark\n * @returns The appropriate value based on the current color mode\n */\nexport function useColorModeValue<T>(light: T, dark: T) {\n const { colorMode } = useColorMode();\n return colorMode === \"light\" ? light : dark;\n}\n"],"names":["j","Q","K","D","H","r","c","f","y","d","L","R","U","i","I","_","V","X","Y","Z","F","ee","te","re","p","t","a","l","g","k","m","$","T","oe","M","x","W","se","ie","S","N","ue","z","J","fe","w","s","B","C","G","O","q","E","useMountedState","mountedRef","useRef","get","useCallback","useEffect","useSetState","initialState","_a","useState","state","set","setState","patch","prevState","toggleSelection","selection","active","ranges","range","deselectCurrent","require$$0","clipboardToIE11Formatting","defaultMessage","format","message","copyKey","copy","text","options","debug","reselectPrevious","mark","success","e","successful","err","copyToClipboard","useCopyToClipboard","isMounted","value","noUserInteraction","normalizedValue","error","writeText","useColorScheme","colorScheme","setColorScheme","getCurrentColorScheme","htmlElement","observer","newColorScheme","useColorMode","resolvedTheme","setTheme","useTheme","useColorModeValue","light","dark","colorMode"],"mappings":"0wGAEA,MAAMA,EAAI,CAAC,QAAS,MAAO,OAAQ,MAAO,OAAQ,SAAS,EAAGC,GAAI,CAChE,IAAK,SACL,OAAQ,QACR,KAAM,YACN,MAAO,aACP,GAAI,UACJ,KAAM,YACN,UAAW,QACX,WAAY,QACZ,QAAS,MACT,SAAU,MACV,SAAU,OACV,UAAW,OACX,OAAQ,OACR,QAAS,OACT,YAAa,OACb,aAAc,MAChB,EACA,SAASC,EAAE,EAAG,CACZ,OAAQD,GAAE,EAAE,KAAI,CAAE,GAAK,EAAE,KAAI,GAAI,YAAW,EAAG,QAAQ,mBAAoB,EAAE,CAC/E,CACA,SAASE,GAAE,EAAG,CACZ,OAAOH,EAAE,SAAS,CAAC,CACrB,CACA,SAASI,EAAE,EAAGC,EAAI,IAAK,CACrB,OAAO,EAAE,cAAc,MAAMA,CAAC,CAChC,CACA,SAAS,EAAE,EAAGA,EAAI,IAAK,EAAI,I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AAU,OAAS,OAAO,CACvD,CAIE,CAEJ,CC7BO,SAASG,GAAqBC,EAAUC,EAAS,CACtD,KAAM,CAAE,UAAAC,CAAA,EAAcP,GAAA,EACtB,OAAOO,IAAc,QAAUF,EAAQC,CACzC","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../node_modules/.pnpm/react-hotkeys-hook@5.2.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-hotkeys-hook/packages/react-hotkeys-hook/dist/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useMountedState.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useSetState.js","../../../node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js","../../../node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js","../../../node_modules/.pnpm/react-use@17.6.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-use/esm/useCopyToClipboard.js","../src/hooks/use-color-scheme/use-color-scheme.ts","../src/hooks/use-color-mode/use-color-mode.ts","../src/hooks/use-color-mode-value/use-color-mode-value.ts","../src/utils/noop.ts"],"sourcesContent":["import { createContext as T, useContext as M, useState as A, useCallback as w, useRef as S, useLayoutEffect as z, useEffect as J } from \"react\";\nimport { jsx as b } from \"react/jsx-runtime\";\nconst j = [\"shift\", \"alt\", \"meta\", \"mod\", \"ctrl\", \"control\"], Q = {\n esc: \"escape\",\n return: \"enter\",\n left: \"arrowleft\",\n right: \"arrowright\",\n up: \"arrowup\",\n down: \"arrowdown\",\n ShiftLeft: \"shift\",\n ShiftRight: \"shift\",\n AltLeft: \"alt\",\n AltRight: \"alt\",\n MetaLeft: \"meta\",\n MetaRight: \"meta\",\n OSLeft: \"meta\",\n OSRight: \"meta\",\n ControlLeft: \"ctrl\",\n ControlRight: \"ctrl\"\n};\nfunction K(e) {\n return (Q[e.trim()] || e.trim()).toLowerCase().replace(/key|digit|numpad/, \"\");\n}\nfunction D(e) {\n return j.includes(e);\n}\nfunction H(e, r = \",\") {\n return e.toLowerCase().split(r);\n}\nfunction P(e, r = \"+\", o = \">\", i = !1, u) {\n let n = [], c = !1;\n e = e.trim(), e.includes(o) ? (c = !0, n = e.toLocaleLowerCase().split(o).map((f) => K(f))) : n = e.toLocaleLowerCase().split(r).map((f) => K(f));\n const y = {\n alt: n.includes(\"alt\"),\n ctrl: n.includes(\"ctrl\") || n.includes(\"control\"),\n shift: n.includes(\"shift\"),\n meta: n.includes(\"meta\"),\n mod: n.includes(\"mod\"),\n useKey: i\n }, d = n.filter((f) => !j.includes(f));\n return {\n ...y,\n keys: d,\n description: u,\n isSequence: c,\n hotkey: e\n };\n}\ntypeof document < \"u\" && (document.addEventListener(\"keydown\", (e) => {\n e.code !== void 0 && I([K(e.code)]);\n}), document.addEventListener(\"keyup\", (e) => {\n e.code !== void 0 && _([K(e.code)]);\n})), typeof window < \"u\" && (window.addEventListener(\"blur\", () => {\n L.clear();\n}), window.addEventListener(\"contextmenu\", () => {\n setTimeout(() => {\n L.clear();\n }, 0);\n}));\nconst L = /* @__PURE__ */ new Set();\nfunction R(e) {\n return Array.isArray(e);\n}\nfunction U(e, r = \",\") {\n return (R(e) ? e : e.split(r)).every((i) => L.has(i.trim().toLowerCase()));\n}\nfunction I(e) {\n const r = Array.isArray(e) ? e : [e];\n L.has(\"meta\") && L.forEach((o) => !D(o) && L.delete(o.toLowerCase())), r.forEach((o) => L.add(o.toLowerCase()));\n}\nfunction _(e) {\n const r = Array.isArray(e) ? e : [e];\n e === \"meta\" ? L.clear() : r.forEach((o) => L.delete(o.toLowerCase()));\n}\nfunction V(e, r, o) {\n (typeof o == \"function\" && o(e, r) || o === !0) && e.preventDefault();\n}\nfunction X(e, r, o) {\n return typeof o == \"function\" ? o(e, r) : o === !0 || o === void 0;\n}\nconst Y = [\n \"input\",\n \"textarea\",\n \"select\",\n \"searchbox\",\n \"slider\",\n \"spinbutton\",\n \"menuitem\",\n \"menuitemcheckbox\",\n \"menuitemradio\",\n \"option\",\n \"radio\",\n \"textbox\"\n];\nfunction Z(e) {\n return F(e, Y);\n}\nfunction F(e, r = !1) {\n const { target: o, composed: i } = e;\n let u, n;\n return ee(o) && i ? (u = e.composedPath()[0] && e.composedPath()[0].tagName, n = e.composedPath()[0] && e.composedPath()[0].role) : (u = o && o.tagName, n = o && o.role), R(r) ? !!(u && r && r.some((c) => c.toLowerCase() === u.toLowerCase() || c === n)) : !!(u && r && r);\n}\nfunction ee(e) {\n return !!e.tagName && !e.tagName.startsWith(\"-\") && e.tagName.includes(\"-\");\n}\nfunction te(e, r) {\n return e.length === 0 && r ? (console.warn(\n 'A hotkey has the \"scopes\" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'\n ), !0) : r ? e.some((o) => r.includes(o)) || e.includes(\"*\") : !0;\n}\nconst re = (e, r, o = !1) => {\n const { alt: i, meta: u, mod: n, shift: c, ctrl: y, keys: d, useKey: f } = r, { code: p, key: t, ctrlKey: a, metaKey: l, shiftKey: g, altKey: k } = e, m = K(p);\n if (f && d?.length === 1 && d.includes(t))\n return !0;\n if (!d?.includes(m) && ![\"ctrl\", \"control\", \"unknown\", \"meta\", \"alt\", \"shift\", \"os\"].includes(m))\n return !1;\n if (!o) {\n if (i !== k && m !== \"alt\" || c !== g && m !== \"shift\")\n return !1;\n if (n) {\n if (!l && !a)\n return !1;\n } else if (u !== l && m !== \"meta\" && m !== \"os\" || y !== a && m !== \"ctrl\" && m !== \"control\")\n return !1;\n }\n return d && d.length === 1 && d.includes(m) ? !0 : d ? U(d) : !d;\n}, $ = T(void 0), oe = () => M($);\nfunction ne({ addHotkey: e, removeHotkey: r, children: o }) {\n return /* @__PURE__ */ b($.Provider, { value: { addHotkey: e, removeHotkey: r }, children: o });\n}\nfunction x(e, r) {\n return e && r && typeof e == \"object\" && typeof r == \"object\" ? Object.keys(e).length === Object.keys(r).length && // @ts-expect-error TS7053\n Object.keys(e).reduce((o, i) => o && x(e[i], r[i]), !0) : e === r;\n}\nconst W = T({\n hotkeys: [],\n activeScopes: [],\n // This array has to be empty instead of containing '*' as default, to check if the provider is set or not\n toggleScope: () => {\n },\n enableScope: () => {\n },\n disableScope: () => {\n }\n}), se = () => M(W), de = ({ initiallyActiveScopes: e = [\"*\"], children: r }) => {\n const [o, i] = A(e), [u, n] = A([]), c = w((t) => {\n i((a) => a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), y = w((t) => {\n i((a) => a.filter((l) => l !== t));\n }, []), d = w((t) => {\n i((a) => a.includes(t) ? a.filter((l) => l !== t) : a.includes(\"*\") ? [t] : Array.from(/* @__PURE__ */ new Set([...a, t])));\n }, []), f = w((t) => {\n n((a) => [...a, t]);\n }, []), p = w((t) => {\n n((a) => a.filter((l) => !x(l, t)));\n }, []);\n return /* @__PURE__ */ b(\n W.Provider,\n {\n value: { activeScopes: o, hotkeys: u, enableScope: c, disableScope: y, toggleScope: d },\n children: /* @__PURE__ */ b(ne, { addHotkey: f, removeHotkey: p, children: r })\n }\n );\n};\nfunction ie(e) {\n const r = S(void 0);\n return x(r.current, e) || (r.current = e), r.current;\n}\nconst N = (e) => {\n e.stopPropagation(), e.preventDefault(), e.stopImmediatePropagation();\n}, ue = typeof window < \"u\" ? z : J;\nfunction fe(e, r, o, i) {\n const u = S(null), n = S(!1), c = Array.isArray(o) ? Array.isArray(i) ? void 0 : i : o, y = R(e) ? e.join(c?.delimiter) : e, d = Array.isArray(o) ? o : Array.isArray(i) ? i : void 0, f = w(r, d ?? []), p = S(f);\n d ? p.current = f : p.current = r;\n const t = ie(c), { activeScopes: a } = se(), l = oe();\n return ue(() => {\n if (t?.enabled === !1 || !te(a, t?.scopes))\n return;\n let g = [], k;\n const m = (s, B = !1) => {\n if (!(Z(s) && !F(s, t?.enableOnFormTags))) {\n if (u.current !== null) {\n const v = u.current.getRootNode();\n if ((v instanceof Document || v instanceof ShadowRoot) && v.activeElement !== u.current && !u.current.contains(v.activeElement)) {\n N(s);\n return;\n }\n }\n s.target?.isContentEditable && !t?.enableOnContentEditable || H(y, t?.delimiter).forEach((v) => {\n if (v.includes(t?.splitKey ?? \"+\") && v.includes(t?.sequenceSplitKey ?? \">\")) {\n console.warn(\n `Hotkey ${v} contains both ${t?.splitKey ?? \"+\"} and ${t?.sequenceSplitKey ?? \">\"} which is not supported.`\n );\n return;\n }\n const h = P(\n v,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n );\n if (h.isSequence) {\n k = setTimeout(() => {\n g = [];\n }, t?.sequenceTimeoutMs ?? 1e3);\n const C = h.useKey ? s.key : K(s.code);\n if (D(C.toLowerCase()))\n return;\n g.push(C);\n const G = h.keys?.[g.length - 1];\n if (C !== G) {\n g = [], k && clearTimeout(k);\n return;\n }\n g.length === h.keys?.length && (p.current(s, h), k && clearTimeout(k), g = []);\n } else if (re(s, h, t?.ignoreModifiers) || h.keys?.includes(\"*\")) {\n if (t?.ignoreEventWhen?.(s) || B && n.current)\n return;\n if (V(s, h, t?.preventDefault), !X(s, h, t?.enabled)) {\n N(s);\n return;\n }\n p.current(s, h), B || (n.current = !0);\n }\n });\n }\n }, O = (s) => {\n s.code !== void 0 && (I(K(s.code)), (t?.keydown === void 0 && t?.keyup !== !0 || t?.keydown) && m(s));\n }, q = (s) => {\n s.code !== void 0 && (_(K(s.code)), n.current = !1, t?.keyup && m(s, !0));\n }, E = u.current || c?.document || document;\n return E.addEventListener(\"keyup\", q, c?.eventListenerOptions), E.addEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.addHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), () => {\n E.removeEventListener(\"keyup\", q, c?.eventListenerOptions), E.removeEventListener(\"keydown\", O, c?.eventListenerOptions), l && H(y, t?.delimiter).forEach(\n (s) => l.removeHotkey(\n P(\n s,\n t?.splitKey,\n t?.sequenceSplitKey,\n t?.useKey,\n t?.description\n )\n )\n ), g = [], k && clearTimeout(k);\n };\n }, [y, t, a]), u;\n}\nfunction le(e = !1) {\n const [r, o] = A(/* @__PURE__ */ new Set()), [i, u] = A(!1), n = w(\n (f) => {\n f.code !== void 0 && (f.preventDefault(), f.stopPropagation(), o((p) => {\n const t = new Set(p);\n return t.add(K(e ? f.key : f.code)), t;\n }));\n },\n [e]\n ), c = w(() => {\n typeof document < \"u\" && (document.removeEventListener(\"keydown\", n), u(!1));\n }, [n]), y = w(() => {\n o(/* @__PURE__ */ new Set()), typeof document < \"u\" && (c(), document.addEventListener(\"keydown\", n), u(!0));\n }, [n, c]), d = w(() => {\n o(/* @__PURE__ */ new Set());\n }, []);\n return [r, { start: y, stop: c, resetKeys: d, isRecording: i }];\n}\nexport {\n de as HotkeysProvider,\n U as isHotkeyPressed,\n fe as useHotkeys,\n se as useHotkeysContext,\n le as useRecordHotkeys\n};\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useMountedState() {\n var mountedRef = useRef(false);\n var get = useCallback(function () { return mountedRef.current; }, []);\n useEffect(function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []);\n return get;\n}\n","import { useCallback, useState } from 'react';\nvar useSetState = function (initialState) {\n if (initialState === void 0) { initialState = {}; }\n var _a = useState(initialState), state = _a[0], set = _a[1];\n var setState = useCallback(function (patch) {\n set(function (prevState) {\n return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch);\n });\n }, []);\n return [state, setState];\n};\nexport default useSetState;\n","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","import writeText from 'copy-to-clipboard';\nimport { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useCopyToClipboard = function () {\n var isMounted = useMountedState();\n var _a = useSetState({\n value: undefined,\n error: undefined,\n noUserInteraction: true,\n }), state = _a[0], setState = _a[1];\n var copyToClipboard = useCallback(function (value) {\n if (!isMounted()) {\n return;\n }\n var noUserInteraction;\n var normalizedValue;\n try {\n // only strings and numbers casted to strings can be copied to clipboard\n if (typeof value !== 'string' && typeof value !== 'number') {\n var error = new Error(\"Cannot copy typeof \" + typeof value + \" to clipboard, must be a string\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n // empty strings are also considered invalid\n else if (value === '') {\n var error = new Error(\"Cannot copy empty string to clipboard.\");\n if (process.env.NODE_ENV === 'development')\n console.error(error);\n setState({\n value: value,\n error: error,\n noUserInteraction: true,\n });\n return;\n }\n normalizedValue = value.toString();\n noUserInteraction = writeText(normalizedValue);\n setState({\n value: normalizedValue,\n error: undefined,\n noUserInteraction: noUserInteraction,\n });\n }\n catch (error) {\n setState({\n value: normalizedValue,\n error: error,\n noUserInteraction: noUserInteraction,\n });\n }\n }, []);\n return [state, copyToClipboard];\n};\nexport default useCopyToClipboard;\n","import { useEffect, useState } from \"react\";\n\n/**\n * Hook that provides access to the current color scheme value.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook monitors the color-scheme CSS property on the document's HTML element\n * and returns the current value. It automatically updates when the color scheme changes,\n * either through direct style changes or theme updates stored in localStorage.\n *\n * The hook observes mutations to the HTML element's style attribute to detect\n * color scheme changes and re-renders the component when changes occur.\n *\n * @returns The current color scheme value as a string ('light', 'dark')\n */\nexport function useColorScheme() {\n const [colorScheme, setColorScheme] = useState(getCurrentColorScheme());\n\n // Helper function to get the current color-scheme from the <html> tag\n function getCurrentColorScheme() {\n return (\n document.documentElement.style.getPropertyValue(\"color-scheme\") ||\n localStorage.getItem(\"theme\") ||\n \"light\"\n );\n }\n\n useEffect(() => {\n const htmlElement = document.documentElement;\n\n const observer = new MutationObserver(() => {\n const newColorScheme = getCurrentColorScheme();\n setColorScheme(newColorScheme);\n });\n\n // Observe changes to the 'style' attribute of the <html> element\n observer.observe(htmlElement, {\n attributes: true,\n attributeFilter: [\"style\"],\n });\n\n return () => observer.disconnect();\n }, []);\n\n return colorScheme;\n}\n","\"use client\";\nimport { useTheme } from \"next-themes\";\n\n/**\n * Hook for managing color mode (light/dark theme) state.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * This hook provides access to the current color mode and functions to change it.\n * It integrates with the next-themes library to handle theme persistence and system preference detection.\n *\n * @returns An object containing:\n * - `colorMode`: The current resolved theme ('light' | 'dark' | 'system' | undefined)\n * - `setColorMode`: Function to set a specific color mode\n * - `toggleColorMode`: Function to toggle between light and dark modes\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { colorMode, toggleColorMode } = useColorMode();\n *\n * return (\n * <button onClick={toggleColorMode}>\n * Current mode: {colorMode}\n * </button>\n * );\n * }\n * ```\n */\n\nexport function useColorMode() {\n const { resolvedTheme, setTheme } = useTheme();\n const toggleColorMode = () => {\n setTheme(resolvedTheme === \"light\" ? \"dark\" : \"light\");\n };\n return {\n colorMode: resolvedTheme,\n setColorMode: setTheme,\n toggleColorMode,\n };\n}\n","import { useColorMode } from \"./../use-color-mode\";\n\n/**\n * Hook that returns a value based on the current color mode.\n *\n * @experimental This hook is experimental and may change in future versions.\n *\n * @param light - The value to return when the color mode is light\n * @param dark - The value to return when the color mode is dark\n * @returns The appropriate value based on the current color mode\n */\nexport function useColorModeValue<T>(light: T, dark: T) {\n const { colorMode } = useColorMode();\n return colorMode === \"light\" ? light : dark;\n}\n","/**\n * A no-operation function that does nothing.\n * Useful as a default callback or placeholder function.\n *\n * @example\n * ```tsx\n * const MyComponent = ({ onClick = noop }: { onClick?: () => void }) => (\n * <button onClick={onClick}>Click me</button>\n * );\n * ```\n */\nexport const noop = (): void => {\n // Intentionally empty\n};\n"],"names":["j","Q","K","D","H","r","c","f","y","d","L","R","U","i","I","_","V","X","Y","Z","F","ee","te","re","p","t","a","l","g","k","m","$","T","oe","M","x","W","se","ie","S","N","ue","z","J","fe","w","s","B","C","G","O","q","E","useMountedState","mountedRef","useRef","get","useCallback","useEffect","useSetState","initialState","_a","useState","state","set","setState","patch","prevState","toggleSelection","selection","active","ranges","range","deselectCurrent","require$$0","clipboardToIE11Formatting","defaultMessage","format","message","copyKey","copy","text","options","debug","reselectPrevious","mark","success","e","successful","err","copyToClipboard","useCopyToClipboard","isMounted","value","noUserInteraction","normalizedValue","error","writeText","useColorScheme","colorScheme","setColorScheme","getCurrentColorScheme","htmlElement","observer","newColorScheme","useColorMode","resolvedTheme","setTheme","useTheme","useColorModeValue","light","dark","colorMode","noop"],"mappings":"y0GAEMA,EAAI,CAAC,Q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,OACE,SAAS,gBAAgB,MAAM,iBAAiB,cAAc,GAC9D,aAAa,QAAQ,OAAO,GAC5B,OAEJ,CAEA3C,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAM4C,EAAc,SAAS,gBAEvBC,EAAW,IAAI,iBAAiB,IAAM,CAC1C,MAAMC,EAAiBH,EAAA,EACvBD,EAAeI,CAAc,CAC/B,CAAC,EAGD,OAAAD,EAAS,QAAQD,EAAa,CAC5B,WAAY,GACZ,gBAAiB,CAAC,OAAO,CAAA,CAC1B,EAEM,IAAMC,EAAS,WAAA,CACxB,EAAG,CAAA,CAAE,EAEEJ,CACT,CChBO,SAASM,IAAe,CAC7B,KAAM,CAAE,cAAAC,EAAe,SAAAC,CAAA,EAAaC,IAAA,EAIpC,MAAO,CACL,UAAWF,EACX,aAAcC,EACd,gBANsB,IAAM,CAC5BA,EAASD,IAAkB,QAAU,OAAS,OAAO,CACvD,CAIE,CAEJ,CC7BO,SAASG,GAAqBC,EAAUC,EAAS,CACtD,KAAM,CAAE,UAAAC,CAAA,EAAcP,GAAA,EACtB,OAAOO,IAAc,QAAUF,EAAQC,CACzC,CCHO,MAAME,GAAO,IAAY,CAEhC","x_google_ignoreList":[0,1,2,3,4,5]}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ declare type ButtonRootSlotProps = Omit<HTMLChakraProps<"button", ButtonRecipePr
|
|
|
43
43
|
slot?: string | null | undefined;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Checks if we're in a browser environment
|
|
48
|
+
*/
|
|
49
|
+
export declare function canUseDOM(): boolean;
|
|
50
|
+
|
|
46
51
|
export declare const DialogBody: {
|
|
47
52
|
(props: DialogBodyProps): JSX.Element;
|
|
48
53
|
displayName: string;
|
|
@@ -288,6 +293,35 @@ declare type IconButtonProps = ButtonProps & {
|
|
|
288
293
|
ref?: React.Ref<HTMLButtonElement>;
|
|
289
294
|
};
|
|
290
295
|
|
|
296
|
+
/**
|
|
297
|
+
* Configuration options for SVG sanitization
|
|
298
|
+
*/
|
|
299
|
+
declare type SanitizationOptions = {
|
|
300
|
+
/**
|
|
301
|
+
* Whether to allow style attributes in SVG elements
|
|
302
|
+
* @default false
|
|
303
|
+
*/
|
|
304
|
+
allowStyles?: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* Additional attributes to remove during sanitization beyond the default set
|
|
307
|
+
* @default []
|
|
308
|
+
*/
|
|
309
|
+
forbiddenAttributes?: string[];
|
|
310
|
+
/**
|
|
311
|
+
* Additional tags to remove during sanitization beyond the default set
|
|
312
|
+
* @default []
|
|
313
|
+
*/
|
|
314
|
+
forbiddenTags?: string[];
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Sanitizes SVG markup string to prevent XSS attacks
|
|
319
|
+
* @param svgString - The SVG markup as a string
|
|
320
|
+
* @param options - Optional sanitization configuration
|
|
321
|
+
* @returns Sanitized SVG string or null if invalid
|
|
322
|
+
*/
|
|
323
|
+
export declare function sanitizeSvg(svgString: string, options?: SanitizationOptions): string | null;
|
|
324
|
+
|
|
291
325
|
export declare const system: SystemContext;
|
|
292
326
|
|
|
293
327
|
/**
|