@anoki/fse-ui 2.1.0-SNAPSHOT1.1 → 2.1.0-SNAPSHOT1.4
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/components/ui/InfoPopup/InfoPopup.css +1 -1
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs138.js +1 -1
- package/dist/index.cjs159.js +1 -1
- package/dist/index.cjs160.js +1 -1
- package/dist/index.cjs161.js +1 -1
- package/dist/index.cjs162.js +1 -1
- package/dist/index.cjs163.js +1 -1
- package/dist/index.cjs164.js +1 -1
- package/dist/index.cjs165.js +1 -1
- package/dist/index.cjs166.js +1 -1
- package/dist/index.cjs167.js +1 -1
- package/dist/index.cjs168.js +1 -1
- package/dist/index.cjs169.js +1 -1
- package/dist/index.cjs170.js +1 -1
- package/dist/index.cjs171.js +1 -1
- package/dist/index.cjs172.js +1 -1
- package/dist/index.cjs173.js +1 -1
- package/dist/index.cjs174.js +1 -1
- package/dist/index.cjs175.js +1 -1
- package/dist/index.cjs176.js +1 -1
- package/dist/index.cjs177.js +1 -1
- package/dist/index.cjs178.js +1 -1
- package/dist/index.cjs179.js +1 -1
- package/dist/index.cjs180.js +1 -1
- package/dist/index.cjs181.js +1 -1
- package/dist/index.cjs185.js +1 -1
- package/dist/index.cjs186.js +1 -1
- package/dist/index.cjs187.js +1 -1
- package/dist/index.cjs189.js +1 -1
- package/dist/index.cjs190.js +1 -1
- package/dist/index.cjs191.js +1 -1
- package/dist/index.cjs192.js +1 -1
- package/dist/index.cjs193.js +1 -1
- package/dist/index.cjs194.js +1 -1
- package/dist/index.cjs195.js +1 -1
- package/dist/index.cjs196.js +1 -1
- package/dist/index.cjs197.js +1 -1
- package/dist/index.cjs199.js +1 -1
- package/dist/index.cjs200.js +1 -1
- package/dist/index.cjs201.js +1 -1
- package/dist/index.cjs202.js +1 -1
- package/dist/index.cjs203.js +1 -1
- package/dist/index.cjs204.js +1 -1
- package/dist/index.cjs205.js +1 -1
- package/dist/index.cjs208.js +1 -1
- package/dist/index.cjs209.js +1 -1
- package/dist/index.cjs210.js +1 -1
- package/dist/index.cjs211.js +1 -1
- package/dist/index.cjs212.js +1 -1
- package/dist/index.cjs213.js +1 -1
- package/dist/index.cjs214.js +1 -1
- package/dist/index.cjs215.js +1 -1
- package/dist/index.cjs216.js +1 -1
- package/dist/index.cjs217.js +1 -1
- package/dist/index.cjs223.js +1 -1
- package/dist/index.cjs225.js +1 -1
- package/dist/index.cjs226.js +1 -1
- package/dist/index.cjs227.js +1 -1
- package/dist/index.cjs24.js +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs258.js +1 -1
- package/dist/index.cjs272.js +1 -1
- package/dist/index.cjs272.js.map +1 -1
- package/dist/index.cjs279.js +1 -1
- package/dist/index.cjs279.js.map +1 -1
- package/dist/index.cjs28.js +1 -1
- package/dist/index.cjs281.js +2 -0
- package/dist/index.cjs281.js.map +1 -0
- package/dist/index.cjs300.js +1 -1
- package/dist/index.cjs302.js +1 -1
- package/dist/index.cjs310.js +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs321.js +1 -1
- package/dist/index.cjs326.js +1 -1
- package/dist/index.cjs328.js +1 -1
- package/dist/index.cjs33.js +1 -1
- package/dist/index.cjs335.js +1 -1
- package/dist/index.cjs340.js +1 -1
- package/dist/index.cjs351.js +1 -1
- package/dist/index.cjs357.js +1 -1
- package/dist/index.cjs358.js +1 -1
- package/dist/index.cjs359.js +1 -1
- package/dist/index.cjs400.js +1 -1
- package/dist/index.cjs432.js +1 -1
- package/dist/index.cjs432.js.map +1 -1
- package/dist/index.cjs441.js +1 -1
- package/dist/index.cjs449.js +1 -1
- package/dist/index.cjs460.js +1 -1
- package/dist/index.cjs461.js +1 -1
- package/dist/index.cjs462.js +27 -1
- package/dist/index.cjs462.js.map +1 -1
- package/dist/index.cjs463.js +1 -2
- package/dist/index.cjs463.js.map +1 -1
- package/dist/index.cjs464.js +1 -27
- package/dist/index.cjs464.js.map +1 -1
- package/dist/index.cjs465.js +1 -1
- package/dist/index.cjs465.js.map +1 -1
- package/dist/index.cjs466.js +2 -1
- package/dist/index.cjs466.js.map +1 -1
- package/dist/index.cjs474.js +1 -1
- package/dist/index.cjs475.js +1 -1
- package/dist/index.cjs477.js +1 -1
- package/dist/index.cjs477.js.map +1 -1
- package/dist/{index.cjs481.js → index.cjs478.js} +1 -1
- package/dist/{index.cjs481.js.map → index.cjs478.js.map} +1 -1
- package/dist/{index.cjs482.js → index.cjs479.js} +1 -1
- package/dist/{index.cjs482.js.map → index.cjs479.js.map} +1 -1
- package/dist/index.cjs480.js +1 -1
- package/dist/index.cjs480.js.map +1 -1
- package/dist/index.cjs483.js +2 -0
- package/dist/index.cjs483.js.map +1 -0
- package/dist/index.cjs486.js +2 -0
- package/dist/index.cjs486.js.map +1 -0
- package/dist/index.cjs487.js +2 -0
- package/dist/index.cjs487.js.map +1 -0
- package/dist/index.cjs488.js +1 -1
- package/dist/index.cjs488.js.map +1 -1
- package/dist/index.cjs489.js +1 -1
- package/dist/index.cjs489.js.map +1 -1
- package/dist/index.cjs490.js +1 -1
- package/dist/index.cjs490.js.map +1 -1
- package/dist/index.cjs491.js +1 -1
- package/dist/index.cjs491.js.map +1 -1
- package/dist/index.cjs492.js +1 -1
- package/dist/index.cjs492.js.map +1 -1
- package/dist/index.cjs514.js +1 -1
- package/dist/index.cjs524.js +2 -0
- package/dist/index.cjs524.js.map +1 -0
- package/dist/{index.cjs522.js → index.cjs525.js} +1 -1
- package/dist/index.cjs525.js.map +1 -0
- package/dist/index.cjs526.js +1 -1
- package/dist/index.cjs526.js.map +1 -1
- package/dist/index.cjs532.js +1 -1
- package/dist/index.cjs534.js +1 -1
- package/dist/index.cjs537.js +1 -1
- package/dist/index.cjs537.js.map +1 -1
- package/dist/index.cjs538.js +1 -1
- package/dist/index.cjs538.js.map +1 -1
- package/dist/index.cjs578.js +1 -1
- package/dist/index.cjs582.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs618.js +1 -1
- package/dist/index.cjs619.js +1 -1
- package/dist/index.cjs624.js +1 -1
- package/dist/index.cjs628.js +1 -1
- package/dist/index.cjs629.js +1 -1
- package/dist/index.cjs636.js +1 -1
- package/dist/index.cjs641.js +1 -1
- package/dist/index.cjs645.js +1 -1
- package/dist/index.cjs647.js +1 -1
- package/dist/index.cjs65.js +1 -1
- package/dist/index.cjs662.js +1 -1
- package/dist/index.cjs662.js.map +1 -1
- package/dist/index.cjs663.js +38 -1
- package/dist/index.cjs663.js.map +1 -1
- package/dist/index.cjs664.js +1 -1
- package/dist/index.cjs664.js.map +1 -1
- package/dist/index.cjs665.js +1 -1
- package/dist/index.cjs665.js.map +1 -1
- package/dist/index.cjs666.js +1 -38
- package/dist/index.cjs666.js.map +1 -1
- package/dist/index.cjs667.js +1 -1
- package/dist/index.cjs667.js.map +1 -1
- package/dist/index.cjs668.js +1 -1
- package/dist/index.cjs668.js.map +1 -1
- package/dist/index.cjs669.js +1 -1
- package/dist/index.cjs669.js.map +1 -1
- package/dist/index.cjs68.js +1 -1
- package/dist/index.cjs68.js.map +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.cjs76.js +1 -1
- package/dist/index.cjs76.js.map +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs80.js +1 -1
- package/dist/index.cjs80.js.map +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.es10.js +2 -2
- package/dist/index.es138.js +1 -1
- package/dist/index.es159.js +1 -1
- package/dist/index.es160.js +1 -1
- package/dist/index.es161.js +1 -1
- package/dist/index.es162.js +1 -1
- package/dist/index.es163.js +1 -1
- package/dist/index.es164.js +1 -1
- package/dist/index.es165.js +1 -1
- package/dist/index.es166.js +1 -1
- package/dist/index.es167.js +1 -1
- package/dist/index.es168.js +1 -1
- package/dist/index.es169.js +1 -1
- package/dist/index.es170.js +1 -1
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +1 -1
- package/dist/index.es173.js +1 -1
- package/dist/index.es174.js +1 -1
- package/dist/index.es175.js +1 -1
- package/dist/index.es176.js +1 -1
- package/dist/index.es177.js +1 -1
- package/dist/index.es178.js +1 -1
- package/dist/index.es179.js +1 -1
- package/dist/index.es180.js +1 -1
- package/dist/index.es181.js +1 -1
- package/dist/index.es185.js +1 -1
- package/dist/index.es186.js +1 -1
- package/dist/index.es187.js +1 -1
- package/dist/index.es189.js +1 -1
- package/dist/index.es190.js +1 -1
- package/dist/index.es191.js +1 -1
- package/dist/index.es192.js +1 -1
- package/dist/index.es193.js +1 -1
- package/dist/index.es194.js +1 -1
- package/dist/index.es195.js +1 -1
- package/dist/index.es196.js +1 -1
- package/dist/index.es197.js +1 -1
- package/dist/index.es199.js +1 -1
- package/dist/index.es200.js +1 -1
- package/dist/index.es201.js +1 -1
- package/dist/index.es202.js +1 -1
- package/dist/index.es203.js +1 -1
- package/dist/index.es204.js +1 -1
- package/dist/index.es205.js +1 -1
- package/dist/index.es208.js +1 -1
- package/dist/index.es209.js +1 -1
- package/dist/index.es210.js +1 -1
- package/dist/index.es211.js +1 -1
- package/dist/index.es212.js +1 -1
- package/dist/index.es213.js +1 -1
- package/dist/index.es214.js +1 -1
- package/dist/index.es215.js +1 -1
- package/dist/index.es216.js +1 -1
- package/dist/index.es217.js +1 -1
- package/dist/index.es223.js +1 -1
- package/dist/index.es225.js +1 -1
- package/dist/index.es226.js +1 -1
- package/dist/index.es227.js +1 -1
- package/dist/index.es24.js +1 -1
- package/dist/index.es251.js +1 -1
- package/dist/index.es258.js +2 -2
- package/dist/index.es272.js +15 -5
- package/dist/index.es272.js.map +1 -1
- package/dist/index.es279.js +27 -2
- package/dist/index.es279.js.map +1 -1
- package/dist/index.es28.js +1 -1
- package/dist/index.es281.js +5 -0
- package/dist/index.es281.js.map +1 -0
- package/dist/index.es300.js +1 -1
- package/dist/index.es302.js +1 -1
- package/dist/index.es310.js +3 -3
- package/dist/index.es32.js +1 -1
- package/dist/index.es321.js +1 -1
- package/dist/index.es326.js +1 -1
- package/dist/index.es328.js +8 -8
- package/dist/index.es33.js +1 -1
- package/dist/index.es335.js +1 -1
- package/dist/index.es340.js +1 -1
- package/dist/index.es351.js +1 -1
- package/dist/index.es357.js +1 -1
- package/dist/index.es358.js +1 -1
- package/dist/index.es359.js +2 -2
- package/dist/index.es400.js +1 -1
- package/dist/index.es432.js +14 -3
- package/dist/index.es432.js.map +1 -1
- package/dist/index.es441.js +1 -1
- package/dist/index.es449.js +1 -1
- package/dist/index.es460.js +1 -1
- package/dist/index.es461.js +1 -1
- package/dist/index.es462.js +3674 -5
- package/dist/index.es462.js.map +1 -1
- package/dist/index.es463.js +5 -520
- package/dist/index.es463.js.map +1 -1
- package/dist/index.es464.js +2 -3675
- package/dist/index.es464.js.map +1 -1
- package/dist/index.es465.js +5 -5
- package/dist/index.es465.js.map +1 -1
- package/dist/index.es466.js +521 -2
- package/dist/index.es466.js.map +1 -1
- package/dist/index.es474.js +1 -1
- package/dist/index.es475.js +8 -8
- package/dist/index.es477.js +6 -15
- package/dist/index.es477.js.map +1 -1
- package/dist/{index.es481.js → index.es478.js} +1 -1
- package/dist/{index.es481.js.map → index.es478.js.map} +1 -1
- package/dist/{index.es482.js → index.es479.js} +1 -1
- package/dist/{index.es482.js.map → index.es479.js.map} +1 -1
- package/dist/index.es480.js +15 -6
- package/dist/index.es480.js.map +1 -1
- package/dist/index.es483.js +18 -0
- package/dist/index.es483.js.map +1 -0
- package/dist/index.es486.js +128 -0
- package/dist/index.es486.js.map +1 -0
- package/dist/index.es487.js +138 -0
- package/dist/index.es487.js.map +1 -0
- package/dist/index.es488.js +14 -15
- package/dist/index.es488.js.map +1 -1
- package/dist/index.es489.js +12 -122
- package/dist/index.es489.js.map +1 -1
- package/dist/index.es490.js +8 -134
- package/dist/index.es490.js.map +1 -1
- package/dist/index.es491.js +50 -14
- package/dist/index.es491.js.map +1 -1
- package/dist/index.es492.js +54 -13
- package/dist/index.es492.js.map +1 -1
- package/dist/index.es514.js +1 -1
- package/dist/index.es524.js +8 -0
- package/dist/index.es524.js.map +1 -0
- package/dist/{index.es522.js → index.es525.js} +1 -1
- package/dist/index.es525.js.map +1 -0
- package/dist/index.es526.js +2 -5
- package/dist/index.es526.js.map +1 -1
- package/dist/index.es532.js +1 -1
- package/dist/index.es534.js +1 -1
- package/dist/index.es537.js +2 -14
- package/dist/index.es537.js.map +1 -1
- package/dist/index.es538.js +14 -2
- package/dist/index.es538.js.map +1 -1
- package/dist/index.es578.js +3 -3
- package/dist/index.es582.js +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es618.js +1 -1
- package/dist/index.es619.js +1 -1
- package/dist/index.es624.js +1 -1
- package/dist/index.es628.js +1 -1
- package/dist/index.es629.js +8 -8
- package/dist/index.es636.js +1 -1
- package/dist/index.es641.js +3 -3
- package/dist/index.es645.js +1 -1
- package/dist/index.es647.js +4 -4
- package/dist/index.es65.js +1 -1
- package/dist/index.es662.js +54 -512
- package/dist/index.es662.js.map +1 -1
- package/dist/index.es663.js +68 -126
- package/dist/index.es663.js.map +1 -1
- package/dist/index.es664.js +8 -128
- package/dist/index.es664.js.map +1 -1
- package/dist/index.es665.js +13 -64
- package/dist/index.es665.js.map +1 -1
- package/dist/index.es666.js +61 -68
- package/dist/index.es666.js.map +1 -1
- package/dist/index.es667.js +521 -7
- package/dist/index.es667.js.map +1 -1
- package/dist/index.es668.js +126 -13
- package/dist/index.es668.js.map +1 -1
- package/dist/index.es669.js +127 -60
- package/dist/index.es669.js.map +1 -1
- package/dist/index.es68.js +44 -42
- package/dist/index.es68.js.map +1 -1
- package/dist/index.es7.js +1 -1
- package/dist/index.es7.js.map +1 -1
- package/dist/index.es76.js +51 -42
- package/dist/index.es76.js.map +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es80.js +21 -19
- package/dist/index.es80.js.map +1 -1
- package/dist/index.es9.js +2 -2
- package/package.json +1 -1
- package/dist/index.cjs280.js +0 -2
- package/dist/index.cjs280.js.map +0 -1
- package/dist/index.cjs493.js +0 -2
- package/dist/index.cjs493.js.map +0 -1
- package/dist/index.cjs494.js +0 -2
- package/dist/index.cjs494.js.map +0 -1
- package/dist/index.cjs495.js +0 -2
- package/dist/index.cjs495.js.map +0 -1
- package/dist/index.cjs522.js.map +0 -1
- package/dist/index.cjs523.js +0 -2
- package/dist/index.cjs523.js.map +0 -1
- package/dist/index.es280.js +0 -30
- package/dist/index.es280.js.map +0 -1
- package/dist/index.es493.js +0 -12
- package/dist/index.es493.js.map +0 -1
- package/dist/index.es494.js +0 -53
- package/dist/index.es494.js.map +0 -1
- package/dist/index.es495.js +0 -59
- package/dist/index.es495.js.map +0 -1
- package/dist/index.es522.js.map +0 -1
- package/dist/index.es523.js +0 -5
- package/dist/index.es523.js.map +0 -1
- /package/dist/components/ui/{CardMapDoctorV2/CardMapDoctorV2.css → CardMapDoctor/CardMapDoctor.css} +0 -0
- /package/dist/components/ui/{DoctorModal/DoctorModalFooter/DoctorModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
package/dist/index.es489.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es489.js","sources":["../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DISMISSABLE_LAYER_NAME","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","originalBodyPointerEvents","DismissableLayerContext","React","DismissableLayer","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","node","setNode","ownerDocument","force","composedRefs","useComposedRefs","node2","layers","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","index","isBodyPointerEventsDisabled","isPointerEventsEnabled","pointerDownOutside","usePointerDownOutside","event","target","isPointerDownOnBranch","branch","focusOutside","useFocusOutside","useEscapeKeydown","dispatchUpdate","handleUpdate","jsx","Primitive","composeEventHandlers","BRANCH_NAME","DismissableLayerBranch","ref","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent2","handleAndDispatchCustomEvent","eventDetail","timerId","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","name","handler","detail","discrete","dispatchDiscreteCustomEvent"],"mappings":";;;;;;;AAUA,IAAIA,IAAyB,oBACzBC,IAAiB,2BACjBC,IAAuB,uCACvBC,IAAgB,iCAChBC,GACAC,IAA0BC,EAAM,cAAc;AAAA,EAChD,QAAwB,oBAAI,IAAK;AAAA,EACjC,wCAAwD,oBAAI,IAAK;AAAA,EACjE,UAA0B,oBAAI,IAAG;AACnC,CAAC,GACGC,IAAmBD,EAAM;AAAA,EAC3B,CAACE,GAAOC,MAAiB;AACvB,UAAM;AAAA,MACJ,6BAAAC,IAA8B;AAAA,MAC9B,iBAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,WAAAC;AAAA,MACA,GAAGC;AAAA,IACT,IAAQR,GACES,IAAUX,EAAM,WAAWD,CAAuB,GAClD,CAACa,GAAMC,CAAO,IAAIb,EAAM,SAAS,IAAI,GACrCc,KAAgBF,KAAA,gBAAAA,EAAM,mBAAiB,yCAAY,WACnD,CAAG,EAAAG,CAAK,IAAIf,EAAM,SAAS,CAAA,CAAE,GAC7BgB,IAAeC,EAAgBd,GAAc,CAACe,MAAUL,EAAQK,CAAK,CAAC,GACtEC,IAAS,MAAM,KAAKR,EAAQ,MAAM,GAClC,CAACS,CAA4C,IAAI,CAAC,GAAGT,EAAQ,sCAAsC,EAAE,MAAM,EAAE,GAC7GU,IAAoDF,EAAO,QAAQC,CAA4C,GAC/GE,IAAQV,IAAOO,EAAO,QAAQP,CAAI,IAAI,IACtCW,IAA8BZ,EAAQ,uCAAuC,OAAO,GACpFa,IAAyBF,KAASD,GAClCI,IAAqBC,EAAsB,CAACC,MAAU;AAC1D,YAAMC,IAASD,EAAM,QACfE,IAAwB,CAAC,GAAGlB,EAAQ,QAAQ,EAAE,KAAK,CAACmB,MAAWA,EAAO,SAASF,CAAM,CAAC;AAC5F,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AC3E,UAAU;AAAA,MACpB,CAAS;AAAA,IAEJ;AACD,WAAAb,EAAc,iBAAiB,WAAWuC,CAAW,GAC9C,MAAMvC,EAAc,oBAAoB,WAAWuC,CAAW;AAAA,EACzE,GAAK,CAACvC,GAAeqC,CAAkB,CAAC,GAC/B;AAAA,IACL,gBAAgB,MAAMC,EAA0B,UAAU;AAAA,IAC1D,eAAe,MAAMA,EAA0B,UAAU;AAAA,EAC1D;AACH;AACA,SAASlB,IAAiB;AACxB,QAAMP,IAAQ,IAAI,YAAYhC,CAAc;AAC5C,WAAS,cAAcgC,CAAK;AAC9B;AACA,SAASqB,EAA6BM,GAAMC,GAASC,GAAQ,EAAE,UAAAC,EAAQ,GAAI;AACzE,QAAM7B,IAAS4B,EAAO,cAAc,QAC9B7B,IAAQ,IAAI,YAAY2B,GAAM,EAAE,SAAS,IAAO,YAAY,IAAM,QAAAE,GAAQ;AAChF,EAAID,KAAS3B,EAAO,iBAAiB0B,GAAMC,GAAS,EAAE,MAAM,IAAM,GAC9DE,IACFC,EAA4B9B,GAAQD,CAAK,IAEzCC,EAAO,cAAcD,CAAK;AAE9B;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es489.js","sources":["../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-guards/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}\nvar Root = FocusGuards;\nexport {\n FocusGuards,\n Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["count","useFocusGuards","React","edgeGuards","createFocusGuard","node","element"],"mappings":";AAIA,IAAIA,IAAQ;AAKZ,SAASC,IAAiB;AACxB,EAAAC,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAa,SAAS,iBAAiB,0BAA0B;AACvE,oBAAS,KAAK,sBAAsB,cAAcA,EAAW,CAAC,KAAKC,GAAkB,GACrF,SAAS,KAAK,sBAAsB,aAAaD,EAAW,CAAC,KAAKC,GAAkB,GACpFJ,KACO,MAAM;AACX,MAAIA,MAAU,KACZ,SAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAACK,MAASA,EAAK,QAAQ,GAEvFL;AAAA,IACD;AAAA,EACF,GAAE,EAAE;AACP;AACA,SAASI,IAAmB;AAC1B,QAAME,IAAU,SAAS,cAAc,MAAM;AAC7C,SAAAA,EAAQ,aAAa,0BAA0B,EAAE,GACjDA,EAAQ,WAAW,GACnBA,EAAQ,MAAM,UAAU,QACxBA,EAAQ,MAAM,UAAU,KACxBA,EAAQ,MAAM,WAAW,SACzBA,EAAQ,MAAM,gBAAgB,QACvBA;AACT;","x_google_ignoreList":[0]}
|
package/dist/index.es490.js
CHANGED
@@ -1,138 +1,12 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
const {
|
8
|
-
loop: t = !1,
|
9
|
-
trapped: u = !1,
|
10
|
-
onMountAutoFocus: p,
|
11
|
-
onUnmountAutoFocus: L,
|
12
|
-
...g
|
13
|
-
} = e, [o, R] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), U = P(n, (s) => R(s)), a = d.useRef({
|
14
|
-
paused: !1,
|
15
|
-
pause() {
|
16
|
-
this.paused = !0;
|
17
|
-
},
|
18
|
-
resume() {
|
19
|
-
this.paused = !1;
|
20
|
-
}
|
21
|
-
}).current;
|
22
|
-
d.useEffect(() => {
|
23
|
-
if (u) {
|
24
|
-
let s = function(i) {
|
25
|
-
if (a.paused || !o) return;
|
26
|
-
const c = i.target;
|
27
|
-
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
28
|
-
}, l = function(i) {
|
29
|
-
if (a.paused || !o) return;
|
30
|
-
const c = i.relatedTarget;
|
31
|
-
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
32
|
-
}, r = function(i) {
|
33
|
-
if (document.activeElement === document.body)
|
34
|
-
for (const h of i)
|
35
|
-
h.removedNodes.length > 0 && f(o);
|
36
|
-
};
|
37
|
-
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
38
|
-
const m = new MutationObserver(r);
|
39
|
-
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
40
|
-
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
41
|
-
};
|
42
|
-
}
|
43
|
-
}, [u, o, a.paused]), d.useEffect(() => {
|
44
|
-
if (o) {
|
45
|
-
S.add(a);
|
46
|
-
const s = document.activeElement;
|
47
|
-
if (!o.contains(s)) {
|
48
|
-
const r = new CustomEvent(F, N);
|
49
|
-
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(V(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
50
|
-
}
|
51
|
-
return () => {
|
52
|
-
o.removeEventListener(F, E), setTimeout(() => {
|
53
|
-
const r = new CustomEvent(T, N);
|
54
|
-
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
|
55
|
-
}, 0);
|
56
|
-
};
|
57
|
-
}
|
58
|
-
}, [o, E, v, a]);
|
59
|
-
const A = d.useCallback(
|
60
|
-
(s) => {
|
61
|
-
if (!t && !u || a.paused) return;
|
62
|
-
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
63
|
-
if (l && r) {
|
64
|
-
const m = s.currentTarget, [i, c] = x(m);
|
65
|
-
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
|
66
|
-
}
|
67
|
-
},
|
68
|
-
[t, u, a.paused]
|
69
|
-
);
|
70
|
-
return /* @__PURE__ */ _.jsx(M.div, { tabIndex: -1, ...g, ref: U, onKeyDown: A });
|
1
|
+
import { __assign as m } from "./index.es579.js";
|
2
|
+
import * as r from "react";
|
3
|
+
import { RemoveScroll as e } from "./index.es580.js";
|
4
|
+
import t from "./index.es581.js";
|
5
|
+
var s = r.forwardRef(function(a, o) {
|
6
|
+
return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
|
71
7
|
});
|
72
|
-
|
73
|
-
function w(e, { select: n = !1 } = {}) {
|
74
|
-
const t = document.activeElement;
|
75
|
-
for (const u of e)
|
76
|
-
if (f(u, { select: n }), document.activeElement !== t) return;
|
77
|
-
}
|
78
|
-
function x(e) {
|
79
|
-
const n = I(e), t = O(n, e), u = O(n.reverse(), e);
|
80
|
-
return [t, u];
|
81
|
-
}
|
82
|
-
function I(e) {
|
83
|
-
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
84
|
-
acceptNode: (u) => {
|
85
|
-
const p = u.tagName === "INPUT" && u.type === "hidden";
|
86
|
-
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
87
|
-
}
|
88
|
-
});
|
89
|
-
for (; t.nextNode(); ) n.push(t.currentNode);
|
90
|
-
return n;
|
91
|
-
}
|
92
|
-
function O(e, n) {
|
93
|
-
for (const t of e)
|
94
|
-
if (!D(t, { upTo: n })) return t;
|
95
|
-
}
|
96
|
-
function D(e, { upTo: n }) {
|
97
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
98
|
-
for (; e; ) {
|
99
|
-
if (n !== void 0 && e === n) return !1;
|
100
|
-
if (getComputedStyle(e).display === "none") return !0;
|
101
|
-
e = e.parentElement;
|
102
|
-
}
|
103
|
-
return !1;
|
104
|
-
}
|
105
|
-
function H(e) {
|
106
|
-
return e instanceof HTMLInputElement && "select" in e;
|
107
|
-
}
|
108
|
-
function f(e, { select: n = !1 } = {}) {
|
109
|
-
if (e && e.focus) {
|
110
|
-
const t = document.activeElement;
|
111
|
-
e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
|
112
|
-
}
|
113
|
-
}
|
114
|
-
var S = j();
|
115
|
-
function j() {
|
116
|
-
let e = [];
|
117
|
-
return {
|
118
|
-
add(n) {
|
119
|
-
const t = e[0];
|
120
|
-
n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
|
121
|
-
},
|
122
|
-
remove(n) {
|
123
|
-
var t;
|
124
|
-
e = C(e, n), (t = e[0]) == null || t.resume();
|
125
|
-
}
|
126
|
-
};
|
127
|
-
}
|
128
|
-
function C(e, n) {
|
129
|
-
const t = [...e], u = t.indexOf(n);
|
130
|
-
return u !== -1 && t.splice(u, 1), t;
|
131
|
-
}
|
132
|
-
function V(e) {
|
133
|
-
return e.filter((n) => n.tagName !== "A");
|
134
|
-
}
|
8
|
+
s.classNames = e.classNames;
|
135
9
|
export {
|
136
|
-
|
10
|
+
s as default
|
137
11
|
};
|
138
12
|
//# sourceMappingURL=index.es490.js.map
|
package/dist/index.es490.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es490.js","sources":["../node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-scope/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":["AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","React","props","forwardedRef","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","useCallbackRef","onUnmountAutoFocus","lastFocusedElementRef","composedRefs","useComposedRefs","node","focusScope","handleFocusIn2","event","target","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","handleKeyDown","isTabKey","focusedElement","container2","first","last","getTabbableEdges","jsx","Primitive","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","element","isHidden","upTo","isSelectableInput","createFocusScopesStack","stack","activeFocusScope","arrayRemove","_a","array","item","updatedArray","index","items"],"mappings":";;;;;AAQA,IAAIA,IAAqB,+BACrBC,IAAuB,iCACvBC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAM,GACpDC,IAAmB,cACnBC,IAAaC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACzD,QAAM;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,SAAAC,IAAU;AAAA,IACV,kBAAkBC;AAAA,IAClB,oBAAoBC;AAAA,IACpB,GAAGC;AAAA,EACP,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OxC,CAAU,IACrC2C,IAAAH,EAAM,CAAC,MAAP,QAAAG,EAAU;AAAA,IAChB;AAAA,EACG;AACH;AACA,SAASD,EAAYE,GAAOC,GAAM;AAChC,QAAMC,IAAe,CAAC,GAAGF,CAAK,GACxBG,IAAQD,EAAa,QAAQD,CAAI;AACvC,SAAIE,MAAU,MACZD,EAAa,OAAOC,GAAO,CAAC,GAEvBD;AACT;AACA,SAAS/B,EAAYiC,GAAO;AAC1B,SAAOA,EAAM,OAAO,CAACH,MAASA,EAAK,YAAY,GAAG;AACpD;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es490.js","sources":["../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":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,CAAE,GAAEH,GAAO,EAAE,KAAKC,GAAK,SAASG,GAAS,CAAC;AAAK,CAAA;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
|
package/dist/index.es491.js
CHANGED
@@ -1,17 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
var S = function(r) {
|
2
|
+
if (typeof document > "u")
|
3
|
+
return null;
|
4
|
+
var u = Array.isArray(r) ? r[0] : r;
|
5
|
+
return u.ownerDocument.body;
|
6
|
+
}, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
|
7
|
+
return r && (r.host || W(r.parentNode));
|
8
|
+
}, D = function(r, u) {
|
9
|
+
return u.map(function(e) {
|
10
|
+
if (r.contains(e))
|
11
|
+
return e;
|
12
|
+
var n = W(e);
|
13
|
+
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
14
|
+
}).filter(function(e) {
|
15
|
+
return !!e;
|
16
|
+
});
|
17
|
+
}, E = function(r, u, e, n) {
|
18
|
+
var i = D(u, Array.isArray(r) ? r : [r]);
|
19
|
+
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
20
|
+
var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
21
|
+
!t || s.has(t) || (s.add(t), y(t.parentNode));
|
22
|
+
};
|
23
|
+
i.forEach(y);
|
24
|
+
var A = function(t) {
|
25
|
+
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
26
|
+
if (s.has(a))
|
27
|
+
A(a);
|
28
|
+
else
|
29
|
+
try {
|
30
|
+
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
|
31
|
+
f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
32
|
+
} catch (k) {
|
33
|
+
console.error("aria-hidden: cannot operate on ", a, k);
|
34
|
+
}
|
35
|
+
});
|
36
|
+
};
|
37
|
+
return A(u), s.clear(), h++, function() {
|
38
|
+
l.forEach(function(t) {
|
39
|
+
var a = f.get(t) - 1, c = o.get(t) - 1;
|
40
|
+
f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
41
|
+
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
42
|
+
};
|
43
|
+
}, C = function(r, u, e) {
|
44
|
+
e === void 0 && (e = "data-aria-hidden");
|
45
|
+
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
46
|
+
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
|
47
|
+
return null;
|
48
|
+
};
|
49
|
+
};
|
14
50
|
export {
|
15
|
-
|
51
|
+
C as hideOthers
|
16
52
|
};
|
17
53
|
//# sourceMappingURL=index.es491.js.map
|
package/dist/index.es491.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es491.js","sources":["../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/portal/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":["PORTAL_NAME","Portal","React","props","forwardedRef","containerProp","portalProps","mounted","setMounted","useLayoutEffect","container","_a","ReactDOM","jsx","Primitive"],"mappings":";;;;;AAQA,IAAIA,IAAc,UACdC,IAASC,EAAM,WAAW,CAACC,GAAOC,MAAiB;;AACrD,QAAM,EAAE,WAAWC,GAAe,GAAGC,EAAa,IAAGH,GAC/C,CAACI,GAASC,CAAU,IAAIN,EAAM,SAAS,EAAK;AAClDO,EAAAA,EAAgB,MAAMD,EAAW,EAAI,GAAG,CAAA,CAAE;AAC1C,QAAME,IAAYL,KAAiBE,OAAWI,IAAA,yCAAY,aAAZ,gBAAAA,EAAsB;AACpE,SAAOD,IAAYE,EAAS,aAA6BC,gBAAAA,EAAG,IAACC,EAAU,KAAK,EAAE,GAAGR,GAAa,KAAKF,EAAc,CAAA,GAAGM,CAAS,IAAI;AACnI,CAAC;AACDT,EAAO,cAAcD;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es491.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GA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IAAa,SAAU9B,GAAgBe,GAAYC,GAAY;AACtE,EAAIA,MAAe,WAAUA,IAAa;AAC1C,MAAIN,IAAU,MAAM,KAAK,MAAM,QAAQV,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC,GACtF+B,IAAiChC,EAAiBC,CAAc;AACpE,SAAK+B,KAILrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,aAAa,CAAC,CAAC,GACjFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KAJvE,WAAY;AAAE,WAAO;AAAA,EAAO;AAK3C;","x_google_ignoreList":[0]}
|
package/dist/index.es492.js
CHANGED
@@ -1,18 +1,59 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
import * as l from "react";
|
2
|
+
import { composeRefs as y } from "./index.es471.js";
|
3
|
+
import { j as f } from "./index.es247.js";
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
5
|
+
function S(e) {
|
6
|
+
const t = /* @__PURE__ */ g(e), o = l.forwardRef((n, r) => {
|
7
|
+
const { children: i, ...a } = n, s = l.Children.toArray(i), p = s.find(E);
|
8
|
+
if (p) {
|
9
|
+
const c = p.props.children, m = s.map((u) => u === p ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : u);
|
10
|
+
return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: l.isValidElement(c) ? l.cloneElement(c, void 0, m) : null });
|
11
|
+
}
|
12
|
+
return /* @__PURE__ */ f.jsx(t, { ...a, ref: r, children: i });
|
13
|
+
});
|
14
|
+
return o.displayName = `${e}.Slot`, o;
|
10
15
|
}
|
11
|
-
|
12
|
-
|
13
|
-
|
16
|
+
var h = /* @__PURE__ */ S("Slot");
|
17
|
+
// @__NO_SIDE_EFFECTS__
|
18
|
+
function g(e) {
|
19
|
+
const t = l.forwardRef((o, n) => {
|
20
|
+
const { children: r, ...i } = o;
|
21
|
+
if (l.isValidElement(r)) {
|
22
|
+
const a = x(r), s = R(i, r.props);
|
23
|
+
return r.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(r, s);
|
24
|
+
}
|
25
|
+
return l.Children.count(r) > 1 ? l.Children.only(null) : null;
|
26
|
+
});
|
27
|
+
return t.displayName = `${e}.SlotClone`, t;
|
28
|
+
}
|
29
|
+
var d = Symbol("radix.slottable");
|
30
|
+
// @__NO_SIDE_EFFECTS__
|
31
|
+
function j(e) {
|
32
|
+
const t = ({ children: o }) => /* @__PURE__ */ f.jsx(f.Fragment, { children: o });
|
33
|
+
return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
|
34
|
+
}
|
35
|
+
function E(e) {
|
36
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
|
37
|
+
}
|
38
|
+
function R(e, t) {
|
39
|
+
const o = { ...t };
|
40
|
+
for (const n in t) {
|
41
|
+
const r = e[n], i = t[n];
|
42
|
+
/^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
|
43
|
+
i(...s), r(...s);
|
44
|
+
} : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
|
45
|
+
}
|
46
|
+
return { ...e, ...o };
|
47
|
+
}
|
48
|
+
function x(e) {
|
49
|
+
var n, r;
|
50
|
+
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
51
|
+
return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
14
52
|
}
|
15
53
|
export {
|
16
|
-
|
54
|
+
h as Root,
|
55
|
+
h as Slot,
|
56
|
+
S as createSlot,
|
57
|
+
j as createSlottable
|
17
58
|
};
|
18
59
|
//# sourceMappingURL=index.es492.js.map
|
package/dist/index.es492.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es492.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es492.js","sources":["../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","Slot","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeQ,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuBC,gBAAAA,EAAAA,IAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAUF,EAAM,eAAeQ,CAAU,IAAIR,EAAM,aAAaQ,GAAY,QAAQC,CAAW,IAAI,MAAM;AAAA,IACxL;AACI,WAAuBE,gBAAAA,EAAAA,IAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAAC,GAAU;AAAA,EACvF,CAAG;AACD,SAAAJ,EAAM,cAAc,GAAGH,CAAS,SACzBG;AACT;AACG,IAACa,IAAuB,gBAAAjB,EAAW,MAAM;AAAA;AAE5C,SAASG,EAAgBF,GAAW;AAClC,QAAMC,IAAYG,EAAM,WAAW,CAACC,GAAOC,MAAiB;AAC1D,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH;AACnC,QAAID,EAAM,eAAeG,CAAQ,GAAG;AAClC,YAAMU,IAAcC,EAAcX,CAAQ,GACpCY,IAASC,EA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AA,EAExF;AACE,SAAO,EAAE,GAAGtB,GAAW,GAAGmB,EAAe;AAC3C;AACA,SAAST,EAAcc,GAAS;;AAC9B,MAAIC,KAASC,IAAA,OAAO,yBAAyBF,EAAQ,OAAO,KAAK,MAApD,gBAAAE,EAAuD,KAChEC,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIE,IACKH,EAAQ,OAEjBC,KAASG,IAAA,OAAO,yBAAyBJ,GAAS,KAAK,MAA9C,gBAAAI,EAAiD,KAC1DD,IAAUF,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDE,IACKH,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
|
package/dist/index.es514.js
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
import { j as e } from "./index.es247.js";
|
2
|
+
function t({ children: o }) {
|
3
|
+
return /* @__PURE__ */ e.jsx("article", { className: "shadow rounded h-100 w-100 bg-white d-flex flex-column", children: o });
|
4
|
+
}
|
5
|
+
export {
|
6
|
+
t as CardRoot
|
7
|
+
};
|
8
|
+
//# sourceMappingURL=index.es524.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es524.js","sources":["../src/components/ui/card/CardRoot.tsx"],"sourcesContent":["import { PropsWithChildren } from \"react\";\r\n\r\nexport function CardRoot({ children }: PropsWithChildren) {\r\n return (\r\n <article className=\"shadow rounded h-100 w-100 bg-white d-flex flex-column\">\r\n {children}\r\n </article>\r\n );\r\n}\r\n"],"names":["CardRoot","children","jsx"],"mappings":";AAEgB,SAAAA,EAAS,EAAE,UAAAC,KAA+B;AACxD,SACGC,gBAAAA,EAAAA,IAAA,WAAA,EAAQ,WAAU,0DAChB,UAAAD,EACH,CAAA;AAEJ;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es525.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es526.js
CHANGED
@@ -1,8 +1,5 @@
|
|
1
|
-
|
2
|
-
function t({ children: o }) {
|
3
|
-
return /* @__PURE__ */ e.jsx("article", { className: "shadow rounded h-100 w-100 bg-white d-flex flex-column", children: o });
|
4
|
-
}
|
1
|
+
var e = {};
|
5
2
|
export {
|
6
|
-
|
3
|
+
e as __exports
|
7
4
|
};
|
8
5
|
//# sourceMappingURL=index.es526.js.map
|
package/dist/index.es526.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es526.js","sources":[
|
1
|
+
{"version":3,"file":"index.es526.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.es532.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import r from "react";
|
2
2
|
import { createContextScope as y } from "./index.es472.js";
|
3
3
|
import { useComposedRefs as S } from "./index.es471.js";
|
4
|
-
import { createSlot as M } from "./index.
|
4
|
+
import { createSlot as M } from "./index.es492.js";
|
5
5
|
import { j as d } from "./index.es247.js";
|
6
6
|
function D(s) {
|
7
7
|
const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
|
package/dist/index.es534.js
CHANGED
@@ -6,7 +6,7 @@ import { createContextScope as Re } from "./index.es472.js";
|
|
6
6
|
import { Primitive as z } from "./index.es474.js";
|
7
7
|
import { useCallbackRef as Ee } from "./index.es531.js";
|
8
8
|
import { useLayoutEffect as B } from "./index.es536.js";
|
9
|
-
import { useSize as Ne } from "./index.
|
9
|
+
import { useSize as Ne } from "./index.es478.js";
|
10
10
|
import { j as f } from "./index.es247.js";
|
11
11
|
import { autoUpdate as _e } from "./index.es578.js";
|
12
12
|
var N = "Popper", [L, Ue] = Re(N), [$e, Z] = L(N), U = (e) => {
|
package/dist/index.es537.js
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
function p(n, e = globalThis == null ? void 0 : globalThis.document) {
|
4
|
-
const t = s(n);
|
5
|
-
r.useEffect(() => {
|
6
|
-
const o = (a) => {
|
7
|
-
a.key === "Escape" && t(a);
|
8
|
-
};
|
9
|
-
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
10
|
-
}, [t, e]);
|
11
|
-
}
|
12
|
-
export {
|
13
|
-
p as useEscapeKeydown
|
14
|
-
};
|
1
|
+
import { __require as e } from "./index.es582.js";
|
2
|
+
e();
|
15
3
|
//# sourceMappingURL=index.es537.js.map
|
package/dist/index.es537.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es537.js","sources":[
|
1
|
+
{"version":3,"file":"index.es537.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.es538.js
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import * as r from "react";
|
2
|
+
import { useCallbackRef as s } from "./index.es531.js";
|
3
|
+
function p(n, e = globalThis == null ? void 0 : globalThis.document) {
|
4
|
+
const t = s(n);
|
5
|
+
r.useEffect(() => {
|
6
|
+
const o = (a) => {
|
7
|
+
a.key === "Escape" && t(a);
|
8
|
+
};
|
9
|
+
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
10
|
+
}, [t, e]);
|
11
|
+
}
|
12
|
+
export {
|
13
|
+
p as useEscapeKeydown
|
14
|
+
};
|
3
15
|
//# sourceMappingURL=index.es538.js.map
|
package/dist/index.es538.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es538.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
1
|
+
{"version":3,"file":"index.es538.js","sources":["../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs"],"sourcesContent":["// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","useCallbackRef","React","handleKeyDown","event"],"mappings":";;AAGA,SAASA,EAAiBC,GAAqBC,IAAgB,yCAAY,UAAU;AACnF,QAAMC,IAAkBC,EAAeH,CAAmB;AAC1D,EAAAI,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAgB,CAACC,MAAU;AAC/B,MAAIA,EAAM,QAAQ,YAChBJ,EAAgBI,CAAK;AAAA,IAExB;AACD,WAAAL,EAAc,iBAAiB,WAAWI,GAAe,EAAE,SAAS,IAAM,GACnE,MAAMJ,EAAc,oBAAoB,WAAWI,GAAe,EAAE,SAAS,IAAM;AAAA,EAC9F,GAAK,CAACH,GAAiBD,CAAa,CAAC;AACrC;","x_google_ignoreList":[0]}
|
package/dist/index.es578.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { offset as ot, shift as st, flip as rt, size as ct, hide as lt, limitShift as ft, computePosition as ut, arrow as ht } from "./index.
|
2
|
-
import { createCoords as m, round as A, max as E, min as V, rectToClientRect as J, floor as D } from "./index.
|
3
|
-
import { isElement as v, getDocumentElement as O, getOverflowAncestors as $, getComputedStyle as R, isHTMLElement as b, getWindow as L, isTopLayer as S, getParentNode as W, isLastTraversableNode as H, isTableElement as at, isContainingBlock as Q, getContainingBlock as dt, getNodeName as M, isOverflowElement as _, getNodeScroll as N, getFrameElement as K, isWebKit as Y } from "./index.
|
1
|
+
import { offset as ot, shift as st, flip as rt, size as ct, hide as lt, limitShift as ft, computePosition as ut, arrow as ht } from "./index.es667.js";
|
2
|
+
import { createCoords as m, round as A, max as E, min as V, rectToClientRect as J, floor as D } from "./index.es668.js";
|
3
|
+
import { isElement as v, getDocumentElement as O, getOverflowAncestors as $, getComputedStyle as R, isHTMLElement as b, getWindow as L, isTopLayer as S, getParentNode as W, isLastTraversableNode as H, isTableElement as at, isContainingBlock as Q, getContainingBlock as dt, getNodeName as M, isOverflowElement as _, getNodeScroll as N, getFrameElement as K, isWebKit as Y } from "./index.es669.js";
|
4
4
|
function Z(t) {
|
5
5
|
const e = R(t);
|
6
6
|
let i = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
package/dist/index.es582.js
CHANGED
package/dist/index.es6.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { j as l } from "./index.es247.js";
|
2
2
|
import { clsx as u } from "./index.es249.js";
|
3
3
|
import { useMemo as x } from "react";
|
4
|
-
import { createSpacingClasses as C } from "./index.
|
4
|
+
import { createSpacingClasses as C } from "./index.es279.js";
|
5
5
|
import './components/ui/Container/Container.css';/* empty css */
|
6
6
|
const y = ({
|
7
7
|
as: o,
|
package/dist/index.es618.js
CHANGED
package/dist/index.es619.js
CHANGED
@@ -7,7 +7,7 @@ import { VisuallyHidden as b } from "./index.es642.js";
|
|
7
7
|
import { extractProps as y } from "./index.es621.js";
|
8
8
|
import { mapResponsiveProp as E, mapButtonSizeToSpinnerSize as g } from "./index.es656.js";
|
9
9
|
import { marginPropDefs as h } from "./index.es623.js";
|
10
|
-
import { Root as z } from "./index.
|
10
|
+
import { Root as z } from "./index.es492.js";
|
11
11
|
const S = e.forwardRef((t, o) => {
|
12
12
|
const { size: i = s.size.default } = t, { className: n, children: a, asChild: l, color: m, radius: d, disabled: r = t.loading, ...p } = y(t, s, h), c = l ? z : "button";
|
13
13
|
return e.createElement(c, { "data-disabled": r || void 0, "data-accent-color": m, "data-radius": d, ...p, ref: o, className: u("rt-reset", "rt-BaseButton", n), disabled: r }, t.loading ? e.createElement(e.Fragment, null, e.createElement("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0 }, a), e.createElement(b, null, a), e.createElement(f, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0" }, e.createElement("span", null, e.createElement(B, { size: E(i, g) })))) : a);
|
package/dist/index.es624.js
CHANGED