@epilot/volt-ui 1.1.7-alpha.1 → 1.1.7
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/index.cjs.js +51 -0
- package/dist/index.es.js +11823 -137
- package/dist/preflight.css +1 -241
- package/dist/style.css +1 -7393
- package/package.json +4 -1
- package/dist/components/button/index.d.ts +0 -1
- package/dist/index.es.js.map +0 -1
- package/dist/index.es10.js +0 -35
- package/dist/index.es10.js.map +0 -1
- package/dist/index.es100.js +0 -14
- package/dist/index.es100.js.map +0 -1
- package/dist/index.es101.js +0 -20
- package/dist/index.es101.js.map +0 -1
- package/dist/index.es102.js +0 -103
- package/dist/index.es102.js.map +0 -1
- package/dist/index.es103.js +0 -12
- package/dist/index.es103.js.map +0 -1
- package/dist/index.es104.js +0 -30
- package/dist/index.es104.js.map +0 -1
- package/dist/index.es105.js +0 -38
- package/dist/index.es105.js.map +0 -1
- package/dist/index.es106.js +0 -17
- package/dist/index.es106.js.map +0 -1
- package/dist/index.es107.js +0 -49
- package/dist/index.es107.js.map +0 -1
- package/dist/index.es108.js +0 -10
- package/dist/index.es108.js.map +0 -1
- package/dist/index.es11.js +0 -318
- package/dist/index.es11.js.map +0 -1
- package/dist/index.es12.js +0 -274
- package/dist/index.es12.js.map +0 -1
- package/dist/index.es13.js +0 -38
- package/dist/index.es13.js.map +0 -1
- package/dist/index.es14.js +0 -48
- package/dist/index.es14.js.map +0 -1
- package/dist/index.es15.js +0 -67
- package/dist/index.es15.js.map +0 -1
- package/dist/index.es16.js +0 -120
- package/dist/index.es16.js.map +0 -1
- package/dist/index.es17.js +0 -27
- package/dist/index.es17.js.map +0 -1
- package/dist/index.es18.js +0 -51
- package/dist/index.es18.js.map +0 -1
- package/dist/index.es19.js +0 -168
- package/dist/index.es19.js.map +0 -1
- package/dist/index.es20.js +0 -55
- package/dist/index.es20.js.map +0 -1
- package/dist/index.es21.js +0 -61
- package/dist/index.es21.js.map +0 -1
- package/dist/index.es22.js +0 -86
- package/dist/index.es22.js.map +0 -1
- package/dist/index.es23.js +0 -195
- package/dist/index.es23.js.map +0 -1
- package/dist/index.es24.js +0 -105
- package/dist/index.es24.js.map +0 -1
- package/dist/index.es25.js +0 -146
- package/dist/index.es25.js.map +0 -1
- package/dist/index.es26.js +0 -92
- package/dist/index.es26.js.map +0 -1
- package/dist/index.es27.js +0 -80
- package/dist/index.es27.js.map +0 -1
- package/dist/index.es28.js +0 -94
- package/dist/index.es28.js.map +0 -1
- package/dist/index.es29.js +0 -82
- package/dist/index.es29.js.map +0 -1
- package/dist/index.es30.js +0 -1087
- package/dist/index.es30.js.map +0 -1
- package/dist/index.es31.js +0 -18
- package/dist/index.es31.js.map +0 -1
- package/dist/index.es32.js +0 -3015
- package/dist/index.es32.js.map +0 -1
- package/dist/index.es33.js +0 -107
- package/dist/index.es33.js.map +0 -1
- package/dist/index.es34.js +0 -46
- package/dist/index.es34.js.map +0 -1
- package/dist/index.es35.js +0 -151
- package/dist/index.es35.js.map +0 -1
- package/dist/index.es36.js +0 -1200
- package/dist/index.es36.js.map +0 -1
- package/dist/index.es37.js +0 -27
- package/dist/index.es37.js.map +0 -1
- package/dist/index.es38.js +0 -493
- package/dist/index.es38.js.map +0 -1
- package/dist/index.es39.js +0 -156
- package/dist/index.es39.js.map +0 -1
- package/dist/index.es4.js +0 -9
- package/dist/index.es4.js.map +0 -1
- package/dist/index.es40.js +0 -31
- package/dist/index.es40.js.map +0 -1
- package/dist/index.es41.js +0 -314
- package/dist/index.es41.js.map +0 -1
- package/dist/index.es42.js +0 -343
- package/dist/index.es42.js.map +0 -1
- package/dist/index.es43.js +0 -280
- package/dist/index.es43.js.map +0 -1
- package/dist/index.es44.js +0 -289
- package/dist/index.es44.js.map +0 -1
- package/dist/index.es45.js +0 -319
- package/dist/index.es45.js.map +0 -1
- package/dist/index.es46.js +0 -167
- package/dist/index.es46.js.map +0 -1
- package/dist/index.es47.js +0 -195
- package/dist/index.es47.js.map +0 -1
- package/dist/index.es48.js +0 -40
- package/dist/index.es48.js.map +0 -1
- package/dist/index.es49.js +0 -40
- package/dist/index.es49.js.map +0 -1
- package/dist/index.es5.js +0 -57
- package/dist/index.es5.js.map +0 -1
- package/dist/index.es50.js +0 -12
- package/dist/index.es50.js.map +0 -1
- package/dist/index.es51.js +0 -82
- package/dist/index.es51.js.map +0 -1
- package/dist/index.es52.js +0 -72
- package/dist/index.es52.js.map +0 -1
- package/dist/index.es53.js +0 -15
- package/dist/index.es53.js.map +0 -1
- package/dist/index.es54.js +0 -40
- package/dist/index.es54.js.map +0 -1
- package/dist/index.es55.js +0 -44
- package/dist/index.es55.js.map +0 -1
- package/dist/index.es56.js +0 -71
- package/dist/index.es56.js.map +0 -1
- package/dist/index.es57.js +0 -152
- package/dist/index.es57.js.map +0 -1
- package/dist/index.es58.js +0 -15
- package/dist/index.es58.js.map +0 -1
- package/dist/index.es59.js +0 -11
- package/dist/index.es59.js.map +0 -1
- package/dist/index.es6.js +0 -77
- package/dist/index.es6.js.map +0 -1
- package/dist/index.es60.js +0 -130
- package/dist/index.es60.js.map +0 -1
- package/dist/index.es61.js +0 -213
- package/dist/index.es61.js.map +0 -1
- package/dist/index.es62.js +0 -294
- package/dist/index.es62.js.map +0 -1
- package/dist/index.es63.js +0 -16
- package/dist/index.es63.js.map +0 -1
- package/dist/index.es64.js +0 -37
- package/dist/index.es64.js.map +0 -1
- package/dist/index.es65.js +0 -228
- package/dist/index.es65.js.map +0 -1
- package/dist/index.es66.js +0 -209
- package/dist/index.es66.js.map +0 -1
- package/dist/index.es67.js +0 -19
- package/dist/index.es67.js.map +0 -1
- package/dist/index.es68.js +0 -30
- package/dist/index.es68.js.map +0 -1
- package/dist/index.es69.js +0 -12
- package/dist/index.es69.js.map +0 -1
- package/dist/index.es7.js +0 -200
- package/dist/index.es7.js.map +0 -1
- package/dist/index.es70.js +0 -123
- package/dist/index.es70.js.map +0 -1
- package/dist/index.es71.js +0 -90
- package/dist/index.es71.js.map +0 -1
- package/dist/index.es72.js +0 -7
- package/dist/index.es72.js.map +0 -1
- package/dist/index.es73.js +0 -90
- package/dist/index.es73.js.map +0 -1
- package/dist/index.es74.js +0 -15
- package/dist/index.es74.js.map +0 -1
- package/dist/index.es75.js +0 -7
- package/dist/index.es75.js.map +0 -1
- package/dist/index.es76.js +0 -40
- package/dist/index.es76.js.map +0 -1
- package/dist/index.es77.js +0 -90
- package/dist/index.es77.js.map +0 -1
- package/dist/index.es78.js +0 -313
- package/dist/index.es78.js.map +0 -1
- package/dist/index.es79.js +0 -16
- package/dist/index.es79.js.map +0 -1
- package/dist/index.es8.js +0 -47
- package/dist/index.es8.js.map +0 -1
- package/dist/index.es80.js +0 -90
- package/dist/index.es80.js.map +0 -1
- package/dist/index.es81.js +0 -18
- package/dist/index.es81.js.map +0 -1
- package/dist/index.es82.js +0 -298
- package/dist/index.es82.js.map +0 -1
- package/dist/index.es83.js +0 -26
- package/dist/index.es83.js.map +0 -1
- package/dist/index.es84.js +0 -626
- package/dist/index.es84.js.map +0 -1
- package/dist/index.es85.js +0 -19
- package/dist/index.es85.js.map +0 -1
- package/dist/index.es86.js +0 -40
- package/dist/index.es86.js.map +0 -1
- package/dist/index.es87.js +0 -40
- package/dist/index.es87.js.map +0 -1
- package/dist/index.es88.js +0 -39
- package/dist/index.es88.js.map +0 -1
- package/dist/index.es89.js +0 -8
- package/dist/index.es89.js.map +0 -1
- package/dist/index.es9.js +0 -37
- package/dist/index.es9.js.map +0 -1
- package/dist/index.es90.js +0 -722
- package/dist/index.es90.js.map +0 -1
- package/dist/index.es91.js +0 -155
- package/dist/index.es91.js.map +0 -1
- package/dist/index.es92.js +0 -174
- package/dist/index.es92.js.map +0 -1
- package/dist/index.es93.js +0 -11
- package/dist/index.es93.js.map +0 -1
- package/dist/index.es94.js +0 -6
- package/dist/index.es94.js.map +0 -1
- package/dist/index.es95.js +0 -36
- package/dist/index.es95.js.map +0 -1
- package/dist/index.es96.js +0 -175
- package/dist/index.es96.js.map +0 -1
- package/dist/index.es97.js +0 -22
- package/dist/index.es97.js.map +0 -1
- package/dist/index.es98.js +0 -89
- package/dist/index.es98.js.map +0 -1
- package/dist/index.es99.js +0 -48
- package/dist/index.es99.js.map +0 -1
package/dist/index.es65.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es65.js","sources":["../docs/node_modules/.bun/@radix-ui+react-roving-focus@1.1.11+98e41321d0e6b3fa/node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;;;;;;AAcA,IAAI,cAAc;AAClB,IAAI,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAI;AACtD,IAAI,aAAa;AACjB,IAAI,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAAiB,UAAU;AACjF,IAAC,CAAC,+BAA+B,2BAA2B,IAAI;AAAA,EACjE;AAAA,EACA,CAAC,qBAAqB;AACxB;AACA,IAAI,CAAC,qBAAqB,qBAAqB,IAAI,8BAA8B,UAAU;AACxF,IAAC,mBAAmB,MAAM;AAAA,EAC3B,CAAC,OAAO,iBAAiB;AACvB,WAAuB,oBAAI,WAAW,UAAU,EAAE,OAAO,MAAM,yBAAyB,UAA0B,oBAAI,WAAW,MAAM,EAAE,OAAO,MAAM,yBAAyB,UAA0B,oBAAI,sBAAsB,EAAE,GAAG,OAAO,KAAK,cAAc,EAAC,CAAE,EAAC,CAAE;AAAA,EAC1Q;AACF;AACA,iBAAiB,cAAc;AAC/B,IAAI,uBAAuB,MAAM,WAAW,CAAC,OAAO,iBAAiB;AACnE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,4BAA4B;AAAA,IAC5B,GAAG;AAAA,EACP,IAAM;AACJ,QAAM,MAAM,MAAM,OAAO,IAAI;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AAY;AACpC,SAAO,MAAM,IAAI,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAC;AAC3E;AACG,IAAC,OAAO;AACR,IAAC,OAAO;","x_google_ignoreList":[0]}
|
package/dist/index.es66.js
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useComposedRefs } from "./index.es48.js";
|
|
3
|
-
import { Primitive } from "./index.es55.js";
|
|
4
|
-
import { useCallbackRef } from "./index.es74.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
7
|
-
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
8
|
-
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
9
|
-
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
10
|
-
var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
11
|
-
const {
|
|
12
|
-
loop = false,
|
|
13
|
-
trapped = false,
|
|
14
|
-
onMountAutoFocus: onMountAutoFocusProp,
|
|
15
|
-
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
16
|
-
...scopeProps
|
|
17
|
-
} = props;
|
|
18
|
-
const [container, setContainer] = React.useState(null);
|
|
19
|
-
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
20
|
-
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
21
|
-
const lastFocusedElementRef = React.useRef(null);
|
|
22
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
23
|
-
const focusScope = React.useRef({
|
|
24
|
-
paused: false,
|
|
25
|
-
pause() {
|
|
26
|
-
this.paused = true;
|
|
27
|
-
},
|
|
28
|
-
resume() {
|
|
29
|
-
this.paused = false;
|
|
30
|
-
}
|
|
31
|
-
}).current;
|
|
32
|
-
React.useEffect(() => {
|
|
33
|
-
if (trapped) {
|
|
34
|
-
let handleFocusIn2 = function(event) {
|
|
35
|
-
if (focusScope.paused || !container) return;
|
|
36
|
-
const target = event.target;
|
|
37
|
-
if (container.contains(target)) {
|
|
38
|
-
lastFocusedElementRef.current = target;
|
|
39
|
-
} else {
|
|
40
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
41
|
-
}
|
|
42
|
-
}, handleFocusOut2 = function(event) {
|
|
43
|
-
if (focusScope.paused || !container) return;
|
|
44
|
-
const relatedTarget = event.relatedTarget;
|
|
45
|
-
if (relatedTarget === null) return;
|
|
46
|
-
if (!container.contains(relatedTarget)) {
|
|
47
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
48
|
-
}
|
|
49
|
-
}, handleMutations2 = function(mutations) {
|
|
50
|
-
const focusedElement = document.activeElement;
|
|
51
|
-
if (focusedElement !== document.body) return;
|
|
52
|
-
for (const mutation of mutations) {
|
|
53
|
-
if (mutation.removedNodes.length > 0) focus(container);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
document.addEventListener("focusin", handleFocusIn2);
|
|
57
|
-
document.addEventListener("focusout", handleFocusOut2);
|
|
58
|
-
const mutationObserver = new MutationObserver(handleMutations2);
|
|
59
|
-
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
60
|
-
return () => {
|
|
61
|
-
document.removeEventListener("focusin", handleFocusIn2);
|
|
62
|
-
document.removeEventListener("focusout", handleFocusOut2);
|
|
63
|
-
mutationObserver.disconnect();
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}, [trapped, container, focusScope.paused]);
|
|
67
|
-
React.useEffect(() => {
|
|
68
|
-
if (container) {
|
|
69
|
-
focusScopesStack.add(focusScope);
|
|
70
|
-
const previouslyFocusedElement = document.activeElement;
|
|
71
|
-
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
72
|
-
if (!hasFocusedCandidate) {
|
|
73
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
74
|
-
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
75
|
-
container.dispatchEvent(mountEvent);
|
|
76
|
-
if (!mountEvent.defaultPrevented) {
|
|
77
|
-
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
78
|
-
if (document.activeElement === previouslyFocusedElement) {
|
|
79
|
-
focus(container);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return () => {
|
|
84
|
-
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
87
|
-
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
88
|
-
container.dispatchEvent(unmountEvent);
|
|
89
|
-
if (!unmountEvent.defaultPrevented) {
|
|
90
|
-
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
91
|
-
}
|
|
92
|
-
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
93
|
-
focusScopesStack.remove(focusScope);
|
|
94
|
-
}, 0);
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
98
|
-
const handleKeyDown = React.useCallback(
|
|
99
|
-
(event) => {
|
|
100
|
-
if (!loop && !trapped) return;
|
|
101
|
-
if (focusScope.paused) return;
|
|
102
|
-
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
103
|
-
const focusedElement = document.activeElement;
|
|
104
|
-
if (isTabKey && focusedElement) {
|
|
105
|
-
const container2 = event.currentTarget;
|
|
106
|
-
const [first, last] = getTabbableEdges(container2);
|
|
107
|
-
const hasTabbableElementsInside = first && last;
|
|
108
|
-
if (!hasTabbableElementsInside) {
|
|
109
|
-
if (focusedElement === container2) event.preventDefault();
|
|
110
|
-
} else {
|
|
111
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
112
|
-
event.preventDefault();
|
|
113
|
-
if (loop) focus(first, { select: true });
|
|
114
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
115
|
-
event.preventDefault();
|
|
116
|
-
if (loop) focus(last, { select: true });
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
[loop, trapped, focusScope.paused]
|
|
122
|
-
);
|
|
123
|
-
return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
124
|
-
});
|
|
125
|
-
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
126
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
127
|
-
const previouslyFocusedElement = document.activeElement;
|
|
128
|
-
for (const candidate of candidates) {
|
|
129
|
-
focus(candidate, { select });
|
|
130
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function getTabbableEdges(container) {
|
|
134
|
-
const candidates = getTabbableCandidates(container);
|
|
135
|
-
const first = findVisible(candidates, container);
|
|
136
|
-
const last = findVisible(candidates.reverse(), container);
|
|
137
|
-
return [first, last];
|
|
138
|
-
}
|
|
139
|
-
function getTabbableCandidates(container) {
|
|
140
|
-
const nodes = [];
|
|
141
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
142
|
-
acceptNode: (node) => {
|
|
143
|
-
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
144
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
145
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
149
|
-
return nodes;
|
|
150
|
-
}
|
|
151
|
-
function findVisible(elements, container) {
|
|
152
|
-
for (const element of elements) {
|
|
153
|
-
if (!isHidden(element, { upTo: container })) return element;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function isHidden(node, { upTo }) {
|
|
157
|
-
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
158
|
-
while (node) {
|
|
159
|
-
if (upTo !== void 0 && node === upTo) return false;
|
|
160
|
-
if (getComputedStyle(node).display === "none") return true;
|
|
161
|
-
node = node.parentElement;
|
|
162
|
-
}
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
function isSelectableInput(element) {
|
|
166
|
-
return element instanceof HTMLInputElement && "select" in element;
|
|
167
|
-
}
|
|
168
|
-
function focus(element, { select = false } = {}) {
|
|
169
|
-
if (element && element.focus) {
|
|
170
|
-
const previouslyFocusedElement = document.activeElement;
|
|
171
|
-
element.focus({ preventScroll: true });
|
|
172
|
-
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
173
|
-
element.select();
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
var focusScopesStack = createFocusScopesStack();
|
|
177
|
-
function createFocusScopesStack() {
|
|
178
|
-
let stack = [];
|
|
179
|
-
return {
|
|
180
|
-
add(focusScope) {
|
|
181
|
-
const activeFocusScope = stack[0];
|
|
182
|
-
if (focusScope !== activeFocusScope) {
|
|
183
|
-
activeFocusScope == null ? void 0 : activeFocusScope.pause();
|
|
184
|
-
}
|
|
185
|
-
stack = arrayRemove(stack, focusScope);
|
|
186
|
-
stack.unshift(focusScope);
|
|
187
|
-
},
|
|
188
|
-
remove(focusScope) {
|
|
189
|
-
var _a;
|
|
190
|
-
stack = arrayRemove(stack, focusScope);
|
|
191
|
-
(_a = stack[0]) == null ? void 0 : _a.resume();
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
function arrayRemove(array, item) {
|
|
196
|
-
const updatedArray = [...array];
|
|
197
|
-
const index = updatedArray.indexOf(item);
|
|
198
|
-
if (index !== -1) {
|
|
199
|
-
updatedArray.splice(index, 1);
|
|
200
|
-
}
|
|
201
|
-
return updatedArray;
|
|
202
|
-
}
|
|
203
|
-
function removeLinks(items) {
|
|
204
|
-
return items.filter((item) => item.tagName !== "A");
|
|
205
|
-
}
|
|
206
|
-
export {
|
|
207
|
-
FocusScope
|
|
208
|
-
};
|
|
209
|
-
//# sourceMappingURL=index.es66.js.map
|
package/dist/index.es66.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es66.js","sources":["../docs/node_modules/.bun/@radix-ui+react-focus-scope@1.1.7+98e41321d0e6b3fa/node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;AAQA,IAAI,qBAAqB;AACzB,IAAI,uBAAuB;AAC3B,IAAI,gBAAgB,EAAE,SAAS,OAAO,YAAY,KAAI;AACtD,IAAI,mBAAmB;AACpB,IAAC,aAAa,MAAM,WAAW,CAAC,OAAO,iBAAiB;AACzD,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB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AAAA,MACpB;AACA,cAAQ,YAAY,OAAO,UAAU;AACrC,YAAM,QAAQ,UAAU;AAAA,IAC1B;AAAA,IACA,OAAO,YAAY;;AACjB,cAAQ,YAAY,OAAO,UAAU;AACrC,kBAAM,CAAC,MAAP,mBAAU;AAAA,IACZ;AAAA,EACJ;AACA;AACA,SAAS,YAAY,OAAO,MAAM;AAChC,QAAM,eAAe,CAAC,GAAG,KAAK;AAC9B,QAAM,QAAQ,aAAa,QAAQ,IAAI;AACvC,MAAI,UAAU,IAAI;AAChB,iBAAa,OAAO,OAAO,CAAC;AAAA,EAC9B;AACA,SAAO;AACT;AACA,SAAS,YAAY,OAAO;AAC1B,SAAO,MAAM,OAAO,CAAC,SAAS,KAAK,YAAY,GAAG;AACpD;","x_google_ignoreList":[0]}
|
package/dist/index.es67.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import ReactDOM__default from "react-dom";
|
|
3
|
-
import { Primitive } from "./index.es55.js";
|
|
4
|
-
import { useLayoutEffect as useLayoutEffect2 } from "./index.es75.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var PORTAL_NAME = "Portal";
|
|
7
|
-
var Portal = React.forwardRef((props, forwardedRef) => {
|
|
8
|
-
var _a;
|
|
9
|
-
const { container: containerProp, ...portalProps } = props;
|
|
10
|
-
const [mounted, setMounted] = React.useState(false);
|
|
11
|
-
useLayoutEffect2(() => setMounted(true), []);
|
|
12
|
-
const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
|
|
13
|
-
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
14
|
-
});
|
|
15
|
-
Portal.displayName = PORTAL_NAME;
|
|
16
|
-
export {
|
|
17
|
-
Portal
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=index.es67.js.map
|
package/dist/index.es67.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es67.js","sources":["../docs/node_modules/.bun/@radix-ui+react-portal@1.1.9+98e41321d0e6b3fa/node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect","ReactDOM"],"mappings":";;;;;AAQA,IAAI,cAAc;AACf,IAAC,SAAS,MAAM,WAAW,CAAC,OAAO,iBAAiB;;AACrD,QAAM,EAAE,WAAW,eAAe,GAAG,YAAW,IAAK;AACrD,QAAM,CAAC,SAAS,UAAU,IAAI,MAAM,SAAS,KAAK;AAClDA,mBAAgB,MAAM,WAAW,IAAI,GAAG,CAAA,CAAE;AAC1C,QAAM,YAAY,iBAAiB,aAAW,8CAAY,aAAZ,mBAAsB;AACpE,SAAO,YAAYC,kBAAS,aAA6B,oBAAI,UAAU,KAAK,EAAE,GAAG,aAAa,KAAK,aAAY,CAAE,GAAG,SAAS,IAAI;AACnI,CAAC;AACD,OAAO,cAAc;","x_google_ignoreList":[0]}
|
package/dist/index.es68.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
var count = 0;
|
|
3
|
-
function useFocusGuards() {
|
|
4
|
-
React.useEffect(() => {
|
|
5
|
-
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6
|
-
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
7
|
-
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
8
|
-
count++;
|
|
9
|
-
return () => {
|
|
10
|
-
if (count === 1) {
|
|
11
|
-
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
12
|
-
}
|
|
13
|
-
count--;
|
|
14
|
-
};
|
|
15
|
-
}, []);
|
|
16
|
-
}
|
|
17
|
-
function createFocusGuard() {
|
|
18
|
-
const element = document.createElement("span");
|
|
19
|
-
element.setAttribute("data-radix-focus-guard", "");
|
|
20
|
-
element.tabIndex = 0;
|
|
21
|
-
element.style.outline = "none";
|
|
22
|
-
element.style.opacity = "0";
|
|
23
|
-
element.style.position = "fixed";
|
|
24
|
-
element.style.pointerEvents = "none";
|
|
25
|
-
return element;
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
useFocusGuards
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=index.es68.js.map
|
package/dist/index.es68.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es68.js","sources":["../docs/node_modules/.bun/@radix-ui+react-focus-guards@1.1.3+e2cc400bcbee7045/node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";AAIA,IAAI,QAAQ;AAKZ,SAAS,iBAAiB;AACxB,QAAM,UAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,kBAAkB;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,kBAAkB;AACpF;AACA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,QAAQ;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAA,CAAE;AACP;AACA,SAAS,mBAAmB;AAC1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;","x_google_ignoreList":[0]}
|
package/dist/index.es69.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { __assign } from "./index.es87.js";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { RemoveScroll } from "./index.es88.js";
|
|
4
|
-
import SideCar from "./index.es89.js";
|
|
5
|
-
var ReactRemoveScroll = React.forwardRef(function(props, ref) {
|
|
6
|
-
return React.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: SideCar }));
|
|
7
|
-
});
|
|
8
|
-
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
9
|
-
export {
|
|
10
|
-
ReactRemoveScroll as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=index.es69.js.map
|
package/dist/index.es69.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es69.js","sources":["../docs/node_modules/.bun/react-remove-scroll@2.7.1+e2cc400bcbee7045/node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":[],"mappings":";;;;AAIG,IAAC,oBAAoB,MAAM,WAAW,SAAU,OAAO,KAAK;AAAE,SAAQ,MAAM,cAAc,cAAc,SAAS,IAAI,OAAO,EAAE,KAAU,SAAS,QAAO,CAAE,CAAC;AAAI,CAAC;AACnK,kBAAkB,aAAa,aAAa;","x_google_ignoreList":[0]}
|
package/dist/index.es7.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { createContext, useContext, useMemo } from "react";
|
|
4
|
-
import { cn } from "./index.es4.js";
|
|
5
|
-
import { Label } from "./index.es13.js";
|
|
6
|
-
import { cva } from "./index.es34.js";
|
|
7
|
-
const FieldContext = createContext(null);
|
|
8
|
-
const useFieldContext = () => {
|
|
9
|
-
const context = useContext(FieldContext);
|
|
10
|
-
if (!context) {
|
|
11
|
-
throw new Error("FieldInput must be used within a Field component");
|
|
12
|
-
}
|
|
13
|
-
return context;
|
|
14
|
-
};
|
|
15
|
-
const FieldGroup = ({ className, ...props }) => {
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
17
|
-
"div",
|
|
18
|
-
{
|
|
19
|
-
"data-slot": "field-group",
|
|
20
|
-
className: cn(
|
|
21
|
-
"volt-group/field-group volt-@container/field-group volt-flex volt-w-full volt-flex-col volt-gap-2 volt-*:data-[slot=field-group]:gap-2 [&>div[data-slot=field]+[data-slot=field-description]]:pl-3",
|
|
22
|
-
className
|
|
23
|
-
),
|
|
24
|
-
...props
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
const FieldSet = ({
|
|
29
|
-
className,
|
|
30
|
-
...props
|
|
31
|
-
}) => {
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
-
"fieldset",
|
|
34
|
-
{
|
|
35
|
-
"data-slot": "field-set",
|
|
36
|
-
className: cn("volt-flex volt-flex-col volt-gap-6", className),
|
|
37
|
-
...props
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
const fieldVariants = cva(
|
|
42
|
-
"volt-relative volt-flex-col volt-*:w-full [&>.sr-only]:w-auto volt-group/field volt-flex volt-w-full volt-py-2 volt-px-3 volt-gap-1 volt-corner-squircle-lg volt-rounded-lg volt-transition-all volt-duration-75 volt-data-[focused=true]:outline-2 volt-data-[focused=true]:outline-offset-2",
|
|
43
|
-
{
|
|
44
|
-
variants: {
|
|
45
|
-
variant: {
|
|
46
|
-
default: "volt-bg-gray-a3 volt-hover:bg-gray-a4 volt-data-[focused=true]:outline-gray-a8",
|
|
47
|
-
highlight: "volt-bg-accent-a3 volt-hover:bg-accent-a4 volt-data-[focused=true]:outline-accent-a8",
|
|
48
|
-
readonly: "volt-bg-gray-a3 volt-data-[focused=true]:outline-gray-a8",
|
|
49
|
-
destructive: "volt-bg-error-soft volt-hover:bg-error-a4 volt-data-[focused=true]:outline-error-a8"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
defaultVariants: {
|
|
53
|
-
variant: "default"
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
const Field = ({ className, variant, children, ...props }) => {
|
|
58
|
-
const inputRef = React.useRef(null);
|
|
59
|
-
const [isFocused, setIsFocused] = React.useState(false);
|
|
60
|
-
return /* @__PURE__ */ jsx(FieldContext.Provider, { value: { inputRef }, children: /* @__PURE__ */ jsx(
|
|
61
|
-
"div",
|
|
62
|
-
{
|
|
63
|
-
role: "group",
|
|
64
|
-
"data-slot": "field",
|
|
65
|
-
className: cn(fieldVariants({ variant }), className),
|
|
66
|
-
"data-focused": isFocused ? "true" : "false",
|
|
67
|
-
onFocusCapture: () => setIsFocused(true),
|
|
68
|
-
onBlurCapture: () => setIsFocused(false),
|
|
69
|
-
...props,
|
|
70
|
-
children
|
|
71
|
-
}
|
|
72
|
-
) });
|
|
73
|
-
};
|
|
74
|
-
const FieldContent = ({ className, ...props }) => {
|
|
75
|
-
return /* @__PURE__ */ jsx(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
"data-slot": "field-content",
|
|
79
|
-
className: cn(
|
|
80
|
-
"volt-group/field-content volt-flex volt-flex-1 volt-flex-col volt-gap-2 volt-leading-snug",
|
|
81
|
-
className
|
|
82
|
-
),
|
|
83
|
-
...props
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
const FieldLabel = ({
|
|
88
|
-
className,
|
|
89
|
-
...props
|
|
90
|
-
}) => {
|
|
91
|
-
return /* @__PURE__ */ jsx(
|
|
92
|
-
Label,
|
|
93
|
-
{
|
|
94
|
-
"data-slot": "field-label",
|
|
95
|
-
className: cn(
|
|
96
|
-
"volt-group/field-label volt-min-h-5 volt-text-xs volt-peer/field-label volt-flex volt-w-fit volt-gap-2 volt-leading-snug volt-group-data-[disabled=true]/field:opacity-50",
|
|
97
|
-
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border volt-*:data-[slot=field]:p-4",
|
|
98
|
-
"volt-has-data-[state=checked]:bg-accent-a3/5 volt-has-data-[state=checked]:border-accent-a3 volt-dark:has-data-[state=checked]:bg-accent-a3/10",
|
|
99
|
-
className
|
|
100
|
-
),
|
|
101
|
-
...props
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
const FieldLabelContent = ({
|
|
106
|
-
className,
|
|
107
|
-
showOnHover = true,
|
|
108
|
-
...props
|
|
109
|
-
}) => {
|
|
110
|
-
return /* @__PURE__ */ jsx(
|
|
111
|
-
"div",
|
|
112
|
-
{
|
|
113
|
-
"data-slot": "field-label-content",
|
|
114
|
-
className: cn(
|
|
115
|
-
"volt-inline-flex volt-items-center volt-gap-1 volt-transition-opacity",
|
|
116
|
-
{
|
|
117
|
-
"volt-w-0 volt-h-0 volt-opacity-0 volt-pointer-events-none volt-group-hover/field:w-auto volt-group-hover/field:h-auto volt-group-hover/field:opacity-100 volt-group-hover/field:pointer-events-auto": showOnHover
|
|
118
|
-
},
|
|
119
|
-
className
|
|
120
|
-
),
|
|
121
|
-
...props
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
};
|
|
125
|
-
const FieldDescription = ({
|
|
126
|
-
className,
|
|
127
|
-
...props
|
|
128
|
-
}) => {
|
|
129
|
-
return /* @__PURE__ */ jsx(
|
|
130
|
-
"p",
|
|
131
|
-
{
|
|
132
|
-
"data-slot": "field-description",
|
|
133
|
-
className: cn(
|
|
134
|
-
"volt-text-gray-default volt-text-xs volt-leading-normal volt-font-normal",
|
|
135
|
-
"volt-last:mt-0 volt-nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
136
|
-
"[&>a:hover]:text-gray-default [&>a]:underline [&>a]:underline-offset-4",
|
|
137
|
-
className
|
|
138
|
-
),
|
|
139
|
-
...props
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
};
|
|
143
|
-
const FieldError = ({
|
|
144
|
-
className,
|
|
145
|
-
children,
|
|
146
|
-
errors,
|
|
147
|
-
...props
|
|
148
|
-
}) => {
|
|
149
|
-
const content = useMemo(() => {
|
|
150
|
-
var _a;
|
|
151
|
-
if (children) {
|
|
152
|
-
return children;
|
|
153
|
-
}
|
|
154
|
-
if (!(errors == null ? void 0 : errors.length)) {
|
|
155
|
-
return null;
|
|
156
|
-
}
|
|
157
|
-
const uniqueErrors = [
|
|
158
|
-
...new Map(errors.map((error) => [error == null ? void 0 : error.message, error])).values()
|
|
159
|
-
];
|
|
160
|
-
if ((uniqueErrors == null ? void 0 : uniqueErrors.length) == 1) {
|
|
161
|
-
return (_a = uniqueErrors[0]) == null ? void 0 : _a.message;
|
|
162
|
-
}
|
|
163
|
-
return /* @__PURE__ */ jsx("ul", { className: "volt-flex volt-list-disc volt-flex-col volt-m-0", children: uniqueErrors.map(
|
|
164
|
-
(error, index) => (error == null ? void 0 : error.message) && /* @__PURE__ */ jsx(
|
|
165
|
-
"li",
|
|
166
|
-
{
|
|
167
|
-
className: "volt-text-error-light volt-text-xs volt-font-normal volt-my-1 volt-marker:text-error-light",
|
|
168
|
-
children: error.message
|
|
169
|
-
},
|
|
170
|
-
index
|
|
171
|
-
)
|
|
172
|
-
) });
|
|
173
|
-
}, [children, errors]);
|
|
174
|
-
if (!content) {
|
|
175
|
-
return null;
|
|
176
|
-
}
|
|
177
|
-
return /* @__PURE__ */ jsx(
|
|
178
|
-
"div",
|
|
179
|
-
{
|
|
180
|
-
role: "alert",
|
|
181
|
-
"data-slot": "field-error",
|
|
182
|
-
className: cn("volt-text-error-light volt-text-xs volt-font-normal", className),
|
|
183
|
-
...props,
|
|
184
|
-
children: content
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
};
|
|
188
|
-
export {
|
|
189
|
-
Field,
|
|
190
|
-
FieldContent,
|
|
191
|
-
FieldDescription,
|
|
192
|
-
FieldError,
|
|
193
|
-
FieldGroup,
|
|
194
|
-
FieldLabel,
|
|
195
|
-
FieldLabelContent,
|
|
196
|
-
FieldSet,
|
|
197
|
-
fieldVariants,
|
|
198
|
-
useFieldContext
|
|
199
|
-
};
|
|
200
|
-
//# sourceMappingURL=index.es7.js.map
|
package/dist/index.es7.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es7.js","sources":["../src/components/field/field.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { createContext, useContext, useMemo } from \"react\"\nimport { Label } from \"@/components/label/label\"\nimport { cva, VariantProps } from \"class-variance-authority\"\n\ntype FieldInputRef =\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLSelectElement\n | HTMLButtonElement\n | null\n\nconst FieldContext = createContext<{\n inputRef: React.RefObject<FieldInputRef>\n} | null>(null)\n\nconst useFieldContext = () => {\n const context = useContext(FieldContext)\n\n if (!context) {\n throw new Error(\"FieldInput must be used within a Field component\")\n }\n\n return context\n}\n\nconst FieldGroup = ({ className, ...props }: React.ComponentProps<\"div\">) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n \"group/field-group @container/field-group flex w-full flex-col gap-2 *:data-[slot=field-group]:gap-2 [&>div[data-slot=field]+[data-slot=field-description]]:pl-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst FieldSet = ({\n className,\n ...props\n}: React.ComponentProps<\"fieldset\">) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\"flex flex-col gap-6\", className)}\n {...props}\n />\n )\n}\n\nconst fieldVariants = cva(\n \"relative flex-col *:w-full [&>.sr-only]:w-auto group/field flex w-full py-2 px-3 gap-1 corner-squircle-lg rounded-lg transition-all duration-75 data-[focused=true]:outline-2 data-[focused=true]:outline-offset-2\",\n {\n variants: {\n variant: {\n default:\n \"bg-gray-a3 hover:bg-gray-a4 data-[focused=true]:outline-gray-a8\",\n highlight:\n \"bg-accent-a3 hover:bg-accent-a4 data-[focused=true]:outline-accent-a8\",\n readonly: \"bg-gray-a3 data-[focused=true]:outline-gray-a8\",\n destructive:\n \"bg-error-soft hover:bg-error-a4 data-[focused=true]:outline-error-a8\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\ntype FieldProps = React.ComponentProps<\"div\"> & {\n children: React.ReactNode\n onClick?: (event: React.MouseEvent<HTMLDivElement>) => void\n variant?: VariantProps<typeof fieldVariants>[\"variant\"]\n}\n\nconst Field = ({ className, variant, children, ...props }: FieldProps) => {\n const inputRef = React.useRef<FieldInputRef>(null)\n const [isFocused, setIsFocused] = React.useState(false)\n\n return (\n <FieldContext.Provider value={{ inputRef }}>\n <div\n role=\"group\"\n data-slot=\"field\"\n className={cn(fieldVariants({ variant }), className)}\n data-focused={isFocused ? \"true\" : \"false\"}\n onFocusCapture={() => setIsFocused(true)}\n onBlurCapture={() => setIsFocused(false)}\n {...props}\n >\n {children}\n </div>\n </FieldContext.Provider>\n )\n}\n\n// TODO: revisit this component\nconst FieldContent = ({ className, ...props }: React.ComponentProps<\"div\">) => {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n \"group/field-content flex flex-1 flex-col gap-2 leading-snug\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst FieldLabel = ({\n className,\n ...props\n}: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n \"group/field-label min-h-5 text-xs peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4\",\n \"has-data-[state=checked]:bg-accent-a3/5 has-data-[state=checked]:border-accent-a3 dark:has-data-[state=checked]:bg-accent-a3/10\",\n className\n )}\n {...props}\n />\n )\n}\n\ntype FieldLabelContentProps = React.ComponentProps<\"div\"> & {\n showOnHover?: boolean\n}\n\nconst FieldLabelContent = ({\n className,\n showOnHover = true,\n ...props\n}: FieldLabelContentProps) => {\n return (\n <div\n data-slot=\"field-label-content\"\n className={cn(\n \"inline-flex items-center gap-1 transition-opacity\",\n {\n \"w-0 h-0 opacity-0 pointer-events-none group-hover/field:w-auto group-hover/field:h-auto group-hover/field:opacity-100 group-hover/field:pointer-events-auto\":\n showOnHover,\n },\n className\n )}\n {...props}\n />\n )\n}\n\nconst FieldDescription = ({\n className,\n ...props\n}: React.ComponentProps<\"p\">) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n \"text-gray-default text-xs leading-normal font-normal\",\n \"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5\",\n \"[&>a:hover]:text-gray-default [&>a]:underline [&>a]:underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst FieldError = ({\n className,\n children,\n errors,\n ...props\n}: React.ComponentProps<\"div\"> & {\n errors?: Array<{ message?: string } | undefined>\n}) => {\n const content = useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className=\"flex list-disc flex-col m-0\">\n {uniqueErrors.map(\n (error, index) =>\n error?.message && (\n <li\n className=\"text-error-light text-xs font-normal my-1 marker:text-error-light\"\n key={index}\n >\n {error.message}\n </li>\n )\n )}\n </ul>\n )\n }, [children, errors])\n\n if (!content) {\n return null\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn(\"text-error-light text-xs font-normal\", className)}\n {...props}\n >\n {content}\n </div>\n )\n}\n\nexport {\n Field,\n FieldSet,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLabel,\n FieldLabelContent,\n useFieldContext,\n fieldVariants,\n}\n"],"names":[],"mappings":";;;;;;AAaA,MAAM,eAAe,cAEX,IAAI;AAEd,MAAM,kBAAkB,MAAM;AAC5B,QAAM,UAAU,WAAW,YAAY;AAEvC,MAAI,CAAC,SA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