@sanity/ui 2.0.0-beta.4 → 2.0.0-beta.6
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/index.cjs.mjs +1 -0
- package/dist/index.d.ts +69 -30
- package/dist/index.esm.js +776 -318
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +777 -319
- package/dist/index.js.map +1 -1
- package/dist/theme.esm.js +21 -21
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +21 -21
- package/dist/theme.js.map +1 -1
- package/package.json +6 -4
- package/src/core/constants.ts +18 -0
- package/src/core/middleware/origin.ts +47 -0
- package/src/core/primitives/badge/badge.tsx +1 -3
- package/src/core/primitives/popover/popover.tsx +67 -13
- package/src/core/primitives/popover/popoverCard.tsx +26 -15
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +46 -56
- package/src/core/primitives/tooltip/tooltipCard.tsx +104 -0
- package/src/core/styles/card/_cardColorStyle.ts +2 -0
- package/src/core/{primitives/tooltip → utils/conditionalWrapper}/conditionalWrapper.tsx +3 -0
- package/src/core/utils/conditionalWrapper/index.ts +1 -0
- package/src/core/utils/index.ts +1 -0
- package/src/theme/defaults/colorTokens.ts +21 -21
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { buildTheme, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1, getTheme_v2, getScopedTheme } from '@sanity/ui/theme';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo, useState, useRef, useEffect, createContext, useContext, useSyncExternalStore, useLayoutEffect, forwardRef, useId, useCallback, cloneElement, isValidElement, createElement, Component, memo, useReducer, Children, Fragment as Fragment$1, startTransition } from 'react';
|
|
4
|
-
import ReactIs, { isElement as isElement$1, isFragment, isValidElementType } from 'react-is';
|
|
5
4
|
import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, keyframes } from 'styled-components';
|
|
6
5
|
import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
|
|
7
6
|
import Refractor from 'react-refractor';
|
|
8
7
|
import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from '@floating-ui/react-dom';
|
|
8
|
+
import { motion, AnimatePresence } from 'framer-motion';
|
|
9
9
|
import { createPortal } from 'react-dom';
|
|
10
|
-
import { AnimatePresence, motion } from 'framer-motion';
|
|
11
10
|
const createColorTheme = createColorTheme$1;
|
|
12
11
|
const hexToRgb = hexToRgb$1;
|
|
13
12
|
const hslToRgb = hslToRgb$1;
|
|
@@ -18,8 +17,370 @@ const rgbToHsl = rgbToHsl$1;
|
|
|
18
17
|
const rgba = rgba$1;
|
|
19
18
|
const screen = screen$1;
|
|
20
19
|
const studioTheme = buildTheme();
|
|
20
|
+
function getDefaultExportFromCjs(x) {
|
|
21
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
22
|
+
}
|
|
23
|
+
var reactIs = {
|
|
24
|
+
exports: {}
|
|
25
|
+
};
|
|
26
|
+
var reactIs_development = {};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @license React
|
|
30
|
+
* react-is.development.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
var hasRequiredReactIs_development;
|
|
39
|
+
function requireReactIs_development() {
|
|
40
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
41
|
+
hasRequiredReactIs_development = 1;
|
|
42
|
+
if (process.env.NODE_ENV !== "production") {
|
|
43
|
+
(function () {
|
|
44
|
+
// ATTENTION
|
|
45
|
+
// When adding new symbols to this file,
|
|
46
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
47
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
48
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
49
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
50
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
51
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
52
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
53
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
54
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
55
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
|
56
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
57
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
58
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
59
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
60
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
61
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
62
|
+
|
|
63
|
+
// -----------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
66
|
+
var enableCacheElement = false;
|
|
67
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
68
|
+
|
|
69
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
70
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
71
|
+
// issues in DEV builds.
|
|
72
|
+
|
|
73
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
74
|
+
|
|
75
|
+
var REACT_MODULE_REFERENCE;
|
|
76
|
+
{
|
|
77
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
78
|
+
}
|
|
79
|
+
function isValidElementType(type) {
|
|
80
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
81
|
+
return true;
|
|
82
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
83
|
+
|
|
84
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
if (typeof type === 'object' && type !== null) {
|
|
88
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE ||
|
|
89
|
+
// This needs to include all possible module reference object
|
|
90
|
+
// types supported by any Flight configuration anywhere since
|
|
91
|
+
// we don't know which Flight build this will end up being used
|
|
92
|
+
// with.
|
|
93
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
function typeOf(object) {
|
|
100
|
+
if (typeof object === 'object' && object !== null) {
|
|
101
|
+
var $$typeof = object.$$typeof;
|
|
102
|
+
switch ($$typeof) {
|
|
103
|
+
case REACT_ELEMENT_TYPE:
|
|
104
|
+
var type = object.type;
|
|
105
|
+
switch (type) {
|
|
106
|
+
case REACT_FRAGMENT_TYPE:
|
|
107
|
+
case REACT_PROFILER_TYPE:
|
|
108
|
+
case REACT_STRICT_MODE_TYPE:
|
|
109
|
+
case REACT_SUSPENSE_TYPE:
|
|
110
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
111
|
+
return type;
|
|
112
|
+
default:
|
|
113
|
+
var $$typeofType = type && type.$$typeof;
|
|
114
|
+
switch ($$typeofType) {
|
|
115
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
116
|
+
case REACT_CONTEXT_TYPE:
|
|
117
|
+
case REACT_FORWARD_REF_TYPE:
|
|
118
|
+
case REACT_LAZY_TYPE:
|
|
119
|
+
case REACT_MEMO_TYPE:
|
|
120
|
+
case REACT_PROVIDER_TYPE:
|
|
121
|
+
return $$typeofType;
|
|
122
|
+
default:
|
|
123
|
+
return $$typeof;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
case REACT_PORTAL_TYPE:
|
|
127
|
+
return $$typeof;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
133
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
134
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
135
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
136
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
137
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
138
|
+
var Memo = REACT_MEMO_TYPE;
|
|
139
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
140
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
141
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
142
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
143
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
144
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
145
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
|
146
|
+
|
|
147
|
+
function isAsyncMode(object) {
|
|
148
|
+
{
|
|
149
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
150
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
151
|
+
|
|
152
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
function isConcurrentMode(object) {
|
|
158
|
+
{
|
|
159
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
160
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
161
|
+
|
|
162
|
+
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
function isContextConsumer(object) {
|
|
168
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
169
|
+
}
|
|
170
|
+
function isContextProvider(object) {
|
|
171
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
172
|
+
}
|
|
173
|
+
function isElement(object) {
|
|
174
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
175
|
+
}
|
|
176
|
+
function isForwardRef(object) {
|
|
177
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
178
|
+
}
|
|
179
|
+
function isFragment(object) {
|
|
180
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
181
|
+
}
|
|
182
|
+
function isLazy(object) {
|
|
183
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
184
|
+
}
|
|
185
|
+
function isMemo(object) {
|
|
186
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
187
|
+
}
|
|
188
|
+
function isPortal(object) {
|
|
189
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
190
|
+
}
|
|
191
|
+
function isProfiler(object) {
|
|
192
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
193
|
+
}
|
|
194
|
+
function isStrictMode(object) {
|
|
195
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
196
|
+
}
|
|
197
|
+
function isSuspense(object) {
|
|
198
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
199
|
+
}
|
|
200
|
+
function isSuspenseList(object) {
|
|
201
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
202
|
+
}
|
|
203
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
204
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
205
|
+
reactIs_development.Element = Element;
|
|
206
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
207
|
+
reactIs_development.Fragment = Fragment;
|
|
208
|
+
reactIs_development.Lazy = Lazy;
|
|
209
|
+
reactIs_development.Memo = Memo;
|
|
210
|
+
reactIs_development.Portal = Portal;
|
|
211
|
+
reactIs_development.Profiler = Profiler;
|
|
212
|
+
reactIs_development.StrictMode = StrictMode;
|
|
213
|
+
reactIs_development.Suspense = Suspense;
|
|
214
|
+
reactIs_development.SuspenseList = SuspenseList;
|
|
215
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
216
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
217
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
218
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
219
|
+
reactIs_development.isElement = isElement;
|
|
220
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
221
|
+
reactIs_development.isFragment = isFragment;
|
|
222
|
+
reactIs_development.isLazy = isLazy;
|
|
223
|
+
reactIs_development.isMemo = isMemo;
|
|
224
|
+
reactIs_development.isPortal = isPortal;
|
|
225
|
+
reactIs_development.isProfiler = isProfiler;
|
|
226
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
227
|
+
reactIs_development.isSuspense = isSuspense;
|
|
228
|
+
reactIs_development.isSuspenseList = isSuspenseList;
|
|
229
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
230
|
+
reactIs_development.typeOf = typeOf;
|
|
231
|
+
})();
|
|
232
|
+
}
|
|
233
|
+
return reactIs_development;
|
|
234
|
+
}
|
|
235
|
+
var reactIs_production_min = {};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @license React
|
|
239
|
+
* react-is.production.min.js
|
|
240
|
+
*
|
|
241
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the MIT license found in the
|
|
244
|
+
* LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
var hasRequiredReactIs_production_min;
|
|
248
|
+
function requireReactIs_production_min() {
|
|
249
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
250
|
+
hasRequiredReactIs_production_min = 1;
|
|
251
|
+
var b = Symbol.for("react.element"),
|
|
252
|
+
c = Symbol.for("react.portal"),
|
|
253
|
+
d = Symbol.for("react.fragment"),
|
|
254
|
+
e = Symbol.for("react.strict_mode"),
|
|
255
|
+
f = Symbol.for("react.profiler"),
|
|
256
|
+
g = Symbol.for("react.provider"),
|
|
257
|
+
h = Symbol.for("react.context"),
|
|
258
|
+
k = Symbol.for("react.server_context"),
|
|
259
|
+
l = Symbol.for("react.forward_ref"),
|
|
260
|
+
m = Symbol.for("react.suspense"),
|
|
261
|
+
n = Symbol.for("react.suspense_list"),
|
|
262
|
+
p = Symbol.for("react.memo"),
|
|
263
|
+
q = Symbol.for("react.lazy"),
|
|
264
|
+
t = Symbol.for("react.offscreen"),
|
|
265
|
+
u;
|
|
266
|
+
u = Symbol.for("react.module.reference");
|
|
267
|
+
function v(a) {
|
|
268
|
+
if ("object" === typeof a && null !== a) {
|
|
269
|
+
var r = a.$$typeof;
|
|
270
|
+
switch (r) {
|
|
271
|
+
case b:
|
|
272
|
+
switch (a = a.type, a) {
|
|
273
|
+
case d:
|
|
274
|
+
case f:
|
|
275
|
+
case e:
|
|
276
|
+
case m:
|
|
277
|
+
case n:
|
|
278
|
+
return a;
|
|
279
|
+
default:
|
|
280
|
+
switch (a = a && a.$$typeof, a) {
|
|
281
|
+
case k:
|
|
282
|
+
case h:
|
|
283
|
+
case l:
|
|
284
|
+
case q:
|
|
285
|
+
case p:
|
|
286
|
+
case g:
|
|
287
|
+
return a;
|
|
288
|
+
default:
|
|
289
|
+
return r;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
case c:
|
|
293
|
+
return r;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
reactIs_production_min.ContextConsumer = h;
|
|
298
|
+
reactIs_production_min.ContextProvider = g;
|
|
299
|
+
reactIs_production_min.Element = b;
|
|
300
|
+
reactIs_production_min.ForwardRef = l;
|
|
301
|
+
reactIs_production_min.Fragment = d;
|
|
302
|
+
reactIs_production_min.Lazy = q;
|
|
303
|
+
reactIs_production_min.Memo = p;
|
|
304
|
+
reactIs_production_min.Portal = c;
|
|
305
|
+
reactIs_production_min.Profiler = f;
|
|
306
|
+
reactIs_production_min.StrictMode = e;
|
|
307
|
+
reactIs_production_min.Suspense = m;
|
|
308
|
+
reactIs_production_min.SuspenseList = n;
|
|
309
|
+
reactIs_production_min.isAsyncMode = function () {
|
|
310
|
+
return !1;
|
|
311
|
+
};
|
|
312
|
+
reactIs_production_min.isConcurrentMode = function () {
|
|
313
|
+
return !1;
|
|
314
|
+
};
|
|
315
|
+
reactIs_production_min.isContextConsumer = function (a) {
|
|
316
|
+
return v(a) === h;
|
|
317
|
+
};
|
|
318
|
+
reactIs_production_min.isContextProvider = function (a) {
|
|
319
|
+
return v(a) === g;
|
|
320
|
+
};
|
|
321
|
+
reactIs_production_min.isElement = function (a) {
|
|
322
|
+
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
323
|
+
};
|
|
324
|
+
reactIs_production_min.isForwardRef = function (a) {
|
|
325
|
+
return v(a) === l;
|
|
326
|
+
};
|
|
327
|
+
reactIs_production_min.isFragment = function (a) {
|
|
328
|
+
return v(a) === d;
|
|
329
|
+
};
|
|
330
|
+
reactIs_production_min.isLazy = function (a) {
|
|
331
|
+
return v(a) === q;
|
|
332
|
+
};
|
|
333
|
+
reactIs_production_min.isMemo = function (a) {
|
|
334
|
+
return v(a) === p;
|
|
335
|
+
};
|
|
336
|
+
reactIs_production_min.isPortal = function (a) {
|
|
337
|
+
return v(a) === c;
|
|
338
|
+
};
|
|
339
|
+
reactIs_production_min.isProfiler = function (a) {
|
|
340
|
+
return v(a) === f;
|
|
341
|
+
};
|
|
342
|
+
reactIs_production_min.isStrictMode = function (a) {
|
|
343
|
+
return v(a) === e;
|
|
344
|
+
};
|
|
345
|
+
reactIs_production_min.isSuspense = function (a) {
|
|
346
|
+
return v(a) === m;
|
|
347
|
+
};
|
|
348
|
+
reactIs_production_min.isSuspenseList = function (a) {
|
|
349
|
+
return v(a) === n;
|
|
350
|
+
};
|
|
351
|
+
reactIs_production_min.isValidElementType = function (a) {
|
|
352
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f || a === e || a === m || a === n || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || void 0 !== a.getModuleId) ? !0 : !1;
|
|
353
|
+
};
|
|
354
|
+
reactIs_production_min.typeOf = v;
|
|
355
|
+
return reactIs_production_min;
|
|
356
|
+
}
|
|
357
|
+
if (process.env.NODE_ENV === 'production') {
|
|
358
|
+
reactIs.exports = requireReactIs_production_min();
|
|
359
|
+
} else {
|
|
360
|
+
reactIs.exports = requireReactIs_development();
|
|
361
|
+
}
|
|
362
|
+
var reactIsExports = reactIs.exports;
|
|
363
|
+
var ReactIs = /*@__PURE__*/getDefaultExportFromCjs(reactIsExports);
|
|
21
364
|
const EMPTY_ARRAY = [];
|
|
22
365
|
const EMPTY_RECORD = {};
|
|
366
|
+
const POPOVER_MOTION_PROPS = {
|
|
367
|
+
initial: {
|
|
368
|
+
opacity: 0.5,
|
|
369
|
+
scale: 0.97
|
|
370
|
+
},
|
|
371
|
+
animate: {
|
|
372
|
+
opacity: 1,
|
|
373
|
+
scale: 1
|
|
374
|
+
},
|
|
375
|
+
exit: {
|
|
376
|
+
opacity: 0,
|
|
377
|
+
scale: 0.97
|
|
378
|
+
},
|
|
379
|
+
transition: {
|
|
380
|
+
duration: 0.4,
|
|
381
|
+
type: "spring"
|
|
382
|
+
}
|
|
383
|
+
};
|
|
23
384
|
function _fillCSSObject(keys, value) {
|
|
24
385
|
return keys.reduce((style, key) => {
|
|
25
386
|
style[key] = value;
|
|
@@ -511,7 +872,7 @@ var gatherActiveObservationsAtDepth = function (depth) {
|
|
|
511
872
|
});
|
|
512
873
|
});
|
|
513
874
|
};
|
|
514
|
-
var process = function () {
|
|
875
|
+
var process$1 = function () {
|
|
515
876
|
var depth = 0;
|
|
516
877
|
gatherActiveObservationsAtDepth(depth);
|
|
517
878
|
while (hasActiveObservations()) {
|
|
@@ -592,7 +953,7 @@ var Scheduler = function () {
|
|
|
592
953
|
queueResizeObserver(function () {
|
|
593
954
|
var elementsHaveResized = false;
|
|
594
955
|
try {
|
|
595
|
-
elementsHaveResized = process();
|
|
956
|
+
elementsHaveResized = process$1();
|
|
596
957
|
} finally {
|
|
597
958
|
scheduled = false;
|
|
598
959
|
timeout = until - time();
|
|
@@ -1478,13 +1839,13 @@ function responsiveInputPaddingIconRightStyle(props) {
|
|
|
1478
1839
|
$iconRight: true
|
|
1479
1840
|
});
|
|
1480
1841
|
}
|
|
1481
|
-
var __freeze$
|
|
1482
|
-
var __defProp$
|
|
1483
|
-
var __template$
|
|
1484
|
-
value: __freeze$
|
|
1842
|
+
var __freeze$F = Object.freeze;
|
|
1843
|
+
var __defProp$G = Object.defineProperty;
|
|
1844
|
+
var __template$F = (cooked, raw) => __freeze$F(__defProp$G(cooked, "raw", {
|
|
1845
|
+
value: __freeze$F(raw || cooked.slice())
|
|
1485
1846
|
}));
|
|
1486
|
-
var _a$
|
|
1487
|
-
const ROOT_STYLE = css(_a$
|
|
1847
|
+
var _a$F, _b$n, _c$c;
|
|
1848
|
+
const ROOT_STYLE = css(_a$F || (_a$F = __template$F(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
|
|
1488
1849
|
function textInputRootStyle() {
|
|
1489
1850
|
return ROOT_STYLE;
|
|
1490
1851
|
}
|
|
@@ -1498,7 +1859,7 @@ function textInputBaseStyle(props) {
|
|
|
1498
1859
|
color,
|
|
1499
1860
|
font
|
|
1500
1861
|
} = getTheme_v2(props.theme);
|
|
1501
|
-
return css(_b$n || (_b$n = __template$
|
|
1862
|
+
return css(_b$n || (_b$n = __template$F(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.text.family, $weight && font.text.weights[$weight] || font.text.weights.regular, $scheme, $tone, color.input.default.enabled.fg, color.input.default.enabled.placeholder, color.input.default.enabled.fg, color.input.default.enabled.placeholder, color.input.default.disabled.fg, color.input.default.disabled.placeholder, color.input.invalid.enabled.fg, color.input.invalid.enabled.placeholder, color.input.default.readOnly.fg, color.input.default.readOnly.placeholder);
|
|
1502
1863
|
}
|
|
1503
1864
|
function textInputFontSizeStyle(props) {
|
|
1504
1865
|
const {
|
|
@@ -1525,7 +1886,7 @@ function textInputRepresentationStyle(props) {
|
|
|
1525
1886
|
color,
|
|
1526
1887
|
input
|
|
1527
1888
|
} = getTheme_v2(props.theme);
|
|
1528
|
-
return css(_c$c || (_c$c = __template$
|
|
1889
|
+
return css(_c$c || (_c$c = __template$F(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
1529
1890
|
color: color.input.default.enabled.border,
|
|
1530
1891
|
width: input.border.width
|
|
1531
1892
|
}), color.input.invalid.enabled.bg, color.input.invalid.enabled.fg, focusRingBorderStyle({
|
|
@@ -1599,12 +1960,12 @@ function responsiveShadowStyle(props) {
|
|
|
1599
1960
|
} = getTheme_v2(props.theme);
|
|
1600
1961
|
return _responsive(media, props.$shadow, index => shadowStyle(shadow[index], card.shadow.outline));
|
|
1601
1962
|
}
|
|
1602
|
-
var __freeze$
|
|
1603
|
-
var __defProp$
|
|
1604
|
-
var __template$
|
|
1605
|
-
value: __freeze$
|
|
1963
|
+
var __freeze$E = Object.freeze;
|
|
1964
|
+
var __defProp$F = Object.defineProperty;
|
|
1965
|
+
var __template$E = (cooked, raw) => __freeze$E(__defProp$F(cooked, "raw", {
|
|
1966
|
+
value: __freeze$E(raw || cooked.slice())
|
|
1606
1967
|
}));
|
|
1607
|
-
var _a$
|
|
1968
|
+
var _a$E, _b$m, _c$b;
|
|
1608
1969
|
function labelBaseStyle(props) {
|
|
1609
1970
|
const {
|
|
1610
1971
|
$accent,
|
|
@@ -1613,16 +1974,16 @@ function labelBaseStyle(props) {
|
|
|
1613
1974
|
const {
|
|
1614
1975
|
font
|
|
1615
1976
|
} = getTheme_v2(props.theme);
|
|
1616
|
-
return css(_c$b || (_c$b = __template$
|
|
1977
|
+
return css(_c$b || (_c$b = __template$E(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$E || (_a$E = __template$E(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$m || (_b$m = __template$E(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
1617
1978
|
}
|
|
1618
|
-
var __freeze$
|
|
1619
|
-
var __defProp$
|
|
1620
|
-
var __template$
|
|
1621
|
-
value: __freeze$
|
|
1979
|
+
var __freeze$D = Object.freeze;
|
|
1980
|
+
var __defProp$E = Object.defineProperty;
|
|
1981
|
+
var __template$D = (cooked, raw) => __freeze$D(__defProp$E(cooked, "raw", {
|
|
1982
|
+
value: __freeze$D(raw || cooked.slice())
|
|
1622
1983
|
}));
|
|
1623
|
-
var _a$
|
|
1624
|
-
const Root$
|
|
1625
|
-
const SpanWithTextOverflow$2 = styled.span(_a$
|
|
1984
|
+
var _a$D;
|
|
1985
|
+
const Root$C = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
1986
|
+
const SpanWithTextOverflow$2 = styled.span(_a$D || (_a$D = __template$D(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
1626
1987
|
const Label = forwardRef(function Label2(props, ref) {
|
|
1627
1988
|
const {
|
|
1628
1989
|
accent,
|
|
@@ -1644,7 +2005,7 @@ const Label = forwardRef(function Label2(props, ref) {
|
|
|
1644
2005
|
children
|
|
1645
2006
|
});
|
|
1646
2007
|
}
|
|
1647
|
-
return /* @__PURE__ */jsx(Root$
|
|
2008
|
+
return /* @__PURE__ */jsx(Root$C, {
|
|
1648
2009
|
"data-ui": "Label",
|
|
1649
2010
|
...restProps,
|
|
1650
2011
|
$accent: accent,
|
|
@@ -1803,7 +2164,7 @@ function avatarStrokeStyle() {
|
|
|
1803
2164
|
}
|
|
1804
2165
|
};
|
|
1805
2166
|
}
|
|
1806
|
-
const Root$
|
|
2167
|
+
const Root$B = styled.div(responsiveAvatarSizeStyle, avatarStyle.root);
|
|
1807
2168
|
const Arrow$1 = styled.div(avatarStyle.arrow);
|
|
1808
2169
|
const BgStroke = styled.ellipse(avatarStyle.bgStroke);
|
|
1809
2170
|
const Stroke = styled.ellipse(avatarStyle.stroke);
|
|
@@ -1859,7 +2220,7 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
|
|
|
1859
2220
|
if (s === 3) return 5;
|
|
1860
2221
|
return 0;
|
|
1861
2222
|
}), [size]);
|
|
1862
|
-
return /* @__PURE__ */jsxs(Root$
|
|
2223
|
+
return /* @__PURE__ */jsxs(Root$B, {
|
|
1863
2224
|
as,
|
|
1864
2225
|
"data-as": typeof as === "string" ? as : void 0,
|
|
1865
2226
|
"data-ui": "Avatar",
|
|
@@ -1928,12 +2289,12 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
|
|
|
1928
2289
|
})]
|
|
1929
2290
|
});
|
|
1930
2291
|
});
|
|
1931
|
-
var __freeze$
|
|
1932
|
-
var __defProp$
|
|
1933
|
-
var __template$
|
|
1934
|
-
value: __freeze$
|
|
2292
|
+
var __freeze$C = Object.freeze;
|
|
2293
|
+
var __defProp$D = Object.defineProperty;
|
|
2294
|
+
var __template$C = (cooked, raw) => __freeze$C(__defProp$D(cooked, "raw", {
|
|
2295
|
+
value: __freeze$C(raw || cooked.slice())
|
|
1935
2296
|
}));
|
|
1936
|
-
var _a$
|
|
2297
|
+
var _a$C;
|
|
1937
2298
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1938
2299
|
const {
|
|
1939
2300
|
avatar,
|
|
@@ -1953,9 +2314,9 @@ function _avatarCounterBaseStyle(props) {
|
|
|
1953
2314
|
const {
|
|
1954
2315
|
space
|
|
1955
2316
|
} = getTheme_v2(props.theme);
|
|
1956
|
-
return css(_a$
|
|
2317
|
+
return css(_a$C || (_a$C = __template$C(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n inset 0 0 0 1px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(space[2]));
|
|
1957
2318
|
}
|
|
1958
|
-
const Root$
|
|
2319
|
+
const Root$A = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
1959
2320
|
const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
|
|
1960
2321
|
const {
|
|
1961
2322
|
count,
|
|
@@ -1968,7 +2329,7 @@ const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
|
|
|
1968
2329
|
if (s === 3) return 5;
|
|
1969
2330
|
return 0;
|
|
1970
2331
|
}), [size]);
|
|
1971
|
-
return /* @__PURE__ */jsx(Root$
|
|
2332
|
+
return /* @__PURE__ */jsx(Root$A, {
|
|
1972
2333
|
$size: size,
|
|
1973
2334
|
"data-ui": "AvatarCounter",
|
|
1974
2335
|
ref,
|
|
@@ -1982,15 +2343,15 @@ const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
|
|
|
1982
2343
|
});
|
|
1983
2344
|
function childrenToElementArray(children) {
|
|
1984
2345
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
1985
|
-
return childrenArray.filter(node => isElement
|
|
2346
|
+
return childrenArray.filter(node => reactIsExports.isElement(node) || reactIsExports.isFragment(node) || typeof node === "string");
|
|
1986
2347
|
}
|
|
1987
|
-
var __freeze$
|
|
1988
|
-
var __defProp$
|
|
1989
|
-
var __template$
|
|
1990
|
-
value: __freeze$
|
|
2348
|
+
var __freeze$B = Object.freeze;
|
|
2349
|
+
var __defProp$C = Object.defineProperty;
|
|
2350
|
+
var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
|
|
2351
|
+
value: __freeze$B(raw || cooked.slice())
|
|
1991
2352
|
}));
|
|
1992
|
-
var _a$
|
|
1993
|
-
const BASE_STYLES = css(_a$
|
|
2353
|
+
var _a$B;
|
|
2354
|
+
const BASE_STYLES = css(_a$B || (_a$B = __template$B(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
|
|
1994
2355
|
function avatarStackStyle() {
|
|
1995
2356
|
return BASE_STYLES;
|
|
1996
2357
|
}
|
|
@@ -2009,7 +2370,7 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
2009
2370
|
};
|
|
2010
2371
|
});
|
|
2011
2372
|
}
|
|
2012
|
-
const Root$
|
|
2373
|
+
const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
|
|
2013
2374
|
const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
|
|
2014
2375
|
const {
|
|
2015
2376
|
children: childrenProp,
|
|
@@ -2024,7 +2385,7 @@ const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
|
|
|
2024
2385
|
const visibleCount = maxLength - 1;
|
|
2025
2386
|
const extraCount = len - visibleCount;
|
|
2026
2387
|
const visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
2027
|
-
return /* @__PURE__ */jsxs(Root$
|
|
2388
|
+
return /* @__PURE__ */jsxs(Root$z, {
|
|
2028
2389
|
"data-ui": "AvatarStack",
|
|
2029
2390
|
...restProps,
|
|
2030
2391
|
ref,
|
|
@@ -2046,7 +2407,7 @@ const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
|
|
|
2046
2407
|
}, String(childIndex)))]
|
|
2047
2408
|
});
|
|
2048
2409
|
});
|
|
2049
|
-
const Root$
|
|
2410
|
+
const Root$y = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
|
|
2050
2411
|
const Box = forwardRef(function Box2(props, ref) {
|
|
2051
2412
|
const {
|
|
2052
2413
|
as: asProp = "div",
|
|
@@ -2077,7 +2438,7 @@ const Box = forwardRef(function Box2(props, ref) {
|
|
|
2077
2438
|
sizing,
|
|
2078
2439
|
...restProps
|
|
2079
2440
|
} = props;
|
|
2080
|
-
return /* @__PURE__ */jsx(Root$
|
|
2441
|
+
return /* @__PURE__ */jsx(Root$y, {
|
|
2081
2442
|
"data-as": typeof asProp === "string" ? asProp : void 0,
|
|
2082
2443
|
"data-ui": "Box",
|
|
2083
2444
|
...restProps,
|
|
@@ -2111,12 +2472,12 @@ const Box = forwardRef(function Box2(props, ref) {
|
|
|
2111
2472
|
children: props.children
|
|
2112
2473
|
});
|
|
2113
2474
|
});
|
|
2114
|
-
var __freeze$
|
|
2115
|
-
var __defProp$
|
|
2116
|
-
var __template$
|
|
2117
|
-
value: __freeze$
|
|
2475
|
+
var __freeze$A = Object.freeze;
|
|
2476
|
+
var __defProp$B = Object.defineProperty;
|
|
2477
|
+
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
2478
|
+
value: __freeze$A(raw || cooked.slice())
|
|
2118
2479
|
}));
|
|
2119
|
-
var _a$
|
|
2480
|
+
var _a$A, _b$l, _c$a;
|
|
2120
2481
|
function textBaseStyle(props) {
|
|
2121
2482
|
const {
|
|
2122
2483
|
$accent,
|
|
@@ -2125,16 +2486,16 @@ function textBaseStyle(props) {
|
|
|
2125
2486
|
const {
|
|
2126
2487
|
font
|
|
2127
2488
|
} = getTheme_v2(props.theme);
|
|
2128
|
-
return css(_c$a || (_c$a = __template$
|
|
2489
|
+
return css(_c$a || (_c$a = __template$A(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n\n & path {\n vector-effect: non-scaling-stroke !important;\n }\n }\n "])), $accent && css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family, font.text.weights.bold);
|
|
2129
2490
|
}
|
|
2130
|
-
var __freeze$
|
|
2131
|
-
var __defProp$
|
|
2132
|
-
var __template$
|
|
2133
|
-
value: __freeze$
|
|
2491
|
+
var __freeze$z = Object.freeze;
|
|
2492
|
+
var __defProp$A = Object.defineProperty;
|
|
2493
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
2494
|
+
value: __freeze$z(raw || cooked.slice())
|
|
2134
2495
|
}));
|
|
2135
|
-
var _a$
|
|
2136
|
-
const Root$
|
|
2137
|
-
const SpanWithTextOverflow$1 = styled.span(_a$
|
|
2496
|
+
var _a$z;
|
|
2497
|
+
const Root$x = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
2498
|
+
const SpanWithTextOverflow$1 = styled.span(_a$z || (_a$z = __template$z(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
2138
2499
|
const Text = forwardRef(function Text2(props, ref) {
|
|
2139
2500
|
const {
|
|
2140
2501
|
accent = false,
|
|
@@ -2152,7 +2513,7 @@ const Text = forwardRef(function Text2(props, ref) {
|
|
|
2152
2513
|
children
|
|
2153
2514
|
});
|
|
2154
2515
|
}
|
|
2155
|
-
return /* @__PURE__ */jsx(Root$
|
|
2516
|
+
return /* @__PURE__ */jsx(Root$x, {
|
|
2156
2517
|
"data-ui": "Text",
|
|
2157
2518
|
...restProps,
|
|
2158
2519
|
$accent: accent,
|
|
@@ -2181,7 +2542,7 @@ function badgeStyle(props) {
|
|
|
2181
2542
|
}
|
|
2182
2543
|
};
|
|
2183
2544
|
}
|
|
2184
|
-
const Root$
|
|
2545
|
+
const Root$w = styled(Box)(responsiveRadiusStyle, badgeStyle);
|
|
2185
2546
|
const Badge = forwardRef(function Badge2(props, ref) {
|
|
2186
2547
|
const {
|
|
2187
2548
|
children,
|
|
@@ -2193,7 +2554,7 @@ const Badge = forwardRef(function Badge2(props, ref) {
|
|
|
2193
2554
|
tone = "default",
|
|
2194
2555
|
...restProps
|
|
2195
2556
|
} = props;
|
|
2196
|
-
return /* @__PURE__ */jsx(Root$
|
|
2557
|
+
return /* @__PURE__ */jsx(Root$w, {
|
|
2197
2558
|
"data-ui": "Badge",
|
|
2198
2559
|
...restProps,
|
|
2199
2560
|
$tone: tone,
|
|
@@ -2202,12 +2563,11 @@ const Badge = forwardRef(function Badge2(props, ref) {
|
|
|
2202
2563
|
ref,
|
|
2203
2564
|
children: /* @__PURE__ */jsx(Text, {
|
|
2204
2565
|
size: fontSize,
|
|
2205
|
-
weight: "medium",
|
|
2206
2566
|
children
|
|
2207
2567
|
})
|
|
2208
2568
|
});
|
|
2209
2569
|
});
|
|
2210
|
-
const Root$
|
|
2570
|
+
const Root$v = styled(Box)(flexItemStyle, responsiveFlexStyle);
|
|
2211
2571
|
const Flex = forwardRef(function Flex2(props, ref) {
|
|
2212
2572
|
const {
|
|
2213
2573
|
align,
|
|
@@ -2218,7 +2578,7 @@ const Flex = forwardRef(function Flex2(props, ref) {
|
|
|
2218
2578
|
wrap,
|
|
2219
2579
|
...restProps
|
|
2220
2580
|
} = props;
|
|
2221
|
-
return /* @__PURE__ */jsx(Root$
|
|
2581
|
+
return /* @__PURE__ */jsx(Root$v, {
|
|
2222
2582
|
"data-ui": "Flex",
|
|
2223
2583
|
...restProps,
|
|
2224
2584
|
$align: useArrayProp(align),
|
|
@@ -2230,16 +2590,16 @@ const Flex = forwardRef(function Flex2(props, ref) {
|
|
|
2230
2590
|
ref
|
|
2231
2591
|
});
|
|
2232
2592
|
});
|
|
2233
|
-
var __freeze$
|
|
2234
|
-
var __defProp$
|
|
2235
|
-
var __template$
|
|
2236
|
-
value: __freeze$
|
|
2593
|
+
var __freeze$y = Object.freeze;
|
|
2594
|
+
var __defProp$z = Object.defineProperty;
|
|
2595
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
2596
|
+
value: __freeze$y(raw || cooked.slice())
|
|
2237
2597
|
}));
|
|
2238
|
-
var _a$
|
|
2239
|
-
const rotate$1 = keyframes(_a$
|
|
2240
|
-
const Root$
|
|
2598
|
+
var _a$y, _b$k;
|
|
2599
|
+
const rotate$1 = keyframes(_a$y || (_a$y = __template$y(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
2600
|
+
const Root$u = styled(Text)(_b$k || (_b$k = __template$y(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
|
|
2241
2601
|
const Spinner = forwardRef(function Spinner2(props, ref) {
|
|
2242
|
-
return /* @__PURE__ */jsx(Root$
|
|
2602
|
+
return /* @__PURE__ */jsx(Root$u, {
|
|
2243
2603
|
"data-ui": "Spinner",
|
|
2244
2604
|
...props,
|
|
2245
2605
|
ref,
|
|
@@ -2250,6 +2610,7 @@ function _cardColorStyle(base, color) {
|
|
|
2250
2610
|
let checkered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
2251
2611
|
return {
|
|
2252
2612
|
// from base
|
|
2613
|
+
"--card-backdrop-color": base.backdrop,
|
|
2253
2614
|
"--card-focus-ring-color": base.focusRing,
|
|
2254
2615
|
"--card-shadow-outline-color": base.shadow.outline,
|
|
2255
2616
|
"--card-shadow-umbra-color": base.shadow.umbra,
|
|
@@ -2317,12 +2678,12 @@ function _cardColorStyle(base, color) {
|
|
|
2317
2678
|
"--card-hairline-hard-color": color.border
|
|
2318
2679
|
};
|
|
2319
2680
|
}
|
|
2320
|
-
var __freeze$
|
|
2321
|
-
var __defProp$
|
|
2322
|
-
var __template$
|
|
2323
|
-
value: __freeze$
|
|
2681
|
+
var __freeze$x = Object.freeze;
|
|
2682
|
+
var __defProp$y = Object.defineProperty;
|
|
2683
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
2684
|
+
value: __freeze$x(raw || cooked.slice())
|
|
2324
2685
|
}));
|
|
2325
|
-
var _a$
|
|
2686
|
+
var _a$x, _b$j;
|
|
2326
2687
|
function buttonBaseStyles(props) {
|
|
2327
2688
|
const {
|
|
2328
2689
|
$width
|
|
@@ -2330,7 +2691,7 @@ function buttonBaseStyles(props) {
|
|
|
2330
2691
|
const {
|
|
2331
2692
|
style
|
|
2332
2693
|
} = getTheme_v2(props.theme);
|
|
2333
|
-
return css(_b$j || (_b$j = __template$
|
|
2694
|
+
return css(_b$j || (_b$j = __template$x(["\n ", ";\n\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n vertical-align: top;\n\n ", "\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])), style == null ? void 0 : style.button, $width === "fill" && css(_a$x || (_a$x = __template$x(["\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n "]))));
|
|
2334
2695
|
}
|
|
2335
2696
|
function combineBoxShadow() {
|
|
2336
2697
|
for (var _len = arguments.length, boxShadows = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -2385,14 +2746,14 @@ function buttonColorStyles(props) {
|
|
|
2385
2746
|
}
|
|
2386
2747
|
}, (_a2 = style == null ? void 0 : style.button) == null ? void 0 : _a2.root].filter(Boolean);
|
|
2387
2748
|
}
|
|
2388
|
-
var __freeze$
|
|
2389
|
-
var __defProp$
|
|
2390
|
-
var __template$
|
|
2391
|
-
value: __freeze$
|
|
2749
|
+
var __freeze$w = Object.freeze;
|
|
2750
|
+
var __defProp$x = Object.defineProperty;
|
|
2751
|
+
var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
|
|
2752
|
+
value: __freeze$w(raw || cooked.slice())
|
|
2392
2753
|
}));
|
|
2393
|
-
var _a$
|
|
2394
|
-
const Root$
|
|
2395
|
-
const LoadingBox = styled.div(_a$
|
|
2754
|
+
var _a$w;
|
|
2755
|
+
const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
|
|
2756
|
+
const LoadingBox = styled.div(_a$w || (_a$w = __template$w(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])));
|
|
2396
2757
|
const Button = forwardRef(function Button2(props, ref) {
|
|
2397
2758
|
const {
|
|
2398
2759
|
children,
|
|
@@ -2444,7 +2805,7 @@ const Button = forwardRef(function Button2(props, ref) {
|
|
|
2444
2805
|
paddingLeft,
|
|
2445
2806
|
paddingRight
|
|
2446
2807
|
}), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
|
|
2447
|
-
return /* @__PURE__ */jsxs(Root$
|
|
2808
|
+
return /* @__PURE__ */jsxs(Root$t, {
|
|
2448
2809
|
"data-ui": "Button",
|
|
2449
2810
|
...restProps,
|
|
2450
2811
|
$mode: mode,
|
|
@@ -2467,7 +2828,7 @@ const Button = forwardRef(function Button2(props, ref) {
|
|
|
2467
2828
|
gap: space,
|
|
2468
2829
|
children: [icon && /* @__PURE__ */jsxs(Text, {
|
|
2469
2830
|
size: fontSize,
|
|
2470
|
-
children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
|
|
2831
|
+
children: [isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && createElement(icon)]
|
|
2471
2832
|
}), text && /* @__PURE__ */jsx(Box, {
|
|
2472
2833
|
flex: iconRight ? 1 : void 0,
|
|
2473
2834
|
children: /* @__PURE__ */jsx(Text, {
|
|
@@ -2480,7 +2841,7 @@ const Button = forwardRef(function Button2(props, ref) {
|
|
|
2480
2841
|
})
|
|
2481
2842
|
}), iconRight && /* @__PURE__ */jsxs(Text, {
|
|
2482
2843
|
size: fontSize,
|
|
2483
|
-
children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
|
|
2844
|
+
children: [isValidElement(iconRight) && iconRight, reactIsExports.isValidElementType(iconRight) && createElement(iconRight)]
|
|
2484
2845
|
})]
|
|
2485
2846
|
})
|
|
2486
2847
|
}), children && /* @__PURE__ */jsx(Box, {
|
|
@@ -2490,12 +2851,12 @@ const Button = forwardRef(function Button2(props, ref) {
|
|
|
2490
2851
|
})]
|
|
2491
2852
|
});
|
|
2492
2853
|
});
|
|
2493
|
-
var __freeze$
|
|
2494
|
-
var __defProp$
|
|
2495
|
-
var __template$
|
|
2496
|
-
value: __freeze$
|
|
2854
|
+
var __freeze$v = Object.freeze;
|
|
2855
|
+
var __defProp$w = Object.defineProperty;
|
|
2856
|
+
var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
|
|
2857
|
+
value: __freeze$v(raw || cooked.slice())
|
|
2497
2858
|
}));
|
|
2498
|
-
var _a$
|
|
2859
|
+
var _a$v, _b$i, _c$9;
|
|
2499
2860
|
function cardStyle(props) {
|
|
2500
2861
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
2501
2862
|
}
|
|
@@ -2506,7 +2867,7 @@ function cardBaseStyle(props) {
|
|
|
2506
2867
|
const {
|
|
2507
2868
|
space
|
|
2508
2869
|
} = getTheme_v2(props.theme);
|
|
2509
|
-
return css(_b$i || (_b$i = __template$
|
|
2870
|
+
return css(_b$i || (_b$i = __template$v(["\n ", "\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n "])), $checkered && css(_a$v || (_a$v = __template$v(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
|
|
2510
2871
|
}
|
|
2511
2872
|
function cardColorStyle(props) {
|
|
2512
2873
|
var _a2;
|
|
@@ -2523,7 +2884,7 @@ function cardColorStyle(props) {
|
|
|
2523
2884
|
width: card.border.width,
|
|
2524
2885
|
color: "var(--card-border-color)"
|
|
2525
2886
|
};
|
|
2526
|
-
return css(_c$9 || (_c$9 = __template$
|
|
2887
|
+
return css(_c$9 || (_c$9 = __template$v(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n ", "\n "])), color._dark ? "dark" : "light", _cardColorStyle(color, color, $checkered), _cardColorStyle(color, color.selectable.default.disabled, $checkered), _cardColorStyle(color, color.selectable.default.pressed, $checkered), _cardColorStyle(color, color.selectable.default.selected, $checkered), _cardColorStyle(color, color.selectable.default.hovered, $checkered), _cardColorStyle(color, color.selectable.default.pressed, $checkered), $focusRing ? focusRingStyle({
|
|
2527
2888
|
base: color,
|
|
2528
2889
|
border,
|
|
2529
2890
|
focusRing: card.focusRing
|
|
@@ -2533,7 +2894,7 @@ function cardColorStyle(props) {
|
|
|
2533
2894
|
focusRing: card.focusRing
|
|
2534
2895
|
}) : void 0, (_a2 = style == null ? void 0 : style.card) == null ? void 0 : _a2.root);
|
|
2535
2896
|
}
|
|
2536
|
-
const Root$
|
|
2897
|
+
const Root$s = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
2537
2898
|
const Card = forwardRef(function Card2(props, ref) {
|
|
2538
2899
|
const {
|
|
2539
2900
|
__unstable_checkered: checkered = false,
|
|
@@ -2552,13 +2913,13 @@ const Card = forwardRef(function Card2(props, ref) {
|
|
|
2552
2913
|
tone: toneProp = "default",
|
|
2553
2914
|
...restProps
|
|
2554
2915
|
} = props;
|
|
2555
|
-
const as = isValidElementType(asProp) ? asProp : "div";
|
|
2916
|
+
const as = reactIsExports.isValidElementType(asProp) ? asProp : "div";
|
|
2556
2917
|
const rootTheme = useRootTheme();
|
|
2557
2918
|
const tone = toneProp === "inherit" ? rootTheme.tone : toneProp;
|
|
2558
2919
|
return /* @__PURE__ */jsx(ThemeColorProvider, {
|
|
2559
2920
|
scheme,
|
|
2560
2921
|
tone,
|
|
2561
|
-
children: /* @__PURE__ */jsx(Root$
|
|
2922
|
+
children: /* @__PURE__ */jsx(Root$s, {
|
|
2562
2923
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2563
2924
|
"data-scheme": rootTheme.scheme,
|
|
2564
2925
|
"data-ui": "Card",
|
|
@@ -2583,14 +2944,14 @@ const Card = forwardRef(function Card2(props, ref) {
|
|
|
2583
2944
|
})
|
|
2584
2945
|
});
|
|
2585
2946
|
});
|
|
2586
|
-
var __freeze$
|
|
2587
|
-
var __defProp$
|
|
2588
|
-
var __template$
|
|
2589
|
-
value: __freeze$
|
|
2947
|
+
var __freeze$u = Object.freeze;
|
|
2948
|
+
var __defProp$v = Object.defineProperty;
|
|
2949
|
+
var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
|
|
2950
|
+
value: __freeze$u(raw || cooked.slice())
|
|
2590
2951
|
}));
|
|
2591
|
-
var _a$
|
|
2952
|
+
var _a$u, _b$h;
|
|
2592
2953
|
function checkboxBaseStyles() {
|
|
2593
|
-
return css(_a$
|
|
2954
|
+
return css(_a$u || (_a$u = __template$u(["\n position: relative;\n display: inline-block;\n "])));
|
|
2594
2955
|
}
|
|
2595
2956
|
function inputElementStyles(props) {
|
|
2596
2957
|
const {
|
|
@@ -2601,7 +2962,7 @@ function inputElementStyles(props) {
|
|
|
2601
2962
|
const {
|
|
2602
2963
|
focusRing
|
|
2603
2964
|
} = input.checkbox;
|
|
2604
|
-
return css(_b$h || (_b$h = __template$
|
|
2965
|
+
return css(_b$h || (_b$h = __template$u(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 1.5px !important;\n }\n }\n }\n\n &:checked + span {\n background: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ", ";\n }\n\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &[data-error]&:checked + span {\n background-color: ", ";\n color: ", ";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n &:disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &:disabled&:checked + span {\n background-color: ", ";\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
|
|
2605
2966
|
color: color.input.default.enabled.border,
|
|
2606
2967
|
width: input.border.width
|
|
2607
2968
|
}), rem(radius[2]), color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
@@ -2634,7 +2995,7 @@ function inputElementStyles(props) {
|
|
|
2634
2995
|
color: color.input.default.readOnly.border
|
|
2635
2996
|
}), color.input.default.readOnly.fg, color.input.default.readOnly.muted.bg);
|
|
2636
2997
|
}
|
|
2637
|
-
const Root$
|
|
2998
|
+
const Root$r = styled.div(checkboxBaseStyles);
|
|
2638
2999
|
const Input$5 = styled.input(inputElementStyles);
|
|
2639
3000
|
const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
|
|
2640
3001
|
const {
|
|
@@ -2654,7 +3015,7 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2654
3015
|
ref.current.indeterminate = indeterminate || false;
|
|
2655
3016
|
}
|
|
2656
3017
|
}, [indeterminate, ref]);
|
|
2657
|
-
return /* @__PURE__ */jsxs(Root$
|
|
3018
|
+
return /* @__PURE__ */jsxs(Root$r, {
|
|
2658
3019
|
className,
|
|
2659
3020
|
"data-ui": "Checkbox",
|
|
2660
3021
|
style,
|
|
@@ -2672,12 +3033,12 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2672
3033
|
})]
|
|
2673
3034
|
});
|
|
2674
3035
|
});
|
|
2675
|
-
var __freeze$
|
|
2676
|
-
var __defProp$
|
|
2677
|
-
var __template$
|
|
2678
|
-
value: __freeze$
|
|
3036
|
+
var __freeze$t = Object.freeze;
|
|
3037
|
+
var __defProp$u = Object.defineProperty;
|
|
3038
|
+
var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
|
|
3039
|
+
value: __freeze$t(raw || cooked.slice())
|
|
2679
3040
|
}));
|
|
2680
|
-
var _a$
|
|
3041
|
+
var _a$t;
|
|
2681
3042
|
function codeSyntaxHighlightingStyle(_ref2) {
|
|
2682
3043
|
let {
|
|
2683
3044
|
theme
|
|
@@ -2799,9 +3160,9 @@ function codeSyntaxHighlightingStyle(_ref2) {
|
|
|
2799
3160
|
};
|
|
2800
3161
|
}
|
|
2801
3162
|
function codeBaseStyle() {
|
|
2802
|
-
return css(_a$
|
|
3163
|
+
return css(_a$t || (_a$t = __template$t(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ", "\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), codeSyntaxHighlightingStyle);
|
|
2803
3164
|
}
|
|
2804
|
-
const Root$
|
|
3165
|
+
const Root$q = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
|
|
2805
3166
|
const Code = forwardRef(function Code2(props, ref) {
|
|
2806
3167
|
const {
|
|
2807
3168
|
children,
|
|
@@ -2812,7 +3173,7 @@ const Code = forwardRef(function Code2(props, ref) {
|
|
|
2812
3173
|
} = props;
|
|
2813
3174
|
const language = typeof languageProp === "string" ? languageProp : void 0;
|
|
2814
3175
|
const registered = language ? Refractor.hasLanguage(language) : false;
|
|
2815
|
-
return /* @__PURE__ */jsxs(Root$
|
|
3176
|
+
return /* @__PURE__ */jsxs(Root$q, {
|
|
2816
3177
|
"data-ui": "Code",
|
|
2817
3178
|
...restProps,
|
|
2818
3179
|
$size: useArrayProp(size),
|
|
@@ -2843,14 +3204,14 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2843
3204
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
2844
3205
|
}));
|
|
2845
3206
|
}
|
|
2846
|
-
const Root$
|
|
3207
|
+
const Root$p = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
|
|
2847
3208
|
const Container = forwardRef(function Container2(props, ref) {
|
|
2848
3209
|
const {
|
|
2849
3210
|
as,
|
|
2850
3211
|
width = 2,
|
|
2851
3212
|
...restProps
|
|
2852
3213
|
} = props;
|
|
2853
|
-
return /* @__PURE__ */jsx(Root$
|
|
3214
|
+
return /* @__PURE__ */jsx(Root$p, {
|
|
2854
3215
|
"data-ui": "Container",
|
|
2855
3216
|
...restProps,
|
|
2856
3217
|
$width: useArrayProp(width),
|
|
@@ -2858,7 +3219,7 @@ const Container = forwardRef(function Container2(props, ref) {
|
|
|
2858
3219
|
ref
|
|
2859
3220
|
});
|
|
2860
3221
|
});
|
|
2861
|
-
const Root$
|
|
3222
|
+
const Root$o = styled(Box)(responsiveGridStyle);
|
|
2862
3223
|
const Grid = forwardRef(function Grid2(props, ref) {
|
|
2863
3224
|
const {
|
|
2864
3225
|
as,
|
|
@@ -2873,7 +3234,7 @@ const Grid = forwardRef(function Grid2(props, ref) {
|
|
|
2873
3234
|
children,
|
|
2874
3235
|
...restProps
|
|
2875
3236
|
} = props;
|
|
2876
|
-
return /* @__PURE__ */jsx(Root$
|
|
3237
|
+
return /* @__PURE__ */jsx(Root$o, {
|
|
2877
3238
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2878
3239
|
"data-ui": "Grid",
|
|
2879
3240
|
...restProps,
|
|
@@ -2890,12 +3251,12 @@ const Grid = forwardRef(function Grid2(props, ref) {
|
|
|
2890
3251
|
children
|
|
2891
3252
|
});
|
|
2892
3253
|
});
|
|
2893
|
-
var __freeze$
|
|
2894
|
-
var __defProp$
|
|
2895
|
-
var __template$
|
|
2896
|
-
value: __freeze$
|
|
3254
|
+
var __freeze$s = Object.freeze;
|
|
3255
|
+
var __defProp$t = Object.defineProperty;
|
|
3256
|
+
var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
|
|
3257
|
+
value: __freeze$s(raw || cooked.slice())
|
|
2897
3258
|
}));
|
|
2898
|
-
var _a$
|
|
3259
|
+
var _a$s, _b$g, _c$8;
|
|
2899
3260
|
function headingBaseStyle(props) {
|
|
2900
3261
|
const {
|
|
2901
3262
|
$accent,
|
|
@@ -2904,16 +3265,16 @@ function headingBaseStyle(props) {
|
|
|
2904
3265
|
const {
|
|
2905
3266
|
font
|
|
2906
3267
|
} = getTheme_v2(props.theme);
|
|
2907
|
-
return css(_c$8 || (_c$8 = __template$
|
|
3268
|
+
return css(_c$8 || (_c$8 = __template$s(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$s || (_a$s = __template$s(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$g || (_b$g = __template$s(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
2908
3269
|
}
|
|
2909
|
-
var __freeze$
|
|
2910
|
-
var __defProp$
|
|
2911
|
-
var __template$
|
|
2912
|
-
value: __freeze$
|
|
3270
|
+
var __freeze$r = Object.freeze;
|
|
3271
|
+
var __defProp$s = Object.defineProperty;
|
|
3272
|
+
var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
|
|
3273
|
+
value: __freeze$r(raw || cooked.slice())
|
|
2913
3274
|
}));
|
|
2914
|
-
var _a$
|
|
2915
|
-
const Root$
|
|
2916
|
-
const SpanWithTextOverflow = styled.span(_a$
|
|
3275
|
+
var _a$r;
|
|
3276
|
+
const Root$n = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
3277
|
+
const SpanWithTextOverflow = styled.span(_a$r || (_a$r = __template$r(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
2917
3278
|
const Heading = forwardRef(function Heading2(props, ref) {
|
|
2918
3279
|
const {
|
|
2919
3280
|
accent = false,
|
|
@@ -2931,7 +3292,7 @@ const Heading = forwardRef(function Heading2(props, ref) {
|
|
|
2931
3292
|
children
|
|
2932
3293
|
});
|
|
2933
3294
|
}
|
|
2934
|
-
return /* @__PURE__ */jsx(Root$
|
|
3295
|
+
return /* @__PURE__ */jsx(Root$n, {
|
|
2935
3296
|
"data-ui": "Heading",
|
|
2936
3297
|
...restProps,
|
|
2937
3298
|
$accent: accent,
|
|
@@ -2972,7 +3333,7 @@ function inlineSpaceStyle(props) {
|
|
|
2972
3333
|
};
|
|
2973
3334
|
});
|
|
2974
3335
|
}
|
|
2975
|
-
const Root$
|
|
3336
|
+
const Root$m = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
|
|
2976
3337
|
const Inline = forwardRef(function Inline2(props, ref) {
|
|
2977
3338
|
const {
|
|
2978
3339
|
as,
|
|
@@ -2983,7 +3344,7 @@ const Inline = forwardRef(function Inline2(props, ref) {
|
|
|
2983
3344
|
const children = useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsx("div", {
|
|
2984
3345
|
children: child
|
|
2985
3346
|
}, idx)), [childrenProp]);
|
|
2986
|
-
return /* @__PURE__ */jsx(Root$
|
|
3347
|
+
return /* @__PURE__ */jsx(Root$m, {
|
|
2987
3348
|
"data-ui": "Inline",
|
|
2988
3349
|
...restProps,
|
|
2989
3350
|
$space: useArrayProp(space),
|
|
@@ -2992,16 +3353,16 @@ const Inline = forwardRef(function Inline2(props, ref) {
|
|
|
2992
3353
|
children
|
|
2993
3354
|
});
|
|
2994
3355
|
});
|
|
2995
|
-
var __freeze$
|
|
2996
|
-
var __defProp$
|
|
2997
|
-
var __template$
|
|
2998
|
-
value: __freeze$
|
|
3356
|
+
var __freeze$q = Object.freeze;
|
|
3357
|
+
var __defProp$r = Object.defineProperty;
|
|
3358
|
+
var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
|
|
3359
|
+
value: __freeze$q(raw || cooked.slice())
|
|
2999
3360
|
}));
|
|
3000
|
-
var _a$
|
|
3361
|
+
var _a$q;
|
|
3001
3362
|
function kbdStyle() {
|
|
3002
|
-
return css(_a$
|
|
3363
|
+
return css(_a$q || (_a$q = __template$q(["\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
3003
3364
|
}
|
|
3004
|
-
const Root$
|
|
3365
|
+
const Root$l = styled.kbd(responsiveRadiusStyle, kbdStyle);
|
|
3005
3366
|
const KBD = forwardRef(function KBD2(props, ref) {
|
|
3006
3367
|
const {
|
|
3007
3368
|
children,
|
|
@@ -3010,7 +3371,7 @@ const KBD = forwardRef(function KBD2(props, ref) {
|
|
|
3010
3371
|
radius = 2,
|
|
3011
3372
|
...restProps
|
|
3012
3373
|
} = props;
|
|
3013
|
-
return /* @__PURE__ */jsx(Root$
|
|
3374
|
+
return /* @__PURE__ */jsx(Root$l, {
|
|
3014
3375
|
"data-ui": "KBD",
|
|
3015
3376
|
...restProps,
|
|
3016
3377
|
$radius: useArrayProp(radius),
|
|
@@ -3027,6 +3388,45 @@ const KBD = forwardRef(function KBD2(props, ref) {
|
|
|
3027
3388
|
})
|
|
3028
3389
|
});
|
|
3029
3390
|
});
|
|
3391
|
+
const origin = {
|
|
3392
|
+
name: "@sanity/ui/origin",
|
|
3393
|
+
fn(_ref3) {
|
|
3394
|
+
let {
|
|
3395
|
+
middlewareData,
|
|
3396
|
+
placement,
|
|
3397
|
+
rects
|
|
3398
|
+
} = _ref3;
|
|
3399
|
+
var _a, _b;
|
|
3400
|
+
const [side] = placement.split("-");
|
|
3401
|
+
const floatingWidth = rects.floating.width;
|
|
3402
|
+
const floatingHeight = rects.floating.height;
|
|
3403
|
+
const shiftX = ((_a = middlewareData.shift) == null ? void 0 : _a.x) || 0;
|
|
3404
|
+
const shiftY = ((_b = middlewareData.shift) == null ? void 0 : _b.y) || 0;
|
|
3405
|
+
if (floatingWidth <= 0 || floatingHeight <= 0) {
|
|
3406
|
+
return {};
|
|
3407
|
+
}
|
|
3408
|
+
const isVerticalPlacement = ["bottom", "top"].includes(side);
|
|
3409
|
+
const {
|
|
3410
|
+
originX,
|
|
3411
|
+
originY
|
|
3412
|
+
} = isVerticalPlacement ? {
|
|
3413
|
+
originX: clamp(0.5 - shiftX / floatingWidth, 0, 1),
|
|
3414
|
+
originY: side === "bottom" ? 0 : 1
|
|
3415
|
+
} : {
|
|
3416
|
+
originX: side === "left" ? 1 : 0,
|
|
3417
|
+
originY: clamp(0.5 - shiftY / floatingHeight, 0, 1)
|
|
3418
|
+
};
|
|
3419
|
+
return {
|
|
3420
|
+
data: {
|
|
3421
|
+
originX,
|
|
3422
|
+
originY
|
|
3423
|
+
}
|
|
3424
|
+
};
|
|
3425
|
+
}
|
|
3426
|
+
};
|
|
3427
|
+
function clamp(num, min, max) {
|
|
3428
|
+
return Math.min(Math.max(num, min), max);
|
|
3429
|
+
}
|
|
3030
3430
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3031
3431
|
const width = targetPoint.x - movingPoint.x;
|
|
3032
3432
|
const height = targetPoint.y - movingPoint.y;
|
|
@@ -3081,20 +3481,20 @@ function compileCommands(cmds) {
|
|
|
3081
3481
|
return "";
|
|
3082
3482
|
}).join(" ");
|
|
3083
3483
|
}
|
|
3084
|
-
var __freeze$
|
|
3085
|
-
var __defProp$
|
|
3086
|
-
var __template$
|
|
3087
|
-
value: __freeze$
|
|
3484
|
+
var __freeze$p = Object.freeze;
|
|
3485
|
+
var __defProp$q = Object.defineProperty;
|
|
3486
|
+
var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
|
|
3487
|
+
value: __freeze$p(raw || cooked.slice())
|
|
3088
3488
|
}));
|
|
3089
|
-
var _a$
|
|
3090
|
-
const Root$
|
|
3489
|
+
var _a$p, _b$f, _c$7;
|
|
3490
|
+
const Root$k = styled.div(_ref4 => {
|
|
3091
3491
|
let {
|
|
3092
3492
|
$w: w
|
|
3093
|
-
} =
|
|
3094
|
-
return css(_a$
|
|
3493
|
+
} = _ref4;
|
|
3494
|
+
return css(_a$p || (_a$p = __template$p(["\n position: absolute;\n width: ", "px;\n height: ", "px;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n line-height: 0;\n transform-origin: ", "px ", "px;\n }\n\n [data-placement^='top'] > & {\n bottom: -", "px;\n\n & > svg {\n transform: rotate(0);\n }\n }\n\n [data-placement^='right'] > & {\n left: -", "px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -", "px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -", "px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n "])), w, w, w / 2, w / 2, w, w, w, w);
|
|
3095
3495
|
});
|
|
3096
|
-
const StrokePath = styled.path(_b$f || (_b$f = __template$
|
|
3097
|
-
const ShapePath = styled.path(_c$7 || (_c$7 = __template$
|
|
3496
|
+
const StrokePath = styled.path(_b$f || (_b$f = __template$p(["\n stroke: var(--card-shadow-outline-color);\n"])));
|
|
3497
|
+
const ShapePath = styled.path(_c$7 || (_c$7 = __template$p(["\n fill: var(--card-bg-color);\n"])));
|
|
3098
3498
|
const Arrow = forwardRef(function Arrow2(props, ref) {
|
|
3099
3499
|
const {
|
|
3100
3500
|
width: w,
|
|
@@ -3130,7 +3530,7 @@ const Arrow = forwardRef(function Arrow2(props, ref) {
|
|
|
3130
3530
|
const path = compileCommands(cmds);
|
|
3131
3531
|
const strokePath = "".concat(path);
|
|
3132
3532
|
const fillPath = "".concat(path, " M ").concat(w, " -1 M 0 -1 Z");
|
|
3133
|
-
return /* @__PURE__ */jsx(Root$
|
|
3533
|
+
return /* @__PURE__ */jsx(Root$k, {
|
|
3134
3534
|
...restProps,
|
|
3135
3535
|
$w: w,
|
|
3136
3536
|
ref,
|
|
@@ -3188,6 +3588,17 @@ function useBoundaryElement() {
|
|
|
3188
3588
|
}
|
|
3189
3589
|
return value || DEFAULT_VALUE;
|
|
3190
3590
|
}
|
|
3591
|
+
function ConditionalWrapper(_ref5) {
|
|
3592
|
+
let {
|
|
3593
|
+
children,
|
|
3594
|
+
condition,
|
|
3595
|
+
wrapper
|
|
3596
|
+
} = _ref5;
|
|
3597
|
+
if (!condition) {
|
|
3598
|
+
return children;
|
|
3599
|
+
}
|
|
3600
|
+
return wrapper(children);
|
|
3601
|
+
}
|
|
3191
3602
|
function findMaxBreakpoints(media, width) {
|
|
3192
3603
|
const ret = [];
|
|
3193
3604
|
for (let i = 0; i < media.length; i += 1) {
|
|
@@ -3237,8 +3648,8 @@ const ElementQuery = forwardRef(function ElementQuery2(props, ref) {
|
|
|
3237
3648
|
children
|
|
3238
3649
|
});
|
|
3239
3650
|
});
|
|
3240
|
-
var __defProp$
|
|
3241
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$
|
|
3651
|
+
var __defProp$p = Object.defineProperty;
|
|
3652
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$p(obj, key, {
|
|
3242
3653
|
enumerable: true,
|
|
3243
3654
|
configurable: true,
|
|
3244
3655
|
writable: true,
|
|
@@ -3467,7 +3878,7 @@ function LayerProvider(props) {
|
|
|
3467
3878
|
children
|
|
3468
3879
|
});
|
|
3469
3880
|
}
|
|
3470
|
-
const Root$
|
|
3881
|
+
const Root$j = styled.div({
|
|
3471
3882
|
position: "relative"
|
|
3472
3883
|
});
|
|
3473
3884
|
const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
|
|
@@ -3503,7 +3914,7 @@ const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
|
|
|
3503
3914
|
lastFocusedRef.current = target;
|
|
3504
3915
|
}
|
|
3505
3916
|
}, [forwardedRef, isTopLayer, onFocus]);
|
|
3506
|
-
return /* @__PURE__ */jsx(Root$
|
|
3917
|
+
return /* @__PURE__ */jsx(Root$j, {
|
|
3507
3918
|
...restProps,
|
|
3508
3919
|
"data-ui": "Layer",
|
|
3509
3920
|
onFocus: handleFocus,
|
|
@@ -3614,19 +4025,19 @@ function PortalProvider(props) {
|
|
|
3614
4025
|
children
|
|
3615
4026
|
});
|
|
3616
4027
|
}
|
|
3617
|
-
var __freeze$
|
|
3618
|
-
var __defProp$
|
|
3619
|
-
var __template$
|
|
3620
|
-
value: __freeze$
|
|
4028
|
+
var __freeze$o = Object.freeze;
|
|
4029
|
+
var __defProp$o = Object.defineProperty;
|
|
4030
|
+
var __template$o = (cooked, raw) => __freeze$o(__defProp$o(cooked, "raw", {
|
|
4031
|
+
value: __freeze$o(raw || cooked.slice())
|
|
3621
4032
|
}));
|
|
3622
|
-
var _a$
|
|
3623
|
-
const Root$
|
|
4033
|
+
var _a$o;
|
|
4034
|
+
const Root$i = styled.div(_a$o || (_a$o = __template$o(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
3624
4035
|
const SrOnly = forwardRef(function SrOnly2(props, ref) {
|
|
3625
4036
|
const {
|
|
3626
4037
|
as,
|
|
3627
4038
|
children
|
|
3628
4039
|
} = props;
|
|
3629
|
-
return /* @__PURE__ */jsx(Root$
|
|
4040
|
+
return /* @__PURE__ */jsx(Root$i, {
|
|
3630
4041
|
"aria-hidden": true,
|
|
3631
4042
|
as,
|
|
3632
4043
|
"data-ui": "SrOnly",
|
|
@@ -3634,14 +4045,14 @@ const SrOnly = forwardRef(function SrOnly2(props, ref) {
|
|
|
3634
4045
|
children
|
|
3635
4046
|
});
|
|
3636
4047
|
});
|
|
3637
|
-
var __freeze$
|
|
3638
|
-
var __defProp$
|
|
3639
|
-
var __template$
|
|
3640
|
-
value: __freeze$
|
|
4048
|
+
var __freeze$n = Object.freeze;
|
|
4049
|
+
var __defProp$n = Object.defineProperty;
|
|
4050
|
+
var __template$n = (cooked, raw) => __freeze$n(__defProp$n(cooked, "raw", {
|
|
4051
|
+
value: __freeze$n(raw || cooked.slice())
|
|
3641
4052
|
}));
|
|
3642
|
-
var _a$
|
|
3643
|
-
const Root$
|
|
3644
|
-
const ItemWrapper = styled.div(_b$e || (_b$e = __template$
|
|
4053
|
+
var _a$n, _b$e;
|
|
4054
|
+
const Root$h = styled.div(_a$n || (_a$n = __template$n(["\n position: relative;\n"])));
|
|
4055
|
+
const ItemWrapper = styled.div(_b$e || (_b$e = __template$n(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
|
|
3645
4056
|
const VirtualList = forwardRef(function VirtualList2(props, ref) {
|
|
3646
4057
|
const {
|
|
3647
4058
|
as = "div",
|
|
@@ -3747,7 +4158,7 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
|
|
|
3747
4158
|
const wrapperStyle = useMemo(() => ({
|
|
3748
4159
|
height
|
|
3749
4160
|
}), [height]);
|
|
3750
|
-
return /* @__PURE__ */jsx(Root$
|
|
4161
|
+
return /* @__PURE__ */jsx(Root$h, {
|
|
3751
4162
|
as,
|
|
3752
4163
|
"data-ui": "VirtualList",
|
|
3753
4164
|
...restProps,
|
|
@@ -3865,17 +4276,17 @@ function calcMaxWidth(params) {
|
|
|
3865
4276
|
}
|
|
3866
4277
|
return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
|
|
3867
4278
|
}
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
});
|
|
4279
|
+
var __freeze$m = Object.freeze;
|
|
4280
|
+
var __defProp$m = Object.defineProperty;
|
|
4281
|
+
var __template$m = (cooked, raw) => __freeze$m(__defProp$m(cooked, "raw", {
|
|
4282
|
+
value: __freeze$m(raw || cooked.slice())
|
|
4283
|
+
}));
|
|
4284
|
+
var _a$m;
|
|
4285
|
+
const MotionCard$1 = styled(motion(Card))(_a$m || (_a$m = __template$m(["\n &:not([hidden]) {\n display: flex;\n }\n flex-direction: column;\n width: max-content;\n min-width: min-content;\n"])));
|
|
3876
4286
|
const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
3877
4287
|
const {
|
|
3878
4288
|
__unstable_margins: marginsProp,
|
|
4289
|
+
animate,
|
|
3879
4290
|
arrow,
|
|
3880
4291
|
arrowRef,
|
|
3881
4292
|
arrowX,
|
|
@@ -3883,6 +4294,8 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3883
4294
|
children,
|
|
3884
4295
|
padding,
|
|
3885
4296
|
placement,
|
|
4297
|
+
originX,
|
|
4298
|
+
originY,
|
|
3886
4299
|
overflow,
|
|
3887
4300
|
radius,
|
|
3888
4301
|
scheme,
|
|
@@ -3902,20 +4315,22 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3902
4315
|
const x = (xProp != null ? xProp : 0) + margins[3];
|
|
3903
4316
|
const y = (yProp != null ? yProp : 0) + margins[0];
|
|
3904
4317
|
const rootStyle = useMemo(() => ({
|
|
4318
|
+
left: x,
|
|
4319
|
+
originX,
|
|
4320
|
+
originY,
|
|
3905
4321
|
position: strategy,
|
|
3906
4322
|
top: y,
|
|
3907
|
-
left: x,
|
|
3908
4323
|
width,
|
|
3909
4324
|
zIndex,
|
|
3910
4325
|
...style
|
|
3911
|
-
}), [strategy, style, width, x, y, zIndex]);
|
|
4326
|
+
}), [originX, originY, strategy, style, width, x, y, zIndex]);
|
|
3912
4327
|
const arrowStyle = useMemo(() => ({
|
|
3913
4328
|
left: arrowX !== null ? arrowX : void 0,
|
|
3914
4329
|
top: arrowY !== null ? arrowY : void 0,
|
|
3915
4330
|
right: void 0,
|
|
3916
4331
|
bottom: void 0
|
|
3917
4332
|
}), [arrowX, arrowY]);
|
|
3918
|
-
return /* @__PURE__ */jsxs(
|
|
4333
|
+
return /* @__PURE__ */jsxs(MotionCard$1, {
|
|
3919
4334
|
"data-ui": "Popover",
|
|
3920
4335
|
...restProps,
|
|
3921
4336
|
"data-placement": placement,
|
|
@@ -3926,6 +4341,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3926
4341
|
sizing: "border",
|
|
3927
4342
|
style: rootStyle,
|
|
3928
4343
|
tone,
|
|
4344
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
3929
4345
|
children: [/* @__PURE__ */jsx(Flex, {
|
|
3930
4346
|
"data-ui": "Popover__wrapper",
|
|
3931
4347
|
direction: "column",
|
|
@@ -3948,7 +4364,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3948
4364
|
}));
|
|
3949
4365
|
PopoverCard.displayName = "PopoverCard";
|
|
3950
4366
|
const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
3951
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4367
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
3952
4368
|
const {
|
|
3953
4369
|
container,
|
|
3954
4370
|
layer
|
|
@@ -3956,6 +4372,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
3956
4372
|
const boundaryElementContext = useBoundaryElement();
|
|
3957
4373
|
const {
|
|
3958
4374
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
4375
|
+
animate = false,
|
|
3959
4376
|
arrow: arrowProp = false,
|
|
3960
4377
|
boundaryElement = boundaryElementContext.element,
|
|
3961
4378
|
children: childProp,
|
|
@@ -4043,13 +4460,13 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4043
4460
|
}));
|
|
4044
4461
|
if (constrainSize || matchReferenceWidth) {
|
|
4045
4462
|
ret.push(size({
|
|
4046
|
-
apply(
|
|
4463
|
+
apply(_ref6) {
|
|
4047
4464
|
let {
|
|
4048
4465
|
availableWidth,
|
|
4049
4466
|
availableHeight,
|
|
4050
4467
|
elements,
|
|
4051
4468
|
referenceWidth
|
|
4052
|
-
} =
|
|
4469
|
+
} = _ref6;
|
|
4053
4470
|
referenceWidthRef.current = referenceWidth;
|
|
4054
4471
|
const _currentWidth = widthRef.current;
|
|
4055
4472
|
const _maxWidth = maxWidthRef.current;
|
|
@@ -4083,13 +4500,16 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4083
4500
|
padding: DEFAULT_POPOVER_PADDING
|
|
4084
4501
|
}));
|
|
4085
4502
|
}
|
|
4503
|
+
if (animate) {
|
|
4504
|
+
ret.push(origin);
|
|
4505
|
+
}
|
|
4086
4506
|
ret.push(hide({
|
|
4087
4507
|
boundary: referenceBoundary || void 0,
|
|
4088
4508
|
padding: DEFAULT_POPOVER_PADDING,
|
|
4089
4509
|
strategy: "referenceHidden"
|
|
4090
4510
|
}));
|
|
4091
4511
|
return ret;
|
|
4092
|
-
}, [arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4512
|
+
}, [animate, arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4093
4513
|
const {
|
|
4094
4514
|
x,
|
|
4095
4515
|
y,
|
|
@@ -4106,6 +4526,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4106
4526
|
const referenceHidden = (_f = middlewareData.hide) == null ? void 0 : _f.referenceHidden;
|
|
4107
4527
|
const arrowX = (_g = middlewareData.arrow) == null ? void 0 : _g.x;
|
|
4108
4528
|
const arrowY = (_h = middlewareData.arrow) == null ? void 0 : _h.y;
|
|
4529
|
+
const originX = (_i = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _i.originX;
|
|
4530
|
+
const originY = (_j = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _j.originY;
|
|
4109
4531
|
const setArrow = useCallback(arrowEl => {
|
|
4110
4532
|
arrowRef.current = arrowEl;
|
|
4111
4533
|
}, []);
|
|
@@ -4148,6 +4570,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4148
4570
|
children: /* @__PURE__ */jsx(PopoverCard, {
|
|
4149
4571
|
...restProps,
|
|
4150
4572
|
__unstable_margins: margins,
|
|
4573
|
+
animate,
|
|
4151
4574
|
arrow: arrowProp,
|
|
4152
4575
|
arrowRef: setArrow,
|
|
4153
4576
|
arrowX,
|
|
@@ -4160,6 +4583,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4160
4583
|
ref: setFloating,
|
|
4161
4584
|
scheme,
|
|
4162
4585
|
shadow,
|
|
4586
|
+
originX,
|
|
4587
|
+
originY,
|
|
4163
4588
|
strategy,
|
|
4164
4589
|
tone,
|
|
4165
4590
|
width: matchReferenceWidth ? referenceWidthRef.current : width,
|
|
@@ -4169,23 +4594,31 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4169
4594
|
})
|
|
4170
4595
|
});
|
|
4171
4596
|
return /* @__PURE__ */jsxs(Fragment, {
|
|
4172
|
-
children: [
|
|
4173
|
-
|
|
4174
|
-
|
|
4597
|
+
children: [/* @__PURE__ */jsx(ConditionalWrapper, {
|
|
4598
|
+
condition: animate,
|
|
4599
|
+
wrapper: children => /* @__PURE__ */jsx(AnimatePresence, {
|
|
4600
|
+
children
|
|
4601
|
+
}),
|
|
4602
|
+
children: open && /* @__PURE__ */jsx(ConditionalWrapper, {
|
|
4603
|
+
condition: !!portal,
|
|
4604
|
+
wrapper: children => /* @__PURE__ */jsx(Portal, {
|
|
4605
|
+
__unstable_name: typeof portal === "string" ? portal : void 0,
|
|
4606
|
+
children
|
|
4607
|
+
}),
|
|
4175
4608
|
children: popover
|
|
4176
|
-
})
|
|
4609
|
+
})
|
|
4177
4610
|
}), child]
|
|
4178
4611
|
});
|
|
4179
4612
|
}));
|
|
4180
4613
|
Popover.displayName = "Popover";
|
|
4181
|
-
var __freeze$
|
|
4182
|
-
var __defProp$
|
|
4183
|
-
var __template$
|
|
4184
|
-
value: __freeze$
|
|
4614
|
+
var __freeze$l = Object.freeze;
|
|
4615
|
+
var __defProp$l = Object.defineProperty;
|
|
4616
|
+
var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
|
|
4617
|
+
value: __freeze$l(raw || cooked.slice())
|
|
4185
4618
|
}));
|
|
4186
|
-
var _a$
|
|
4619
|
+
var _a$l, _b$d;
|
|
4187
4620
|
function radioBaseStyle() {
|
|
4188
|
-
return css(_a$
|
|
4621
|
+
return css(_a$l || (_a$l = __template$l(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));
|
|
4189
4622
|
}
|
|
4190
4623
|
function inputElementStyle(props) {
|
|
4191
4624
|
const {
|
|
@@ -4193,7 +4626,7 @@ function inputElementStyle(props) {
|
|
|
4193
4626
|
input
|
|
4194
4627
|
} = getTheme_v2(props.theme);
|
|
4195
4628
|
const dist = (input.radio.size - input.radio.markSize) / 2;
|
|
4196
|
-
return css(_b$d || (_b$d = __template$
|
|
4629
|
+
return css(_b$d || (_b$d = __template$l(["\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n z-index: 1;\n padding: 0;\n margin: 0;\n border-radius: ", ";\n border: none;\n\n /* enabled */\n & + span {\n display: block;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n\n &::after {\n content: '';\n position: absolute;\n top: ", ";\n left: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n opacity: 0;\n }\n }\n\n /* focused */\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span::after {\n opacity: 1;\n }\n\n /* customValidity */\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n &::after {\n background: ", ";\n }\n }\n\n /* read only */\n &[data-read-only] + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n\n /* disabled */\n &:not([data-read-only]):disabled + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n "])), rem(input.radio.size / 2), rem(input.radio.size), rem(input.radio.size), rem(input.radio.size / 2), color.input.default.enabled.bg, focusRingBorderStyle({
|
|
4197
4630
|
color: color.input.default.enabled.border,
|
|
4198
4631
|
width: input.border.width
|
|
4199
4632
|
}), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.input.default.enabled.fg, focusRingStyle({
|
|
@@ -4238,27 +4671,27 @@ const Radio = forwardRef(function Radio2(props, forwardedRef) {
|
|
|
4238
4671
|
}), /* @__PURE__ */jsx("span", {})]
|
|
4239
4672
|
});
|
|
4240
4673
|
});
|
|
4241
|
-
var __freeze$
|
|
4242
|
-
var __defProp$
|
|
4243
|
-
var __template$
|
|
4244
|
-
value: __freeze$
|
|
4674
|
+
var __freeze$k = Object.freeze;
|
|
4675
|
+
var __defProp$k = Object.defineProperty;
|
|
4676
|
+
var __template$k = (cooked, raw) => __freeze$k(__defProp$k(cooked, "raw", {
|
|
4677
|
+
value: __freeze$k(raw || cooked.slice())
|
|
4245
4678
|
}));
|
|
4246
|
-
var _a$
|
|
4679
|
+
var _a$k, _b$c, _c$6, _d$5;
|
|
4247
4680
|
function rootStyle() {
|
|
4248
|
-
return css(_a$
|
|
4681
|
+
return css(_a$k || (_a$k = __template$k(["\n position: relative;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
4249
4682
|
}
|
|
4250
4683
|
function inputBaseStyle(props) {
|
|
4251
4684
|
const {
|
|
4252
4685
|
font
|
|
4253
4686
|
} = getTheme_v2(props.theme);
|
|
4254
|
-
return css(_b$c || (_b$c = __template$
|
|
4687
|
+
return css(_b$c || (_b$c = __template$k(["\n -webkit-font-smoothing: antialiased;\n appearance: none;\n border: 0;\n font-family: ", ";\n color: inherit;\n width: 100%;\n outline: none;\n margin: 0;\n\n &:disabled {\n opacity: 1;\n }\n "])), font.text.family);
|
|
4255
4688
|
}
|
|
4256
4689
|
function inputColorStyle(props) {
|
|
4257
4690
|
const {
|
|
4258
4691
|
color,
|
|
4259
4692
|
input
|
|
4260
4693
|
} = getTheme_v2(props.theme);
|
|
4261
|
-
return css(_c$6 || (_c$6 = __template$
|
|
4694
|
+
return css(_c$6 || (_c$6 = __template$k(["\n /* enabled */\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ", ";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n "])), color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
4262
4695
|
color: color.input.default.enabled.border,
|
|
4263
4696
|
width: input.border.width
|
|
4264
4697
|
}), color.input.default.hovered.bg, color.input.default.hovered.fg, focusRingBorderStyle({
|
|
@@ -4301,7 +4734,7 @@ function iconBoxStyle(props) {
|
|
|
4301
4734
|
const {
|
|
4302
4735
|
color
|
|
4303
4736
|
} = getTheme_v2(props.theme);
|
|
4304
|
-
return css(_d$5 || (_d$5 = __template$
|
|
4737
|
+
return css(_d$5 || (_d$5 = __template$k(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n\n /* enabled */\n --card-fg-color: ", ";\n\n /* hover */\n @media (hover: hover) {\n select:not(disabled):not(:read-only):hover + && {\n --card-fg-color: ", ";\n }\n }\n\n /* disabled */\n select:disabled + && {\n --card-fg-color: ", ";\n }\n\n /* read-only */\n select[data-read-only] + && {\n --card-fg-color: ", ";\n }\n "])), color.input.default.enabled.fg, color.input.default.hovered.fg, color.input.default.disabled.fg, color.input.default.readOnly.fg);
|
|
4305
4738
|
}
|
|
4306
4739
|
const selectStyle = {
|
|
4307
4740
|
root: rootStyle,
|
|
@@ -4318,7 +4751,7 @@ const Select = forwardRef(function Select2(props, forwardedRef) {
|
|
|
4318
4751
|
disabled,
|
|
4319
4752
|
fontSize = 2,
|
|
4320
4753
|
padding = 3,
|
|
4321
|
-
radius =
|
|
4754
|
+
radius = 2,
|
|
4322
4755
|
readOnly,
|
|
4323
4756
|
space = 3,
|
|
4324
4757
|
...restProps
|
|
@@ -4385,24 +4818,24 @@ const Stack = forwardRef(function Stack2(props, ref) {
|
|
|
4385
4818
|
ref
|
|
4386
4819
|
});
|
|
4387
4820
|
});
|
|
4388
|
-
var __freeze$
|
|
4389
|
-
var __defProp$
|
|
4390
|
-
var __template$
|
|
4391
|
-
value: __freeze$
|
|
4821
|
+
var __freeze$j = Object.freeze;
|
|
4822
|
+
var __defProp$j = Object.defineProperty;
|
|
4823
|
+
var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
|
|
4824
|
+
value: __freeze$j(raw || cooked.slice())
|
|
4392
4825
|
}));
|
|
4393
|
-
var _a$
|
|
4826
|
+
var _a$j, _b$b, _c$5, _d$4, _e$2, _f$2, _g;
|
|
4394
4827
|
function switchBaseStyles() {
|
|
4395
|
-
return css(_a$
|
|
4828
|
+
return css(_a$j || (_a$j = __template$j(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
4396
4829
|
}
|
|
4397
4830
|
function switchInputStyles() {
|
|
4398
|
-
return css(_b$b || (_b$b = __template$
|
|
4831
|
+
return css(_b$b || (_b$b = __template$j(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n padding: 0;\n margin: 0;\n\n /* Place the input element above the representation element */\n z-index: 1;\n "])));
|
|
4399
4832
|
}
|
|
4400
4833
|
function switchRepresentationStyles(props) {
|
|
4401
4834
|
const {
|
|
4402
4835
|
color,
|
|
4403
4836
|
input
|
|
4404
4837
|
} = getTheme_v2(props.theme);
|
|
4405
|
-
return css(_c$5 || (_c$5 = __template$
|
|
4838
|
+
return css(_c$5 || (_c$5 = __template$j(["\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ", ";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input[data-read-only]:disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n "])), color.input.default.enabled.border, color.input.default.enabled.bg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
|
|
4406
4839
|
focusRing: input.switch.focusRing
|
|
4407
4840
|
}), color.input.default.enabled.fg, color.input.default.enabled.bg, color.input.default.hovered.border, color.input.default.hovered.bg, color.input.default.enabled.fg, color.input.default.enabled.bg, color.input.default.disabled.border, color.input.default.disabled.bg, color.input.default.readOnly.border, color.input.default.readOnly.bg);
|
|
4408
4841
|
}
|
|
@@ -4410,7 +4843,7 @@ function switchTrackStyles(props) {
|
|
|
4410
4843
|
const {
|
|
4411
4844
|
input
|
|
4412
4845
|
} = getTheme_v2(props.theme);
|
|
4413
|
-
return css(_d$4 || (_d$4 = __template$
|
|
4846
|
+
return css(_d$4 || (_d$4 = __template$j(["\n &:not([hidden]) {\n display: block;\n }\n background-color: var(--switch-bg-color);\n position: absolute;\n left: 0;\n top: 0;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n "])), rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2));
|
|
4414
4847
|
}
|
|
4415
4848
|
function switchThumbStyles(props) {
|
|
4416
4849
|
const {
|
|
@@ -4426,7 +4859,7 @@ function switchThumbStyles(props) {
|
|
|
4426
4859
|
const checkedOffset = trackWidth - trackPadding * 2 - size;
|
|
4427
4860
|
const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
|
|
4428
4861
|
const checked = $indeterminate !== true && props.$checked === true;
|
|
4429
|
-
return css(_g || (_g = __template$
|
|
4862
|
+
return css(_g || (_g = __template$j(["\n &:not([hidden]) {\n display: block;\n }\n position: absolute;\n left: ", ";\n top: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n transition-property: transform;\n transition-duration: ", "ms;\n transition-timing-function: ", ";\n background: var(--switch-fg-color);\n transform: translate3d(0, 0, 0);\n box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);\n\n ", "\n\n ", "\n "])), rem(trackPadding), rem(trackPadding), rem(size), rem(size), rem(size / 2), input.switch.transitionDurationMs, input.switch.transitionTimingFunction, checked && css(_e$2 || (_e$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && css(_f$2 || (_f$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
|
|
4430
4863
|
}
|
|
4431
4864
|
const Root$d = styled.span(switchBaseStyles);
|
|
4432
4865
|
const Input$2 = styled.input(switchInputStyles);
|
|
@@ -4470,14 +4903,14 @@ const Switch = forwardRef(function Switch2(props, forwardedRef) {
|
|
|
4470
4903
|
})]
|
|
4471
4904
|
});
|
|
4472
4905
|
});
|
|
4473
|
-
var __freeze$
|
|
4474
|
-
var __defProp$
|
|
4475
|
-
var __template$
|
|
4476
|
-
value: __freeze$
|
|
4906
|
+
var __freeze$i = Object.freeze;
|
|
4907
|
+
var __defProp$i = Object.defineProperty;
|
|
4908
|
+
var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
|
|
4909
|
+
value: __freeze$i(raw || cooked.slice())
|
|
4477
4910
|
}));
|
|
4478
|
-
var _a$
|
|
4911
|
+
var _a$i;
|
|
4479
4912
|
const Root$c = styled.span(textInputRootStyle);
|
|
4480
|
-
const InputRoot$1 = styled.span(_a$
|
|
4913
|
+
const InputRoot$1 = styled.span(_a$i || (_a$i = __template$i(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4481
4914
|
const Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4482
4915
|
const Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4483
4916
|
const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
|
|
@@ -4521,30 +4954,30 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
4521
4954
|
})
|
|
4522
4955
|
});
|
|
4523
4956
|
});
|
|
4524
|
-
var __freeze$
|
|
4525
|
-
var __defProp$
|
|
4526
|
-
var __template$
|
|
4527
|
-
value: __freeze$
|
|
4957
|
+
var __freeze$h = Object.freeze;
|
|
4958
|
+
var __defProp$h = Object.defineProperty;
|
|
4959
|
+
var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
|
|
4960
|
+
value: __freeze$h(raw || cooked.slice())
|
|
4528
4961
|
}));
|
|
4529
|
-
var _a$
|
|
4962
|
+
var _a$h, _b$a, _c$4, _d$3, _e$1, _f$1;
|
|
4530
4963
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
4531
4964
|
zIndex: 2
|
|
4532
4965
|
};
|
|
4533
4966
|
const Root$b = styled(Card).attrs({
|
|
4534
4967
|
forwardedAs: "span"
|
|
4535
4968
|
})(textInputRootStyle);
|
|
4536
|
-
const InputRoot = styled.span(_a$
|
|
4969
|
+
const InputRoot = styled.span(_a$h || (_a$h = __template$h(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4537
4970
|
const Prefix = styled(Card).attrs({
|
|
4538
4971
|
forwardedAs: "span"
|
|
4539
|
-
})(_b$a || (_b$a = __template$
|
|
4972
|
+
})(_b$a || (_b$a = __template$h(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
|
|
4540
4973
|
const Suffix = styled(Card).attrs({
|
|
4541
4974
|
forwardedAs: "span"
|
|
4542
|
-
})(_c$4 || (_c$4 = __template$
|
|
4975
|
+
})(_c$4 || (_c$4 = __template$h(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
|
|
4543
4976
|
const Input = styled.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4544
4977
|
const Presentation = styled.span(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4545
|
-
const LeftBox = styled(Box)(_d$3 || (_d$3 = __template$
|
|
4546
|
-
const RightBox = styled(Box)(_e$1 || (_e$1 = __template$
|
|
4547
|
-
const RightCard = styled(Card)(_f$1 || (_f$1 = __template$
|
|
4978
|
+
const LeftBox = styled(Box)(_d$3 || (_d$3 = __template$h(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
|
|
4979
|
+
const RightBox = styled(Box)(_e$1 || (_e$1 = __template$h(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4980
|
+
const RightCard = styled(Card)(_f$1 || (_f$1 = __template$h(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4548
4981
|
const TextInputClearButton = styled(Button)({
|
|
4549
4982
|
"&:not([hidden])": {
|
|
4550
4983
|
display: "block"
|
|
@@ -4619,13 +5052,13 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
4619
5052
|
padding,
|
|
4620
5053
|
children: /* @__PURE__ */jsxs(Text, {
|
|
4621
5054
|
size: fontSize,
|
|
4622
|
-
children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
|
|
5055
|
+
children: [isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && createElement(icon)]
|
|
4623
5056
|
})
|
|
4624
5057
|
}), !$hasClearButton && iconRight && /* @__PURE__ */jsx(RightBox, {
|
|
4625
5058
|
padding,
|
|
4626
5059
|
children: /* @__PURE__ */jsxs(Text, {
|
|
4627
5060
|
size: fontSize,
|
|
4628
|
-
children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
|
|
5061
|
+
children: [isValidElement(iconRight) && iconRight, reactIsExports.isValidElementType(iconRight) && createElement(iconRight)]
|
|
4629
5062
|
})
|
|
4630
5063
|
})]
|
|
4631
5064
|
}), [__unstable_disableFocusRing, border, fontSize, icon, iconRight, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]);
|
|
@@ -4712,17 +5145,6 @@ function useDelayedState(initialState) {
|
|
|
4712
5145
|
}, []);
|
|
4713
5146
|
return [state, onStateChange];
|
|
4714
5147
|
}
|
|
4715
|
-
function ConditionalWrapper(_ref5) {
|
|
4716
|
-
let {
|
|
4717
|
-
children,
|
|
4718
|
-
condition,
|
|
4719
|
-
wrapper
|
|
4720
|
-
} = _ref5;
|
|
4721
|
-
if (!condition) {
|
|
4722
|
-
return children;
|
|
4723
|
-
}
|
|
4724
|
-
return wrapper(children);
|
|
4725
|
-
}
|
|
4726
5148
|
const DEFAULT_TOOLTIP_ARROW_WIDTH = 15;
|
|
4727
5149
|
const DEFAULT_TOOLTIP_ARROW_HEIGHT = 6;
|
|
4728
5150
|
const DEFAULT_TOOLTIP_ARROW_RADIUS = 2;
|
|
@@ -4742,6 +5164,63 @@ const DEFAULT_FALLBACK_PLACEMENTS = {
|
|
|
4742
5164
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4743
5165
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4744
5166
|
};
|
|
5167
|
+
var __freeze$g = Object.freeze;
|
|
5168
|
+
var __defProp$g = Object.defineProperty;
|
|
5169
|
+
var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
|
|
5170
|
+
value: __freeze$g(raw || cooked.slice())
|
|
5171
|
+
}));
|
|
5172
|
+
var _a$g;
|
|
5173
|
+
const MotionCard = styled(motion(Card))(_a$g || (_a$g = __template$g([""])));
|
|
5174
|
+
const TooltipCard = memo(forwardRef(function TooltipCard2(props, ref) {
|
|
5175
|
+
const {
|
|
5176
|
+
animate,
|
|
5177
|
+
arrow,
|
|
5178
|
+
arrowRef,
|
|
5179
|
+
arrowX,
|
|
5180
|
+
arrowY,
|
|
5181
|
+
children,
|
|
5182
|
+
originX,
|
|
5183
|
+
originY,
|
|
5184
|
+
padding,
|
|
5185
|
+
placement,
|
|
5186
|
+
radius,
|
|
5187
|
+
scheme,
|
|
5188
|
+
shadow,
|
|
5189
|
+
style,
|
|
5190
|
+
...restProps
|
|
5191
|
+
} = props;
|
|
5192
|
+
const rootStyle = useMemo(() => ({
|
|
5193
|
+
originX,
|
|
5194
|
+
originY,
|
|
5195
|
+
...style
|
|
5196
|
+
}), [originX, originY, style]);
|
|
5197
|
+
const arrowStyle = useMemo(() => ({
|
|
5198
|
+
left: arrowX !== null ? arrowX : void 0,
|
|
5199
|
+
top: arrowY !== null ? arrowY : void 0,
|
|
5200
|
+
right: void 0,
|
|
5201
|
+
bottom: void 0
|
|
5202
|
+
}), [arrowX, arrowY]);
|
|
5203
|
+
return /* @__PURE__ */jsxs(MotionCard, {
|
|
5204
|
+
"data-ui": "Tooltip__card",
|
|
5205
|
+
...restProps,
|
|
5206
|
+
"data-placement": placement,
|
|
5207
|
+
padding,
|
|
5208
|
+
radius,
|
|
5209
|
+
ref,
|
|
5210
|
+
scheme,
|
|
5211
|
+
shadow,
|
|
5212
|
+
style: rootStyle,
|
|
5213
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
5214
|
+
children: [children, arrow && /* @__PURE__ */jsx(Arrow, {
|
|
5215
|
+
ref: arrowRef,
|
|
5216
|
+
style: arrowStyle,
|
|
5217
|
+
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
5218
|
+
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
5219
|
+
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
5220
|
+
})]
|
|
5221
|
+
});
|
|
5222
|
+
}));
|
|
5223
|
+
TooltipCard.displayName = "TooltipCard";
|
|
4745
5224
|
const key$4 = Symbol.for("@sanity/ui/context/tooltipDelayGroup");
|
|
4746
5225
|
globalScope[key$4] = globalScope[key$4] || createContext(null);
|
|
4747
5226
|
const TooltipDelayGroupContext = globalScope[key$4];
|
|
@@ -4778,19 +5257,20 @@ var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
|
|
|
4778
5257
|
value: __freeze$f(raw || cooked.slice())
|
|
4779
5258
|
}));
|
|
4780
5259
|
var _a$f;
|
|
4781
|
-
const Root$a = styled(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])),
|
|
5260
|
+
const Root$a = styled(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])), _ref7 => {
|
|
4782
5261
|
let {
|
|
4783
5262
|
$maxWidth
|
|
4784
|
-
} =
|
|
5263
|
+
} = _ref7;
|
|
4785
5264
|
return $maxWidth;
|
|
4786
5265
|
});
|
|
4787
5266
|
const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
4788
|
-
var _a2, _b, _c, _d, _e;
|
|
5267
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
4789
5268
|
const boundaryElementContext = useBoundaryElement();
|
|
4790
5269
|
const {
|
|
4791
5270
|
layer
|
|
4792
5271
|
} = useTheme_v2();
|
|
4793
5272
|
const {
|
|
5273
|
+
animate = false,
|
|
4794
5274
|
arrow: arrowProp = false,
|
|
4795
5275
|
boundaryElement = boundaryElementContext == null ? void 0 : boundaryElementContext.element,
|
|
4796
5276
|
children: childProp,
|
|
@@ -4805,7 +5285,6 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4805
5285
|
shadow = 2,
|
|
4806
5286
|
zOffset = layer.tooltip.zOffset,
|
|
4807
5287
|
delay,
|
|
4808
|
-
animate = false,
|
|
4809
5288
|
...restProps
|
|
4810
5289
|
} = props;
|
|
4811
5290
|
const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
|
|
@@ -4841,8 +5320,11 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4841
5320
|
padding: DEFAULT_TOOLTIP_PADDING
|
|
4842
5321
|
}));
|
|
4843
5322
|
}
|
|
5323
|
+
if (animate) {
|
|
5324
|
+
ret.push(origin);
|
|
5325
|
+
}
|
|
4844
5326
|
return ret;
|
|
4845
|
-
}, [arrowProp, boundaryElement, fallbackPlacements]);
|
|
5327
|
+
}, [animate, arrowProp, boundaryElement, fallbackPlacements]);
|
|
4846
5328
|
const {
|
|
4847
5329
|
floatingStyles,
|
|
4848
5330
|
placement,
|
|
@@ -4856,12 +5338,8 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4856
5338
|
});
|
|
4857
5339
|
const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
|
|
4858
5340
|
const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
|
|
4859
|
-
const
|
|
4860
|
-
|
|
4861
|
-
top: arrowY !== null ? arrowY : void 0,
|
|
4862
|
-
right: void 0,
|
|
4863
|
-
bottom: void 0
|
|
4864
|
-
}), [arrowX, arrowY]);
|
|
5341
|
+
const originX = (_f = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _f.originX;
|
|
5342
|
+
const originY = (_g = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _g.originY;
|
|
4865
5343
|
const tooltipId = useId();
|
|
4866
5344
|
const [isOpen, setIsOpen] = useDelayedState(false);
|
|
4867
5345
|
const delayGroupContext = useTooltipDelayGroup();
|
|
@@ -4983,53 +5461,33 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4983
5461
|
}, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
|
|
4984
5462
|
if (!child) return /* @__PURE__ */jsx(Fragment, {});
|
|
4985
5463
|
if (disabled) return child;
|
|
4986
|
-
const
|
|
5464
|
+
const tooltip = /* @__PURE__ */jsx(Root$a, {
|
|
4987
5465
|
"data-ui": "Tooltip",
|
|
4988
5466
|
...restProps,
|
|
4989
5467
|
ref: setFloating,
|
|
4990
5468
|
style: floatingStyles,
|
|
4991
5469
|
zOffset,
|
|
4992
5470
|
$maxWidth: tooltipWidth,
|
|
4993
|
-
children: /* @__PURE__ */jsx(
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
duration: 0.3,
|
|
5010
|
-
type: "spring"
|
|
5011
|
-
},
|
|
5012
|
-
children
|
|
5013
|
-
}),
|
|
5014
|
-
children: /* @__PURE__ */jsxs(Card, {
|
|
5015
|
-
"data-ui": "Tooltip__card",
|
|
5016
|
-
"data-placement": placement,
|
|
5017
|
-
padding,
|
|
5018
|
-
radius,
|
|
5019
|
-
scheme,
|
|
5020
|
-
shadow,
|
|
5021
|
-
children: [content, arrowProp && /* @__PURE__ */jsx(Arrow, {
|
|
5022
|
-
ref: setArrow,
|
|
5023
|
-
style: arrowStyle,
|
|
5024
|
-
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
5025
|
-
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
5026
|
-
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
5027
|
-
})]
|
|
5028
|
-
})
|
|
5471
|
+
children: /* @__PURE__ */jsx(TooltipCard, {
|
|
5472
|
+
...restProps,
|
|
5473
|
+
animate,
|
|
5474
|
+
arrow: arrowProp,
|
|
5475
|
+
arrowRef: setArrow,
|
|
5476
|
+
arrowX,
|
|
5477
|
+
arrowY,
|
|
5478
|
+
originX,
|
|
5479
|
+
originY,
|
|
5480
|
+
padding,
|
|
5481
|
+
placement,
|
|
5482
|
+
radius,
|
|
5483
|
+
ref: setFloating,
|
|
5484
|
+
scheme,
|
|
5485
|
+
shadow,
|
|
5486
|
+
children: content
|
|
5029
5487
|
})
|
|
5030
5488
|
});
|
|
5031
5489
|
return /* @__PURE__ */jsxs(Fragment, {
|
|
5032
|
-
children: [
|
|
5490
|
+
children: [/* @__PURE__ */jsx(ConditionalWrapper, {
|
|
5033
5491
|
condition: animate,
|
|
5034
5492
|
wrapper: children => /* @__PURE__ */jsx(AnimatePresence, {
|
|
5035
5493
|
children
|
|
@@ -5040,9 +5498,9 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
5040
5498
|
__unstable_name: typeof portalProp === "string" ? portalProp : void 0,
|
|
5041
5499
|
children
|
|
5042
5500
|
}),
|
|
5043
|
-
children:
|
|
5501
|
+
children: tooltip
|
|
5044
5502
|
})
|
|
5045
|
-
})]
|
|
5503
|
+
}), child]
|
|
5046
5504
|
});
|
|
5047
5505
|
});
|
|
5048
5506
|
var __freeze$e = Object.freeze;
|
|
@@ -5199,10 +5657,10 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
|
|
|
5199
5657
|
query,
|
|
5200
5658
|
value
|
|
5201
5659
|
} = state;
|
|
5202
|
-
const defaultRenderOption = useCallback(
|
|
5660
|
+
const defaultRenderOption = useCallback(_ref8 => {
|
|
5203
5661
|
let {
|
|
5204
5662
|
value: value2
|
|
5205
|
-
} =
|
|
5663
|
+
} = _ref8;
|
|
5206
5664
|
return /* @__PURE__ */jsx(Card, {
|
|
5207
5665
|
"data-as": "button",
|
|
5208
5666
|
padding: paddingProp,
|
|
@@ -5661,10 +6119,10 @@ var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
|
|
|
5661
6119
|
value: __freeze$c(raw || cooked.slice())
|
|
5662
6120
|
}));
|
|
5663
6121
|
var _a$c, _b$7;
|
|
5664
|
-
function dialogStyle(
|
|
6122
|
+
function dialogStyle(_ref9) {
|
|
5665
6123
|
let {
|
|
5666
6124
|
theme
|
|
5667
|
-
} =
|
|
6125
|
+
} = _ref9;
|
|
5668
6126
|
const {
|
|
5669
6127
|
color
|
|
5670
6128
|
} = getTheme_v2(theme);
|
|
@@ -6404,7 +6862,7 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
|
|
|
6404
6862
|
registerElement,
|
|
6405
6863
|
shouldFocus
|
|
6406
6864
|
}), [buttonElement, handleMenuClickOutside, handleMenuEscape, handleItemClick, id, handleBlur, registerElement, shouldFocus]);
|
|
6407
|
-
const menu = isElement
|
|
6865
|
+
const menu = reactIsExports.isElement(menuProp) ? cloneElement(menuProp, menuProps) : null;
|
|
6408
6866
|
const setButtonRef = useCallback(el => {
|
|
6409
6867
|
if (typeof ref === "function") {
|
|
6410
6868
|
ref(el);
|
|
@@ -6413,7 +6871,7 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
|
|
|
6413
6871
|
}
|
|
6414
6872
|
setButtonElement(el);
|
|
6415
6873
|
}, [ref]);
|
|
6416
|
-
const button = useMemo(() => isElement
|
|
6874
|
+
const button = useMemo(() => reactIsExports.isElement(buttonProp) ? cloneElement(buttonProp, {
|
|
6417
6875
|
"data-ui": "MenuButton",
|
|
6418
6876
|
id,
|
|
6419
6877
|
onClick: handleButtonClick,
|
|
@@ -6600,7 +7058,7 @@ function MenuGroup(props) {
|
|
|
6600
7058
|
padding,
|
|
6601
7059
|
children: [icon && /* @__PURE__ */jsxs(Text, {
|
|
6602
7060
|
size: fontSize,
|
|
6603
|
-
children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
|
|
7061
|
+
children: [isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && createElement(icon)]
|
|
6604
7062
|
}), /* @__PURE__ */jsx(Box, {
|
|
6605
7063
|
flex: 1,
|
|
6606
7064
|
children: /* @__PURE__ */jsx(Text, {
|
|
@@ -6703,7 +7161,7 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
|
|
|
6703
7161
|
...paddingProps,
|
|
6704
7162
|
children: [icon && /* @__PURE__ */jsxs(Text, {
|
|
6705
7163
|
size: fontSize,
|
|
6706
|
-
children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
|
|
7164
|
+
children: [isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && createElement(icon)]
|
|
6707
7165
|
}), text && /* @__PURE__ */jsx(Box, {
|
|
6708
7166
|
flex: 1,
|
|
6709
7167
|
children: /* @__PURE__ */jsx(Text, {
|
|
@@ -6721,7 +7179,7 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
|
|
|
6721
7179
|
}
|
|
6722
7180
|
}), iconRight && /* @__PURE__ */jsxs(Text, {
|
|
6723
7181
|
size: fontSize,
|
|
6724
|
-
children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
|
|
7182
|
+
children: [isValidElement(iconRight) && iconRight, reactIsExports.isValidElementType(iconRight) && createElement(iconRight)]
|
|
6725
7183
|
})]
|
|
6726
7184
|
}), children && /* @__PURE__ */jsx(Box, {
|
|
6727
7185
|
as: "span",
|
|
@@ -6738,15 +7196,15 @@ var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
|
|
|
6738
7196
|
var _a$6, _b$3, _c$1, _d;
|
|
6739
7197
|
const keyframe = keyframes(_a$6 || (_a$6 = __template$6(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
|
|
6740
7198
|
const animation = css(_b$3 || (_b$3 = __template$6(["\n background-image: linear-gradient(\n to right,\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-to),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from)\n );\n background-position: 100%;\n background-size: 200% 100%;\n background-attachment: fixed;\n animation-name: ", ";\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n animation-duration: 2000ms;\n"])), keyframe);
|
|
6741
|
-
const skeletonStyle = css(_d || (_d = __template$6(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])),
|
|
7199
|
+
const skeletonStyle = css(_d || (_d = __template$6(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])), _ref10 => {
|
|
6742
7200
|
let {
|
|
6743
7201
|
$visible
|
|
6744
|
-
} =
|
|
7202
|
+
} = _ref10;
|
|
6745
7203
|
return $visible ? 1 : 0;
|
|
6746
|
-
},
|
|
7204
|
+
}, _ref11 => {
|
|
6747
7205
|
let {
|
|
6748
7206
|
$animated
|
|
6749
|
-
} =
|
|
7207
|
+
} = _ref11;
|
|
6750
7208
|
return $animated ? animation : css(_c$1 || (_c$1 = __template$6(["\n background-color: var(--card-skeleton-color-from);\n "])));
|
|
6751
7209
|
});
|
|
6752
7210
|
const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
|
|
@@ -7131,12 +7589,12 @@ function ToastProvider(props) {
|
|
|
7131
7589
|
paddingY,
|
|
7132
7590
|
children: /* @__PURE__ */jsx(AnimatePresence, {
|
|
7133
7591
|
initial: false,
|
|
7134
|
-
children: state.map(
|
|
7592
|
+
children: state.map(_ref12 => {
|
|
7135
7593
|
let {
|
|
7136
7594
|
dismiss,
|
|
7137
7595
|
id,
|
|
7138
7596
|
params
|
|
7139
|
-
} =
|
|
7597
|
+
} = _ref12;
|
|
7140
7598
|
return /* @__PURE__ */jsx(motion.div, {
|
|
7141
7599
|
animate: {
|
|
7142
7600
|
opacity: 1,
|
|
@@ -7630,5 +8088,5 @@ const TreeItem = memo(function TreeItem2(props) {
|
|
|
7630
8088
|
})]
|
|
7631
8089
|
});
|
|
7632
8090
|
});
|
|
7633
|
-
export { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _ResizeObserver, _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, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
8091
|
+
export { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, ConditionalWrapper, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _ResizeObserver, _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, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
7634
8092
|
//# sourceMappingURL=index.esm.js.map
|