@protonradio/proton-ui 0.11.13 → 0.11.14
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/README.md +148 -148
- package/dist/components/ActionMenu/ActionMenu.cjs.js +1 -1
- package/dist/components/ActionMenu/ActionMenu.cjs.js.map +1 -1
- package/dist/components/ActionMenu/ActionMenu.es.js.map +1 -1
- package/dist/components/Badge/Badge.cjs.js.map +1 -1
- package/dist/components/Badge/Badge.es.js.map +1 -1
- package/dist/components/Banner/Banner.cjs.js +1 -1
- package/dist/components/Banner/Banner.cjs.js.map +1 -1
- package/dist/components/Banner/Banner.es.js.map +1 -1
- package/dist/components/Button/Button.cjs.js +1 -1
- package/dist/components/Button/Button.cjs.js.map +1 -1
- package/dist/components/Button/Button.es.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.es.js.map +1 -1
- package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js.map +1 -1
- package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js +13 -13
- package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js.map +1 -1
- package/dist/components/DataTable/DataTable.cjs.js +1 -1
- package/dist/components/DataTable/DataTable.cjs.js.map +1 -1
- package/dist/components/DataTable/DataTable.es.js.map +1 -1
- package/dist/components/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Dialog/Dialog.cjs.js.map +1 -1
- package/dist/components/Dialog/Dialog.es.js.map +1 -1
- package/dist/components/Elevation/Elevation.cjs.js.map +1 -1
- package/dist/components/Elevation/Elevation.es.js.map +1 -1
- package/dist/components/Icon/Icon.cjs.js.map +1 -1
- package/dist/components/Icon/Icon.es.js.map +1 -1
- package/dist/components/ImageBackground/ImageBackground.cjs.js.map +1 -1
- package/dist/components/ImageBackground/ImageBackground.es.js.map +1 -1
- package/dist/components/Input/BaseInput/Input.cjs.js +1 -1
- package/dist/components/Input/BaseInput/Input.cjs.js.map +1 -1
- package/dist/components/Input/BaseInput/Input.es.js.map +1 -1
- package/dist/components/Input/CopyInput/CopyInput.cjs.js.map +1 -1
- package/dist/components/Input/CopyInput/CopyInput.es.js.map +1 -1
- package/dist/components/Input/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/Input/SearchInput/SearchInput.cjs.js.map +1 -1
- package/dist/components/Input/SearchInput/SearchInput.es.js +1 -1
- package/dist/components/Input/SearchInput/SearchInput.es.js.map +1 -1
- package/dist/components/Menu/MenuTrigger.cjs.js +1 -1
- package/dist/components/Menu/MenuTrigger.cjs.js.map +1 -1
- package/dist/components/Menu/MenuTrigger.es.js.map +1 -1
- package/dist/components/Menu/PopoverMenu.cjs.js.map +1 -1
- package/dist/components/Menu/PopoverMenu.es.js.map +1 -1
- package/dist/components/Modal/Modal.cjs.js +1 -1
- package/dist/components/Modal/Modal.cjs.js.map +1 -1
- package/dist/components/Modal/Modal.es.js.map +1 -1
- package/dist/components/Popover/Popover.cjs.js.map +1 -1
- package/dist/components/Popover/Popover.es.js.map +1 -1
- package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +1 -1
- package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +1 -1
- package/dist/components/Select/Select.cjs.js.map +1 -1
- package/dist/components/Select/Select.es.js.map +1 -1
- package/dist/components/Switch/Switch.cjs.js +1 -1
- package/dist/components/Switch/Switch.cjs.js.map +1 -1
- package/dist/components/Switch/Switch.es.js.map +1 -1
- package/dist/components/Table/Collection/CompoundComponents.cjs.js.map +1 -1
- package/dist/components/Table/Collection/CompoundComponents.es.js.map +1 -1
- package/dist/components/Table/Collection/collectionParser.cjs.js +1 -1
- package/dist/components/Table/Collection/collectionParser.cjs.js.map +1 -1
- package/dist/components/Table/Collection/collectionParser.es.js.map +1 -1
- package/dist/components/Table/Collection/useTableCollection.cjs.js +1 -1
- package/dist/components/Table/Collection/useTableCollection.cjs.js.map +1 -1
- package/dist/components/Table/Collection/useTableCollection.es.js.map +1 -1
- package/dist/components/Table/Table.cjs.js.map +1 -1
- package/dist/components/Table/Table.es.js.map +1 -1
- package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
- package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +1 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js +1 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js.map +1 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js +15 -15
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js.map +1 -1
- package/dist/components/ThemeProvider.cjs.js +1 -1
- package/dist/components/ThemeProvider.cjs.js.map +1 -1
- package/dist/components/ThemeProvider.es.js.map +1 -1
- package/dist/components/Tombstone/Tombstone.cjs.js.map +1 -1
- package/dist/components/Tombstone/Tombstone.es.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.es.js +71 -57
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
- package/dist/components/Waveform/Waveform.cjs.js +1 -1
- package/dist/components/Waveform/Waveform.cjs.js.map +1 -1
- package/dist/components/Waveform/Waveform.es.js.map +1 -1
- package/dist/components/Waveform/WaveformBar.cjs.js.map +1 -1
- package/dist/components/Waveform/WaveformBar.es.js.map +1 -1
- package/dist/constants/breakpoint.cjs.js.map +1 -1
- package/dist/constants/breakpoint.es.js.map +1 -1
- package/dist/constants/placement.cjs.js.map +1 -1
- package/dist/constants/placement.es.js.map +1 -1
- package/dist/design/colors.cjs.js.map +1 -1
- package/dist/design/colors.es.js.map +1 -1
- package/dist/design/darkTheme/colors.cjs.js.map +1 -1
- package/dist/design/darkTheme/colors.es.js.map +1 -1
- package/dist/design/darkTheme/stylesheet.cjs.js.map +1 -1
- package/dist/design/darkTheme/stylesheet.es.js.map +1 -1
- package/dist/design/generateStylesheet.cjs.js.map +1 -1
- package/dist/design/generateStylesheet.es.js.map +1 -1
- package/dist/design/lightTheme/colors.cjs.js.map +1 -1
- package/dist/design/lightTheme/colors.es.js.map +1 -1
- package/dist/design/lightTheme/stylesheet.cjs.js.map +1 -1
- package/dist/design/lightTheme/stylesheet.es.js.map +1 -1
- package/dist/design/theme.cjs.js.map +1 -1
- package/dist/design/theme.es.js.map +1 -1
- package/dist/hooks/useBreakpoint.cjs.js +1 -1
- package/dist/hooks/useBreakpoint.cjs.js.map +1 -1
- package/dist/hooks/useBreakpoint.es.js.map +1 -1
- package/dist/hooks/useIsClosing.cjs.js +1 -1
- package/dist/hooks/useIsClosing.cjs.js.map +1 -1
- package/dist/hooks/useIsClosing.es.js.map +1 -1
- package/dist/hooks/useLockBodyScroll.cjs.js.map +1 -1
- package/dist/hooks/useLockBodyScroll.es.js.map +1 -1
- package/dist/hooks/usePalette.cjs.js.map +1 -1
- package/dist/hooks/usePalette.es.js.map +1 -1
- package/dist/icons.svg +10 -10
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +54 -26
- package/dist/index.es.js +6 -6
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js +1 -1
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js +1 -1
- package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js +1 -1
- package/dist/node_modules/@react-aria/i18n/dist/context.es.js +3 -3
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js +20 -30
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js.map +1 -1
- package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +2 -2
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js +1 -1
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js.map +1 -1
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js +1 -1
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js +1 -1
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js +1 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +5 -5
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +14 -14
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +2 -2
- package/dist/style.css +1 -1
- package/dist/utils/color2k.cjs.js.map +1 -1
- package/dist/utils/color2k.es.js.map +1 -1
- package/dist/utils/copy.cjs.js.map +1 -1
- package/dist/utils/copy.es.js.map +1 -1
- package/dist/utils/image.cjs.js.map +1 -1
- package/dist/utils/image.es.js.map +1 -1
- package/dist/utils/navigation.cjs.js.map +1 -1
- package/dist/utils/navigation.es.js.map +1 -1
- package/dist/utils/palette.cjs.js.map +1 -1
- package/dist/utils/palette.es.js.map +1 -1
- package/dist/utils/string.cjs.js.map +1 -1
- package/dist/utils/string.es.js.map +1 -1
- package/package.json +140 -140
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js +0 -37
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js +0 -98
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/utils.es.js +0 -89
- package/dist/node_modules/react-aria-components/dist/utils.es.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs.js","sources":["../../../../node_modules/react-aria-components/dist/utils.mjs"],"sourcesContent":["import {useObjectRef as $iETbY$useObjectRef, mergeRefs as $iETbY$mergeRefs, mergeProps as $iETbY$mergeProps, useLayoutEffect as $iETbY$useLayoutEffect} from \"@react-aria/utils\";\nimport $iETbY$react, {useMemo as $iETbY$useMemo, useContext as $iETbY$useContext, useState as $iETbY$useState, useRef as $iETbY$useRef, useCallback as $iETbY$useCallback} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nconst $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol('default');\nfunction $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: children }) {\n for (let [Context, value] of values)// @ts-ignore\n children = /*#__PURE__*/ (0, $iETbY$react).createElement(Context.Provider, {\n value: value\n }, children);\n return children;\n}\nfunction $64fa3d84918910a7$export$4d86445c2cf5e3(props) {\n let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values } = props;\n return (0, $iETbY$useMemo)(()=>{\n let computedClassName;\n let computedStyle;\n let computedChildren;\n if (typeof className === 'function') computedClassName = className({\n ...values,\n defaultClassName: defaultClassName\n });\n else computedClassName = className;\n if (typeof style === 'function') computedStyle = style({\n ...values,\n defaultStyle: defaultStyle || {}\n });\n else computedStyle = style;\n if (typeof children === 'function') computedChildren = children({\n ...values,\n defaultChildren: defaultChildren\n });\n else if (children == null) computedChildren = defaultChildren;\n else computedChildren = children;\n return {\n className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,\n style: computedStyle || defaultStyle ? {\n ...defaultStyle,\n ...computedStyle\n } : undefined,\n children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,\n 'data-rac': ''\n };\n }, [\n className,\n style,\n children,\n defaultClassName,\n defaultChildren,\n defaultStyle,\n values\n ]);\n}\nfunction $64fa3d84918910a7$export$c245e6201fed2f75(// https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage\nvalue, wrap) {\n return (renderProps)=>wrap(typeof value === 'function' ? value(renderProps) : value, renderProps);\n}\nfunction $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {\n let ctx = (0, $iETbY$useContext)(context);\n if (slot === null) // An explicit `null` slot means don't use context.\n return null;\n if (ctx && typeof ctx === 'object' && 'slots' in ctx && ctx.slots) {\n let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;\n if (!ctx.slots[slotKey]) {\n let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p)=>`\"${p}\"`));\n let errorMessage = slot ? `Invalid slot \"${slot}\".` : 'A slot prop is required.';\n throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);\n }\n return ctx.slots[slotKey];\n }\n // @ts-ignore\n return ctx;\n}\nfunction $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {\n let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};\n // @ts-ignore - TS says \"Type 'unique symbol' cannot be used as an index type.\" but not sure why.\n let { ref: contextRef, ...contextProps } = ctx;\n let mergedRef = (0, $iETbY$useObjectRef)((0, $iETbY$useMemo)(()=>(0, $iETbY$mergeRefs)(ref, contextRef), [\n ref,\n contextRef\n ]));\n let mergedProps = (0, $iETbY$mergeProps)(contextProps, props);\n // mergeProps does not merge `style`. Adding this there might be a breaking change.\n if ('style' in contextProps && contextProps.style && 'style' in props && props.style) {\n if (typeof contextProps.style === 'function' || typeof props.style === 'function') // @ts-ignore\n mergedProps.style = (renderProps)=>{\n let contextStyle = typeof contextProps.style === 'function' ? contextProps.style(renderProps) : contextProps.style;\n let defaultStyle = {\n ...renderProps.defaultStyle,\n ...contextStyle\n };\n let style = typeof props.style === 'function' ? props.style({\n ...renderProps,\n defaultStyle: defaultStyle\n }) : props.style;\n return {\n ...defaultStyle,\n ...style\n };\n };\n else // @ts-ignore\n mergedProps.style = {\n ...contextProps.style,\n ...props.style\n };\n }\n return [\n mergedProps,\n mergedRef\n ];\n}\nfunction $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(initialState = true) {\n // Initial state is typically based on the parent having an aria-label or aria-labelledby.\n // If it does, this value should be false so that we don't update the state and cause a rerender when we go through the layoutEffect\n let [hasSlot, setHasSlot] = (0, $iETbY$useState)(initialState);\n let hasRun = (0, $iETbY$useRef)(false);\n // A callback ref which will run when the slotted element mounts.\n // This should happen before the useLayoutEffect below.\n let ref = (0, $iETbY$useCallback)((el)=>{\n hasRun.current = true;\n setHasSlot(!!el);\n }, []);\n // If the callback hasn't been called, then reset to false.\n (0, $iETbY$useLayoutEffect)(()=>{\n if (!hasRun.current) setHasSlot(false);\n }, []);\n return [\n ref,\n hasSlot\n ];\n}\nfunction $64fa3d84918910a7$export$ef03459518577ad4(props) {\n const prefix = /^(data-.*)$/;\n let filteredProps = {};\n for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];\n return filteredProps;\n}\n\n\nexport {$64fa3d84918910a7$export$c62b8e45d58ddad9 as DEFAULT_SLOT, $64fa3d84918910a7$export$2881499e37b75b9a as Provider, $64fa3d84918910a7$export$4d86445c2cf5e3 as useRenderProps, $64fa3d84918910a7$export$c245e6201fed2f75 as composeRenderProps, $64fa3d84918910a7$export$fabf2dc03a41866e as useSlottedContext, $64fa3d84918910a7$export$29f1550f4b0d4415 as useContextProps, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as useSlot, $64fa3d84918910a7$export$ef03459518577ad4 as removeDataAttributes};\n//# sourceMappingURL=utils.module.js.map\n"],"names":["$64fa3d84918910a7$export$c62b8e45d58ddad9","$64fa3d84918910a7$export$2881499e37b75b9a","values","children","Context","value","$iETbY$react","$64fa3d84918910a7$export$4d86445c2cf5e3","props","className","style","defaultClassName","defaultChildren","defaultStyle","$iETbY$useMemo","computedClassName","computedStyle","computedChildren","$64fa3d84918910a7$export$fabf2dc03a41866e","context","slot","ctx","$iETbY$useContext","slotKey","availableSlots","p","errorMessage","$64fa3d84918910a7$export$29f1550f4b0d4415","ref","contextRef","contextProps","mergedRef","$iETbY$useObjectRef","$iETbY$mergeRefs","mergedProps","$iETbY$mergeProps","renderProps","contextStyle"],"mappings":"wIAeMA,EAA4C,OAAO,SAAS,EAClE,SAASC,EAA0C,CAAE,OAAQC,EAAQ,SAAUC,CAAQ,EAAI,CACvF,OAAS,CAACC,EAASC,CAAK,IAAKH,EAC7BC,EAA6BG,EAAc,cAAcF,EAAQ,SAAU,CACvE,MAAOC,CACV,EAAEF,CAAQ,EACX,OAAOA,CACX,CACA,SAASI,EAAwCC,EAAO,CACpD,GAAI,CAAE,UAAWC,EAAW,MAAOC,EAAO,SAAUP,EAAU,iBAAkBQ,EAAkB,gBAAiBC,EAAiB,aAAcC,EAAc,OAAQX,CAAQ,EAAGM,EACnL,OAAWM,EAAc,QAAE,IAAI,CAC3B,IAAIC,EACAC,EACAC,EACJ,OAAI,OAAOR,GAAc,WAAYM,EAAoBN,EAAU,CAC/D,GAAGP,EACH,iBAAkBS,CAC9B,CAAS,EACII,EAAoBN,EACrB,OAAOC,GAAU,WAAYM,EAAgBN,EAAM,CACnD,GAAGR,EACH,aAAcW,GAAgB,CAAE,CAC5C,CAAS,EACIG,EAAgBN,EACjB,OAAOP,GAAa,WAAYc,EAAmBd,EAAS,CAC5D,GAAGD,EACH,gBAAiBU,CAC7B,CAAS,EACQT,GAAY,KAAMc,EAAmBL,EACzCK,EAAmBd,EACjB,CACH,UAAWY,GAAiFJ,EA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Ae,CACf,GAAGuB,EAAY,aACf,GAAGC,CACnB,EACgB3B,EAAQ,OAAOF,EAAM,OAAU,WAAaA,EAAM,MAAM,CACxD,GAAG4B,EACH,aAAcvB,CAC9B,CAAa,EAAIL,EAAM,MACX,MAAO,CACH,GAAGK,EACH,GAAGH,CACnB,CACA,EAEQwB,EAAY,MAAQ,CAChB,GAAGJ,EAAa,MAChB,GAAGtB,EAAM,KACrB,GAEW,CACH0B,EACAH,CACR,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { useObjectRef as c, mergeRefs as m, mergeProps as $ } from "@react-aria/utils";
|
|
2
|
-
import x, { useMemo as i, useContext as S } from "react";
|
|
3
|
-
const C = Symbol("default");
|
|
4
|
-
function h({ values: l, children: t }) {
|
|
5
|
-
for (let [e, a] of l)
|
|
6
|
-
t = /* @__PURE__ */ x.createElement(e.Provider, {
|
|
7
|
-
value: a
|
|
8
|
-
}, t);
|
|
9
|
-
return t;
|
|
10
|
-
}
|
|
11
|
-
function N(l) {
|
|
12
|
-
let { className: t, style: e, children: a, defaultClassName: o, defaultChildren: s, defaultStyle: u, values: r } = l;
|
|
13
|
-
return i(() => {
|
|
14
|
-
let f, d, n;
|
|
15
|
-
return typeof t == "function" ? f = t({
|
|
16
|
-
...r,
|
|
17
|
-
defaultClassName: o
|
|
18
|
-
}) : f = t, typeof e == "function" ? d = e({
|
|
19
|
-
...r,
|
|
20
|
-
defaultStyle: u || {}
|
|
21
|
-
}) : d = e, typeof a == "function" ? n = a({
|
|
22
|
-
...r,
|
|
23
|
-
defaultChildren: s
|
|
24
|
-
}) : a == null ? n = s : n = a, {
|
|
25
|
-
className: f ?? o,
|
|
26
|
-
style: d || u ? {
|
|
27
|
-
...u,
|
|
28
|
-
...d
|
|
29
|
-
} : void 0,
|
|
30
|
-
children: n ?? s,
|
|
31
|
-
"data-rac": ""
|
|
32
|
-
};
|
|
33
|
-
}, [
|
|
34
|
-
t,
|
|
35
|
-
e,
|
|
36
|
-
a,
|
|
37
|
-
o,
|
|
38
|
-
s,
|
|
39
|
-
u,
|
|
40
|
-
r
|
|
41
|
-
]);
|
|
42
|
-
}
|
|
43
|
-
function b(l, t) {
|
|
44
|
-
let e = S(l);
|
|
45
|
-
if (t === null)
|
|
46
|
-
return null;
|
|
47
|
-
if (e && typeof e == "object" && "slots" in e && e.slots) {
|
|
48
|
-
let a = t || C;
|
|
49
|
-
if (!e.slots[a]) {
|
|
50
|
-
let o = new Intl.ListFormat().format(Object.keys(e.slots).map((u) => `"${u}"`)), s = t ? `Invalid slot "${t}".` : "A slot prop is required.";
|
|
51
|
-
throw new Error(`${s} Valid slot names are ${o}.`);
|
|
52
|
-
}
|
|
53
|
-
return e.slots[a];
|
|
54
|
-
}
|
|
55
|
-
return e;
|
|
56
|
-
}
|
|
57
|
-
function R(l, t, e) {
|
|
58
|
-
let a = b(e, l.slot) || {}, { ref: o, ...s } = a, u = c(i(() => m(t, o), [
|
|
59
|
-
t,
|
|
60
|
-
o
|
|
61
|
-
])), r = $(s, l);
|
|
62
|
-
return "style" in s && s.style && "style" in l && l.style && (typeof s.style == "function" || typeof l.style == "function" ? r.style = (f) => {
|
|
63
|
-
let d = typeof s.style == "function" ? s.style(f) : s.style, n = {
|
|
64
|
-
...f.defaultStyle,
|
|
65
|
-
...d
|
|
66
|
-
}, y = typeof l.style == "function" ? l.style({
|
|
67
|
-
...f,
|
|
68
|
-
defaultStyle: n
|
|
69
|
-
}) : l.style;
|
|
70
|
-
return {
|
|
71
|
-
...n,
|
|
72
|
-
...y
|
|
73
|
-
};
|
|
74
|
-
} : r.style = {
|
|
75
|
-
...s.style,
|
|
76
|
-
...l.style
|
|
77
|
-
}), [
|
|
78
|
-
r,
|
|
79
|
-
u
|
|
80
|
-
];
|
|
81
|
-
}
|
|
82
|
-
export {
|
|
83
|
-
C as DEFAULT_SLOT,
|
|
84
|
-
h as Provider,
|
|
85
|
-
R as useContextProps,
|
|
86
|
-
N as useRenderProps,
|
|
87
|
-
b as useSlottedContext
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=utils.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.es.js","sources":["../../../../node_modules/react-aria-components/dist/utils.mjs"],"sourcesContent":["import {useObjectRef as $iETbY$useObjectRef, mergeRefs as $iETbY$mergeRefs, mergeProps as $iETbY$mergeProps, useLayoutEffect as $iETbY$useLayoutEffect} from \"@react-aria/utils\";\nimport $iETbY$react, {useMemo as $iETbY$useMemo, useContext as $iETbY$useContext, useState as $iETbY$useState, useRef as $iETbY$useRef, useCallback as $iETbY$useCallback} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nconst $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol('default');\nfunction $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: children }) {\n for (let [Context, value] of values)// @ts-ignore\n children = /*#__PURE__*/ (0, $iETbY$react).createElement(Context.Provider, {\n value: value\n }, children);\n return children;\n}\nfunction $64fa3d84918910a7$export$4d86445c2cf5e3(props) {\n let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values } = props;\n return (0, $iETbY$useMemo)(()=>{\n let computedClassName;\n let computedStyle;\n let computedChildren;\n if (typeof className === 'function') computedClassName = className({\n ...values,\n defaultClassName: defaultClassName\n });\n else computedClassName = className;\n if (typeof style === 'function') computedStyle = style({\n ...values,\n defaultStyle: defaultStyle || {}\n });\n else computedStyle = style;\n if (typeof children === 'function') computedChildren = children({\n ...values,\n defaultChildren: defaultChildren\n });\n else if (children == null) computedChildren = defaultChildren;\n else computedChildren = children;\n return {\n className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,\n style: computedStyle || defaultStyle ? {\n ...defaultStyle,\n ...computedStyle\n } : undefined,\n children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,\n 'data-rac': ''\n };\n }, [\n className,\n style,\n children,\n defaultClassName,\n defaultChildren,\n defaultStyle,\n values\n ]);\n}\nfunction $64fa3d84918910a7$export$c245e6201fed2f75(// https://stackoverflow.com/questions/60898079/typescript-type-t-or-function-t-usage\nvalue, wrap) {\n return (renderProps)=>wrap(typeof value === 'function' ? value(renderProps) : value, renderProps);\n}\nfunction $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {\n let ctx = (0, $iETbY$useContext)(context);\n if (slot === null) // An explicit `null` slot means don't use context.\n return null;\n if (ctx && typeof ctx === 'object' && 'slots' in ctx && ctx.slots) {\n let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;\n if (!ctx.slots[slotKey]) {\n let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p)=>`\"${p}\"`));\n let errorMessage = slot ? `Invalid slot \"${slot}\".` : 'A slot prop is required.';\n throw new Error(`${errorMessage} Valid slot names are ${availableSlots}.`);\n }\n return ctx.slots[slotKey];\n }\n // @ts-ignore\n return ctx;\n}\nfunction $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {\n let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};\n // @ts-ignore - TS says \"Type 'unique symbol' cannot be used as an index type.\" but not sure why.\n let { ref: contextRef, ...contextProps } = ctx;\n let mergedRef = (0, $iETbY$useObjectRef)((0, $iETbY$useMemo)(()=>(0, $iETbY$mergeRefs)(ref, contextRef), [\n ref,\n contextRef\n ]));\n let mergedProps = (0, $iETbY$mergeProps)(contextProps, props);\n // mergeProps does not merge `style`. Adding this there might be a breaking change.\n if ('style' in contextProps && contextProps.style && 'style' in props && props.style) {\n if (typeof contextProps.style === 'function' || typeof props.style === 'function') // @ts-ignore\n mergedProps.style = (renderProps)=>{\n let contextStyle = typeof contextProps.style === 'function' ? contextProps.style(renderProps) : contextProps.style;\n let defaultStyle = {\n ...renderProps.defaultStyle,\n ...contextStyle\n };\n let style = typeof props.style === 'function' ? props.style({\n ...renderProps,\n defaultStyle: defaultStyle\n }) : props.style;\n return {\n ...defaultStyle,\n ...style\n };\n };\n else // @ts-ignore\n mergedProps.style = {\n ...contextProps.style,\n ...props.style\n };\n }\n return [\n mergedProps,\n mergedRef\n ];\n}\nfunction $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(initialState = true) {\n // Initial state is typically based on the parent having an aria-label or aria-labelledby.\n // If it does, this value should be false so that we don't update the state and cause a rerender when we go through the layoutEffect\n let [hasSlot, setHasSlot] = (0, $iETbY$useState)(initialState);\n let hasRun = (0, $iETbY$useRef)(false);\n // A callback ref which will run when the slotted element mounts.\n // This should happen before the useLayoutEffect below.\n let ref = (0, $iETbY$useCallback)((el)=>{\n hasRun.current = true;\n setHasSlot(!!el);\n }, []);\n // If the callback hasn't been called, then reset to false.\n (0, $iETbY$useLayoutEffect)(()=>{\n if (!hasRun.current) setHasSlot(false);\n }, []);\n return [\n ref,\n hasSlot\n ];\n}\nfunction $64fa3d84918910a7$export$ef03459518577ad4(props) {\n const prefix = /^(data-.*)$/;\n let filteredProps = {};\n for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];\n return filteredProps;\n}\n\n\nexport {$64fa3d84918910a7$export$c62b8e45d58ddad9 as DEFAULT_SLOT, $64fa3d84918910a7$export$2881499e37b75b9a as Provider, $64fa3d84918910a7$export$4d86445c2cf5e3 as useRenderProps, $64fa3d84918910a7$export$c245e6201fed2f75 as composeRenderProps, $64fa3d84918910a7$export$fabf2dc03a41866e as useSlottedContext, $64fa3d84918910a7$export$29f1550f4b0d4415 as useContextProps, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as useSlot, $64fa3d84918910a7$export$ef03459518577ad4 as removeDataAttributes};\n//# sourceMappingURL=utils.module.js.map\n"],"names":["$64fa3d84918910a7$export$c62b8e45d58ddad9","$64fa3d84918910a7$export$2881499e37b75b9a","values","children","Context","value","$iETbY$react","$64fa3d84918910a7$export$4d86445c2cf5e3","props","className","style","defaultClassName","defaultChildren","defaultStyle","$iETbY$useMemo","computedClassName","computedStyle","computedChildren","$64fa3d84918910a7$export$fabf2dc03a41866e","context","slot","ctx","$iETbY$useContext","slotKey","availableSlots","p","errorMessage","$64fa3d84918910a7$export$29f1550f4b0d4415","ref","contextRef","contextProps","mergedRef","$iETbY$useObjectRef","$iETbY$mergeRefs","mergedProps","$iETbY$mergeProps","renderProps","contextStyle"],"mappings":";;AAeK,MAACA,IAA4C,OAAO,SAAS;AAClE,SAASC,EAA0C,EAAE,QAAQC,GAAQ,UAAUC,EAAQ,GAAI;AACvF,WAAS,CAACC,GAASC,CAAK,KAAKH;AAC7B,IAAAC,IAA6BG,gBAAAA,EAAc,cAAcF,EAAQ,UAAU;AAAA,MACvE,OAAOC;AAAA,IACV,GAAEF,CAAQ;AACX,SAAOA;AACX;AACA,SAASI,EAAwCC,GAAO;AACpD,MAAI,EAAE,WAAWC,GAAW,OAAOC,GAAO,UAAUP,GAAU,kBAAkBQ,GAAkB,iBAAiBC,GAAiB,cAAcC,GAAc,QAAQX,EAAQ,IAAGM;AACnL,SAAWM,EAAgB,MAAI;AAC3B,QAAIC,GACAC,GACAC;AACJ,WAAI,OAAOR,KAAc,aAAYM,IAAoBN,EAAU;AAAA,MAC/D,GAAGP;AAAA,MACH,kBAAkBS;AAAA,IAC9B,CAAS,IACII,IAAoBN,GACrB,OAAOC,KAAU,aAAYM,IAAgBN,EAAM;AAAA,MACnD,GAAGR;AAAA,MACH,cAAcW,KAAgB,CAAE;AAAA,IAC5C,CAAS,IACIG,IAAgBN,GACjB,OAAOP,KAAa,aAAYc,IAAmBd,EAAS;AAAA,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