@sanity/ui 4.2.0 → 5.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -28
- package/bin/sanity-ui.js +14 -0
- package/dist/_chunks-es/LazyRefractor.js +20 -0
- package/dist/_chunks-es/LazyRefractor.js.map +1 -0
- package/dist/cli/checks.js +148 -0
- package/dist/cli/config.js +23 -0
- package/dist/cli/detect.js +181 -0
- package/dist/cli/doctor.js +49 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/init.js +189 -0
- package/dist/cli/install.js +79 -0
- package/dist/cli/log.js +66 -0
- package/dist/cli/selfPackage.js +11 -0
- package/dist/cli/styles.js +185 -0
- package/dist/cli/test-utils.js +8 -0
- package/dist/cli/tsconfig.js +236 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/versions.js +45 -0
- package/dist/index.d.ts +1203 -1469
- package/dist/index.js +2123 -1989
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +5 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/styles.css +1 -547
- package/package.json +57 -58
- package/src/cli/checks.test.ts +38 -0
- package/src/cli/checks.ts +200 -0
- package/src/cli/config.ts +44 -0
- package/src/cli/detect.test.ts +191 -0
- package/src/cli/detect.ts +205 -0
- package/src/cli/doctor.test.ts +52 -0
- package/src/cli/doctor.ts +65 -0
- package/src/cli/index.ts +77 -0
- package/src/cli/init.ts +225 -0
- package/src/cli/install.test.ts +52 -0
- package/src/cli/install.ts +108 -0
- package/src/cli/log.ts +79 -0
- package/src/cli/selfPackage.ts +14 -0
- package/src/cli/styles.test.ts +130 -0
- package/src/cli/styles.ts +205 -0
- package/src/cli/test-utils.ts +10 -0
- package/src/cli/tsconfig.test.ts +174 -0
- package/src/cli/tsconfig.ts +282 -0
- package/src/cli/types.ts +77 -0
- package/src/cli/versions.test.ts +35 -0
- package/src/cli/versions.ts +41 -0
- package/src/components/badge/Badge.tsx +53 -0
- package/src/components/badge/badge.css +6 -0
- package/src/components/badge/badge.props.ts +31 -0
- package/src/components/box/Box.tsx +30 -0
- package/src/components/box/box.css +4 -0
- package/src/components/box/box.props.ts +29 -0
- package/src/components/button/Button.tsx +78 -0
- package/src/components/button/button.css +72 -0
- package/src/components/button/button.props.ts +122 -0
- package/src/components/card/Card.tsx +31 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.props.ts +58 -0
- package/src/components/checkbox/Checkbox.tsx +64 -0
- package/src/components/checkbox/checkbox.css +100 -0
- package/src/components/checkbox/checkbox.props.ts +33 -0
- package/src/components/code/Code.tsx +38 -0
- package/src/components/code/LazyRefractor.tsx +9 -0
- package/src/components/code/code.css +40 -0
- package/src/components/code/code.props.ts +44 -0
- package/src/components/container/Container.tsx +30 -0
- package/src/components/container/container.css +4 -0
- package/src/components/container/container.props.ts +28 -0
- package/src/components/dialog/Dialog.tsx +139 -0
- package/src/components/dialog/dialog.css +49 -0
- package/src/components/dialog/dialog.props.ts +45 -0
- package/src/components/divider/Divider.tsx +23 -0
- package/src/components/divider/divider.props.ts +9 -0
- package/src/components/eyebrow/Eyebrow.tsx +54 -0
- package/src/components/eyebrow/eyebrow.css +11 -0
- package/src/components/eyebrow/eyebrow.props.ts +28 -0
- package/src/components/flex/Flex.tsx +30 -0
- package/src/components/flex/flex.css +4 -0
- package/src/components/flex/flex.props.ts +33 -0
- package/src/components/grid/Grid.tsx +30 -0
- package/src/components/grid/grid.css +4 -0
- package/src/components/grid/grid.props.ts +33 -0
- package/src/components/h-stack/HStack.tsx +34 -0
- package/src/components/h-stack/hStack.props.ts +17 -0
- package/src/components/heading/Heading.tsx +54 -0
- package/src/components/heading/heading.css +9 -0
- package/src/components/heading/heading.props.ts +31 -0
- package/src/components/icon/Icon.tsx +24 -0
- package/src/components/icon/icon.css +17 -0
- package/src/components/icon/icon.props.ts +35 -0
- package/src/components/icon-button/IconButton.tsx +32 -0
- package/src/components/icon-button/iconButton.props.ts +31 -0
- package/src/components/index.css +28 -0
- package/src/components/indicator/Indicator.tsx +42 -0
- package/src/components/indicator/indicator.css +4 -0
- package/src/components/indicator/indicator.props.ts +24 -0
- package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
- package/src/components/indicator-stack/indicator-stack.css +7 -0
- package/src/components/indicator-stack/indicatorStack.props.ts +15 -0
- package/src/components/inline/Inline.tsx +38 -0
- package/src/components/inline/inline.css +4 -0
- package/src/components/inline/inline.props.ts +100 -0
- package/src/components/label/Label.tsx +34 -0
- package/src/components/label/label.css +3 -0
- package/src/components/label/label.props.ts +25 -0
- package/src/components/link/Link.tsx +29 -0
- package/src/components/link/link.css +12 -0
- package/src/components/link/link.props.ts +23 -0
- package/src/components/list/List.tsx +167 -0
- package/src/components/list/list.css +25 -0
- package/src/components/list/list.props.ts +130 -0
- package/src/components/popover/Popover.tsx +85 -0
- package/src/components/popover/popover.css +21 -0
- package/src/components/popover/popover.props.ts +38 -0
- package/src/components/press-area/PressArea.tsx +29 -0
- package/src/components/press-area/press-area.css +22 -0
- package/src/components/press-area/pressArea.props.ts +16 -0
- package/src/components/radio/Radio.tsx +48 -0
- package/src/components/radio/radio.css +97 -0
- package/src/components/radio/radio.props.ts +25 -0
- package/src/components/skip-to-content/SkipToContent.tsx +35 -0
- package/src/components/skip-to-content/skip-to-content.css +9 -0
- package/src/components/skip-to-content/skipToContent.props.ts +25 -0
- package/src/components/spinner/Spinner.tsx +28 -0
- package/src/components/spinner/spinner.css +10 -0
- package/src/components/spinner/spinner.props.ts +19 -0
- package/src/components/switch/Switch.tsx +48 -0
- package/src/components/switch/switch.css +119 -0
- package/src/components/switch/switch.props.ts +25 -0
- package/src/components/text/Text.tsx +53 -0
- package/src/components/text/text.css +9 -0
- package/src/components/text/text.props.ts +28 -0
- package/src/components/tooltip/Tooltip.tsx +97 -0
- package/src/components/tooltip/tooltip.css +31 -0
- package/src/components/tooltip/tooltip.props.ts +36 -0
- package/src/components/tooltip-group/TooltipGroup.tsx +64 -0
- package/src/components/tooltip-group/tooltipGroup.props.ts +15 -0
- package/src/components/v-stack/VStack.tsx +32 -0
- package/src/components/v-stack/vStack.props.ts +17 -0
- package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
- package/src/components/visually-hidden/visually-hidden.css +9 -0
- package/src/components/visually-hidden/visuallyHidden.props.ts +23 -0
- package/src/css/classes/dynamic/flex-child.css +5 -0
- package/src/css/classes/dynamic/grid-child.css +8 -0
- package/src/css/classes/dynamic/grid-parent.css +6 -0
- package/src/css/classes/dynamic/height.css +5 -0
- package/src/css/classes/dynamic/index.css +7 -0
- package/src/css/classes/dynamic/line-clamp.css +5 -0
- package/src/css/classes/dynamic/readme.md +3 -0
- package/src/css/classes/dynamic/width.css +7 -0
- package/src/css/classes/dynamic/z-index.css +3 -0
- package/src/css/classes/generic/display.css +10 -0
- package/src/css/classes/generic/flex.css +24 -0
- package/src/css/classes/generic/grid.css +7 -0
- package/src/css/classes/generic/index.css +7 -0
- package/src/css/classes/generic/overflow.css +19 -0
- package/src/css/classes/generic/placement.css +202 -0
- package/src/css/classes/generic/position.css +7 -0
- package/src/css/classes/generic/readme.md +3 -0
- package/src/css/classes/generic/text-align.css +5 -0
- package/src/css/classes/index.css +4 -0
- package/src/css/classes/local/animation.css +4 -0
- package/src/css/classes/local/border.css +20 -0
- package/src/css/classes/local/index.css +6 -0
- package/src/css/classes/local/readme.md +3 -0
- package/src/css/classes/local/text-overflow.css +5 -0
- package/src/css/classes/local/text-trim.css +45 -0
- package/src/css/classes/local/tone.css +75 -0
- package/src/css/classes/local/top-anchor.css +4 -0
- package/src/css/classes/system/color.css +223 -0
- package/src/css/classes/system/container.css +8 -0
- package/src/css/classes/system/font-family.css +2 -0
- package/src/css/classes/system/font-weight.css +4 -0
- package/src/css/classes/system/gap.css +37 -0
- package/src/css/classes/system/index.css +10 -0
- package/src/css/classes/system/inset.css +56 -0
- package/src/css/classes/system/margin.css +148 -0
- package/src/css/classes/system/padding.css +78 -0
- package/src/css/classes/system/radius.css +10 -0
- package/src/css/classes/system/readme.md +3 -0
- package/src/css/classes/system/shadow.css +6 -0
- package/src/css/classes/system/typography.css +31 -0
- package/src/css/global/font-face.css +20 -0
- package/src/css/global/index.css +2 -0
- package/src/css/global/reset.css +76 -0
- package/src/css/tokens/index.css +3 -0
- package/src/css/tokens/opacity.css +6 -0
- package/src/css/tokens/semantic.css +25 -0
- package/src/css/tokens/surface.css +27 -0
- package/src/hooks/useIsClient.ts +10 -0
- package/src/index.css +18 -0
- package/src/index.ts +65 -0
- package/src/polyfills.ts +15 -0
- package/src/props/border.ts +51 -0
- package/src/props/flexChild.ts +29 -0
- package/src/props/flexParent.ts +47 -0
- package/src/props/gap.ts +31 -0
- package/src/props/gridChild.ts +50 -0
- package/src/props/gridParent.ts +45 -0
- package/src/props/height.ts +29 -0
- package/src/props/layout.ts +44 -0
- package/src/props/margin.ts +59 -0
- package/src/props/overflow.ts +30 -0
- package/src/props/padding.ts +59 -0
- package/src/props/placement.ts +16 -0
- package/src/props/position.ts +52 -0
- package/src/props/shadow.ts +15 -0
- package/src/props/tone.ts +15 -0
- package/src/props/typography.ts +62 -0
- package/src/props/width.ts +29 -0
- package/src/props/zIndex.ts +15 -0
- package/src/styles.css.d.ts +1 -0
- package/src/styles.css.node.js +2 -0
- package/src/styles.css.test.ts +24 -0
- package/src/types/Button.ts +8 -0
- package/src/types/Code.ts +6 -0
- package/src/types/Container.ts +3 -0
- package/src/types/Density.ts +3 -0
- package/src/types/Display.ts +11 -0
- package/src/types/Eyebrow.ts +3 -0
- package/src/types/Flex.ts +22 -0
- package/src/types/FontWeight.ts +3 -0
- package/src/types/Grid.ts +3 -0
- package/src/types/Heading.ts +6 -0
- package/src/types/Icon.ts +3 -0
- package/src/types/Interactive.ts +8 -0
- package/src/types/List.ts +2 -0
- package/src/types/Overflow.ts +3 -0
- package/src/types/Placement.ts +16 -0
- package/src/types/Position.ts +3 -0
- package/src/types/PropDef.ts +73 -0
- package/src/types/Radius.ts +3 -0
- package/src/types/Responsive.ts +10 -0
- package/src/types/Shadow.ts +3 -0
- package/src/types/Space.ts +15 -0
- package/src/types/Text.ts +3 -0
- package/src/types/TextAlign.ts +3 -0
- package/src/types/Tone.ts +3 -0
- package/src/utils/getProps.test.ts +156 -0
- package/src/utils/getProps.ts +156 -0
- package/src/utils/mergeTriggerProps.ts +66 -0
- package/src/utils/renderPortal.tsx +14 -0
- package/src/utils/suffixClassName.ts +5 -0
- package/src/version.ts +3 -0
- package/LICENSE +0 -21
- package/dist/_system-CTe2lb5l.d.ts +0 -40
- package/dist/_system-CTe2lb5l.d.ts.map +0 -1
- package/dist/arrow-BmX6qbAS.js +0 -170
- package/dist/arrow-BmX6qbAS.js.map +0 -1
- package/dist/autocomplete.d.ts +0 -140
- package/dist/autocomplete.d.ts.map +0 -1
- package/dist/autocomplete.js +0 -470
- package/dist/autocomplete.js.map +0 -1
- package/dist/breadcrumbs.d.ts +0 -18
- package/dist/breadcrumbs.d.ts.map +0 -1
- package/dist/breadcrumbs.js +0 -119
- package/dist/breadcrumbs.js.map +0 -1
- package/dist/button-BNyKSDyA.js +0 -180
- package/dist/button-BNyKSDyA.js.map +0 -1
- package/dist/button-dnqMFkWg.d.ts +0 -76
- package/dist/button-dnqMFkWg.d.ts.map +0 -1
- package/dist/card-C0a0wQTc.d.ts +0 -7
- package/dist/card-C0a0wQTc.d.ts.map +0 -1
- package/dist/code.d.ts +0 -20
- package/dist/code.d.ts.map +0 -1
- package/dist/code.js +0 -90
- package/dist/code.js.map +0 -1
- package/dist/codeFontStyle-84SMhFtI.js +0 -11
- package/dist/codeFontStyle-84SMhFtI.js.map +0 -1
- package/dist/component-DVlwaWB-.d.ts +0 -25
- package/dist/component-DVlwaWB-.d.ts.map +0 -1
- package/dist/element-BYgCE_iK.js +0 -51
- package/dist/element-BYgCE_iK.js.map +0 -1
- package/dist/factory-BzXTX8_Q.js +0 -3056
- package/dist/factory-BzXTX8_Q.js.map +0 -1
- package/dist/flex-DmbDG2ks.js +0 -76
- package/dist/flex-DmbDG2ks.js.map +0 -1
- package/dist/font-EtfxKPUz.d.ts +0 -49
- package/dist/font-EtfxKPUz.d.ts.map +0 -1
- package/dist/getElementRef-Jw7gY0eV.js +0 -102
- package/dist/getElementRef-Jw7gY0eV.js.map +0 -1
- package/dist/getScopedTheme-C-sZsyAz.js +0 -267
- package/dist/getScopedTheme-C-sZsyAz.js.map +0 -1
- package/dist/getTheme_v2-y09KqtEb.js +0 -487
- package/dist/getTheme_v2-y09KqtEb.js.map +0 -1
- package/dist/grid-6JSgMj1O.js +0 -115
- package/dist/grid-6JSgMj1O.js.map +0 -1
- package/dist/helpers-C8xxXAQC.js +0 -63
- package/dist/helpers-C8xxXAQC.js.map +0 -1
- package/dist/hotkeys-CaHsQlsO.js +0 -168
- package/dist/hotkeys-CaHsQlsO.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/layer-Bl5R3uNR.js +0 -61
- package/dist/layer-Bl5R3uNR.js.map +0 -1
- package/dist/layer-ChlP9Ik6.d.ts +0 -242
- package/dist/layer-ChlP9Ik6.d.ts.map +0 -1
- package/dist/menu.d.ts +0 -146
- package/dist/menu.d.ts.map +0 -1
- package/dist/menu.js +0 -626
- package/dist/menu.js.map +0 -1
- package/dist/popover-B7-28L8y.js +0 -408
- package/dist/popover-B7-28L8y.js.map +0 -1
- package/dist/popover-CMlQeKn0.d.ts +0 -96
- package/dist/popover-CMlQeKn0.d.ts.map +0 -1
- package/dist/popover.d.ts +0 -2
- package/dist/popover.js +0 -3
- package/dist/refractor-CC48DwHi.js +0 -20
- package/dist/refractor-CC48DwHi.js.map +0 -1
- package/dist/responsiveFont-CilwaORG.js +0 -55
- package/dist/responsiveFont-CilwaORG.js.map +0 -1
- package/dist/rgba-BSYaEUW6.d.ts +0 -846
- package/dist/rgba-BSYaEUW6.d.ts.map +0 -1
- package/dist/selectable-B0GUIL74.d.ts +0 -7
- package/dist/selectable-B0GUIL74.d.ts.map +0 -1
- package/dist/stack-rsNFPq2-.js +0 -112
- package/dist/stack-rsNFPq2-.js.map +0 -1
- package/dist/styles-css.d.ts +0 -2
- package/dist/styles-css.js +0 -4
- package/dist/textInput-pSfQjkmx.js +0 -313
- package/dist/textInput-pSfQjkmx.js.map +0 -1
- package/dist/theme.d.ts +0 -280
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -55
- package/dist/theme.js.map +0 -1
- package/dist/toast.d.ts +0 -73
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js +0 -302
- package/dist/toast.js.map +0 -1
- package/dist/tooltip.d.ts +0 -88
- package/dist/tooltip.d.ts.map +0 -1
- package/dist/tooltip.js +0 -435
- package/dist/tooltip.js.map +0 -1
- package/dist/useClickOutsideEvent-wGLGWBZN.js +0 -36
- package/dist/useClickOutsideEvent-wGLGWBZN.js.map +0 -1
- package/dist/useElementSize-BJvbGHq8.js +0 -51
- package/dist/useElementSize-BJvbGHq8.js.map +0 -1
- package/dist/useLayer-D1usxIE0.js +0 -712
- package/dist/useLayer-D1usxIE0.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,2000 +1,2134 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { a as textInputFontSizeStyle, c as responsiveInputPaddingStyle, d as attemptFocus, f as focusFirstDescendant, g as _raf2, h as _raf, i as textInputBaseStyle, l as useCustomValidity, m as isFocusable, n as inputRoot, o as textInputRepresentationStyle, p as focusLastDescendant, r as textAreaRoot, s as responsiveInputPaddingIconRightStyle, t as TextInput, u as _hasFocus } from "./textInput-pSfQjkmx.js";
|
|
4
|
-
import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElement, n as containsOrEqualsElement, o as isHTMLInputElement, r as isHTMLAnchorElement, s as isHTMLSelectElement, t as _isEnterToClickElement } from "./element-BYgCE_iK.js";
|
|
5
|
-
import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
|
|
6
|
-
import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-D1usxIE0.js";
|
|
7
|
-
import { t as Flex } from "./flex-DmbDG2ks.js";
|
|
8
|
-
import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-rsNFPq2-.js";
|
|
9
|
-
import { t as responsiveFont } from "./responsiveFont-CilwaORG.js";
|
|
10
|
-
import { n as Spinner, t as Button } from "./button-BNyKSDyA.js";
|
|
11
|
-
import { n as _elementSizeObserver, t as useElementSize } from "./useElementSize-BJvbGHq8.js";
|
|
12
|
-
import { a as useBoundaryElement, i as PortalContext, n as Portal, o as BoundaryElementContext, r as usePortal, t as Arrow } from "./arrow-BmX6qbAS.js";
|
|
13
|
-
import { t as useClickOutsideEvent } from "./useClickOutsideEvent-wGLGWBZN.js";
|
|
14
|
-
import { t as responsiveCodeFontStyle } from "./codeFontStyle-84SMhFtI.js";
|
|
15
|
-
import { a as rgba$1, c as hslToRgb$1, i as multiply$1, l as rgbToHex$1, n as buildTheme, o as parseColor$1, r as screen$1, s as hexToRgb$1, t as createColorTheme$1, u as rgbToHsl$1 } from "./factory-BzXTX8_Q.js";
|
|
16
|
-
import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-CaHsQlsO.js";
|
|
17
|
-
import { t as Layer } from "./layer-Bl5R3uNR.js";
|
|
18
|
-
import { t as Grid } from "./grid-6JSgMj1O.js";
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
19
3
|
import { c } from "react/compiler-runtime";
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { css, styled } from "styled-components";
|
|
24
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
25
|
-
import ReactIs from "react-is";
|
|
26
|
-
import { CloseIcon } from "@sanity/icons/Close";
|
|
27
|
-
import { ToggleArrowRightIcon } from "@sanity/icons/ToggleArrowRight";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { isValidElement, useRef, useEffect, lazy, Suspense, useId, Children, useSyncExternalStore, useState, cloneElement, Activity } from "react";
|
|
6
|
+
import { SpinnerIcon } from "@sanity/icons/Spinner";
|
|
28
7
|
import { CheckmarkIcon } from "@sanity/icons/Checkmark";
|
|
29
8
|
import { RemoveIcon } from "@sanity/icons/Remove";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
let T0 = StyledTreeItem, t22 = selected ? "" : void 0, t24 = clsx(treeItem, restProps.className), t25;
|
|
882
|
-
$[71] !== content || $[72] !== tree.level ? (t25 = /* @__PURE__ */ jsx(TreeItemBox, {
|
|
883
|
-
$level: tree.level,
|
|
884
|
-
as: "div",
|
|
885
|
-
"data-ui": "TreeItem__box",
|
|
886
|
-
children: content
|
|
887
|
-
}), $[71] = content, $[72] = tree.level, $[73] = t25) : t25 = $[73];
|
|
888
|
-
let t26;
|
|
889
|
-
$[74] !== children || $[75] !== expanded ? (t26 = children && /* @__PURE__ */ jsx(TreeGroup, {
|
|
890
|
-
expanded,
|
|
891
|
-
children
|
|
892
|
-
}), $[74] = children, $[75] = expanded, $[76] = t26) : t26 = $[76];
|
|
893
|
-
let t27;
|
|
894
|
-
$[77] !== contextValue || $[78] !== t26 ? (t27 = /* @__PURE__ */ jsx(TreeContext.Provider, {
|
|
895
|
-
value: contextValue,
|
|
896
|
-
children: t26
|
|
897
|
-
}), $[77] = contextValue, $[78] = t26, $[79] = t27) : t27 = $[79];
|
|
898
|
-
let t28;
|
|
899
|
-
return $[80] !== T0 || $[81] !== expanded || $[82] !== handleClick || $[83] !== handleKeyDown || $[84] !== id || $[85] !== itemKey || $[86] !== restProps || $[87] !== setRootElement || $[88] !== t22 || $[89] !== t24 || $[90] !== t25 || $[91] !== t27 || $[92] !== tabIndex ? (t28 = /* @__PURE__ */ jsxs(T0, {
|
|
900
|
-
"data-selected": t22,
|
|
901
|
-
"data-ui": "TreeItem",
|
|
902
|
-
"data-tree-id": id,
|
|
903
|
-
"data-tree-key": itemKey,
|
|
904
|
-
...restProps,
|
|
905
|
-
"aria-expanded": expanded,
|
|
906
|
-
className: t24,
|
|
907
|
-
onClick: handleClick,
|
|
908
|
-
onKeyDown: handleKeyDown,
|
|
909
|
-
ref: setRootElement,
|
|
910
|
-
role: "treeitem",
|
|
911
|
-
tabIndex,
|
|
912
|
-
children: [t25, t27]
|
|
913
|
-
}), $[80] = T0, $[81] = expanded, $[82] = handleClick, $[83] = handleKeyDown, $[84] = id, $[85] = itemKey, $[86] = restProps, $[87] = setRootElement, $[88] = t22, $[89] = t24, $[90] = t25, $[91] = t27, $[92] = tabIndex, $[93] = t28) : t28 = $[93], t28;
|
|
914
|
-
}
|
|
915
|
-
/**
|
|
916
|
-
* @internal
|
|
917
|
-
*/
|
|
918
|
-
function _isScrollable(el) {
|
|
919
|
-
if (!(el instanceof Element)) return !1;
|
|
920
|
-
let style = window.getComputedStyle(el);
|
|
921
|
-
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
922
|
-
}
|
|
923
|
-
/**
|
|
924
|
-
* @deprecated instead of `useArrayProp(width)` use `Array.isArray(width) ? width : [width]` instead
|
|
925
|
-
* @beta
|
|
926
|
-
*/
|
|
927
|
-
function useArrayProp(_val, _defaultVal) {
|
|
928
|
-
throw Error("`useArrayProp` was removed in @sanity/ui v4. Use `Array.isArray(value) ? value : [value]` instead.");
|
|
929
|
-
}
|
|
930
|
-
/**
|
|
931
|
-
* @public
|
|
932
|
-
* @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
|
|
933
|
-
* ```tsx
|
|
934
|
-
* const [button, setButtonElement] = useState(null)
|
|
935
|
-
* useClickOutside((event) => {}, [button])
|
|
936
|
-
* return <button ref={setButtonElement} />
|
|
937
|
-
* ```
|
|
938
|
-
* do:
|
|
939
|
-
* ```tsx
|
|
940
|
-
* const buttonRef = useRef()
|
|
941
|
-
* useClickOutsideEvent((event) => {}, () => [buttonRef.current])
|
|
942
|
-
* return <button ref={buttonRef} />
|
|
943
|
-
* ```
|
|
944
|
-
*/
|
|
945
|
-
function useClickOutside(_listener, _elementsArg, _boundaryElement) {
|
|
946
|
-
throw Error("`useClickOutside` was removed in @sanity/ui v4. Use `useClickOutsideEvent` instead.");
|
|
947
|
-
}
|
|
948
|
-
/**
|
|
949
|
-
* Subscribe to the rect of a DOM element.
|
|
950
|
-
* @beta
|
|
951
|
-
*
|
|
952
|
-
* @deprecated Use `useElementSize` instead
|
|
953
|
-
*/
|
|
954
|
-
function useElementRect(_element) {
|
|
955
|
-
throw Error("`useElementRect` was removed in @sanity/ui v4. Use `useElementSize` instead.");
|
|
956
|
-
}
|
|
957
|
-
/**
|
|
958
|
-
* @beta
|
|
959
|
-
* @deprecated use `useImperativeHandle` instead
|
|
960
|
-
* @example
|
|
961
|
-
* ```diff
|
|
962
|
-
* -const ref = useForwardedRef(forwardedRef)
|
|
963
|
-
* +const ref = useRef(null)
|
|
964
|
-
* +useImperativeHandle(forwardedRef, () => ref.current)
|
|
965
|
-
* ```
|
|
966
|
-
*/
|
|
967
|
-
function useForwardedRef(_ref) {
|
|
968
|
-
throw Error("`useForwardedRef` was removed in @sanity/ui v4. Use `useRef` and `useImperativeHandle` instead.");
|
|
969
|
-
}
|
|
970
|
-
/**
|
|
971
|
-
* Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
|
|
972
|
-
*
|
|
973
|
-
* @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
|
|
974
|
-
*
|
|
975
|
-
* If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
|
|
976
|
-
* Chrome supports reading the `prefers-color-scheme` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme
|
|
977
|
-
* @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
|
|
978
|
-
*
|
|
979
|
-
* @public
|
|
980
|
-
*/
|
|
981
|
-
function usePrefersDark(t0) {
|
|
982
|
-
return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$3 : t0);
|
|
983
|
-
}
|
|
984
|
-
function _temp$3() {
|
|
985
|
-
return !1;
|
|
986
|
-
}
|
|
987
|
-
/**
|
|
988
|
-
* Get responsive CSS for the `label` font style.
|
|
989
|
-
* @internal
|
|
990
|
-
*/
|
|
991
|
-
function responsiveLabelFont(props) {
|
|
992
|
-
return responsiveFont("label", props);
|
|
993
|
-
}
|
|
994
|
-
function labelBaseStyle(props) {
|
|
995
|
-
let { $accent, $muted } = props, { font } = getTheme_v2(props.theme);
|
|
996
|
-
return css`text-transform:uppercase;${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}`;
|
|
997
|
-
}
|
|
998
|
-
const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
999
|
-
displayName: "StyledLabel",
|
|
1000
|
-
componentId: "sc-43585o-0"
|
|
1001
|
-
})(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
1002
|
-
function LabelComponent(props) {
|
|
1003
|
-
let $ = c(27), accent, align, childrenProp, ref, restProps, t0, t1, textOverflow, weight;
|
|
1004
|
-
$[0] === props ? (accent = $[1], align = $[2], childrenProp = $[3], ref = $[4], restProps = $[5], t0 = $[6], t1 = $[7], textOverflow = $[8], weight = $[9]) : ({accent, align, children: childrenProp, muted: t0, ref, size: t1, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = ref, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = textOverflow, $[9] = weight);
|
|
1005
|
-
let muted = t0 !== void 0 && t0, size = t1 === void 0 ? 2 : t1, children = childrenProp;
|
|
1006
|
-
if (textOverflow === "ellipsis") {
|
|
1007
|
-
let t2;
|
|
1008
|
-
$[10] === children ? t2 = $[11] : (t2 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[10] = children, $[11] = t2), children = t2;
|
|
1009
|
-
} else {
|
|
1010
|
-
let t2;
|
|
1011
|
-
$[12] === children ? t2 = $[13] : (t2 = /* @__PURE__ */ jsx("span", { children }), $[12] = children, $[13] = t2), children = t2;
|
|
1012
|
-
}
|
|
1013
|
-
let t2;
|
|
1014
|
-
$[14] === align ? t2 = $[15] : (t2 = _getArrayProp(align), $[14] = align, $[15] = t2);
|
|
1015
|
-
let t3;
|
|
1016
|
-
$[16] === size ? t3 = $[17] : (t3 = _getArrayProp(size), $[16] = size, $[17] = t3);
|
|
1017
|
-
let t4;
|
|
1018
|
-
return $[18] !== accent || $[19] !== children || $[20] !== muted || $[21] !== ref || $[22] !== restProps || $[23] !== t2 || $[24] !== t3 || $[25] !== weight ? (t4 = /* @__PURE__ */ jsx(StyledLabel, {
|
|
1019
|
-
"data-ui": "Label",
|
|
1020
|
-
...restProps,
|
|
1021
|
-
$accent: accent,
|
|
1022
|
-
$align: t2,
|
|
1023
|
-
$muted: muted,
|
|
1024
|
-
$size: t3,
|
|
1025
|
-
$weight: weight,
|
|
1026
|
-
ref,
|
|
1027
|
-
children
|
|
1028
|
-
}), $[18] = accent, $[19] = children, $[20] = muted, $[21] = ref, $[22] = restProps, $[23] = t2, $[24] = t3, $[25] = weight, $[26] = t4) : t4 = $[26], t4;
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* Typographic labels.
|
|
1032
|
-
*
|
|
1033
|
-
* @public
|
|
1034
|
-
*/
|
|
1035
|
-
const Label = LabelComponent;
|
|
1036
|
-
function avatarRootStyle(props) {
|
|
1037
|
-
let { $color } = props, { avatar } = getTheme_v2(props.theme);
|
|
1038
|
-
return {
|
|
1039
|
-
"--avatar-bg-color": `var(--card-avatar-${$color}-bg-color)`,
|
|
1040
|
-
"--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)`,
|
|
1041
|
-
backgroundColor: "var(--avatar-bg-color)",
|
|
1042
|
-
position: "relative",
|
|
1043
|
-
boxSizing: "border-box",
|
|
1044
|
-
userSelect: "none",
|
|
1045
|
-
boxShadow: "0 0 0 1px var(--card-bg-color)",
|
|
1046
|
-
"&[data-status=\"inactive\"]": { opacity: "0.5" },
|
|
1047
|
-
"&>svg": { "&:not([hidden])": { display: "block" } },
|
|
1048
|
-
"&[data-as=\"button\"]": {
|
|
1049
|
-
WebkitFontSmoothing: "inherit",
|
|
1050
|
-
appearance: "none",
|
|
1051
|
-
margin: 0,
|
|
1052
|
-
padding: 0,
|
|
1053
|
-
border: 0,
|
|
1054
|
-
font: "inherit",
|
|
1055
|
-
color: "inherit",
|
|
1056
|
-
outline: "none",
|
|
1057
|
-
"&:focus": { boxShadow: focusRingStyle({ focusRing: avatar.focusRing }) },
|
|
1058
|
-
"&:focus:not(:focus-visible)": { boxShadow: "none" }
|
|
1059
|
-
}
|
|
1060
|
-
};
|
|
1061
|
-
}
|
|
1062
|
-
function responsiveAvatarSizeStyle(props) {
|
|
1063
|
-
let { avatar, media } = getTheme_v2(props.theme);
|
|
1064
|
-
return _responsive(media, props.$size, (size) => {
|
|
1065
|
-
let avatarSize = avatar.sizes[size] || avatar.sizes[0];
|
|
1066
|
-
return {
|
|
1067
|
-
width: rem(avatarSize.size),
|
|
1068
|
-
height: rem(avatarSize.size),
|
|
1069
|
-
borderRadius: rem(avatarSize.size / 2),
|
|
1070
|
-
"&>svg": {
|
|
1071
|
-
width: rem(avatarSize.size),
|
|
1072
|
-
height: rem(avatarSize.size),
|
|
1073
|
-
borderRadius: rem(avatarSize.size / 2)
|
|
1074
|
-
}
|
|
1075
|
-
};
|
|
1076
|
-
});
|
|
1077
|
-
}
|
|
1078
|
-
var avatarArrow = "_1jezl1b0", avatarStack = "_1jezl1b4";
|
|
1079
|
-
const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
1080
|
-
displayName: "StyledAvatar",
|
|
1081
|
-
componentId: "sc-3dcnr0-0"
|
|
1082
|
-
})(responsiveAvatarSizeStyle, avatarRootStyle), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({
|
|
1083
|
-
displayName: "InitialsLabel",
|
|
1084
|
-
componentId: "sc-3dcnr0-1"
|
|
1085
|
-
})({ color: "inherit" });
|
|
1086
|
-
function AvatarComponent(props) {
|
|
1087
|
-
let $ = c(47), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, ref, restProps, src, t0, t1, t2, title;
|
|
1088
|
-
$[0] === props ? (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], ref = $[7], restProps = $[8], src = $[9], t0 = $[10], t1 = $[11], t2 = $[12], title = $[13]) : ({__unstable_hideInnerStroke, as: asProp, color: t0, src, title, initials, onImageLoadError, arrowPosition: arrowPositionProp, animateArrowFrom, ref, status: t1, size: t2, ...restProps} = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = ref, $[8] = restProps, $[9] = src, $[10] = t0, $[11] = t1, $[12] = t2, $[13] = title);
|
|
1089
|
-
let color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, { avatar } = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : "div", size = _getArrayProp(sizeProp), _sizeRem = (avatar.sizes[size[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`, t3, t4;
|
|
1090
|
-
$[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t3 = () => {
|
|
1091
|
-
if (arrowPosition === arrowPositionProp) return;
|
|
1092
|
-
let raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
|
|
1093
|
-
return () => cancelAnimationFrame(raf);
|
|
1094
|
-
}, t4 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t3, $[17] = t4) : (t3 = $[16], t4 = $[17]), useEffect(t3, t4);
|
|
1095
|
-
let t5, t6;
|
|
1096
|
-
$[18] === src ? (t5 = $[19], t6 = $[20]) : (t5 = () => {
|
|
1097
|
-
src && setImageFailed(!1);
|
|
1098
|
-
}, t6 = [src], $[18] = src, $[19] = t5, $[20] = t6), useEffect(t5, t6);
|
|
1099
|
-
let t7;
|
|
1100
|
-
$[21] === onImageLoadError ? t7 = $[22] : (t7 = () => {
|
|
1101
|
-
setImageFailed(!0), onImageLoadError && onImageLoadError(/* @__PURE__ */ Error("Avatar: the image failed to load"));
|
|
1102
|
-
}, $[21] = onImageLoadError, $[22] = t7);
|
|
1103
|
-
let handleImageError = t7, T0 = StyledAvatar, t8 = typeof as == "string" ? as : void 0, t10;
|
|
1104
|
-
$[23] === color ? t10 = $[24] : (t10 = /* @__PURE__ */ jsx("div", {
|
|
1105
|
-
className: avatarArrow,
|
|
1106
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
1107
|
-
width: "11",
|
|
1108
|
-
height: "7",
|
|
1109
|
-
viewBox: "0 0 11 7",
|
|
1110
|
-
fill: "none",
|
|
1111
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1112
|
-
d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z",
|
|
1113
|
-
fill: color
|
|
1114
|
-
})
|
|
1115
|
-
})
|
|
1116
|
-
}), $[23] = color, $[24] = t10);
|
|
1117
|
-
let t11;
|
|
1118
|
-
$[25] !== __unstable_hideInnerStroke || $[26] !== _radius || $[27] !== _sizeRem || $[28] !== handleImageError || $[29] !== imageFailed || $[30] !== imageId || $[31] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs("svg", {
|
|
1119
|
-
className: "_1jezl1b1",
|
|
1120
|
-
viewBox: `0 0 ${_sizeRem} ${_sizeRem}`,
|
|
1121
|
-
fill: "none",
|
|
1122
|
-
children: [
|
|
1123
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", {
|
|
1124
|
-
id: imageId,
|
|
1125
|
-
patternContentUnits: "objectBoundingBox",
|
|
1126
|
-
width: "1",
|
|
1127
|
-
height: "1",
|
|
1128
|
-
children: /* @__PURE__ */ jsx("image", {
|
|
1129
|
-
href: src,
|
|
1130
|
-
width: "1",
|
|
1131
|
-
height: "1",
|
|
1132
|
-
onError: handleImageError
|
|
1133
|
-
})
|
|
1134
|
-
}) }),
|
|
1135
|
-
/* @__PURE__ */ jsx("circle", {
|
|
1136
|
-
cx: _radius,
|
|
1137
|
-
cy: _radius,
|
|
1138
|
-
r: _radius,
|
|
1139
|
-
fill: `url(#${imageId})`
|
|
1140
|
-
}),
|
|
1141
|
-
!__unstable_hideInnerStroke && /* @__PURE__ */ jsx("ellipse", {
|
|
1142
|
-
className: "_1jezl1b2",
|
|
1143
|
-
cx: _radius,
|
|
1144
|
-
cy: _radius,
|
|
1145
|
-
rx: _radius,
|
|
1146
|
-
ry: _radius,
|
|
1147
|
-
vectorEffect: "non-scaling-stroke"
|
|
1148
|
-
}),
|
|
1149
|
-
/* @__PURE__ */ jsx("ellipse", {
|
|
1150
|
-
className: "_1jezl1b3",
|
|
1151
|
-
cx: _radius,
|
|
1152
|
-
cy: _radius,
|
|
1153
|
-
rx: _radius,
|
|
1154
|
-
ry: _radius,
|
|
1155
|
-
vectorEffect: "non-scaling-stroke"
|
|
1156
|
-
})
|
|
1157
|
-
]
|
|
1158
|
-
}), $[25] = __unstable_hideInnerStroke, $[26] = _radius, $[27] = _sizeRem, $[28] = handleImageError, $[29] = imageFailed, $[30] = imageId, $[31] = src, $[32] = t11) : t11 = $[32];
|
|
1159
|
-
let t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("div", {
|
|
1160
|
-
className: "_1jezl1b5",
|
|
1161
|
-
children: /* @__PURE__ */ jsx(InitialsLabel, {
|
|
1162
|
-
forwardedAs: "span",
|
|
1163
|
-
size: size.map(_temp$2),
|
|
1164
|
-
weight: "medium",
|
|
1165
|
-
children: initials
|
|
1166
|
-
})
|
|
1167
|
-
}) }), t13;
|
|
1168
|
-
return $[33] !== T0 || $[34] !== arrowPosition || $[35] !== as || $[36] !== color || $[37] !== ref || $[38] !== restProps || $[39] !== size || $[40] !== status || $[41] !== t10 || $[42] !== t11 || $[43] !== t12 || $[44] !== t8 || $[45] !== title ? (t13 = /* @__PURE__ */ jsxs(T0, {
|
|
1169
|
-
as,
|
|
1170
|
-
"data-as": t8,
|
|
1171
|
-
"data-ui": "Avatar",
|
|
1172
|
-
...restProps,
|
|
1173
|
-
$color: color,
|
|
1174
|
-
$size: size,
|
|
1175
|
-
"aria-label": title,
|
|
1176
|
-
"data-arrow-position": arrowPosition,
|
|
1177
|
-
"data-status": status,
|
|
1178
|
-
ref,
|
|
1179
|
-
title,
|
|
1180
|
-
children: [
|
|
1181
|
-
t10,
|
|
1182
|
-
t11,
|
|
1183
|
-
t12
|
|
1184
|
-
]
|
|
1185
|
-
}), $[33] = T0, $[34] = arrowPosition, $[35] = as, $[36] = color, $[37] = ref, $[38] = restProps, $[39] = size, $[40] = status, $[41] = t10, $[42] = t11, $[43] = t12, $[44] = t8, $[45] = title, $[46] = t13) : t13 = $[46], t13;
|
|
1186
|
-
}
|
|
1187
|
-
function _temp$2(s) {
|
|
1188
|
-
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1189
|
-
}
|
|
1190
|
-
/**
|
|
1191
|
-
* Avatars are used to represent people and other agents (e.g. bots).
|
|
1192
|
-
*
|
|
1193
|
-
* @public
|
|
1194
|
-
*/
|
|
1195
|
-
const Avatar = AvatarComponent;
|
|
1196
|
-
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1197
|
-
let { avatar, media } = getTheme_v2(props.theme);
|
|
1198
|
-
return _responsive(media, props.$size, (size) => {
|
|
1199
|
-
let avatarSize = avatar.sizes[size];
|
|
1200
|
-
return avatarSize ? {
|
|
1201
|
-
borderRadius: rem(avatarSize.size / 2),
|
|
1202
|
-
minWidth: rem(avatarSize.size),
|
|
1203
|
-
height: rem(avatarSize.size)
|
|
1204
|
-
} : EMPTY_RECORD;
|
|
1205
|
-
});
|
|
1206
|
-
}
|
|
1207
|
-
function _avatarCounterBaseStyle(props) {
|
|
1208
|
-
let { space } = getTheme_v2(props.theme);
|
|
1209
|
-
return css`align-items:center;justify-content:center;box-sizing:border-box;user-select:none;color:inherit;color:var(--card-fg-color);background:var(--card-bg-color);box-shadow:0 0 0 1px var(--card-bg-color),inset 0 0 0 1px var(--card-hairline-hard-color);padding:0 ${rem(space[2])};&:not([hidden]){display:flex;}`;
|
|
1210
|
-
}
|
|
1211
|
-
const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
|
|
1212
|
-
displayName: "StyledAvatarCounter",
|
|
1213
|
-
componentId: "sc-rwjooy-0"
|
|
1214
|
-
})(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
1215
|
-
/**
|
|
1216
|
-
* @public
|
|
1217
|
-
*/
|
|
1218
|
-
function AvatarCounter(props) {
|
|
1219
|
-
let $ = c(20), { count, ref, size: t0 } = props, sizeProp = t0 === void 0 ? 1 : t0, T0, T1, t1, t2, t3, t4, t5;
|
|
1220
|
-
if ($[0] !== ref || $[1] !== sizeProp) {
|
|
1221
|
-
let size = _getArrayProp(sizeProp);
|
|
1222
|
-
T1 = StyledAvatarCounter, t3 = size, t4 = "AvatarCounter", t5 = ref, T0 = Label, t1 = "span", t2 = size.map(_temp$1), $[0] = ref, $[1] = sizeProp, $[2] = T0, $[3] = T1, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5;
|
|
1223
|
-
} else T0 = $[2], T1 = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8];
|
|
1224
|
-
let t6;
|
|
1225
|
-
$[9] !== T0 || $[10] !== count || $[11] !== t1 || $[12] !== t2 ? (t6 = /* @__PURE__ */ jsx(T0, {
|
|
1226
|
-
as: t1,
|
|
1227
|
-
size: t2,
|
|
1228
|
-
weight: "medium",
|
|
1229
|
-
children: count
|
|
1230
|
-
}), $[9] = T0, $[10] = count, $[11] = t1, $[12] = t2, $[13] = t6) : t6 = $[13];
|
|
1231
|
-
let t7;
|
|
1232
|
-
return $[14] !== T1 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsx(T1, {
|
|
1233
|
-
$size: t3,
|
|
1234
|
-
"data-ui": t4,
|
|
1235
|
-
ref: t5,
|
|
1236
|
-
children: t6
|
|
1237
|
-
}), $[14] = T1, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
|
|
1238
|
-
}
|
|
1239
|
-
function _temp$1(s) {
|
|
1240
|
-
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1241
|
-
}
|
|
1242
|
-
function responsiveAvatarStackSizeStyle(props) {
|
|
1243
|
-
let { avatar, media } = getTheme_v2(props.theme);
|
|
1244
|
-
return _responsive(media, props.$size, (size) => {
|
|
1245
|
-
let avatarSize = avatar.sizes[size];
|
|
1246
|
-
return avatarSize ? { "& > div + div": { marginLeft: rem(avatarSize.distance) } } : EMPTY_RECORD;
|
|
1247
|
-
});
|
|
1248
|
-
}
|
|
1249
|
-
const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
1250
|
-
displayName: "StyledAvatarStack",
|
|
1251
|
-
componentId: "sc-cw2hpz-0"
|
|
1252
|
-
})(responsiveAvatarStackSizeStyle);
|
|
1253
|
-
/**
|
|
1254
|
-
* @public
|
|
1255
|
-
*/
|
|
1256
|
-
function AvatarStack(props) {
|
|
1257
|
-
let $ = c(45), childrenProp, className, ref, restProps, t0, t1;
|
|
1258
|
-
$[0] === props ? (childrenProp = $[1], className = $[2], ref = $[3], restProps = $[4], t0 = $[5], t1 = $[6]) : ({children: childrenProp, className, maxLength: t0, ref, size: t1, ...restProps} = props, $[0] = props, $[1] = childrenProp, $[2] = className, $[3] = ref, $[4] = restProps, $[5] = t0, $[6] = t1);
|
|
1259
|
-
let maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, T0, t2, t3, t4, t5, t6, t7, t8, t9;
|
|
1260
|
-
if ($[7] !== childrenProp || $[8] !== className || $[9] !== maxLengthProp || $[10] !== ref || $[11] !== restProps || $[12] !== sizeProp) {
|
|
1261
|
-
let children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), t10;
|
|
1262
|
-
$[22] === sizeProp ? t10 = $[23] : (t10 = _getArrayProp(sizeProp), $[22] = sizeProp, $[23] = t10);
|
|
1263
|
-
let size = t10, len = children.length, extraCount = len - (maxLength - 1), visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
1264
|
-
T0 = StyledAvatarStack, $[24] === className ? t2 = $[25] : (t2 = clsx(avatarStack, className), $[24] = className, $[25] = t2), t3 = "AvatarStack", t4 = restProps, t5 = ref, t6 = size, $[26] !== len || $[27] !== size ? (t7 = len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, {
|
|
1265
|
-
count: len,
|
|
1266
|
-
size
|
|
1267
|
-
}) }), $[26] = len, $[27] = size, $[28] = t7) : t7 = $[28], $[29] !== extraCount || $[30] !== len || $[31] !== size ? (t8 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, {
|
|
1268
|
-
count: extraCount,
|
|
1269
|
-
size
|
|
1270
|
-
}) }), $[29] = extraCount, $[30] = len, $[31] = size, $[32] = t8) : t8 = $[32];
|
|
1271
|
-
let t11;
|
|
1272
|
-
$[33] === size ? t11 = $[34] : (t11 = (child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, { size }) }, String(childIndex)), $[33] = size, $[34] = t11), t9 = visibleChildren.map(t11), $[7] = childrenProp, $[8] = className, $[9] = maxLengthProp, $[10] = ref, $[11] = restProps, $[12] = sizeProp, $[13] = T0, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9;
|
|
1273
|
-
} else T0 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], t7 = $[19], t8 = $[20], t9 = $[21];
|
|
1274
|
-
let t10;
|
|
1275
|
-
return $[35] !== T0 || $[36] !== t2 || $[37] !== t3 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 || $[43] !== t9 ? (t10 = /* @__PURE__ */ jsxs(T0, {
|
|
1276
|
-
className: t2,
|
|
1277
|
-
"data-ui": t3,
|
|
1278
|
-
...t4,
|
|
1279
|
-
ref: t5,
|
|
1280
|
-
$size: t6,
|
|
1281
|
-
children: [
|
|
1282
|
-
t7,
|
|
1283
|
-
t8,
|
|
1284
|
-
t9
|
|
1285
|
-
]
|
|
1286
|
-
}), $[35] = T0, $[36] = t2, $[37] = t3, $[38] = t4, $[39] = t5, $[40] = t6, $[41] = t7, $[42] = t8, $[43] = t9, $[44] = t10) : t10 = $[44], t10;
|
|
1287
|
-
}
|
|
1288
|
-
function badgeStyle(props) {
|
|
1289
|
-
let { $tone } = props;
|
|
1290
|
-
return {
|
|
1291
|
-
"--card-bg-color": `var(--card-badge-${$tone}-bg-color)`,
|
|
1292
|
-
"--card-fg-color": `var(--card-badge-${$tone}-fg-color)`,
|
|
1293
|
-
backgroundColor: "var(--card-bg-color)",
|
|
1294
|
-
cursor: "default",
|
|
1295
|
-
"&:not([hidden])": {
|
|
1296
|
-
display: "inline-block",
|
|
1297
|
-
verticalAlign: "top"
|
|
1298
|
-
}
|
|
1299
|
-
};
|
|
1300
|
-
}
|
|
1301
|
-
const StyledBadge = /* @__PURE__ */ styled(Box).withConfig({
|
|
1302
|
-
displayName: "StyledBadge",
|
|
1303
|
-
componentId: "sc-zj5mk0-0"
|
|
1304
|
-
})(responsiveRadiusStyle, badgeStyle), Badge = function Badge(props) {
|
|
1305
|
-
let $ = c(22), children, ref, restProps, t0, t1, t2, t3;
|
|
1306
|
-
$[0] === props ? (children = $[1], ref = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7]) : ({children, fontSize: t0, padding: t1, radius: t2, ref, tone: t3, ...restProps} = props, $[0] = props, $[1] = children, $[2] = ref, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3);
|
|
1307
|
-
let fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3, t4;
|
|
1308
|
-
$[8] === radius ? t4 = $[9] : (t4 = _getArrayProp(radius), $[8] = radius, $[9] = t4);
|
|
1309
|
-
let t5;
|
|
1310
|
-
$[10] === padding ? t5 = $[11] : (t5 = _getArrayProp(padding), $[10] = padding, $[11] = t5);
|
|
1311
|
-
let t6;
|
|
1312
|
-
$[12] !== children || $[13] !== fontSize ? (t6 = /* @__PURE__ */ jsx(Text, {
|
|
1313
|
-
size: fontSize,
|
|
1314
|
-
children
|
|
1315
|
-
}), $[12] = children, $[13] = fontSize, $[14] = t6) : t6 = $[14];
|
|
1316
|
-
let t7;
|
|
1317
|
-
return $[15] !== ref || $[16] !== restProps || $[17] !== t4 || $[18] !== t5 || $[19] !== t6 || $[20] !== tone ? (t7 = /* @__PURE__ */ jsx(StyledBadge, {
|
|
1318
|
-
"data-ui": "Badge",
|
|
1319
|
-
...restProps,
|
|
1320
|
-
$tone: tone,
|
|
1321
|
-
$radius: t4,
|
|
1322
|
-
padding: t5,
|
|
1323
|
-
ref,
|
|
1324
|
-
children: t6
|
|
1325
|
-
}), $[15] = ref, $[16] = restProps, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = tone, $[21] = t7) : t7 = $[21], t7;
|
|
1326
|
-
};
|
|
1327
|
-
function inputElementStyles(props) {
|
|
1328
|
-
let { color, input, radius } = getTheme_v2(props.theme), { focusRing } = input.checkbox;
|
|
1329
|
-
return css`position:absolute;top:0;left:0;width:100%;height:100%;outline:none;opacity:0;z-index:1;padding:0;margin:0;& + span{position:relative;display:block;height:${rem(input.checkbox.size)};width:${rem(input.checkbox.size)};box-sizing:border-box;box-shadow:${focusRingBorderStyle({
|
|
1330
|
-
color: color.input.default.enabled.border,
|
|
1331
|
-
width: input.border.width
|
|
1332
|
-
})};border-radius:${rem(radius[2])};line-height:1;background-color:${color.input.default.enabled.bg};& > svg{display:block;position:absolute;opacity:0;height:100%;width:100%;& > path{vector-effect:non-scaling-stroke;stroke-width:1.5px !important;}}}&:checked + span{background:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
|
|
1333
|
-
color: color.input.default.enabled.fg,
|
|
1334
|
-
width: input.border.width
|
|
1335
|
-
})};color:${color.input.default.enabled.bg};}&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({ focusRing })};}&:not(:disabled):focus:focus-visible&:checked + span{box-shadow:${focusRingStyle({ focusRing: {
|
|
1336
|
-
width: 1,
|
|
1337
|
-
offset: 1
|
|
1338
|
-
} })};}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
|
|
1339
|
-
width: input.border.width,
|
|
1340
|
-
color: color.input.invalid.enabled.muted.bg
|
|
1341
|
-
})};color:${color.input.default.disabled.fg};}&[data-error]&:checked + span{background-color:${color.input.invalid.enabled.muted.bg};color:${color.input.default.enabled.bg};}&[data-error]&:checked&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({
|
|
1342
|
-
border: {
|
|
1343
|
-
width: input.border.width,
|
|
1344
|
-
color: color.input.invalid.readOnly.muted.bg
|
|
1345
|
-
},
|
|
1346
|
-
focusRing: {
|
|
1347
|
-
width: 1,
|
|
1348
|
-
offset: 1
|
|
1349
|
-
}
|
|
1350
|
-
})};}&:disabled + span{background-color:${color.input.default.disabled.bg};box-shadow:${focusRingBorderStyle({
|
|
1351
|
-
width: input.border.width,
|
|
1352
|
-
color: color.input.default.disabled.border
|
|
1353
|
-
})};color:${color.input.default.disabled.fg};}&:disabled&:checked + span{background-color:${color.input.default.disabled.muted.bg};}&[data-read-only] + span{background-color:${color.input.default.readOnly.bg};box-shadow:${focusRingBorderStyle({
|
|
1354
|
-
width: input.border.width,
|
|
1355
|
-
color: color.input.default.readOnly.border
|
|
1356
|
-
})};color:${color.input.default.readOnly.fg};}&[data-read-only]&:checked + span{background-color:${color.input.default.readOnly.muted.bg};}&:checked + span > svg:first-child{opacity:1;}&:indeterminate + span > svg:last-child{opacity:1;}`;
|
|
1357
|
-
}
|
|
1358
|
-
var checkbox = "ycv36y0";
|
|
1359
|
-
const Input$3 = /* @__PURE__ */ styled.input.withConfig({
|
|
1360
|
-
displayName: "Input",
|
|
1361
|
-
componentId: "sc-ng4gkf-0"
|
|
1362
|
-
})(inputElementStyles);
|
|
1363
|
-
/**
|
|
1364
|
-
* Checkboxes allow the user to select one or more items from a set.
|
|
1365
|
-
*
|
|
1366
|
-
* @public
|
|
1367
|
-
*/
|
|
9
|
+
import { CloseIcon } from "@sanity/icons/Close";
|
|
10
|
+
import { createPortal } from "react-dom";
|
|
11
|
+
const PREFIX = "sui", BREAKPOINTS_LENGTH = 6;
|
|
12
|
+
function getProps(componentProps, propDefs) {
|
|
13
|
+
const {
|
|
14
|
+
allComponentProps,
|
|
15
|
+
allPropDefs
|
|
16
|
+
} = flattenCompositeProps(componentProps, propDefs), restProps = {};
|
|
17
|
+
let className = componentProps?.className || "", style = componentProps?.style || {};
|
|
18
|
+
for (const key in allComponentProps) {
|
|
19
|
+
const propDef = allPropDefs?.[key], propValue = allComponentProps[key];
|
|
20
|
+
if (!(propDef && "className" in propDef && propDef.className || propDef?.type === "conditional")) {
|
|
21
|
+
restProps[key] = propValue;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (Array.isArray(propValue))
|
|
25
|
+
for (let i = 0, len = Math.min(propValue.length, BREAKPOINTS_LENGTH); i < len; i++) {
|
|
26
|
+
const resolvedPropDef = getResolvedPropDef(propValue[i], propDef);
|
|
27
|
+
resolvedPropDef && (className = clsx(className, getClassName(propValue[i], resolvedPropDef, i)), style = {
|
|
28
|
+
...style,
|
|
29
|
+
...getStyle(propValue[i], resolvedPropDef, i)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const resolvedPropDef = getResolvedPropDef(propValue, propDef);
|
|
34
|
+
if (!resolvedPropDef) {
|
|
35
|
+
restProps[key] = propValue;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
className = clsx(className, getClassName(propValue, resolvedPropDef)), style = {
|
|
39
|
+
...style,
|
|
40
|
+
...getStyle(propValue, resolvedPropDef)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
...restProps,
|
|
46
|
+
className,
|
|
47
|
+
style
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function getResolvedPropDef(propValue, propDef) {
|
|
51
|
+
if (propDef?.type !== "conditional")
|
|
52
|
+
return propDef;
|
|
53
|
+
const resolvedPropDef = propDef.resolve(propValue);
|
|
54
|
+
return resolvedPropDef && "className" in resolvedPropDef && resolvedPropDef.className ? resolvedPropDef : null;
|
|
55
|
+
}
|
|
56
|
+
function getClassName(propValue, propDef, bp) {
|
|
57
|
+
if (propDef.type === "union" && propDef.values?.includes(propValue))
|
|
58
|
+
return `${PREFIX}-${propDef.className}${typeof propValue == "string" ? `-${propValue}` : propValue}${bp ? `-bp-${bp}` : ""}`;
|
|
59
|
+
if (propDef.type === "string" || propDef.type === "number")
|
|
60
|
+
return `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ""}`;
|
|
61
|
+
if (propDef.type === "boolean") {
|
|
62
|
+
if (propValue)
|
|
63
|
+
return `${PREFIX}-${propDef.className}${bp ? `-bp-${bp}` : ""}`;
|
|
64
|
+
if (!propValue && propDef.inverseClassName)
|
|
65
|
+
return `${PREFIX}-${propDef.inverseClassName}${bp ? `-bp-${bp}` : ""}`;
|
|
66
|
+
}
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
function getStyle(propValue, propDef, bp) {
|
|
70
|
+
return (propDef.type === "string" || propDef.type === "number") && propDef.variable ? {
|
|
71
|
+
[`${propDef.variable}${bp ? `-bp-${bp}` : ""}`]: propValue
|
|
72
|
+
} : {};
|
|
73
|
+
}
|
|
74
|
+
function flattenCompositeProps(componentProps, propDefs) {
|
|
75
|
+
const props = {
|
|
76
|
+
allComponentProps: {},
|
|
77
|
+
allPropDefs: {}
|
|
78
|
+
};
|
|
79
|
+
for (const key in componentProps)
|
|
80
|
+
if (propDefs?.[key] && propDefs?.[key].type === "composite")
|
|
81
|
+
for (const compositeKey in propDefs?.[key].composition) {
|
|
82
|
+
const compositeValue = getCompositeValue(componentProps[key], propDefs[key], compositeKey);
|
|
83
|
+
props.allComponentProps[compositeKey] = compositeValue, props.allPropDefs[compositeKey] = propDefs[key].composition[compositeKey]?.propDef;
|
|
84
|
+
}
|
|
85
|
+
else
|
|
86
|
+
props.allComponentProps[key] = componentProps[key], props.allPropDefs[key] = propDefs?.[key];
|
|
87
|
+
return props;
|
|
88
|
+
}
|
|
89
|
+
function getCompositeValue(propValue, propDef, key) {
|
|
90
|
+
if (!("composition" in propDef))
|
|
91
|
+
return;
|
|
92
|
+
const mapping = propDef.composition[key]?.mapping;
|
|
93
|
+
let compositeValue;
|
|
94
|
+
if (Array.isArray(propValue)) {
|
|
95
|
+
compositeValue = [];
|
|
96
|
+
for (let i = 0, len = propValue.length; i < len; i++)
|
|
97
|
+
compositeValue[i] = mapping?.[propValue[i]];
|
|
98
|
+
} else
|
|
99
|
+
compositeValue = mapping?.[propValue];
|
|
100
|
+
return compositeValue;
|
|
101
|
+
}
|
|
102
|
+
const HASH = "ad9fa1";
|
|
103
|
+
function suffixClassName(className) {
|
|
104
|
+
return `${className}-${HASH}`;
|
|
105
|
+
}
|
|
106
|
+
const RADIUS = [0, 1, 2, 3, 4, 5, 6, "full"], borderProps = {
|
|
107
|
+
border: {
|
|
108
|
+
type: "boolean",
|
|
109
|
+
className: "border",
|
|
110
|
+
inverseClassName: "border-none"
|
|
111
|
+
},
|
|
112
|
+
borderTop: {
|
|
113
|
+
type: "boolean",
|
|
114
|
+
className: "border-top",
|
|
115
|
+
inverseClassName: "border-top-none"
|
|
116
|
+
},
|
|
117
|
+
borderRight: {
|
|
118
|
+
type: "boolean",
|
|
119
|
+
className: "border-right",
|
|
120
|
+
inverseClassName: "border-right-none"
|
|
121
|
+
},
|
|
122
|
+
borderBottom: {
|
|
123
|
+
type: "boolean",
|
|
124
|
+
className: "border-bottom",
|
|
125
|
+
inverseClassName: "border-bottom-none"
|
|
126
|
+
},
|
|
127
|
+
borderLeft: {
|
|
128
|
+
type: "boolean",
|
|
129
|
+
className: "border-left",
|
|
130
|
+
inverseClassName: "border-left-none"
|
|
131
|
+
},
|
|
132
|
+
radius: {
|
|
133
|
+
type: "union",
|
|
134
|
+
className: "radius",
|
|
135
|
+
values: RADIUS
|
|
136
|
+
}
|
|
137
|
+
}, flexChildProps = {
|
|
138
|
+
flexBasis: {
|
|
139
|
+
type: "string",
|
|
140
|
+
className: "flex-basis",
|
|
141
|
+
variable: "--flex-basis"
|
|
142
|
+
},
|
|
143
|
+
flexGrow: {
|
|
144
|
+
type: "number",
|
|
145
|
+
className: "flex-grow",
|
|
146
|
+
variable: "--flex-grow"
|
|
147
|
+
},
|
|
148
|
+
flexShrink: {
|
|
149
|
+
type: "number",
|
|
150
|
+
className: "flex-shrink",
|
|
151
|
+
variable: "--flex-shrink"
|
|
152
|
+
}
|
|
153
|
+
}, gridChildProps = {
|
|
154
|
+
gridColumn: {
|
|
155
|
+
type: "string",
|
|
156
|
+
className: "grid-column",
|
|
157
|
+
variable: "--grid-column"
|
|
158
|
+
},
|
|
159
|
+
gridColumnStart: {
|
|
160
|
+
type: "string",
|
|
161
|
+
className: "grid-column-start",
|
|
162
|
+
variable: "--grid-column-start"
|
|
163
|
+
},
|
|
164
|
+
gridColumnEnd: {
|
|
165
|
+
type: "string",
|
|
166
|
+
className: "grid-column-end",
|
|
167
|
+
variable: "--grid-column-end"
|
|
168
|
+
},
|
|
169
|
+
gridRow: {
|
|
170
|
+
type: "string",
|
|
171
|
+
className: "grid-row",
|
|
172
|
+
variable: "--grid-row"
|
|
173
|
+
},
|
|
174
|
+
gridRowStart: {
|
|
175
|
+
type: "string",
|
|
176
|
+
className: "grid-row-start",
|
|
177
|
+
variable: "--grid-row-start"
|
|
178
|
+
},
|
|
179
|
+
gridRowEnd: {
|
|
180
|
+
type: "string",
|
|
181
|
+
className: "grid-row-end",
|
|
182
|
+
variable: "--grid-row-end"
|
|
183
|
+
}
|
|
184
|
+
}, heightProps = {
|
|
185
|
+
height: {
|
|
186
|
+
type: "string",
|
|
187
|
+
className: "height",
|
|
188
|
+
variable: "--height"
|
|
189
|
+
},
|
|
190
|
+
minHeight: {
|
|
191
|
+
type: "string",
|
|
192
|
+
className: "min-height",
|
|
193
|
+
variable: "--min-height"
|
|
194
|
+
},
|
|
195
|
+
maxHeight: {
|
|
196
|
+
type: "string",
|
|
197
|
+
className: "max-height",
|
|
198
|
+
variable: "--max-height"
|
|
199
|
+
}
|
|
200
|
+
}, SPACE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], SPACE_AUTO = [...SPACE, "auto"], SPACE_INHERIT = [...SPACE, "inherit"], SPACE_AUTO_NEGATIVE = [-9, -8, -7, -6, -5, -4, -3, -2, -1, ...SPACE, "auto"], marginProps = {
|
|
201
|
+
margin: {
|
|
202
|
+
type: "union",
|
|
203
|
+
className: "m",
|
|
204
|
+
values: SPACE_AUTO_NEGATIVE
|
|
205
|
+
},
|
|
206
|
+
marginX: {
|
|
207
|
+
type: "union",
|
|
208
|
+
className: "mx",
|
|
209
|
+
values: SPACE_AUTO_NEGATIVE
|
|
210
|
+
},
|
|
211
|
+
marginY: {
|
|
212
|
+
type: "union",
|
|
213
|
+
className: "my",
|
|
214
|
+
values: SPACE_AUTO_NEGATIVE
|
|
215
|
+
},
|
|
216
|
+
marginTop: {
|
|
217
|
+
type: "union",
|
|
218
|
+
className: "mt",
|
|
219
|
+
values: SPACE_AUTO_NEGATIVE
|
|
220
|
+
},
|
|
221
|
+
marginRight: {
|
|
222
|
+
type: "union",
|
|
223
|
+
className: "mr",
|
|
224
|
+
values: SPACE_AUTO_NEGATIVE
|
|
225
|
+
},
|
|
226
|
+
marginBottom: {
|
|
227
|
+
type: "union",
|
|
228
|
+
className: "mb",
|
|
229
|
+
values: SPACE_AUTO_NEGATIVE
|
|
230
|
+
},
|
|
231
|
+
marginLeft: {
|
|
232
|
+
type: "union",
|
|
233
|
+
className: "ml",
|
|
234
|
+
values: SPACE_AUTO_NEGATIVE
|
|
235
|
+
}
|
|
236
|
+
}, OVERFLOW = ["visible", "hidden", "auto", "scroll", "clip"], overflowProps = {
|
|
237
|
+
overflow: {
|
|
238
|
+
type: "union",
|
|
239
|
+
className: "overflow",
|
|
240
|
+
values: OVERFLOW
|
|
241
|
+
},
|
|
242
|
+
overflowX: {
|
|
243
|
+
type: "union",
|
|
244
|
+
className: "overflow-x",
|
|
245
|
+
values: OVERFLOW
|
|
246
|
+
},
|
|
247
|
+
overflowY: {
|
|
248
|
+
type: "union",
|
|
249
|
+
className: "overflow-y",
|
|
250
|
+
values: OVERFLOW
|
|
251
|
+
}
|
|
252
|
+
}, paddingProps = {
|
|
253
|
+
padding: {
|
|
254
|
+
type: "union",
|
|
255
|
+
className: "p",
|
|
256
|
+
values: SPACE
|
|
257
|
+
},
|
|
258
|
+
paddingX: {
|
|
259
|
+
type: "union",
|
|
260
|
+
className: "px",
|
|
261
|
+
values: SPACE
|
|
262
|
+
},
|
|
263
|
+
paddingY: {
|
|
264
|
+
type: "union",
|
|
265
|
+
className: "py",
|
|
266
|
+
values: SPACE
|
|
267
|
+
},
|
|
268
|
+
paddingTop: {
|
|
269
|
+
type: "union",
|
|
270
|
+
className: "pt",
|
|
271
|
+
values: SPACE
|
|
272
|
+
},
|
|
273
|
+
paddingRight: {
|
|
274
|
+
type: "union",
|
|
275
|
+
className: "pr",
|
|
276
|
+
values: SPACE
|
|
277
|
+
},
|
|
278
|
+
paddingBottom: {
|
|
279
|
+
type: "union",
|
|
280
|
+
className: "pb",
|
|
281
|
+
values: SPACE
|
|
282
|
+
},
|
|
283
|
+
paddingLeft: {
|
|
284
|
+
type: "union",
|
|
285
|
+
className: "pl",
|
|
286
|
+
values: SPACE
|
|
287
|
+
}
|
|
288
|
+
}, POSITION = ["absolute", "fixed", "relative", "static", "sticky"], positionProps = {
|
|
289
|
+
position: {
|
|
290
|
+
type: "union",
|
|
291
|
+
className: "position",
|
|
292
|
+
values: POSITION
|
|
293
|
+
},
|
|
294
|
+
inset: {
|
|
295
|
+
type: "union",
|
|
296
|
+
className: "inset",
|
|
297
|
+
values: SPACE_AUTO
|
|
298
|
+
},
|
|
299
|
+
top: {
|
|
300
|
+
type: "union",
|
|
301
|
+
className: "top",
|
|
302
|
+
values: SPACE_AUTO
|
|
303
|
+
},
|
|
304
|
+
right: {
|
|
305
|
+
type: "union",
|
|
306
|
+
className: "right",
|
|
307
|
+
values: SPACE_AUTO
|
|
308
|
+
},
|
|
309
|
+
bottom: {
|
|
310
|
+
type: "union",
|
|
311
|
+
className: "bottom",
|
|
312
|
+
values: SPACE_AUTO
|
|
313
|
+
},
|
|
314
|
+
left: {
|
|
315
|
+
type: "union",
|
|
316
|
+
className: "left",
|
|
317
|
+
values: SPACE_AUTO
|
|
318
|
+
}
|
|
319
|
+
}, SHADOW = [0, 1, 2, 3, 4, 5], shadowProps = {
|
|
320
|
+
shadow: {
|
|
321
|
+
type: "union",
|
|
322
|
+
className: "shadow",
|
|
323
|
+
values: SHADOW
|
|
324
|
+
}
|
|
325
|
+
}, TONE = ["neutral", "positive", "suggest", "caution", "critical"], toneProps = {
|
|
326
|
+
tone: {
|
|
327
|
+
type: "union",
|
|
328
|
+
className: "tone",
|
|
329
|
+
values: TONE
|
|
330
|
+
}
|
|
331
|
+
}, widthProps = {
|
|
332
|
+
width: {
|
|
333
|
+
type: "string",
|
|
334
|
+
className: "width",
|
|
335
|
+
variable: "--width"
|
|
336
|
+
},
|
|
337
|
+
minWidth: {
|
|
338
|
+
type: "string",
|
|
339
|
+
className: "min-width",
|
|
340
|
+
variable: "--min-width"
|
|
341
|
+
},
|
|
342
|
+
maxWidth: {
|
|
343
|
+
type: "string",
|
|
344
|
+
className: "max-width",
|
|
345
|
+
variable: "--max-width"
|
|
346
|
+
}
|
|
347
|
+
}, zIndexProps = {
|
|
348
|
+
zIndex: {
|
|
349
|
+
type: "number",
|
|
350
|
+
className: "z-index",
|
|
351
|
+
variable: "--z-index"
|
|
352
|
+
}
|
|
353
|
+
}, layoutProps = {
|
|
354
|
+
...toneProps,
|
|
355
|
+
...widthProps,
|
|
356
|
+
...heightProps,
|
|
357
|
+
...marginProps,
|
|
358
|
+
...borderProps,
|
|
359
|
+
...paddingProps,
|
|
360
|
+
...positionProps,
|
|
361
|
+
...overflowProps,
|
|
362
|
+
...flexChildProps,
|
|
363
|
+
...gridChildProps,
|
|
364
|
+
...shadowProps,
|
|
365
|
+
...zIndexProps
|
|
366
|
+
}, DISPLAY_BLOCK = ["block", "inline-block", "none"], DISPLAY_FLEX = ["flex", "inline-flex", "none"], DISPLAY_GRID = ["grid", "inline-grid", "none"], boxProps = {
|
|
367
|
+
as: {
|
|
368
|
+
type: "string"
|
|
369
|
+
},
|
|
370
|
+
display: {
|
|
371
|
+
type: "union",
|
|
372
|
+
className: "display",
|
|
373
|
+
values: DISPLAY_BLOCK
|
|
374
|
+
},
|
|
375
|
+
...layoutProps
|
|
376
|
+
}, boxClassName = suffixClassName("sui-Box");
|
|
377
|
+
function Box(t0) {
|
|
378
|
+
const $ = c(12);
|
|
379
|
+
let T0, children, rest, style, t1;
|
|
380
|
+
if ($[0] !== t0) {
|
|
381
|
+
const {
|
|
382
|
+
display: t22,
|
|
383
|
+
minHeight: t3,
|
|
384
|
+
minWidth: t4,
|
|
385
|
+
...props
|
|
386
|
+
} = t0, display = t22 === void 0 ? "block" : t22, minHeight = t3 === void 0 ? "0" : t3, minWidth = t4 === void 0 ? "0" : t4, {
|
|
387
|
+
as,
|
|
388
|
+
children: t5,
|
|
389
|
+
className,
|
|
390
|
+
style: t6,
|
|
391
|
+
...t7
|
|
392
|
+
} = getProps({
|
|
393
|
+
display,
|
|
394
|
+
minHeight,
|
|
395
|
+
minWidth,
|
|
396
|
+
...props
|
|
397
|
+
}, boxProps);
|
|
398
|
+
children = t5, style = t6, rest = t7, T0 = as || "div", t1 = clsx(boxClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
399
|
+
} else
|
|
400
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
401
|
+
let t2;
|
|
402
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Box", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
403
|
+
}
|
|
404
|
+
const ALIGN_ITEMS = ["baseline", "center", "flex-end", "flex-start", "stretch"], JUSTIFY_CONTENT = ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"], FLEX_DIRECTION = ["row", "row-reverse", "column", "column-reverse"], FLEX_WRAP = ["wrap", "wrap-reverse", "nowrap"], flexParentProps = {
|
|
405
|
+
alignItems: {
|
|
406
|
+
type: "union",
|
|
407
|
+
className: "align-items",
|
|
408
|
+
values: ALIGN_ITEMS
|
|
409
|
+
},
|
|
410
|
+
justifyContent: {
|
|
411
|
+
type: "union",
|
|
412
|
+
className: "justify-content",
|
|
413
|
+
values: JUSTIFY_CONTENT
|
|
414
|
+
},
|
|
415
|
+
flexDirection: {
|
|
416
|
+
type: "union",
|
|
417
|
+
className: "flex-direction",
|
|
418
|
+
values: FLEX_DIRECTION
|
|
419
|
+
},
|
|
420
|
+
flexWrap: {
|
|
421
|
+
type: "union",
|
|
422
|
+
className: "flex",
|
|
423
|
+
values: FLEX_WRAP
|
|
424
|
+
}
|
|
425
|
+
}, gapProps = {
|
|
426
|
+
gap: {
|
|
427
|
+
type: "union",
|
|
428
|
+
className: "gap",
|
|
429
|
+
values: SPACE_INHERIT
|
|
430
|
+
},
|
|
431
|
+
rowGap: {
|
|
432
|
+
type: "union",
|
|
433
|
+
className: "row-gap",
|
|
434
|
+
values: SPACE_INHERIT
|
|
435
|
+
},
|
|
436
|
+
columnGap: {
|
|
437
|
+
type: "union",
|
|
438
|
+
className: "column-gap",
|
|
439
|
+
values: SPACE_INHERIT
|
|
440
|
+
}
|
|
441
|
+
}, flexProps = {
|
|
442
|
+
as: {
|
|
443
|
+
type: "string"
|
|
444
|
+
},
|
|
445
|
+
display: {
|
|
446
|
+
type: "union",
|
|
447
|
+
className: "display",
|
|
448
|
+
values: DISPLAY_FLEX
|
|
449
|
+
},
|
|
450
|
+
...flexParentProps,
|
|
451
|
+
...gapProps,
|
|
452
|
+
...layoutProps
|
|
453
|
+
}, flexClassName = suffixClassName("sui-Flex");
|
|
454
|
+
function Flex(t0) {
|
|
455
|
+
const $ = c(12);
|
|
456
|
+
let T0, children, rest, style, t1;
|
|
457
|
+
if ($[0] !== t0) {
|
|
458
|
+
const {
|
|
459
|
+
display: t22,
|
|
460
|
+
minHeight: t3,
|
|
461
|
+
minWidth: t4,
|
|
462
|
+
...props
|
|
463
|
+
} = t0, display = t22 === void 0 ? "flex" : t22, minHeight = t3 === void 0 ? "0" : t3, minWidth = t4 === void 0 ? "0" : t4, {
|
|
464
|
+
as,
|
|
465
|
+
children: t5,
|
|
466
|
+
className,
|
|
467
|
+
style: t6,
|
|
468
|
+
...t7
|
|
469
|
+
} = getProps({
|
|
470
|
+
display,
|
|
471
|
+
minHeight,
|
|
472
|
+
minWidth,
|
|
473
|
+
...props
|
|
474
|
+
}, flexProps);
|
|
475
|
+
children = t5, style = t6, rest = t7, T0 = as || "div", t1 = clsx(flexClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
476
|
+
} else
|
|
477
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
478
|
+
let t2;
|
|
479
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Flex", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
480
|
+
}
|
|
481
|
+
const FONT_WEIGHT = ["regular", "medium", "semibold", "bold"], TEXT_ALIGN = ["left", "center", "right", "justify"], typographyProps = {
|
|
482
|
+
align: {
|
|
483
|
+
type: "union",
|
|
484
|
+
className: "text",
|
|
485
|
+
values: TEXT_ALIGN
|
|
486
|
+
},
|
|
487
|
+
muted: {
|
|
488
|
+
type: "boolean",
|
|
489
|
+
className: "text-muted",
|
|
490
|
+
inverseClassName: "text-default"
|
|
491
|
+
},
|
|
492
|
+
trim: {
|
|
493
|
+
type: "boolean",
|
|
494
|
+
className: "text-trim",
|
|
495
|
+
inverseClassName: "text-trim-none"
|
|
496
|
+
},
|
|
497
|
+
truncate: {
|
|
498
|
+
type: "conditional",
|
|
499
|
+
resolve: (value) => value === 1 ? {
|
|
500
|
+
type: "number",
|
|
501
|
+
className: "text-overflow"
|
|
502
|
+
} : {
|
|
503
|
+
type: "number",
|
|
504
|
+
className: "line-clamp",
|
|
505
|
+
variable: "--line-clamp"
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
weight: {
|
|
509
|
+
type: "union",
|
|
510
|
+
className: "weight",
|
|
511
|
+
values: FONT_WEIGHT
|
|
512
|
+
},
|
|
513
|
+
...marginProps,
|
|
514
|
+
...toneProps
|
|
515
|
+
}, ICON_SIZE = [0, 1, 2, 3, 4], iconProps = {
|
|
516
|
+
icon: {
|
|
517
|
+
type: "string"
|
|
518
|
+
},
|
|
519
|
+
size: {
|
|
520
|
+
type: "union",
|
|
521
|
+
className: "icon-body",
|
|
522
|
+
values: ICON_SIZE
|
|
523
|
+
},
|
|
524
|
+
muted: typographyProps.muted,
|
|
525
|
+
...toneProps,
|
|
526
|
+
...marginProps
|
|
527
|
+
}, iconClassName = suffixClassName("sui-Icon");
|
|
528
|
+
function Icon(t0) {
|
|
529
|
+
const $ = c(12);
|
|
530
|
+
let T0, props, rest, style, t1;
|
|
531
|
+
if ($[0] !== t0) {
|
|
532
|
+
const {
|
|
533
|
+
size: t22,
|
|
534
|
+
...t32
|
|
535
|
+
} = t0;
|
|
536
|
+
props = t32;
|
|
537
|
+
const size = t22 === void 0 ? 2 : t22, {
|
|
538
|
+
className,
|
|
539
|
+
style: t4,
|
|
540
|
+
icon: Component,
|
|
541
|
+
...t5
|
|
542
|
+
} = getProps({
|
|
543
|
+
size,
|
|
544
|
+
...props
|
|
545
|
+
}, iconProps);
|
|
546
|
+
style = t4, rest = t5, T0 = Component, t1 = clsx(iconClassName, className), $[0] = t0, $[1] = T0, $[2] = props, $[3] = rest, $[4] = style, $[5] = t1;
|
|
547
|
+
} else
|
|
548
|
+
T0 = $[1], props = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
549
|
+
const t2 = props["aria-label"] ? void 0 : !0;
|
|
550
|
+
let t3;
|
|
551
|
+
return $[6] !== T0 || $[7] !== rest || $[8] !== style || $[9] !== t1 || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, "data-ui": "Icon", style, "aria-hidden": t2, ...rest }), $[6] = T0, $[7] = rest, $[8] = style, $[9] = t1, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
552
|
+
}
|
|
553
|
+
const spinnerProps = {
|
|
554
|
+
size: {
|
|
555
|
+
type: "union",
|
|
556
|
+
className: "icon-body",
|
|
557
|
+
values: ICON_SIZE
|
|
558
|
+
}
|
|
559
|
+
}, spinnerClassName = suffixClassName("sui-Spinner");
|
|
560
|
+
function Spinner(t0) {
|
|
561
|
+
const $ = c(12);
|
|
562
|
+
let T0, rest, style, t1, t2;
|
|
563
|
+
if ($[0] !== t0) {
|
|
564
|
+
const {
|
|
565
|
+
size: t32,
|
|
566
|
+
...props
|
|
567
|
+
} = t0, size = t32 === void 0 ? 2 : t32, {
|
|
568
|
+
className,
|
|
569
|
+
style: t4,
|
|
570
|
+
...t5
|
|
571
|
+
} = getProps({
|
|
572
|
+
size,
|
|
573
|
+
...props
|
|
574
|
+
}, spinnerProps);
|
|
575
|
+
style = t4, rest = t5, T0 = Icon, t1 = SpinnerIcon, t2 = clsx(spinnerClassName, className), $[0] = t0, $[1] = T0, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2;
|
|
576
|
+
} else
|
|
577
|
+
T0 = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5];
|
|
578
|
+
let t3;
|
|
579
|
+
return $[6] !== T0 || $[7] !== rest || $[8] !== style || $[9] !== t1 || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { icon: t1, className: t2, style, "data-ui": "Spinner", role: "status", "aria-label": "Loading...", ...rest }), $[6] = T0, $[7] = rest, $[8] = style, $[9] = t1, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
580
|
+
}
|
|
581
|
+
const TEXT_SIZE = [0, 1, 2, 3, 4], textProps = {
|
|
582
|
+
as: {
|
|
583
|
+
type: "string"
|
|
584
|
+
},
|
|
585
|
+
size: {
|
|
586
|
+
type: "union",
|
|
587
|
+
className: "text-body",
|
|
588
|
+
values: TEXT_SIZE
|
|
589
|
+
},
|
|
590
|
+
...typographyProps
|
|
591
|
+
}, textClassName = suffixClassName("sui-Text");
|
|
592
|
+
function Text(t0) {
|
|
593
|
+
const $ = c(15);
|
|
594
|
+
let T0, children, rest, style, t1, t2;
|
|
595
|
+
if ($[0] !== t0) {
|
|
596
|
+
t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
597
|
+
bb0: {
|
|
598
|
+
const {
|
|
599
|
+
size: t32,
|
|
600
|
+
...props
|
|
601
|
+
} = t0, size = t32 === void 0 ? 2 : t32, {
|
|
602
|
+
as,
|
|
603
|
+
children: t4,
|
|
604
|
+
className,
|
|
605
|
+
style: t5,
|
|
606
|
+
...t6
|
|
607
|
+
} = getProps({
|
|
608
|
+
size,
|
|
609
|
+
...props
|
|
610
|
+
}, textProps);
|
|
611
|
+
children = t4, style = t5, rest = t6;
|
|
612
|
+
const Component = as || "span";
|
|
613
|
+
if (props.truncate && props.trim) {
|
|
614
|
+
const t7 = clsx(textClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t8 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
|
|
615
|
+
let t9;
|
|
616
|
+
$[7] !== t8 ? (t9 = clsx("sui-overflow-hidden", t8), $[7] = t8, $[8] = t9) : t9 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t7, style, "data-ui": "Text", ...rest, children: /* @__PURE__ */ jsx("span", { className: t9, children }) });
|
|
617
|
+
break bb0;
|
|
618
|
+
}
|
|
619
|
+
T0 = Component, t1 = clsx(textClassName, props.truncate && "sui-overflow-hidden", className);
|
|
620
|
+
}
|
|
621
|
+
$[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
|
|
622
|
+
} else
|
|
623
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
|
|
624
|
+
if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
625
|
+
return t2;
|
|
626
|
+
let t3;
|
|
627
|
+
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Text", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
|
|
628
|
+
}
|
|
629
|
+
const BUTTON_DENSITY = ["regular", "loose"], BUTTON_LEVEL = ["primary", "secondary", "tertiary"], BUTTON_TONE = ["neutral", "critical"], buttonProps = {
|
|
630
|
+
as: {
|
|
631
|
+
type: "string"
|
|
632
|
+
},
|
|
633
|
+
density: {
|
|
634
|
+
type: "composite",
|
|
635
|
+
values: BUTTON_DENSITY,
|
|
636
|
+
composition: {
|
|
637
|
+
gap: {
|
|
638
|
+
propDef: gapProps.gap,
|
|
639
|
+
mapping: {
|
|
640
|
+
regular: 2,
|
|
641
|
+
loose: 3
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
padding: {
|
|
645
|
+
propDef: paddingProps.padding,
|
|
646
|
+
mapping: {
|
|
647
|
+
regular: 2,
|
|
648
|
+
loose: 3
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
minHeight: {
|
|
652
|
+
propDef: heightProps.minHeight,
|
|
653
|
+
mapping: {
|
|
654
|
+
regular: "25px",
|
|
655
|
+
loose: "33px"
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
minWidth: {
|
|
659
|
+
propDef: widthProps.minWidth,
|
|
660
|
+
mapping: {
|
|
661
|
+
regular: "25px",
|
|
662
|
+
loose: "33px"
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
fullWidth: {
|
|
668
|
+
type: "boolean",
|
|
669
|
+
className: "width-full",
|
|
670
|
+
inverseClassName: "width-auto"
|
|
671
|
+
},
|
|
672
|
+
iconStart: {
|
|
673
|
+
type: "string"
|
|
674
|
+
},
|
|
675
|
+
iconEnd: {
|
|
676
|
+
type: "string"
|
|
677
|
+
},
|
|
678
|
+
level: {
|
|
679
|
+
type: "union",
|
|
680
|
+
className: "button-level",
|
|
681
|
+
values: BUTTON_LEVEL
|
|
682
|
+
},
|
|
683
|
+
loading: {
|
|
684
|
+
type: "boolean"
|
|
685
|
+
},
|
|
686
|
+
text: {
|
|
687
|
+
type: "string"
|
|
688
|
+
},
|
|
689
|
+
tone: {
|
|
690
|
+
type: "union",
|
|
691
|
+
className: "tone",
|
|
692
|
+
values: BUTTON_TONE
|
|
693
|
+
}
|
|
694
|
+
}, buttonClassName = suffixClassName("sui-Button");
|
|
695
|
+
function Button(t0) {
|
|
696
|
+
const $ = c(26);
|
|
697
|
+
let T0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9;
|
|
698
|
+
if ($[0] !== t0) {
|
|
699
|
+
const {
|
|
700
|
+
density: t122,
|
|
701
|
+
level: t13,
|
|
702
|
+
tone: t14,
|
|
703
|
+
...props
|
|
704
|
+
} = t0, density = t122 === void 0 ? "regular" : t122, level = t13 === void 0 ? "primary" : t13, tone = t14 === void 0 ? "neutral" : t14, {
|
|
705
|
+
as,
|
|
706
|
+
children,
|
|
707
|
+
className,
|
|
708
|
+
disabled,
|
|
709
|
+
style,
|
|
710
|
+
iconStart: IconStart,
|
|
711
|
+
iconEnd: IconEnd,
|
|
712
|
+
loading,
|
|
713
|
+
text,
|
|
714
|
+
...rest
|
|
715
|
+
} = getProps({
|
|
716
|
+
density,
|
|
717
|
+
level,
|
|
718
|
+
tone,
|
|
719
|
+
...props
|
|
720
|
+
}, buttonProps);
|
|
721
|
+
T0 = as || "button", t1 = clsx(buttonClassName, "sui-display-inline-flex sui-align-items-center sui-justify-content-center sui-radius2 sui-position-relative sui-overflow-hidden", className), t2 = style, t3 = "Button", t4 = disabled || loading, t5 = loading ? !0 : void 0, t6 = rest, t7 = loading && /* @__PURE__ */ jsx(Flex, { position: "absolute", inset: 0, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx(Spinner, {}) }), t8 = IconStart && (isValidElement(IconStart) ? IconStart : /* @__PURE__ */ jsx(Icon, { icon: IconStart, marginX: -1, marginY: -2, size: 1 })), t9 = text && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", trim: !0, children: text }), t10 = children, t11 = IconEnd && (isValidElement(IconEnd) ? IconEnd : /* @__PURE__ */ jsx(Icon, { icon: IconEnd, marginX: -1, marginY: -2, size: 1 })), $[0] = t0, $[1] = T0, $[2] = t1, $[3] = t10, $[4] = t11, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5, $[9] = t6, $[10] = t7, $[11] = t8, $[12] = t9;
|
|
722
|
+
} else
|
|
723
|
+
T0 = $[1], t1 = $[2], t10 = $[3], t11 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8], t6 = $[9], t7 = $[10], t8 = $[11], t9 = $[12];
|
|
724
|
+
let t12;
|
|
725
|
+
return $[13] !== T0 || $[14] !== t1 || $[15] !== t10 || $[16] !== t11 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5 || $[21] !== t6 || $[22] !== t7 || $[23] !== t8 || $[24] !== t9 ? (t12 = /* @__PURE__ */ jsxs(T0, { className: t1, style: t2, "data-ui": t3, disabled: t4, "aria-busy": t5, ...t6, children: [
|
|
726
|
+
t7,
|
|
727
|
+
t8,
|
|
728
|
+
t9,
|
|
729
|
+
t10,
|
|
730
|
+
t11
|
|
731
|
+
] }), $[13] = T0, $[14] = t1, $[15] = t10, $[16] = t11, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = t8, $[24] = t9, $[25] = t12) : t12 = $[25], t12;
|
|
732
|
+
}
|
|
733
|
+
const DENSITY = ["compact", "regular", "loose"], cardProps = {
|
|
734
|
+
as: {
|
|
735
|
+
type: "string"
|
|
736
|
+
},
|
|
737
|
+
density: {
|
|
738
|
+
type: "composite",
|
|
739
|
+
values: DENSITY,
|
|
740
|
+
composition: {
|
|
741
|
+
gap: {
|
|
742
|
+
propDef: gapProps.gap,
|
|
743
|
+
mapping: {
|
|
744
|
+
compact: 2,
|
|
745
|
+
regular: 3,
|
|
746
|
+
loose: 4
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
padding: {
|
|
750
|
+
propDef: paddingProps.padding,
|
|
751
|
+
mapping: {
|
|
752
|
+
compact: 3,
|
|
753
|
+
regular: 4,
|
|
754
|
+
loose: 5
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
radius: {
|
|
758
|
+
propDef: borderProps.radius,
|
|
759
|
+
mapping: {
|
|
760
|
+
compact: 2,
|
|
761
|
+
regular: 3,
|
|
762
|
+
loose: 4
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
...toneProps,
|
|
768
|
+
...marginProps
|
|
769
|
+
}, cardClassName = suffixClassName("sui-Card");
|
|
770
|
+
function Card(t0) {
|
|
771
|
+
const $ = c(12);
|
|
772
|
+
let T0, children, rest, style, t1;
|
|
773
|
+
if ($[0] !== t0) {
|
|
774
|
+
const {
|
|
775
|
+
density: t22,
|
|
776
|
+
tone: t3,
|
|
777
|
+
...props
|
|
778
|
+
} = t0, density = t22 === void 0 ? "regular" : t22, tone = t3 === void 0 ? "neutral" : t3, {
|
|
779
|
+
as,
|
|
780
|
+
children: t4,
|
|
781
|
+
className,
|
|
782
|
+
style: t5,
|
|
783
|
+
...t6
|
|
784
|
+
} = getProps({
|
|
785
|
+
density,
|
|
786
|
+
tone,
|
|
787
|
+
...props
|
|
788
|
+
}, cardProps);
|
|
789
|
+
children = t4, style = t5, rest = t6, T0 = as || "div", t1 = clsx(cardClassName, "sui-border", className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
790
|
+
} else
|
|
791
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
792
|
+
let t2;
|
|
793
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Card", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
794
|
+
}
|
|
795
|
+
const labelProps = {
|
|
796
|
+
disabled: {
|
|
797
|
+
type: "boolean"
|
|
798
|
+
},
|
|
799
|
+
error: {
|
|
800
|
+
type: "boolean"
|
|
801
|
+
},
|
|
802
|
+
...marginProps
|
|
803
|
+
}, labelClassName = suffixClassName("sui-Label");
|
|
804
|
+
function Label(props) {
|
|
805
|
+
const $ = c(18);
|
|
806
|
+
let T0, children, rest, style, t0, t1, t2, t3;
|
|
807
|
+
if ($[0] !== props) {
|
|
808
|
+
const {
|
|
809
|
+
children: t42,
|
|
810
|
+
className,
|
|
811
|
+
style: t5,
|
|
812
|
+
disabled,
|
|
813
|
+
error,
|
|
814
|
+
...t6
|
|
815
|
+
} = getProps(props, labelProps);
|
|
816
|
+
children = t42, style = t5, rest = t6, T0 = Text, t0 = "label", t1 = 1, t2 = disabled, t3 = clsx(labelClassName, "sui-display-flex sui-align-items-center sui-gap2", error && "sui-error", className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1, $[7] = t2, $[8] = t3;
|
|
817
|
+
} else
|
|
818
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6], t2 = $[7], t3 = $[8];
|
|
819
|
+
let t4;
|
|
820
|
+
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t0 || $[14] !== t1 || $[15] !== t2 || $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, { as: t0, size: t1, muted: t2, className: t3, style, "data-ui": "Label", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4) : t4 = $[17], t4;
|
|
821
|
+
}
|
|
822
|
+
const visuallyHiddenProps = {
|
|
823
|
+
as: {
|
|
824
|
+
type: "string"
|
|
825
|
+
},
|
|
826
|
+
visibleOnFocus: {
|
|
827
|
+
type: "boolean",
|
|
828
|
+
className: "sui-visually-hidden-visible"
|
|
829
|
+
}
|
|
830
|
+
}, visuallyHiddenClassName = suffixClassName("sui-VisuallyHidden");
|
|
831
|
+
function VisuallyHidden(props) {
|
|
832
|
+
const $ = c(12);
|
|
833
|
+
let T0, children, rest, style, t0;
|
|
834
|
+
if ($[0] !== props) {
|
|
835
|
+
const {
|
|
836
|
+
as,
|
|
837
|
+
children: t12,
|
|
838
|
+
className,
|
|
839
|
+
style: t2,
|
|
840
|
+
...t3
|
|
841
|
+
} = getProps(props, visuallyHiddenProps);
|
|
842
|
+
children = t12, style = t2, rest = t3, T0 = as || "span", t0 = clsx(visuallyHiddenClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
|
|
843
|
+
} else
|
|
844
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
|
|
845
|
+
let t1;
|
|
846
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, { className: t0, style, "data-ui": "VisuallyHidden", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t0, $[11] = t1) : t1 = $[11], t1;
|
|
847
|
+
}
|
|
848
|
+
const checkboxProps = {
|
|
849
|
+
error: {
|
|
850
|
+
type: "boolean"
|
|
851
|
+
},
|
|
852
|
+
indeterminate: {
|
|
853
|
+
type: "boolean"
|
|
854
|
+
},
|
|
855
|
+
label: {
|
|
856
|
+
type: "string"
|
|
857
|
+
},
|
|
858
|
+
...marginProps
|
|
859
|
+
}, checkboxClassName = suffixClassName("sui-Checkbox"), checkboxInputClassName = suffixClassName("sui-CheckboxInput"), checkboxMarkClassName = suffixClassName("sui-CheckboxMark");
|
|
1368
860
|
function Checkbox(props) {
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
861
|
+
const $ = c(6), inputRef = useRef(null), {
|
|
862
|
+
className,
|
|
863
|
+
style,
|
|
864
|
+
disabled,
|
|
865
|
+
error,
|
|
866
|
+
indeterminate,
|
|
867
|
+
label,
|
|
868
|
+
...rest
|
|
869
|
+
} = getProps(props, checkboxProps);
|
|
870
|
+
useEffect(() => {
|
|
871
|
+
inputRef.current && (inputRef.current.indeterminate = indeterminate);
|
|
872
|
+
}, [indeterminate]);
|
|
873
|
+
const t0 = clsx(checkboxClassName, "sui-position-relative", className), T0 = Box, t1 = "span", t2 = clsx(checkboxMarkClassName, error && "sui-error");
|
|
874
|
+
let t3;
|
|
875
|
+
$[0] !== indeterminate ? (t3 = indeterminate ? /* @__PURE__ */ jsx(RemoveIcon, {}) : /* @__PURE__ */ jsx(CheckmarkIcon, {}), $[0] = indeterminate, $[1] = t3) : t3 = $[1];
|
|
876
|
+
let t4;
|
|
877
|
+
return $[2] !== T0 || $[3] !== t2 || $[4] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, { as: t1, className: t2, position: "relative", radius: 2, width: "17px", height: "17px", children: t3 }), $[2] = T0, $[3] = t2, $[4] = t3, $[5] = t4) : t4 = $[5], /* @__PURE__ */ jsxs(Label, { className: t0, style, "data-ui": "Checkbox", disabled, error, children: [
|
|
878
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { as: "input", type: "checkbox", className: checkboxInputClassName, ref: inputRef, disabled, ...rest }),
|
|
879
|
+
t4,
|
|
880
|
+
label
|
|
881
|
+
] });
|
|
882
|
+
}
|
|
883
|
+
const CODE_TAG = ["pre", "span"], CODE_SIZE = [0, 1, 2, 3, 4], codeProps = {
|
|
884
|
+
as: {
|
|
885
|
+
type: "union",
|
|
886
|
+
values: CODE_TAG
|
|
887
|
+
},
|
|
888
|
+
language: {
|
|
889
|
+
type: "string"
|
|
890
|
+
},
|
|
891
|
+
size: {
|
|
892
|
+
type: "union",
|
|
893
|
+
className: "text-code",
|
|
894
|
+
values: CODE_SIZE
|
|
895
|
+
},
|
|
896
|
+
muted: typographyProps.muted,
|
|
897
|
+
trim: typographyProps.trim,
|
|
898
|
+
weight: typographyProps.weight,
|
|
899
|
+
...marginProps
|
|
900
|
+
}, LazyRefractor = lazy(() => import("./_chunks-es/LazyRefractor.js")), codeClassName = suffixClassName("sui-Code");
|
|
901
|
+
function Code(t0) {
|
|
902
|
+
const $ = c(22);
|
|
903
|
+
let T0, children, language, rest, style, t1, t2;
|
|
904
|
+
if ($[0] !== t0) {
|
|
905
|
+
t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
906
|
+
bb0: {
|
|
907
|
+
const {
|
|
908
|
+
size: t32,
|
|
909
|
+
...props
|
|
910
|
+
} = t0, size = t32 === void 0 ? 2 : t32, {
|
|
911
|
+
as,
|
|
912
|
+
children: t42,
|
|
913
|
+
className,
|
|
914
|
+
language: t52,
|
|
915
|
+
style: t62,
|
|
916
|
+
...t7
|
|
917
|
+
} = getProps({
|
|
918
|
+
size,
|
|
919
|
+
...props
|
|
920
|
+
}, codeProps);
|
|
921
|
+
children = t42, language = t52, style = t62, rest = t7;
|
|
922
|
+
const Component = as || "pre";
|
|
923
|
+
if (!language) {
|
|
924
|
+
t2 = /* @__PURE__ */ jsx(Component, { className: clsx(codeClassName, className), style, "data-ui": "Code", ...rest, children: /* @__PURE__ */ jsx("code", { children }) });
|
|
925
|
+
break bb0;
|
|
926
|
+
}
|
|
927
|
+
T0 = Component, t1 = clsx(codeClassName, className);
|
|
928
|
+
}
|
|
929
|
+
$[0] = t0, $[1] = T0, $[2] = children, $[3] = language, $[4] = rest, $[5] = style, $[6] = t1, $[7] = t2;
|
|
930
|
+
} else
|
|
931
|
+
T0 = $[1], children = $[2], language = $[3], rest = $[4], style = $[5], t1 = $[6], t2 = $[7];
|
|
932
|
+
if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
933
|
+
return t2;
|
|
934
|
+
let t3;
|
|
935
|
+
$[8] !== children ? (t3 = /* @__PURE__ */ jsx("code", { children }), $[8] = children, $[9] = t3) : t3 = $[9];
|
|
936
|
+
let t4;
|
|
937
|
+
$[10] !== children || $[11] !== language ? (t4 = /* @__PURE__ */ jsx(LazyRefractor, { language, value: children }), $[10] = children, $[11] = language, $[12] = t4) : t4 = $[12];
|
|
938
|
+
let t5;
|
|
939
|
+
$[13] !== t3 || $[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(Suspense, { fallback: t3, children: t4 }), $[13] = t3, $[14] = t4, $[15] = t5) : t5 = $[15];
|
|
940
|
+
let t6;
|
|
941
|
+
return $[16] !== T0 || $[17] !== rest || $[18] !== style || $[19] !== t1 || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Code", ...rest, children: t5 }), $[16] = T0, $[17] = rest, $[18] = style, $[19] = t1, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
|
|
942
|
+
}
|
|
943
|
+
const CONTAINER_SIZE = [0, 1, 2, 3, 4, 5], containerProps = {
|
|
944
|
+
as: {
|
|
945
|
+
type: "string"
|
|
946
|
+
},
|
|
947
|
+
size: {
|
|
948
|
+
type: "union",
|
|
949
|
+
className: "container",
|
|
950
|
+
values: CONTAINER_SIZE
|
|
951
|
+
},
|
|
952
|
+
...layoutProps
|
|
953
|
+
}, containerClassName = suffixClassName("sui-Container");
|
|
954
|
+
function Container(t0) {
|
|
955
|
+
const $ = c(12);
|
|
956
|
+
let T0, children, rest, style, t1;
|
|
957
|
+
if ($[0] !== t0) {
|
|
958
|
+
const {
|
|
959
|
+
marginX: t22,
|
|
960
|
+
...props
|
|
961
|
+
} = t0, marginX = t22 === void 0 ? "auto" : t22, {
|
|
962
|
+
as,
|
|
963
|
+
children: t3,
|
|
964
|
+
className,
|
|
965
|
+
style: t4,
|
|
966
|
+
...t5
|
|
967
|
+
} = getProps({
|
|
968
|
+
marginX,
|
|
969
|
+
...props
|
|
970
|
+
}, containerProps);
|
|
971
|
+
children = t3, style = t4, rest = t5, T0 = as || "div", t1 = clsx(containerClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
972
|
+
} else
|
|
973
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
974
|
+
let t2;
|
|
975
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Container", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
976
|
+
}
|
|
977
|
+
const HEADING_TAG = ["h1", "h2", "h3", "h4", "h5", "h6"], HEADING_SIZE = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], headingProps = {
|
|
978
|
+
as: {
|
|
979
|
+
type: "union",
|
|
980
|
+
values: HEADING_TAG
|
|
981
|
+
},
|
|
982
|
+
size: {
|
|
983
|
+
type: "union",
|
|
984
|
+
className: "text-heading",
|
|
985
|
+
values: HEADING_SIZE
|
|
986
|
+
},
|
|
987
|
+
...typographyProps
|
|
988
|
+
}, headingClassName = suffixClassName("sui-Heading");
|
|
989
|
+
function Heading(t0) {
|
|
990
|
+
const $ = c(15);
|
|
991
|
+
let T0, children, rest, style, t1, t2;
|
|
992
|
+
if ($[0] !== t0) {
|
|
993
|
+
t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
994
|
+
bb0: {
|
|
995
|
+
const {
|
|
996
|
+
size: t32,
|
|
997
|
+
weight: t4,
|
|
998
|
+
...props
|
|
999
|
+
} = t0, size = t32 === void 0 ? 2 : t32, weight = t4 === void 0 ? "bold" : t4, {
|
|
1000
|
+
as,
|
|
1001
|
+
children: t5,
|
|
1002
|
+
className,
|
|
1003
|
+
style: t6,
|
|
1004
|
+
...t7
|
|
1005
|
+
} = getProps({
|
|
1006
|
+
size,
|
|
1007
|
+
weight,
|
|
1008
|
+
...props
|
|
1009
|
+
}, headingProps);
|
|
1010
|
+
children = t5, style = t6, rest = t7;
|
|
1011
|
+
const Component = as || "h2";
|
|
1012
|
+
if (props.truncate && props.trim) {
|
|
1013
|
+
const t8 = clsx(headingClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t9 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
|
|
1014
|
+
let t10;
|
|
1015
|
+
$[7] !== t9 ? (t10 = clsx("sui-overflow-hidden", t9), $[7] = t9, $[8] = t10) : t10 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t8, style, "data-ui": "Heading", ...rest, children: /* @__PURE__ */ jsx("span", { className: t10, children }) });
|
|
1016
|
+
break bb0;
|
|
1017
|
+
}
|
|
1018
|
+
T0 = Component, t1 = clsx(headingClassName, props.truncate && "sui-overflow-hidden", className);
|
|
1019
|
+
}
|
|
1020
|
+
$[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
|
|
1021
|
+
} else
|
|
1022
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
|
|
1023
|
+
if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
1024
|
+
return t2;
|
|
1025
|
+
let t3;
|
|
1026
|
+
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Heading", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
|
|
1027
|
+
}
|
|
1028
|
+
const iconButtonProps = {
|
|
1029
|
+
"aria-label": {
|
|
1030
|
+
type: "string"
|
|
1031
|
+
},
|
|
1032
|
+
as: buttonProps.as,
|
|
1033
|
+
icon: {
|
|
1034
|
+
type: "string"
|
|
1035
|
+
}
|
|
1036
|
+
}, iconButtonClassName = suffixClassName("sui-IconButton");
|
|
1037
|
+
function IconButton(props) {
|
|
1038
|
+
const $ = c(16);
|
|
1039
|
+
let IconProp, T0, rest, style, t0, t1;
|
|
1040
|
+
if ($[0] !== props) {
|
|
1041
|
+
const {
|
|
1042
|
+
as,
|
|
1043
|
+
className,
|
|
1044
|
+
style: t22,
|
|
1045
|
+
icon: t32,
|
|
1046
|
+
...t4
|
|
1047
|
+
} = getProps(props, iconButtonProps);
|
|
1048
|
+
style = t22, IconProp = t32, rest = t4;
|
|
1049
|
+
const Component = as || "button";
|
|
1050
|
+
T0 = Button, t0 = Component, t1 = clsx(iconButtonClassName, className), $[0] = props, $[1] = IconProp, $[2] = T0, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1051
|
+
} else
|
|
1052
|
+
IconProp = $[1], T0 = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1053
|
+
let t2;
|
|
1054
|
+
$[7] !== IconProp ? (t2 = /* @__PURE__ */ jsx(Icon, { icon: IconProp, margin: -2, size: 1 }), $[7] = IconProp, $[8] = t2) : t2 = $[8];
|
|
1055
|
+
let t3;
|
|
1056
|
+
return $[9] !== T0 || $[10] !== rest || $[11] !== style || $[12] !== t0 || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "IconButton", ...rest, children: t2 }), $[9] = T0, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
|
|
1057
|
+
}
|
|
1058
|
+
const dialogProps = {
|
|
1059
|
+
header: {
|
|
1060
|
+
type: "string"
|
|
1061
|
+
},
|
|
1062
|
+
open: {
|
|
1063
|
+
type: "boolean"
|
|
1064
|
+
},
|
|
1065
|
+
size: {
|
|
1066
|
+
type: "union",
|
|
1067
|
+
className: "container",
|
|
1068
|
+
values: CONTAINER_SIZE
|
|
1069
|
+
},
|
|
1070
|
+
topAnchor: {
|
|
1071
|
+
type: "string",
|
|
1072
|
+
className: "top-anchor",
|
|
1073
|
+
variable: "--top-anchor"
|
|
1074
|
+
}
|
|
1075
|
+
}, dialogClassName = suffixClassName("sui-Dialog"), dialogContentClassName = suffixClassName("sui-DialogContent"), dialogFooterClassName = suffixClassName("sui-DialogFooter");
|
|
1076
|
+
function DialogRoot(t0) {
|
|
1077
|
+
const $ = c(17), {
|
|
1078
|
+
open: t1,
|
|
1079
|
+
size: t2,
|
|
1080
|
+
...props
|
|
1081
|
+
} = t0, open = t1 === void 0 ? !1 : t1, size = t2 === void 0 ? 0 : t2, {
|
|
1082
|
+
children,
|
|
1083
|
+
className,
|
|
1084
|
+
style,
|
|
1085
|
+
header,
|
|
1086
|
+
onClose,
|
|
1087
|
+
...rest
|
|
1088
|
+
} = getProps({
|
|
1089
|
+
size,
|
|
1090
|
+
...props
|
|
1091
|
+
}, dialogProps), dialogRef = useRef(null), headerId = useId(), dialogClasses = clsx(dialogClassName, `${props.topAnchor ? "sui-mx-auto" : "sui-m-auto"} sui-radius5 sui-shadow3 sui-p4 sui-flex-direction-column sui-gap4 sui-overflow-y-auto`);
|
|
1092
|
+
let t3, t4;
|
|
1093
|
+
$[0] !== open ? (t3 = () => {
|
|
1094
|
+
const dialogElement = dialogRef.current;
|
|
1095
|
+
if (dialogElement)
|
|
1096
|
+
return open ? dialogElement.open || dialogElement.showModal() : dialogElement.open && dialogElement.close(), () => {
|
|
1097
|
+
dialogElement.close();
|
|
1098
|
+
};
|
|
1099
|
+
}, t4 = [open], $[0] = open, $[1] = t3, $[2] = t4) : (t3 = $[1], t4 = $[2]), useEffect(t3, t4);
|
|
1100
|
+
const t5 = "any", t6 = header ? headerId : void 0, t7 = clsx(dialogClasses, className);
|
|
1101
|
+
let t8;
|
|
1102
|
+
$[3] !== header || $[4] !== headerId ? (t8 = header ? /* @__PURE__ */ jsx(Heading, { trim: !0, size: 1, id: headerId, children: header }) : /* @__PURE__ */ jsx("div", {}), $[3] = header, $[4] = headerId, $[5] = t8) : t8 = $[5];
|
|
1103
|
+
let t9;
|
|
1104
|
+
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(IconButton, { "aria-label": "Close", level: "tertiary", icon: CloseIcon, onClick: () => dialogRef.current?.close() }), $[6] = t9) : t9 = $[6];
|
|
1105
|
+
let t10;
|
|
1106
|
+
$[7] !== t8 ? (t10 = /* @__PURE__ */ jsxs(Flex, { flexShrink: 0, justifyContent: "space-between", alignItems: "center", children: [
|
|
1107
|
+
t8,
|
|
1108
|
+
t9
|
|
1109
|
+
] }), $[7] = t8, $[8] = t10) : t10 = $[8];
|
|
1110
|
+
let t11;
|
|
1111
|
+
return $[9] !== children || $[10] !== onClose || $[11] !== rest || $[12] !== style || $[13] !== t10 || $[14] !== t6 || $[15] !== t7 ? (t11 = /* @__PURE__ */ jsxs("dialog", { ...rest, ref: dialogRef, closedby: t5, "aria-labelledby": t6, onClose, className: t7, style, "data-ui": "Dialog", children: [
|
|
1112
|
+
t10,
|
|
1113
|
+
children
|
|
1114
|
+
] }), $[9] = children, $[10] = onClose, $[11] = rest, $[12] = style, $[13] = t10, $[14] = t6, $[15] = t7, $[16] = t11) : t11 = $[16], t11;
|
|
1115
|
+
}
|
|
1116
|
+
function DialogContent(props) {
|
|
1117
|
+
const $ = c(12);
|
|
1118
|
+
let T0, children, style, t0, t1;
|
|
1119
|
+
if ($[0] !== props) {
|
|
1120
|
+
const {
|
|
1121
|
+
children: t22,
|
|
1122
|
+
className,
|
|
1123
|
+
style: t3,
|
|
1124
|
+
...rest
|
|
1125
|
+
} = getProps(props, {});
|
|
1126
|
+
children = t22, style = t3, T0 = Box, t0 = rest, t1 = clsx(dialogContentClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
|
|
1127
|
+
} else
|
|
1128
|
+
T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
|
|
1129
|
+
let t2;
|
|
1130
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { ...t0, className: t1, style, "data-ui": "DialogContent", flexGrow: 1, overflowY: "auto", children }), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1131
|
+
}
|
|
1132
|
+
function DialogFooter(props) {
|
|
1133
|
+
const $ = c(12);
|
|
1134
|
+
let T0, children, style, t0, t1;
|
|
1135
|
+
if ($[0] !== props) {
|
|
1136
|
+
const {
|
|
1137
|
+
children: t22,
|
|
1138
|
+
className,
|
|
1139
|
+
style: t3,
|
|
1140
|
+
...rest
|
|
1141
|
+
} = getProps(props, {});
|
|
1142
|
+
children = t22, style = t3, T0 = Box, t0 = rest, t1 = clsx(dialogFooterClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = style, $[4] = t0, $[5] = t1;
|
|
1143
|
+
} else
|
|
1144
|
+
T0 = $[1], children = $[2], style = $[3], t0 = $[4], t1 = $[5];
|
|
1145
|
+
let t2;
|
|
1146
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== style || $[9] !== t0 || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { ...t0, className: t1, style, "data-ui": "DialogFooter", flexShrink: 0, children }), $[6] = T0, $[7] = children, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1147
|
+
}
|
|
1148
|
+
DialogRoot.displayName = "Dialog";
|
|
1149
|
+
const Dialog = DialogRoot;
|
|
1150
|
+
DialogRoot.Content = DialogContent;
|
|
1151
|
+
DialogRoot.Footer = DialogFooter;
|
|
1152
|
+
const dividerProps = {
|
|
1153
|
+
...marginProps
|
|
1154
|
+
}, dividerClassName = suffixClassName("sui-Divider");
|
|
1155
|
+
function Divider(props) {
|
|
1156
|
+
const $ = c(8);
|
|
1157
|
+
let rest, style, t0;
|
|
1158
|
+
if ($[0] !== props) {
|
|
1159
|
+
const {
|
|
1160
|
+
className,
|
|
1161
|
+
style: t12,
|
|
1162
|
+
...t2
|
|
1163
|
+
} = getProps(props, dividerProps);
|
|
1164
|
+
style = t12, rest = t2, t0 = clsx(dividerClassName, "sui-border-none sui-border-top", className), $[0] = props, $[1] = rest, $[2] = style, $[3] = t0;
|
|
1165
|
+
} else
|
|
1166
|
+
rest = $[1], style = $[2], t0 = $[3];
|
|
1167
|
+
let t1;
|
|
1168
|
+
return $[4] !== rest || $[5] !== style || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsx("hr", { className: t0, style, "data-ui": "Divider", ...rest }), $[4] = rest, $[5] = style, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
1169
|
+
}
|
|
1170
|
+
const EYEBROW_SIZE = [0, 1, 2, 3, 4], eyebrowProps = {
|
|
1171
|
+
as: {
|
|
1172
|
+
type: "string"
|
|
1173
|
+
},
|
|
1174
|
+
size: {
|
|
1175
|
+
type: "union",
|
|
1176
|
+
className: "text-eyebrow",
|
|
1177
|
+
values: EYEBROW_SIZE
|
|
1178
|
+
},
|
|
1179
|
+
...typographyProps
|
|
1180
|
+
}, eyebrowClassName = suffixClassName("sui-Eyebrow");
|
|
1181
|
+
function Eyebrow(t0) {
|
|
1182
|
+
const $ = c(15);
|
|
1183
|
+
let T0, children, rest, style, t1, t2;
|
|
1184
|
+
if ($[0] !== t0) {
|
|
1185
|
+
t2 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
1186
|
+
bb0: {
|
|
1187
|
+
const {
|
|
1188
|
+
size: t32,
|
|
1189
|
+
weight: t4,
|
|
1190
|
+
...props
|
|
1191
|
+
} = t0, size = t32 === void 0 ? 2 : t32, weight = t4 === void 0 ? "semibold" : t4, {
|
|
1192
|
+
as,
|
|
1193
|
+
children: t5,
|
|
1194
|
+
className,
|
|
1195
|
+
style: t6,
|
|
1196
|
+
...t7
|
|
1197
|
+
} = getProps({
|
|
1198
|
+
size,
|
|
1199
|
+
weight,
|
|
1200
|
+
...props
|
|
1201
|
+
}, eyebrowProps);
|
|
1202
|
+
children = t5, style = t6, rest = t7;
|
|
1203
|
+
const Component = as || "span";
|
|
1204
|
+
if (props.truncate && props.trim) {
|
|
1205
|
+
const t8 = clsx(eyebrowClassName, className?.replace("sui-line-clamp", "").replace("sui-text-overflow", "")), t9 = props.truncate === 1 ? "sui-text-overflow" : "sui-line-clamp";
|
|
1206
|
+
let t10;
|
|
1207
|
+
$[7] !== t9 ? (t10 = clsx("sui-overflow-hidden", t9), $[7] = t9, $[8] = t10) : t10 = $[8], t2 = /* @__PURE__ */ jsx(Component, { className: t8, style, "data-ui": "Eyebrow", ...rest, children: /* @__PURE__ */ jsx("span", { className: t10, children }) });
|
|
1208
|
+
break bb0;
|
|
1209
|
+
}
|
|
1210
|
+
T0 = Component, t1 = clsx(eyebrowClassName, props.truncate && "sui-overflow-hidden", className);
|
|
1211
|
+
}
|
|
1212
|
+
$[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1, $[6] = t2;
|
|
1213
|
+
} else
|
|
1214
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5], t2 = $[6];
|
|
1215
|
+
if (t2 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
1216
|
+
return t2;
|
|
1217
|
+
let t3;
|
|
1218
|
+
return $[9] !== T0 || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 ? (t3 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Eyebrow", ...rest, children }), $[9] = T0, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t3) : t3 = $[14], t3;
|
|
1219
|
+
}
|
|
1220
|
+
const GRID_AUTO_FLOW = ["row", "column", "row dense", "column dense", "dense"], gridParentProps = {
|
|
1221
|
+
gridAutoFlow: {
|
|
1222
|
+
type: "union",
|
|
1223
|
+
className: "grid-auto-flow",
|
|
1224
|
+
values: GRID_AUTO_FLOW
|
|
1225
|
+
},
|
|
1226
|
+
gridAutoColumns: {
|
|
1227
|
+
type: "string",
|
|
1228
|
+
className: "grid-auto-columns",
|
|
1229
|
+
variable: "--grid-auto-columns"
|
|
1230
|
+
},
|
|
1231
|
+
gridAutoRows: {
|
|
1232
|
+
type: "string",
|
|
1233
|
+
className: "grid-auto-rows",
|
|
1234
|
+
variable: "--grid-auto-rows"
|
|
1235
|
+
},
|
|
1236
|
+
gridTemplateColumns: {
|
|
1237
|
+
type: "string",
|
|
1238
|
+
className: "grid-template-columns",
|
|
1239
|
+
variable: "--grid-template-columns"
|
|
1240
|
+
},
|
|
1241
|
+
gridTemplateRows: {
|
|
1242
|
+
type: "string",
|
|
1243
|
+
className: "grid-template-rows",
|
|
1244
|
+
variable: "--grid-template-rows"
|
|
1245
|
+
}
|
|
1246
|
+
}, gridProps = {
|
|
1247
|
+
as: {
|
|
1248
|
+
type: "string"
|
|
1249
|
+
},
|
|
1250
|
+
display: {
|
|
1251
|
+
type: "union",
|
|
1252
|
+
className: "display",
|
|
1253
|
+
values: DISPLAY_GRID
|
|
1254
|
+
},
|
|
1255
|
+
...gridParentProps,
|
|
1256
|
+
...gapProps,
|
|
1257
|
+
...layoutProps
|
|
1258
|
+
}, gridClassName = suffixClassName("sui-Grid");
|
|
1259
|
+
function Grid(t0) {
|
|
1260
|
+
const $ = c(12);
|
|
1261
|
+
let T0, children, rest, style, t1;
|
|
1262
|
+
if ($[0] !== t0) {
|
|
1263
|
+
const {
|
|
1264
|
+
display: t22,
|
|
1265
|
+
minHeight: t3,
|
|
1266
|
+
minWidth: t4,
|
|
1267
|
+
...props
|
|
1268
|
+
} = t0, display = t22 === void 0 ? "grid" : t22, minHeight = t3 === void 0 ? "0" : t3, minWidth = t4 === void 0 ? "0" : t4, {
|
|
1269
|
+
as,
|
|
1270
|
+
children: t5,
|
|
1271
|
+
className,
|
|
1272
|
+
style: t6,
|
|
1273
|
+
...t7
|
|
1274
|
+
} = getProps({
|
|
1275
|
+
display,
|
|
1276
|
+
minHeight,
|
|
1277
|
+
minWidth,
|
|
1278
|
+
...props
|
|
1279
|
+
}, gridProps);
|
|
1280
|
+
children = t5, style = t6, rest = t7, T0 = as || "div", t1 = clsx(gridClassName, className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t1;
|
|
1281
|
+
} else
|
|
1282
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
1283
|
+
let t2;
|
|
1284
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { className: t1, style, "data-ui": "Grid", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t1, $[11] = t2) : t2 = $[11], t2;
|
|
1285
|
+
}
|
|
1286
|
+
const hStackProps = {
|
|
1287
|
+
as: {
|
|
1288
|
+
type: "string"
|
|
1289
|
+
},
|
|
1290
|
+
gap: gapProps.gap
|
|
1291
|
+
}, hStackClassName = suffixClassName("sui-HStack");
|
|
1292
|
+
function HStack(props) {
|
|
1293
|
+
const $ = c(14);
|
|
1294
|
+
let T0, children, rest, style, t0, t1;
|
|
1295
|
+
if ($[0] !== props) {
|
|
1296
|
+
const {
|
|
1297
|
+
as,
|
|
1298
|
+
children: t22,
|
|
1299
|
+
className,
|
|
1300
|
+
style: t3,
|
|
1301
|
+
...t4
|
|
1302
|
+
} = getProps(props, hStackProps);
|
|
1303
|
+
children = t22, style = t3, rest = t4;
|
|
1304
|
+
const Component = as || "div";
|
|
1305
|
+
T0 = Flex, t0 = Component, t1 = clsx(hStackClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1306
|
+
} else
|
|
1307
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1308
|
+
let t2;
|
|
1309
|
+
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "HStack", display: "inline-flex", alignItems: "center", flexWrap: "wrap", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1310
|
+
}
|
|
1311
|
+
const indicatorProps = {
|
|
1312
|
+
as: {
|
|
1313
|
+
type: "string"
|
|
1314
|
+
},
|
|
1315
|
+
label: {
|
|
1316
|
+
type: "string"
|
|
1317
|
+
},
|
|
1318
|
+
...toneProps
|
|
1319
|
+
}, indicatorClassName = suffixClassName("sui-Indicator");
|
|
1320
|
+
function Indicator(t0) {
|
|
1321
|
+
const $ = c(18);
|
|
1322
|
+
let T0, ariaLabel, children, rest, style, t1, t2;
|
|
1323
|
+
if ($[0] !== t0) {
|
|
1324
|
+
const {
|
|
1325
|
+
tone: t32,
|
|
1326
|
+
...props
|
|
1327
|
+
} = t0, tone = t32 === void 0 ? "neutral" : t32, {
|
|
1328
|
+
as,
|
|
1329
|
+
children: t42,
|
|
1330
|
+
className,
|
|
1331
|
+
style: t52,
|
|
1332
|
+
label,
|
|
1333
|
+
...t6
|
|
1334
|
+
} = getProps({
|
|
1335
|
+
tone,
|
|
1336
|
+
...props
|
|
1337
|
+
}, indicatorProps);
|
|
1338
|
+
children = t42, style = t52, rest = t6;
|
|
1339
|
+
const Component = as || "span";
|
|
1340
|
+
ariaLabel = label || rest["aria-label"], T0 = Box, t1 = Component, t2 = clsx(indicatorClassName, className), $[0] = t0, $[1] = T0, $[2] = ariaLabel, $[3] = children, $[4] = rest, $[5] = style, $[6] = t1, $[7] = t2;
|
|
1341
|
+
} else
|
|
1342
|
+
T0 = $[1], ariaLabel = $[2], children = $[3], rest = $[4], style = $[5], t1 = $[6], t2 = $[7];
|
|
1343
|
+
const t3 = ariaLabel ? void 0 : !0, t4 = ariaLabel ? "img" : void 0;
|
|
1344
|
+
let t5;
|
|
1345
|
+
return $[8] !== T0 || $[9] !== ariaLabel || $[10] !== children || $[11] !== rest || $[12] !== style || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 ? (t5 = /* @__PURE__ */ jsx(T0, { as: t1, className: t2, style, "data-ui": "Indicator", width: "5px", height: "5px", radius: "full", "aria-label": ariaLabel, "aria-hidden": t3, role: t4, ...rest, children }), $[8] = T0, $[9] = ariaLabel, $[10] = children, $[11] = rest, $[12] = style, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5) : t5 = $[17], t5;
|
|
1346
|
+
}
|
|
1347
|
+
const indicatorStackProps = {
|
|
1348
|
+
as: {
|
|
1349
|
+
type: "string"
|
|
1350
|
+
}
|
|
1351
|
+
}, indicatorStackClassName = suffixClassName("sui-IndicatorStack");
|
|
1352
|
+
function IndicatorStack(props) {
|
|
1353
|
+
const $ = c(14);
|
|
1354
|
+
let T0, children, rest, style, t0, t1;
|
|
1355
|
+
if ($[0] !== props) {
|
|
1356
|
+
const {
|
|
1357
|
+
as,
|
|
1358
|
+
children: t22,
|
|
1359
|
+
className,
|
|
1360
|
+
style: t3,
|
|
1361
|
+
...t4
|
|
1362
|
+
} = getProps(props, indicatorStackProps);
|
|
1363
|
+
children = t22, style = t3, rest = t4;
|
|
1364
|
+
const Component = as || "div";
|
|
1365
|
+
T0 = HStack, t0 = Component, t1 = clsx(indicatorStackClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1366
|
+
} else
|
|
1367
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1368
|
+
let t2;
|
|
1369
|
+
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "IndicatorStack", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1370
|
+
}
|
|
1371
|
+
const inlineProps = {
|
|
1372
|
+
as: {
|
|
1373
|
+
type: "string"
|
|
1374
|
+
},
|
|
1375
|
+
gap: {
|
|
1376
|
+
type: "composite",
|
|
1377
|
+
values: SPACE,
|
|
1378
|
+
composition: {
|
|
1379
|
+
marginTop: {
|
|
1380
|
+
propDef: marginProps.marginTop,
|
|
1381
|
+
mapping: {
|
|
1382
|
+
0: 0,
|
|
1383
|
+
1: -1,
|
|
1384
|
+
2: -2,
|
|
1385
|
+
3: -3,
|
|
1386
|
+
4: -4,
|
|
1387
|
+
5: -5,
|
|
1388
|
+
6: -6,
|
|
1389
|
+
7: -7,
|
|
1390
|
+
8: -8,
|
|
1391
|
+
9: -9
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
marginLeft: {
|
|
1395
|
+
propDef: marginProps.marginLeft,
|
|
1396
|
+
mapping: {
|
|
1397
|
+
0: 0,
|
|
1398
|
+
1: -1,
|
|
1399
|
+
2: -2,
|
|
1400
|
+
3: -3,
|
|
1401
|
+
4: -4,
|
|
1402
|
+
5: -5,
|
|
1403
|
+
6: -6,
|
|
1404
|
+
7: -7,
|
|
1405
|
+
8: -8,
|
|
1406
|
+
9: -9
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
...paddingProps
|
|
1412
|
+
}, inlineChildrenProps = {
|
|
1413
|
+
gap: {
|
|
1414
|
+
type: "composite",
|
|
1415
|
+
values: SPACE,
|
|
1416
|
+
composition: {
|
|
1417
|
+
paddingTop: {
|
|
1418
|
+
propDef: paddingProps.paddingTop,
|
|
1419
|
+
mapping: {
|
|
1420
|
+
0: 0,
|
|
1421
|
+
1: 1,
|
|
1422
|
+
2: 2,
|
|
1423
|
+
3: 3,
|
|
1424
|
+
4: 4,
|
|
1425
|
+
5: 5,
|
|
1426
|
+
6: 6,
|
|
1427
|
+
7: 7,
|
|
1428
|
+
8: 8,
|
|
1429
|
+
9: 9
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
paddingLeft: {
|
|
1433
|
+
propDef: paddingProps.paddingLeft,
|
|
1434
|
+
mapping: {
|
|
1435
|
+
0: 0,
|
|
1436
|
+
1: 1,
|
|
1437
|
+
2: 2,
|
|
1438
|
+
3: 3,
|
|
1439
|
+
4: 4,
|
|
1440
|
+
5: 5,
|
|
1441
|
+
6: 6,
|
|
1442
|
+
7: 7,
|
|
1443
|
+
8: 8,
|
|
1444
|
+
9: 9
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
}, inlineClassName = suffixClassName("sui-Inline");
|
|
1450
|
+
function Inline(props) {
|
|
1451
|
+
const $ = c(14);
|
|
1452
|
+
let T0, children, rest, style, t0;
|
|
1453
|
+
if ($[0] !== props) {
|
|
1454
|
+
const {
|
|
1455
|
+
as,
|
|
1456
|
+
children: childrenProp,
|
|
1457
|
+
className,
|
|
1458
|
+
style: t12,
|
|
1459
|
+
...t2
|
|
1460
|
+
} = getProps(props, inlineProps);
|
|
1461
|
+
style = t12, rest = t2;
|
|
1462
|
+
const {
|
|
1463
|
+
className: childrenClassName
|
|
1464
|
+
} = getProps(props, inlineChildrenProps), Component = as || "div";
|
|
1465
|
+
let t3;
|
|
1466
|
+
$[6] !== childrenClassName ? (t3 = (child) => child && /* @__PURE__ */ jsx("div", { className: childrenClassName, children: child }), $[6] = childrenClassName, $[7] = t3) : t3 = $[7], children = Children.map(childrenProp, t3), T0 = Component, t0 = clsx(inlineClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
|
|
1467
|
+
} else
|
|
1468
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
|
|
1469
|
+
let t1;
|
|
1470
|
+
return $[8] !== T0 || $[9] !== children || $[10] !== rest || $[11] !== style || $[12] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, { className: t0, style, "data-ui": "Inline", ...rest, children }), $[8] = T0, $[9] = children, $[10] = rest, $[11] = style, $[12] = t0, $[13] = t1) : t1 = $[13], t1;
|
|
1471
|
+
}
|
|
1472
|
+
const linkProps = {
|
|
1473
|
+
openInNewTab: {
|
|
1474
|
+
type: "boolean"
|
|
1475
|
+
},
|
|
1476
|
+
underlined: {
|
|
1477
|
+
type: "boolean",
|
|
1478
|
+
className: "underlined"
|
|
1479
|
+
}
|
|
1480
|
+
}, linkClassName = suffixClassName("sui-Link");
|
|
1481
|
+
function Link(t0) {
|
|
1482
|
+
const $ = c(14);
|
|
1483
|
+
let children, openInNewTab, rest, style, t1;
|
|
1484
|
+
if ($[0] !== t0) {
|
|
1485
|
+
const {
|
|
1486
|
+
underlined: t22,
|
|
1487
|
+
...props
|
|
1488
|
+
} = t0, underlined = t22 === void 0 ? !0 : t22, {
|
|
1489
|
+
children: t32,
|
|
1490
|
+
className,
|
|
1491
|
+
style: t4,
|
|
1492
|
+
openInNewTab: t5,
|
|
1493
|
+
...t6
|
|
1494
|
+
} = getProps({
|
|
1495
|
+
underlined,
|
|
1496
|
+
...props
|
|
1497
|
+
}, linkProps);
|
|
1498
|
+
children = t32, style = t4, openInNewTab = t5, rest = t6, t1 = clsx(linkClassName, className), $[0] = t0, $[1] = children, $[2] = openInNewTab, $[3] = rest, $[4] = style, $[5] = t1;
|
|
1499
|
+
} else
|
|
1500
|
+
children = $[1], openInNewTab = $[2], rest = $[3], style = $[4], t1 = $[5];
|
|
1501
|
+
let t2;
|
|
1502
|
+
$[6] !== openInNewTab ? (t2 = openInNewTab ? {
|
|
1503
|
+
target: "_blank",
|
|
1504
|
+
rel: "noopener noreferrer"
|
|
1505
|
+
} : {}, $[6] = openInNewTab, $[7] = t2) : t2 = $[7];
|
|
1506
|
+
let t3;
|
|
1507
|
+
return $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t1 || $[12] !== t2 ? (t3 = /* @__PURE__ */ jsx("a", { className: t1, style, "data-ui": "Link", ...t2, ...rest, children }), $[8] = children, $[9] = rest, $[10] = style, $[11] = t1, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
|
|
1508
|
+
}
|
|
1509
|
+
const pressAreaProps = {
|
|
1510
|
+
as: {
|
|
1511
|
+
type: "string"
|
|
1512
|
+
}
|
|
1513
|
+
}, pressAreaClassName = suffixClassName("sui-PressArea");
|
|
1514
|
+
function PressArea(props) {
|
|
1515
|
+
const $ = c(12);
|
|
1516
|
+
let T0, children, rest, style, t0;
|
|
1517
|
+
if ($[0] !== props) {
|
|
1518
|
+
const {
|
|
1519
|
+
as,
|
|
1520
|
+
children: t12,
|
|
1521
|
+
className,
|
|
1522
|
+
style: t2,
|
|
1523
|
+
...t3
|
|
1524
|
+
} = getProps(props, pressAreaProps);
|
|
1525
|
+
children = t12, style = t2, rest = t3, T0 = as || "button", t0 = clsx(pressAreaClassName, "sui-width-full", className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0;
|
|
1526
|
+
} else
|
|
1527
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5];
|
|
1528
|
+
let t1;
|
|
1529
|
+
return $[6] !== T0 || $[7] !== children || $[8] !== rest || $[9] !== style || $[10] !== t0 ? (t1 = /* @__PURE__ */ jsx(T0, { className: t0, style, "data-ui": "PressArea", ...rest, children }), $[6] = T0, $[7] = children, $[8] = rest, $[9] = style, $[10] = t0, $[11] = t1) : t1 = $[11], t1;
|
|
1530
|
+
}
|
|
1531
|
+
const vStackProps = {
|
|
1532
|
+
as: {
|
|
1533
|
+
type: "string"
|
|
1534
|
+
},
|
|
1535
|
+
gap: gapProps.gap
|
|
1536
|
+
}, vStackClassName = suffixClassName("sui-VStack");
|
|
1537
|
+
function VStack(props) {
|
|
1538
|
+
const $ = c(14);
|
|
1539
|
+
let T0, children, rest, style, t0, t1;
|
|
1540
|
+
if ($[0] !== props) {
|
|
1541
|
+
const {
|
|
1542
|
+
as,
|
|
1543
|
+
children: t22,
|
|
1544
|
+
className,
|
|
1545
|
+
style: t3,
|
|
1546
|
+
...t4
|
|
1547
|
+
} = getProps(props, vStackProps);
|
|
1548
|
+
children = t22, style = t3, rest = t4;
|
|
1549
|
+
const Component = as || "div";
|
|
1550
|
+
T0 = Flex, t0 = Component, t1 = clsx(vStackClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1551
|
+
} else
|
|
1552
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1553
|
+
let t2;
|
|
1554
|
+
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "VStack", flexDirection: "column", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1555
|
+
}
|
|
1556
|
+
const listProps = {
|
|
1557
|
+
as: {
|
|
1558
|
+
type: "string"
|
|
1559
|
+
},
|
|
1560
|
+
gap: gapProps.gap
|
|
1561
|
+
}, listItemProps = {
|
|
1562
|
+
density: {
|
|
1563
|
+
type: "composite",
|
|
1564
|
+
values: DENSITY,
|
|
1565
|
+
composition: {
|
|
1566
|
+
gap: {
|
|
1567
|
+
propDef: gapProps.gap,
|
|
1568
|
+
mapping: {
|
|
1569
|
+
compact: 2,
|
|
1570
|
+
regular: 2,
|
|
1571
|
+
loose: 3
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1574
|
+
minHeight: {
|
|
1575
|
+
propDef: heightProps.minHeight,
|
|
1576
|
+
mapping: {
|
|
1577
|
+
compact: "33px",
|
|
1578
|
+
regular: "37px",
|
|
1579
|
+
loose: "45px"
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
paddingX: {
|
|
1583
|
+
propDef: paddingProps.padding,
|
|
1584
|
+
mapping: {
|
|
1585
|
+
compact: 1,
|
|
1586
|
+
regular: 2,
|
|
1587
|
+
loose: 3
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
end: {
|
|
1593
|
+
type: "string"
|
|
1594
|
+
},
|
|
1595
|
+
start: {
|
|
1596
|
+
type: "string"
|
|
1597
|
+
}
|
|
1598
|
+
}, listButtonItemProps = {
|
|
1599
|
+
as: {
|
|
1600
|
+
type: "string"
|
|
1601
|
+
},
|
|
1602
|
+
selected: {
|
|
1603
|
+
type: "boolean"
|
|
1604
|
+
},
|
|
1605
|
+
...listItemProps
|
|
1606
|
+
}, listItemTextProps = {
|
|
1607
|
+
as: {
|
|
1608
|
+
type: "string"
|
|
1609
|
+
},
|
|
1610
|
+
title: {
|
|
1611
|
+
type: "string"
|
|
1612
|
+
},
|
|
1613
|
+
subtitle: {
|
|
1614
|
+
type: "string"
|
|
1615
|
+
}
|
|
1616
|
+
}, listClassName = suffixClassName("sui-List"), listItemClassName = suffixClassName("sui-ListItem"), listButtonItemClassName = suffixClassName("sui-ListButtonItem"), listItemTextClassName = suffixClassName("sui-ListItemText"), listItemImageClassName = suffixClassName("sui-ListItemImage");
|
|
1617
|
+
function ListRoot(props) {
|
|
1618
|
+
const $ = c(14);
|
|
1619
|
+
let T0, children, rest, style, t0, t1;
|
|
1620
|
+
if ($[0] !== props) {
|
|
1621
|
+
const {
|
|
1622
|
+
as,
|
|
1623
|
+
children: t22,
|
|
1624
|
+
className,
|
|
1625
|
+
style: t3,
|
|
1626
|
+
...t4
|
|
1627
|
+
} = getProps(props, listProps);
|
|
1628
|
+
children = t22, style = t3, rest = t4;
|
|
1629
|
+
const Component = as || "ul";
|
|
1630
|
+
T0 = VStack, t0 = Component, t1 = clsx(listClassName, className), $[0] = props, $[1] = T0, $[2] = children, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1;
|
|
1631
|
+
} else
|
|
1632
|
+
T0 = $[1], children = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6];
|
|
1633
|
+
let t2;
|
|
1634
|
+
return $[7] !== T0 || $[8] !== children || $[9] !== rest || $[10] !== style || $[11] !== t0 || $[12] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, style, "data-ui": "List", ...rest, children }), $[7] = T0, $[8] = children, $[9] = rest, $[10] = style, $[11] = t0, $[12] = t1, $[13] = t2) : t2 = $[13], t2;
|
|
1635
|
+
}
|
|
1636
|
+
function ListItem(t0) {
|
|
1637
|
+
const $ = c(16);
|
|
1638
|
+
let children, end, rest, start, style, t1;
|
|
1639
|
+
if ($[0] !== t0) {
|
|
1640
|
+
const {
|
|
1641
|
+
density: t22,
|
|
1642
|
+
...props
|
|
1643
|
+
} = t0, density = t22 === void 0 ? "regular" : t22, {
|
|
1644
|
+
children: t32,
|
|
1645
|
+
className,
|
|
1646
|
+
style: t4,
|
|
1647
|
+
end: t5,
|
|
1648
|
+
start: t6,
|
|
1649
|
+
...t7
|
|
1650
|
+
} = getProps({
|
|
1651
|
+
density,
|
|
1652
|
+
...props
|
|
1653
|
+
}, listItemProps);
|
|
1654
|
+
children = t32, style = t4, end = t5, start = t6, rest = t7, t1 = clsx(listItemClassName, "sui-width-full sui-display-flex sui-align-items-center", className), $[0] = t0, $[1] = children, $[2] = end, $[3] = rest, $[4] = start, $[5] = style, $[6] = t1;
|
|
1655
|
+
} else
|
|
1656
|
+
children = $[1], end = $[2], rest = $[3], start = $[4], style = $[5], t1 = $[6];
|
|
1657
|
+
let t2;
|
|
1658
|
+
$[7] !== children ? (t2 = /* @__PURE__ */ jsx(Flex, { flexGrow: 1, gap: "inherit", children }), $[7] = children, $[8] = t2) : t2 = $[8];
|
|
1659
|
+
let t3;
|
|
1660
|
+
return $[9] !== end || $[10] !== rest || $[11] !== start || $[12] !== style || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsxs("li", { className: t1, style, "data-ui": "ListItem", ...rest, children: [
|
|
1661
|
+
start,
|
|
1662
|
+
t2,
|
|
1663
|
+
end
|
|
1664
|
+
] }), $[9] = end, $[10] = rest, $[11] = start, $[12] = style, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
|
|
1665
|
+
}
|
|
1666
|
+
function ListButtonItem(t0) {
|
|
1667
|
+
const $ = c(22);
|
|
1668
|
+
let T0, children, end, rest, selected, start, style, t1, t2;
|
|
1669
|
+
if ($[0] !== t0) {
|
|
1670
|
+
const {
|
|
1671
|
+
density: t32,
|
|
1672
|
+
...props
|
|
1673
|
+
} = t0, density = t32 === void 0 ? "regular" : t32, {
|
|
1674
|
+
as,
|
|
1675
|
+
children: t42,
|
|
1676
|
+
className,
|
|
1677
|
+
style: t5,
|
|
1678
|
+
end: t6,
|
|
1679
|
+
start: t7,
|
|
1680
|
+
selected: t8,
|
|
1681
|
+
...t9
|
|
1682
|
+
} = getProps({
|
|
1683
|
+
density,
|
|
1684
|
+
...props
|
|
1685
|
+
}, listButtonItemProps);
|
|
1686
|
+
children = t42, style = t5, end = t6, start = t7, selected = t8, rest = t9;
|
|
1687
|
+
const Component = as || "button";
|
|
1688
|
+
T0 = PressArea, t1 = Component, t2 = clsx(listButtonItemClassName, "sui-width-full sui-display-flex sui-align-items-center sui-radius2", className), $[0] = t0, $[1] = T0, $[2] = children, $[3] = end, $[4] = rest, $[5] = selected, $[6] = start, $[7] = style, $[8] = t1, $[9] = t2;
|
|
1689
|
+
} else
|
|
1690
|
+
T0 = $[1], children = $[2], end = $[3], rest = $[4], selected = $[5], start = $[6], style = $[7], t1 = $[8], t2 = $[9];
|
|
1691
|
+
let t3;
|
|
1692
|
+
$[10] !== children ? (t3 = /* @__PURE__ */ jsx(Flex, { flexGrow: 1, gap: "inherit", children }), $[10] = children, $[11] = t3) : t3 = $[11];
|
|
1693
|
+
let t4;
|
|
1694
|
+
return $[12] !== T0 || $[13] !== end || $[14] !== rest || $[15] !== selected || $[16] !== start || $[17] !== style || $[18] !== t1 || $[19] !== t2 || $[20] !== t3 ? (t4 = /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(T0, { as: t1, className: t2, style, "data-ui": "ListButtonItem", "data-selected": selected, ...rest, children: [
|
|
1695
|
+
start,
|
|
1696
|
+
t3,
|
|
1697
|
+
end
|
|
1698
|
+
] }) }), $[12] = T0, $[13] = end, $[14] = rest, $[15] = selected, $[16] = start, $[17] = style, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4) : t4 = $[21], t4;
|
|
1699
|
+
}
|
|
1700
|
+
function ListItemText(props) {
|
|
1701
|
+
const $ = c(20);
|
|
1702
|
+
let T0, rest, style, subtitle, t0, t1, title;
|
|
1703
|
+
if ($[0] !== props) {
|
|
1704
|
+
const {
|
|
1705
|
+
as,
|
|
1706
|
+
className,
|
|
1707
|
+
style: t22,
|
|
1708
|
+
title: t32,
|
|
1709
|
+
subtitle: t42,
|
|
1710
|
+
...t5
|
|
1711
|
+
} = getProps(props, listItemTextProps);
|
|
1712
|
+
style = t22, title = t32, subtitle = t42, rest = t5;
|
|
1713
|
+
const Component = as || "div";
|
|
1714
|
+
T0 = Flex, t0 = Component, t1 = clsx(listItemTextClassName, className), $[0] = props, $[1] = T0, $[2] = rest, $[3] = style, $[4] = subtitle, $[5] = t0, $[6] = t1, $[7] = title;
|
|
1715
|
+
} else
|
|
1716
|
+
T0 = $[1], rest = $[2], style = $[3], subtitle = $[4], t0 = $[5], t1 = $[6], title = $[7];
|
|
1717
|
+
let t2;
|
|
1718
|
+
$[8] !== title ? (t2 = title && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", trim: !0, truncate: 1, children: title }), $[8] = title, $[9] = t2) : t2 = $[9];
|
|
1719
|
+
let t3;
|
|
1720
|
+
$[10] !== subtitle ? (t3 = subtitle && /* @__PURE__ */ jsx(Text, { size: 1, muted: !0, trim: !0, truncate: 1, children: subtitle }), $[10] = subtitle, $[11] = t3) : t3 = $[11];
|
|
1721
|
+
let t4;
|
|
1722
|
+
return $[12] !== T0 || $[13] !== rest || $[14] !== style || $[15] !== t0 || $[16] !== t1 || $[17] !== t2 || $[18] !== t3 ? (t4 = /* @__PURE__ */ jsxs(T0, { as: t0, className: t1, style, "data-ui": "ListItemText", flexDirection: "column", justifyContent: "center", gap: 2, flexGrow: 1, ...rest, children: [
|
|
1723
|
+
t2,
|
|
1724
|
+
t3
|
|
1725
|
+
] }), $[12] = T0, $[13] = rest, $[14] = style, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4) : t4 = $[19], t4;
|
|
1726
|
+
}
|
|
1727
|
+
function ListItemImage(props) {
|
|
1728
|
+
const $ = c(8);
|
|
1729
|
+
let rest, style, t0;
|
|
1730
|
+
if ($[0] !== props) {
|
|
1731
|
+
const {
|
|
1732
|
+
className,
|
|
1733
|
+
style: t12,
|
|
1734
|
+
...t2
|
|
1735
|
+
} = getProps(props, {});
|
|
1736
|
+
style = t12, rest = t2, t0 = clsx(listItemImageClassName, "sui-radius2", className), $[0] = props, $[1] = rest, $[2] = style, $[3] = t0;
|
|
1737
|
+
} else
|
|
1738
|
+
rest = $[1], style = $[2], t0 = $[3];
|
|
1739
|
+
let t1;
|
|
1740
|
+
return $[4] !== rest || $[5] !== style || $[6] !== t0 ? (t1 = /* @__PURE__ */ jsx("img", { className: t0, style, "data-ui": "ListItemImage", ...rest }), $[4] = rest, $[5] = style, $[6] = t0, $[7] = t1) : t1 = $[7], t1;
|
|
1741
|
+
}
|
|
1742
|
+
ListRoot.displayName = "List";
|
|
1743
|
+
const List = ListRoot;
|
|
1744
|
+
ListRoot.Item = ListItem;
|
|
1745
|
+
ListRoot.ButtonItem = ListButtonItem;
|
|
1746
|
+
ListRoot.ItemText = ListItemText;
|
|
1747
|
+
ListRoot.ItemImage = ListItemImage;
|
|
1748
|
+
function useIsClient() {
|
|
1749
|
+
return useSyncExternalStore(_temp2, _temp3, _temp4);
|
|
1750
|
+
}
|
|
1751
|
+
function _temp4() {
|
|
1752
|
+
return !1;
|
|
1753
|
+
}
|
|
1754
|
+
function _temp3() {
|
|
1755
|
+
return !0;
|
|
1406
1756
|
}
|
|
1407
|
-
function
|
|
1408
|
-
|
|
1409
|
-
return css`${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.heading.weights.bold};}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}`;
|
|
1410
|
-
}
|
|
1411
|
-
const StyledHeading = /* @__PURE__ */ styled.div.withConfig({
|
|
1412
|
-
displayName: "StyledHeading",
|
|
1413
|
-
componentId: "sc-95f8ng-0"
|
|
1414
|
-
})(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
1415
|
-
function HeadingComponent(props) {
|
|
1416
|
-
let $ = c(27), align, childrenProp, ref, restProps, t0, t1, t2, textOverflow, weight;
|
|
1417
|
-
$[0] === props ? (align = $[1], childrenProp = $[2], ref = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7], textOverflow = $[8], weight = $[9]) : ({accent: t0, align, children: childrenProp, muted: t1, ref, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = ref, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2, $[8] = textOverflow, $[9] = weight);
|
|
1418
|
-
let accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;
|
|
1419
|
-
if (textOverflow === "ellipsis") {
|
|
1420
|
-
let t3;
|
|
1421
|
-
$[10] === children ? t3 = $[11] : (t3 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[10] = children, $[11] = t3), children = t3;
|
|
1422
|
-
}
|
|
1423
|
-
let t3;
|
|
1424
|
-
$[12] === align ? t3 = $[13] : (t3 = _getArrayProp(align), $[12] = align, $[13] = t3);
|
|
1425
|
-
let t4;
|
|
1426
|
-
$[14] === size ? t4 = $[15] : (t4 = _getArrayProp(size), $[14] = size, $[15] = t4);
|
|
1427
|
-
let t5;
|
|
1428
|
-
$[16] === children ? t5 = $[17] : (t5 = /* @__PURE__ */ jsx("span", { children }), $[16] = children, $[17] = t5);
|
|
1429
|
-
let t6;
|
|
1430
|
-
return $[18] !== accent || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== weight ? (t6 = /* @__PURE__ */ jsx(StyledHeading, {
|
|
1431
|
-
"data-ui": "Heading",
|
|
1432
|
-
...restProps,
|
|
1433
|
-
$accent: accent,
|
|
1434
|
-
$align: t3,
|
|
1435
|
-
$muted: muted,
|
|
1436
|
-
$size: t4,
|
|
1437
|
-
$weight: weight,
|
|
1438
|
-
ref,
|
|
1439
|
-
children: t5
|
|
1440
|
-
}), $[18] = accent, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = weight, $[26] = t6) : t6 = $[26], t6;
|
|
1757
|
+
function _temp2() {
|
|
1758
|
+
return _temp;
|
|
1441
1759
|
}
|
|
1442
|
-
|
|
1443
|
-
* Typographic headings.
|
|
1444
|
-
*
|
|
1445
|
-
* @public
|
|
1446
|
-
*/
|
|
1447
|
-
const Heading = HeadingComponent;
|
|
1448
|
-
function inputElementStyle(props) {
|
|
1449
|
-
let { color, input } = getTheme_v2(props.theme), dist = (input.radio.size - input.radio.markSize) / 2;
|
|
1450
|
-
return css`appearance:none;position:absolute;top:0;left:0;opacity:0;height:100%;width:100%;outline:none;z-index:1;padding:0;margin:0;border-radius:${rem(input.radio.size / 2)};border:none;& + span{display:block;position:relative;height:${rem(input.radio.size)};width:${rem(input.radio.size)};border-radius:${rem(input.radio.size / 2)};background:${color.input.default.enabled.bg};box-shadow:${focusRingBorderStyle({
|
|
1451
|
-
color: color.input.default.enabled.border,
|
|
1452
|
-
width: input.border.width
|
|
1453
|
-
})};&::after{content:'';position:absolute;top:${rem(dist)};left:${rem(dist)};height:${rem(input.radio.markSize)};width:${rem(input.radio.markSize)};border-radius:${rem(input.radio.markSize / 2)};background:${color.input.default.enabled.fg};opacity:0;}}&:not(:disabled):focus + span{box-shadow:${focusRingStyle({
|
|
1454
|
-
border: {
|
|
1455
|
-
width: input.border.width,
|
|
1456
|
-
color: color.input.default.enabled.border
|
|
1457
|
-
},
|
|
1458
|
-
focusRing: input.radio.focusRing
|
|
1459
|
-
})};}&:not(:disabled):focus:not(:focus-visible) + span{box-shadow:${focusRingBorderStyle({
|
|
1460
|
-
color: color.input.default.enabled.border,
|
|
1461
|
-
width: input.border.width
|
|
1462
|
-
})};}&:checked + span::after{opacity:1;}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
|
|
1463
|
-
width: input.border.width,
|
|
1464
|
-
color: color.input.invalid.enabled.muted.bg
|
|
1465
|
-
})};&::after{background:${color.input.invalid.enabled.muted.bg};}}&[data-read-only] + span{box-shadow:0 0 0 1px ${color.input.default.readOnly.border};background:${color.input.default.readOnly.bg};&::after{background:${color.input.default.readOnly.border};}}&:not([data-read-only]):disabled + span{box-shadow:0 0 0 1px ${color.input.default.disabled.border};background:${color.input.default.disabled.bg};&::after{background:${color.input.default.disabled.border};}}`;
|
|
1760
|
+
function _temp() {
|
|
1466
1761
|
}
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1762
|
+
function isReactEventHandler(key, value) {
|
|
1763
|
+
return /^on[A-Z]/.test(key) && typeof value == "function";
|
|
1764
|
+
}
|
|
1765
|
+
function chainEventHandlers(...handlers) {
|
|
1766
|
+
const defined = handlers.filter(Boolean);
|
|
1767
|
+
if (defined.length !== 0)
|
|
1768
|
+
return defined.length === 1 ? defined[0] : (e) => {
|
|
1769
|
+
for (const handler of defined)
|
|
1770
|
+
handler(e);
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
function mergeTriggerProps(childProps, forwardedProps, ownProps) {
|
|
1774
|
+
const result = {};
|
|
1775
|
+
for (const source of [forwardedProps, ownProps])
|
|
1776
|
+
if (source) {
|
|
1777
|
+
for (const [key, value] of Object.entries(source))
|
|
1778
|
+
if (key !== "style") {
|
|
1779
|
+
if (isReactEventHandler(key, value)) {
|
|
1780
|
+
result[key] = chainEventHandlers(result[key], value);
|
|
1781
|
+
continue;
|
|
1782
|
+
}
|
|
1783
|
+
value !== void 0 && (result[key] = value);
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
result.style = {
|
|
1787
|
+
...childProps.style,
|
|
1788
|
+
...forwardedProps?.style,
|
|
1789
|
+
...ownProps?.style
|
|
1790
|
+
};
|
|
1791
|
+
for (const [key, value] of Object.entries(childProps))
|
|
1792
|
+
isReactEventHandler(key, value) && (result[key] = chainEventHandlers(result[key], value));
|
|
1793
|
+
return result;
|
|
1794
|
+
}
|
|
1795
|
+
function renderPortal(node, mounted, portal) {
|
|
1796
|
+
return portal ? mounted ? createPortal(node, document.body) : null : node;
|
|
1797
|
+
}
|
|
1798
|
+
const PLACEMENT = ["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end"], placementProps = {
|
|
1799
|
+
placement: {
|
|
1800
|
+
type: "union",
|
|
1801
|
+
className: "placement",
|
|
1802
|
+
values: PLACEMENT
|
|
1803
|
+
}
|
|
1804
|
+
}, popoverProps = {
|
|
1805
|
+
anchorName: {
|
|
1806
|
+
type: "string"
|
|
1807
|
+
},
|
|
1808
|
+
content: {
|
|
1809
|
+
type: "string"
|
|
1810
|
+
},
|
|
1811
|
+
portal: {
|
|
1812
|
+
type: "boolean"
|
|
1813
|
+
},
|
|
1814
|
+
...placementProps
|
|
1815
|
+
}, popoverClassName = suffixClassName("sui-PopoverContent");
|
|
1816
|
+
function PopoverRoot(t0) {
|
|
1817
|
+
const $ = c(4), {
|
|
1818
|
+
placement: t1,
|
|
1819
|
+
...props
|
|
1820
|
+
} = t0, placement = t1 === void 0 ? "bottom" : t1, {
|
|
1821
|
+
children,
|
|
1822
|
+
className,
|
|
1823
|
+
style,
|
|
1824
|
+
id: idProp,
|
|
1825
|
+
anchorName,
|
|
1826
|
+
content,
|
|
1827
|
+
portal,
|
|
1828
|
+
triggerProps: forwardedTriggerProps,
|
|
1829
|
+
...rest
|
|
1830
|
+
} = getProps({
|
|
1831
|
+
placement,
|
|
1832
|
+
...props
|
|
1833
|
+
}, popoverProps), reactId = useId(), id = idProp || reactId, [open, setOpen] = useState(!1), isClient = useIsClient();
|
|
1834
|
+
let t2;
|
|
1835
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (e) => {
|
|
1836
|
+
setOpen(e.newState === "open");
|
|
1837
|
+
}, $[0] = t2) : t2 = $[0];
|
|
1838
|
+
const handleToggle = t2, triggerProps = {
|
|
1839
|
+
popoverTarget: id,
|
|
1840
|
+
style: {
|
|
1841
|
+
anchorName: `--anchor-${anchorName || id}`
|
|
1842
|
+
}
|
|
1843
|
+
}, trigger = children.type.forwardsTriggerProps ? cloneElement(children, {
|
|
1844
|
+
triggerProps
|
|
1845
|
+
}) : cloneElement(children, mergeTriggerProps(children.props, forwardedTriggerProps, triggerProps)), t3 = renderPortal(/* @__PURE__ */ jsx(Activity, { mode: open ? "visible" : "hidden", children: /* @__PURE__ */ jsx("div", { className: clsx(popoverClassName, "sui-px2 sui-py1 sui-radius2 sui-position-fixed sui-shadow2", className), style: {
|
|
1846
|
+
...style,
|
|
1847
|
+
positionAnchor: `--anchor-${anchorName || id}`
|
|
1848
|
+
}, "data-ui": "Popover", popover: "auto", id, onToggle: handleToggle, ...rest, children: content }) }), isClient, portal);
|
|
1849
|
+
let t4;
|
|
1850
|
+
return $[1] !== t3 || $[2] !== trigger ? (t4 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1851
|
+
trigger,
|
|
1852
|
+
t3
|
|
1853
|
+
] }), $[1] = t3, $[2] = trigger, $[3] = t4) : t4 = $[3], t4;
|
|
1854
|
+
}
|
|
1855
|
+
const Popover = Object.assign(PopoverRoot, {
|
|
1856
|
+
forwardsTriggerProps: !0
|
|
1857
|
+
}), radioProps = {
|
|
1858
|
+
error: {
|
|
1859
|
+
type: "boolean"
|
|
1860
|
+
},
|
|
1861
|
+
label: {
|
|
1862
|
+
type: "string"
|
|
1863
|
+
},
|
|
1864
|
+
...marginProps
|
|
1865
|
+
}, radioClassName = suffixClassName("sui-Radio"), radioInputClassName = suffixClassName("sui-RadioInput"), radioMarkClassName = suffixClassName("sui-RadioMark");
|
|
1477
1866
|
function Radio(props) {
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
lineHeight: `${rem(size.lineHeight)}`
|
|
1534
|
-
};
|
|
1535
|
-
}
|
|
1536
|
-
function inputTextSizeStyle(props) {
|
|
1537
|
-
let { $fontSize } = props, { font, media } = getTheme_v2(props.theme);
|
|
1538
|
-
return _responsive(media, $fontSize, (sizeIndex) => textSize(font.text.sizes[sizeIndex] || font.text.sizes[2]));
|
|
1539
|
-
}
|
|
1540
|
-
function inputStyle() {
|
|
1541
|
-
return [
|
|
1542
|
-
responsiveRadiusStyle,
|
|
1543
|
-
inputBaseStyle,
|
|
1544
|
-
inputColorStyle,
|
|
1545
|
-
inputTextSizeStyle,
|
|
1546
|
-
responsiveInputPaddingIconRightStyle
|
|
1547
|
-
];
|
|
1548
|
-
}
|
|
1549
|
-
function iconBoxStyle(props) {
|
|
1550
|
-
let { color } = getTheme_v2(props.theme);
|
|
1551
|
-
return css`pointer-events:none;position:absolute;top:0;right:0;--card-fg-color:${color.input.default.enabled.fg};@media (hover:hover){select:not(disabled):not(:read-only):hover + &&{--card-fg-color:${color.input.default.hovered.fg};}}select:disabled + &&{--card-fg-color:${color.input.default.disabled.fg};}select[data-read-only] + &&{--card-fg-color:${color.input.default.readOnly.fg};}`;
|
|
1552
|
-
}
|
|
1553
|
-
const selectStyle = {
|
|
1554
|
-
input: inputStyle,
|
|
1555
|
-
iconBox: iconBoxStyle
|
|
1556
|
-
};
|
|
1557
|
-
var select = "_14ngdrn0";
|
|
1558
|
-
const Input$1 = /* @__PURE__ */ styled.select.withConfig({
|
|
1559
|
-
displayName: "Input",
|
|
1560
|
-
componentId: "sc-af8su9-0"
|
|
1561
|
-
})(selectStyle.input), IconBox = /* @__PURE__ */ styled(Box).withConfig({
|
|
1562
|
-
displayName: "IconBox",
|
|
1563
|
-
componentId: "sc-af8su9-1"
|
|
1564
|
-
})(selectStyle.iconBox);
|
|
1565
|
-
/**
|
|
1566
|
-
* The `Select` component provides control of options.
|
|
1567
|
-
*
|
|
1568
|
-
* @public
|
|
1569
|
-
*/
|
|
1570
|
-
function Select(props) {
|
|
1571
|
-
let $ = c(38), children, customValidity, disabled, forwardedRef, readOnly, restProps, t0, t1, t2, t3;
|
|
1572
|
-
$[0] === props ? (children = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], readOnly = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10]) : ({children, customValidity, disabled, fontSize: t0, gap: t1, padding: t2, radius: t3, readOnly, ref: forwardedRef, ...restProps} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = readOnly, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3);
|
|
1573
|
-
let fontSize = t0 === void 0 ? 2 : t0, gap = t1 === void 0 ? 3 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, ref = useRef(null), t4;
|
|
1574
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[11] = t4) : t4 = $[11], useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
1575
|
-
let t5 = !disabled && readOnly ? "" : void 0, t6;
|
|
1576
|
-
$[12] === fontSize ? t6 = $[13] : (t6 = _getArrayProp(fontSize), $[12] = fontSize, $[13] = t6);
|
|
1577
|
-
let t7;
|
|
1578
|
-
$[14] === padding ? t7 = $[15] : (t7 = _getArrayProp(padding), $[14] = padding, $[15] = t7);
|
|
1579
|
-
let t8;
|
|
1580
|
-
$[16] === radius ? t8 = $[17] : (t8 = _getArrayProp(radius), $[16] = radius, $[17] = t8);
|
|
1581
|
-
let t9;
|
|
1582
|
-
$[18] === gap ? t9 = $[19] : (t9 = _getArrayProp(gap), $[18] = gap, $[19] = t9);
|
|
1583
|
-
let t10 = disabled || readOnly, t11;
|
|
1584
|
-
$[20] !== children || $[21] !== restProps || $[22] !== t10 || $[23] !== t5 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9 ? (t11 = /* @__PURE__ */ jsx(Input$1, {
|
|
1585
|
-
"data-read-only": t5,
|
|
1586
|
-
"data-ui": "Select",
|
|
1587
|
-
...restProps,
|
|
1588
|
-
$fontSize: t6,
|
|
1589
|
-
$padding: t7,
|
|
1590
|
-
$radius: t8,
|
|
1591
|
-
$space: t9,
|
|
1592
|
-
disabled: t10,
|
|
1593
|
-
ref,
|
|
1594
|
-
children
|
|
1595
|
-
}), $[20] = children, $[21] = restProps, $[22] = t10, $[23] = t5, $[24] = t6, $[25] = t7, $[26] = t8, $[27] = t9, $[28] = t11) : t11 = $[28];
|
|
1596
|
-
let t12;
|
|
1597
|
-
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[29] = t12) : t12 = $[29];
|
|
1598
|
-
let t13;
|
|
1599
|
-
$[30] === fontSize ? t13 = $[31] : (t13 = /* @__PURE__ */ jsx(Text, {
|
|
1600
|
-
size: fontSize,
|
|
1601
|
-
children: t12
|
|
1602
|
-
}), $[30] = fontSize, $[31] = t13);
|
|
1603
|
-
let t14;
|
|
1604
|
-
$[32] !== padding || $[33] !== t13 ? (t14 = /* @__PURE__ */ jsx(IconBox, {
|
|
1605
|
-
padding,
|
|
1606
|
-
children: t13
|
|
1607
|
-
}), $[32] = padding, $[33] = t13, $[34] = t14) : t14 = $[34];
|
|
1608
|
-
let t15;
|
|
1609
|
-
return $[35] !== t11 || $[36] !== t14 ? (t15 = /* @__PURE__ */ jsxs("div", {
|
|
1610
|
-
className: select,
|
|
1611
|
-
"data-ui": "Select",
|
|
1612
|
-
children: [t11, t14]
|
|
1613
|
-
}), $[35] = t11, $[36] = t14, $[37] = t15) : t15 = $[37], t15;
|
|
1614
|
-
}
|
|
1615
|
-
function switchRepresentationStyles(props) {
|
|
1616
|
-
let { color, input } = getTheme_v2(props.theme);
|
|
1617
|
-
return css`--switch-bg-color:${color.input.default.enabled.border};--switch-fg-color:${color.input.default.enabled.bg};--switch-box-shadow:none;&:not([hidden]){display:block;}position:relative;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};pointer-events:none;&:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;box-shadow:var(--switch-box-shadow);border-radius:inherit;}input:focus + &&{--switch-box-shadow:${focusRingStyle({ focusRing: input.switch.focusRing })};}input:focus:not(:focus-visible) + &&{--switch-box-shadow:none;}input:checked + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}@media (hover:hover){input:not(:disabled):hover + &&{--switch-bg-color:${color.input.default.hovered.border};--switch-fg-color:${color.input.default.hovered.bg};}input:not(:disabled):checked:hover + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}}input:not([data-read-only]):disabled + &&{--switch-bg-color:${color.input.default.disabled.border};--switch-fg-color:${color.input.default.disabled.bg};}input[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.border};--switch-fg-color:${color.input.default.readOnly.bg};}input:checked[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.fg};--switch-fg-color:${color.input.default.readOnly.bg};}`;
|
|
1618
|
-
}
|
|
1619
|
-
function switchTrackStyles(props) {
|
|
1620
|
-
let { input } = getTheme_v2(props.theme);
|
|
1621
|
-
return css`&:not([hidden]){display:block;}background-color:var(--switch-bg-color);position:absolute;left:0;top:0;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};`;
|
|
1622
|
-
}
|
|
1623
|
-
function switchThumbStyles(props) {
|
|
1624
|
-
let { $indeterminate } = props, { input } = getTheme_v2(props.theme), trackWidth = input.switch.width, trackHeight = input.switch.height, trackPadding = input.switch.padding, size = trackHeight - input.switch.padding * 2, checkedOffset = trackWidth - trackPadding * 2 - size, indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding, checked = $indeterminate !== !0 && props.$checked === !0;
|
|
1625
|
-
return css`&:not([hidden]){display:block;}position:absolute;left:${rem(trackPadding)};top:${rem(trackPadding)};height:${rem(size)};width:${rem(size)};border-radius:${rem(size / 2)};transition-property:transform;transition-duration:${input.switch.transitionDurationMs}ms;transition-timing-function:${input.switch.transitionTimingFunction};background:var(--switch-fg-color);transform:translate3d(0,0,0);box-shadow:0px 1px 0px 0px rgba(0,0,0,0.05);${checked && css`transform:translate3d(${checkedOffset}px,0,0);`} ${$indeterminate && css`transform:translate3d(${indeterminateOffset}px,0,0);`}`;
|
|
1626
|
-
}
|
|
1627
|
-
var switchInput = "cn60s71", switchRoot = "cn60s70";
|
|
1628
|
-
const Representation = /* @__PURE__ */ styled.span.withConfig({
|
|
1629
|
-
displayName: "Representation",
|
|
1630
|
-
componentId: "sc-ymdgpc-0"
|
|
1631
|
-
})(switchRepresentationStyles), Track = /* @__PURE__ */ styled.span.withConfig({
|
|
1632
|
-
displayName: "Track",
|
|
1633
|
-
componentId: "sc-ymdgpc-1"
|
|
1634
|
-
})(switchTrackStyles), Thumb = /* @__PURE__ */ styled.span.withConfig({
|
|
1635
|
-
displayName: "Thumb",
|
|
1636
|
-
componentId: "sc-ymdgpc-2"
|
|
1637
|
-
})(switchThumbStyles);
|
|
1638
|
-
/**
|
|
1639
|
-
* The `Switch` component allows the user to toggle a setting on and off.
|
|
1640
|
-
*
|
|
1641
|
-
* Extends all properties of an `<input type="checkbox" />` element, except type.
|
|
1642
|
-
*
|
|
1643
|
-
* @public
|
|
1644
|
-
*/
|
|
1867
|
+
const $ = c(26);
|
|
1868
|
+
let T0, T1, label, t0, t1, t2, t3, t4, t5, t6, t7;
|
|
1869
|
+
if ($[0] !== props) {
|
|
1870
|
+
const {
|
|
1871
|
+
className,
|
|
1872
|
+
style,
|
|
1873
|
+
label: t82,
|
|
1874
|
+
disabled,
|
|
1875
|
+
error,
|
|
1876
|
+
...rest
|
|
1877
|
+
} = getProps(props, radioProps);
|
|
1878
|
+
label = t82, T1 = Label, t2 = clsx(radioClassName, "sui-position-relative", className), t3 = style, t4 = "Radio", t5 = disabled, t6 = error, t7 = /* @__PURE__ */ jsx(VisuallyHidden, { as: "input", type: "radio", className: radioInputClassName, disabled, ...rest }), T0 = Box, t0 = "span", t1 = clsx(radioMarkClassName, error && "sui-error"), $[0] = props, $[1] = T0, $[2] = T1, $[3] = label, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = t5, $[10] = t6, $[11] = t7;
|
|
1879
|
+
} else
|
|
1880
|
+
T0 = $[1], T1 = $[2], label = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], t5 = $[9], t6 = $[10], t7 = $[11];
|
|
1881
|
+
let t8;
|
|
1882
|
+
$[12] !== T0 || $[13] !== t0 || $[14] !== t1 ? (t8 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, position: "relative", radius: "full", width: "17px", height: "17px" }), $[12] = T0, $[13] = t0, $[14] = t1, $[15] = t8) : t8 = $[15];
|
|
1883
|
+
let t9;
|
|
1884
|
+
return $[16] !== T1 || $[17] !== label || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxs(T1, { className: t2, style: t3, "data-ui": t4, disabled: t5, error: t6, children: [
|
|
1885
|
+
t7,
|
|
1886
|
+
t8,
|
|
1887
|
+
label
|
|
1888
|
+
] }), $[16] = T1, $[17] = label, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
|
|
1889
|
+
}
|
|
1890
|
+
const skipToContentProps = {
|
|
1891
|
+
label: {
|
|
1892
|
+
type: "string"
|
|
1893
|
+
}
|
|
1894
|
+
}, skipToContentClassName = suffixClassName("sui-SkipToContent");
|
|
1895
|
+
function SkipToContent(props) {
|
|
1896
|
+
const $ = c(18);
|
|
1897
|
+
let T0, label, rest, style, t0, t1, t2;
|
|
1898
|
+
if ($[0] !== props) {
|
|
1899
|
+
const {
|
|
1900
|
+
className,
|
|
1901
|
+
label: t32,
|
|
1902
|
+
style: t42,
|
|
1903
|
+
...t5
|
|
1904
|
+
} = getProps(props, skipToContentProps);
|
|
1905
|
+
label = t32, style = t42, rest = t5, T0 = VisuallyHidden, t0 = Link, t1 = !1, t2 = clsx(skipToContentClassName, "sui-position-absolute sui-top2 sui-left2 sui-display-inline-block sui-z-index sui-py2 sui-px3 sui-radius2 sui-text-body1", className), $[0] = props, $[1] = T0, $[2] = label, $[3] = rest, $[4] = style, $[5] = t0, $[6] = t1, $[7] = t2;
|
|
1906
|
+
} else
|
|
1907
|
+
T0 = $[1], label = $[2], rest = $[3], style = $[4], t0 = $[5], t1 = $[6], t2 = $[7];
|
|
1908
|
+
let t3;
|
|
1909
|
+
$[8] !== label ? (t3 = /* @__PURE__ */ jsx(Text, { size: 1, children: label }), $[8] = label, $[9] = t3) : t3 = $[9];
|
|
1910
|
+
let t4;
|
|
1911
|
+
return $[10] !== T0 || $[11] !== rest || $[12] !== style || $[13] !== t0 || $[14] !== t1 || $[15] !== t2 || $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(T0, { as: t0, underlined: t1, className: t2, style, "data-ui": "SkipToContent", visibleOnFocus: !0, ...rest, children: t3 }), $[10] = T0, $[11] = rest, $[12] = style, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4) : t4 = $[17], t4;
|
|
1912
|
+
}
|
|
1913
|
+
const switchProps = {
|
|
1914
|
+
error: {
|
|
1915
|
+
type: "boolean"
|
|
1916
|
+
},
|
|
1917
|
+
label: {
|
|
1918
|
+
type: "string"
|
|
1919
|
+
},
|
|
1920
|
+
...marginProps
|
|
1921
|
+
}, switchClassName = suffixClassName("sui-Switch"), switchInputClassName = suffixClassName("sui-SwitchInput"), switchMarkClassName = suffixClassName("sui-SwitchMark");
|
|
1645
1922
|
function Switch(props) {
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1923
|
+
const $ = c(26);
|
|
1924
|
+
let T0, T1, label, t0, t1, t2, t3, t4, t5, t6, t7;
|
|
1925
|
+
if ($[0] !== props) {
|
|
1926
|
+
const {
|
|
1927
|
+
className,
|
|
1928
|
+
style,
|
|
1929
|
+
disabled,
|
|
1930
|
+
error,
|
|
1931
|
+
label: t82,
|
|
1932
|
+
...rest
|
|
1933
|
+
} = getProps(props, switchProps);
|
|
1934
|
+
label = t82, T1 = Label, t2 = clsx(switchClassName, "sui-position-relative", className), t3 = style, t4 = "Switch", t5 = props.disabled, t6 = error, t7 = /* @__PURE__ */ jsx(VisuallyHidden, { as: "input", type: "checkbox", role: "switch", className: switchInputClassName, disabled, ...rest }), T0 = Flex, t0 = "span", t1 = clsx(switchMarkClassName, error && "sui-error"), $[0] = props, $[1] = T0, $[2] = T1, $[3] = label, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = t5, $[10] = t6, $[11] = t7;
|
|
1935
|
+
} else
|
|
1936
|
+
T0 = $[1], T1 = $[2], label = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], t5 = $[9], t6 = $[10], t7 = $[11];
|
|
1937
|
+
let t8;
|
|
1938
|
+
$[12] !== T0 || $[13] !== t0 || $[14] !== t1 ? (t8 = /* @__PURE__ */ jsx(T0, { as: t0, className: t1, alignItems: "center", radius: 6, "aria-hidden": "true" }), $[12] = T0, $[13] = t0, $[14] = t1, $[15] = t8) : t8 = $[15];
|
|
1939
|
+
let t9;
|
|
1940
|
+
return $[16] !== T1 || $[17] !== label || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxs(T1, { className: t2, style: t3, "data-ui": t4, disabled: t5, error: t6, children: [
|
|
1941
|
+
t7,
|
|
1942
|
+
t8,
|
|
1943
|
+
label
|
|
1944
|
+
] }), $[16] = T1, $[17] = label, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
|
|
1945
|
+
}
|
|
1946
|
+
const tooltipProps = {
|
|
1947
|
+
anchorName: {
|
|
1948
|
+
type: "string"
|
|
1949
|
+
},
|
|
1950
|
+
content: {
|
|
1951
|
+
type: "string"
|
|
1952
|
+
},
|
|
1953
|
+
portal: {
|
|
1954
|
+
type: "boolean"
|
|
1955
|
+
},
|
|
1956
|
+
...placementProps
|
|
1957
|
+
}, tooltipClassName = suffixClassName("sui-Tooltip");
|
|
1958
|
+
function TooltipRoot(t0) {
|
|
1959
|
+
const $ = c(7), {
|
|
1960
|
+
placement: t1,
|
|
1961
|
+
...props
|
|
1962
|
+
} = t0, placement = t1 === void 0 ? "bottom" : t1, {
|
|
1963
|
+
children,
|
|
1964
|
+
className,
|
|
1965
|
+
style,
|
|
1966
|
+
id: idProp,
|
|
1967
|
+
anchorName,
|
|
1968
|
+
content,
|
|
1969
|
+
portal,
|
|
1970
|
+
triggerProps: forwardedTriggerProps,
|
|
1971
|
+
...rest
|
|
1972
|
+
} = getProps({
|
|
1973
|
+
placement,
|
|
1974
|
+
...props
|
|
1975
|
+
}, tooltipProps), reactId = useId(), id = idProp || reactId, [dismissed, setDismissed] = useState(!1), isClient = useIsClient();
|
|
1976
|
+
let t2, t3;
|
|
1977
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = () => {
|
|
1978
|
+
setDismissed(!1);
|
|
1979
|
+
}, t3 = () => {
|
|
1980
|
+
setDismissed(!1);
|
|
1981
|
+
}, $[0] = t2, $[1] = t3) : (t2 = $[0], t3 = $[1]);
|
|
1982
|
+
const triggerProps = {
|
|
1983
|
+
"aria-describedby": id,
|
|
1984
|
+
interestfor: id,
|
|
1985
|
+
style: {
|
|
1986
|
+
anchorName: `--anchor-${anchorName || id}`
|
|
1987
|
+
},
|
|
1988
|
+
onMouseLeave: t2,
|
|
1989
|
+
onBlur: t3,
|
|
1990
|
+
onClick: () => {
|
|
1991
|
+
setDismissed(!0), document.getElementById(id)?.hidePopover();
|
|
1992
|
+
}
|
|
1993
|
+
}, trigger = children.type.forwardsTriggerProps ? cloneElement(children, {
|
|
1994
|
+
triggerProps
|
|
1995
|
+
}) : cloneElement(children, mergeTriggerProps(children.props, forwardedTriggerProps, triggerProps));
|
|
1996
|
+
let t4;
|
|
1997
|
+
$[2] !== dismissed ? (t4 = (e) => {
|
|
1998
|
+
e.newState === "open" && dismissed && e.preventDefault();
|
|
1999
|
+
}, $[2] = dismissed, $[3] = t4) : t4 = $[3];
|
|
2000
|
+
const handleBeforeToggle = t4, t5 = renderPortal(/* @__PURE__ */ jsx("div", { className: clsx(tooltipClassName, "sui-px2 sui-py1 sui-radius2 sui-position-fixed sui-shadow2", className), style: {
|
|
2001
|
+
...style,
|
|
2002
|
+
positionAnchor: `--anchor-${anchorName || id}`
|
|
2003
|
+
}, "data-ui": "Tooltip", role: "tooltip", popover: "hint", id, onBeforeToggle: handleBeforeToggle, ...rest, children: content }), isClient, portal);
|
|
2004
|
+
let t6;
|
|
2005
|
+
return $[4] !== t5 || $[5] !== trigger ? (t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2006
|
+
trigger,
|
|
2007
|
+
t5
|
|
2008
|
+
] }), $[4] = t5, $[5] = trigger, $[6] = t6) : t6 = $[6], t6;
|
|
2009
|
+
}
|
|
2010
|
+
const Tooltip = Object.assign(TooltipRoot, {
|
|
2011
|
+
forwardsTriggerProps: !0
|
|
2012
|
+
}), tooltipGroupProps = {
|
|
2013
|
+
as: {
|
|
2014
|
+
type: "string"
|
|
2015
|
+
}
|
|
2016
|
+
}, tooltipGroupClassName = suffixClassName("sui-TooltipGroup");
|
|
2017
|
+
function TooltipGroup(props) {
|
|
2018
|
+
const $ = c(17), {
|
|
2019
|
+
as,
|
|
2020
|
+
children,
|
|
2021
|
+
className,
|
|
2022
|
+
style,
|
|
2023
|
+
...rest
|
|
2024
|
+
} = getProps(props, tooltipGroupProps), Component = as || "div", ref = useRef(null), [isActive, setIsActive] = useState(!1);
|
|
2025
|
+
let t0;
|
|
2026
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = (e) => {
|
|
2027
|
+
const tooltip = e.target.closest('[data-ui="Tooltip"]');
|
|
2028
|
+
tooltip && e.propertyName === "opacity" && window.getComputedStyle(tooltip).opacity !== "0" && setIsActive(!0);
|
|
2029
|
+
}, $[0] = t0) : t0 = $[0];
|
|
2030
|
+
const handleTransitionEnd = t0;
|
|
2031
|
+
let t1;
|
|
2032
|
+
$[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => {
|
|
2033
|
+
setIsActive(!1);
|
|
2034
|
+
}, $[1] = t1) : t1 = $[1];
|
|
2035
|
+
const handleMouseLeave = t1;
|
|
2036
|
+
let t2;
|
|
2037
|
+
$[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (e_0) => {
|
|
2038
|
+
ref.current && ref.current.contains(e_0.relatedTarget) || setIsActive(!1);
|
|
2039
|
+
}, $[2] = t2) : t2 = $[2];
|
|
2040
|
+
const handleBlur = t2, t3 = clsx(tooltipGroupClassName, className);
|
|
2041
|
+
let t4;
|
|
2042
|
+
$[3] !== isActive ? (t4 = isActive && {
|
|
2043
|
+
"--tooltip-delay-group": "0ms"
|
|
2044
|
+
}, $[3] = isActive, $[4] = t4) : t4 = $[4];
|
|
2045
|
+
let t5;
|
|
2046
|
+
$[5] !== style || $[6] !== t4 ? (t5 = {
|
|
2047
|
+
...style,
|
|
2048
|
+
...t4
|
|
2049
|
+
}, $[5] = style, $[6] = t4, $[7] = t5) : t5 = $[7];
|
|
2050
|
+
let t6;
|
|
2051
|
+
return $[8] !== Component || $[9] !== children || $[10] !== handleBlur || $[11] !== handleMouseLeave || $[12] !== handleTransitionEnd || $[13] !== rest || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Component, { className: t3, style: t5, "data-ui": "TooltipGroup", ref, onTransitionEnd: handleTransitionEnd, onMouseLeave: handleMouseLeave, onBlur: handleBlur, ...rest, children }), $[8] = Component, $[9] = children, $[10] = handleBlur, $[11] = handleMouseLeave, $[12] = handleTransitionEnd, $[13] = rest, $[14] = t3, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
|
|
2052
|
+
}
|
|
2053
|
+
const badgeProps = {
|
|
2054
|
+
as: {
|
|
2055
|
+
type: "string"
|
|
2056
|
+
},
|
|
2057
|
+
iconStart: {
|
|
2058
|
+
type: "string"
|
|
2059
|
+
},
|
|
2060
|
+
text: {
|
|
2061
|
+
type: "string"
|
|
2062
|
+
},
|
|
2063
|
+
...toneProps
|
|
2064
|
+
}, badgeClassName = suffixClassName("sui-Badge");
|
|
2065
|
+
function Badge(t0) {
|
|
2066
|
+
const $ = c(20);
|
|
2067
|
+
let T0, children, t1, t2, t3, t4, t5, text;
|
|
2068
|
+
if ($[0] !== t0) {
|
|
2069
|
+
const {
|
|
2070
|
+
tone: t62,
|
|
2071
|
+
...props
|
|
2072
|
+
} = t0, tone = t62 === void 0 ? "neutral" : t62, {
|
|
2073
|
+
as,
|
|
2074
|
+
children: t72,
|
|
2075
|
+
className,
|
|
2076
|
+
style,
|
|
2077
|
+
iconStart: IconStart,
|
|
2078
|
+
text: t8,
|
|
2079
|
+
...rest
|
|
2080
|
+
} = getProps({
|
|
2081
|
+
tone,
|
|
2082
|
+
...props
|
|
2083
|
+
}, badgeProps);
|
|
2084
|
+
children = t72, text = t8;
|
|
2085
|
+
const Component = as || "span", badgeClasses = clsx(badgeClassName, `${IconStart ? "sui-p1" : "sui-px2 sui-py1"} sui-radius-full sui-display-inline-flex sui-align-items-center sui-gap1`);
|
|
2086
|
+
T0 = Component, t1 = clsx(badgeClasses, className), t2 = style, t3 = "Badge", t4 = rest, t5 = IconStart && (isValidElement(IconStart) ? IconStart : /* @__PURE__ */ jsx(Icon, { icon: IconStart, marginX: -1, marginY: -2, size: 0 })), $[0] = t0, $[1] = T0, $[2] = children, $[3] = t1, $[4] = t2, $[5] = t3, $[6] = t4, $[7] = t5, $[8] = text;
|
|
2087
|
+
} else
|
|
2088
|
+
T0 = $[1], children = $[2], t1 = $[3], t2 = $[4], t3 = $[5], t4 = $[6], t5 = $[7], text = $[8];
|
|
2089
|
+
let t6;
|
|
2090
|
+
$[9] !== text ? (t6 = text && /* @__PURE__ */ jsx(Text, { size: 1, trim: !0, children: text }), $[9] = text, $[10] = t6) : t6 = $[10];
|
|
2091
|
+
let t7;
|
|
2092
|
+
return $[11] !== T0 || $[12] !== children || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0, { className: t1, style: t2, "data-ui": t3, ...t4, children: [
|
|
2093
|
+
t5,
|
|
2094
|
+
t6,
|
|
2095
|
+
children
|
|
2096
|
+
] }), $[11] = T0, $[12] = children, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
|
|
2097
|
+
}
|
|
2098
|
+
export {
|
|
2099
|
+
Badge,
|
|
2100
|
+
Box,
|
|
2101
|
+
Button,
|
|
2102
|
+
Card,
|
|
2103
|
+
Checkbox,
|
|
2104
|
+
Code,
|
|
2105
|
+
Container,
|
|
2106
|
+
Dialog,
|
|
2107
|
+
Divider,
|
|
2108
|
+
Eyebrow,
|
|
2109
|
+
Flex,
|
|
2110
|
+
Grid,
|
|
2111
|
+
HStack,
|
|
2112
|
+
Heading,
|
|
2113
|
+
Icon,
|
|
2114
|
+
IconButton,
|
|
2115
|
+
Indicator,
|
|
2116
|
+
IndicatorStack,
|
|
2117
|
+
Inline,
|
|
2118
|
+
Label,
|
|
2119
|
+
Link,
|
|
2120
|
+
List,
|
|
2121
|
+
Popover,
|
|
2122
|
+
PressArea,
|
|
2123
|
+
Radio,
|
|
2124
|
+
SkipToContent,
|
|
2125
|
+
Spinner,
|
|
2126
|
+
Switch,
|
|
2127
|
+
Text,
|
|
2128
|
+
Tooltip,
|
|
2129
|
+
TooltipGroup,
|
|
2130
|
+
VStack,
|
|
2131
|
+
VisuallyHidden,
|
|
2132
|
+
useIsClient
|
|
1833
2133
|
};
|
|
1834
|
-
|
|
1835
|
-
* @public
|
|
1836
|
-
*/
|
|
1837
|
-
function PortalProvider(props) {
|
|
1838
|
-
let $ = c(7), { boundaryElement, children, element, __unstable_elements: elements } = props, fallbackElement = useSyncExternalStore(emptySubscribe, _temp, _temp2), t0 = boundaryElement || null, t1 = element || fallbackElement, t2;
|
|
1839
|
-
$[0] !== elements || $[1] !== t0 || $[2] !== t1 ? (t2 = {
|
|
1840
|
-
version: 0,
|
|
1841
|
-
boundaryElement: t0,
|
|
1842
|
-
element: t1,
|
|
1843
|
-
elements
|
|
1844
|
-
}, $[0] = elements, $[1] = t0, $[2] = t1, $[3] = t2) : t2 = $[3];
|
|
1845
|
-
let value = t2, t3;
|
|
1846
|
-
return $[4] !== children || $[5] !== value ? (t3 = /* @__PURE__ */ jsx(PortalContext.Provider, {
|
|
1847
|
-
value,
|
|
1848
|
-
children
|
|
1849
|
-
}), $[4] = children, $[5] = value, $[6] = t3) : t3 = $[6], t3;
|
|
1850
|
-
}
|
|
1851
|
-
function _temp2() {
|
|
1852
|
-
return null;
|
|
1853
|
-
}
|
|
1854
|
-
function _temp() {
|
|
1855
|
-
return document.body;
|
|
1856
|
-
}
|
|
1857
|
-
const emptySubscribe = () => () => {};
|
|
1858
|
-
var srOnly = "_1omd6w40";
|
|
1859
|
-
/**
|
|
1860
|
-
* @public
|
|
1861
|
-
*/
|
|
1862
|
-
function SrOnly(props) {
|
|
1863
|
-
let $ = c(4), { as: t0, children, ref } = props, Component = t0 === void 0 ? "div" : t0, t1;
|
|
1864
|
-
return $[0] !== Component || $[1] !== children || $[2] !== ref ? (t1 = /* @__PURE__ */ jsx(Component, {
|
|
1865
|
-
"aria-hidden": !0,
|
|
1866
|
-
className: srOnly,
|
|
1867
|
-
"data-ui": "SrOnly",
|
|
1868
|
-
ref,
|
|
1869
|
-
children
|
|
1870
|
-
}), $[0] = Component, $[1] = children, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
|
|
1871
|
-
}
|
|
1872
|
-
var virtualList = "woi5yn0", virtualListItem = "woi5yn1";
|
|
1873
|
-
/**
|
|
1874
|
-
* @beta
|
|
1875
|
-
*/
|
|
1876
|
-
function VirtualList(props) {
|
|
1877
|
-
let $ = c(49), className, forwardedRef, getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
1878
|
-
$[0] === props ? (className = $[1], forwardedRef = $[2], getItemKey = $[3], onChange = $[4], renderItem = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9]) : ({as: t0, className, gap: t1, getItemKey, items: t2, onChange, ref: forwardedRef, renderItem, ...restProps} = props, $[0] = props, $[1] = className, $[2] = forwardedRef, $[3] = getItemKey, $[4] = onChange, $[5] = renderItem, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2);
|
|
1879
|
-
let as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1, t3;
|
|
1880
|
-
$[10] === t2 ? t3 = $[11] : (t3 = t2 === void 0 ? [] : t2, $[10] = t2, $[11] = t3);
|
|
1881
|
-
let items = t3, { space } = useTheme_v2(), ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1), t4;
|
|
1882
|
-
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[12] = t4) : t4 = $[12], useImperativeHandle(forwardedRef, t4);
|
|
1883
|
-
let t5;
|
|
1884
|
-
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
|
|
1885
|
-
if (!wrapperRef.current) return;
|
|
1886
|
-
let firstElement = wrapperRef.current.firstChild;
|
|
1887
|
-
firstElement instanceof HTMLElement && setItemHeight(firstElement.offsetHeight);
|
|
1888
|
-
}, $[13] = t5) : t5 = $[13];
|
|
1889
|
-
let t6;
|
|
1890
|
-
$[14] === renderItem ? t6 = $[15] : (t6 = [renderItem], $[14] = renderItem, $[15] = t6), useEffect(t5, t6);
|
|
1891
|
-
let t7, t8;
|
|
1892
|
-
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => {
|
|
1893
|
-
if (!ref.current) return;
|
|
1894
|
-
let scrollEl = findScrollable(ref.current.parentNode);
|
|
1895
|
-
if (scrollEl) {
|
|
1896
|
-
if (!(scrollEl instanceof HTMLElement)) return;
|
|
1897
|
-
let handleScroll = () => {
|
|
1898
|
-
setScrollTop(scrollEl.scrollTop);
|
|
1899
|
-
};
|
|
1900
|
-
scrollEl.addEventListener("scroll", handleScroll, { passive: !0 });
|
|
1901
|
-
let ro = new ResizeObserver((entries) => {
|
|
1902
|
-
setScrollHeight(entries[0].contentRect.height);
|
|
1903
|
-
});
|
|
1904
|
-
return ro.observe(scrollEl), handleScroll(), () => {
|
|
1905
|
-
scrollEl.removeEventListener("scroll", handleScroll), ro.unobserve(scrollEl), ro.disconnect();
|
|
1906
|
-
};
|
|
1907
|
-
}
|
|
1908
|
-
let handleScroll_0 = () => {
|
|
1909
|
-
setScrollTop(window.scrollY);
|
|
1910
|
-
}, handleResize = () => {
|
|
1911
|
-
setScrollHeight(window.innerHeight);
|
|
1912
|
-
};
|
|
1913
|
-
return window.addEventListener("scroll", handleScroll_0, { passive: !0 }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
|
|
1914
|
-
window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
|
|
1915
|
-
};
|
|
1916
|
-
}, t8 = [], $[16] = t7, $[17] = t8) : (t7 = $[16], t8 = $[17]), useEffect(t7, t8);
|
|
1917
|
-
let len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0, t10, t9;
|
|
1918
|
-
$[18] !== fromIndex || $[19] !== gap || $[20] !== itemHeight || $[21] !== onChange || $[22] !== scrollHeight || $[23] !== scrollTop || $[24] !== space || $[25] !== toIndex ? (t9 = () => {
|
|
1919
|
-
onChange && onChange({
|
|
1920
|
-
fromIndex,
|
|
1921
|
-
gap: space[gap],
|
|
1922
|
-
itemHeight,
|
|
1923
|
-
scrollHeight,
|
|
1924
|
-
scrollTop,
|
|
1925
|
-
toIndex
|
|
1926
|
-
});
|
|
1927
|
-
}, t10 = [
|
|
1928
|
-
fromIndex,
|
|
1929
|
-
gap,
|
|
1930
|
-
itemHeight,
|
|
1931
|
-
onChange,
|
|
1932
|
-
scrollHeight,
|
|
1933
|
-
scrollTop,
|
|
1934
|
-
space,
|
|
1935
|
-
toIndex
|
|
1936
|
-
], $[18] = fromIndex, $[19] = gap, $[20] = itemHeight, $[21] = onChange, $[22] = scrollHeight, $[23] = scrollTop, $[24] = space, $[25] = toIndex, $[26] = t10, $[27] = t9) : (t10 = $[26], t9 = $[27]), useEffect(t9, t10);
|
|
1937
|
-
let t11;
|
|
1938
|
-
$[28] !== fromIndex || $[29] !== gap || $[30] !== getItemKey || $[31] !== itemHeight || $[32] !== items || $[33] !== renderItem || $[34] !== space || $[35] !== toIndex ? (t11 = {
|
|
1939
|
-
fromIndex,
|
|
1940
|
-
gap,
|
|
1941
|
-
itemHeight,
|
|
1942
|
-
space,
|
|
1943
|
-
toIndex,
|
|
1944
|
-
getItemKey,
|
|
1945
|
-
items,
|
|
1946
|
-
renderItem
|
|
1947
|
-
}, $[28] = fromIndex, $[29] = gap, $[30] = getItemKey, $[31] = itemHeight, $[32] = items, $[33] = renderItem, $[34] = space, $[35] = toIndex, $[36] = t11) : t11 = $[36];
|
|
1948
|
-
let children = useChildren(t11), Component = as, t12;
|
|
1949
|
-
$[37] === className ? t12 = $[38] : (t12 = clsx(virtualList, className), $[37] = className, $[38] = t12);
|
|
1950
|
-
let t13;
|
|
1951
|
-
$[39] === height ? t13 = $[40] : (t13 = { height }, $[39] = height, $[40] = t13);
|
|
1952
|
-
let t14;
|
|
1953
|
-
$[41] !== children || $[42] !== t13 ? (t14 = /* @__PURE__ */ jsx("div", {
|
|
1954
|
-
ref: wrapperRef,
|
|
1955
|
-
style: t13,
|
|
1956
|
-
children
|
|
1957
|
-
}), $[41] = children, $[42] = t13, $[43] = t14) : t14 = $[43];
|
|
1958
|
-
let t15;
|
|
1959
|
-
return $[44] !== Component || $[45] !== restProps || $[46] !== t12 || $[47] !== t14 ? (t15 = /* @__PURE__ */ jsx(Component, {
|
|
1960
|
-
className: t12,
|
|
1961
|
-
"data-ui": "VirtualList",
|
|
1962
|
-
ref,
|
|
1963
|
-
...restProps,
|
|
1964
|
-
children: t14
|
|
1965
|
-
}), $[44] = Component, $[45] = restProps, $[46] = t12, $[47] = t14, $[48] = t15) : t15 = $[48], t15;
|
|
1966
|
-
}
|
|
1967
|
-
function useChildren(t0) {
|
|
1968
|
-
let $ = c(21), { fromIndex, gap, getItemKey, itemHeight, items, renderItem, space, toIndex } = t0;
|
|
1969
|
-
if (!renderItem || items.length === 0) return null;
|
|
1970
|
-
if (itemHeight === -1) {
|
|
1971
|
-
let t1;
|
|
1972
|
-
$[0] !== items[0] || $[1] !== renderItem ? (t1 = renderItem(items[0]), $[0] = items[0], $[1] = renderItem, $[2] = t1) : t1 = $[2];
|
|
1973
|
-
let t2;
|
|
1974
|
-
return $[3] === t1 ? t2 = $[4] : (t2 = [/* @__PURE__ */ jsx("div", {
|
|
1975
|
-
className: virtualListItem,
|
|
1976
|
-
children: t1
|
|
1977
|
-
}, 0)], $[3] = t1, $[4] = t2), t2;
|
|
1978
|
-
}
|
|
1979
|
-
let t1;
|
|
1980
|
-
if ($[5] !== fromIndex || $[6] !== gap || $[7] !== getItemKey || $[8] !== itemHeight || $[9] !== items || $[10] !== renderItem || $[11] !== space || $[12] !== toIndex) {
|
|
1981
|
-
let t2;
|
|
1982
|
-
$[14] !== fromIndex || $[15] !== gap || $[16] !== getItemKey || $[17] !== itemHeight || $[18] !== renderItem || $[19] !== space ? (t2 = (item, _itemIndex) => {
|
|
1983
|
-
let itemIndex = fromIndex + _itemIndex, node = renderItem(item), key = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
1984
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1985
|
-
className: virtualListItem,
|
|
1986
|
-
style: { top: itemIndex * (itemHeight + space[gap]) },
|
|
1987
|
-
children: node
|
|
1988
|
-
}, key);
|
|
1989
|
-
}, $[14] = fromIndex, $[15] = gap, $[16] = getItemKey, $[17] = itemHeight, $[18] = renderItem, $[19] = space, $[20] = t2) : t2 = $[20], t1 = items.slice(fromIndex, toIndex).map(t2), $[5] = fromIndex, $[6] = gap, $[7] = getItemKey, $[8] = itemHeight, $[9] = items, $[10] = renderItem, $[11] = space, $[12] = toIndex, $[13] = t1;
|
|
1990
|
-
} else t1 = $[13];
|
|
1991
|
-
return t1;
|
|
1992
|
-
}
|
|
1993
|
-
function findScrollable(parentNode) {
|
|
1994
|
-
let _scrollEl = parentNode;
|
|
1995
|
-
for (; _scrollEl && !_isScrollable(_scrollEl);) _scrollEl = _scrollEl.parentNode;
|
|
1996
|
-
return _scrollEl;
|
|
1997
|
-
}
|
|
1998
|
-
export { Arrow, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Button, Card, Checkbox, CodeSkeleton, ConditionalWrapper, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Tree, TreeItem, VirtualList, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useClickOutsideEvent, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMatchMedia, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useTree };
|
|
1999
|
-
|
|
2000
|
-
//# sourceMappingURL=index.js.map
|
|
2134
|
+
//# sourceMappingURL=index.js.map
|