@sanity/ui 3.0.0-static.11 → 3.0.0-static.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks-cjs/_visual-editing.js +1293 -1215
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/buildCommand.js +28 -10
- package/dist/_chunks-cjs/buildCommand.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +1284 -1202
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +528 -358
- package/dist/_visual-editing.d.ts +528 -358
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +143 -73
- package/dist/css.d.ts +143 -73
- package/dist/css.js +329 -472
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +330 -473
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +1362 -869
- package/dist/index.d.ts +1362 -869
- package/dist/index.js +383 -308
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +387 -312
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-palette.css +105 -1
- package/dist/sanity-palette.min.css +1 -0
- package/dist/sanity-theme.css +4571 -1
- package/dist/sanity-theme.min.css +1 -0
- package/dist/system.css +22053 -21946
- package/dist/system.min.css +1 -0
- package/dist/theme.d.mts +51 -106
- package/dist/theme.d.ts +51 -106
- package/dist/theme.js +9 -9
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +9 -9
- package/dist/theme.mjs.map +1 -1
- package/package.json +10 -5
- package/src/cli/buildCommand.ts +46 -19
- package/src/css/_comp.ts +2 -2
- package/src/css/{compile/compileStyle.ts → _compileStyle.ts} +7 -7
- package/src/css/{system.style.ts → _system.style.ts} +3 -2
- package/src/css/aspects/display/display.ts +1 -0
- package/src/css/aspects/display/types.ts +2 -3
- package/src/css/aspects/flex/types.ts +4 -12
- package/src/css/aspects/flexItem/types.ts +1 -3
- package/src/css/aspects/font/types.ts +1 -3
- package/src/css/aspects/grid/grid.ts +1 -0
- package/src/css/aspects/grid/types.ts +5 -9
- package/src/css/aspects/gridItem/gridItem.ts +1 -1
- package/src/css/aspects/gridItem/types.ts +7 -18
- package/src/css/aspects/height/height.ts +3 -4
- package/src/css/aspects/inset/inset.ts +1 -0
- package/src/css/aspects/margin/margin.ts +1 -0
- package/src/css/aspects/margin/types.ts +1 -0
- package/src/css/aspects/maxWidth/maxWidth.ts +1 -0
- package/src/css/aspects/maxWidth/types.ts +1 -0
- package/src/css/aspects/minWidth/minWidth.ts +1 -0
- package/src/css/aspects/minWidth/types.ts +2 -0
- package/src/css/aspects/overflow/overflow.ts +1 -0
- package/src/css/aspects/padding/padding.ts +1 -0
- package/src/css/aspects/pointerEvents/pointerEvents.ts +1 -0
- package/src/css/aspects/position/position.ts +1 -0
- package/src/css/aspects/shadow/shadow.ts +1 -0
- package/src/css/aspects/textOverflow/textOverflow.ts +1 -0
- package/src/css/aspects/textOverflow/types.ts +1 -0
- package/src/css/aspects/width/types.ts +2 -0
- package/src/css/aspects/width/width.ts +1 -0
- package/src/css/{compile/compilePalette.ts → compilePalette.ts} +14 -10
- package/src/css/compileSystem.ts +7 -0
- package/src/css/{compile/compileTheme.ts → compileTheme.ts} +1 -0
- package/src/css/{compile/compileTheme_v3.ts → compileTheme_v3.ts} +123 -104
- package/src/css/components/breadcrumbs/breadcrumbs.ts +1 -0
- package/src/css/components/dialog/dialog.ts +7 -0
- package/src/css/components/menu/menu.ts +2 -0
- package/src/css/components/skeleton/skeleton.ts +4 -0
- package/src/css/components/skeleton/types.ts +4 -0
- package/src/css/components/toast/toast.ts +5 -0
- package/src/css/components/tree/tree.ts +1 -0
- package/src/css/composeClassNames.ts +4 -2
- package/src/css/constants.ts +2 -0
- package/src/css/index.ts +3 -3
- package/src/css/primitives/_arrow/_arrow.ts +3 -0
- package/src/css/primitives/_input/input.ts +2 -0
- package/src/css/primitives/_selectable/_selectable.style.ts +1 -2
- package/src/css/primitives/_selectable/selectable.ts +1 -2
- package/src/css/primitives/avatar/avatar.style.ts +5 -8
- package/src/css/primitives/avatar/avatar.ts +6 -0
- package/src/css/primitives/avatar/types.ts +1 -0
- package/src/css/primitives/box/types.ts +1 -3
- package/src/css/primitives/button/button.ts +4 -21
- package/src/css/primitives/button/index.ts +1 -0
- package/src/css/primitives/button/types.ts +18 -0
- package/src/css/primitives/card/card.style.ts +3 -6
- package/src/css/primitives/card/card.ts +2 -2
- package/src/css/primitives/card/types.ts +2 -2
- package/src/css/primitives/checkbox/checkbox.ts +2 -0
- package/src/css/primitives/container/container.ts +1 -0
- package/src/css/primitives/container/types.ts +1 -0
- package/src/css/primitives/kbd/kbd.ts +1 -0
- package/src/css/primitives/label/types.ts +7 -2
- package/src/css/primitives/popover/popover.ts +2 -0
- package/src/css/primitives/radio/radio.ts +1 -0
- package/src/css/primitives/select/select.ts +2 -0
- package/src/css/primitives/spinner/spinner.ts +2 -0
- package/src/css/primitives/switch/switch.ts +5 -0
- package/src/css/primitives/text/types.ts +4 -0
- package/src/css/primitives/textArea/textArea.ts +1 -0
- package/src/css/primitives/textInput/textInput.ts +1 -0
- package/src/css/primitives/tooltip/tooltip.ts +2 -0
- package/src/css/scopeClassName.ts +1 -0
- package/src/css/types.ts +9 -12
- package/src/css/util.ts +5 -0
- package/src/css/utils/srOnly/srOnly.ts +3 -1
- package/src/css/varNames.ts +131 -141
- package/src/css/vars.ts +1 -6
- package/src/theme/palette/constants.ts +2 -0
- package/src/theme/palette/types.ts +3 -0
- package/src/theme/types.ts +2 -6
- package/src/theme/v0/focusRing.ts +1 -3
- package/src/theme/v0/font.ts +6 -18
- package/src/theme/v0/layer.ts +1 -3
- package/src/theme/v0/shadow.ts +2 -6
- package/src/theme/v2/avatar.ts +1 -3
- package/src/theme/v2/color/_system.ts +1 -3
- package/src/theme/v2/color/avatar.ts +2 -6
- package/src/theme/v2/color/badge.ts +2 -6
- package/src/theme/v2/color/button.ts +3 -9
- package/src/theme/v2/color/color.ts +3 -9
- package/src/theme/v2/color/input.ts +3 -9
- package/src/theme/v2/color/kbd.ts +1 -3
- package/src/theme/v2/color/selectable.ts +2 -6
- package/src/theme/v2/color/state.ts +1 -3
- package/src/theme/v2/color/syntax.ts +1 -3
- package/src/theme/v2/input.ts +1 -3
- package/src/theme/v2/theme.ts +2 -6
- package/src/theme/v3/buildTheme_v3.ts +1 -0
- package/src/theme/v3/color/color.ts +6 -4
- package/src/theme/v3/color/renderColor.ts +4 -1
- package/src/theme/v3/defaultTokens.ts +1 -0
- package/src/theme/v3/resolveTokens.ts +9 -9
- package/src/ui/RootClassNames.tsx +3 -0
- package/src/ui/StyleTags.tsx +3 -1
- package/src/ui/_compat/theme/themeColorProvider.tsx +2 -6
- package/src/ui/_compat/theme/themeProvider.tsx +2 -6
- package/src/ui/_compat/theme/types.ts +1 -3
- package/src/ui/_compat/theme/useRootTheme.ts +1 -3
- package/src/ui/_compat/theme/useTheme.ts +2 -6
- package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/ui/components/autocomplete/autocomplete.tsx +86 -114
- package/src/ui/components/autocomplete/autocompleteOption.tsx +2 -0
- package/src/ui/components/autocomplete/types.ts +3 -8
- package/src/ui/components/breadcrumbs/breadcrumbs.tsx +27 -21
- package/src/ui/components/dialog/dialog.tsx +89 -291
- package/src/ui/components/dialog/dialogCard.tsx +183 -0
- package/src/ui/components/dialog/isTargetWithinScope.ts +14 -0
- package/src/ui/components/hotkeys/hotkeys.tsx +33 -15
- package/src/ui/components/menu/__workshop__/asComponent.tsx +6 -6
- package/src/ui/components/menu/menu.tsx +27 -33
- package/src/ui/components/menu/menuButton.tsx +10 -14
- package/src/ui/components/menu/menuDivider.tsx +25 -13
- package/src/ui/components/menu/menuGroup.tsx +34 -26
- package/src/ui/components/menu/menuItem.tsx +51 -40
- package/src/ui/components/skeleton/codeSkeleton.tsx +53 -0
- package/src/ui/components/skeleton/headingSkeleton.tsx +52 -0
- package/src/ui/components/skeleton/index.ts +3 -0
- package/src/ui/components/skeleton/labelSkeleton.tsx +51 -0
- package/src/ui/components/skeleton/skeleton.tsx +39 -16
- package/src/ui/components/skeleton/textSkeleton.tsx +31 -110
- package/src/ui/components/tab/tab.tsx +23 -19
- package/src/ui/components/tab/tabList.tsx +34 -33
- package/src/ui/components/tab/tabPanel.tsx +25 -19
- package/src/ui/components/toast/toast.tsx +21 -16
- package/src/ui/components/toast/toastLayer.tsx +28 -10
- package/src/ui/components/toast/toastProvider.tsx +2 -6
- package/src/ui/components/toast/types.ts +2 -6
- package/src/ui/components/toast/useToast.ts +1 -3
- package/src/ui/components/tree/tree.tsx +194 -187
- package/src/ui/components/tree/treeGroup.tsx +25 -5
- package/src/ui/components/tree/treeItem.tsx +35 -23
- package/src/ui/hooks/useClickOutside.ts +2 -6
- package/src/ui/hooks/useClickOutsideEvent.ts +3 -9
- package/src/ui/primitives/_selectable/selectable.tsx +33 -20
- package/src/ui/primitives/avatar/avatar.tsx +28 -31
- package/src/ui/primitives/avatar/avatarCounter.tsx +33 -25
- package/src/ui/primitives/avatar/avatarStack.tsx +31 -24
- package/src/ui/primitives/avatar/types.ts +2 -0
- package/src/ui/primitives/badge/__workshop__/props.tsx +1 -9
- package/src/ui/primitives/badge/__workshop__/tones.tsx +1 -6
- package/src/ui/primitives/badge/badge.tsx +33 -32
- package/src/ui/primitives/badge/types.ts +2 -1
- package/src/ui/primitives/box/box.tsx +59 -29
- package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +3 -3
- package/src/ui/primitives/button/__workshop__/uploadButton.tsx +2 -1
- package/src/ui/primitives/button/button.test.tsx +1 -15
- package/src/ui/primitives/button/button.tsx +64 -70
- package/src/ui/primitives/card/__workshop__/asComponent.tsx +3 -3
- package/src/ui/primitives/card/card.tsx +22 -22
- package/src/ui/primitives/card/cardProvider.tsx +2 -0
- package/src/ui/primitives/checkbox/checkbox.tsx +26 -15
- package/src/ui/primitives/code/code.tsx +24 -22
- package/src/ui/primitives/container/container.tsx +26 -15
- package/src/ui/primitives/flex/flex.tsx +21 -19
- package/src/ui/primitives/grid/grid.tsx +21 -16
- package/src/ui/primitives/heading/heading.tsx +42 -19
- package/src/ui/primitives/inline/inline.tsx +26 -23
- package/src/ui/primitives/kbd/kbd.tsx +25 -23
- package/src/ui/primitives/label/label.tsx +41 -26
- package/src/ui/primitives/popover/popover.tsx +281 -277
- package/src/ui/primitives/popover/popoverCard.tsx +119 -118
- package/src/ui/primitives/radio/radio.tsx +30 -14
- package/src/ui/primitives/select/select.tsx +24 -16
- package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +4 -2
- package/src/ui/primitives/spinner/spinner.tsx +24 -12
- package/src/ui/primitives/stack/stack.tsx +27 -18
- package/src/ui/primitives/switch/switch.tsx +31 -14
- package/src/ui/primitives/text/text.tsx +42 -24
- package/src/ui/primitives/textArea/textArea.tsx +33 -18
- package/src/ui/primitives/textInput/textInput.tsx +28 -40
- package/src/ui/primitives/tooltip/constants.ts +1 -1
- package/src/ui/primitives/tooltip/tooltip.tsx +76 -59
- package/src/ui/primitives/tooltip/tooltipCard.tsx +89 -82
- package/src/ui/primitives/types.ts +1 -3
- package/src/ui/types/avatar.ts +3 -6
- package/src/ui/types/badge.ts +1 -3
- package/src/ui/types/button.ts +1 -3
- package/src/ui/types/card.ts +1 -3
- package/src/ui/types/dialog.ts +1 -3
- package/src/ui/types/props.ts +20 -10
- package/src/ui/utils/arrow/arrow.tsx +40 -14
- package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +2 -6
- package/src/ui/utils/boundaryElement/types.ts +1 -3
- package/src/ui/utils/boundaryElement/useBoundaryElement.ts +1 -3
- package/src/ui/utils/elementQuery/elementQuery.tsx +36 -14
- package/src/ui/utils/errorBoundary.tsx +2 -0
- package/src/ui/utils/index.ts +0 -1
- package/src/ui/utils/layer/layer.tsx +23 -93
- package/src/ui/utils/layer/layerCard.tsx +92 -0
- package/src/ui/utils/layer/layerProvider.tsx +2 -6
- package/src/ui/utils/layer/useLayer.ts +1 -3
- package/src/ui/utils/portal/portal.ts +2 -6
- package/src/ui/utils/portal/portalProvider.tsx +2 -6
- package/src/ui/utils/portal/types.ts +1 -3
- package/src/ui/utils/portal/usePortal.ts +1 -3
- package/src/ui/utils/srOnly/srOnly.tsx +25 -20
- package/src/ui/utils/virtualList/virtualList.tsx +36 -24
- package/src/css/compile/compileRule.ts +0 -97
- package/src/css/compile/compileRules.test.ts +0 -36
- package/src/css/compile/compileRules.ts +0 -43
- package/src/css/compile/compileSystem.ts +0 -7
- package/src/css/compile/types.ts +0 -6
- package/src/css/primitives/_selectable/_contants.ts +0 -11
- package/src/css/primitives/card/_constants.ts +0 -13
- package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
- package/src/ui/utils/conditionalWrapper/index.ts +0 -1
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), css = require("@sanity/ui/css"),
|
|
3
|
-
function _interopDefaultCompat(e) {
|
|
4
|
-
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
5
|
-
}
|
|
6
|
-
var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs);
|
|
2
|
+
var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), css = require("@sanity/ui/css"), reactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), resizeObserver = require("@juggle/resize-observer"), useEffectEvent = require("use-effect-event"), reactDom = require("react-dom");
|
|
7
3
|
const studioTheme = theme.buildTheme();
|
|
8
4
|
function getGlobalScope() {
|
|
9
5
|
if (typeof globalThis < "u") return globalThis;
|
|
@@ -35,6 +31,7 @@ function CardProvider(props) {
|
|
|
35
31
|
let t3;
|
|
36
32
|
return $[4] !== children || $[5] !== context ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(CardContext.Provider, { value: context, children }), $[4] = children, $[5] = context, $[6] = t3) : t3 = $[6], t3;
|
|
37
33
|
}
|
|
34
|
+
CardProvider.displayName = "CardProvider";
|
|
38
35
|
const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
|
|
39
36
|
function ThemeProvider(props) {
|
|
40
37
|
const $ = reactCompilerRuntime.c(19), parentTheme = react.useContext(ThemeContext), {
|
|
@@ -174,7 +171,7 @@ function useArrayProp(val, defaultVal) {
|
|
|
174
171
|
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
175
172
|
}
|
|
176
173
|
function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
177
|
-
const $ = reactCompilerRuntime.c(9), elementsArg = t0 === void 0 ? _temp$
|
|
174
|
+
const $ = reactCompilerRuntime.c(9), elementsArg = t0 === void 0 ? _temp$7 : t0;
|
|
178
175
|
let t1;
|
|
179
176
|
$[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
|
|
180
177
|
if (!listener)
|
|
@@ -204,7 +201,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
204
201
|
let t3;
|
|
205
202
|
$[7] !== hasListener ? (t3 = [hasListener], $[7] = hasListener, $[8] = t3) : t3 = $[8], react.useEffect(t2, t3), react.useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
|
|
206
203
|
}
|
|
207
|
-
function _temp$
|
|
204
|
+
function _temp$7() {
|
|
208
205
|
return EMPTY_ARRAY;
|
|
209
206
|
}
|
|
210
207
|
function useCustomValidity(ref, customValidity) {
|
|
@@ -344,38 +341,40 @@ function useMediaIndex() {
|
|
|
344
341
|
return react.useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
|
|
345
342
|
}
|
|
346
343
|
function usePrefersDark(t0) {
|
|
347
|
-
return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$
|
|
344
|
+
return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$6 : t0);
|
|
348
345
|
}
|
|
349
|
-
function _temp$
|
|
346
|
+
function _temp$6() {
|
|
350
347
|
return !1;
|
|
351
348
|
}
|
|
352
349
|
function usePrefersReducedMotion(t0) {
|
|
353
|
-
return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$
|
|
350
|
+
return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$5 : t0);
|
|
354
351
|
}
|
|
355
|
-
function _temp$
|
|
352
|
+
function _temp$5() {
|
|
356
353
|
return !1;
|
|
357
354
|
}
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
355
|
+
const DEFAULT_BOX_ELEMENT = "div";
|
|
356
|
+
function Box(props) {
|
|
357
|
+
const $ = reactCompilerRuntime.c(126), t0 = props;
|
|
358
|
+
let align, autoCols, autoFlow, autoRows, borderBottom, borderLeft, borderRight, borderTop, children, className, column, columnEnd, columnStart, columns, direction, flex, gap, gapX, gapY, height, inset, insetBottom, insetLeft, insetRight, insetTop, justify, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, muted, outline, overflow, overflowX, overflowY, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pointerEvents, position, radius, rest, row, rowEnd, rowStart, rows, t1, t2, t3, t4, t5, t6, t7, width, wrap;
|
|
359
|
+
$[0] !== t0 ? ({
|
|
362
360
|
align,
|
|
363
|
-
as:
|
|
361
|
+
as: t1,
|
|
364
362
|
autoCols,
|
|
365
363
|
autoFlow,
|
|
366
364
|
autoRows,
|
|
367
|
-
border:
|
|
365
|
+
border: t2,
|
|
368
366
|
borderTop,
|
|
369
367
|
borderRight,
|
|
370
368
|
borderBottom,
|
|
371
369
|
borderLeft,
|
|
372
370
|
className,
|
|
371
|
+
children,
|
|
373
372
|
column,
|
|
374
373
|
columnStart,
|
|
375
374
|
columnEnd,
|
|
376
375
|
columns,
|
|
377
376
|
direction,
|
|
378
|
-
display:
|
|
377
|
+
display: t3,
|
|
379
378
|
flex,
|
|
380
379
|
gap,
|
|
381
380
|
gapX,
|
|
@@ -387,7 +386,7 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
387
386
|
insetRight,
|
|
388
387
|
insetTop,
|
|
389
388
|
justify,
|
|
390
|
-
margin:
|
|
389
|
+
margin: t4,
|
|
391
390
|
marginX,
|
|
392
391
|
marginY,
|
|
393
392
|
marginTop,
|
|
@@ -395,9 +394,13 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
395
394
|
marginBottom,
|
|
396
395
|
marginLeft,
|
|
397
396
|
maxWidth,
|
|
398
|
-
minWidth:
|
|
397
|
+
minWidth: t5,
|
|
398
|
+
muted,
|
|
399
|
+
outline,
|
|
399
400
|
overflow,
|
|
400
|
-
|
|
401
|
+
overflowX,
|
|
402
|
+
overflowY,
|
|
403
|
+
padding: t6,
|
|
401
404
|
paddingX,
|
|
402
405
|
paddingY,
|
|
403
406
|
paddingTop,
|
|
@@ -406,20 +409,19 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
406
409
|
paddingLeft,
|
|
407
410
|
pointerEvents,
|
|
408
411
|
position,
|
|
409
|
-
muted,
|
|
410
412
|
radius,
|
|
411
413
|
row,
|
|
412
414
|
rows,
|
|
413
415
|
rowStart,
|
|
414
416
|
rowEnd,
|
|
415
|
-
sizing:
|
|
417
|
+
sizing: t7,
|
|
416
418
|
width,
|
|
417
419
|
wrap,
|
|
418
|
-
...
|
|
419
|
-
} =
|
|
420
|
-
const
|
|
421
|
-
let
|
|
422
|
-
$[
|
|
420
|
+
...rest
|
|
421
|
+
} = t0, $[0] = t0, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = borderBottom, $[6] = borderLeft, $[7] = borderRight, $[8] = borderTop, $[9] = children, $[10] = className, $[11] = column, $[12] = columnEnd, $[13] = columnStart, $[14] = columns, $[15] = direction, $[16] = flex, $[17] = gap, $[18] = gapX, $[19] = gapY, $[20] = height, $[21] = inset, $[22] = insetBottom, $[23] = insetLeft, $[24] = insetRight, $[25] = insetTop, $[26] = justify, $[27] = marginBottom, $[28] = marginLeft, $[29] = marginRight, $[30] = marginTop, $[31] = marginX, $[32] = marginY, $[33] = maxWidth, $[34] = muted, $[35] = outline, $[36] = overflow, $[37] = overflowX, $[38] = overflowY, $[39] = paddingBottom, $[40] = paddingLeft, $[41] = paddingRight, $[42] = paddingTop, $[43] = paddingX, $[44] = paddingY, $[45] = pointerEvents, $[46] = position, $[47] = radius, $[48] = rest, $[49] = row, $[50] = rowEnd, $[51] = rowStart, $[52] = rows, $[53] = t1, $[54] = t2, $[55] = t3, $[56] = t4, $[57] = t5, $[58] = t6, $[59] = t7, $[60] = width, $[61] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], borderBottom = $[5], borderLeft = $[6], borderRight = $[7], borderTop = $[8], children = $[9], className = $[10], column = $[11], columnEnd = $[12], columnStart = $[13], columns = $[14], direction = $[15], flex = $[16], gap = $[17], gapX = $[18], gapY = $[19], height = $[20], inset = $[21], insetBottom = $[22], insetLeft = $[23], insetRight = $[24], insetTop = $[25], justify = $[26], marginBottom = $[27], marginLeft = $[28], marginRight = $[29], marginTop = $[30], marginX = $[31], marginY = $[32], maxWidth = $[33], muted = $[34], outline = $[35], overflow = $[36], overflowX = $[37], overflowY = $[38], paddingBottom = $[39], paddingLeft = $[40], paddingRight = $[41], paddingTop = $[42], paddingX = $[43], paddingY = $[44], pointerEvents = $[45], position = $[46], radius = $[47], rest = $[48], row = $[49], rowEnd = $[50], rowStart = $[51], rows = $[52], t1 = $[53], t2 = $[54], t3 = $[55], t4 = $[56], t5 = $[57], t6 = $[58], t7 = $[59], width = $[60], wrap = $[61]);
|
|
422
|
+
const Element2 = t1 === void 0 ? DEFAULT_BOX_ELEMENT : t1, border = t2 === void 0 ? !1 : t2, display = t3 === void 0 ? "block" : t3, margin = t4 === void 0 ? 0 : t4, minWidth = t5 === void 0 ? 0 : t5, padding = t6 === void 0 ? 0 : t6, sizing = t7 === void 0 ? "border" : t7;
|
|
423
|
+
let t8;
|
|
424
|
+
$[62] !== align || $[63] !== autoCols || $[64] !== autoFlow || $[65] !== autoRows || $[66] !== border || $[67] !== borderBottom || $[68] !== borderLeft || $[69] !== borderRight || $[70] !== borderTop || $[71] !== className || $[72] !== column || $[73] !== columnEnd || $[74] !== columnStart || $[75] !== columns || $[76] !== direction || $[77] !== display || $[78] !== flex || $[79] !== gap || $[80] !== gapX || $[81] !== gapY || $[82] !== height || $[83] !== inset || $[84] !== insetBottom || $[85] !== insetLeft || $[86] !== insetRight || $[87] !== insetTop || $[88] !== justify || $[89] !== margin || $[90] !== marginBottom || $[91] !== marginLeft || $[92] !== marginRight || $[93] !== marginTop || $[94] !== marginX || $[95] !== marginY || $[96] !== maxWidth || $[97] !== minWidth || $[98] !== muted || $[99] !== outline || $[100] !== overflow || $[101] !== overflowX || $[102] !== overflowY || $[103] !== padding || $[104] !== paddingBottom || $[105] !== paddingLeft || $[106] !== paddingRight || $[107] !== paddingTop || $[108] !== paddingX || $[109] !== paddingY || $[110] !== pointerEvents || $[111] !== position || $[112] !== radius || $[113] !== row || $[114] !== rowEnd || $[115] !== rowStart || $[116] !== rows || $[117] !== sizing || $[118] !== width || $[119] !== wrap ? (t8 = css.composeClassNames(className, css.box({
|
|
423
425
|
align,
|
|
424
426
|
autoCols,
|
|
425
427
|
autoFlow,
|
|
@@ -446,7 +448,6 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
446
448
|
insetRight,
|
|
447
449
|
insetTop,
|
|
448
450
|
justify,
|
|
449
|
-
overflow,
|
|
450
451
|
margin,
|
|
451
452
|
marginX,
|
|
452
453
|
marginY,
|
|
@@ -457,6 +458,10 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
457
458
|
maxWidth,
|
|
458
459
|
minWidth,
|
|
459
460
|
muted,
|
|
461
|
+
outline,
|
|
462
|
+
overflow,
|
|
463
|
+
overflowX,
|
|
464
|
+
overflowY,
|
|
460
465
|
padding,
|
|
461
466
|
paddingX,
|
|
462
467
|
paddingY,
|
|
@@ -474,14 +479,15 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
474
479
|
sizing,
|
|
475
480
|
width,
|
|
476
481
|
wrap
|
|
477
|
-
})), $[
|
|
478
|
-
let
|
|
479
|
-
return $[
|
|
480
|
-
}
|
|
481
|
-
Box.displayName = "
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
482
|
+
})), $[62] = align, $[63] = autoCols, $[64] = autoFlow, $[65] = autoRows, $[66] = border, $[67] = borderBottom, $[68] = borderLeft, $[69] = borderRight, $[70] = borderTop, $[71] = className, $[72] = column, $[73] = columnEnd, $[74] = columnStart, $[75] = columns, $[76] = direction, $[77] = display, $[78] = flex, $[79] = gap, $[80] = gapX, $[81] = gapY, $[82] = height, $[83] = inset, $[84] = insetBottom, $[85] = insetLeft, $[86] = insetRight, $[87] = insetTop, $[88] = justify, $[89] = margin, $[90] = marginBottom, $[91] = marginLeft, $[92] = marginRight, $[93] = marginTop, $[94] = marginX, $[95] = marginY, $[96] = maxWidth, $[97] = minWidth, $[98] = muted, $[99] = outline, $[100] = overflow, $[101] = overflowX, $[102] = overflowY, $[103] = padding, $[104] = paddingBottom, $[105] = paddingLeft, $[106] = paddingRight, $[107] = paddingTop, $[108] = paddingX, $[109] = paddingY, $[110] = pointerEvents, $[111] = position, $[112] = radius, $[113] = row, $[114] = rowEnd, $[115] = rowStart, $[116] = rows, $[117] = sizing, $[118] = width, $[119] = wrap, $[120] = t8) : t8 = $[120];
|
|
483
|
+
let t9;
|
|
484
|
+
return $[121] !== Element2 || $[122] !== children || $[123] !== rest || $[124] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Box", ...rest, className: t8, children }), $[121] = Element2, $[122] = children, $[123] = rest, $[124] = t8, $[125] = t9) : t9 = $[125], t9;
|
|
485
|
+
}
|
|
486
|
+
Box.displayName = "Box";
|
|
487
|
+
const DEFAULT_LABEL_ELEMENT = "div";
|
|
488
|
+
function Label(props) {
|
|
489
|
+
const $ = reactCompilerRuntime.c(28);
|
|
490
|
+
let accent, align, children, className, rest, t0, t1, t2, t3, textOverflowProp;
|
|
485
491
|
$[0] !== props ? ({
|
|
486
492
|
accent,
|
|
487
493
|
align,
|
|
@@ -492,9 +498,9 @@ const Label = react.forwardRef(function(props, ref) {
|
|
|
492
498
|
size: t2,
|
|
493
499
|
textOverflow: textOverflowProp,
|
|
494
500
|
weight: t3,
|
|
495
|
-
...
|
|
496
|
-
} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] =
|
|
497
|
-
const
|
|
501
|
+
...rest
|
|
502
|
+
} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = rest, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = textOverflowProp) : (accent = $[1], align = $[2], children = $[3], className = $[4], rest = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], textOverflowProp = $[10]);
|
|
503
|
+
const Element2 = t0 === void 0 ? DEFAULT_LABEL_ELEMENT : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 1 : t2, weight = t3 === void 0 ? "medium" : t3;
|
|
498
504
|
let t4;
|
|
499
505
|
$[11] !== accent || $[12] !== align || $[13] !== className || $[14] !== muted || $[15] !== size2 || $[16] !== weight ? (t4 = css.composeClassNames(className, css.label({
|
|
500
506
|
accent,
|
|
@@ -510,232 +516,235 @@ const Label = react.forwardRef(function(props, ref) {
|
|
|
510
516
|
let t6;
|
|
511
517
|
$[20] !== children || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t5, children }), $[20] = children, $[21] = t5, $[22] = t6) : t6 = $[22];
|
|
512
518
|
let t7;
|
|
513
|
-
return $[23] !==
|
|
514
|
-
}
|
|
515
|
-
Label.displayName = "
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
519
|
+
return $[23] !== Element2 || $[24] !== rest || $[25] !== t4 || $[26] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Label", ...rest, className: t4, children: t6 }), $[23] = Element2, $[24] = rest, $[25] = t4, $[26] = t6, $[27] = t7) : t7 = $[27], t7;
|
|
520
|
+
}
|
|
521
|
+
Label.displayName = "Label";
|
|
522
|
+
const DEFAULT_AVATAR_ELEMENT = "div";
|
|
523
|
+
function Avatar(props) {
|
|
524
|
+
const $ = reactCompilerRuntime.c(51), t0 = props;
|
|
525
|
+
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, className, initials, onImageLoadError, rest, src, t1, t2, t3, t4, title;
|
|
526
|
+
$[0] !== t0 ? ({
|
|
520
527
|
__unstable_hideInnerStroke,
|
|
521
|
-
as:
|
|
528
|
+
as: t1,
|
|
522
529
|
className,
|
|
523
|
-
color:
|
|
530
|
+
color: t2,
|
|
524
531
|
src,
|
|
525
532
|
title,
|
|
526
533
|
initials,
|
|
527
534
|
onImageLoadError,
|
|
528
535
|
arrowPosition: arrowPositionProp,
|
|
529
536
|
animateArrowFrom,
|
|
530
|
-
status:
|
|
531
|
-
size:
|
|
532
|
-
...
|
|
533
|
-
} =
|
|
534
|
-
const
|
|
535
|
-
let
|
|
536
|
-
$[14] !== arrowPosition || $[15] !== arrowPositionProp ? (
|
|
537
|
+
status: t3,
|
|
538
|
+
size: t4,
|
|
539
|
+
...rest
|
|
540
|
+
} = t0, $[0] = t0, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = className, $[5] = initials, $[6] = onImageLoadError, $[7] = rest, $[8] = src, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], className = $[4], initials = $[5], onImageLoadError = $[6], rest = $[7], src = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], title = $[13]);
|
|
541
|
+
const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "gray" : t2, sizeProp = t4 === void 0 ? 1 : t4, size2 = useArrayProp(sizeProp), [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = react.useState(!1);
|
|
542
|
+
let t5, t6;
|
|
543
|
+
$[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t5 = () => {
|
|
537
544
|
if (arrowPosition === arrowPositionProp)
|
|
538
545
|
return;
|
|
539
546
|
const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
|
|
540
547
|
return () => cancelAnimationFrame(raf);
|
|
541
|
-
},
|
|
542
|
-
let
|
|
543
|
-
$[18] !== src ? (
|
|
548
|
+
}, t6 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
|
|
549
|
+
let t7, t8;
|
|
550
|
+
$[18] !== src ? (t7 = () => {
|
|
544
551
|
src && setImageError(!1);
|
|
545
|
-
},
|
|
546
|
-
let
|
|
547
|
-
$[21] !== onImageLoadError ? (
|
|
552
|
+
}, t8 = [src], $[18] = src, $[19] = t7, $[20] = t8) : (t7 = $[19], t8 = $[20]), react.useEffect(t7, t8);
|
|
553
|
+
let t9;
|
|
554
|
+
$[21] !== onImageLoadError ? (t9 = () => {
|
|
548
555
|
setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
549
|
-
}, $[21] = onImageLoadError, $[22] =
|
|
550
|
-
const handleImageError =
|
|
551
|
-
let
|
|
552
|
-
$[23] !== size2 ? (
|
|
553
|
-
const initialsSize =
|
|
554
|
-
let
|
|
555
|
-
$[25] !== className || $[26] !== color || $[27] !== sizeProp ? (
|
|
556
|
+
}, $[21] = onImageLoadError, $[22] = t9) : t9 = $[22];
|
|
557
|
+
const handleImageError = t9;
|
|
558
|
+
let t10, t11;
|
|
559
|
+
$[23] !== size2 ? (t11 = size2.map(_temp$4), $[23] = size2, $[24] = t11) : t11 = $[24], t10 = t11;
|
|
560
|
+
const initialsSize = t10, t12 = __unstable_hideInnerStroke ? "" : void 0;
|
|
561
|
+
let t13;
|
|
562
|
+
$[25] !== className || $[26] !== color || $[27] !== sizeProp ? (t13 = css.composeClassNames(className, css.avatar({
|
|
556
563
|
color,
|
|
557
564
|
size: sizeProp
|
|
558
|
-
})), $[25] = className, $[26] = color, $[27] = sizeProp, $[28] =
|
|
559
|
-
const
|
|
560
|
-
let t13;
|
|
561
|
-
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t13 = css.avatarArrow(), $[29] = t13) : t13 = $[29];
|
|
562
|
-
let t14;
|
|
563
|
-
$[30] !== color ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t13, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[30] = color, $[31] = t14) : t14 = $[31];
|
|
565
|
+
})), $[25] = className, $[26] = color, $[27] = sizeProp, $[28] = t13) : t13 = $[28];
|
|
566
|
+
const t14 = imageError ? "" : void 0;
|
|
564
567
|
let t15;
|
|
565
|
-
$[
|
|
568
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t15 = css.avatarArrow(), $[29] = t15) : t15 = $[29];
|
|
566
569
|
let t16;
|
|
567
|
-
$[
|
|
568
|
-
color: "inherit"
|
|
569
|
-
}, $[33] = t16) : t16 = $[33];
|
|
570
|
+
$[30] !== color ? (t16 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t15, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[30] = color, $[31] = t16) : t16 = $[31];
|
|
570
571
|
let t17;
|
|
571
|
-
$[
|
|
572
|
+
$[32] === Symbol.for("react.memo_cache_sentinel") ? (t17 = css.avatarInitials(), $[32] = t17) : t17 = $[32];
|
|
572
573
|
let t18;
|
|
573
|
-
$[
|
|
574
|
+
$[33] !== initials || $[34] !== initialsSize ? (t18 = /* @__PURE__ */ jsxRuntime.jsx(Box, { align: "center", as: "span", className: t17, display: "flex", justify: "center", position: "absolute", inset: 0, children: /* @__PURE__ */ jsxRuntime.jsx(Label, { align: "center", as: "span", size: initialsSize, weight: "medium", children: initials }) }), $[33] = initials, $[34] = initialsSize, $[35] = t18) : t18 = $[35];
|
|
575
|
+
let t19;
|
|
576
|
+
$[36] !== handleImageError || $[37] !== initials || $[38] !== src ? (t19 = src && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: css.avatarImage(), inset: 0, position: "absolute", children: [
|
|
574
577
|
/* @__PURE__ */ jsxRuntime.jsx("img", { alt: initials, onError: handleImageError, src }),
|
|
575
578
|
/* @__PURE__ */ jsxRuntime.jsx("span", {})
|
|
576
|
-
] }), $[
|
|
577
|
-
let
|
|
578
|
-
return $[
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
] }), $[41] =
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
function _temp$5(s) {
|
|
579
|
+
] }), $[36] = handleImageError, $[37] = initials, $[38] = src, $[39] = t19) : t19 = $[39];
|
|
580
|
+
let t20;
|
|
581
|
+
return $[40] !== Element2 || $[41] !== arrowPosition || $[42] !== rest || $[43] !== t12 || $[44] !== t13 || $[45] !== t14 || $[46] !== t16 || $[47] !== t18 || $[48] !== t19 || $[49] !== title ? (t20 = /* @__PURE__ */ jsxRuntime.jsxs(Element2, { "data-hide-inner-stroke": t12, "data-ui": "Avatar", ...rest, "aria-label": title, className: t13, "data-arrow-position": arrowPosition, "data-image-error": t14, title, children: [
|
|
582
|
+
t16,
|
|
583
|
+
t18,
|
|
584
|
+
t19
|
|
585
|
+
] }), $[40] = Element2, $[41] = arrowPosition, $[42] = rest, $[43] = t12, $[44] = t13, $[45] = t14, $[46] = t16, $[47] = t18, $[48] = t19, $[49] = title, $[50] = t20) : t20 = $[50], t20;
|
|
586
|
+
}
|
|
587
|
+
function _temp$4(s) {
|
|
586
588
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
587
589
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
$
|
|
590
|
+
Avatar.displayName = "Avatar";
|
|
591
|
+
const DEFAULT_AVATAR_COUNTER_ELEMENT = "div";
|
|
592
|
+
function AvatarCounter(props) {
|
|
593
|
+
const $ = reactCompilerRuntime.c(19), t0 = props;
|
|
594
|
+
let className, count, rest, t1, t2;
|
|
595
|
+
$[0] !== t0 ? ({
|
|
596
|
+
as: t1,
|
|
592
597
|
className,
|
|
593
598
|
count,
|
|
594
|
-
size:
|
|
595
|
-
...
|
|
596
|
-
} =
|
|
597
|
-
const size2 = useArrayProp(
|
|
598
|
-
let
|
|
599
|
-
$[
|
|
600
|
-
const
|
|
601
|
-
let t3;
|
|
602
|
-
$[7] !== className || $[8] !== size2 ? (t3 = css.composeClassNames(className, css.avatarCounter({
|
|
603
|
-
size: size2
|
|
604
|
-
})), $[7] = className, $[8] = size2, $[9] = t3) : t3 = $[9];
|
|
605
|
-
let t4;
|
|
606
|
-
$[10] !== count || $[11] !== fontSize ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Label, { align: "center", as: "span", size: fontSize, weight: "medium", children: count }), $[10] = count, $[11] = fontSize, $[12] = t4) : t4 = $[12];
|
|
599
|
+
size: t2,
|
|
600
|
+
...rest
|
|
601
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = count, $[3] = rest, $[4] = t1, $[5] = t2) : (className = $[1], count = $[2], rest = $[3], t1 = $[4], t2 = $[5]);
|
|
602
|
+
const as = t1 === void 0 ? DEFAULT_AVATAR_COUNTER_ELEMENT : t1, size2 = useArrayProp(t2 === void 0 ? 1 : t2);
|
|
603
|
+
let t3, t4;
|
|
604
|
+
$[6] !== size2 ? (t4 = size2.map(_temp$3), $[6] = size2, $[7] = t4) : t4 = $[7], t3 = t4;
|
|
605
|
+
const labelSize = t3;
|
|
607
606
|
let t5;
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
607
|
+
$[8] !== className || $[9] !== size2 ? (t5 = css.composeClassNames(className, css.avatarCounter({
|
|
608
|
+
size: size2
|
|
609
|
+
})), $[8] = className, $[9] = size2, $[10] = t5) : t5 = $[10];
|
|
610
|
+
let t6;
|
|
611
|
+
$[11] !== count || $[12] !== labelSize ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Label, { align: "center", as: "span", size: labelSize, weight: "medium", children: count }), $[11] = count, $[12] = labelSize, $[13] = t6) : t6 = $[13];
|
|
612
|
+
let t7;
|
|
613
|
+
return $[14] !== as || $[15] !== rest || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "AvatarCounter", ...rest, align: "center", as, className: t5, display: "flex", justify: "center", paddingX: 2, sizing: "border", children: t6 }), $[14] = as, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
|
|
614
|
+
}
|
|
615
|
+
function _temp$3(s) {
|
|
612
616
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
613
617
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
$
|
|
618
|
+
AvatarCounter.displayName = "AvatarCounter";
|
|
619
|
+
const DEFAULT_AVATAR_STACK_ELEMENT = "div";
|
|
620
|
+
function AvatarStack(props) {
|
|
621
|
+
const $ = reactCompilerRuntime.c(20), t0 = props;
|
|
622
|
+
let childrenProp, className, rest, t1, t2, t3;
|
|
623
|
+
$[0] !== t0 ? ({
|
|
624
|
+
as: t1,
|
|
618
625
|
children: childrenProp,
|
|
619
626
|
className,
|
|
620
|
-
maxLength:
|
|
621
|
-
size:
|
|
622
|
-
...
|
|
623
|
-
} =
|
|
624
|
-
const maxLengthProp =
|
|
625
|
-
let
|
|
626
|
-
$[
|
|
627
|
-
size: size2
|
|
628
|
-
})), $[6] = className, $[7] = size2, $[8] = t4) : t4 = $[8];
|
|
629
|
-
const t5 = "flex", t6 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), t7 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
630
|
-
let t8;
|
|
631
|
-
$[9] !== size2 ? (t8 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: react.cloneElement(child, {
|
|
627
|
+
maxLength: t2,
|
|
628
|
+
size: t3,
|
|
629
|
+
...rest
|
|
630
|
+
} = t0, $[0] = t0, $[1] = childrenProp, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3) : (childrenProp = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6]);
|
|
631
|
+
const as = t1 === void 0 ? DEFAULT_AVATAR_STACK_ELEMENT : t1, maxLengthProp = t2 === void 0 ? 4 : t2, sizeProp = t3 === void 0 ? 1 : t3, children = react.Children.toArray(childrenProp).filter(react.isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Box, t4 = "AvatarStack", t5 = "center";
|
|
632
|
+
let t6;
|
|
633
|
+
$[7] !== className || $[8] !== size2 ? (t6 = css.composeClassNames(className, css.avatarStack({
|
|
632
634
|
size: size2
|
|
633
|
-
})
|
|
634
|
-
const t9 =
|
|
635
|
+
})), $[7] = className, $[8] = size2, $[9] = t6) : t6 = $[9];
|
|
636
|
+
const t7 = "flex", t8 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), t9 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
635
637
|
let t10;
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
638
|
+
$[10] !== size2 ? (t10 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: react.cloneElement(child, {
|
|
639
|
+
size: size2
|
|
640
|
+
}) }, String(childIndex)), $[10] = size2, $[11] = t10) : t10 = $[11];
|
|
641
|
+
const t11 = visibleChildren.map(t10);
|
|
642
|
+
let t12;
|
|
643
|
+
return $[12] !== T0 || $[13] !== as || $[14] !== rest || $[15] !== t11 || $[16] !== t6 || $[17] !== t8 || $[18] !== t9 ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { "data-ui": t4, ...rest, align: t5, as, className: t6, display: t7, children: [
|
|
644
|
+
t8,
|
|
645
|
+
t9,
|
|
646
|
+
t11
|
|
647
|
+
] }), $[12] = T0, $[13] = as, $[14] = rest, $[15] = t11, $[16] = t6, $[17] = t8, $[18] = t9, $[19] = t12) : t12 = $[19], t12;
|
|
648
|
+
}
|
|
649
|
+
AvatarStack.displayName = "AvatarStack";
|
|
650
|
+
const DEFAULT_TEXT_ELEMENT = "div";
|
|
651
|
+
function Text(props) {
|
|
652
|
+
const $ = reactCompilerRuntime.c(30), t0 = props;
|
|
653
|
+
let accent, align, children, className, flex, muted, rest, t1, t2, textOverflowProp, weight;
|
|
654
|
+
$[0] !== t0 ? ({
|
|
655
|
+
accent,
|
|
648
656
|
align,
|
|
649
657
|
as: t1,
|
|
650
658
|
children,
|
|
651
659
|
className,
|
|
652
660
|
flex,
|
|
653
|
-
muted
|
|
654
|
-
size:
|
|
661
|
+
muted,
|
|
662
|
+
size: t2,
|
|
655
663
|
textOverflow: textOverflowProp,
|
|
656
664
|
weight,
|
|
657
|
-
...
|
|
658
|
-
} =
|
|
659
|
-
const
|
|
660
|
-
let
|
|
661
|
-
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (
|
|
665
|
+
...rest
|
|
666
|
+
} = t0, $[0] = t0, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = flex, $[6] = muted, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = textOverflowProp, $[11] = weight) : (accent = $[1], align = $[2], children = $[3], className = $[4], flex = $[5], muted = $[6], rest = $[7], t1 = $[8], t2 = $[9], textOverflowProp = $[10], weight = $[11]);
|
|
667
|
+
const Element2 = t1 === void 0 ? DEFAULT_TEXT_ELEMENT : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
668
|
+
let t3;
|
|
669
|
+
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t3 = css.composeClassNames(className, css.text({
|
|
662
670
|
accent,
|
|
663
671
|
align,
|
|
664
672
|
flex,
|
|
665
673
|
muted,
|
|
666
674
|
size: size2,
|
|
667
675
|
weight
|
|
668
|
-
})), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] =
|
|
669
|
-
let
|
|
670
|
-
$[20] !== textOverflowProp ? (
|
|
676
|
+
})), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t3) : t3 = $[19];
|
|
677
|
+
let t4;
|
|
678
|
+
$[20] !== textOverflowProp ? (t4 = css.textOverflow({
|
|
671
679
|
textOverflow: textOverflowProp
|
|
672
|
-
}), $[20] = textOverflowProp, $[21] =
|
|
673
|
-
let t6;
|
|
674
|
-
$[22] !== children || $[23] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t5, children }), $[22] = children, $[23] = t5, $[24] = t6) : t6 = $[24];
|
|
675
|
-
let t7;
|
|
676
|
-
return $[25] !== As || $[26] !== ref || $[27] !== restProps || $[28] !== t4 || $[29] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Text", ...restProps, ref, className: t4, children: t6 }), $[25] = As, $[26] = ref, $[27] = restProps, $[28] = t4, $[29] = t6, $[30] = t7) : t7 = $[30], t7;
|
|
677
|
-
});
|
|
678
|
-
Text.displayName = "ForwardRef(Text)";
|
|
679
|
-
const Badge = react.forwardRef(function(props, ref) {
|
|
680
|
-
const $ = reactCompilerRuntime.c(25);
|
|
681
|
-
let children, className, restProps, t0, t1, t2, t3, t4, textAlign;
|
|
682
|
-
if ($[0] !== props) {
|
|
683
|
-
const {
|
|
684
|
-
children: t52,
|
|
685
|
-
className: t62,
|
|
686
|
-
display: t72,
|
|
687
|
-
fontSize: t8,
|
|
688
|
-
mode: _deprecated_mode,
|
|
689
|
-
padding: t9,
|
|
690
|
-
radius: t10,
|
|
691
|
-
textAlign: t11,
|
|
692
|
-
tone: t12,
|
|
693
|
-
...t13
|
|
694
|
-
} = props;
|
|
695
|
-
children = t52, className = t62, t0 = t72, t1 = t8, t2 = t9, t3 = t10, textAlign = t11, t4 = t12, restProps = t13, $[0] = props, $[1] = children, $[2] = className, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = textAlign;
|
|
696
|
-
} else
|
|
697
|
-
children = $[1], className = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], textAlign = $[9];
|
|
698
|
-
const display = t0 === void 0 ? "inline-block" : t0, fontSize = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 1 : t2, radius = t3 === void 0 ? 2 : t3, tone = t4 === void 0 ? "default" : t4;
|
|
680
|
+
}), $[20] = textOverflowProp, $[21] = t4) : t4 = $[21];
|
|
699
681
|
let t5;
|
|
700
|
-
$[
|
|
682
|
+
$[22] !== children || $[23] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t4, children }), $[22] = children, $[23] = t4, $[24] = t5) : t5 = $[24];
|
|
683
|
+
let t6;
|
|
684
|
+
return $[25] !== Element2 || $[26] !== rest || $[27] !== t3 || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Text", ...rest, className: t3, children: t5 }), $[25] = Element2, $[26] = rest, $[27] = t3, $[28] = t5, $[29] = t6) : t6 = $[29], t6;
|
|
685
|
+
}
|
|
686
|
+
Text.displayName = "Text";
|
|
687
|
+
const DEFAULT_BADGE_ELEMENT = "span";
|
|
688
|
+
function Badge(props) {
|
|
689
|
+
const $ = reactCompilerRuntime.c(22), t0 = props;
|
|
690
|
+
let children, className, rest, t1, t2, t3, t4, t5;
|
|
691
|
+
$[0] !== t0 ? ({
|
|
692
|
+
as: t1,
|
|
693
|
+
children,
|
|
694
|
+
className,
|
|
695
|
+
fontSize: t2,
|
|
696
|
+
padding: t3,
|
|
697
|
+
radius: t4,
|
|
698
|
+
tone: t5,
|
|
699
|
+
...rest
|
|
700
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5) : (children = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8]);
|
|
701
|
+
const as = t1 === void 0 ? DEFAULT_BADGE_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 1 : t3, radius = t4 === void 0 ? 2 : t4, tone = t5 === void 0 ? "default" : t5;
|
|
702
|
+
let t6;
|
|
703
|
+
$[9] !== className || $[10] !== radius || $[11] !== tone ? (t6 = css.composeClassNames(className, css.badge({
|
|
701
704
|
radius,
|
|
702
705
|
tone
|
|
703
|
-
})), $[
|
|
704
|
-
let t6;
|
|
705
|
-
$[14] !== children || $[15] !== fontSize || $[16] !== textAlign ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { align: textAlign, size: fontSize, children }), $[14] = children, $[15] = fontSize, $[16] = textAlign, $[17] = t6) : t6 = $[17];
|
|
706
|
+
})), $[9] = className, $[10] = radius, $[11] = tone, $[12] = t6) : t6 = $[12];
|
|
706
707
|
let t7;
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
708
|
+
$[13] !== children || $[14] !== fontSize ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children }), $[13] = children, $[14] = fontSize, $[15] = t7) : t7 = $[15];
|
|
709
|
+
let t8;
|
|
710
|
+
return $[16] !== as || $[17] !== padding || $[18] !== rest || $[19] !== t6 || $[20] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Badge", ...rest, as, className: t6, display: "inline-flex", maxWidth: "fill", padding, children: t7 }), $[16] = as, $[17] = padding, $[18] = rest, $[19] = t6, $[20] = t7, $[21] = t8) : t8 = $[21], t8;
|
|
711
|
+
}
|
|
712
|
+
Badge.displayName = "Badge";
|
|
710
713
|
function AnimatedSpinnerIcon(props) {
|
|
711
714
|
const $ = reactCompilerRuntime.c(8);
|
|
712
|
-
let className,
|
|
715
|
+
let className, rest;
|
|
713
716
|
$[0] !== props ? ({
|
|
714
717
|
className,
|
|
715
|
-
...
|
|
716
|
-
} = props, $[0] = props, $[1] = className, $[2] =
|
|
718
|
+
...rest
|
|
719
|
+
} = props, $[0] = props, $[1] = className, $[2] = rest) : (className = $[1], rest = $[2]);
|
|
717
720
|
let t0;
|
|
718
721
|
$[3] !== className ? (t0 = css.composeClassNames(className, css.animatedSpinnerIcon()), $[3] = className, $[4] = t0) : t0 = $[4];
|
|
719
722
|
let t1;
|
|
720
|
-
return $[5] !==
|
|
723
|
+
return $[5] !== rest || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(icons.SpinnerIcon, { ...rest, "data-sanity-icon": "animated-spinner", className: t0 }), $[5] = rest, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
724
|
+
}
|
|
725
|
+
AnimatedSpinnerIcon.displayName = "AnimatedSpinnerIcon";
|
|
726
|
+
const DEFAULT_SPINNER_ELEMENT = "div";
|
|
727
|
+
function Spinner(props) {
|
|
728
|
+
const $ = reactCompilerRuntime.c(8), t0 = props;
|
|
729
|
+
let rest, t1;
|
|
730
|
+
$[0] !== t0 ? ({
|
|
731
|
+
as: t1,
|
|
732
|
+
...rest
|
|
733
|
+
} = t0, $[0] = t0, $[1] = rest, $[2] = t1) : (rest = $[1], t1 = $[2]);
|
|
734
|
+
const as = t1 === void 0 ? DEFAULT_SPINNER_ELEMENT : t1;
|
|
735
|
+
let t2, t3;
|
|
736
|
+
$[3] === Symbol.for("react.memo_cache_sentinel") ? (t2 = css.spinner(), t3 = /* @__PURE__ */ jsxRuntime.jsx(AnimatedSpinnerIcon, {}), $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]);
|
|
737
|
+
let t4;
|
|
738
|
+
return $[5] !== as || $[6] !== rest ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as, "data-ui": "Spinner", ...rest, className: t2, children: t3 }), $[5] = as, $[6] = rest, $[7] = t4) : t4 = $[7], t4;
|
|
721
739
|
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = css.spinner(), $[0] = t0) : t0 = $[0];
|
|
726
|
-
let t1;
|
|
727
|
-
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(AnimatedSpinnerIcon, {}), $[1] = t1) : t1 = $[1];
|
|
728
|
-
let t2;
|
|
729
|
-
return $[2] !== props || $[3] !== ref ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Text, { "data-ui": "Spinner", ...props, className: t0, ref, children: t1 }), $[2] = props, $[3] = ref, $[4] = t2) : t2 = $[4], t2;
|
|
730
|
-
});
|
|
731
|
-
Spinner.displayName = "ForwardRef(Spinner)";
|
|
732
|
-
const Button = react.forwardRef(function(props, ref) {
|
|
740
|
+
Spinner.displayName = "Spinner";
|
|
741
|
+
const DEFAULT_BUTTON_ELEMENT = "button";
|
|
742
|
+
function Button(props) {
|
|
733
743
|
const {
|
|
734
|
-
|
|
735
|
-
as:
|
|
744
|
+
align = "center",
|
|
745
|
+
as: Element2 = DEFAULT_BUTTON_ELEMENT,
|
|
736
746
|
children,
|
|
737
747
|
className,
|
|
738
|
-
direction,
|
|
739
748
|
disabled,
|
|
740
749
|
display = "inline-flex",
|
|
741
750
|
flex,
|
|
@@ -743,7 +752,6 @@ const Button = react.forwardRef(function(props, ref) {
|
|
|
743
752
|
gap = props.space ?? props.padding ?? 3,
|
|
744
753
|
gapX,
|
|
745
754
|
gapY,
|
|
746
|
-
href,
|
|
747
755
|
icon: IconComponent,
|
|
748
756
|
iconRight: IconRightComponent,
|
|
749
757
|
justify = "center",
|
|
@@ -768,315 +776,299 @@ const Button = react.forwardRef(function(props, ref) {
|
|
|
768
776
|
type = "button",
|
|
769
777
|
muted = !1,
|
|
770
778
|
width,
|
|
771
|
-
|
|
772
|
-
...restProps
|
|
779
|
+
...rest
|
|
773
780
|
} = props;
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
paddingX,
|
|
796
|
-
paddingY,
|
|
797
|
-
paddingTop,
|
|
798
|
-
paddingBottom,
|
|
799
|
-
paddingLeft,
|
|
800
|
-
paddingRight,
|
|
801
|
-
children: [
|
|
781
|
+
let href;
|
|
782
|
+
return "href" in rest && (href = typeof rest.href == "string" ? rest.href : href, delete rest.href), /* @__PURE__ */ jsxRuntime.jsxs(
|
|
783
|
+
Element2,
|
|
784
|
+
{
|
|
785
|
+
"data-ui": "Button",
|
|
786
|
+
...rest,
|
|
787
|
+
className: css.composeClassNames(className, css.button({
|
|
788
|
+
display,
|
|
789
|
+
flex,
|
|
790
|
+
mode,
|
|
791
|
+
radius,
|
|
792
|
+
tone,
|
|
793
|
+
width
|
|
794
|
+
})),
|
|
795
|
+
"data-disabled": loading || disabled ? "" : void 0,
|
|
796
|
+
"data-selected": selected ? "" : void 0,
|
|
797
|
+
disabled: !!(loading || disabled),
|
|
798
|
+
href: disabled ? void 0 : href,
|
|
799
|
+
type,
|
|
800
|
+
children: [
|
|
801
|
+
!!loading && /* @__PURE__ */ jsxRuntime.jsx(Box, { align: "center", as: "span", className: css.buttonLoadingBox(), display: "flex", flex: 1, justify: "center", width: "fill", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: fontSize }) }),
|
|
802
|
+
(IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Box, { align, as: "span", display: "flex", flex: 1, gap, gapX, gapY, justify, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, children: [
|
|
802
803
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { as: "span", flex: "none", muted: !0, size: fontSize, children: [
|
|
803
804
|
react.isValidElement(IconComponent) && IconComponent,
|
|
804
|
-
|
|
805
|
+
reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
805
806
|
] }),
|
|
806
807
|
text && /* @__PURE__ */ jsxRuntime.jsx(Text, { align: textAlign, as: "span", flex: "none", muted, size: fontSize, textOverflow, weight: textWeight, children: text }),
|
|
807
808
|
IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { as: "span", flex: "none", muted: !0, size: fontSize, children: [
|
|
808
809
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
809
|
-
|
|
810
|
+
reactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
810
811
|
] })
|
|
811
|
-
]
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
flex: 1,
|
|
819
|
-
padding,
|
|
820
|
-
paddingX,
|
|
821
|
-
paddingY,
|
|
822
|
-
paddingTop,
|
|
823
|
-
paddingBottom,
|
|
824
|
-
paddingLeft,
|
|
825
|
-
paddingRight,
|
|
826
|
-
children
|
|
827
|
-
}
|
|
828
|
-
)
|
|
829
|
-
] });
|
|
830
|
-
});
|
|
831
|
-
Button.displayName = "ForwardRef(Button)";
|
|
812
|
+
] }),
|
|
813
|
+
children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", flex: 1, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, children })
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
Button.displayName = "Button";
|
|
832
819
|
function useCard() {
|
|
833
820
|
return react.useContext(CardContext);
|
|
834
821
|
}
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
822
|
+
const DEFAULT_CARD_ELEMENT = "div";
|
|
823
|
+
function Card(props) {
|
|
824
|
+
const $ = reactCompilerRuntime.c(43), t0 = props;
|
|
825
|
+
let className, disabled, pressed, rest, schemeProp, selected, shadow, style, t1, t2, t3, t4, t5;
|
|
826
|
+
$[0] !== t0 ? ({
|
|
827
|
+
__unstable_checkered: t1,
|
|
828
|
+
__unstable_focusRing: t2,
|
|
829
|
+
as: t3,
|
|
842
830
|
className,
|
|
831
|
+
disabled,
|
|
843
832
|
pressed,
|
|
844
|
-
radius:
|
|
833
|
+
radius: t4,
|
|
845
834
|
scheme: schemeProp,
|
|
846
835
|
selected,
|
|
847
836
|
shadow,
|
|
848
837
|
style,
|
|
849
|
-
tone:
|
|
850
|
-
...
|
|
851
|
-
} =
|
|
852
|
-
const checkered =
|
|
853
|
-
let t6;
|
|
854
|
-
$[13] !== t4 || $[14] !== t5 ? (t6 = {
|
|
855
|
-
tone: t4,
|
|
856
|
-
scheme: t5
|
|
857
|
-
}, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15];
|
|
858
|
-
const context = t6, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t7 = scheme === context.scheme ? void 0 : scheme;
|
|
838
|
+
tone: t5,
|
|
839
|
+
...rest
|
|
840
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = pressed, $[4] = rest, $[5] = schemeProp, $[6] = selected, $[7] = shadow, $[8] = style, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = t5) : (className = $[1], disabled = $[2], pressed = $[3], rest = $[4], schemeProp = $[5], selected = $[6], shadow = $[7], style = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], t5 = $[13]);
|
|
841
|
+
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent = useCard(), t6 = parent?.tone ?? "default", t7 = parent?.scheme ?? "light";
|
|
859
842
|
let t8;
|
|
860
|
-
$[
|
|
861
|
-
|
|
843
|
+
$[14] !== t6 || $[15] !== t7 ? (t8 = {
|
|
844
|
+
tone: t6,
|
|
845
|
+
scheme: t7
|
|
846
|
+
}, $[14] = t6, $[15] = t7, $[16] = t8) : t8 = $[16];
|
|
847
|
+
const context = t8, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t9 = scheme === context.scheme ? void 0 : scheme;
|
|
848
|
+
let t10;
|
|
849
|
+
$[17] !== className || $[18] !== shadow || $[19] !== t9 || $[20] !== tone ? (t10 = css.composeClassNames(className, css.card({
|
|
850
|
+
scheme: t9,
|
|
862
851
|
shadow,
|
|
863
852
|
tone
|
|
864
|
-
})), $[
|
|
865
|
-
const
|
|
866
|
-
let
|
|
867
|
-
$[
|
|
868
|
-
let node =
|
|
853
|
+
})), $[17] = className, $[18] = shadow, $[19] = t9, $[20] = tone, $[21] = t10) : t10 = $[21];
|
|
854
|
+
const t11 = checkered ? "" : void 0, t12 = disabled ? "" : void 0, t13 = focusRing ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0;
|
|
855
|
+
let t16;
|
|
856
|
+
$[22] !== as || $[23] !== radius || $[24] !== rest || $[25] !== style || $[26] !== t10 || $[27] !== t11 || $[28] !== t12 || $[29] !== t13 || $[30] !== t14 || $[31] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Card", ...rest, as, className: t10, "data-checkered": t11, "data-disabled": t12, "data-focus-ring": t13, "data-pressed": t14, "data-selected": t15, radius, style }), $[22] = as, $[23] = radius, $[24] = rest, $[25] = style, $[26] = t10, $[27] = t11, $[28] = t12, $[29] = t13, $[30] = t14, $[31] = t15, $[32] = t16) : t16 = $[32];
|
|
857
|
+
let node = t16;
|
|
869
858
|
if (scheme === context.scheme && tone === context.tone)
|
|
870
859
|
return node;
|
|
871
|
-
const
|
|
872
|
-
let
|
|
873
|
-
if ($[
|
|
874
|
-
const
|
|
875
|
-
let
|
|
876
|
-
return $[
|
|
860
|
+
const t17 = parent?.compat_provider, t18 = tone ?? context.tone;
|
|
861
|
+
let t19;
|
|
862
|
+
if ($[33] !== node || $[34] !== scheme || $[35] !== t17 || $[36] !== t18 ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { compat_provider: t17, rendered: !0, scheme, tone: t18, children: node }), $[33] = node, $[34] = scheme, $[35] = t17, $[36] = t18, $[37] = t19) : t19 = $[37], node = t19, parent?.compat_provider) {
|
|
863
|
+
const t20 = tone ?? context.tone;
|
|
864
|
+
let t21;
|
|
865
|
+
return $[38] !== node || $[39] !== parent.compat_provider || $[40] !== scheme || $[41] !== t20 ? (t21 = react.createElement(parent.compat_provider, {
|
|
877
866
|
children: node,
|
|
878
867
|
scheme,
|
|
879
|
-
tone:
|
|
880
|
-
}), $[
|
|
868
|
+
tone: t20
|
|
869
|
+
}), $[38] = node, $[39] = parent.compat_provider, $[40] = scheme, $[41] = t20, $[42] = t21) : t21 = $[42], t21;
|
|
881
870
|
}
|
|
882
871
|
return node;
|
|
883
|
-
}
|
|
884
|
-
Card.displayName = "
|
|
885
|
-
const
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
872
|
+
}
|
|
873
|
+
Card.displayName = "Card";
|
|
874
|
+
const DEFAULT_CHECKBOX_ELEMENT = "input";
|
|
875
|
+
function Checkbox(props) {
|
|
876
|
+
const $ = reactCompilerRuntime.c(34), t0 = props;
|
|
877
|
+
let checked, className, customValidity, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
|
|
878
|
+
$[0] !== t0 ? ({
|
|
879
|
+
as: t1,
|
|
889
880
|
checked,
|
|
890
881
|
className,
|
|
891
882
|
disabled,
|
|
892
883
|
indeterminate,
|
|
893
884
|
customValidity,
|
|
894
885
|
readOnly,
|
|
886
|
+
ref: forwardedRef,
|
|
895
887
|
style,
|
|
896
|
-
...
|
|
897
|
-
} =
|
|
898
|
-
const ref = react.useRef(null);
|
|
899
|
-
let
|
|
900
|
-
$[
|
|
901
|
-
let
|
|
902
|
-
$[
|
|
888
|
+
...rest
|
|
889
|
+
} = t0, $[0] = t0, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = forwardedRef, $[6] = indeterminate, $[7] = readOnly, $[8] = rest, $[9] = style, $[10] = t1) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], forwardedRef = $[5], indeterminate = $[6], readOnly = $[7], rest = $[8], style = $[9], t1 = $[10]);
|
|
890
|
+
const Element2 = t1 === void 0 ? DEFAULT_CHECKBOX_ELEMENT : t1, ref = react.useRef(null);
|
|
891
|
+
let t2;
|
|
892
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
|
|
893
|
+
let t3, t4;
|
|
894
|
+
$[12] !== indeterminate ? (t3 = () => {
|
|
903
895
|
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
904
|
-
},
|
|
905
|
-
let
|
|
906
|
-
$[
|
|
907
|
-
let
|
|
908
|
-
$[
|
|
909
|
-
const
|
|
910
|
-
let
|
|
911
|
-
$[
|
|
912
|
-
let
|
|
913
|
-
$[
|
|
896
|
+
}, t4 = [indeterminate], $[12] = indeterminate, $[13] = t3, $[14] = t4) : (t3 = $[13], t4 = $[14]), react.useEffect(t3, t4), useCustomValidity(ref, customValidity);
|
|
897
|
+
let t5;
|
|
898
|
+
$[15] !== className ? (t5 = css.composeClassNames(className, css.checkbox()), $[15] = className, $[16] = t5) : t5 = $[16];
|
|
899
|
+
let t6;
|
|
900
|
+
$[17] !== className ? (t6 = css.composeClassNames(className, css.checkboxInput()), $[17] = className, $[18] = t6) : t6 = $[18];
|
|
901
|
+
const t7 = disabled ? "" : void 0, t8 = !disabled && readOnly ? "" : void 0, t9 = customValidity ? "" : void 0, t10 = disabled || readOnly;
|
|
902
|
+
let t11;
|
|
903
|
+
$[19] !== Element2 || $[20] !== checked || $[21] !== readOnly || $[22] !== rest || $[23] !== t10 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, checked, className: t6, "data-disabled": t7, "data-read-only": t8, "data-error": t9, disabled: t10, type: "checkbox", readOnly, ref }), $[19] = Element2, $[20] = checked, $[21] = readOnly, $[22] = rest, $[23] = t10, $[24] = t6, $[25] = t7, $[26] = t8, $[27] = t9, $[28] = t11) : t11 = $[28];
|
|
904
|
+
let t12;
|
|
905
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
914
906
|
/* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
|
|
915
907
|
/* @__PURE__ */ jsxRuntime.jsx(icons.RemoveIcon, {})
|
|
916
|
-
] }), $[
|
|
917
|
-
let
|
|
918
|
-
return $[
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
] }), $[
|
|
922
|
-
}
|
|
923
|
-
Checkbox.displayName = "
|
|
908
|
+
] }), $[29] = t12) : t12 = $[29];
|
|
909
|
+
let t13;
|
|
910
|
+
return $[30] !== style || $[31] !== t11 || $[32] !== t5 ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: t5, "data-ui": "Checkbox", style, children: [
|
|
911
|
+
t11,
|
|
912
|
+
t12
|
|
913
|
+
] }), $[30] = style, $[31] = t11, $[32] = t5, $[33] = t13) : t13 = $[33], t13;
|
|
914
|
+
}
|
|
915
|
+
Checkbox.displayName = "Checkbox";
|
|
924
916
|
const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
|
|
925
917
|
return require("./refractor.js");
|
|
926
|
-
})),
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
918
|
+
})), DEFAULT_CODE_ELEMENT = "pre";
|
|
919
|
+
function Code(props) {
|
|
920
|
+
const $ = reactCompilerRuntime.c(25), t0 = props;
|
|
921
|
+
let children, className, languageProp, rest, t1, t2, weight;
|
|
922
|
+
$[0] !== t0 ? ({
|
|
923
|
+
as: t1,
|
|
931
924
|
children,
|
|
932
925
|
className,
|
|
933
926
|
language: languageProp,
|
|
934
|
-
size:
|
|
927
|
+
size: t2,
|
|
935
928
|
weight,
|
|
936
|
-
...
|
|
937
|
-
} =
|
|
938
|
-
const
|
|
939
|
-
let
|
|
940
|
-
$[8] !== className || $[9] !== size2 || $[10] !== weight ? (
|
|
929
|
+
...rest
|
|
930
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = weight) : (children = $[1], className = $[2], languageProp = $[3], rest = $[4], t1 = $[5], t2 = $[6], weight = $[7]);
|
|
931
|
+
const Element2 = t1 === void 0 ? DEFAULT_CODE_ELEMENT : t1, size2 = t2 === void 0 ? 2 : t2, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
932
|
+
let t3;
|
|
933
|
+
$[8] !== className || $[9] !== size2 || $[10] !== weight ? (t3 = css.composeClassNames(className, css.code({
|
|
941
934
|
size: size2,
|
|
942
935
|
weight
|
|
943
|
-
})), $[8] = className, $[9] = size2, $[10] = weight, $[11] =
|
|
944
|
-
let t3;
|
|
945
|
-
$[12] !== children ? (t3 = /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[12] = children, $[13] = t3) : t3 = $[13];
|
|
936
|
+
})), $[8] = className, $[9] = size2, $[10] = weight, $[11] = t3) : t3 = $[11];
|
|
946
937
|
let t4;
|
|
947
|
-
$[
|
|
938
|
+
$[12] !== children ? (t4 = /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[12] = children, $[13] = t4) : t4 = $[13];
|
|
948
939
|
let t5;
|
|
949
|
-
$[
|
|
940
|
+
$[14] !== children || $[15] !== language ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(LazyRefractor, { language, value: children }), $[14] = children, $[15] = language, $[16] = t5) : t5 = $[16];
|
|
950
941
|
let t6;
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
942
|
+
$[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: t4, children: t5 }), $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];
|
|
943
|
+
let t7;
|
|
944
|
+
return $[20] !== Element2 || $[21] !== rest || $[22] !== t3 || $[23] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Code", ...rest, className: t3, children: t6 }), $[20] = Element2, $[21] = rest, $[22] = t3, $[23] = t6, $[24] = t7) : t7 = $[24], t7;
|
|
945
|
+
}
|
|
946
|
+
Code.displayName = "Code";
|
|
947
|
+
const DEFAULT_CONTAINER_ELEMENT = "div";
|
|
948
|
+
function Container(props) {
|
|
949
|
+
const $ = reactCompilerRuntime.c(12), t0 = props;
|
|
950
|
+
let className, rest, t1, t2;
|
|
951
|
+
$[0] !== t0 ? ({
|
|
952
|
+
as: t1,
|
|
959
953
|
className,
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
$[6] !== className || $[7] !== width ? (t2 = css.composeClassNames(className, css.container({
|
|
954
|
+
width: t2,
|
|
955
|
+
...rest
|
|
956
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1, $[4] = t2) : (className = $[1], rest = $[2], t1 = $[3], t2 = $[4]);
|
|
957
|
+
const as = t1 === void 0 ? DEFAULT_CONTAINER_ELEMENT : t1, width = t2 === void 0 ? 2 : t2;
|
|
958
|
+
let t3;
|
|
959
|
+
$[5] !== className || $[6] !== width ? (t3 = css.composeClassNames(className, css.container({
|
|
967
960
|
width
|
|
968
|
-
})), $[
|
|
961
|
+
})), $[5] = className, $[6] = width, $[7] = t3) : t3 = $[7];
|
|
962
|
+
let t4;
|
|
963
|
+
return $[8] !== as || $[9] !== rest || $[10] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Container", ...rest, as, className: t3 }), $[8] = as, $[9] = rest, $[10] = t3, $[11] = t4) : t4 = $[11], t4;
|
|
964
|
+
}
|
|
965
|
+
Container.displayName = "Container";
|
|
966
|
+
const DEFAULT_FLEX_ELEMENT = "div";
|
|
967
|
+
function Flex(props) {
|
|
968
|
+
const $ = reactCompilerRuntime.c(8), t0 = props;
|
|
969
|
+
let rest, t1, t2;
|
|
970
|
+
$[0] !== t0 ? ({
|
|
971
|
+
as: t1,
|
|
972
|
+
direction: t2,
|
|
973
|
+
...rest
|
|
974
|
+
} = t0, $[0] = t0, $[1] = rest, $[2] = t1, $[3] = t2) : (rest = $[1], t1 = $[2], t2 = $[3]);
|
|
975
|
+
const as = t1 === void 0 ? DEFAULT_FLEX_ELEMENT : t1, direction = t2 === void 0 ? "row" : t2;
|
|
969
976
|
let t3;
|
|
970
|
-
return $[
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
...restProps
|
|
980
|
-
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
981
|
-
const direction = t0 === void 0 ? "row" : t0;
|
|
982
|
-
let t1;
|
|
983
|
-
return $[4] !== as || $[5] !== direction || $[6] !== ref || $[7] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Flex", ...restProps, as, direction, display: "flex", ref }), $[4] = as, $[5] = direction, $[6] = ref, $[7] = restProps, $[8] = t1) : t1 = $[8], t1;
|
|
984
|
-
});
|
|
985
|
-
Flex.displayName = "ForwardRef(Flex)";
|
|
986
|
-
const Grid = react.forwardRef(function(props, ref) {
|
|
987
|
-
const $ = reactCompilerRuntime.c(9);
|
|
988
|
-
let as, children, restProps;
|
|
989
|
-
$[0] !== props ? ({
|
|
990
|
-
as,
|
|
977
|
+
return $[4] !== as || $[5] !== direction || $[6] !== rest ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Flex", ...rest, as, direction, display: "flex" }), $[4] = as, $[5] = direction, $[6] = rest, $[7] = t3) : t3 = $[7], t3;
|
|
978
|
+
}
|
|
979
|
+
Flex.displayName = "Flex";
|
|
980
|
+
const DEFAULT_GRID_ELEMENT = "div";
|
|
981
|
+
function Grid(props) {
|
|
982
|
+
const $ = reactCompilerRuntime.c(8), t0 = props;
|
|
983
|
+
let children, rest, t1;
|
|
984
|
+
$[0] !== t0 ? ({
|
|
985
|
+
as: t1,
|
|
991
986
|
children,
|
|
992
|
-
...
|
|
993
|
-
} =
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
});
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
$
|
|
1002
|
-
|
|
987
|
+
...rest
|
|
988
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = rest, $[3] = t1) : (children = $[1], rest = $[2], t1 = $[3]);
|
|
989
|
+
const as = t1 === void 0 ? DEFAULT_GRID_ELEMENT : t1;
|
|
990
|
+
let t2;
|
|
991
|
+
return $[4] !== as || $[5] !== children || $[6] !== rest ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Grid", ...rest, as, display: "grid", children }), $[4] = as, $[5] = children, $[6] = rest, $[7] = t2) : t2 = $[7], t2;
|
|
992
|
+
}
|
|
993
|
+
Grid.displayName = "Grid";
|
|
994
|
+
const DEFAULT_HEADING_ELEMENT = "div";
|
|
995
|
+
function Heading(props) {
|
|
996
|
+
const $ = reactCompilerRuntime.c(30), t0 = props;
|
|
997
|
+
let align, children, className, flex, rest, t1, t2, t3, t4, textOverflowProp, weight;
|
|
998
|
+
$[0] !== t0 ? ({
|
|
999
|
+
accent: t1,
|
|
1003
1000
|
align,
|
|
1004
|
-
as:
|
|
1001
|
+
as: t2,
|
|
1005
1002
|
children,
|
|
1006
1003
|
className,
|
|
1007
1004
|
flex,
|
|
1008
|
-
muted:
|
|
1009
|
-
size:
|
|
1005
|
+
muted: t3,
|
|
1006
|
+
size: t4,
|
|
1010
1007
|
textOverflow: textOverflowProp,
|
|
1011
1008
|
weight,
|
|
1012
|
-
...
|
|
1013
|
-
} =
|
|
1014
|
-
const accent =
|
|
1015
|
-
let
|
|
1016
|
-
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (
|
|
1009
|
+
...rest
|
|
1010
|
+
} = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4, $[10] = textOverflowProp, $[11] = weight) : (align = $[1], children = $[2], className = $[3], flex = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8], t4 = $[9], textOverflowProp = $[10], weight = $[11]);
|
|
1011
|
+
const accent = t1 === void 0 ? !1 : t1, Element2 = t2 === void 0 ? DEFAULT_HEADING_ELEMENT : t2, muted = t3 === void 0 ? !1 : t3, size2 = t4 === void 0 ? 2 : t4;
|
|
1012
|
+
let t5;
|
|
1013
|
+
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t5 = css.composeClassNames(className, css.heading({
|
|
1017
1014
|
accent,
|
|
1018
1015
|
align,
|
|
1019
1016
|
flex,
|
|
1020
1017
|
muted,
|
|
1021
1018
|
size: size2,
|
|
1022
1019
|
weight
|
|
1023
|
-
})), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] =
|
|
1024
|
-
let t5;
|
|
1025
|
-
$[20] !== textOverflowProp ? (t5 = css.textOverflow({
|
|
1026
|
-
textOverflow: textOverflowProp
|
|
1027
|
-
}), $[20] = textOverflowProp, $[21] = t5) : t5 = $[21];
|
|
1020
|
+
})), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t5) : t5 = $[19];
|
|
1028
1021
|
let t6;
|
|
1029
|
-
$[
|
|
1022
|
+
$[20] !== textOverflowProp ? (t6 = css.textOverflow({
|
|
1023
|
+
textOverflow: textOverflowProp
|
|
1024
|
+
}), $[20] = textOverflowProp, $[21] = t6) : t6 = $[21];
|
|
1030
1025
|
let t7;
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1026
|
+
$[22] !== children || $[23] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t6, children }), $[22] = children, $[23] = t6, $[24] = t7) : t7 = $[24];
|
|
1027
|
+
let t8;
|
|
1028
|
+
return $[25] !== Element2 || $[26] !== rest || $[27] !== t5 || $[28] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Heading", ...rest, className: t5, children: t7 }), $[25] = Element2, $[26] = rest, $[27] = t5, $[28] = t7, $[29] = t8) : t8 = $[29], t8;
|
|
1029
|
+
}
|
|
1030
|
+
Heading.displayName = "Heading";
|
|
1031
|
+
const DEFAULT_INLINE_ELEMENT = "div";
|
|
1032
|
+
function Inline(props) {
|
|
1033
|
+
const $ = reactCompilerRuntime.c(11), t0 = props;
|
|
1034
|
+
let children, gap, rest, space, t1;
|
|
1035
|
+
$[0] !== t0 ? ({
|
|
1036
|
+
as: t1,
|
|
1037
|
+
children,
|
|
1040
1038
|
gap,
|
|
1041
|
-
gapX,
|
|
1042
|
-
gapY,
|
|
1043
1039
|
space,
|
|
1044
|
-
...
|
|
1045
|
-
} =
|
|
1046
|
-
|
|
1047
|
-
$[8] !== childrenProp ? (t1 = react.Children.map(childrenProp, _temp$3), $[8] = childrenProp, $[9] = t1) : t1 = $[9], t0 = t1;
|
|
1048
|
-
const children = t0, t2 = gap ?? space;
|
|
1040
|
+
...rest
|
|
1041
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (children = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
|
|
1042
|
+
const as = t1 === void 0 ? DEFAULT_INLINE_ELEMENT : t1, t2 = gap ?? space;
|
|
1049
1043
|
let t3;
|
|
1050
|
-
return $[
|
|
1051
|
-
}
|
|
1052
|
-
Inline.displayName = "
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
$[0] !== props ? ({
|
|
1060
|
-
as: t0,
|
|
1044
|
+
return $[6] !== as || $[7] !== children || $[8] !== rest || $[9] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Inline", ...rest, align: "center", as, display: "flex", gap: t2, wrap: "wrap", children }), $[6] = as, $[7] = children, $[8] = rest, $[9] = t2, $[10] = t3) : t3 = $[10], t3;
|
|
1045
|
+
}
|
|
1046
|
+
Inline.displayName = "Inline";
|
|
1047
|
+
const DEFAULT_KBD_ELEMENT = "kbd";
|
|
1048
|
+
function KBD(props) {
|
|
1049
|
+
const $ = reactCompilerRuntime.c(22), t0 = props;
|
|
1050
|
+
let children, className, rest, t1, t2, t3, t4, t5;
|
|
1051
|
+
$[0] !== t0 ? ({
|
|
1052
|
+
as: t1,
|
|
1061
1053
|
children,
|
|
1062
1054
|
className,
|
|
1063
|
-
display:
|
|
1064
|
-
fontSize:
|
|
1065
|
-
padding:
|
|
1066
|
-
radius:
|
|
1067
|
-
...
|
|
1068
|
-
} =
|
|
1069
|
-
const as =
|
|
1070
|
-
let t5;
|
|
1071
|
-
$[9] !== className || $[10] !== radius ? (t5 = css.composeClassNames(className, css.kbd({
|
|
1072
|
-
radius
|
|
1073
|
-
})), $[9] = className, $[10] = radius, $[11] = t5) : t5 = $[11];
|
|
1074
|
-
let t6;
|
|
1075
|
-
$[12] !== children || $[13] !== fontSize ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", muted: !0, size: fontSize, weight: "semibold", children }), $[12] = children, $[13] = fontSize, $[14] = t6) : t6 = $[14];
|
|
1055
|
+
display: t2,
|
|
1056
|
+
fontSize: t3,
|
|
1057
|
+
padding: t4,
|
|
1058
|
+
radius: t5,
|
|
1059
|
+
...rest
|
|
1060
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5) : (children = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8]);
|
|
1061
|
+
const as = t1 === void 0 ? DEFAULT_KBD_ELEMENT : t1, display = t2 === void 0 ? "inline-block" : t2, fontSize = t3 === void 0 ? 0 : t3, padding = t4 === void 0 ? 1 : t4, radius = t5 === void 0 ? 2 : t5, t6 = as;
|
|
1076
1062
|
let t7;
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1063
|
+
$[9] !== className || $[10] !== radius ? (t7 = css.composeClassNames(className, css.kbd({
|
|
1064
|
+
radius
|
|
1065
|
+
})), $[9] = className, $[10] = radius, $[11] = t7) : t7 = $[11];
|
|
1066
|
+
let t8;
|
|
1067
|
+
$[12] !== children || $[13] !== fontSize ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", muted: !0, size: fontSize, weight: "semibold", children }), $[12] = children, $[13] = fontSize, $[14] = t8) : t8 = $[14];
|
|
1068
|
+
let t9;
|
|
1069
|
+
return $[15] !== display || $[16] !== padding || $[17] !== rest || $[18] !== t6 || $[19] !== t7 || $[20] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "KBD", ...rest, as: t6, className: t7, display, muted: !0, padding, children: t8 }), $[15] = display, $[16] = padding, $[17] = rest, $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9) : t9 = $[21], t9;
|
|
1070
|
+
}
|
|
1071
|
+
KBD.displayName = "KBD";
|
|
1080
1072
|
const origin = {
|
|
1081
1073
|
name: "@sanity/ui/origin",
|
|
1082
1074
|
fn({
|
|
@@ -1144,18 +1136,20 @@ function getRoundedCommands(points) {
|
|
|
1144
1136
|
function compileCommands(cmds) {
|
|
1145
1137
|
return cmds.map((n, idx) => n.type === "point" ? `${idx === 0 ? "M" : "L"} ${n.x} ${n.y}` : n.type === "curve" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : "").join(" ");
|
|
1146
1138
|
}
|
|
1147
|
-
const
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1139
|
+
const DEFAULT_ARROW_ELEMENT = "div";
|
|
1140
|
+
function Arrow(props) {
|
|
1141
|
+
const $ = reactCompilerRuntime.c(31), t0 = props;
|
|
1142
|
+
let h, rest, style, t1, t2, w;
|
|
1143
|
+
$[0] !== t0 ? ({
|
|
1144
|
+
as: t1,
|
|
1151
1145
|
width: w,
|
|
1152
1146
|
height: h,
|
|
1153
|
-
radius:
|
|
1147
|
+
radius: t2,
|
|
1154
1148
|
style,
|
|
1155
|
-
...
|
|
1156
|
-
} =
|
|
1157
|
-
const radius =
|
|
1158
|
-
let
|
|
1149
|
+
...rest
|
|
1150
|
+
} = t0, $[0] = t0, $[1] = h, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2, $[6] = w) : (h = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5], w = $[6]);
|
|
1151
|
+
const Element2 = t1 === void 0 ? DEFAULT_ARROW_ELEMENT : t1, radius = t2 === void 0 ? 0 : t2, center = w / 2;
|
|
1152
|
+
let t3;
|
|
1159
1153
|
const points = [{
|
|
1160
1154
|
x: 0,
|
|
1161
1155
|
y: 0
|
|
@@ -1175,39 +1169,39 @@ const Arrow = react.forwardRef(function(props, ref) {
|
|
|
1175
1169
|
x: w,
|
|
1176
1170
|
y: 0
|
|
1177
1171
|
}], cmds = getRoundedCommands(points);
|
|
1178
|
-
|
|
1179
|
-
const path =
|
|
1180
|
-
let t2;
|
|
1181
|
-
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t2 = css._arrow(), $[6] = t2) : t2 = $[6];
|
|
1182
|
-
const t3 = `${w}px`;
|
|
1172
|
+
t3 = compileCommands(cmds);
|
|
1173
|
+
const path = t3, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
|
|
1183
1174
|
let t4;
|
|
1184
|
-
$[7]
|
|
1175
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = css._arrow(), $[7] = t4) : t4 = $[7];
|
|
1176
|
+
const t5 = `${w}px`;
|
|
1177
|
+
let t6;
|
|
1178
|
+
$[8] !== style || $[9] !== t5 ? (t6 = {
|
|
1185
1179
|
...style,
|
|
1186
|
-
"--arrow-size":
|
|
1187
|
-
}, $[
|
|
1188
|
-
const
|
|
1189
|
-
let t7;
|
|
1190
|
-
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t7 = css._arrowStrokeMask(), $[10] = t7) : t7 = $[10];
|
|
1191
|
-
let t8;
|
|
1192
|
-
$[11] !== w ? (t8 = /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { className: t7, x: 0, width: w, height: w, fill: "white" }) }), $[11] = w, $[12] = t8) : t8 = $[12];
|
|
1180
|
+
"--arrow-size": t5
|
|
1181
|
+
}, $[8] = style, $[9] = t5, $[10] = t6) : t6 = $[10];
|
|
1182
|
+
const t7 = t6, t8 = `0 0 ${w} ${w}`;
|
|
1193
1183
|
let t9;
|
|
1194
|
-
$[
|
|
1184
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._arrowStrokeMask(), $[11] = t9) : t9 = $[11];
|
|
1195
1185
|
let t10;
|
|
1196
|
-
$[
|
|
1186
|
+
$[12] !== w ? (t10 = /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsxRuntime.jsx("rect", { className: t9, x: 0, width: w, height: w, fill: "white" }) }), $[12] = w, $[13] = t10) : t10 = $[13];
|
|
1197
1187
|
let t11;
|
|
1198
|
-
$[
|
|
1188
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css._arrowStroke(), $[14] = t11) : t11 = $[14];
|
|
1199
1189
|
let t12;
|
|
1200
|
-
$[
|
|
1190
|
+
$[15] !== strokePath ? (t12 = /* @__PURE__ */ jsxRuntime.jsx("path", { className: t11, d: strokePath, mask: "url(#stroke-mask)" }), $[15] = strokePath, $[16] = t12) : t12 = $[16];
|
|
1201
1191
|
let t13;
|
|
1202
|
-
$[
|
|
1203
|
-
t8,
|
|
1204
|
-
t10,
|
|
1205
|
-
t12
|
|
1206
|
-
] }), $[19] = t10, $[20] = t12, $[21] = t6, $[22] = t8, $[23] = w, $[24] = t13) : t13 = $[24];
|
|
1192
|
+
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t13 = css._arrowShape(), $[17] = t13) : t13 = $[17];
|
|
1207
1193
|
let t14;
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1194
|
+
$[18] !== fillPath ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("path", { className: t13, d: fillPath }), $[18] = fillPath, $[19] = t14) : t14 = $[19];
|
|
1195
|
+
let t15;
|
|
1196
|
+
$[20] !== t10 || $[21] !== t12 || $[22] !== t14 || $[23] !== t8 || $[24] !== w ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: w, height: w, viewBox: t8, children: [
|
|
1197
|
+
t10,
|
|
1198
|
+
t12,
|
|
1199
|
+
t14
|
|
1200
|
+
] }), $[20] = t10, $[21] = t12, $[22] = t14, $[23] = t8, $[24] = w, $[25] = t15) : t15 = $[25];
|
|
1201
|
+
let t16;
|
|
1202
|
+
return $[26] !== Element2 || $[27] !== rest || $[28] !== t15 || $[29] !== t7 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t4, style: t7, children: t15 }), $[26] = Element2, $[27] = rest, $[28] = t15, $[29] = t7, $[30] = t16) : t16 = $[30], t16;
|
|
1203
|
+
}
|
|
1204
|
+
Arrow.displayName = "Arrow";
|
|
1211
1205
|
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
|
|
1212
1206
|
function BoundaryElementProvider(props) {
|
|
1213
1207
|
const $ = reactCompilerRuntime.c(5), {
|
|
@@ -1237,14 +1231,6 @@ function useBoundaryElement() {
|
|
|
1237
1231
|
throw new Error("useBoundaryElement(): the context value is not compatible");
|
|
1238
1232
|
return value || DEFAULT_VALUE;
|
|
1239
1233
|
}
|
|
1240
|
-
function ConditionalWrapper({
|
|
1241
|
-
children,
|
|
1242
|
-
condition,
|
|
1243
|
-
wrapper
|
|
1244
|
-
}) {
|
|
1245
|
-
return condition ? wrapper(children) : children;
|
|
1246
|
-
}
|
|
1247
|
-
ConditionalWrapper.displayName = "ConditionalWrapper";
|
|
1248
1234
|
function findMaxBreakpoints(media2, width) {
|
|
1249
1235
|
const ret = [];
|
|
1250
1236
|
for (let i = 0; i < media2.length; i += 1)
|
|
@@ -1257,40 +1243,43 @@ function findMinBreakpoints(media2, width) {
|
|
|
1257
1243
|
media2[i] <= width && ret.push(i);
|
|
1258
1244
|
return ret;
|
|
1259
1245
|
}
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1246
|
+
const DEFAULT_ELEMENT_QUERY_ELEMENT = "div", DEFAULT_BREAKPOINTS = Object.values(css.BREAKPOINTS);
|
|
1247
|
+
function ElementQuery(props) {
|
|
1248
|
+
const $ = reactCompilerRuntime.c(21), t0 = props;
|
|
1249
|
+
let children, forwardedRef, mediaProp, rest, t1;
|
|
1250
|
+
$[0] !== t0 ? ({
|
|
1251
|
+
as: t1,
|
|
1264
1252
|
children,
|
|
1265
1253
|
media: mediaProp,
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
if ($[4] !== breakpoints || $[5] !== width) {
|
|
1274
|
-
const eq = findMaxBreakpoints(breakpoints, width);
|
|
1275
|
-
t2 = eq.length ? eq.join(" ") : void 0, $[4] = breakpoints, $[5] = width, $[6] = t2;
|
|
1276
|
-
} else
|
|
1277
|
-
t2 = $[6];
|
|
1278
|
-
t1 = t2;
|
|
1279
|
-
const max = t1;
|
|
1254
|
+
ref: forwardedRef,
|
|
1255
|
+
...rest
|
|
1256
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = mediaProp, $[4] = rest, $[5] = t1) : (children = $[1], forwardedRef = $[2], mediaProp = $[3], rest = $[4], t1 = $[5]);
|
|
1257
|
+
const Element2 = t1 === void 0 ? DEFAULT_ELEMENT_QUERY_ELEMENT : t1, breakpoints = mediaProp ?? DEFAULT_BREAKPOINTS, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
|
|
1258
|
+
let t2;
|
|
1259
|
+
t2 = elementSize?.border.width ?? window.innerWidth;
|
|
1260
|
+
const width = t2;
|
|
1280
1261
|
let t3, t4;
|
|
1281
|
-
if ($[
|
|
1282
|
-
const
|
|
1283
|
-
t4 =
|
|
1262
|
+
if ($[6] !== breakpoints || $[7] !== width) {
|
|
1263
|
+
const eq = findMaxBreakpoints(breakpoints, width);
|
|
1264
|
+
t4 = eq.length ? eq.join(" ") : void 0, $[6] = breakpoints, $[7] = width, $[8] = t4;
|
|
1284
1265
|
} else
|
|
1285
|
-
t4 = $[
|
|
1266
|
+
t4 = $[8];
|
|
1286
1267
|
t3 = t4;
|
|
1287
|
-
const
|
|
1268
|
+
const max = t3;
|
|
1288
1269
|
let t5, t6;
|
|
1289
|
-
$[
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1270
|
+
if ($[9] !== breakpoints || $[10] !== width) {
|
|
1271
|
+
const eq_0 = findMinBreakpoints(breakpoints, width);
|
|
1272
|
+
t6 = eq_0.length ? eq_0.join(" ") : void 0, $[9] = breakpoints, $[10] = width, $[11] = t6;
|
|
1273
|
+
} else
|
|
1274
|
+
t6 = $[11];
|
|
1275
|
+
t5 = t6;
|
|
1276
|
+
const min = t5;
|
|
1277
|
+
let t7, t8;
|
|
1278
|
+
$[12] !== element ? (t7 = () => element, t8 = [element], $[12] = element, $[13] = t7, $[14] = t8) : (t7 = $[13], t8 = $[14]), react.useImperativeHandle(forwardedRef, t7, t8);
|
|
1279
|
+
let t9;
|
|
1280
|
+
return $[15] !== Element2 || $[16] !== children || $[17] !== max || $[18] !== min || $[19] !== rest ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "ElementQuery", ...rest, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[15] = Element2, $[16] = children, $[17] = max, $[18] = min, $[19] = rest, $[20] = t9) : t9 = $[20], t9;
|
|
1281
|
+
}
|
|
1282
|
+
ElementQuery.displayName = "ElementQuery";
|
|
1294
1283
|
function getLayerContext(contextValue) {
|
|
1295
1284
|
if (!isRecord(contextValue) || contextValue.version !== 0)
|
|
1296
1285
|
throw new Error("the context value is not compatible");
|
|
@@ -1301,9 +1290,63 @@ function getLayerContext(contextValue) {
|
|
|
1301
1290
|
throw new Error("could not get layer context");
|
|
1302
1291
|
}
|
|
1303
1292
|
const LayerContext = createGlobalScopedContext("@sanity/ui/context/layer", null);
|
|
1304
|
-
function
|
|
1305
|
-
const $ = reactCompilerRuntime.c(
|
|
1306
|
-
|
|
1293
|
+
function useLayer() {
|
|
1294
|
+
const $ = reactCompilerRuntime.c(2), value = react.useContext(LayerContext);
|
|
1295
|
+
if (!value)
|
|
1296
|
+
throw new Error("useLayer(): missing context value");
|
|
1297
|
+
try {
|
|
1298
|
+
let t1;
|
|
1299
|
+
return $[0] !== value ? (t1 = getLayerContext(value), $[0] = value, $[1] = t1) : t1 = $[1], t1;
|
|
1300
|
+
} catch (t0) {
|
|
1301
|
+
const err = t0;
|
|
1302
|
+
throw err instanceof Error ? new Error(`useLayer(): ${err.message}`) : new Error(`useLayer(): ${err}`);
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
const DEFAULT_LAYER_CARD_ELEMENT = "div";
|
|
1306
|
+
function LayerCard(props) {
|
|
1307
|
+
const $ = reactCompilerRuntime.c(27), t0 = props;
|
|
1308
|
+
let children, forwardedRef, onActivate, onFocus, rest, t1, t2, t3;
|
|
1309
|
+
$[0] !== t0 ? ({
|
|
1310
|
+
as: t1,
|
|
1311
|
+
children,
|
|
1312
|
+
onActivate,
|
|
1313
|
+
onFocus,
|
|
1314
|
+
position: t2,
|
|
1315
|
+
ref: forwardedRef,
|
|
1316
|
+
style: t3,
|
|
1317
|
+
...rest
|
|
1318
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = onActivate, $[4] = onFocus, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3) : (children = $[1], forwardedRef = $[2], onActivate = $[3], onFocus = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8]);
|
|
1319
|
+
const as = t1 === void 0 ? DEFAULT_LAYER_CARD_ELEMENT : t1, position = t2 === void 0 ? "relative" : t2, style = t3 === void 0 ? EMPTY_RECORD : t3, {
|
|
1320
|
+
zIndex,
|
|
1321
|
+
isTopLayer
|
|
1322
|
+
} = useLayer(), lastFocusedRef = react.useRef(null), ref = react.useRef(null), isTopLayerRef = react.useRef(isTopLayer);
|
|
1323
|
+
let t4;
|
|
1324
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[9] = t4) : t4 = $[9], react.useImperativeHandle(forwardedRef, t4);
|
|
1325
|
+
let t5, t6;
|
|
1326
|
+
$[10] !== isTopLayer || $[11] !== onActivate ? (t5 = () => {
|
|
1327
|
+
isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
|
|
1328
|
+
activeElement: lastFocusedRef.current
|
|
1329
|
+
}), isTopLayerRef.current = isTopLayer;
|
|
1330
|
+
}, t6 = [isTopLayer, onActivate], $[10] = isTopLayer, $[11] = onActivate, $[12] = t5, $[13] = t6) : (t5 = $[12], t6 = $[13]), react.useEffect(t5, t6);
|
|
1331
|
+
let t7;
|
|
1332
|
+
$[14] !== isTopLayer || $[15] !== onFocus ? (t7 = (event) => {
|
|
1333
|
+
onFocus?.(event);
|
|
1334
|
+
const rootElement = ref.current, target = document.activeElement;
|
|
1335
|
+
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
1336
|
+
}, $[14] = isTopLayer, $[15] = onFocus, $[16] = t7) : t7 = $[16];
|
|
1337
|
+
const handleFocus = t7, t8 = as;
|
|
1338
|
+
let t9;
|
|
1339
|
+
$[17] !== style || $[18] !== zIndex ? (t9 = {
|
|
1340
|
+
...style,
|
|
1341
|
+
zIndex
|
|
1342
|
+
}, $[17] = style, $[18] = zIndex, $[19] = t9) : t9 = $[19];
|
|
1343
|
+
let t10;
|
|
1344
|
+
return $[20] !== children || $[21] !== handleFocus || $[22] !== position || $[23] !== rest || $[24] !== t8 || $[25] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(Card, { "data-ui": "Layer", ...rest, as: t8, onFocus: handleFocus, position, ref, style: t9, children }), $[20] = children, $[21] = handleFocus, $[22] = position, $[23] = rest, $[24] = t8, $[25] = t9, $[26] = t10) : t10 = $[26], t10;
|
|
1345
|
+
}
|
|
1346
|
+
LayerCard.displayName = "LayerCard";
|
|
1347
|
+
function LayerProvider(props) {
|
|
1348
|
+
const $ = reactCompilerRuntime.c(19), {
|
|
1349
|
+
children,
|
|
1307
1350
|
zOffset: t0
|
|
1308
1351
|
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = react.useContext(LayerContext);
|
|
1309
1352
|
let t1;
|
|
@@ -1353,70 +1396,23 @@ function _temp$2(v) {
|
|
|
1353
1396
|
return v + 1;
|
|
1354
1397
|
}
|
|
1355
1398
|
LayerProvider.displayName = "LayerProvider";
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
return $[0] !== value ? (t1 = getLayerContext(value), $[0] = value, $[1] = t1) : t1 = $[1], t1;
|
|
1363
|
-
} catch (t0) {
|
|
1364
|
-
const err = t0;
|
|
1365
|
-
throw err instanceof Error ? new Error(`useLayer(): ${err.message}`) : new Error(`useLayer(): ${err}`);
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
const LayerChildren = react.forwardRef(function(props, forwardedRef) {
|
|
1369
|
-
const $ = reactCompilerRuntime.c(24);
|
|
1370
|
-
let children, onActivate, onFocus, restProps, t0, t1;
|
|
1371
|
-
$[0] !== props ? ({
|
|
1372
|
-
children,
|
|
1373
|
-
onActivate,
|
|
1374
|
-
onFocus,
|
|
1375
|
-
position: t0,
|
|
1376
|
-
style: t1,
|
|
1377
|
-
...restProps
|
|
1378
|
-
} = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0, $[6] = t1) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5], t1 = $[6]);
|
|
1379
|
-
const position = t0 === void 0 ? "relative" : t0, style = t1 === void 0 ? EMPTY_RECORD : t1, {
|
|
1380
|
-
zIndex,
|
|
1381
|
-
isTopLayer
|
|
1382
|
-
} = useLayer(), lastFocusedRef = react.useRef(null), ref = react.useRef(null), isTopLayerRef = react.useRef(isTopLayer);
|
|
1383
|
-
let t2;
|
|
1384
|
-
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[7] = t2) : t2 = $[7], react.useImperativeHandle(forwardedRef, t2);
|
|
1385
|
-
let t3, t4;
|
|
1386
|
-
$[8] !== isTopLayer || $[9] !== onActivate ? (t3 = () => {
|
|
1387
|
-
isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
|
|
1388
|
-
activeElement: lastFocusedRef.current
|
|
1389
|
-
}), isTopLayerRef.current = isTopLayer;
|
|
1390
|
-
}, t4 = [isTopLayer, onActivate], $[8] = isTopLayer, $[9] = onActivate, $[10] = t3, $[11] = t4) : (t3 = $[10], t4 = $[11]), react.useEffect(t3, t4);
|
|
1391
|
-
let t5;
|
|
1392
|
-
$[12] !== isTopLayer || $[13] !== onFocus ? (t5 = (event) => {
|
|
1393
|
-
onFocus?.(event);
|
|
1394
|
-
const rootElement = ref.current, target = document.activeElement;
|
|
1395
|
-
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
1396
|
-
}, $[12] = isTopLayer, $[13] = onFocus, $[14] = t5) : t5 = $[14];
|
|
1397
|
-
const handleFocus = t5;
|
|
1398
|
-
let t6;
|
|
1399
|
-
$[15] !== style || $[16] !== zIndex ? (t6 = {
|
|
1400
|
-
...style,
|
|
1401
|
-
zIndex
|
|
1402
|
-
}, $[15] = style, $[16] = zIndex, $[17] = t6) : t6 = $[17];
|
|
1403
|
-
let t7;
|
|
1404
|
-
return $[18] !== children || $[19] !== handleFocus || $[20] !== position || $[21] !== restProps || $[22] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Layer", ...restProps, onFocus: handleFocus, position, ref, style: t6, children }), $[18] = children, $[19] = handleFocus, $[20] = position, $[21] = restProps, $[22] = t6, $[23] = t7) : t7 = $[23], t7;
|
|
1405
|
-
}), Layer = react.forwardRef(function(props, ref) {
|
|
1406
|
-
const $ = reactCompilerRuntime.c(11);
|
|
1407
|
-
let children, restProps, t0;
|
|
1408
|
-
$[0] !== props ? ({
|
|
1399
|
+
const DEFAULT_LAYER_ELEMENT = "div";
|
|
1400
|
+
function Layer(props) {
|
|
1401
|
+
const $ = reactCompilerRuntime.c(12), t0 = props;
|
|
1402
|
+
let children, rest, t1, t2;
|
|
1403
|
+
$[0] !== t0 ? ({
|
|
1404
|
+
as: t1,
|
|
1409
1405
|
children,
|
|
1410
|
-
zOffset:
|
|
1411
|
-
...
|
|
1412
|
-
} =
|
|
1413
|
-
const zOffset =
|
|
1414
|
-
let
|
|
1415
|
-
$[
|
|
1416
|
-
let
|
|
1417
|
-
return $[
|
|
1418
|
-
}
|
|
1419
|
-
Layer.displayName = "
|
|
1406
|
+
zOffset: t2,
|
|
1407
|
+
...rest
|
|
1408
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = rest, $[3] = t1, $[4] = t2) : (children = $[1], rest = $[2], t1 = $[3], t2 = $[4]);
|
|
1409
|
+
const as = t1 === void 0 ? DEFAULT_LAYER_ELEMENT : t1, zOffset = t2 === void 0 ? 1 : t2;
|
|
1410
|
+
let t3;
|
|
1411
|
+
$[5] !== as || $[6] !== children || $[7] !== rest ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(LayerCard, { ...rest, as, children }), $[5] = as, $[6] = children, $[7] = rest, $[8] = t3) : t3 = $[8];
|
|
1412
|
+
let t4;
|
|
1413
|
+
return $[9] !== t3 || $[10] !== zOffset ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t3 }), $[9] = t3, $[10] = zOffset, $[11] = t4) : t4 = $[11], t4;
|
|
1414
|
+
}
|
|
1415
|
+
Layer.displayName = "Layer";
|
|
1420
1416
|
const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
|
|
1421
1417
|
globalScope[elementKey] = null;
|
|
1422
1418
|
const defaultContextValue = {
|
|
@@ -1489,41 +1485,45 @@ function _isEqual(objA, objB) {
|
|
|
1489
1485
|
const keysA = Object.keys(objA), keysB = Object.keys(objB);
|
|
1490
1486
|
return keysA.length !== keysB.length ? !1 : keysA.every((key2) => objA[key2] === objB[key2]);
|
|
1491
1487
|
}
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1488
|
+
const DEFAULT_SR_ONLY_ELEMENT = "span";
|
|
1489
|
+
function SrOnly(props) {
|
|
1490
|
+
const $ = reactCompilerRuntime.c(12), t0 = props;
|
|
1491
|
+
let children, className, rest, t1;
|
|
1492
|
+
$[0] !== t0 ? ({
|
|
1493
|
+
as: t1,
|
|
1497
1494
|
children,
|
|
1498
1495
|
className,
|
|
1499
1496
|
...rest
|
|
1500
|
-
} =
|
|
1501
|
-
const
|
|
1502
|
-
let t1;
|
|
1503
|
-
$[5] !== className ? (t1 = css.composeClassNames(className, css.srOnly()), $[5] = className, $[6] = t1) : t1 = $[6];
|
|
1497
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1) : (children = $[1], className = $[2], rest = $[3], t1 = $[4]);
|
|
1498
|
+
const Element2 = t1 === void 0 ? DEFAULT_SR_ONLY_ELEMENT : t1;
|
|
1504
1499
|
let t2;
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1500
|
+
$[5] !== className ? (t2 = css.composeClassNames(className, css.srOnly()), $[5] = className, $[6] = t2) : t2 = $[6];
|
|
1501
|
+
let t3;
|
|
1502
|
+
return $[7] !== Element2 || $[8] !== children || $[9] !== rest || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "SrOnly", ...rest, "aria-hidden": !0, className: t2, children }), $[7] = Element2, $[8] = children, $[9] = rest, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
1503
|
+
}
|
|
1504
|
+
SrOnly.displayName = "SrOnly";
|
|
1505
|
+
const DEFAULT_VIRTUAL_LIST_ELEMENT = "div";
|
|
1506
|
+
function VirtualList(props) {
|
|
1507
|
+
const $ = reactCompilerRuntime.c(58), t0 = props;
|
|
1508
|
+
let forwardedRef, getItemKey, onChange, renderItem, rest, t1, t2, t3;
|
|
1509
|
+
$[0] !== t0 ? ({
|
|
1510
|
+
as: t1,
|
|
1511
|
+
gap: t2,
|
|
1513
1512
|
getItemKey,
|
|
1514
|
-
items:
|
|
1513
|
+
items: t3,
|
|
1515
1514
|
onChange,
|
|
1516
1515
|
renderItem,
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1516
|
+
ref: forwardedRef,
|
|
1517
|
+
...rest
|
|
1518
|
+
} = t0, $[0] = t0, $[1] = forwardedRef, $[2] = getItemKey, $[3] = onChange, $[4] = renderItem, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3) : (forwardedRef = $[1], getItemKey = $[2], onChange = $[3], renderItem = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8]);
|
|
1519
|
+
const as = t1 === void 0 ? DEFAULT_VIRTUAL_LIST_ELEMENT : t1, gap = t2 === void 0 ? 0 : t2;
|
|
1520
|
+
let t4;
|
|
1521
|
+
$[9] !== t3 ? (t4 = t3 === void 0 ? [] : t3, $[9] = t3, $[10] = t4) : t4 = $[10];
|
|
1522
|
+
const items = t4, ref = react.useRef(null), wrapperRef = react.useRef(null), [scrollTop, setScrollTop] = react.useState(0), [scrollHeight, setScrollHeight] = react.useState(0), [itemHeight, setItemHeight] = react.useState(-1), [gapValue, setGapValue] = react.useState(0);
|
|
1523
|
+
let t5;
|
|
1524
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[11] = t5) : t5 = $[11], react.useImperativeHandle(forwardedRef, t5);
|
|
1525
|
+
let t6, t7;
|
|
1526
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => {
|
|
1527
1527
|
if (!ref.current)
|
|
1528
1528
|
return;
|
|
1529
1529
|
const scrollEl = findScrollable(ref.current.parentNode);
|
|
@@ -1553,10 +1553,10 @@ const VirtualList = react.forwardRef(function(props, forwardedRef) {
|
|
|
1553
1553
|
}), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
|
|
1554
1554
|
window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
|
|
1555
1555
|
};
|
|
1556
|
-
},
|
|
1556
|
+
}, t7 = [], $[12] = t6, $[13] = t7) : (t6 = $[12], t7 = $[13]), react.useEffect(t6, t7);
|
|
1557
1557
|
const len = items.length, height = itemHeight ? len * (itemHeight + gapValue) - gapValue : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
|
|
1558
|
-
let
|
|
1559
|
-
$[
|
|
1558
|
+
let t8, t9;
|
|
1559
|
+
$[14] !== fromIndex || $[15] !== gapValue || $[16] !== itemHeight || $[17] !== onChange || $[18] !== scrollHeight || $[19] !== scrollTop || $[20] !== toIndex ? (t8 = () => {
|
|
1560
1560
|
onChange?.({
|
|
1561
1561
|
fromIndex,
|
|
1562
1562
|
gap: gapValue,
|
|
@@ -1565,59 +1565,59 @@ const VirtualList = react.forwardRef(function(props, forwardedRef) {
|
|
|
1565
1565
|
scrollTop,
|
|
1566
1566
|
toIndex
|
|
1567
1567
|
});
|
|
1568
|
-
},
|
|
1569
|
-
let
|
|
1568
|
+
}, t9 = [fromIndex, gapValue, itemHeight, onChange, scrollHeight, scrollTop, toIndex], $[14] = fromIndex, $[15] = gapValue, $[16] = itemHeight, $[17] = onChange, $[18] = scrollHeight, $[19] = scrollTop, $[20] = toIndex, $[21] = t8, $[22] = t9) : (t8 = $[21], t9 = $[22]), react.useEffect(t8, t9);
|
|
1569
|
+
let t10;
|
|
1570
1570
|
bb0: {
|
|
1571
1571
|
if (!renderItem || items.length === 0) {
|
|
1572
|
-
|
|
1572
|
+
t10 = null;
|
|
1573
1573
|
break bb0;
|
|
1574
1574
|
}
|
|
1575
1575
|
if (itemHeight === -1) {
|
|
1576
|
-
let
|
|
1577
|
-
$[
|
|
1578
|
-
let t102;
|
|
1579
|
-
$[22] !== items[0] || $[23] !== renderItem ? (t102 = renderItem(items[0]), $[22] = items[0], $[23] = renderItem, $[24] = t102) : t102 = $[24];
|
|
1580
|
-
let t112;
|
|
1581
|
-
$[25] !== t102 ? (t112 = /* @__PURE__ */ jsxRuntime.jsx(Box, { ref: t93, insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: t102 }, 0), $[25] = t102, $[26] = t112) : t112 = $[26];
|
|
1576
|
+
let t113;
|
|
1577
|
+
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t113 = (el) => el ? setItemHeight(el.offsetHeight) : void 0, $[23] = t113) : t113 = $[23];
|
|
1582
1578
|
let t122;
|
|
1583
|
-
$[
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
let
|
|
1590
|
-
$[30] !==
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1579
|
+
$[24] !== items[0] || $[25] !== renderItem ? (t122 = renderItem(items[0]), $[24] = items[0], $[25] = renderItem, $[26] = t122) : t122 = $[26];
|
|
1580
|
+
let t132;
|
|
1581
|
+
$[27] !== t122 ? (t132 = /* @__PURE__ */ jsxRuntime.jsx(Box, { ref: t113, insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: t122 }, 0), $[27] = t122, $[28] = t132) : t132 = $[28];
|
|
1582
|
+
let t142;
|
|
1583
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t142 = (el_0) => el_0 ? setGapValue(el_0.offsetHeight) : void 0, $[29] = t142) : t142 = $[29];
|
|
1584
|
+
const t15 = css.vars.space[gap];
|
|
1585
|
+
let t16;
|
|
1586
|
+
$[30] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: t142, style: {
|
|
1587
|
+
height: t15
|
|
1588
|
+
} }), $[30] = t15, $[31] = t16) : t16 = $[31];
|
|
1589
|
+
let t17;
|
|
1590
|
+
$[32] !== t132 || $[33] !== t16 ? (t17 = [/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1591
|
+
t132,
|
|
1592
|
+
t16
|
|
1593
|
+
] })], $[32] = t132, $[33] = t16, $[34] = t17) : t17 = $[34], t10 = t17;
|
|
1594
1594
|
break bb0;
|
|
1595
1595
|
}
|
|
1596
|
-
let
|
|
1597
|
-
if ($[
|
|
1598
|
-
let
|
|
1599
|
-
$[
|
|
1596
|
+
let t112;
|
|
1597
|
+
if ($[35] !== fromIndex || $[36] !== gapValue || $[37] !== getItemKey || $[38] !== itemHeight || $[39] !== items || $[40] !== renderItem || $[41] !== toIndex) {
|
|
1598
|
+
let t122;
|
|
1599
|
+
$[43] !== fromIndex || $[44] !== gapValue || $[45] !== getItemKey || $[46] !== itemHeight || $[47] !== renderItem ? (t122 = (item, _itemIndex) => {
|
|
1600
1600
|
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
1601
1601
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { insetLeft: 0, insetRight: 0, position: "absolute", style: {
|
|
1602
1602
|
top: itemIndex * (itemHeight + gapValue) - gapValue
|
|
1603
1603
|
}, children: node }, key2);
|
|
1604
|
-
}, $[
|
|
1604
|
+
}, $[43] = fromIndex, $[44] = gapValue, $[45] = getItemKey, $[46] = itemHeight, $[47] = renderItem, $[48] = t122) : t122 = $[48], t112 = items.slice(fromIndex, toIndex).map(t122), $[35] = fromIndex, $[36] = gapValue, $[37] = getItemKey, $[38] = itemHeight, $[39] = items, $[40] = renderItem, $[41] = toIndex, $[42] = t112;
|
|
1605
1605
|
} else
|
|
1606
|
-
|
|
1607
|
-
|
|
1606
|
+
t112 = $[42];
|
|
1607
|
+
t10 = t112;
|
|
1608
1608
|
}
|
|
1609
|
-
const children =
|
|
1610
|
-
let
|
|
1611
|
-
$[
|
|
1609
|
+
const children = t10;
|
|
1610
|
+
let t11, t12;
|
|
1611
|
+
$[49] !== height ? (t12 = {
|
|
1612
1612
|
height
|
|
1613
|
-
}, $[
|
|
1614
|
-
const wrapperStyle =
|
|
1615
|
-
let
|
|
1616
|
-
$[
|
|
1617
|
-
let
|
|
1618
|
-
return $[
|
|
1619
|
-
}
|
|
1620
|
-
VirtualList.displayName = "
|
|
1613
|
+
}, $[49] = height, $[50] = t12) : t12 = $[50], t11 = t12;
|
|
1614
|
+
const wrapperStyle = t11;
|
|
1615
|
+
let t13;
|
|
1616
|
+
$[51] !== children || $[52] !== wrapperStyle ? (t13 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[51] = children, $[52] = wrapperStyle, $[53] = t13) : t13 = $[53];
|
|
1617
|
+
let t14;
|
|
1618
|
+
return $[54] !== as || $[55] !== rest || $[56] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "VirtualList", ...rest, as, position: "relative", ref, children: t13 }), $[54] = as, $[55] = rest, $[56] = t13, $[57] = t14) : t14 = $[57], t14;
|
|
1619
|
+
}
|
|
1620
|
+
VirtualList.displayName = "VirtualList";
|
|
1621
1621
|
function findScrollable(parentNode) {
|
|
1622
1622
|
let _scrollEl = parentNode;
|
|
1623
1623
|
for (; _scrollEl && !_isScrollable(_scrollEl); )
|
|
@@ -1679,16 +1679,18 @@ function size(options) {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
};
|
|
1681
1681
|
}
|
|
1682
|
-
const MotionCard$1 = framerMotion.motion.create(Card)
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1682
|
+
const DEFAULT_POPOVER_CARD_ELEMENT = "div", MotionCard$1 = framerMotion.motion.create(Card);
|
|
1683
|
+
function PopoverCard(props) {
|
|
1684
|
+
const $ = reactCompilerRuntime.c(68), t0 = props;
|
|
1685
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, rest, shadow, strategy, style, t1, t2, xProp, yProp;
|
|
1686
|
+
$[0] !== t0 ? ({
|
|
1686
1687
|
__unstable_margins: marginsProp,
|
|
1687
1688
|
animate,
|
|
1688
1689
|
arrow,
|
|
1689
1690
|
arrowRef,
|
|
1690
1691
|
arrowX,
|
|
1691
1692
|
arrowY,
|
|
1693
|
+
as: t1,
|
|
1692
1694
|
children,
|
|
1693
1695
|
maxWidth,
|
|
1694
1696
|
padding,
|
|
@@ -1701,63 +1703,63 @@ const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(
|
|
|
1701
1703
|
shadow,
|
|
1702
1704
|
strategy,
|
|
1703
1705
|
style,
|
|
1704
|
-
tone:
|
|
1706
|
+
tone: t2,
|
|
1705
1707
|
x: xProp,
|
|
1706
1708
|
y: yProp,
|
|
1707
|
-
...
|
|
1708
|
-
} =
|
|
1709
|
-
const tone =
|
|
1710
|
-
let
|
|
1711
|
-
|
|
1712
|
-
const margins =
|
|
1713
|
-
let
|
|
1714
|
-
const
|
|
1715
|
-
let
|
|
1716
|
-
$[
|
|
1709
|
+
...rest
|
|
1710
|
+
} = t0, $[0] = t0, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = maxWidth, $[9] = originX, $[10] = originY, $[11] = overflow, $[12] = padding, $[13] = placement, $[14] = radius, $[15] = referenceWidth, $[16] = rest, $[17] = shadow, $[18] = strategy, $[19] = style, $[20] = t1, $[21] = t2, $[22] = xProp, $[23] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], maxWidth = $[8], originX = $[9], originY = $[10], overflow = $[11], padding = $[12], placement = $[13], radius = $[14], referenceWidth = $[15], rest = $[16], shadow = $[17], strategy = $[18], style = $[19], t1 = $[20], t2 = $[21], xProp = $[22], yProp = $[23]);
|
|
1711
|
+
const as = t1 === void 0 ? DEFAULT_POPOVER_CARD_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2, layer = useLayer();
|
|
1712
|
+
let t3;
|
|
1713
|
+
t3 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
1714
|
+
const margins = t3, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
1715
|
+
let t4;
|
|
1716
|
+
const t5 = layer.zIndex ?? 100, t6 = animate ? "transform" : void 0;
|
|
1717
|
+
let t7;
|
|
1718
|
+
$[24] !== originX || $[25] !== originY || $[26] !== referenceWidth || $[27] !== strategy || $[28] !== style || $[29] !== t5 || $[30] !== t6 || $[31] !== x || $[32] !== y ? (t7 = {
|
|
1717
1719
|
left: x,
|
|
1718
1720
|
originX,
|
|
1719
1721
|
originY,
|
|
1720
1722
|
position: strategy,
|
|
1721
1723
|
top: y,
|
|
1722
1724
|
width: referenceWidth,
|
|
1723
|
-
zIndex:
|
|
1724
|
-
willChange:
|
|
1725
|
+
zIndex: t5,
|
|
1726
|
+
willChange: t6,
|
|
1725
1727
|
...style
|
|
1726
|
-
}, $[
|
|
1727
|
-
const rootStyle =
|
|
1728
|
-
let
|
|
1729
|
-
const
|
|
1730
|
-
let
|
|
1731
|
-
$[
|
|
1732
|
-
left:
|
|
1733
|
-
top:
|
|
1728
|
+
}, $[24] = originX, $[25] = originY, $[26] = referenceWidth, $[27] = strategy, $[28] = style, $[29] = t5, $[30] = t6, $[31] = x, $[32] = y, $[33] = t7) : t7 = $[33], t4 = t7;
|
|
1729
|
+
const rootStyle = t4;
|
|
1730
|
+
let t8;
|
|
1731
|
+
const t9 = arrowX !== null ? arrowX : void 0, t10 = arrowY !== null ? arrowY : void 0;
|
|
1732
|
+
let t11;
|
|
1733
|
+
$[34] !== t10 || $[35] !== t9 ? (t11 = {
|
|
1734
|
+
left: t9,
|
|
1735
|
+
top: t10,
|
|
1734
1736
|
right: void 0,
|
|
1735
1737
|
bottom: void 0
|
|
1736
|
-
}, $[
|
|
1737
|
-
const arrowStyle =
|
|
1738
|
-
let t10;
|
|
1739
|
-
$[36] === Symbol.for("react.memo_cache_sentinel") ? (t10 = css.popoverCard(), $[36] = t10) : t10 = $[36];
|
|
1740
|
-
const t11 = restProps;
|
|
1738
|
+
}, $[34] = t10, $[35] = t9, $[36] = t11) : t11 = $[36], t8 = t11;
|
|
1739
|
+
const arrowStyle = t8;
|
|
1741
1740
|
let t12;
|
|
1742
|
-
$[37]
|
|
1741
|
+
$[37] === Symbol.for("react.memo_cache_sentinel") ? (t12 = css.popoverCard(), $[37] = t12) : t12 = $[37];
|
|
1743
1742
|
let t13;
|
|
1744
|
-
$[
|
|
1743
|
+
$[38] !== animate ? (t13 = animate ? ["hidden", "initial"] : void 0, $[38] = animate, $[39] = t13) : t13 = $[39];
|
|
1745
1744
|
let t14;
|
|
1746
|
-
$[
|
|
1745
|
+
$[40] !== animate ? (t14 = animate ? ["visible", "scaleIn"] : void 0, $[40] = animate, $[41] = t14) : t14 = $[41];
|
|
1747
1746
|
let t15;
|
|
1748
|
-
$[
|
|
1747
|
+
$[42] !== animate ? (t15 = animate ? ["hidden", "scaleOut"] : void 0, $[42] = animate, $[43] = t15) : t15 = $[43];
|
|
1749
1748
|
let t16;
|
|
1750
|
-
$[
|
|
1749
|
+
$[44] !== children || $[45] !== padding ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[44] = children, $[45] = padding, $[46] = t16) : t16 = $[46];
|
|
1751
1750
|
let t17;
|
|
1752
|
-
$[
|
|
1751
|
+
$[47] !== maxWidth || $[48] !== overflow || $[49] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t16 }), $[47] = maxWidth, $[48] = overflow, $[49] = t16, $[50] = t17) : t17 = $[50];
|
|
1753
1752
|
let t18;
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1753
|
+
$[51] !== arrow || $[52] !== arrowRef || $[53] !== arrowStyle ? (t18 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[51] = arrow, $[52] = arrowRef, $[53] = arrowStyle, $[54] = t18) : t18 = $[54];
|
|
1754
|
+
let t19;
|
|
1755
|
+
return $[55] !== as || $[56] !== placement || $[57] !== radius || $[58] !== rest || $[59] !== rootStyle || $[60] !== shadow || $[61] !== t13 || $[62] !== t14 || $[63] !== t15 || $[64] !== t17 || $[65] !== t18 || $[66] !== tone ? (t19 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { className: t12, "data-ui": "Popover", ...rest, as, "data-context-tone": tone, "data-placement": placement, direction: "column", display: "flex", radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t13, animate: t14, exit: t15, children: [
|
|
1756
|
+
t17,
|
|
1757
|
+
t18
|
|
1758
|
+
] }), $[55] = as, $[56] = placement, $[57] = radius, $[58] = rest, $[59] = rootStyle, $[60] = shadow, $[61] = t13, $[62] = t14, $[63] = t15, $[64] = t17, $[65] = t18, $[66] = tone, $[67] = t19) : t19 = $[67], t19;
|
|
1759
|
+
}
|
|
1760
|
+
PopoverCard.displayName = "PopoverCard";
|
|
1761
|
+
const DEFAULT_POPOVER_ELEMENT = "div";
|
|
1762
|
+
function ViewportOverlay() {
|
|
1761
1763
|
const $ = reactCompilerRuntime.c(2), {
|
|
1762
1764
|
zIndex
|
|
1763
1765
|
} = useLayer();
|
|
@@ -1769,11 +1771,13 @@ const ViewportOverlay = () => {
|
|
|
1769
1771
|
height: "100vh",
|
|
1770
1772
|
zIndex
|
|
1771
1773
|
} }), $[0] = zIndex, $[1] = t0) : t0 = $[1], t0;
|
|
1772
|
-
}
|
|
1774
|
+
}
|
|
1775
|
+
function Popover(props) {
|
|
1773
1776
|
const boundaryElementContext = useBoundaryElement(), {
|
|
1774
1777
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
1775
1778
|
animate: _animate = !1,
|
|
1776
1779
|
arrow: arrowProp = !1,
|
|
1780
|
+
as = DEFAULT_POPOVER_ELEMENT,
|
|
1777
1781
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1778
1782
|
boundaryElement = boundaryElementContext.element,
|
|
1779
1783
|
children: childProp,
|
|
@@ -1793,6 +1797,7 @@ const ViewportOverlay = () => {
|
|
|
1793
1797
|
portal,
|
|
1794
1798
|
preventOverflow = !0,
|
|
1795
1799
|
radius = 3,
|
|
1800
|
+
ref: forwardedRef,
|
|
1796
1801
|
referenceBoundary = props.boundaryElement ?? boundaryElementContext.element,
|
|
1797
1802
|
referenceElement,
|
|
1798
1803
|
scheme,
|
|
@@ -1801,7 +1806,7 @@ const ViewportOverlay = () => {
|
|
|
1801
1806
|
width: widthProp = "auto",
|
|
1802
1807
|
zOffset: zOffsetProp = Z_OFFSETS.popover,
|
|
1803
1808
|
updateRef,
|
|
1804
|
-
...
|
|
1809
|
+
...rest
|
|
1805
1810
|
} = props, card = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate, zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
|
|
1806
1811
|
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
1807
1812
|
const referenceWidthRef = react.useRef(void 0), middleware = react.useMemo(() => {
|
|
@@ -1869,310 +1874,333 @@ const ViewportOverlay = () => {
|
|
|
1869
1874
|
return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1870
1875
|
const popover = /* @__PURE__ */ jsxRuntime.jsxs(LayerProvider, { zOffset, children: [
|
|
1871
1876
|
modal && /* @__PURE__ */ jsxRuntime.jsx(ViewportOverlay, {}),
|
|
1872
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...
|
|
1877
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, x, y, children: content })
|
|
1873
1878
|
] }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: popover }) }) : popover);
|
|
1874
1879
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1875
1880
|
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
1876
1881
|
child
|
|
1877
1882
|
] });
|
|
1878
|
-
}
|
|
1879
|
-
Popover.displayName = "
|
|
1883
|
+
}
|
|
1884
|
+
Popover.displayName = "Popover";
|
|
1880
1885
|
function getElementRef$1(element) {
|
|
1881
1886
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
1882
1887
|
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
1883
1888
|
}
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1889
|
+
const DEFAULT_RADIO_ELEMENT = "input";
|
|
1890
|
+
function Radio(props) {
|
|
1891
|
+
const $ = reactCompilerRuntime.c(24), t0 = props;
|
|
1892
|
+
let className, customValidity, disabled, forwardedRef, readOnly, rest, style, t1;
|
|
1893
|
+
$[0] !== t0 ? ({
|
|
1894
|
+
as: t1,
|
|
1888
1895
|
className,
|
|
1889
1896
|
disabled,
|
|
1890
1897
|
style,
|
|
1891
1898
|
customValidity,
|
|
1892
1899
|
readOnly,
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
$[10] !== readOnly || $[11] !== restProps || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("input", { "data-read-only": t2, "data-error": t3, ...restProps, disabled: t4, readOnly, ref, type: "radio" }), $[10] = readOnly, $[11] = restProps, $[12] = t2, $[13] = t3, $[14] = t4, $[15] = t5) : t5 = $[15];
|
|
1903
|
-
let t6;
|
|
1904
|
-
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t6 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[16] = t6) : t6 = $[16];
|
|
1900
|
+
ref: forwardedRef,
|
|
1901
|
+
...rest
|
|
1902
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = readOnly, $[6] = rest, $[7] = style, $[8] = t1) : (className = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], readOnly = $[5], rest = $[6], style = $[7], t1 = $[8]);
|
|
1903
|
+
const Element2 = t1 === void 0 ? DEFAULT_RADIO_ELEMENT : t1, ref = react.useRef(null);
|
|
1904
|
+
let t2;
|
|
1905
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[9] = t2) : t2 = $[9], react.useImperativeHandle(forwardedRef, t2), useCustomValidity(ref, customValidity);
|
|
1906
|
+
let t3;
|
|
1907
|
+
$[10] !== className ? (t3 = css.composeClassNames(className, css.radio()), $[10] = className, $[11] = t3) : t3 = $[11];
|
|
1908
|
+
const t4 = !disabled && readOnly ? "" : void 0, t5 = customValidity ? "" : void 0, t6 = disabled || readOnly;
|
|
1905
1909
|
let t7;
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1910
|
+
$[12] !== Element2 || $[13] !== readOnly || $[14] !== rest || $[15] !== t4 || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-read-only": t4, "data-error": t5, ...rest, disabled: t6, readOnly, ref, type: "radio" }), $[12] = Element2, $[13] = readOnly, $[14] = rest, $[15] = t4, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18];
|
|
1911
|
+
let t8;
|
|
1912
|
+
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t8 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[19] = t8) : t8 = $[19];
|
|
1913
|
+
let t9;
|
|
1914
|
+
return $[20] !== style || $[21] !== t3 || $[22] !== t7 ? (t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t3, "data-ui": "Radio", style, children: [
|
|
1915
|
+
t7,
|
|
1916
|
+
t8
|
|
1917
|
+
] }), $[20] = style, $[21] = t3, $[22] = t7, $[23] = t9) : t9 = $[23], t9;
|
|
1918
|
+
}
|
|
1919
|
+
Radio.displayName = "Radio";
|
|
1920
|
+
const DEFAULT_SELECT_ELEMENT = "select";
|
|
1921
|
+
function Select(props) {
|
|
1922
|
+
const $ = reactCompilerRuntime.c(39), t0 = props;
|
|
1923
|
+
let children, customValidity, disabled, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6;
|
|
1924
|
+
$[0] !== t0 ? ({
|
|
1925
|
+
as: t1,
|
|
1926
|
+
border: t2,
|
|
1917
1927
|
children,
|
|
1918
1928
|
customValidity,
|
|
1919
1929
|
disabled,
|
|
1920
|
-
fontSize:
|
|
1930
|
+
fontSize: t3,
|
|
1921
1931
|
gap,
|
|
1922
|
-
padding:
|
|
1923
|
-
radius:
|
|
1932
|
+
padding: t4,
|
|
1933
|
+
radius: t5,
|
|
1924
1934
|
readOnly,
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[12] = t5) : t5 = $[12], react.useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
|
|
1931
|
-
const t6 = gap ?? space;
|
|
1935
|
+
ref: forwardedRef,
|
|
1936
|
+
space: t6,
|
|
1937
|
+
...rest
|
|
1938
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = gap, $[6] = readOnly, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6) : (children = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], gap = $[5], readOnly = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13]);
|
|
1939
|
+
const Element2 = t1 === void 0 ? DEFAULT_SELECT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, fontSize = t3 === void 0 ? 2 : t3, padding = t4 === void 0 ? 3 : t4, radius = t5 === void 0 ? 1 : t5, space = t6 === void 0 ? 2 : t6, ref = react.useRef(null);
|
|
1932
1940
|
let t7;
|
|
1933
|
-
$[
|
|
1941
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[14] = t7) : t7 = $[14], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
1942
|
+
const t8 = gap ?? space;
|
|
1943
|
+
let t9;
|
|
1944
|
+
$[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t8 ? (t9 = css.select({
|
|
1934
1945
|
border,
|
|
1935
1946
|
fontSize,
|
|
1936
1947
|
padding,
|
|
1937
1948
|
radius,
|
|
1938
|
-
gap:
|
|
1939
|
-
}), $[
|
|
1940
|
-
const
|
|
1941
|
-
let t9;
|
|
1942
|
-
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._inputElement(), $[19] = t9) : t9 = $[19];
|
|
1943
|
-
const t10 = disabled || readOnly;
|
|
1949
|
+
gap: t8
|
|
1950
|
+
}), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t8, $[20] = t9) : t9 = $[20];
|
|
1951
|
+
const t10 = !disabled && readOnly ? "" : void 0;
|
|
1944
1952
|
let t11;
|
|
1945
|
-
$[
|
|
1946
|
-
|
|
1947
|
-
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t12 = css.selectPresentation(), $[25] = t12) : t12 = $[25];
|
|
1953
|
+
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css._inputElement(), $[21] = t11) : t11 = $[21];
|
|
1954
|
+
const t12 = disabled || readOnly;
|
|
1948
1955
|
let t13;
|
|
1949
|
-
$[26]
|
|
1956
|
+
$[22] !== Element2 || $[23] !== children || $[24] !== rest || $[25] !== t10 || $[26] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-read-only": t10, ...rest, className: t11, disabled: t12, ref, children }), $[22] = Element2, $[23] = children, $[24] = rest, $[25] = t10, $[26] = t12, $[27] = t13) : t13 = $[27];
|
|
1950
1957
|
let t14;
|
|
1951
|
-
$[
|
|
1958
|
+
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t14 = css.selectPresentation(), $[28] = t14) : t14 = $[28];
|
|
1952
1959
|
let t15;
|
|
1953
|
-
$[29]
|
|
1960
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[29] = t15) : t15 = $[29];
|
|
1954
1961
|
let t16;
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1962
|
+
$[30] !== fontSize ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children: t15 }), $[30] = fontSize, $[31] = t16) : t16 = $[31];
|
|
1963
|
+
let t17;
|
|
1964
|
+
$[32] !== padding || $[33] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t14, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", display: "inline-block", padding, children: t16 }) }), $[32] = padding, $[33] = t16, $[34] = t17) : t17 = $[34];
|
|
1965
|
+
let t18;
|
|
1966
|
+
return $[35] !== t13 || $[36] !== t17 || $[37] !== t9 ? (t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-ui": "Select", className: t9, "data-icon-right": "", children: [
|
|
1967
|
+
t13,
|
|
1968
|
+
t17
|
|
1969
|
+
] }), $[35] = t13, $[36] = t17, $[37] = t9, $[38] = t18) : t18 = $[38], t18;
|
|
1970
|
+
}
|
|
1971
|
+
Select.displayName = "Select";
|
|
1972
|
+
const DEFAULT_STACK_ELEMENT = "div";
|
|
1973
|
+
function Stack(props) {
|
|
1974
|
+
const $ = reactCompilerRuntime.c(13), t0 = props;
|
|
1975
|
+
let className, gap, rest, space, t1;
|
|
1976
|
+
$[0] !== t0 ? ({
|
|
1977
|
+
as: t1,
|
|
1966
1978
|
className,
|
|
1967
1979
|
gap,
|
|
1968
1980
|
space,
|
|
1969
|
-
...
|
|
1970
|
-
} =
|
|
1971
|
-
|
|
1972
|
-
$[6] !== className ? (t0 = css.composeClassNames(className, css.stack()), $[6] = className, $[7] = t0) : t0 = $[7];
|
|
1973
|
-
const t1 = gap ?? space;
|
|
1981
|
+
...rest
|
|
1982
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (className = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
|
|
1983
|
+
const as = t1 === void 0 ? DEFAULT_STACK_ELEMENT : t1;
|
|
1974
1984
|
let t2;
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1985
|
+
$[6] !== className ? (t2 = css.composeClassNames(className, css.stack()), $[6] = className, $[7] = t2) : t2 = $[7];
|
|
1986
|
+
const t3 = gap ?? space;
|
|
1987
|
+
let t4;
|
|
1988
|
+
return $[8] !== as || $[9] !== rest || $[10] !== t2 || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Stack", ...rest, as, autoRows: "min", className: t2, display: "grid", gap: t3 }), $[8] = as, $[9] = rest, $[10] = t2, $[11] = t3, $[12] = t4) : t4 = $[12], t4;
|
|
1989
|
+
}
|
|
1990
|
+
Stack.displayName = "Stack";
|
|
1991
|
+
const DEFAULT_SWITCH_ELEMENT = "input";
|
|
1992
|
+
function Switch(props) {
|
|
1993
|
+
const $ = reactCompilerRuntime.c(31), t0 = props;
|
|
1994
|
+
let checked, className, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
|
|
1995
|
+
$[0] !== t0 ? ({
|
|
1996
|
+
as: t1,
|
|
1982
1997
|
checked,
|
|
1983
1998
|
className,
|
|
1984
1999
|
disabled,
|
|
1985
2000
|
indeterminate,
|
|
1986
2001
|
readOnly,
|
|
2002
|
+
ref: forwardedRef,
|
|
1987
2003
|
style,
|
|
1988
|
-
...
|
|
1989
|
-
} =
|
|
1990
|
-
const ref = react.useRef(null);
|
|
1991
|
-
let
|
|
1992
|
-
$[
|
|
1993
|
-
let
|
|
1994
|
-
$[
|
|
2004
|
+
...rest
|
|
2005
|
+
} = t0, $[0] = t0, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = forwardedRef, $[5] = indeterminate, $[6] = readOnly, $[7] = rest, $[8] = style, $[9] = t1) : (checked = $[1], className = $[2], disabled = $[3], forwardedRef = $[4], indeterminate = $[5], readOnly = $[6], rest = $[7], style = $[8], t1 = $[9]);
|
|
2006
|
+
const Element2 = t1 === void 0 ? DEFAULT_SWITCH_ELEMENT : t1, ref = react.useRef(null);
|
|
2007
|
+
let t2;
|
|
2008
|
+
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[10] = t2) : t2 = $[10], react.useImperativeHandle(forwardedRef, t2);
|
|
2009
|
+
let t3, t4;
|
|
2010
|
+
$[11] !== indeterminate ? (t3 = () => {
|
|
1995
2011
|
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
1996
|
-
},
|
|
1997
|
-
let
|
|
1998
|
-
$[
|
|
1999
|
-
const
|
|
2000
|
-
let
|
|
2001
|
-
$[
|
|
2002
|
-
const
|
|
2003
|
-
let
|
|
2004
|
-
$[
|
|
2005
|
-
let
|
|
2006
|
-
$[
|
|
2012
|
+
}, t4 = [indeterminate], $[11] = indeterminate, $[12] = t3, $[13] = t4) : (t3 = $[12], t4 = $[13]), react.useEffect(t3, t4);
|
|
2013
|
+
let t5;
|
|
2014
|
+
$[14] !== className ? (t5 = css.composeClassNames(className, css._switch()), $[14] = className, $[15] = t5) : t5 = $[15];
|
|
2015
|
+
const t6 = checked ? "" : void 0, t7 = indeterminate ? "" : void 0, t8 = indeterminate !== !0 && checked;
|
|
2016
|
+
let t9;
|
|
2017
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._switchElement(), $[16] = t9) : t9 = $[16];
|
|
2018
|
+
const t10 = disabled ? "" : void 0, t11 = !disabled && readOnly ? "" : void 0, t12 = disabled || readOnly;
|
|
2019
|
+
let t13;
|
|
2020
|
+
$[17] !== Element2 || $[18] !== rest || $[19] !== t10 || $[20] !== t11 || $[21] !== t12 || $[22] !== t8 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, checked: t8, className: t9, "data-disabled": t10, "data-read-only": t11, disabled: t12, type: "checkbox", ref }), $[17] = Element2, $[18] = rest, $[19] = t10, $[20] = t11, $[21] = t12, $[22] = t8, $[23] = t13) : t13 = $[23];
|
|
2021
|
+
let t14;
|
|
2022
|
+
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": !0, className: css._switchPresentation(), children: [
|
|
2007
2023
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: css._switchTrack() }),
|
|
2008
2024
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: css._switchThumb() })
|
|
2009
|
-
] }), $[
|
|
2010
|
-
let
|
|
2011
|
-
return $[
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
] }), $[
|
|
2015
|
-
}
|
|
2016
|
-
Switch.displayName = "
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2025
|
+
] }), $[24] = t14) : t14 = $[24];
|
|
2026
|
+
let t15;
|
|
2027
|
+
return $[25] !== style || $[26] !== t13 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: t5, "data-checked": t6, "data-indeterminate": t7, "data-ui": "Switch", display: "inline-block", position: "relative", style, children: [
|
|
2028
|
+
t13,
|
|
2029
|
+
t14
|
|
2030
|
+
] }), $[25] = style, $[26] = t13, $[27] = t5, $[28] = t6, $[29] = t7, $[30] = t15) : t15 = $[30], t15;
|
|
2031
|
+
}
|
|
2032
|
+
Switch.displayName = "Switch";
|
|
2033
|
+
const DEFAULT_TEXT_AREA_ELEMENT = "textarea";
|
|
2034
|
+
function TextArea(props) {
|
|
2035
|
+
const $ = reactCompilerRuntime.c(28), t0 = props;
|
|
2036
|
+
let customValidity, forwardedRef, gap, rest, t1, t2, t3, t4, t5, t6, t7;
|
|
2037
|
+
if ($[0] !== t0) {
|
|
2038
|
+
const {
|
|
2039
|
+
as: t82,
|
|
2040
|
+
border: t92,
|
|
2041
|
+
customValidity: t102,
|
|
2042
|
+
disabled: t112,
|
|
2043
|
+
fontSize: t122,
|
|
2044
|
+
gap: t132,
|
|
2045
|
+
padding: t142,
|
|
2046
|
+
radius: t15,
|
|
2047
|
+
ref: t16,
|
|
2048
|
+
space: t17,
|
|
2049
|
+
weight,
|
|
2050
|
+
__unstable_disableFocusRing,
|
|
2051
|
+
...t18
|
|
2052
|
+
} = t0;
|
|
2053
|
+
t1 = t82, t2 = t92, customValidity = t102, t3 = t112, t4 = t122, gap = t132, t5 = t142, t6 = t15, forwardedRef = t16, t7 = t17, rest = t18, $[0] = t0, $[1] = customValidity, $[2] = forwardedRef, $[3] = gap, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = t5, $[10] = t6, $[11] = t7;
|
|
2054
|
+
} else
|
|
2055
|
+
customValidity = $[1], forwardedRef = $[2], gap = $[3], rest = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], t5 = $[9], t6 = $[10], t7 = $[11];
|
|
2056
|
+
const Element2 = t1 === void 0 ? DEFAULT_TEXT_AREA_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 2 : t6, space = t7 === void 0 ? 3 : t7, ref = react.useRef(null);
|
|
2035
2057
|
let t8;
|
|
2036
|
-
$[
|
|
2058
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[12] = t8) : t8 = $[12], react.useImperativeHandle(forwardedRef, t8), useCustomValidity(ref, customValidity);
|
|
2059
|
+
const t9 = gap ?? space;
|
|
2060
|
+
let t10;
|
|
2061
|
+
$[13] !== border || $[14] !== fontSize || $[15] !== padding || $[16] !== radius || $[17] !== t9 ? (t10 = css.textArea({
|
|
2037
2062
|
border,
|
|
2038
2063
|
fontSize,
|
|
2039
2064
|
padding,
|
|
2040
2065
|
radius,
|
|
2041
|
-
gap:
|
|
2042
|
-
}), $[
|
|
2043
|
-
let t9;
|
|
2044
|
-
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css._inputElement(), $[17] = t9) : t9 = $[17];
|
|
2045
|
-
let t10;
|
|
2046
|
-
$[18] !== disabled || $[19] !== restProps ? (t10 = /* @__PURE__ */ jsxRuntime.jsx("textarea", { ...restProps, className: t9, disabled, ref }), $[18] = disabled, $[19] = restProps, $[20] = t10) : t10 = $[20];
|
|
2066
|
+
gap: t9
|
|
2067
|
+
}), $[13] = border, $[14] = fontSize, $[15] = padding, $[16] = radius, $[17] = t9, $[18] = t10) : t10 = $[18];
|
|
2047
2068
|
let t11;
|
|
2048
|
-
$[
|
|
2069
|
+
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css._inputElement(), $[19] = t11) : t11 = $[19];
|
|
2049
2070
|
let t12;
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2071
|
+
$[20] !== Element2 || $[21] !== disabled || $[22] !== rest ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t11, disabled, ref }), $[20] = Element2, $[21] = disabled, $[22] = rest, $[23] = t12) : t12 = $[23];
|
|
2072
|
+
let t13;
|
|
2073
|
+
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t13 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: css._inputPresentation() }), $[24] = t13) : t13 = $[24];
|
|
2074
|
+
let t14;
|
|
2075
|
+
return $[25] !== t10 || $[26] !== t12 ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: t10, "data-ui": "TextArea", children: [
|
|
2076
|
+
t12,
|
|
2077
|
+
t13
|
|
2078
|
+
] }), $[25] = t10, $[26] = t12, $[27] = t14) : t14 = $[27], t14;
|
|
2079
|
+
}
|
|
2080
|
+
TextArea.displayName = "TextArea";
|
|
2081
|
+
const DEFAULT_TEXT_INPUT_ELEMENT = "input", CLEAR_BUTTON_BOX_STYLE = {
|
|
2057
2082
|
backgroundColor: "transparent",
|
|
2058
2083
|
top: 0,
|
|
2059
2084
|
right: 0,
|
|
2060
2085
|
zIndex: 2
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2086
|
+
};
|
|
2087
|
+
function TextInput(props) {
|
|
2088
|
+
const $ = reactCompilerRuntime.c(86), t0 = props;
|
|
2089
|
+
let IconComponent, IconRightComponent, __unstable_disableFocusRing, className, clearButton, customValidity, forwardedRef, gap, onClear, prefix, readOnly, rest, suffix, t1, t2, t3, t4, t5, t6, t7, t8, width;
|
|
2090
|
+
if ($[0] !== t0) {
|
|
2065
2091
|
const {
|
|
2066
|
-
__unstable_disableFocusRing:
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2092
|
+
__unstable_disableFocusRing: t92,
|
|
2093
|
+
as: t102,
|
|
2094
|
+
border: t112,
|
|
2095
|
+
className: t122,
|
|
2096
|
+
clearButton: t132,
|
|
2097
|
+
disabled: t142,
|
|
2098
|
+
fontSize: t152,
|
|
2099
|
+
gap: t162,
|
|
2100
|
+
icon: t172,
|
|
2101
|
+
iconRight: t182,
|
|
2102
|
+
onClear: t192,
|
|
2103
|
+
padding: t202,
|
|
2104
|
+
prefix: t212,
|
|
2105
|
+
radius: t222,
|
|
2106
|
+
readOnly: t232,
|
|
2107
|
+
ref: t242,
|
|
2108
|
+
space: t252,
|
|
2109
|
+
suffix: t262,
|
|
2110
|
+
customValidity: t272,
|
|
2111
|
+
type: t282,
|
|
2084
2112
|
weight: _width,
|
|
2085
|
-
width:
|
|
2086
|
-
...
|
|
2087
|
-
} =
|
|
2088
|
-
__unstable_disableFocusRing =
|
|
2113
|
+
width: t292,
|
|
2114
|
+
...t302
|
|
2115
|
+
} = t0;
|
|
2116
|
+
__unstable_disableFocusRing = t92, t1 = t102, t2 = t112, className = t122, clearButton = t132, t3 = t142, t4 = t152, gap = t162, IconComponent = t172, IconRightComponent = t182, onClear = t192, t5 = t202, prefix = t212, t6 = t222, readOnly = t232, forwardedRef = t242, t7 = t252, suffix = t262, customValidity = t272, t8 = t282, width = t292, rest = t302, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = forwardedRef, $[8] = gap, $[9] = onClear, $[10] = prefix, $[11] = readOnly, $[12] = rest, $[13] = suffix, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = t7, $[21] = t8, $[22] = width;
|
|
2089
2117
|
} else
|
|
2090
|
-
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6],
|
|
2091
|
-
const border =
|
|
2092
|
-
let
|
|
2093
|
-
$[
|
|
2118
|
+
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], forwardedRef = $[7], gap = $[8], onClear = $[9], prefix = $[10], readOnly = $[11], rest = $[12], suffix = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], t7 = $[20], t8 = $[21], width = $[22];
|
|
2119
|
+
const Element2 = t1 === void 0 ? DEFAULT_TEXT_INPUT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 2 : t6, space = t7 === void 0 ? 3 : t7, type = t8 === void 0 ? "text" : t8, ref = react.useRef(null), paddingArray = useArrayProp(padding), withClearButton = !!clearButton;
|
|
2120
|
+
let t9;
|
|
2121
|
+
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => ref.current, $[23] = t9) : t9 = $[23], react.useImperativeHandle(forwardedRef, t9), useCustomValidity(ref, customValidity);
|
|
2094
2122
|
const handleClearMouseDown = _temp;
|
|
2095
|
-
let
|
|
2096
|
-
$[
|
|
2123
|
+
let t10;
|
|
2124
|
+
$[24] !== onClear ? (t10 = (event_0) => {
|
|
2097
2125
|
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
2098
|
-
}, $[
|
|
2099
|
-
const handleClearClick =
|
|
2100
|
-
let t9, t10;
|
|
2101
|
-
$[24] !== paddingArray ? (t10 = paddingArray.map(_temp2), $[24] = paddingArray, $[25] = t10) : t10 = $[25], t9 = t10;
|
|
2102
|
-
const clearButtonBoxPadding = t9;
|
|
2126
|
+
}, $[24] = onClear, $[25] = t10) : t10 = $[25];
|
|
2127
|
+
const handleClearClick = t10;
|
|
2103
2128
|
let t11, t12;
|
|
2104
|
-
$[26] !== paddingArray ? (t12 = paddingArray.map(
|
|
2105
|
-
const
|
|
2106
|
-
let t13;
|
|
2107
|
-
|
|
2108
|
-
const
|
|
2129
|
+
$[26] !== paddingArray ? (t12 = paddingArray.map(_temp2), $[26] = paddingArray, $[27] = t12) : t12 = $[27], t11 = t12;
|
|
2130
|
+
const clearButtonBoxPadding = t11;
|
|
2131
|
+
let t13, t14;
|
|
2132
|
+
$[28] !== paddingArray ? (t14 = paddingArray.map(_temp3), $[28] = paddingArray, $[29] = t14) : t14 = $[29], t13 = t14;
|
|
2133
|
+
const clearButtonPadding = t13;
|
|
2109
2134
|
let t15;
|
|
2110
|
-
|
|
2135
|
+
t15 = isRecord(clearButton) ? clearButton : EMPTY_RECORD;
|
|
2136
|
+
const clearButtonProps = t15, t16 = gap ?? space;
|
|
2137
|
+
let t17;
|
|
2138
|
+
$[30] !== border || $[31] !== className || $[32] !== fontSize || $[33] !== padding || $[34] !== radius || $[35] !== t16 || $[36] !== width ? (t17 = css.composeClassNames(className, css.textInput({
|
|
2111
2139
|
border,
|
|
2112
2140
|
fontSize,
|
|
2113
2141
|
padding,
|
|
2114
2142
|
radius,
|
|
2115
|
-
gap:
|
|
2143
|
+
gap: t16,
|
|
2116
2144
|
width
|
|
2117
|
-
})), $[
|
|
2118
|
-
const
|
|
2119
|
-
let t20;
|
|
2120
|
-
$[36] !== prefix ? (t20 = prefix && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", className: "text-input-prefix", sizing: "border", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: prefix }) }), $[36] = prefix, $[37] = t20) : t20 = $[37];
|
|
2121
|
-
let t21;
|
|
2122
|
-
$[38] === Symbol.for("react.memo_cache_sentinel") ? (t21 = css._inputElement(), $[38] = t21) : t21 = $[38];
|
|
2145
|
+
})), $[30] = border, $[31] = className, $[32] = fontSize, $[33] = padding, $[34] = radius, $[35] = t16, $[36] = width, $[37] = t17) : t17 = $[37];
|
|
2146
|
+
const t18 = IconComponent ? "" : void 0, t19 = IconRightComponent ? "" : void 0, t20 = prefix ? "" : void 0, t21 = suffix ? "" : void 0;
|
|
2123
2147
|
let t22;
|
|
2124
|
-
$[
|
|
2148
|
+
$[38] !== prefix ? (t22 = prefix && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", className: "text-input-prefix", sizing: "border", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: prefix }) }), $[38] = prefix, $[39] = t22) : t22 = $[39];
|
|
2125
2149
|
let t23;
|
|
2126
|
-
$[
|
|
2127
|
-
|
|
2150
|
+
$[40] === Symbol.for("react.memo_cache_sentinel") ? (t23 = css._inputElement(), $[40] = t23) : t23 = $[40];
|
|
2151
|
+
let t24;
|
|
2152
|
+
$[41] !== Element2 || $[42] !== disabled || $[43] !== readOnly || $[44] !== rest || $[45] !== type ? (t24 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t23, disabled, readOnly, ref, type }), $[41] = Element2, $[42] = disabled, $[43] = readOnly, $[44] = rest, $[45] = type, $[46] = t24) : t24 = $[46];
|
|
2128
2153
|
let t25;
|
|
2129
|
-
$[
|
|
2154
|
+
$[47] === Symbol.for("react.memo_cache_sentinel") ? (t25 = css._inputPresentation(), $[47] = t25) : t25 = $[47];
|
|
2155
|
+
const t26 = __unstable_disableFocusRing ? "" : void 0;
|
|
2156
|
+
let t27;
|
|
2157
|
+
$[48] !== IconComponent || $[49] !== fontSize || $[50] !== padding ? (t27 = IconComponent && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, position: "absolute", style: {
|
|
2130
2158
|
top: 0,
|
|
2131
2159
|
left: 0
|
|
2132
2160
|
}, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
|
|
2133
2161
|
react.isValidElement(IconComponent) && IconComponent,
|
|
2134
|
-
|
|
2135
|
-
] }) }), $[
|
|
2136
|
-
let
|
|
2137
|
-
$[
|
|
2162
|
+
reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
2163
|
+
] }) }), $[48] = IconComponent, $[49] = fontSize, $[50] = padding, $[51] = t27) : t27 = $[51];
|
|
2164
|
+
let t28;
|
|
2165
|
+
$[52] !== IconRightComponent || $[53] !== fontSize || $[54] !== padding || $[55] !== withClearButton ? (t28 = !withClearButton && IconRightComponent && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, position: "absolute", style: {
|
|
2138
2166
|
top: 0,
|
|
2139
2167
|
right: 0
|
|
2140
2168
|
}, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
|
|
2141
2169
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
2142
|
-
|
|
2143
|
-
] }) }), $[
|
|
2144
|
-
let t27;
|
|
2145
|
-
$[54] !== t24 || $[55] !== t25 || $[56] !== t26 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { as: "span", className: t23, "data-disable-focus-ring": t24, position: "absolute", children: [
|
|
2146
|
-
t25,
|
|
2147
|
-
t26
|
|
2148
|
-
] }), $[54] = t24, $[55] = t25, $[56] = t26, $[57] = t27) : t27 = $[57];
|
|
2149
|
-
let t28;
|
|
2150
|
-
$[58] !== clearButton || $[59] !== clearButtonBoxPadding || $[60] !== clearButtonPadding || $[61] !== clearButtonProps || $[62] !== disabled || $[63] !== fontSize || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly ? (t28 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding: clearButtonBoxPadding, position: "absolute", style: CLEAR_BUTTON_BOX_STYLE, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Clear", "data-qa": "clear-button", display: "block", fontSize, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[58] = clearButton, $[59] = clearButtonBoxPadding, $[60] = clearButtonPadding, $[61] = clearButtonProps, $[62] = disabled, $[63] = fontSize, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = t28) : t28 = $[67];
|
|
2170
|
+
reactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
2171
|
+
] }) }), $[52] = IconRightComponent, $[53] = fontSize, $[54] = padding, $[55] = withClearButton, $[56] = t28) : t28 = $[56];
|
|
2151
2172
|
let t29;
|
|
2152
|
-
$[
|
|
2153
|
-
t22,
|
|
2173
|
+
$[57] !== t26 || $[58] !== t27 || $[59] !== t28 ? (t29 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { as: "span", className: t25, "data-disable-focus-ring": t26, position: "absolute", children: [
|
|
2154
2174
|
t27,
|
|
2155
2175
|
t28
|
|
2156
|
-
] }), $[
|
|
2176
|
+
] }), $[57] = t26, $[58] = t27, $[59] = t28, $[60] = t29) : t29 = $[60];
|
|
2157
2177
|
let t30;
|
|
2158
|
-
$[
|
|
2178
|
+
$[61] !== clearButton || $[62] !== clearButtonBoxPadding || $[63] !== clearButtonPadding || $[64] !== clearButtonProps || $[65] !== disabled || $[66] !== fontSize || $[67] !== handleClearClick || $[68] !== radius || $[69] !== readOnly ? (t30 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding: clearButtonBoxPadding, position: "absolute", style: CLEAR_BUTTON_BOX_STYLE, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Clear", "data-qa": "clear-button", display: "block", fontSize, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[61] = clearButton, $[62] = clearButtonBoxPadding, $[63] = clearButtonPadding, $[64] = clearButtonProps, $[65] = disabled, $[66] = fontSize, $[67] = handleClearClick, $[68] = radius, $[69] = readOnly, $[70] = t30) : t30 = $[70];
|
|
2159
2179
|
let t31;
|
|
2160
|
-
|
|
2161
|
-
|
|
2180
|
+
$[71] !== t24 || $[72] !== t29 || $[73] !== t30 ? (t31 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { as: "span", flex: 1, position: "relative", children: [
|
|
2181
|
+
t24,
|
|
2162
2182
|
t29,
|
|
2163
2183
|
t30
|
|
2164
|
-
] }), $[
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2184
|
+
] }), $[71] = t24, $[72] = t29, $[73] = t30, $[74] = t31) : t31 = $[74];
|
|
2185
|
+
let t32;
|
|
2186
|
+
$[75] !== suffix ? (t32 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", className: "text-input-suffix", sizing: "border", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[75] = suffix, $[76] = t32) : t32 = $[76];
|
|
2187
|
+
let t33;
|
|
2188
|
+
return $[77] !== t17 || $[78] !== t18 || $[79] !== t19 || $[80] !== t20 || $[81] !== t21 || $[82] !== t22 || $[83] !== t31 || $[84] !== t32 ? (t33 = /* @__PURE__ */ jsxRuntime.jsxs(Box, { align: "center", as: "span", className: t17, "data-icon-left": t18, "data-icon-right": t19, "data-prefix": t20, "data-suffix": t21, "data-ui": "TextInput", display: "flex", children: [
|
|
2189
|
+
t22,
|
|
2190
|
+
t31,
|
|
2191
|
+
t32
|
|
2192
|
+
] }), $[77] = t17, $[78] = t18, $[79] = t19, $[80] = t20, $[81] = t21, $[82] = t22, $[83] = t31, $[84] = t32, $[85] = t33) : t33 = $[85], t33;
|
|
2193
|
+
}
|
|
2194
|
+
function _temp3(v_0) {
|
|
2195
|
+
return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : typeof v_0 == "number" ? v_0 - 1 : 0;
|
|
2169
2196
|
}
|
|
2170
2197
|
function _temp2(v) {
|
|
2171
2198
|
return v === 0 ? 0 : v === 1 || v === 2 ? 1 : typeof v == "number" ? v - 2 : 0;
|
|
2172
2199
|
}
|
|
2173
|
-
function
|
|
2174
|
-
|
|
2200
|
+
function _temp(event) {
|
|
2201
|
+
event.preventDefault(), event.stopPropagation();
|
|
2175
2202
|
}
|
|
2203
|
+
TextInput.displayName = "TextInput";
|
|
2176
2204
|
function useDelayedState(initialState) {
|
|
2177
2205
|
const $ = reactCompilerRuntime.c(3), [state, setState] = react.useState(initialState), delayedAction = react.useRef(void 0);
|
|
2178
2206
|
let t0;
|
|
@@ -2205,15 +2233,17 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
2205
2233
|
right: ["right-end", "right-start", "left", "top", "bottom"],
|
|
2206
2234
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
2207
2235
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
2208
|
-
}, MotionCard = framerMotion.motion.create(Card)
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2236
|
+
}, DEFAULT_TOOLTIP_CARD_ELEMENT = "div", MotionCard = framerMotion.motion.create(Card);
|
|
2237
|
+
function TooltipCard(props) {
|
|
2238
|
+
const $ = reactCompilerRuntime.c(53), t0 = props;
|
|
2239
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, rest, scheme, shadow, style, t1, t2;
|
|
2240
|
+
$[0] !== t0 ? ({
|
|
2212
2241
|
animate,
|
|
2213
2242
|
arrow,
|
|
2214
2243
|
arrowRef,
|
|
2215
2244
|
arrowX,
|
|
2216
2245
|
arrowY,
|
|
2246
|
+
as: t1,
|
|
2217
2247
|
children,
|
|
2218
2248
|
originX,
|
|
2219
2249
|
originY,
|
|
@@ -2223,47 +2253,48 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
2223
2253
|
scheme,
|
|
2224
2254
|
shadow,
|
|
2225
2255
|
style,
|
|
2226
|
-
tone:
|
|
2227
|
-
...
|
|
2228
|
-
} =
|
|
2229
|
-
const tone =
|
|
2230
|
-
let t1;
|
|
2231
|
-
const t2 = animate ? "transform" : void 0;
|
|
2256
|
+
tone: t2,
|
|
2257
|
+
...rest
|
|
2258
|
+
} = t0, $[0] = t0, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = rest, $[13] = scheme, $[14] = shadow, $[15] = style, $[16] = t1, $[17] = t2) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], rest = $[12], scheme = $[13], shadow = $[14], style = $[15], t1 = $[16], t2 = $[17]);
|
|
2259
|
+
const as = t1 === void 0 ? DEFAULT_TOOLTIP_CARD_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2;
|
|
2232
2260
|
let t3;
|
|
2233
|
-
|
|
2261
|
+
const t4 = animate ? "transform" : void 0;
|
|
2262
|
+
let t5;
|
|
2263
|
+
$[18] !== originX || $[19] !== originY || $[20] !== style || $[21] !== t4 ? (t5 = {
|
|
2234
2264
|
originX,
|
|
2235
2265
|
originY,
|
|
2236
|
-
willChange:
|
|
2266
|
+
willChange: t4,
|
|
2237
2267
|
...style
|
|
2238
|
-
}, $[
|
|
2239
|
-
const rootStyle =
|
|
2240
|
-
let
|
|
2241
|
-
const
|
|
2242
|
-
let
|
|
2243
|
-
$[
|
|
2244
|
-
left:
|
|
2245
|
-
top:
|
|
2268
|
+
}, $[18] = originX, $[19] = originY, $[20] = style, $[21] = t4, $[22] = t5) : t5 = $[22], t3 = t5;
|
|
2269
|
+
const rootStyle = t3;
|
|
2270
|
+
let t6;
|
|
2271
|
+
const t7 = arrowX !== null ? arrowX : void 0, t8 = arrowY !== null ? arrowY : void 0;
|
|
2272
|
+
let t9;
|
|
2273
|
+
$[23] !== t7 || $[24] !== t8 ? (t9 = {
|
|
2274
|
+
left: t7,
|
|
2275
|
+
top: t8,
|
|
2246
2276
|
right: void 0,
|
|
2247
2277
|
bottom: void 0
|
|
2248
|
-
}, $[
|
|
2249
|
-
const arrowStyle =
|
|
2250
|
-
let t9;
|
|
2251
|
-
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css.tooltipCard(), $[25] = t9) : t9 = $[25];
|
|
2278
|
+
}, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t6 = t9;
|
|
2279
|
+
const arrowStyle = t6;
|
|
2252
2280
|
let t10;
|
|
2253
|
-
$[26]
|
|
2254
|
-
|
|
2255
|
-
$[28] !== animate ? (t11 = animate ? ["visible", "scaleIn"] : void 0, $[28] = animate, $[29] = t11) : t11 = $[29];
|
|
2281
|
+
$[26] === Symbol.for("react.memo_cache_sentinel") ? (t10 = css.tooltipCard(), $[26] = t10) : t10 = $[26];
|
|
2282
|
+
const t11 = animate ? "" : void 0;
|
|
2256
2283
|
let t12;
|
|
2257
|
-
$[
|
|
2284
|
+
$[27] !== animate ? (t12 = animate ? ["hidden", "initial"] : void 0, $[27] = animate, $[28] = t12) : t12 = $[28];
|
|
2258
2285
|
let t13;
|
|
2259
|
-
$[
|
|
2286
|
+
$[29] !== animate ? (t13 = animate ? ["visible", "scaleIn"] : void 0, $[29] = animate, $[30] = t13) : t13 = $[30];
|
|
2260
2287
|
let t14;
|
|
2261
|
-
|
|
2288
|
+
$[31] !== animate ? (t14 = animate ? ["hidden", "scaleOut"] : void 0, $[31] = animate, $[32] = t14) : t14 = $[32];
|
|
2289
|
+
let t15;
|
|
2290
|
+
$[33] !== arrow || $[34] !== arrowRef || $[35] !== arrowStyle ? (t15 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[33] = arrow, $[34] = arrowRef, $[35] = arrowStyle, $[36] = t15) : t15 = $[36];
|
|
2291
|
+
let t16;
|
|
2292
|
+
return $[37] !== as || $[38] !== children || $[39] !== padding || $[40] !== placement || $[41] !== radius || $[42] !== rest || $[43] !== rootStyle || $[44] !== scheme || $[45] !== shadow || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t14 || $[50] !== t15 || $[51] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...rest, as, className: t10, "data-animate": t11, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t12, animate: t13, exit: t14, tone, children: [
|
|
2262
2293
|
children,
|
|
2263
|
-
|
|
2264
|
-
] }), $[
|
|
2265
|
-
}
|
|
2266
|
-
TooltipCard.displayName = "
|
|
2294
|
+
t15
|
|
2295
|
+
] }), $[37] = as, $[38] = children, $[39] = padding, $[40] = placement, $[41] = radius, $[42] = rest, $[43] = rootStyle, $[44] = scheme, $[45] = shadow, $[46] = t11, $[47] = t12, $[48] = t13, $[49] = t14, $[50] = t15, $[51] = tone, $[52] = t16) : t16 = $[52], t16;
|
|
2296
|
+
}
|
|
2297
|
+
TooltipCard.displayName = "TooltipCard";
|
|
2267
2298
|
const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
2268
2299
|
function TooltipDelayGroupProvider(props) {
|
|
2269
2300
|
const $ = reactCompilerRuntime.c(9), {
|
|
@@ -2288,10 +2319,12 @@ TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
|
2288
2319
|
function useTooltipDelayGroup() {
|
|
2289
2320
|
return react.useContext(TooltipDelayGroupContext);
|
|
2290
2321
|
}
|
|
2291
|
-
const
|
|
2322
|
+
const DEFAULT_TOOLTIP_ELEMENT = "div";
|
|
2323
|
+
function Tooltip(props) {
|
|
2292
2324
|
const boundaryElementContext = useBoundaryElement(), {
|
|
2293
2325
|
animate: _animate = !1,
|
|
2294
2326
|
arrow: arrowProp = !1,
|
|
2327
|
+
as = DEFAULT_TOOLTIP_ELEMENT,
|
|
2295
2328
|
boundaryElement = boundaryElementContext?.element,
|
|
2296
2329
|
children: childProp,
|
|
2297
2330
|
className,
|
|
@@ -2303,11 +2336,12 @@ const Tooltip = react.forwardRef(function(props, forwardedRef) {
|
|
|
2303
2336
|
placement: placementProp = "bottom",
|
|
2304
2337
|
portal: portalProp,
|
|
2305
2338
|
radius = 3,
|
|
2339
|
+
ref: forwardedRef,
|
|
2306
2340
|
scheme,
|
|
2307
2341
|
shadow = 2,
|
|
2308
2342
|
zOffset = Z_OFFSETS.tooltip,
|
|
2309
2343
|
tone = "inherit",
|
|
2310
|
-
...
|
|
2344
|
+
...rest
|
|
2311
2345
|
} = props, card = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
|
|
2312
2346
|
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
2313
2347
|
const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = react.useMemo(() => {
|
|
@@ -2403,26 +2437,15 @@ const Tooltip = react.forwardRef(function(props, forwardedRef) {
|
|
|
2403
2437
|
}) : null, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave]);
|
|
2404
2438
|
if (react.useImperativeHandle(childProp ? getElementRef(childProp) : null, () => referenceElement, [referenceElement]), !child) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
2405
2439
|
if (disabled) return child;
|
|
2406
|
-
const node_0 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2407
|
-
|
|
2408
|
-
{
|
|
2409
|
-
|
|
2410
|
-
className: css.composeClassNames(className, css.tooltip()),
|
|
2411
|
-
ref: setFloating,
|
|
2412
|
-
style: {
|
|
2413
|
-
...floatingStyles,
|
|
2414
|
-
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
2415
|
-
},
|
|
2416
|
-
zOffset,
|
|
2417
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, tone, children: content })
|
|
2418
|
-
}
|
|
2419
|
-
), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0);
|
|
2440
|
+
const node_0 = /* @__PURE__ */ jsxRuntime.jsx(Layer, { "data-ui": "Tooltip", className: css.composeClassNames(className, css.tooltip()), ref: setFloating, style: {
|
|
2441
|
+
...floatingStyles,
|
|
2442
|
+
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
2443
|
+
}, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...rest, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, tone, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0);
|
|
2420
2444
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2421
2445
|
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
2422
2446
|
child
|
|
2423
2447
|
] });
|
|
2424
|
-
}
|
|
2425
|
-
Tooltip.displayName = "ForwardRef(Tooltip)";
|
|
2448
|
+
}
|
|
2426
2449
|
function useCloseOnMouseLeave(t0) {
|
|
2427
2450
|
const $ = reactCompilerRuntime.c(10), {
|
|
2428
2451
|
handleIsOpenChange,
|
|
@@ -2447,10 +2470,13 @@ function useCloseOnMouseLeave(t0) {
|
|
|
2447
2470
|
let t3;
|
|
2448
2471
|
$[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], react.useEffect(t2, t3);
|
|
2449
2472
|
}
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
$
|
|
2473
|
+
Tooltip.displayName = "Tooltip";
|
|
2474
|
+
const DEFAULT_HOTKEYS_ELEMENT = "kbd";
|
|
2475
|
+
function Hotkeys(props) {
|
|
2476
|
+
const $ = reactCompilerRuntime.c(27), t0 = props;
|
|
2477
|
+
let fontSize, gap, gapX, gapY, keys, padding, radius, rest, t1, t2;
|
|
2478
|
+
$[0] !== t0 ? ({
|
|
2479
|
+
as: t1,
|
|
2454
2480
|
fontSize,
|
|
2455
2481
|
gap,
|
|
2456
2482
|
gapX,
|
|
@@ -2458,23 +2484,23 @@ const Hotkeys = react.forwardRef(function(props, ref) {
|
|
|
2458
2484
|
keys,
|
|
2459
2485
|
padding,
|
|
2460
2486
|
radius,
|
|
2461
|
-
space:
|
|
2462
|
-
...
|
|
2463
|
-
} =
|
|
2464
|
-
const space =
|
|
2487
|
+
space: t2,
|
|
2488
|
+
...rest
|
|
2489
|
+
} = t0, $[0] = t0, $[1] = fontSize, $[2] = gap, $[3] = gapX, $[4] = gapY, $[5] = keys, $[6] = padding, $[7] = radius, $[8] = rest, $[9] = t1, $[10] = t2) : (fontSize = $[1], gap = $[2], gapX = $[3], gapY = $[4], keys = $[5], padding = $[6], radius = $[7], rest = $[8], t1 = $[9], t2 = $[10]);
|
|
2490
|
+
const as = t1 === void 0 ? DEFAULT_HOTKEYS_ELEMENT : t1, space = t2 === void 0 ? 0.5 : t2;
|
|
2465
2491
|
if (!keys || keys.length === 0)
|
|
2466
2492
|
return;
|
|
2467
|
-
const
|
|
2468
|
-
let
|
|
2469
|
-
if ($[
|
|
2470
|
-
let
|
|
2471
|
-
$[
|
|
2493
|
+
const t3 = gap ?? space;
|
|
2494
|
+
let t4;
|
|
2495
|
+
if ($[11] !== fontSize || $[12] !== keys || $[13] !== padding || $[14] !== radius) {
|
|
2496
|
+
let t52;
|
|
2497
|
+
$[16] !== fontSize || $[17] !== padding || $[18] !== radius ? (t52 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(KBD, { fontSize, padding, radius, children: key2 }, i), $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t52) : t52 = $[19], t4 = keys.map(t52), $[11] = fontSize, $[12] = keys, $[13] = padding, $[14] = radius, $[15] = t4;
|
|
2472
2498
|
} else
|
|
2473
|
-
|
|
2474
|
-
let
|
|
2475
|
-
return $[
|
|
2476
|
-
}
|
|
2477
|
-
Hotkeys.displayName = "
|
|
2499
|
+
t4 = $[15];
|
|
2500
|
+
let t5;
|
|
2501
|
+
return $[20] !== as || $[21] !== gapX || $[22] !== gapY || $[23] !== rest || $[24] !== t3 || $[25] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as, "data-ui": "Hotkeys", ...rest, display: "flex", gap: t3, gapX, gapY, children: t4 }), $[20] = as, $[21] = gapX, $[22] = gapY, $[23] = rest, $[24] = t3, $[25] = t4, $[26] = t5) : t5 = $[26], t5;
|
|
2502
|
+
}
|
|
2503
|
+
Hotkeys.displayName = "Hotkeys";
|
|
2478
2504
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
2479
2505
|
function _isFocusable(element) {
|
|
2480
2506
|
return isHTMLAnchorElement(element) && element.getAttribute("data-disabled") !== "true" || isHTMLButtonElement(element) && !element.disabled;
|
|
@@ -2613,44 +2639,47 @@ function useMenuController(props) {
|
|
|
2613
2639
|
mount
|
|
2614
2640
|
};
|
|
2615
2641
|
}
|
|
2616
|
-
const
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2642
|
+
const DEFAULT_MENU_ELEMENT = "div";
|
|
2643
|
+
function Menu(props) {
|
|
2644
|
+
const $ = reactCompilerRuntime.c(58), t0 = props;
|
|
2645
|
+
let _shouldFocus, children, className, forwardedRef, gap, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, rest, t1, t2, t3;
|
|
2646
|
+
if ($[0] !== t0) {
|
|
2620
2647
|
const {
|
|
2621
|
-
|
|
2622
|
-
|
|
2648
|
+
as: t42,
|
|
2649
|
+
children: t52,
|
|
2650
|
+
className: t62,
|
|
2623
2651
|
focusFirst,
|
|
2624
2652
|
focusLast,
|
|
2625
|
-
gap:
|
|
2626
|
-
onClickOutside:
|
|
2627
|
-
onEscape:
|
|
2628
|
-
onItemClick:
|
|
2629
|
-
onItemSelect:
|
|
2630
|
-
onKeyDown:
|
|
2631
|
-
originElement:
|
|
2632
|
-
padding:
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2653
|
+
gap: t72,
|
|
2654
|
+
onClickOutside: t82,
|
|
2655
|
+
onEscape: t92,
|
|
2656
|
+
onItemClick: t102,
|
|
2657
|
+
onItemSelect: t112,
|
|
2658
|
+
onKeyDown: t122,
|
|
2659
|
+
originElement: t132,
|
|
2660
|
+
padding: t142,
|
|
2661
|
+
ref: t152,
|
|
2662
|
+
registerElement: t162,
|
|
2663
|
+
shouldFocus: t172,
|
|
2664
|
+
space: t18,
|
|
2665
|
+
...t19
|
|
2666
|
+
} = t0;
|
|
2667
|
+
t1 = t42, children = t52, className = t62, gap = t72, onClickOutside = t82, onEscape = t92, onItemClick = t102, onItemSelect = t112, onKeyDown = t122, originElement = t132, t2 = t142, forwardedRef = t152, registerElement = t162, _shouldFocus = t172, t3 = t18, rest = t19, $[0] = t0, $[1] = _shouldFocus, $[2] = children, $[3] = className, $[4] = forwardedRef, $[5] = gap, $[6] = onClickOutside, $[7] = onEscape, $[8] = onItemClick, $[9] = onItemSelect, $[10] = onKeyDown, $[11] = originElement, $[12] = registerElement, $[13] = rest, $[14] = t1, $[15] = t2, $[16] = t3;
|
|
2639
2668
|
} else
|
|
2640
|
-
_shouldFocus = $[1], children = $[2], className = $[3],
|
|
2641
|
-
const padding =
|
|
2642
|
-
let
|
|
2643
|
-
$[
|
|
2669
|
+
_shouldFocus = $[1], children = $[2], className = $[3], forwardedRef = $[4], gap = $[5], onClickOutside = $[6], onEscape = $[7], onItemClick = $[8], onItemSelect = $[9], onKeyDown = $[10], originElement = $[11], registerElement = $[12], rest = $[13], t1 = $[14], t2 = $[15], t3 = $[16];
|
|
2670
|
+
const as = t1 === void 0 ? DEFAULT_MENU_ELEMENT : t1, padding = t2 === void 0 ? 1 : t2, space = t3 === void 0 ? 1 : t3, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
|
|
2671
|
+
let t4;
|
|
2672
|
+
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[17] = t4) : t4 = $[17], react.useImperativeHandle(forwardedRef, t4);
|
|
2644
2673
|
const {
|
|
2645
2674
|
isTopLayer
|
|
2646
2675
|
} = useLayer();
|
|
2647
|
-
let
|
|
2648
|
-
$[
|
|
2676
|
+
let t5;
|
|
2677
|
+
$[18] !== onKeyDown || $[19] !== originElement || $[20] !== shouldFocus ? (t5 = {
|
|
2649
2678
|
onKeyDown,
|
|
2650
2679
|
originElement,
|
|
2651
2680
|
shouldFocus,
|
|
2652
2681
|
rootElementRef: ref
|
|
2653
|
-
}, $[
|
|
2682
|
+
}, $[18] = onKeyDown, $[19] = originElement, $[20] = shouldFocus, $[21] = t5) : t5 = $[21];
|
|
2654
2683
|
const {
|
|
2655
2684
|
activeElement,
|
|
2656
2685
|
activeIndex,
|
|
@@ -2658,24 +2687,24 @@ const Menu = react.forwardRef(function(props, forwardedRef) {
|
|
|
2658
2687
|
handleItemMouseLeave,
|
|
2659
2688
|
handleKeyDown,
|
|
2660
2689
|
mount
|
|
2661
|
-
} = useMenuController(
|
|
2662
|
-
let
|
|
2663
|
-
$[
|
|
2690
|
+
} = useMenuController(t5), unregisterElementRef = react.useRef(null);
|
|
2691
|
+
let t6;
|
|
2692
|
+
$[22] !== registerElement ? (t6 = (el) => {
|
|
2664
2693
|
unregisterElementRef.current && (unregisterElementRef.current(), unregisterElementRef.current = null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));
|
|
2665
|
-
}, $[
|
|
2666
|
-
const handleRefChange =
|
|
2667
|
-
let
|
|
2668
|
-
$[
|
|
2694
|
+
}, $[22] = registerElement, $[23] = t6) : t6 = $[23];
|
|
2695
|
+
const handleRefChange = t6;
|
|
2696
|
+
let t7, t8;
|
|
2697
|
+
$[24] !== activeIndex || $[25] !== onItemSelect ? (t7 = () => {
|
|
2669
2698
|
onItemSelect && onItemSelect(activeIndex);
|
|
2670
|
-
},
|
|
2671
|
-
let
|
|
2672
|
-
$[
|
|
2673
|
-
let
|
|
2674
|
-
$[
|
|
2699
|
+
}, t8 = [activeIndex, onItemSelect], $[24] = activeIndex, $[25] = onItemSelect, $[26] = t7, $[27] = t8) : (t7 = $[26], t8 = $[27]), react.useEffect(t7, t8);
|
|
2700
|
+
let t9;
|
|
2701
|
+
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => [ref.current], $[28] = t9) : t9 = $[28], useClickOutsideEvent(isTopLayer && onClickOutside, t9);
|
|
2702
|
+
let t10;
|
|
2703
|
+
$[29] !== isTopLayer || $[30] !== onEscape ? (t10 = (event) => {
|
|
2675
2704
|
isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
|
|
2676
|
-
}, $[
|
|
2677
|
-
let
|
|
2678
|
-
$[
|
|
2705
|
+
}, $[29] = isTopLayer, $[30] = onEscape, $[31] = t10) : t10 = $[31], useGlobalKeyDown(t10);
|
|
2706
|
+
let t11, t12;
|
|
2707
|
+
$[32] !== activeElement || $[33] !== activeIndex || $[34] !== handleItemMouseEnter || $[35] !== handleItemMouseLeave || $[36] !== mount || $[37] !== onClickOutside || $[38] !== onEscape || $[39] !== onItemClick || $[40] !== registerElement ? (t12 = {
|
|
2679
2708
|
version: 0,
|
|
2680
2709
|
activeElement,
|
|
2681
2710
|
activeIndex,
|
|
@@ -2688,50 +2717,56 @@ const Menu = react.forwardRef(function(props, forwardedRef) {
|
|
|
2688
2717
|
registerElement,
|
|
2689
2718
|
onMouseEnter: handleItemMouseEnter,
|
|
2690
2719
|
onMouseLeave: handleItemMouseLeave
|
|
2691
|
-
}, $[
|
|
2692
|
-
const value =
|
|
2693
|
-
let t11;
|
|
2694
|
-
$[40] !== className ? (t11 = css.composeClassNames(className, css.menu()), $[40] = className, $[41] = t11) : t11 = $[41];
|
|
2695
|
-
const t12 = gap ?? space;
|
|
2720
|
+
}, $[32] = activeElement, $[33] = activeIndex, $[34] = handleItemMouseEnter, $[35] = handleItemMouseLeave, $[36] = mount, $[37] = onClickOutside, $[38] = onEscape, $[39] = onItemClick, $[40] = registerElement, $[41] = t12) : t12 = $[41], t11 = t12;
|
|
2721
|
+
const value = t11;
|
|
2696
2722
|
let t13;
|
|
2697
|
-
$[42] !==
|
|
2698
|
-
|
|
2699
|
-
$[45] !== handleKeyDown || $[46] !== handleRefChange || $[47] !== padding || $[48] !== restProps || $[49] !== t11 || $[50] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Menu", ...restProps, className: t11, onKeyDown: handleKeyDown, overflow: "auto", outline: "none", padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t13 }), $[45] = handleKeyDown, $[46] = handleRefChange, $[47] = padding, $[48] = restProps, $[49] = t11, $[50] = t13, $[51] = t14) : t14 = $[51];
|
|
2723
|
+
$[42] !== className ? (t13 = css.composeClassNames(className, css.menu()), $[42] = className, $[43] = t13) : t13 = $[43];
|
|
2724
|
+
const t14 = gap ?? space;
|
|
2700
2725
|
let t15;
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2726
|
+
$[44] !== children || $[45] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: t14, children }), $[44] = children, $[45] = t14, $[46] = t15) : t15 = $[46];
|
|
2727
|
+
let t16;
|
|
2728
|
+
$[47] !== as || $[48] !== handleKeyDown || $[49] !== handleRefChange || $[50] !== padding || $[51] !== rest || $[52] !== t13 || $[53] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Menu", ...rest, as, className: t13, onKeyDown: handleKeyDown, overflow: "auto", outline: "none", padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t15 }), $[47] = as, $[48] = handleKeyDown, $[49] = handleRefChange, $[50] = padding, $[51] = rest, $[52] = t13, $[53] = t15, $[54] = t16) : t16 = $[54];
|
|
2729
|
+
let t17;
|
|
2730
|
+
return $[55] !== t16 || $[56] !== value ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t16 }), $[55] = t16, $[56] = value, $[57] = t17) : t17 = $[57], t17;
|
|
2731
|
+
}
|
|
2732
|
+
Menu.displayName = "Menu";
|
|
2733
|
+
const DEFAULT_MENU_DIVIDER_ELEMENT = "hr";
|
|
2734
|
+
function MenuDivider(props) {
|
|
2735
|
+
const $ = reactCompilerRuntime.c(10), t0 = props;
|
|
2736
|
+
let className, rest, t1;
|
|
2737
|
+
$[0] !== t0 ? ({
|
|
2738
|
+
as: t1,
|
|
2708
2739
|
className,
|
|
2709
|
-
...
|
|
2710
|
-
} =
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
});
|
|
2740
|
+
...rest
|
|
2741
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
2742
|
+
const Element2 = t1 === void 0 ? DEFAULT_MENU_DIVIDER_ELEMENT : t1;
|
|
2743
|
+
let t2;
|
|
2744
|
+
$[4] !== className ? (t2 = css.composeClassNames(className, css.menuDivider()), $[4] = className, $[5] = t2) : t2 = $[5];
|
|
2745
|
+
let t3;
|
|
2746
|
+
return $[6] !== Element2 || $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { ...rest, className: t2 }), $[6] = Element2, $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
2747
|
+
}
|
|
2716
2748
|
MenuDivider.displayName = "MenuDivider";
|
|
2717
|
-
const
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2749
|
+
const DEFAULT_SELECTABLE_ELEMENT = "button";
|
|
2750
|
+
function Selectable(props) {
|
|
2751
|
+
const $ = reactCompilerRuntime.c(14), t0 = props;
|
|
2752
|
+
let className, radius, rest, t1, tone;
|
|
2753
|
+
$[0] !== t0 ? ({
|
|
2754
|
+
as: t1,
|
|
2721
2755
|
className,
|
|
2722
2756
|
radius,
|
|
2723
2757
|
tone,
|
|
2724
|
-
...
|
|
2725
|
-
} =
|
|
2726
|
-
|
|
2727
|
-
|
|
2758
|
+
...rest
|
|
2759
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = radius, $[3] = rest, $[4] = t1, $[5] = tone) : (className = $[1], radius = $[2], rest = $[3], t1 = $[4], tone = $[5]);
|
|
2760
|
+
const as = t1 === void 0 ? DEFAULT_SELECTABLE_ELEMENT : t1;
|
|
2761
|
+
let t2;
|
|
2762
|
+
$[6] !== className || $[7] !== radius || $[8] !== tone ? (t2 = css.composeClassNames(className, css._selectable({
|
|
2728
2763
|
radius,
|
|
2729
2764
|
tone
|
|
2730
|
-
})), $[
|
|
2731
|
-
let
|
|
2732
|
-
return $[
|
|
2733
|
-
}
|
|
2734
|
-
Selectable.displayName = "
|
|
2765
|
+
})), $[6] = className, $[7] = radius, $[8] = tone, $[9] = t2) : t2 = $[9];
|
|
2766
|
+
let t3;
|
|
2767
|
+
return $[10] !== as || $[11] !== rest || $[12] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Box, { ...rest, as, className: t2 }), $[10] = as, $[11] = rest, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
|
|
2768
|
+
}
|
|
2769
|
+
Selectable.displayName = "Selectable";
|
|
2735
2770
|
function useMenu() {
|
|
2736
2771
|
const value = react.useContext(MenuContext);
|
|
2737
2772
|
if (!value)
|
|
@@ -2740,28 +2775,27 @@ function useMenu() {
|
|
|
2740
2775
|
throw new Error("useMenu(): the context value is not compatible");
|
|
2741
2776
|
return value;
|
|
2742
2777
|
}
|
|
2778
|
+
const DEFAULT_MENU_GROUP_ELEMENT = "button";
|
|
2743
2779
|
function MenuGroup(props) {
|
|
2744
|
-
const $ = reactCompilerRuntime.c(
|
|
2745
|
-
let IconComponent, children, gap,
|
|
2746
|
-
$[0] !==
|
|
2747
|
-
as:
|
|
2780
|
+
const $ = reactCompilerRuntime.c(79), t0 = props;
|
|
2781
|
+
let IconComponent, children, gap, menuProps, onClick, popover, rest, t1, t2, t3, t4, t5, t6, text;
|
|
2782
|
+
$[0] !== t0 ? ({
|
|
2783
|
+
as: t1,
|
|
2748
2784
|
children,
|
|
2749
|
-
fontSize:
|
|
2785
|
+
fontSize: t2,
|
|
2750
2786
|
gap,
|
|
2751
|
-
gapX,
|
|
2752
|
-
gapY,
|
|
2753
2787
|
icon: IconComponent,
|
|
2754
2788
|
menu: menuProps,
|
|
2755
2789
|
onClick,
|
|
2756
|
-
padding:
|
|
2790
|
+
padding: t3,
|
|
2757
2791
|
popover,
|
|
2758
|
-
radius:
|
|
2759
|
-
space:
|
|
2792
|
+
radius: t4,
|
|
2793
|
+
space: t5,
|
|
2760
2794
|
text,
|
|
2761
|
-
tone:
|
|
2762
|
-
...
|
|
2763
|
-
} =
|
|
2764
|
-
const as =
|
|
2795
|
+
tone: t6,
|
|
2796
|
+
...rest
|
|
2797
|
+
} = t0, $[0] = t0, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = menuProps, $[5] = onClick, $[6] = popover, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6, $[14] = text) : (IconComponent = $[1], children = $[2], gap = $[3], menuProps = $[4], onClick = $[5], popover = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13], text = $[14]);
|
|
2798
|
+
const as = t1 === void 0 ? DEFAULT_MENU_GROUP_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, menu = useMenu(), {
|
|
2765
2799
|
activeElement,
|
|
2766
2800
|
mount,
|
|
2767
2801
|
onClickOutside,
|
|
@@ -2770,91 +2804,92 @@ function MenuGroup(props) {
|
|
|
2770
2804
|
onItemMouseEnter: _onItemMouseEnter,
|
|
2771
2805
|
registerElement
|
|
2772
2806
|
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, [rootElement, setRootElement] = react.useState(null), [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = react.useState(!1);
|
|
2773
|
-
let t6;
|
|
2774
|
-
$[17] !== onItemMouseEnter ? (t6 = (event) => {
|
|
2775
|
-
setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
|
|
2776
|
-
}, $[17] = onItemMouseEnter, $[18] = t6) : t6 = $[18];
|
|
2777
|
-
const handleMouseEnter = t6;
|
|
2778
2807
|
let t7;
|
|
2779
|
-
$[
|
|
2808
|
+
$[15] !== onItemMouseEnter ? (t7 = (event) => {
|
|
2809
|
+
setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
|
|
2810
|
+
}, $[15] = onItemMouseEnter, $[16] = t7) : t7 = $[16];
|
|
2811
|
+
const handleMouseEnter = t7;
|
|
2812
|
+
let t8;
|
|
2813
|
+
$[17] !== rootElement ? (t8 = (event_0) => {
|
|
2780
2814
|
event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
|
|
2781
2815
|
rootElement?.focus();
|
|
2782
2816
|
}));
|
|
2783
|
-
}, $[
|
|
2784
|
-
const handleMenuKeyDown =
|
|
2785
|
-
let t8;
|
|
2786
|
-
$[21] !== onClick ? (t8 = (event_1) => {
|
|
2787
|
-
onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
|
|
2788
|
-
}, $[21] = onClick, $[22] = t8) : t8 = $[22];
|
|
2789
|
-
const handleClick = t8;
|
|
2817
|
+
}, $[17] = rootElement, $[18] = t8) : t8 = $[18];
|
|
2818
|
+
const handleMenuKeyDown = t8;
|
|
2790
2819
|
let t9;
|
|
2791
|
-
$[
|
|
2792
|
-
|
|
2793
|
-
}, $[
|
|
2794
|
-
const
|
|
2820
|
+
$[19] !== onClick ? (t9 = (event_1) => {
|
|
2821
|
+
onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
|
|
2822
|
+
}, $[19] = onClick, $[20] = t9) : t9 = $[20];
|
|
2823
|
+
const handleClick = t9;
|
|
2795
2824
|
let t10;
|
|
2796
|
-
$[
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
let
|
|
2801
|
-
$[
|
|
2825
|
+
$[21] !== onItemClick ? (t10 = () => {
|
|
2826
|
+
setOpen(!1), onItemClick?.();
|
|
2827
|
+
}, $[21] = onItemClick, $[22] = t10) : t10 = $[22];
|
|
2828
|
+
const handleChildItemClick = t10;
|
|
2829
|
+
let t11;
|
|
2830
|
+
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t11 = () => setWithinMenu(!0), $[23] = t11) : t11 = $[23];
|
|
2831
|
+
const handleMenuMouseEnter = t11;
|
|
2832
|
+
let t12, t13;
|
|
2833
|
+
$[24] !== mount || $[25] !== rootElement ? (t12 = () => mount(rootElement), t13 = [mount, rootElement], $[24] = mount, $[25] = rootElement, $[26] = t12, $[27] = t13) : (t12 = $[26], t13 = $[27]), react.useEffect(t12, t13);
|
|
2834
|
+
let t14, t15;
|
|
2835
|
+
$[28] !== active ? (t14 = () => {
|
|
2802
2836
|
active || setOpen(!1);
|
|
2803
|
-
},
|
|
2804
|
-
let
|
|
2805
|
-
$[
|
|
2837
|
+
}, t15 = [active], $[28] = active, $[29] = t14, $[30] = t15) : (t14 = $[29], t15 = $[30]), react.useEffect(t14, t15);
|
|
2838
|
+
let t16, t17;
|
|
2839
|
+
$[31] !== open ? (t16 = () => {
|
|
2806
2840
|
open || setWithinMenu(!1);
|
|
2807
|
-
},
|
|
2808
|
-
let
|
|
2809
|
-
$[
|
|
2841
|
+
}, t17 = [open], $[31] = open, $[32] = t16, $[33] = t17) : (t16 = $[32], t17 = $[33]), react.useEffect(t16, t17);
|
|
2842
|
+
let t18, t19;
|
|
2843
|
+
$[34] !== shouldFocus ? (t18 = () => {
|
|
2810
2844
|
if (!shouldFocus)
|
|
2811
2845
|
return;
|
|
2812
2846
|
const rafId = requestAnimationFrame(() => setShouldFocus(null));
|
|
2813
2847
|
return () => cancelAnimationFrame(rafId);
|
|
2814
|
-
},
|
|
2815
|
-
let t19;
|
|
2816
|
-
$[39] !== children || $[40] !== handleChildItemClick || $[41] !== handleMenuKeyDown || $[42] !== menuProps || $[43] !== onClickOutside || $[44] !== onEscape || $[45] !== registerElement || $[46] !== shouldFocus ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[39] = children, $[40] = handleChildItemClick, $[41] = handleMenuKeyDown, $[42] = menuProps, $[43] = onClickOutside, $[44] = onEscape, $[45] = registerElement, $[46] = shouldFocus, $[47] = t19) : t19 = $[47];
|
|
2817
|
-
const childMenu = t19;
|
|
2848
|
+
}, t19 = [shouldFocus], $[34] = shouldFocus, $[35] = t18, $[36] = t19) : (t18 = $[35], t19 = $[36]), react.useEffect(t18, t19);
|
|
2818
2849
|
let t20;
|
|
2819
|
-
$[
|
|
2850
|
+
$[37] !== children || $[38] !== handleChildItemClick || $[39] !== handleMenuKeyDown || $[40] !== menuProps || $[41] !== onClickOutside || $[42] !== onEscape || $[43] !== registerElement || $[44] !== shouldFocus ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[37] = children, $[38] = handleChildItemClick, $[39] = handleMenuKeyDown, $[40] = menuProps, $[41] = onClickOutside, $[42] = onEscape, $[43] = registerElement, $[44] = shouldFocus, $[45] = t20) : t20 = $[45];
|
|
2851
|
+
const childMenu = t20;
|
|
2852
|
+
let t21;
|
|
2853
|
+
$[46] === Symbol.for("react.memo_cache_sentinel") ? (t21 = (event_2) => {
|
|
2820
2854
|
const target = event_2.currentTarget;
|
|
2821
2855
|
if (document.activeElement === target && event_2.key === "ArrowRight") {
|
|
2822
2856
|
setShouldFocus("first"), setOpen(!0), setWithinMenu(!0);
|
|
2823
2857
|
return;
|
|
2824
2858
|
}
|
|
2825
|
-
}, $[
|
|
2826
|
-
const handleKeyDown =
|
|
2827
|
-
let t26;
|
|
2828
|
-
$[49] !== IconComponent || $[50] !== fontSize ? (t26 = IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
|
|
2829
|
-
react.isValidElement(IconComponent) && IconComponent,
|
|
2830
|
-
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
2831
|
-
] }), $[49] = IconComponent, $[50] = fontSize, $[51] = t26) : t26 = $[51];
|
|
2859
|
+
}, $[46] = t21) : t21 = $[46];
|
|
2860
|
+
const handleKeyDown = t21, t22 = as === "button" ? withinMenu : void 0, t23 = as !== "button" ? withinMenu : void 0, t24 = !withinMenu && active ? "" : void 0, t25 = as === "button" ? "button" : void 0, t26 = gap ?? space;
|
|
2832
2861
|
let t27;
|
|
2833
|
-
$[
|
|
2862
|
+
$[47] !== IconComponent || $[48] !== fontSize ? (t27 = IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize, children: [
|
|
2863
|
+
react.isValidElement(IconComponent) && IconComponent,
|
|
2864
|
+
reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
2865
|
+
] }), $[47] = IconComponent, $[48] = fontSize, $[49] = t27) : t27 = $[49];
|
|
2834
2866
|
let t28;
|
|
2835
|
-
$[
|
|
2867
|
+
$[50] !== fontSize || $[51] !== text ? (t28 = /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, textOverflow: "ellipsis", weight: "medium", children: text }) }), $[50] = fontSize, $[51] = text, $[52] = t28) : t28 = $[52];
|
|
2836
2868
|
let t29;
|
|
2837
|
-
$[
|
|
2869
|
+
$[53] === Symbol.for("react.memo_cache_sentinel") ? (t29 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {}), $[53] = t29) : t29 = $[53];
|
|
2838
2870
|
let t30;
|
|
2839
|
-
$[
|
|
2840
|
-
t26,
|
|
2841
|
-
t27,
|
|
2842
|
-
t29
|
|
2843
|
-
] }), $[58] = gapX, $[59] = gapY, $[60] = padding, $[61] = t25, $[62] = t26, $[63] = t27, $[64] = t29, $[65] = t30) : t30 = $[65];
|
|
2871
|
+
$[54] !== fontSize ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, children: t29 }), $[54] = fontSize, $[55] = t30) : t30 = $[55];
|
|
2844
2872
|
let t31;
|
|
2845
|
-
$[
|
|
2873
|
+
$[56] !== padding || $[57] !== t26 || $[58] !== t27 || $[59] !== t28 || $[60] !== t30 ? (t31 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: t26, padding, children: [
|
|
2874
|
+
t27,
|
|
2875
|
+
t28,
|
|
2876
|
+
t30
|
|
2877
|
+
] }), $[56] = padding, $[57] = t26, $[58] = t27, $[59] = t28, $[60] = t30, $[61] = t31) : t31 = $[61];
|
|
2846
2878
|
let t32;
|
|
2847
|
-
|
|
2879
|
+
$[62] !== as || $[63] !== handleClick || $[64] !== handleMouseEnter || $[65] !== radius || $[66] !== rest || $[67] !== t22 || $[68] !== t23 || $[69] !== t24 || $[70] !== t25 || $[71] !== t31 || $[72] !== tone ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-ui": "MenuGroup", ...rest, "aria-pressed": t22, as, "data-pressed": t23, "data-selected": t24, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, radius, ref: setRootElement, tabIndex: -1, tone, type: t25, children: t31 }), $[62] = as, $[63] = handleClick, $[64] = handleMouseEnter, $[65] = radius, $[66] = rest, $[67] = t22, $[68] = t23, $[69] = t24, $[70] = t25, $[71] = t31, $[72] = tone, $[73] = t32) : t32 = $[73];
|
|
2880
|
+
let t33;
|
|
2881
|
+
return $[74] !== childMenu || $[75] !== open || $[76] !== popover || $[77] !== t32 ? (t33 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t32 }), $[74] = childMenu, $[75] = open, $[76] = popover, $[77] = t32, $[78] = t33) : t33 = $[78], t33;
|
|
2848
2882
|
}
|
|
2849
2883
|
MenuGroup.displayName = "MenuGroup";
|
|
2850
|
-
const
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2884
|
+
const DEFAULT_MENU_ITEM_ELEMENT = "button";
|
|
2885
|
+
function MenuItem(props) {
|
|
2886
|
+
const $ = reactCompilerRuntime.c(75), t0 = props;
|
|
2887
|
+
let IconComponent, IconRightComponent, children, disabled, forwardedRef, gap, gapX, gapY, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, rest, selectedProp, t1, t2, t3, t4, t5, t6, text;
|
|
2888
|
+
$[0] !== t0 ? ({
|
|
2889
|
+
as: t1,
|
|
2855
2890
|
children,
|
|
2856
2891
|
disabled,
|
|
2857
|
-
fontSize:
|
|
2892
|
+
fontSize: t2,
|
|
2858
2893
|
gap,
|
|
2859
2894
|
gapX,
|
|
2860
2895
|
gapY,
|
|
@@ -2862,7 +2897,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
2862
2897
|
icon: IconComponent,
|
|
2863
2898
|
iconRight: IconRightComponent,
|
|
2864
2899
|
onClick,
|
|
2865
|
-
padding:
|
|
2900
|
+
padding: t3,
|
|
2866
2901
|
paddingX,
|
|
2867
2902
|
paddingY,
|
|
2868
2903
|
paddingTop,
|
|
@@ -2870,31 +2905,32 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
2870
2905
|
paddingBottom,
|
|
2871
2906
|
paddingLeft,
|
|
2872
2907
|
pressed,
|
|
2873
|
-
radius:
|
|
2908
|
+
radius: t4,
|
|
2909
|
+
ref: forwardedRef,
|
|
2874
2910
|
selected: selectedProp,
|
|
2875
|
-
space:
|
|
2911
|
+
space: t5,
|
|
2876
2912
|
text,
|
|
2877
|
-
tone:
|
|
2878
|
-
...
|
|
2879
|
-
} =
|
|
2880
|
-
const as =
|
|
2913
|
+
tone: t6,
|
|
2914
|
+
...rest
|
|
2915
|
+
} = t0, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = forwardedRef, $[6] = gap, $[7] = gapX, $[8] = gapY, $[9] = hotkeys, $[10] = onClick, $[11] = paddingBottom, $[12] = paddingLeft, $[13] = paddingRight, $[14] = paddingTop, $[15] = paddingX, $[16] = paddingY, $[17] = pressed, $[18] = rest, $[19] = selectedProp, $[20] = t1, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], forwardedRef = $[5], gap = $[6], gapX = $[7], gapY = $[8], hotkeys = $[9], onClick = $[10], paddingBottom = $[11], paddingLeft = $[12], paddingRight = $[13], paddingTop = $[14], paddingX = $[15], paddingY = $[16], pressed = $[17], rest = $[18], selectedProp = $[19], t1 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], text = $[26]);
|
|
2916
|
+
const as = t1 === void 0 ? DEFAULT_MENU_ITEM_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, menu = useMenu(), {
|
|
2881
2917
|
activeElement,
|
|
2882
2918
|
mount,
|
|
2883
2919
|
onItemClick,
|
|
2884
2920
|
onItemMouseEnter: _onItemMouseEnter,
|
|
2885
2921
|
onItemMouseLeave: _onItemMouseLeave
|
|
2886
2922
|
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onMouseLeave, [rootElement, setRootElement] = react.useState(null), active = !!activeElement && activeElement === rootElement, ref = react.useRef(null);
|
|
2887
|
-
let
|
|
2888
|
-
$[
|
|
2889
|
-
let
|
|
2890
|
-
$[
|
|
2891
|
-
let
|
|
2892
|
-
$[
|
|
2923
|
+
let t7;
|
|
2924
|
+
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[27] = t7) : t7 = $[27], react.useImperativeHandle(forwardedRef, t7);
|
|
2925
|
+
let t8, t9;
|
|
2926
|
+
$[28] !== mount || $[29] !== rootElement || $[30] !== selectedProp ? (t8 = () => mount(rootElement, selectedProp), t9 = [mount, rootElement, selectedProp], $[28] = mount, $[29] = rootElement, $[30] = selectedProp, $[31] = t8, $[32] = t9) : (t8 = $[31], t9 = $[32]), react.useEffect(t8, t9);
|
|
2927
|
+
let t10;
|
|
2928
|
+
$[33] !== disabled || $[34] !== onClick || $[35] !== onItemClick ? (t10 = (event) => {
|
|
2893
2929
|
disabled || (onClick && onClick(event), onItemClick && onItemClick());
|
|
2894
|
-
}, $[
|
|
2895
|
-
const handleClick =
|
|
2896
|
-
let
|
|
2897
|
-
$[
|
|
2930
|
+
}, $[33] = disabled, $[34] = onClick, $[35] = onItemClick, $[36] = t10) : t10 = $[36];
|
|
2931
|
+
const handleClick = t10;
|
|
2932
|
+
let t11, t12;
|
|
2933
|
+
$[37] !== padding || $[38] !== paddingBottom || $[39] !== paddingLeft || $[40] !== paddingRight || $[41] !== paddingTop || $[42] !== paddingX || $[43] !== paddingY ? (t12 = {
|
|
2898
2934
|
padding,
|
|
2899
2935
|
paddingX,
|
|
2900
2936
|
paddingY,
|
|
@@ -2902,18 +2938,18 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
2902
2938
|
paddingRight,
|
|
2903
2939
|
paddingBottom,
|
|
2904
2940
|
paddingLeft
|
|
2905
|
-
}, $[
|
|
2906
|
-
const paddingProps =
|
|
2907
|
-
let
|
|
2908
|
-
$[
|
|
2941
|
+
}, $[37] = padding, $[38] = paddingBottom, $[39] = paddingLeft, $[40] = paddingRight, $[41] = paddingTop, $[42] = paddingX, $[43] = paddingY, $[44] = t12) : t12 = $[44], t11 = t12;
|
|
2942
|
+
const paddingProps = t11;
|
|
2943
|
+
let t13;
|
|
2944
|
+
$[45] === Symbol.for("react.memo_cache_sentinel") ? (t13 = (el) => {
|
|
2909
2945
|
ref.current = el, setRootElement(el);
|
|
2910
|
-
}, $[
|
|
2911
|
-
const setRef =
|
|
2912
|
-
let
|
|
2913
|
-
$[
|
|
2946
|
+
}, $[45] = t13) : t13 = $[45];
|
|
2947
|
+
const setRef = t13, t14 = pressed ? "" : void 0, t15 = active ? "" : void 0, t16 = disabled ? "" : void 0, t17 = as === "button" ? "button" : void 0;
|
|
2948
|
+
let t18;
|
|
2949
|
+
$[46] !== IconComponent || $[47] !== IconRightComponent || $[48] !== fontSize || $[49] !== gap || $[50] !== gapX || $[51] !== gapY || $[52] !== hotkeys || $[53] !== paddingProps || $[54] !== space || $[55] !== text ? (t18 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: gap ?? space, gapX, gapY, align: "center", ...paddingProps, children: [
|
|
2914
2950
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { muted: !0, size: fontSize, children: [
|
|
2915
2951
|
react.isValidElement(IconComponent) && IconComponent,
|
|
2916
|
-
|
|
2952
|
+
reactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
2917
2953
|
] }),
|
|
2918
2954
|
text && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize, textOverflow: "ellipsis", weight: "medium", children: text }) }),
|
|
2919
2955
|
hotkeys && /* @__PURE__ */ jsxRuntime.jsx(Hotkeys, { gap: 0.5, keys: hotkeys, style: {
|
|
@@ -2922,87 +2958,92 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
2922
2958
|
} }),
|
|
2923
2959
|
IconRightComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { muted: !0, size: fontSize, children: [
|
|
2924
2960
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
2925
|
-
|
|
2961
|
+
reactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
2926
2962
|
] })
|
|
2927
|
-
] }), $[
|
|
2928
|
-
let t18;
|
|
2929
|
-
$[56] !== children || $[57] !== paddingProps ? (t18 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[56] = children, $[57] = paddingProps, $[58] = t18) : t18 = $[58];
|
|
2963
|
+
] }), $[46] = IconComponent, $[47] = IconRightComponent, $[48] = fontSize, $[49] = gap, $[50] = gapX, $[51] = gapY, $[52] = hotkeys, $[53] = paddingProps, $[54] = space, $[55] = text, $[56] = t18) : t18 = $[56];
|
|
2930
2964
|
let t19;
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2965
|
+
$[57] !== children || $[58] !== paddingProps ? (t19 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[57] = children, $[58] = paddingProps, $[59] = t19) : t19 = $[59];
|
|
2966
|
+
let t20;
|
|
2967
|
+
return $[60] !== as || $[61] !== disabled || $[62] !== handleClick || $[63] !== onItemMouseEnter || $[64] !== onItemMouseLeave || $[65] !== radius || $[66] !== rest || $[67] !== t14 || $[68] !== t15 || $[69] !== t16 || $[70] !== t17 || $[71] !== t18 || $[72] !== t19 || $[73] !== tone ? (t20 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", ...rest, as, "data-pressed": t14, "data-selected": t15, "data-disabled": t16, radius, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role: "menuitem", tabIndex: -1, tone, type: t17, children: [
|
|
2968
|
+
t18,
|
|
2969
|
+
t19
|
|
2970
|
+
] }), $[60] = as, $[61] = disabled, $[62] = handleClick, $[63] = onItemMouseEnter, $[64] = onItemMouseLeave, $[65] = radius, $[66] = rest, $[67] = t14, $[68] = t15, $[69] = t16, $[70] = t17, $[71] = t18, $[72] = t19, $[73] = tone, $[74] = t20) : t20 = $[74], t20;
|
|
2971
|
+
}
|
|
2972
|
+
MenuItem.displayName = "MenuItem";
|
|
2973
|
+
const DEFAULT_TAB_ELEMENT = "button";
|
|
2974
|
+
function Tab(props) {
|
|
2975
|
+
const $ = reactCompilerRuntime.c(33), t0 = props;
|
|
2976
|
+
let focused, forwardedRef, icon, id, label, onClick, onFocus, rest, selected, t1, t2, t3;
|
|
2977
|
+
$[0] !== t0 ? ({
|
|
2978
|
+
as: t1,
|
|
2941
2979
|
icon,
|
|
2942
2980
|
id,
|
|
2943
2981
|
focused,
|
|
2944
|
-
fontSize:
|
|
2982
|
+
fontSize: t2,
|
|
2945
2983
|
label,
|
|
2946
2984
|
onClick,
|
|
2947
2985
|
onFocus,
|
|
2948
|
-
padding:
|
|
2986
|
+
padding: t3,
|
|
2987
|
+
ref: forwardedRef,
|
|
2949
2988
|
selected,
|
|
2950
|
-
...
|
|
2951
|
-
} =
|
|
2952
|
-
const fontSize =
|
|
2953
|
-
let t2;
|
|
2954
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
|
|
2955
|
-
let t3;
|
|
2956
|
-
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
2957
|
-
focusedRef.current = !1;
|
|
2958
|
-
}, $[12] = t3) : t3 = $[12];
|
|
2959
|
-
const handleBlur = t3;
|
|
2989
|
+
...rest
|
|
2990
|
+
} = t0, $[0] = t0, $[1] = focused, $[2] = forwardedRef, $[3] = icon, $[4] = id, $[5] = label, $[6] = onClick, $[7] = onFocus, $[8] = rest, $[9] = selected, $[10] = t1, $[11] = t2, $[12] = t3) : (focused = $[1], forwardedRef = $[2], icon = $[3], id = $[4], label = $[5], onClick = $[6], onFocus = $[7], rest = $[8], selected = $[9], t1 = $[10], t2 = $[11], t3 = $[12]);
|
|
2991
|
+
const as = t1 === void 0 ? DEFAULT_TAB_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 2 : t3, ref = react.useRef(null), focusedRef = react.useRef(!1);
|
|
2960
2992
|
let t4;
|
|
2961
|
-
$[13]
|
|
2993
|
+
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[13] = t4) : t4 = $[13], react.useImperativeHandle(forwardedRef, t4);
|
|
2994
|
+
let t5;
|
|
2995
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
|
|
2996
|
+
focusedRef.current = !1;
|
|
2997
|
+
}, $[14] = t5) : t5 = $[14];
|
|
2998
|
+
const handleBlur = t5;
|
|
2999
|
+
let t6;
|
|
3000
|
+
$[15] !== onFocus ? (t6 = (event) => {
|
|
2962
3001
|
focusedRef.current = !0, onFocus && onFocus(event);
|
|
2963
|
-
}, $[
|
|
2964
|
-
const handleFocus =
|
|
2965
|
-
let
|
|
2966
|
-
$[
|
|
3002
|
+
}, $[15] = onFocus, $[16] = t6) : t6 = $[16];
|
|
3003
|
+
const handleFocus = t6;
|
|
3004
|
+
let t7, t8;
|
|
3005
|
+
$[17] !== focused ? (t7 = () => {
|
|
2967
3006
|
focused && !focusedRef.current && (ref.current && ref.current.focus(), focusedRef.current = !0);
|
|
2968
|
-
},
|
|
2969
|
-
const
|
|
2970
|
-
let
|
|
2971
|
-
return $[
|
|
2972
|
-
}
|
|
2973
|
-
Tab.displayName = "
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
$[0] !== props ? ({
|
|
3007
|
+
}, t8 = [focused], $[17] = focused, $[18] = t7, $[19] = t8) : (t7 = $[18], t8 = $[19]), react.useEffect(t7, t8);
|
|
3008
|
+
const t9 = selected ? "true" : "false", t10 = selected ? 0 : -1;
|
|
3009
|
+
let t11;
|
|
3010
|
+
return $[20] !== as || $[21] !== fontSize || $[22] !== handleFocus || $[23] !== icon || $[24] !== id || $[25] !== label || $[26] !== onClick || $[27] !== padding || $[28] !== rest || $[29] !== selected || $[30] !== t10 || $[31] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Button, { "data-ui": "Tab", ...rest, "aria-selected": t9, as, fontSize, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t10, text: label, type: "button" }), $[20] = as, $[21] = fontSize, $[22] = handleFocus, $[23] = icon, $[24] = id, $[25] = label, $[26] = onClick, $[27] = padding, $[28] = rest, $[29] = selected, $[30] = t10, $[31] = t9, $[32] = t11) : t11 = $[32], t11;
|
|
3011
|
+
}
|
|
3012
|
+
Tab.displayName = "Tab";
|
|
3013
|
+
const DEFAULT_TAB_LIST_ELEMENT = "div";
|
|
3014
|
+
function TabList(props) {
|
|
3015
|
+
const $ = reactCompilerRuntime.c(16), t0 = props;
|
|
3016
|
+
let childrenProp, rest, t1;
|
|
3017
|
+
$[0] !== t0 ? ({
|
|
3018
|
+
as: t1,
|
|
2981
3019
|
children: childrenProp,
|
|
2982
|
-
...
|
|
2983
|
-
} =
|
|
2984
|
-
const [focusedIndex, setFocusedIndex] = react.useState(-1);
|
|
2985
|
-
let
|
|
2986
|
-
if ($[
|
|
3020
|
+
...rest
|
|
3021
|
+
} = t0, $[0] = t0, $[1] = childrenProp, $[2] = rest, $[3] = t1) : (childrenProp = $[1], rest = $[2], t1 = $[3]);
|
|
3022
|
+
const as = t1 === void 0 ? DEFAULT_TAB_LIST_ELEMENT : t1, [focusedIndex, setFocusedIndex] = react.useState(-1);
|
|
3023
|
+
let t2;
|
|
3024
|
+
if ($[4] !== childrenProp || $[5] !== focusedIndex) {
|
|
2987
3025
|
const children = react.Children.toArray(childrenProp).filter(_isReactElement);
|
|
2988
|
-
let
|
|
2989
|
-
$[
|
|
3026
|
+
let t32;
|
|
3027
|
+
$[7] !== focusedIndex ? (t32 = (child, childIndex) => react.cloneElement(child, {
|
|
2990
3028
|
focused: focusedIndex === childIndex,
|
|
2991
3029
|
key: childIndex,
|
|
2992
3030
|
onFocus: () => setFocusedIndex(childIndex)
|
|
2993
|
-
}), $[
|
|
3031
|
+
}), $[7] = focusedIndex, $[8] = t32) : t32 = $[8], t2 = children.map(t32), $[4] = childrenProp, $[5] = focusedIndex, $[6] = t2;
|
|
2994
3032
|
} else
|
|
2995
|
-
|
|
2996
|
-
const tabs =
|
|
2997
|
-
let
|
|
2998
|
-
$[
|
|
3033
|
+
t2 = $[6];
|
|
3034
|
+
const tabs = t2, numTabs = tabs.length;
|
|
3035
|
+
let t3;
|
|
3036
|
+
$[9] !== numTabs ? (t3 = (event) => {
|
|
2999
3037
|
event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);
|
|
3000
|
-
}, $[
|
|
3001
|
-
const handleKeyDown =
|
|
3002
|
-
let
|
|
3003
|
-
return $[
|
|
3004
|
-
}
|
|
3005
|
-
TabList.displayName = "
|
|
3038
|
+
}, $[9] = numTabs, $[10] = t3) : t3 = $[10];
|
|
3039
|
+
const handleKeyDown = t3;
|
|
3040
|
+
let t4;
|
|
3041
|
+
return $[11] !== as || $[12] !== handleKeyDown || $[13] !== rest || $[14] !== tabs ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { "data-ui": "TabList", ...rest, as, onKeyDown: handleKeyDown, role: "tablist", children: tabs }), $[11] = as, $[12] = handleKeyDown, $[13] = rest, $[14] = tabs, $[15] = t4) : t4 = $[15], t4;
|
|
3042
|
+
}
|
|
3043
|
+
TabList.displayName = "TabList";
|
|
3044
|
+
function _isReactElement(node) {
|
|
3045
|
+
return !!node;
|
|
3046
|
+
}
|
|
3006
3047
|
exports.AnimatedSpinnerIcon = AnimatedSpinnerIcon;
|
|
3007
3048
|
exports.Arrow = Arrow;
|
|
3008
3049
|
exports.Avatar = Avatar;
|
|
@@ -3016,8 +3057,45 @@ exports.Card = Card;
|
|
|
3016
3057
|
exports.CardProvider = CardProvider;
|
|
3017
3058
|
exports.Checkbox = Checkbox;
|
|
3018
3059
|
exports.Code = Code;
|
|
3019
|
-
exports.ConditionalWrapper = ConditionalWrapper;
|
|
3020
3060
|
exports.Container = Container;
|
|
3061
|
+
exports.DEFAULT_ARROW_ELEMENT = DEFAULT_ARROW_ELEMENT;
|
|
3062
|
+
exports.DEFAULT_AVATAR_COUNTER_ELEMENT = DEFAULT_AVATAR_COUNTER_ELEMENT;
|
|
3063
|
+
exports.DEFAULT_AVATAR_ELEMENT = DEFAULT_AVATAR_ELEMENT;
|
|
3064
|
+
exports.DEFAULT_AVATAR_STACK_ELEMENT = DEFAULT_AVATAR_STACK_ELEMENT;
|
|
3065
|
+
exports.DEFAULT_BADGE_ELEMENT = DEFAULT_BADGE_ELEMENT;
|
|
3066
|
+
exports.DEFAULT_BOX_ELEMENT = DEFAULT_BOX_ELEMENT;
|
|
3067
|
+
exports.DEFAULT_BUTTON_ELEMENT = DEFAULT_BUTTON_ELEMENT;
|
|
3068
|
+
exports.DEFAULT_CARD_ELEMENT = DEFAULT_CARD_ELEMENT;
|
|
3069
|
+
exports.DEFAULT_CHECKBOX_ELEMENT = DEFAULT_CHECKBOX_ELEMENT;
|
|
3070
|
+
exports.DEFAULT_CODE_ELEMENT = DEFAULT_CODE_ELEMENT;
|
|
3071
|
+
exports.DEFAULT_CONTAINER_ELEMENT = DEFAULT_CONTAINER_ELEMENT;
|
|
3072
|
+
exports.DEFAULT_ELEMENT_QUERY_ELEMENT = DEFAULT_ELEMENT_QUERY_ELEMENT;
|
|
3073
|
+
exports.DEFAULT_FLEX_ELEMENT = DEFAULT_FLEX_ELEMENT;
|
|
3074
|
+
exports.DEFAULT_GRID_ELEMENT = DEFAULT_GRID_ELEMENT;
|
|
3075
|
+
exports.DEFAULT_HEADING_ELEMENT = DEFAULT_HEADING_ELEMENT;
|
|
3076
|
+
exports.DEFAULT_HOTKEYS_ELEMENT = DEFAULT_HOTKEYS_ELEMENT;
|
|
3077
|
+
exports.DEFAULT_INLINE_ELEMENT = DEFAULT_INLINE_ELEMENT;
|
|
3078
|
+
exports.DEFAULT_KBD_ELEMENT = DEFAULT_KBD_ELEMENT;
|
|
3079
|
+
exports.DEFAULT_LABEL_ELEMENT = DEFAULT_LABEL_ELEMENT;
|
|
3080
|
+
exports.DEFAULT_LAYER_ELEMENT = DEFAULT_LAYER_ELEMENT;
|
|
3081
|
+
exports.DEFAULT_MENU_DIVIDER_ELEMENT = DEFAULT_MENU_DIVIDER_ELEMENT;
|
|
3082
|
+
exports.DEFAULT_MENU_ELEMENT = DEFAULT_MENU_ELEMENT;
|
|
3083
|
+
exports.DEFAULT_MENU_GROUP_ELEMENT = DEFAULT_MENU_GROUP_ELEMENT;
|
|
3084
|
+
exports.DEFAULT_MENU_ITEM_ELEMENT = DEFAULT_MENU_ITEM_ELEMENT;
|
|
3085
|
+
exports.DEFAULT_POPOVER_ELEMENT = DEFAULT_POPOVER_ELEMENT;
|
|
3086
|
+
exports.DEFAULT_RADIO_ELEMENT = DEFAULT_RADIO_ELEMENT;
|
|
3087
|
+
exports.DEFAULT_SELECT_ELEMENT = DEFAULT_SELECT_ELEMENT;
|
|
3088
|
+
exports.DEFAULT_SPINNER_ELEMENT = DEFAULT_SPINNER_ELEMENT;
|
|
3089
|
+
exports.DEFAULT_SR_ONLY_ELEMENT = DEFAULT_SR_ONLY_ELEMENT;
|
|
3090
|
+
exports.DEFAULT_STACK_ELEMENT = DEFAULT_STACK_ELEMENT;
|
|
3091
|
+
exports.DEFAULT_SWITCH_ELEMENT = DEFAULT_SWITCH_ELEMENT;
|
|
3092
|
+
exports.DEFAULT_TAB_ELEMENT = DEFAULT_TAB_ELEMENT;
|
|
3093
|
+
exports.DEFAULT_TAB_LIST_ELEMENT = DEFAULT_TAB_LIST_ELEMENT;
|
|
3094
|
+
exports.DEFAULT_TEXT_AREA_ELEMENT = DEFAULT_TEXT_AREA_ELEMENT;
|
|
3095
|
+
exports.DEFAULT_TEXT_ELEMENT = DEFAULT_TEXT_ELEMENT;
|
|
3096
|
+
exports.DEFAULT_TEXT_INPUT_ELEMENT = DEFAULT_TEXT_INPUT_ELEMENT;
|
|
3097
|
+
exports.DEFAULT_TOOLTIP_ELEMENT = DEFAULT_TOOLTIP_ELEMENT;
|
|
3098
|
+
exports.DEFAULT_VIRTUAL_LIST_ELEMENT = DEFAULT_VIRTUAL_LIST_ELEMENT;
|
|
3021
3099
|
exports.EMPTY_ARRAY = EMPTY_ARRAY;
|
|
3022
3100
|
exports.EMPTY_RECORD = EMPTY_RECORD;
|
|
3023
3101
|
exports.ElementQuery = ElementQuery;
|