@sanity/ui 3.3.6 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/tabList.js +16 -16
- package/dist/_chunks/tabList.js.map +1 -1
- package/dist/_chunks/tabList.mjs +14 -12
- package/dist/_chunks/tabList.mjs.map +1 -1
- package/dist/_chunks/useTheme.d.mts +5 -5
- package/dist/_chunks/useTheme.d.ts +5 -5
- package/dist/index.d.mts +6 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { X as getTheme_v2 } from "./_chunks/theme.mjs";
|
|
2
2
|
import { $ as responsiveInputPaddingStyle, A as useMediaIndex, At as parseColor, B as _cardColorStyle, C as BoundaryElementContext, Ct as isHTMLTextAreaElement, D as Grid, Dt as hexToRgb, E as Inline, Et as createColorTheme, F as _ResizeObserver, Ft as studioTheme, G as SpanWithTextOverflow, H as Flex, I as useCustomValidity, J as textInputBaseStyle, K as responsiveRadiusStyle, L as useClickOutsideEvent, M as useGlobalKeyDown, Mt as rgbToHsl, N as useElementSize, Nt as rgba, O as usePrefersReducedMotion, Ot as hslToRgb, P as _elementSizeObserver, Pt as screen, Q as responsiveInputPaddingIconRightStyle, R as Card, S as isRecord, St as isHTMLSelectElement, T as KBD, Tt as EMPTY_RECORD, U as Text, V as Spinner, W as Box, X as textInputRepresentationStyle, Y as textInputFontSizeStyle, Z as textInputRootStyle, _ as usePortal, _t as containsOrEqualsElement, a as MenuDivider, at as useRootTheme, b as LayerProvider, bt as isHTMLElement, c as Tooltip, ct as responsiveTextFont, d as useDelayedState, dt as _fillCSSObject, et as focusRingBorderStyle, f as TextInput, ft as _getArrayProp, g as Portal, gt as _isEnterToClickElement, h as PortalProvider, ht as rem, i as MenuGroup, it as ThemeColorProvider, j as useMatchMedia, jt as rgbToHex, k as usePrefersDark, kt as multiply, l as useTooltipDelayGroup, lt as responsiveTextAlignStyle, m as Popover, mt as _responsive, n as Tab, nt as useTheme, o as Menu, ot as ThemeProvider, p as Stack, pt as _getResponsiveSpace, q as responsivePaddingStyle, r as MenuItem, rt as useTheme_v2, s as Hotkeys, st as createGlobalScopedContext, t as TabList, tt as focusRingStyle, u as TooltipDelayGroupContext, ut as responsiveFont, v as Layer, vt as isHTMLAnchorElement, w as Arrow, wt as EMPTY_ARRAY, x as useBoundaryElement, xt as isHTMLInputElement, y as useLayer, yt as isHTMLButtonElement, z as Button } from "./_chunks/tabList.mjs";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
|
|
5
5
|
import { Children, Component, Fragment, Suspense, cloneElement, forwardRef, isValidElement, lazy, startTransition, useContext, useEffect, useId, useImperativeHandle, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
6
6
|
import ReactIs from "react-is";
|
|
7
7
|
import { css, keyframes, styled } from "styled-components";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { SpinnerIcon } from "@sanity/icons/Spinner";
|
|
10
|
+
import { CheckmarkIcon } from "@sanity/icons/Checkmark";
|
|
11
|
+
import { RemoveIcon } from "@sanity/icons/Remove";
|
|
9
12
|
import { AnimatePresence, motion } from "motion/react";
|
|
13
|
+
import { CloseIcon } from "@sanity/icons/Close";
|
|
14
|
+
import { ToggleArrowRightIcon } from "@sanity/icons/ToggleArrowRight";
|
|
10
15
|
/**
|
|
11
16
|
* @internal
|
|
12
17
|
*/
|
|
@@ -637,10 +642,10 @@ function inputElementStyles(props) {
|
|
|
637
642
|
}
|
|
638
643
|
const StyledCheckbox = /* @__PURE__ */ styled.div.withConfig({
|
|
639
644
|
displayName: "StyledCheckbox",
|
|
640
|
-
componentId: "sc-
|
|
645
|
+
componentId: "sc-eqpl40-0"
|
|
641
646
|
})(checkboxBaseStyles), Input$4 = /* @__PURE__ */ styled.input.withConfig({
|
|
642
647
|
displayName: "Input",
|
|
643
|
-
componentId: "sc-
|
|
648
|
+
componentId: "sc-eqpl40-1"
|
|
644
649
|
})(inputElementStyles), Checkbox = forwardRef(function(props, forwardedRef) {
|
|
645
650
|
let $ = c(25), checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
|
|
646
651
|
$[0] === props ? (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]) : ({checked, className, disabled, indeterminate, customValidity, readOnly, style, ...restProps} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style);
|
|
@@ -1159,13 +1164,13 @@ const selectStyle = {
|
|
|
1159
1164
|
iconBox: iconBoxStyle
|
|
1160
1165
|
}, StyledSelect = /* @__PURE__ */ styled.div.withConfig({
|
|
1161
1166
|
displayName: "StyledSelect",
|
|
1162
|
-
componentId: "sc-
|
|
1167
|
+
componentId: "sc-gi1uze-0"
|
|
1163
1168
|
})(selectStyle.root), Input$2 = /* @__PURE__ */ styled.select.withConfig({
|
|
1164
1169
|
displayName: "Input",
|
|
1165
|
-
componentId: "sc-
|
|
1170
|
+
componentId: "sc-gi1uze-1"
|
|
1166
1171
|
})(selectStyle.input), IconBox = /* @__PURE__ */ styled(Box).withConfig({
|
|
1167
1172
|
displayName: "IconBox",
|
|
1168
|
-
componentId: "sc-
|
|
1173
|
+
componentId: "sc-gi1uze-2"
|
|
1169
1174
|
})(selectStyle.iconBox), Select = forwardRef(function(props, forwardedRef) {
|
|
1170
1175
|
let $ = c(38), children, customValidity, disabled, gap, readOnly, restProps, t0, t1, t2, t3;
|
|
1171
1176
|
$[0] === props ? (children = $[1], customValidity = $[2], disabled = $[3], gap = $[4], readOnly = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10]) : ({children, customValidity, disabled, fontSize: t0, gap, padding: t1, radius: t2, readOnly, space: t3, ...restProps} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = gap, $[5] = readOnly, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3);
|
|
@@ -1365,13 +1370,13 @@ TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
|
1365
1370
|
*/
|
|
1366
1371
|
const StyledAutocomplete = styled.div.withConfig({
|
|
1367
1372
|
displayName: "StyledAutocomplete",
|
|
1368
|
-
componentId: "sc-
|
|
1373
|
+
componentId: "sc-hv7uk8-0"
|
|
1369
1374
|
})`line-height:0;`, ListBox = styled(Box).withConfig({
|
|
1370
1375
|
displayName: "ListBox",
|
|
1371
|
-
componentId: "sc-
|
|
1376
|
+
componentId: "sc-hv7uk8-1"
|
|
1372
1377
|
})`& > ul{list-style:none;padding:0;margin:0;}`, rotate = keyframes`from{transform:rotate(0deg);}to{transform:rotate(360deg);}`, AnimatedSpinnerIcon = styled(SpinnerIcon).withConfig({
|
|
1373
1378
|
displayName: "AnimatedSpinnerIcon",
|
|
1374
|
-
componentId: "sc-
|
|
1379
|
+
componentId: "sc-hv7uk8-2"
|
|
1375
1380
|
})`animation:${rotate} 500ms linear infinite;`;
|
|
1376
1381
|
function AutocompleteOption(props) {
|
|
1377
1382
|
let $ = c(11), { children, id, onSelect, selected, value } = props, t0;
|
|
@@ -1955,25 +1960,25 @@ function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
|
1955
1960
|
}
|
|
1956
1961
|
const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
1957
1962
|
displayName: "StyledDialog",
|
|
1958
|
-
componentId: "sc-
|
|
1963
|
+
componentId: "sc-r9i1m3-0"
|
|
1959
1964
|
})(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styled(Container).withConfig({
|
|
1960
1965
|
displayName: "DialogContainer",
|
|
1961
|
-
componentId: "sc-
|
|
1966
|
+
componentId: "sc-r9i1m3-1"
|
|
1962
1967
|
})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`, DialogCardRoot = styled(Card).withConfig({
|
|
1963
1968
|
displayName: "DialogCardRoot",
|
|
1964
|
-
componentId: "sc-
|
|
1969
|
+
componentId: "sc-r9i1m3-2"
|
|
1965
1970
|
})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`, DialogLayout = styled(Flex).withConfig({
|
|
1966
1971
|
displayName: "DialogLayout",
|
|
1967
|
-
componentId: "sc-
|
|
1972
|
+
componentId: "sc-r9i1m3-3"
|
|
1968
1973
|
})`flex:1;min-height:0;width:100%;`, DialogHeader = styled(Box).withConfig({
|
|
1969
1974
|
displayName: "DialogHeader",
|
|
1970
|
-
componentId: "sc-
|
|
1975
|
+
componentId: "sc-r9i1m3-4"
|
|
1971
1976
|
})`position:relative;z-index:2;`, DialogContent = styled(Box).withConfig({
|
|
1972
1977
|
displayName: "DialogContent",
|
|
1973
|
-
componentId: "sc-
|
|
1978
|
+
componentId: "sc-r9i1m3-5"
|
|
1974
1979
|
})`position:relative;z-index:1;overflow:auto;outline:none;`, DialogFooter = styled(Box).withConfig({
|
|
1975
1980
|
displayName: "DialogFooter",
|
|
1976
|
-
componentId: "sc-
|
|
1981
|
+
componentId: "sc-r9i1m3-6"
|
|
1977
1982
|
})`position:relative;z-index:3;`, DialogCard = forwardRef(function(props, forwardedRef) {
|
|
1978
1983
|
let $ = c(44), { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, children, contentRef: forwardedContentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: radiusProp, scheme, shadow: shadowProp, width: widthProp } = props, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, t0;
|
|
1979
1984
|
$[0] === radiusProp ? t0 = $[1] : (t0 = _getArrayProp(radiusProp), $[0] = radiusProp, $[1] = t0);
|
|
@@ -2923,13 +2928,13 @@ function TreeGroup(props) {
|
|
|
2923
2928
|
}
|
|
2924
2929
|
const StyledTreeItem = /* @__PURE__ */ styled.li.withConfig({
|
|
2925
2930
|
displayName: "StyledTreeItem",
|
|
2926
|
-
componentId: "sc-
|
|
2931
|
+
componentId: "sc-arsnlr-0"
|
|
2927
2932
|
})(treeItemRootStyle, treeItemRootColorStyle), TreeItemBox = /* @__PURE__ */ styled(Box).attrs({ forwardedAs: "a" }).withConfig({
|
|
2928
2933
|
displayName: "TreeItemBox",
|
|
2929
|
-
componentId: "sc-
|
|
2934
|
+
componentId: "sc-arsnlr-1"
|
|
2930
2935
|
})(treeItemBoxStyle), ToggleArrowText = styled(Text).withConfig({
|
|
2931
2936
|
displayName: "ToggleArrowText",
|
|
2932
|
-
componentId: "sc-
|
|
2937
|
+
componentId: "sc-arsnlr-2"
|
|
2933
2938
|
})`& > svg{transition:transform 100ms;}`;
|
|
2934
2939
|
/**
|
|
2935
2940
|
* This API might change. DO NOT USE IN PRODUCTION.
|