@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.js
CHANGED
|
@@ -6,19 +6,17 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
6
6
|
var theme = require('@sanity/ui/theme');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var react = require('react');
|
|
9
|
-
var ReactIs = require('react-is');
|
|
10
9
|
var styled = require('styled-components');
|
|
11
10
|
var icons = require('@sanity/icons');
|
|
12
11
|
var Refractor = require('react-refractor');
|
|
13
12
|
var reactDom$1 = require('@floating-ui/react-dom');
|
|
14
|
-
var reactDom = require('react-dom');
|
|
15
13
|
var framerMotion = require('framer-motion');
|
|
14
|
+
var reactDom = require('react-dom');
|
|
16
15
|
function _interopDefaultCompat(e) {
|
|
17
16
|
return e && typeof e === 'object' && 'default' in e ? e : {
|
|
18
17
|
default: e
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
|
-
var ReactIs__default = /*#__PURE__*/_interopDefaultCompat(ReactIs);
|
|
22
20
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
23
21
|
var Refractor__default = /*#__PURE__*/_interopDefaultCompat(Refractor);
|
|
24
22
|
const createColorTheme = theme.createColorTheme;
|
|
@@ -31,8 +29,370 @@ const rgbToHsl = theme.rgbToHsl;
|
|
|
31
29
|
const rgba = theme.rgba;
|
|
32
30
|
const screen = theme.screen;
|
|
33
31
|
const studioTheme = theme.buildTheme();
|
|
32
|
+
function getDefaultExportFromCjs(x) {
|
|
33
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
34
|
+
}
|
|
35
|
+
var reactIs = {
|
|
36
|
+
exports: {}
|
|
37
|
+
};
|
|
38
|
+
var reactIs_development = {};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @license React
|
|
42
|
+
* react-is.development.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
var hasRequiredReactIs_development;
|
|
51
|
+
function requireReactIs_development() {
|
|
52
|
+
if (hasRequiredReactIs_development) return reactIs_development;
|
|
53
|
+
hasRequiredReactIs_development = 1;
|
|
54
|
+
if (process.env.NODE_ENV !== "production") {
|
|
55
|
+
(function () {
|
|
56
|
+
// ATTENTION
|
|
57
|
+
// When adding new symbols to this file,
|
|
58
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
59
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
60
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
61
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
62
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
63
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
64
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
65
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
66
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
67
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
|
68
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
69
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
70
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
71
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
72
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
73
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
74
|
+
|
|
75
|
+
// -----------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
78
|
+
var enableCacheElement = false;
|
|
79
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
80
|
+
|
|
81
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
82
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
83
|
+
// issues in DEV builds.
|
|
84
|
+
|
|
85
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
86
|
+
|
|
87
|
+
var REACT_MODULE_REFERENCE;
|
|
88
|
+
{
|
|
89
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
90
|
+
}
|
|
91
|
+
function isValidElementType(type) {
|
|
92
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
93
|
+
return true;
|
|
94
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
95
|
+
|
|
96
|
+
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) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
if (typeof type === 'object' && type !== null) {
|
|
100
|
+
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 ||
|
|
101
|
+
// This needs to include all possible module reference object
|
|
102
|
+
// types supported by any Flight configuration anywhere since
|
|
103
|
+
// we don't know which Flight build this will end up being used
|
|
104
|
+
// with.
|
|
105
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
function typeOf(object) {
|
|
112
|
+
if (typeof object === 'object' && object !== null) {
|
|
113
|
+
var $$typeof = object.$$typeof;
|
|
114
|
+
switch ($$typeof) {
|
|
115
|
+
case REACT_ELEMENT_TYPE:
|
|
116
|
+
var type = object.type;
|
|
117
|
+
switch (type) {
|
|
118
|
+
case REACT_FRAGMENT_TYPE:
|
|
119
|
+
case REACT_PROFILER_TYPE:
|
|
120
|
+
case REACT_STRICT_MODE_TYPE:
|
|
121
|
+
case REACT_SUSPENSE_TYPE:
|
|
122
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
123
|
+
return type;
|
|
124
|
+
default:
|
|
125
|
+
var $$typeofType = type && type.$$typeof;
|
|
126
|
+
switch ($$typeofType) {
|
|
127
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
128
|
+
case REACT_CONTEXT_TYPE:
|
|
129
|
+
case REACT_FORWARD_REF_TYPE:
|
|
130
|
+
case REACT_LAZY_TYPE:
|
|
131
|
+
case REACT_MEMO_TYPE:
|
|
132
|
+
case REACT_PROVIDER_TYPE:
|
|
133
|
+
return $$typeofType;
|
|
134
|
+
default:
|
|
135
|
+
return $$typeof;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
case REACT_PORTAL_TYPE:
|
|
139
|
+
return $$typeof;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
145
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
146
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
147
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
148
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
149
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
150
|
+
var Memo = REACT_MEMO_TYPE;
|
|
151
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
152
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
153
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
154
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
155
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
156
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
157
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
|
158
|
+
|
|
159
|
+
function isAsyncMode(object) {
|
|
160
|
+
{
|
|
161
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
162
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
163
|
+
|
|
164
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
function isConcurrentMode(object) {
|
|
170
|
+
{
|
|
171
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
172
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
173
|
+
|
|
174
|
+
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
function isContextConsumer(object) {
|
|
180
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
181
|
+
}
|
|
182
|
+
function isContextProvider(object) {
|
|
183
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
184
|
+
}
|
|
185
|
+
function isElement(object) {
|
|
186
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
187
|
+
}
|
|
188
|
+
function isForwardRef(object) {
|
|
189
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
190
|
+
}
|
|
191
|
+
function isFragment(object) {
|
|
192
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
193
|
+
}
|
|
194
|
+
function isLazy(object) {
|
|
195
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
196
|
+
}
|
|
197
|
+
function isMemo(object) {
|
|
198
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
199
|
+
}
|
|
200
|
+
function isPortal(object) {
|
|
201
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
202
|
+
}
|
|
203
|
+
function isProfiler(object) {
|
|
204
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
205
|
+
}
|
|
206
|
+
function isStrictMode(object) {
|
|
207
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
208
|
+
}
|
|
209
|
+
function isSuspense(object) {
|
|
210
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
211
|
+
}
|
|
212
|
+
function isSuspenseList(object) {
|
|
213
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
214
|
+
}
|
|
215
|
+
reactIs_development.ContextConsumer = ContextConsumer;
|
|
216
|
+
reactIs_development.ContextProvider = ContextProvider;
|
|
217
|
+
reactIs_development.Element = Element;
|
|
218
|
+
reactIs_development.ForwardRef = ForwardRef;
|
|
219
|
+
reactIs_development.Fragment = Fragment;
|
|
220
|
+
reactIs_development.Lazy = Lazy;
|
|
221
|
+
reactIs_development.Memo = Memo;
|
|
222
|
+
reactIs_development.Portal = Portal;
|
|
223
|
+
reactIs_development.Profiler = Profiler;
|
|
224
|
+
reactIs_development.StrictMode = StrictMode;
|
|
225
|
+
reactIs_development.Suspense = Suspense;
|
|
226
|
+
reactIs_development.SuspenseList = SuspenseList;
|
|
227
|
+
reactIs_development.isAsyncMode = isAsyncMode;
|
|
228
|
+
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
229
|
+
reactIs_development.isContextConsumer = isContextConsumer;
|
|
230
|
+
reactIs_development.isContextProvider = isContextProvider;
|
|
231
|
+
reactIs_development.isElement = isElement;
|
|
232
|
+
reactIs_development.isForwardRef = isForwardRef;
|
|
233
|
+
reactIs_development.isFragment = isFragment;
|
|
234
|
+
reactIs_development.isLazy = isLazy;
|
|
235
|
+
reactIs_development.isMemo = isMemo;
|
|
236
|
+
reactIs_development.isPortal = isPortal;
|
|
237
|
+
reactIs_development.isProfiler = isProfiler;
|
|
238
|
+
reactIs_development.isStrictMode = isStrictMode;
|
|
239
|
+
reactIs_development.isSuspense = isSuspense;
|
|
240
|
+
reactIs_development.isSuspenseList = isSuspenseList;
|
|
241
|
+
reactIs_development.isValidElementType = isValidElementType;
|
|
242
|
+
reactIs_development.typeOf = typeOf;
|
|
243
|
+
})();
|
|
244
|
+
}
|
|
245
|
+
return reactIs_development;
|
|
246
|
+
}
|
|
247
|
+
var reactIs_production_min = {};
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @license React
|
|
251
|
+
* react-is.production.min.js
|
|
252
|
+
*
|
|
253
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
254
|
+
*
|
|
255
|
+
* This source code is licensed under the MIT license found in the
|
|
256
|
+
* LICENSE file in the root directory of this source tree.
|
|
257
|
+
*/
|
|
258
|
+
|
|
259
|
+
var hasRequiredReactIs_production_min;
|
|
260
|
+
function requireReactIs_production_min() {
|
|
261
|
+
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
262
|
+
hasRequiredReactIs_production_min = 1;
|
|
263
|
+
var b = Symbol.for("react.element"),
|
|
264
|
+
c = Symbol.for("react.portal"),
|
|
265
|
+
d = Symbol.for("react.fragment"),
|
|
266
|
+
e = Symbol.for("react.strict_mode"),
|
|
267
|
+
f = Symbol.for("react.profiler"),
|
|
268
|
+
g = Symbol.for("react.provider"),
|
|
269
|
+
h = Symbol.for("react.context"),
|
|
270
|
+
k = Symbol.for("react.server_context"),
|
|
271
|
+
l = Symbol.for("react.forward_ref"),
|
|
272
|
+
m = Symbol.for("react.suspense"),
|
|
273
|
+
n = Symbol.for("react.suspense_list"),
|
|
274
|
+
p = Symbol.for("react.memo"),
|
|
275
|
+
q = Symbol.for("react.lazy"),
|
|
276
|
+
t = Symbol.for("react.offscreen"),
|
|
277
|
+
u;
|
|
278
|
+
u = Symbol.for("react.module.reference");
|
|
279
|
+
function v(a) {
|
|
280
|
+
if ("object" === typeof a && null !== a) {
|
|
281
|
+
var r = a.$$typeof;
|
|
282
|
+
switch (r) {
|
|
283
|
+
case b:
|
|
284
|
+
switch (a = a.type, a) {
|
|
285
|
+
case d:
|
|
286
|
+
case f:
|
|
287
|
+
case e:
|
|
288
|
+
case m:
|
|
289
|
+
case n:
|
|
290
|
+
return a;
|
|
291
|
+
default:
|
|
292
|
+
switch (a = a && a.$$typeof, a) {
|
|
293
|
+
case k:
|
|
294
|
+
case h:
|
|
295
|
+
case l:
|
|
296
|
+
case q:
|
|
297
|
+
case p:
|
|
298
|
+
case g:
|
|
299
|
+
return a;
|
|
300
|
+
default:
|
|
301
|
+
return r;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
case c:
|
|
305
|
+
return r;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
reactIs_production_min.ContextConsumer = h;
|
|
310
|
+
reactIs_production_min.ContextProvider = g;
|
|
311
|
+
reactIs_production_min.Element = b;
|
|
312
|
+
reactIs_production_min.ForwardRef = l;
|
|
313
|
+
reactIs_production_min.Fragment = d;
|
|
314
|
+
reactIs_production_min.Lazy = q;
|
|
315
|
+
reactIs_production_min.Memo = p;
|
|
316
|
+
reactIs_production_min.Portal = c;
|
|
317
|
+
reactIs_production_min.Profiler = f;
|
|
318
|
+
reactIs_production_min.StrictMode = e;
|
|
319
|
+
reactIs_production_min.Suspense = m;
|
|
320
|
+
reactIs_production_min.SuspenseList = n;
|
|
321
|
+
reactIs_production_min.isAsyncMode = function () {
|
|
322
|
+
return !1;
|
|
323
|
+
};
|
|
324
|
+
reactIs_production_min.isConcurrentMode = function () {
|
|
325
|
+
return !1;
|
|
326
|
+
};
|
|
327
|
+
reactIs_production_min.isContextConsumer = function (a) {
|
|
328
|
+
return v(a) === h;
|
|
329
|
+
};
|
|
330
|
+
reactIs_production_min.isContextProvider = function (a) {
|
|
331
|
+
return v(a) === g;
|
|
332
|
+
};
|
|
333
|
+
reactIs_production_min.isElement = function (a) {
|
|
334
|
+
return "object" === typeof a && null !== a && a.$$typeof === b;
|
|
335
|
+
};
|
|
336
|
+
reactIs_production_min.isForwardRef = function (a) {
|
|
337
|
+
return v(a) === l;
|
|
338
|
+
};
|
|
339
|
+
reactIs_production_min.isFragment = function (a) {
|
|
340
|
+
return v(a) === d;
|
|
341
|
+
};
|
|
342
|
+
reactIs_production_min.isLazy = function (a) {
|
|
343
|
+
return v(a) === q;
|
|
344
|
+
};
|
|
345
|
+
reactIs_production_min.isMemo = function (a) {
|
|
346
|
+
return v(a) === p;
|
|
347
|
+
};
|
|
348
|
+
reactIs_production_min.isPortal = function (a) {
|
|
349
|
+
return v(a) === c;
|
|
350
|
+
};
|
|
351
|
+
reactIs_production_min.isProfiler = function (a) {
|
|
352
|
+
return v(a) === f;
|
|
353
|
+
};
|
|
354
|
+
reactIs_production_min.isStrictMode = function (a) {
|
|
355
|
+
return v(a) === e;
|
|
356
|
+
};
|
|
357
|
+
reactIs_production_min.isSuspense = function (a) {
|
|
358
|
+
return v(a) === m;
|
|
359
|
+
};
|
|
360
|
+
reactIs_production_min.isSuspenseList = function (a) {
|
|
361
|
+
return v(a) === n;
|
|
362
|
+
};
|
|
363
|
+
reactIs_production_min.isValidElementType = function (a) {
|
|
364
|
+
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;
|
|
365
|
+
};
|
|
366
|
+
reactIs_production_min.typeOf = v;
|
|
367
|
+
return reactIs_production_min;
|
|
368
|
+
}
|
|
369
|
+
if (process.env.NODE_ENV === 'production') {
|
|
370
|
+
reactIs.exports = requireReactIs_production_min();
|
|
371
|
+
} else {
|
|
372
|
+
reactIs.exports = requireReactIs_development();
|
|
373
|
+
}
|
|
374
|
+
var reactIsExports = reactIs.exports;
|
|
375
|
+
var ReactIs = /*@__PURE__*/getDefaultExportFromCjs(reactIsExports);
|
|
34
376
|
const EMPTY_ARRAY = [];
|
|
35
377
|
const EMPTY_RECORD = {};
|
|
378
|
+
const POPOVER_MOTION_PROPS = {
|
|
379
|
+
initial: {
|
|
380
|
+
opacity: 0.5,
|
|
381
|
+
scale: 0.97
|
|
382
|
+
},
|
|
383
|
+
animate: {
|
|
384
|
+
opacity: 1,
|
|
385
|
+
scale: 1
|
|
386
|
+
},
|
|
387
|
+
exit: {
|
|
388
|
+
opacity: 0,
|
|
389
|
+
scale: 0.97
|
|
390
|
+
},
|
|
391
|
+
transition: {
|
|
392
|
+
duration: 0.4,
|
|
393
|
+
type: "spring"
|
|
394
|
+
}
|
|
395
|
+
};
|
|
36
396
|
function _fillCSSObject(keys, value) {
|
|
37
397
|
return keys.reduce((style, key) => {
|
|
38
398
|
style[key] = value;
|
|
@@ -524,7 +884,7 @@ var gatherActiveObservationsAtDepth = function (depth) {
|
|
|
524
884
|
});
|
|
525
885
|
});
|
|
526
886
|
};
|
|
527
|
-
var process = function () {
|
|
887
|
+
var process$1 = function () {
|
|
528
888
|
var depth = 0;
|
|
529
889
|
gatherActiveObservationsAtDepth(depth);
|
|
530
890
|
while (hasActiveObservations()) {
|
|
@@ -605,7 +965,7 @@ var Scheduler = function () {
|
|
|
605
965
|
queueResizeObserver(function () {
|
|
606
966
|
var elementsHaveResized = false;
|
|
607
967
|
try {
|
|
608
|
-
elementsHaveResized = process();
|
|
968
|
+
elementsHaveResized = process$1();
|
|
609
969
|
} finally {
|
|
610
970
|
scheduled = false;
|
|
611
971
|
timeout = until - time();
|
|
@@ -1491,13 +1851,13 @@ function responsiveInputPaddingIconRightStyle(props) {
|
|
|
1491
1851
|
$iconRight: true
|
|
1492
1852
|
});
|
|
1493
1853
|
}
|
|
1494
|
-
var __freeze$
|
|
1495
|
-
var __defProp$
|
|
1496
|
-
var __template$
|
|
1497
|
-
value: __freeze$
|
|
1854
|
+
var __freeze$F = Object.freeze;
|
|
1855
|
+
var __defProp$G = Object.defineProperty;
|
|
1856
|
+
var __template$F = (cooked, raw) => __freeze$F(__defProp$G(cooked, "raw", {
|
|
1857
|
+
value: __freeze$F(raw || cooked.slice())
|
|
1498
1858
|
}));
|
|
1499
|
-
var _a$
|
|
1500
|
-
const ROOT_STYLE = styled.css(_a$
|
|
1859
|
+
var _a$F, _b$n, _c$c;
|
|
1860
|
+
const ROOT_STYLE = styled.css(_a$F || (_a$F = __template$F(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
|
|
1501
1861
|
function textInputRootStyle() {
|
|
1502
1862
|
return ROOT_STYLE;
|
|
1503
1863
|
}
|
|
@@ -1511,7 +1871,7 @@ function textInputBaseStyle(props) {
|
|
|
1511
1871
|
color,
|
|
1512
1872
|
font
|
|
1513
1873
|
} = theme.getTheme_v2(props.theme);
|
|
1514
|
-
return styled.css(_b$n || (_b$n = __template$
|
|
1874
|
+
return styled.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);
|
|
1515
1875
|
}
|
|
1516
1876
|
function textInputFontSizeStyle(props) {
|
|
1517
1877
|
const {
|
|
@@ -1538,7 +1898,7 @@ function textInputRepresentationStyle(props) {
|
|
|
1538
1898
|
color,
|
|
1539
1899
|
input
|
|
1540
1900
|
} = theme.getTheme_v2(props.theme);
|
|
1541
|
-
return styled.css(_c$c || (_c$c = __template$
|
|
1901
|
+
return styled.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({
|
|
1542
1902
|
color: color.input.default.enabled.border,
|
|
1543
1903
|
width: input.border.width
|
|
1544
1904
|
}), color.input.invalid.enabled.bg, color.input.invalid.enabled.fg, focusRingBorderStyle({
|
|
@@ -1612,12 +1972,12 @@ function responsiveShadowStyle(props) {
|
|
|
1612
1972
|
} = theme.getTheme_v2(props.theme);
|
|
1613
1973
|
return _responsive(media, props.$shadow, index => shadowStyle(shadow[index], card.shadow.outline));
|
|
1614
1974
|
}
|
|
1615
|
-
var __freeze$
|
|
1616
|
-
var __defProp$
|
|
1617
|
-
var __template$
|
|
1618
|
-
value: __freeze$
|
|
1975
|
+
var __freeze$E = Object.freeze;
|
|
1976
|
+
var __defProp$F = Object.defineProperty;
|
|
1977
|
+
var __template$E = (cooked, raw) => __freeze$E(__defProp$F(cooked, "raw", {
|
|
1978
|
+
value: __freeze$E(raw || cooked.slice())
|
|
1619
1979
|
}));
|
|
1620
|
-
var _a$
|
|
1980
|
+
var _a$E, _b$m, _c$b;
|
|
1621
1981
|
function labelBaseStyle(props) {
|
|
1622
1982
|
const {
|
|
1623
1983
|
$accent,
|
|
@@ -1626,16 +1986,16 @@ function labelBaseStyle(props) {
|
|
|
1626
1986
|
const {
|
|
1627
1987
|
font
|
|
1628
1988
|
} = theme.getTheme_v2(props.theme);
|
|
1629
|
-
return styled.css(_c$b || (_c$b = __template$
|
|
1989
|
+
return styled.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 && styled.css(_a$E || (_a$E = __template$E(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$m || (_b$m = __template$E(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
1630
1990
|
}
|
|
1631
|
-
var __freeze$
|
|
1632
|
-
var __defProp$
|
|
1633
|
-
var __template$
|
|
1634
|
-
value: __freeze$
|
|
1991
|
+
var __freeze$D = Object.freeze;
|
|
1992
|
+
var __defProp$E = Object.defineProperty;
|
|
1993
|
+
var __template$D = (cooked, raw) => __freeze$D(__defProp$E(cooked, "raw", {
|
|
1994
|
+
value: __freeze$D(raw || cooked.slice())
|
|
1635
1995
|
}));
|
|
1636
|
-
var _a$
|
|
1637
|
-
const Root$
|
|
1638
|
-
const SpanWithTextOverflow$2 = styled__default.default.span(_a$
|
|
1996
|
+
var _a$D;
|
|
1997
|
+
const Root$C = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
1998
|
+
const SpanWithTextOverflow$2 = styled__default.default.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"])));
|
|
1639
1999
|
const Label = react.forwardRef(function Label2(props, ref) {
|
|
1640
2000
|
const {
|
|
1641
2001
|
accent,
|
|
@@ -1657,7 +2017,7 @@ const Label = react.forwardRef(function Label2(props, ref) {
|
|
|
1657
2017
|
children
|
|
1658
2018
|
});
|
|
1659
2019
|
}
|
|
1660
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2020
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$C, {
|
|
1661
2021
|
"data-ui": "Label",
|
|
1662
2022
|
...restProps,
|
|
1663
2023
|
$accent: accent,
|
|
@@ -1816,7 +2176,7 @@ function avatarStrokeStyle() {
|
|
|
1816
2176
|
}
|
|
1817
2177
|
};
|
|
1818
2178
|
}
|
|
1819
|
-
const Root$
|
|
2179
|
+
const Root$B = styled__default.default.div(responsiveAvatarSizeStyle, avatarStyle.root);
|
|
1820
2180
|
const Arrow$1 = styled__default.default.div(avatarStyle.arrow);
|
|
1821
2181
|
const BgStroke = styled__default.default.ellipse(avatarStyle.bgStroke);
|
|
1822
2182
|
const Stroke = styled__default.default.ellipse(avatarStyle.stroke);
|
|
@@ -1843,7 +2203,7 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1843
2203
|
const {
|
|
1844
2204
|
avatar
|
|
1845
2205
|
} = useTheme_v2();
|
|
1846
|
-
const as =
|
|
2206
|
+
const as = ReactIs.isValidElementType(asProp) ? asProp : "div";
|
|
1847
2207
|
const size = useArrayProp(sizeProp);
|
|
1848
2208
|
const avatarSize = avatar.sizes[size[0]] || avatar.sizes[0];
|
|
1849
2209
|
const _sizeRem = avatarSize.size;
|
|
@@ -1872,7 +2232,7 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1872
2232
|
if (s === 3) return 5;
|
|
1873
2233
|
return 0;
|
|
1874
2234
|
}), [size]);
|
|
1875
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2235
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$B, {
|
|
1876
2236
|
as,
|
|
1877
2237
|
"data-as": typeof as === "string" ? as : void 0,
|
|
1878
2238
|
"data-ui": "Avatar",
|
|
@@ -1941,12 +2301,12 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1941
2301
|
})]
|
|
1942
2302
|
});
|
|
1943
2303
|
});
|
|
1944
|
-
var __freeze$
|
|
1945
|
-
var __defProp$
|
|
1946
|
-
var __template$
|
|
1947
|
-
value: __freeze$
|
|
2304
|
+
var __freeze$C = Object.freeze;
|
|
2305
|
+
var __defProp$D = Object.defineProperty;
|
|
2306
|
+
var __template$C = (cooked, raw) => __freeze$C(__defProp$D(cooked, "raw", {
|
|
2307
|
+
value: __freeze$C(raw || cooked.slice())
|
|
1948
2308
|
}));
|
|
1949
|
-
var _a$
|
|
2309
|
+
var _a$C;
|
|
1950
2310
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1951
2311
|
const {
|
|
1952
2312
|
avatar,
|
|
@@ -1966,9 +2326,9 @@ function _avatarCounterBaseStyle(props) {
|
|
|
1966
2326
|
const {
|
|
1967
2327
|
space
|
|
1968
2328
|
} = theme.getTheme_v2(props.theme);
|
|
1969
|
-
return styled.css(_a$
|
|
2329
|
+
return styled.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]));
|
|
1970
2330
|
}
|
|
1971
|
-
const Root$
|
|
2331
|
+
const Root$A = styled__default.default.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
1972
2332
|
const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
|
|
1973
2333
|
const {
|
|
1974
2334
|
count,
|
|
@@ -1981,7 +2341,7 @@ const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
|
|
|
1981
2341
|
if (s === 3) return 5;
|
|
1982
2342
|
return 0;
|
|
1983
2343
|
}), [size]);
|
|
1984
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2344
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$A, {
|
|
1985
2345
|
$size: size,
|
|
1986
2346
|
"data-ui": "AvatarCounter",
|
|
1987
2347
|
ref,
|
|
@@ -1995,15 +2355,15 @@ const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
|
|
|
1995
2355
|
});
|
|
1996
2356
|
function childrenToElementArray(children) {
|
|
1997
2357
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
1998
|
-
return childrenArray.filter(node =>
|
|
2358
|
+
return childrenArray.filter(node => reactIsExports.isElement(node) || reactIsExports.isFragment(node) || typeof node === "string");
|
|
1999
2359
|
}
|
|
2000
|
-
var __freeze$
|
|
2001
|
-
var __defProp$
|
|
2002
|
-
var __template$
|
|
2003
|
-
value: __freeze$
|
|
2360
|
+
var __freeze$B = Object.freeze;
|
|
2361
|
+
var __defProp$C = Object.defineProperty;
|
|
2362
|
+
var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
|
|
2363
|
+
value: __freeze$B(raw || cooked.slice())
|
|
2004
2364
|
}));
|
|
2005
|
-
var _a$
|
|
2006
|
-
const BASE_STYLES = styled.css(_a$
|
|
2365
|
+
var _a$B;
|
|
2366
|
+
const BASE_STYLES = styled.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"])));
|
|
2007
2367
|
function avatarStackStyle() {
|
|
2008
2368
|
return BASE_STYLES;
|
|
2009
2369
|
}
|
|
@@ -2022,7 +2382,7 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
2022
2382
|
};
|
|
2023
2383
|
});
|
|
2024
2384
|
}
|
|
2025
|
-
const Root$
|
|
2385
|
+
const Root$z = styled__default.default.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
|
|
2026
2386
|
const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
2027
2387
|
const {
|
|
2028
2388
|
children: childrenProp,
|
|
@@ -2037,7 +2397,7 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2037
2397
|
const visibleCount = maxLength - 1;
|
|
2038
2398
|
const extraCount = len - visibleCount;
|
|
2039
2399
|
const visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
2040
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2400
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$z, {
|
|
2041
2401
|
"data-ui": "AvatarStack",
|
|
2042
2402
|
...restProps,
|
|
2043
2403
|
ref,
|
|
@@ -2059,7 +2419,7 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2059
2419
|
}, String(childIndex)))]
|
|
2060
2420
|
});
|
|
2061
2421
|
});
|
|
2062
|
-
const Root$
|
|
2422
|
+
const Root$y = styled__default.default.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
|
|
2063
2423
|
const Box = react.forwardRef(function Box2(props, ref) {
|
|
2064
2424
|
const {
|
|
2065
2425
|
as: asProp = "div",
|
|
@@ -2090,7 +2450,7 @@ const Box = react.forwardRef(function Box2(props, ref) {
|
|
|
2090
2450
|
sizing,
|
|
2091
2451
|
...restProps
|
|
2092
2452
|
} = props;
|
|
2093
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2453
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$y, {
|
|
2094
2454
|
"data-as": typeof asProp === "string" ? asProp : void 0,
|
|
2095
2455
|
"data-ui": "Box",
|
|
2096
2456
|
...restProps,
|
|
@@ -2124,12 +2484,12 @@ const Box = react.forwardRef(function Box2(props, ref) {
|
|
|
2124
2484
|
children: props.children
|
|
2125
2485
|
});
|
|
2126
2486
|
});
|
|
2127
|
-
var __freeze$
|
|
2128
|
-
var __defProp$
|
|
2129
|
-
var __template$
|
|
2130
|
-
value: __freeze$
|
|
2487
|
+
var __freeze$A = Object.freeze;
|
|
2488
|
+
var __defProp$B = Object.defineProperty;
|
|
2489
|
+
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
2490
|
+
value: __freeze$A(raw || cooked.slice())
|
|
2131
2491
|
}));
|
|
2132
|
-
var _a$
|
|
2492
|
+
var _a$A, _b$l, _c$a;
|
|
2133
2493
|
function textBaseStyle(props) {
|
|
2134
2494
|
const {
|
|
2135
2495
|
$accent,
|
|
@@ -2138,16 +2498,16 @@ function textBaseStyle(props) {
|
|
|
2138
2498
|
const {
|
|
2139
2499
|
font
|
|
2140
2500
|
} = theme.getTheme_v2(props.theme);
|
|
2141
|
-
return styled.css(_c$a || (_c$a = __template$
|
|
2501
|
+
return styled.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 && styled.css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family, font.text.weights.bold);
|
|
2142
2502
|
}
|
|
2143
|
-
var __freeze$
|
|
2144
|
-
var __defProp$
|
|
2145
|
-
var __template$
|
|
2146
|
-
value: __freeze$
|
|
2503
|
+
var __freeze$z = Object.freeze;
|
|
2504
|
+
var __defProp$A = Object.defineProperty;
|
|
2505
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
2506
|
+
value: __freeze$z(raw || cooked.slice())
|
|
2147
2507
|
}));
|
|
2148
|
-
var _a$
|
|
2149
|
-
const Root$
|
|
2150
|
-
const SpanWithTextOverflow$1 = styled__default.default.span(_a$
|
|
2508
|
+
var _a$z;
|
|
2509
|
+
const Root$x = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
2510
|
+
const SpanWithTextOverflow$1 = styled__default.default.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"])));
|
|
2151
2511
|
const Text = react.forwardRef(function Text2(props, ref) {
|
|
2152
2512
|
const {
|
|
2153
2513
|
accent = false,
|
|
@@ -2165,7 +2525,7 @@ const Text = react.forwardRef(function Text2(props, ref) {
|
|
|
2165
2525
|
children
|
|
2166
2526
|
});
|
|
2167
2527
|
}
|
|
2168
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2528
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$x, {
|
|
2169
2529
|
"data-ui": "Text",
|
|
2170
2530
|
...restProps,
|
|
2171
2531
|
$accent: accent,
|
|
@@ -2194,7 +2554,7 @@ function badgeStyle(props) {
|
|
|
2194
2554
|
}
|
|
2195
2555
|
};
|
|
2196
2556
|
}
|
|
2197
|
-
const Root$
|
|
2557
|
+
const Root$w = styled__default.default(Box)(responsiveRadiusStyle, badgeStyle);
|
|
2198
2558
|
const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
2199
2559
|
const {
|
|
2200
2560
|
children,
|
|
@@ -2206,7 +2566,7 @@ const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
|
2206
2566
|
tone = "default",
|
|
2207
2567
|
...restProps
|
|
2208
2568
|
} = props;
|
|
2209
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2569
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$w, {
|
|
2210
2570
|
"data-ui": "Badge",
|
|
2211
2571
|
...restProps,
|
|
2212
2572
|
$tone: tone,
|
|
@@ -2215,12 +2575,11 @@ const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
|
2215
2575
|
ref,
|
|
2216
2576
|
children: /* @__PURE__ */jsxRuntime.jsx(Text, {
|
|
2217
2577
|
size: fontSize,
|
|
2218
|
-
weight: "medium",
|
|
2219
2578
|
children
|
|
2220
2579
|
})
|
|
2221
2580
|
});
|
|
2222
2581
|
});
|
|
2223
|
-
const Root$
|
|
2582
|
+
const Root$v = styled__default.default(Box)(flexItemStyle, responsiveFlexStyle);
|
|
2224
2583
|
const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
2225
2584
|
const {
|
|
2226
2585
|
align,
|
|
@@ -2231,7 +2590,7 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
|
2231
2590
|
wrap,
|
|
2232
2591
|
...restProps
|
|
2233
2592
|
} = props;
|
|
2234
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2593
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$v, {
|
|
2235
2594
|
"data-ui": "Flex",
|
|
2236
2595
|
...restProps,
|
|
2237
2596
|
$align: useArrayProp(align),
|
|
@@ -2243,16 +2602,16 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
|
2243
2602
|
ref
|
|
2244
2603
|
});
|
|
2245
2604
|
});
|
|
2246
|
-
var __freeze$
|
|
2247
|
-
var __defProp$
|
|
2248
|
-
var __template$
|
|
2249
|
-
value: __freeze$
|
|
2605
|
+
var __freeze$y = Object.freeze;
|
|
2606
|
+
var __defProp$z = Object.defineProperty;
|
|
2607
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
2608
|
+
value: __freeze$y(raw || cooked.slice())
|
|
2250
2609
|
}));
|
|
2251
|
-
var _a$
|
|
2252
|
-
const rotate$1 = styled.keyframes(_a$
|
|
2253
|
-
const Root$
|
|
2610
|
+
var _a$y, _b$k;
|
|
2611
|
+
const rotate$1 = styled.keyframes(_a$y || (_a$y = __template$y(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
2612
|
+
const Root$u = styled__default.default(Text)(_b$k || (_b$k = __template$y(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
|
|
2254
2613
|
const Spinner = react.forwardRef(function Spinner2(props, ref) {
|
|
2255
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2614
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$u, {
|
|
2256
2615
|
"data-ui": "Spinner",
|
|
2257
2616
|
...props,
|
|
2258
2617
|
ref,
|
|
@@ -2263,6 +2622,7 @@ function _cardColorStyle(base, color) {
|
|
|
2263
2622
|
let checkered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
2264
2623
|
return {
|
|
2265
2624
|
// from base
|
|
2625
|
+
"--card-backdrop-color": base.backdrop,
|
|
2266
2626
|
"--card-focus-ring-color": base.focusRing,
|
|
2267
2627
|
"--card-shadow-outline-color": base.shadow.outline,
|
|
2268
2628
|
"--card-shadow-umbra-color": base.shadow.umbra,
|
|
@@ -2330,12 +2690,12 @@ function _cardColorStyle(base, color) {
|
|
|
2330
2690
|
"--card-hairline-hard-color": color.border
|
|
2331
2691
|
};
|
|
2332
2692
|
}
|
|
2333
|
-
var __freeze$
|
|
2334
|
-
var __defProp$
|
|
2335
|
-
var __template$
|
|
2336
|
-
value: __freeze$
|
|
2693
|
+
var __freeze$x = Object.freeze;
|
|
2694
|
+
var __defProp$y = Object.defineProperty;
|
|
2695
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
2696
|
+
value: __freeze$x(raw || cooked.slice())
|
|
2337
2697
|
}));
|
|
2338
|
-
var _a$
|
|
2698
|
+
var _a$x, _b$j;
|
|
2339
2699
|
function buttonBaseStyles(props) {
|
|
2340
2700
|
const {
|
|
2341
2701
|
$width
|
|
@@ -2343,7 +2703,7 @@ function buttonBaseStyles(props) {
|
|
|
2343
2703
|
const {
|
|
2344
2704
|
style
|
|
2345
2705
|
} = theme.getTheme_v2(props.theme);
|
|
2346
|
-
return styled.css(_b$j || (_b$j = __template$
|
|
2706
|
+
return styled.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" && styled.css(_a$x || (_a$x = __template$x(["\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n "]))));
|
|
2347
2707
|
}
|
|
2348
2708
|
function combineBoxShadow() {
|
|
2349
2709
|
for (var _len = arguments.length, boxShadows = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -2398,14 +2758,14 @@ function buttonColorStyles(props) {
|
|
|
2398
2758
|
}
|
|
2399
2759
|
}, (_a2 = style == null ? void 0 : style.button) == null ? void 0 : _a2.root].filter(Boolean);
|
|
2400
2760
|
}
|
|
2401
|
-
var __freeze$
|
|
2402
|
-
var __defProp$
|
|
2403
|
-
var __template$
|
|
2404
|
-
value: __freeze$
|
|
2761
|
+
var __freeze$w = Object.freeze;
|
|
2762
|
+
var __defProp$x = Object.defineProperty;
|
|
2763
|
+
var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
|
|
2764
|
+
value: __freeze$w(raw || cooked.slice())
|
|
2405
2765
|
}));
|
|
2406
|
-
var _a$
|
|
2407
|
-
const Root$
|
|
2408
|
-
const LoadingBox = styled__default.default.div(_a$
|
|
2766
|
+
var _a$w;
|
|
2767
|
+
const Root$t = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
|
|
2768
|
+
const LoadingBox = styled__default.default.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"])));
|
|
2409
2769
|
const Button = react.forwardRef(function Button2(props, ref) {
|
|
2410
2770
|
const {
|
|
2411
2771
|
children,
|
|
@@ -2457,7 +2817,7 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2457
2817
|
paddingLeft,
|
|
2458
2818
|
paddingRight
|
|
2459
2819
|
}), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
|
|
2460
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2820
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$t, {
|
|
2461
2821
|
"data-ui": "Button",
|
|
2462
2822
|
...restProps,
|
|
2463
2823
|
$mode: mode,
|
|
@@ -2480,7 +2840,7 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2480
2840
|
gap: space,
|
|
2481
2841
|
children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
|
|
2482
2842
|
size: fontSize,
|
|
2483
|
-
children: [react.isValidElement(icon) && icon,
|
|
2843
|
+
children: [react.isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && react.createElement(icon)]
|
|
2484
2844
|
}), text && /* @__PURE__ */jsxRuntime.jsx(Box, {
|
|
2485
2845
|
flex: iconRight ? 1 : void 0,
|
|
2486
2846
|
children: /* @__PURE__ */jsxRuntime.jsx(Text, {
|
|
@@ -2493,7 +2853,7 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2493
2853
|
})
|
|
2494
2854
|
}), iconRight && /* @__PURE__ */jsxRuntime.jsxs(Text, {
|
|
2495
2855
|
size: fontSize,
|
|
2496
|
-
children: [react.isValidElement(iconRight) && iconRight,
|
|
2856
|
+
children: [react.isValidElement(iconRight) && iconRight, reactIsExports.isValidElementType(iconRight) && react.createElement(iconRight)]
|
|
2497
2857
|
})]
|
|
2498
2858
|
})
|
|
2499
2859
|
}), children && /* @__PURE__ */jsxRuntime.jsx(Box, {
|
|
@@ -2503,12 +2863,12 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2503
2863
|
})]
|
|
2504
2864
|
});
|
|
2505
2865
|
});
|
|
2506
|
-
var __freeze$
|
|
2507
|
-
var __defProp$
|
|
2508
|
-
var __template$
|
|
2509
|
-
value: __freeze$
|
|
2866
|
+
var __freeze$v = Object.freeze;
|
|
2867
|
+
var __defProp$w = Object.defineProperty;
|
|
2868
|
+
var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
|
|
2869
|
+
value: __freeze$v(raw || cooked.slice())
|
|
2510
2870
|
}));
|
|
2511
|
-
var _a$
|
|
2871
|
+
var _a$v, _b$i, _c$9;
|
|
2512
2872
|
function cardStyle(props) {
|
|
2513
2873
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
2514
2874
|
}
|
|
@@ -2519,7 +2879,7 @@ function cardBaseStyle(props) {
|
|
|
2519
2879
|
const {
|
|
2520
2880
|
space
|
|
2521
2881
|
} = theme.getTheme_v2(props.theme);
|
|
2522
|
-
return styled.css(_b$i || (_b$i = __template$
|
|
2882
|
+
return styled.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 && styled.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]));
|
|
2523
2883
|
}
|
|
2524
2884
|
function cardColorStyle(props) {
|
|
2525
2885
|
var _a2;
|
|
@@ -2536,7 +2896,7 @@ function cardColorStyle(props) {
|
|
|
2536
2896
|
width: card.border.width,
|
|
2537
2897
|
color: "var(--card-border-color)"
|
|
2538
2898
|
};
|
|
2539
|
-
return styled.css(_c$9 || (_c$9 = __template$
|
|
2899
|
+
return styled.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({
|
|
2540
2900
|
base: color,
|
|
2541
2901
|
border,
|
|
2542
2902
|
focusRing: card.focusRing
|
|
@@ -2546,7 +2906,7 @@ function cardColorStyle(props) {
|
|
|
2546
2906
|
focusRing: card.focusRing
|
|
2547
2907
|
}) : void 0, (_a2 = style == null ? void 0 : style.card) == null ? void 0 : _a2.root);
|
|
2548
2908
|
}
|
|
2549
|
-
const Root$
|
|
2909
|
+
const Root$s = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
2550
2910
|
const Card = react.forwardRef(function Card2(props, ref) {
|
|
2551
2911
|
const {
|
|
2552
2912
|
__unstable_checkered: checkered = false,
|
|
@@ -2565,13 +2925,13 @@ const Card = react.forwardRef(function Card2(props, ref) {
|
|
|
2565
2925
|
tone: toneProp = "default",
|
|
2566
2926
|
...restProps
|
|
2567
2927
|
} = props;
|
|
2568
|
-
const as =
|
|
2928
|
+
const as = reactIsExports.isValidElementType(asProp) ? asProp : "div";
|
|
2569
2929
|
const rootTheme = useRootTheme();
|
|
2570
2930
|
const tone = toneProp === "inherit" ? rootTheme.tone : toneProp;
|
|
2571
2931
|
return /* @__PURE__ */jsxRuntime.jsx(ThemeColorProvider, {
|
|
2572
2932
|
scheme,
|
|
2573
2933
|
tone,
|
|
2574
|
-
children: /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2934
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Root$s, {
|
|
2575
2935
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2576
2936
|
"data-scheme": rootTheme.scheme,
|
|
2577
2937
|
"data-ui": "Card",
|
|
@@ -2596,14 +2956,14 @@ const Card = react.forwardRef(function Card2(props, ref) {
|
|
|
2596
2956
|
})
|
|
2597
2957
|
});
|
|
2598
2958
|
});
|
|
2599
|
-
var __freeze$
|
|
2600
|
-
var __defProp$
|
|
2601
|
-
var __template$
|
|
2602
|
-
value: __freeze$
|
|
2959
|
+
var __freeze$u = Object.freeze;
|
|
2960
|
+
var __defProp$v = Object.defineProperty;
|
|
2961
|
+
var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
|
|
2962
|
+
value: __freeze$u(raw || cooked.slice())
|
|
2603
2963
|
}));
|
|
2604
|
-
var _a$
|
|
2964
|
+
var _a$u, _b$h;
|
|
2605
2965
|
function checkboxBaseStyles() {
|
|
2606
|
-
return styled.css(_a$
|
|
2966
|
+
return styled.css(_a$u || (_a$u = __template$u(["\n position: relative;\n display: inline-block;\n "])));
|
|
2607
2967
|
}
|
|
2608
2968
|
function inputElementStyles(props) {
|
|
2609
2969
|
const {
|
|
@@ -2614,7 +2974,7 @@ function inputElementStyles(props) {
|
|
|
2614
2974
|
const {
|
|
2615
2975
|
focusRing
|
|
2616
2976
|
} = input.checkbox;
|
|
2617
|
-
return styled.css(_b$h || (_b$h = __template$
|
|
2977
|
+
return styled.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({
|
|
2618
2978
|
color: color.input.default.enabled.border,
|
|
2619
2979
|
width: input.border.width
|
|
2620
2980
|
}), rem(radius[2]), color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
@@ -2647,7 +3007,7 @@ function inputElementStyles(props) {
|
|
|
2647
3007
|
color: color.input.default.readOnly.border
|
|
2648
3008
|
}), color.input.default.readOnly.fg, color.input.default.readOnly.muted.bg);
|
|
2649
3009
|
}
|
|
2650
|
-
const Root$
|
|
3010
|
+
const Root$r = styled__default.default.div(checkboxBaseStyles);
|
|
2651
3011
|
const Input$5 = styled__default.default.input(inputElementStyles);
|
|
2652
3012
|
const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
2653
3013
|
const {
|
|
@@ -2667,7 +3027,7 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2667
3027
|
ref.current.indeterminate = indeterminate || false;
|
|
2668
3028
|
}
|
|
2669
3029
|
}, [indeterminate, ref]);
|
|
2670
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
3030
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$r, {
|
|
2671
3031
|
className,
|
|
2672
3032
|
"data-ui": "Checkbox",
|
|
2673
3033
|
style,
|
|
@@ -2685,12 +3045,12 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2685
3045
|
})]
|
|
2686
3046
|
});
|
|
2687
3047
|
});
|
|
2688
|
-
var __freeze$
|
|
2689
|
-
var __defProp$
|
|
2690
|
-
var __template$
|
|
2691
|
-
value: __freeze$
|
|
3048
|
+
var __freeze$t = Object.freeze;
|
|
3049
|
+
var __defProp$u = Object.defineProperty;
|
|
3050
|
+
var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
|
|
3051
|
+
value: __freeze$t(raw || cooked.slice())
|
|
2692
3052
|
}));
|
|
2693
|
-
var _a$
|
|
3053
|
+
var _a$t;
|
|
2694
3054
|
function codeSyntaxHighlightingStyle(_ref2) {
|
|
2695
3055
|
let {
|
|
2696
3056
|
theme: theme$1
|
|
@@ -2812,9 +3172,9 @@ function codeSyntaxHighlightingStyle(_ref2) {
|
|
|
2812
3172
|
};
|
|
2813
3173
|
}
|
|
2814
3174
|
function codeBaseStyle() {
|
|
2815
|
-
return styled.css(_a$
|
|
3175
|
+
return styled.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);
|
|
2816
3176
|
}
|
|
2817
|
-
const Root$
|
|
3177
|
+
const Root$q = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle);
|
|
2818
3178
|
const Code = react.forwardRef(function Code2(props, ref) {
|
|
2819
3179
|
const {
|
|
2820
3180
|
children,
|
|
@@ -2825,7 +3185,7 @@ const Code = react.forwardRef(function Code2(props, ref) {
|
|
|
2825
3185
|
} = props;
|
|
2826
3186
|
const language = typeof languageProp === "string" ? languageProp : void 0;
|
|
2827
3187
|
const registered = language ? Refractor__default.default.hasLanguage(language) : false;
|
|
2828
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
3188
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$q, {
|
|
2829
3189
|
"data-ui": "Code",
|
|
2830
3190
|
...restProps,
|
|
2831
3191
|
$size: useArrayProp(size),
|
|
@@ -2856,14 +3216,14 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2856
3216
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
2857
3217
|
}));
|
|
2858
3218
|
}
|
|
2859
|
-
const Root$
|
|
3219
|
+
const Root$p = styled__default.default(Box)(containerBaseStyle, responsiveContainerWidthStyle);
|
|
2860
3220
|
const Container = react.forwardRef(function Container2(props, ref) {
|
|
2861
3221
|
const {
|
|
2862
3222
|
as,
|
|
2863
3223
|
width = 2,
|
|
2864
3224
|
...restProps
|
|
2865
3225
|
} = props;
|
|
2866
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3226
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$p, {
|
|
2867
3227
|
"data-ui": "Container",
|
|
2868
3228
|
...restProps,
|
|
2869
3229
|
$width: useArrayProp(width),
|
|
@@ -2871,7 +3231,7 @@ const Container = react.forwardRef(function Container2(props, ref) {
|
|
|
2871
3231
|
ref
|
|
2872
3232
|
});
|
|
2873
3233
|
});
|
|
2874
|
-
const Root$
|
|
3234
|
+
const Root$o = styled__default.default(Box)(responsiveGridStyle);
|
|
2875
3235
|
const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
2876
3236
|
const {
|
|
2877
3237
|
as,
|
|
@@ -2886,7 +3246,7 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
|
2886
3246
|
children,
|
|
2887
3247
|
...restProps
|
|
2888
3248
|
} = props;
|
|
2889
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3249
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$o, {
|
|
2890
3250
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2891
3251
|
"data-ui": "Grid",
|
|
2892
3252
|
...restProps,
|
|
@@ -2903,12 +3263,12 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
|
2903
3263
|
children
|
|
2904
3264
|
});
|
|
2905
3265
|
});
|
|
2906
|
-
var __freeze$
|
|
2907
|
-
var __defProp$
|
|
2908
|
-
var __template$
|
|
2909
|
-
value: __freeze$
|
|
3266
|
+
var __freeze$s = Object.freeze;
|
|
3267
|
+
var __defProp$t = Object.defineProperty;
|
|
3268
|
+
var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
|
|
3269
|
+
value: __freeze$s(raw || cooked.slice())
|
|
2910
3270
|
}));
|
|
2911
|
-
var _a$
|
|
3271
|
+
var _a$s, _b$g, _c$8;
|
|
2912
3272
|
function headingBaseStyle(props) {
|
|
2913
3273
|
const {
|
|
2914
3274
|
$accent,
|
|
@@ -2917,16 +3277,16 @@ function headingBaseStyle(props) {
|
|
|
2917
3277
|
const {
|
|
2918
3278
|
font
|
|
2919
3279
|
} = theme.getTheme_v2(props.theme);
|
|
2920
|
-
return styled.css(_c$8 || (_c$8 = __template$
|
|
3280
|
+
return styled.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 && styled.css(_a$s || (_a$s = __template$s(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$g || (_b$g = __template$s(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
2921
3281
|
}
|
|
2922
|
-
var __freeze$
|
|
2923
|
-
var __defProp$
|
|
2924
|
-
var __template$
|
|
2925
|
-
value: __freeze$
|
|
3282
|
+
var __freeze$r = Object.freeze;
|
|
3283
|
+
var __defProp$s = Object.defineProperty;
|
|
3284
|
+
var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
|
|
3285
|
+
value: __freeze$r(raw || cooked.slice())
|
|
2926
3286
|
}));
|
|
2927
|
-
var _a$
|
|
2928
|
-
const Root$
|
|
2929
|
-
const SpanWithTextOverflow = styled__default.default.span(_a$
|
|
3287
|
+
var _a$r;
|
|
3288
|
+
const Root$n = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
3289
|
+
const SpanWithTextOverflow = styled__default.default.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"])));
|
|
2930
3290
|
const Heading = react.forwardRef(function Heading2(props, ref) {
|
|
2931
3291
|
const {
|
|
2932
3292
|
accent = false,
|
|
@@ -2944,7 +3304,7 @@ const Heading = react.forwardRef(function Heading2(props, ref) {
|
|
|
2944
3304
|
children
|
|
2945
3305
|
});
|
|
2946
3306
|
}
|
|
2947
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3307
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$n, {
|
|
2948
3308
|
"data-ui": "Heading",
|
|
2949
3309
|
...restProps,
|
|
2950
3310
|
$accent: accent,
|
|
@@ -2985,7 +3345,7 @@ function inlineSpaceStyle(props) {
|
|
|
2985
3345
|
};
|
|
2986
3346
|
});
|
|
2987
3347
|
}
|
|
2988
|
-
const Root$
|
|
3348
|
+
const Root$m = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle);
|
|
2989
3349
|
const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
2990
3350
|
const {
|
|
2991
3351
|
as,
|
|
@@ -2996,7 +3356,7 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
|
2996
3356
|
const children = react.useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2997
3357
|
children: child
|
|
2998
3358
|
}, idx)), [childrenProp]);
|
|
2999
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3359
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$m, {
|
|
3000
3360
|
"data-ui": "Inline",
|
|
3001
3361
|
...restProps,
|
|
3002
3362
|
$space: useArrayProp(space),
|
|
@@ -3005,16 +3365,16 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
|
3005
3365
|
children
|
|
3006
3366
|
});
|
|
3007
3367
|
});
|
|
3008
|
-
var __freeze$
|
|
3009
|
-
var __defProp$
|
|
3010
|
-
var __template$
|
|
3011
|
-
value: __freeze$
|
|
3368
|
+
var __freeze$q = Object.freeze;
|
|
3369
|
+
var __defProp$r = Object.defineProperty;
|
|
3370
|
+
var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
|
|
3371
|
+
value: __freeze$q(raw || cooked.slice())
|
|
3012
3372
|
}));
|
|
3013
|
-
var _a$
|
|
3373
|
+
var _a$q;
|
|
3014
3374
|
function kbdStyle() {
|
|
3015
|
-
return styled.css(_a$
|
|
3375
|
+
return styled.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 "])));
|
|
3016
3376
|
}
|
|
3017
|
-
const Root$
|
|
3377
|
+
const Root$l = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
|
|
3018
3378
|
const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
3019
3379
|
const {
|
|
3020
3380
|
children,
|
|
@@ -3023,7 +3383,7 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
|
3023
3383
|
radius = 2,
|
|
3024
3384
|
...restProps
|
|
3025
3385
|
} = props;
|
|
3026
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3386
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$l, {
|
|
3027
3387
|
"data-ui": "KBD",
|
|
3028
3388
|
...restProps,
|
|
3029
3389
|
$radius: useArrayProp(radius),
|
|
@@ -3040,6 +3400,45 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
|
3040
3400
|
})
|
|
3041
3401
|
});
|
|
3042
3402
|
});
|
|
3403
|
+
const origin = {
|
|
3404
|
+
name: "@sanity/ui/origin",
|
|
3405
|
+
fn(_ref3) {
|
|
3406
|
+
let {
|
|
3407
|
+
middlewareData,
|
|
3408
|
+
placement,
|
|
3409
|
+
rects
|
|
3410
|
+
} = _ref3;
|
|
3411
|
+
var _a, _b;
|
|
3412
|
+
const [side] = placement.split("-");
|
|
3413
|
+
const floatingWidth = rects.floating.width;
|
|
3414
|
+
const floatingHeight = rects.floating.height;
|
|
3415
|
+
const shiftX = ((_a = middlewareData.shift) == null ? void 0 : _a.x) || 0;
|
|
3416
|
+
const shiftY = ((_b = middlewareData.shift) == null ? void 0 : _b.y) || 0;
|
|
3417
|
+
if (floatingWidth <= 0 || floatingHeight <= 0) {
|
|
3418
|
+
return {};
|
|
3419
|
+
}
|
|
3420
|
+
const isVerticalPlacement = ["bottom", "top"].includes(side);
|
|
3421
|
+
const {
|
|
3422
|
+
originX,
|
|
3423
|
+
originY
|
|
3424
|
+
} = isVerticalPlacement ? {
|
|
3425
|
+
originX: clamp(0.5 - shiftX / floatingWidth, 0, 1),
|
|
3426
|
+
originY: side === "bottom" ? 0 : 1
|
|
3427
|
+
} : {
|
|
3428
|
+
originX: side === "left" ? 1 : 0,
|
|
3429
|
+
originY: clamp(0.5 - shiftY / floatingHeight, 0, 1)
|
|
3430
|
+
};
|
|
3431
|
+
return {
|
|
3432
|
+
data: {
|
|
3433
|
+
originX,
|
|
3434
|
+
originY
|
|
3435
|
+
}
|
|
3436
|
+
};
|
|
3437
|
+
}
|
|
3438
|
+
};
|
|
3439
|
+
function clamp(num, min, max) {
|
|
3440
|
+
return Math.min(Math.max(num, min), max);
|
|
3441
|
+
}
|
|
3043
3442
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3044
3443
|
const width = targetPoint.x - movingPoint.x;
|
|
3045
3444
|
const height = targetPoint.y - movingPoint.y;
|
|
@@ -3094,20 +3493,20 @@ function compileCommands(cmds) {
|
|
|
3094
3493
|
return "";
|
|
3095
3494
|
}).join(" ");
|
|
3096
3495
|
}
|
|
3097
|
-
var __freeze$
|
|
3098
|
-
var __defProp$
|
|
3099
|
-
var __template$
|
|
3100
|
-
value: __freeze$
|
|
3496
|
+
var __freeze$p = Object.freeze;
|
|
3497
|
+
var __defProp$q = Object.defineProperty;
|
|
3498
|
+
var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
|
|
3499
|
+
value: __freeze$p(raw || cooked.slice())
|
|
3101
3500
|
}));
|
|
3102
|
-
var _a$
|
|
3103
|
-
const Root$
|
|
3501
|
+
var _a$p, _b$f, _c$7;
|
|
3502
|
+
const Root$k = styled__default.default.div(_ref4 => {
|
|
3104
3503
|
let {
|
|
3105
3504
|
$w: w
|
|
3106
|
-
} =
|
|
3107
|
-
return styled.css(_a$
|
|
3505
|
+
} = _ref4;
|
|
3506
|
+
return styled.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);
|
|
3108
3507
|
});
|
|
3109
|
-
const StrokePath = styled__default.default.path(_b$f || (_b$f = __template$
|
|
3110
|
-
const ShapePath = styled__default.default.path(_c$7 || (_c$7 = __template$
|
|
3508
|
+
const StrokePath = styled__default.default.path(_b$f || (_b$f = __template$p(["\n stroke: var(--card-shadow-outline-color);\n"])));
|
|
3509
|
+
const ShapePath = styled__default.default.path(_c$7 || (_c$7 = __template$p(["\n fill: var(--card-bg-color);\n"])));
|
|
3111
3510
|
const Arrow = react.forwardRef(function Arrow2(props, ref) {
|
|
3112
3511
|
const {
|
|
3113
3512
|
width: w,
|
|
@@ -3143,7 +3542,7 @@ const Arrow = react.forwardRef(function Arrow2(props, ref) {
|
|
|
3143
3542
|
const path = compileCommands(cmds);
|
|
3144
3543
|
const strokePath = "".concat(path);
|
|
3145
3544
|
const fillPath = "".concat(path, " M ").concat(w, " -1 M 0 -1 Z");
|
|
3146
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3545
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$k, {
|
|
3147
3546
|
...restProps,
|
|
3148
3547
|
$w: w,
|
|
3149
3548
|
ref,
|
|
@@ -3201,6 +3600,17 @@ function useBoundaryElement() {
|
|
|
3201
3600
|
}
|
|
3202
3601
|
return value || DEFAULT_VALUE;
|
|
3203
3602
|
}
|
|
3603
|
+
function ConditionalWrapper(_ref5) {
|
|
3604
|
+
let {
|
|
3605
|
+
children,
|
|
3606
|
+
condition,
|
|
3607
|
+
wrapper
|
|
3608
|
+
} = _ref5;
|
|
3609
|
+
if (!condition) {
|
|
3610
|
+
return children;
|
|
3611
|
+
}
|
|
3612
|
+
return wrapper(children);
|
|
3613
|
+
}
|
|
3204
3614
|
function findMaxBreakpoints(media, width) {
|
|
3205
3615
|
const ret = [];
|
|
3206
3616
|
for (let i = 0; i < media.length; i += 1) {
|
|
@@ -3250,8 +3660,8 @@ const ElementQuery = react.forwardRef(function ElementQuery2(props, ref) {
|
|
|
3250
3660
|
children
|
|
3251
3661
|
});
|
|
3252
3662
|
});
|
|
3253
|
-
var __defProp$
|
|
3254
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$
|
|
3663
|
+
var __defProp$p = Object.defineProperty;
|
|
3664
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$p(obj, key, {
|
|
3255
3665
|
enumerable: true,
|
|
3256
3666
|
configurable: true,
|
|
3257
3667
|
writable: true,
|
|
@@ -3480,7 +3890,7 @@ function LayerProvider(props) {
|
|
|
3480
3890
|
children
|
|
3481
3891
|
});
|
|
3482
3892
|
}
|
|
3483
|
-
const Root$
|
|
3893
|
+
const Root$j = styled__default.default.div({
|
|
3484
3894
|
position: "relative"
|
|
3485
3895
|
});
|
|
3486
3896
|
const LayerChildren = react.forwardRef(function LayerChildren2(props, ref) {
|
|
@@ -3516,7 +3926,7 @@ const LayerChildren = react.forwardRef(function LayerChildren2(props, ref) {
|
|
|
3516
3926
|
lastFocusedRef.current = target;
|
|
3517
3927
|
}
|
|
3518
3928
|
}, [forwardedRef, isTopLayer, onFocus]);
|
|
3519
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3929
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$j, {
|
|
3520
3930
|
...restProps,
|
|
3521
3931
|
"data-ui": "Layer",
|
|
3522
3932
|
onFocus: handleFocus,
|
|
@@ -3627,19 +4037,19 @@ function PortalProvider(props) {
|
|
|
3627
4037
|
children
|
|
3628
4038
|
});
|
|
3629
4039
|
}
|
|
3630
|
-
var __freeze$
|
|
3631
|
-
var __defProp$
|
|
3632
|
-
var __template$
|
|
3633
|
-
value: __freeze$
|
|
4040
|
+
var __freeze$o = Object.freeze;
|
|
4041
|
+
var __defProp$o = Object.defineProperty;
|
|
4042
|
+
var __template$o = (cooked, raw) => __freeze$o(__defProp$o(cooked, "raw", {
|
|
4043
|
+
value: __freeze$o(raw || cooked.slice())
|
|
3634
4044
|
}));
|
|
3635
|
-
var _a$
|
|
3636
|
-
const Root$
|
|
4045
|
+
var _a$o;
|
|
4046
|
+
const Root$i = styled__default.default.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"])));
|
|
3637
4047
|
const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
3638
4048
|
const {
|
|
3639
4049
|
as,
|
|
3640
4050
|
children
|
|
3641
4051
|
} = props;
|
|
3642
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
4052
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$i, {
|
|
3643
4053
|
"aria-hidden": true,
|
|
3644
4054
|
as,
|
|
3645
4055
|
"data-ui": "SrOnly",
|
|
@@ -3647,14 +4057,14 @@ const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
|
3647
4057
|
children
|
|
3648
4058
|
});
|
|
3649
4059
|
});
|
|
3650
|
-
var __freeze$
|
|
3651
|
-
var __defProp$
|
|
3652
|
-
var __template$
|
|
3653
|
-
value: __freeze$
|
|
4060
|
+
var __freeze$n = Object.freeze;
|
|
4061
|
+
var __defProp$n = Object.defineProperty;
|
|
4062
|
+
var __template$n = (cooked, raw) => __freeze$n(__defProp$n(cooked, "raw", {
|
|
4063
|
+
value: __freeze$n(raw || cooked.slice())
|
|
3654
4064
|
}));
|
|
3655
|
-
var _a$
|
|
3656
|
-
const Root$
|
|
3657
|
-
const ItemWrapper = styled__default.default.div(_b$e || (_b$e = __template$
|
|
4065
|
+
var _a$n, _b$e;
|
|
4066
|
+
const Root$h = styled__default.default.div(_a$n || (_a$n = __template$n(["\n position: relative;\n"])));
|
|
4067
|
+
const ItemWrapper = styled__default.default.div(_b$e || (_b$e = __template$n(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
|
|
3658
4068
|
const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
|
|
3659
4069
|
const {
|
|
3660
4070
|
as = "div",
|
|
@@ -3760,7 +4170,7 @@ const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
|
|
|
3760
4170
|
const wrapperStyle = react.useMemo(() => ({
|
|
3761
4171
|
height
|
|
3762
4172
|
}), [height]);
|
|
3763
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
4173
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$h, {
|
|
3764
4174
|
as,
|
|
3765
4175
|
"data-ui": "VirtualList",
|
|
3766
4176
|
...restProps,
|
|
@@ -3878,17 +4288,17 @@ function calcMaxWidth(params) {
|
|
|
3878
4288
|
}
|
|
3879
4289
|
return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
|
|
3880
4290
|
}
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
});
|
|
4291
|
+
var __freeze$m = Object.freeze;
|
|
4292
|
+
var __defProp$m = Object.defineProperty;
|
|
4293
|
+
var __template$m = (cooked, raw) => __freeze$m(__defProp$m(cooked, "raw", {
|
|
4294
|
+
value: __freeze$m(raw || cooked.slice())
|
|
4295
|
+
}));
|
|
4296
|
+
var _a$m;
|
|
4297
|
+
const MotionCard$1 = styled__default.default(framerMotion.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"])));
|
|
3889
4298
|
const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref) {
|
|
3890
4299
|
const {
|
|
3891
4300
|
__unstable_margins: marginsProp,
|
|
4301
|
+
animate,
|
|
3892
4302
|
arrow,
|
|
3893
4303
|
arrowRef,
|
|
3894
4304
|
arrowX,
|
|
@@ -3896,6 +4306,8 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3896
4306
|
children,
|
|
3897
4307
|
padding,
|
|
3898
4308
|
placement,
|
|
4309
|
+
originX,
|
|
4310
|
+
originY,
|
|
3899
4311
|
overflow,
|
|
3900
4312
|
radius,
|
|
3901
4313
|
scheme,
|
|
@@ -3915,20 +4327,22 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3915
4327
|
const x = (xProp != null ? xProp : 0) + margins[3];
|
|
3916
4328
|
const y = (yProp != null ? yProp : 0) + margins[0];
|
|
3917
4329
|
const rootStyle = react.useMemo(() => ({
|
|
4330
|
+
left: x,
|
|
4331
|
+
originX,
|
|
4332
|
+
originY,
|
|
3918
4333
|
position: strategy,
|
|
3919
4334
|
top: y,
|
|
3920
|
-
left: x,
|
|
3921
4335
|
width,
|
|
3922
4336
|
zIndex,
|
|
3923
4337
|
...style
|
|
3924
|
-
}), [strategy, style, width, x, y, zIndex]);
|
|
4338
|
+
}), [originX, originY, strategy, style, width, x, y, zIndex]);
|
|
3925
4339
|
const arrowStyle = react.useMemo(() => ({
|
|
3926
4340
|
left: arrowX !== null ? arrowX : void 0,
|
|
3927
4341
|
top: arrowY !== null ? arrowY : void 0,
|
|
3928
4342
|
right: void 0,
|
|
3929
4343
|
bottom: void 0
|
|
3930
4344
|
}), [arrowX, arrowY]);
|
|
3931
|
-
return /* @__PURE__ */jsxRuntime.jsxs(
|
|
4345
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MotionCard$1, {
|
|
3932
4346
|
"data-ui": "Popover",
|
|
3933
4347
|
...restProps,
|
|
3934
4348
|
"data-placement": placement,
|
|
@@ -3939,6 +4353,7 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3939
4353
|
sizing: "border",
|
|
3940
4354
|
style: rootStyle,
|
|
3941
4355
|
tone,
|
|
4356
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
3942
4357
|
children: [/* @__PURE__ */jsxRuntime.jsx(Flex, {
|
|
3943
4358
|
"data-ui": "Popover__wrapper",
|
|
3944
4359
|
direction: "column",
|
|
@@ -3961,7 +4376,7 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3961
4376
|
}));
|
|
3962
4377
|
PopoverCard.displayName = "PopoverCard";
|
|
3963
4378
|
const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
3964
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4379
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
3965
4380
|
const {
|
|
3966
4381
|
container,
|
|
3967
4382
|
layer
|
|
@@ -3969,6 +4384,7 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
3969
4384
|
const boundaryElementContext = useBoundaryElement();
|
|
3970
4385
|
const {
|
|
3971
4386
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
4387
|
+
animate = false,
|
|
3972
4388
|
arrow: arrowProp = false,
|
|
3973
4389
|
boundaryElement = boundaryElementContext.element,
|
|
3974
4390
|
children: childProp,
|
|
@@ -4056,13 +4472,13 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4056
4472
|
}));
|
|
4057
4473
|
if (constrainSize || matchReferenceWidth) {
|
|
4058
4474
|
ret.push(size({
|
|
4059
|
-
apply(
|
|
4475
|
+
apply(_ref6) {
|
|
4060
4476
|
let {
|
|
4061
4477
|
availableWidth,
|
|
4062
4478
|
availableHeight,
|
|
4063
4479
|
elements,
|
|
4064
4480
|
referenceWidth
|
|
4065
|
-
} =
|
|
4481
|
+
} = _ref6;
|
|
4066
4482
|
referenceWidthRef.current = referenceWidth;
|
|
4067
4483
|
const _currentWidth = widthRef.current;
|
|
4068
4484
|
const _maxWidth = maxWidthRef.current;
|
|
@@ -4096,13 +4512,16 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4096
4512
|
padding: DEFAULT_POPOVER_PADDING
|
|
4097
4513
|
}));
|
|
4098
4514
|
}
|
|
4515
|
+
if (animate) {
|
|
4516
|
+
ret.push(origin);
|
|
4517
|
+
}
|
|
4099
4518
|
ret.push(reactDom$1.hide({
|
|
4100
4519
|
boundary: referenceBoundary || void 0,
|
|
4101
4520
|
padding: DEFAULT_POPOVER_PADDING,
|
|
4102
4521
|
strategy: "referenceHidden"
|
|
4103
4522
|
}));
|
|
4104
4523
|
return ret;
|
|
4105
|
-
}, [arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4524
|
+
}, [animate, arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4106
4525
|
const {
|
|
4107
4526
|
x,
|
|
4108
4527
|
y,
|
|
@@ -4119,6 +4538,8 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4119
4538
|
const referenceHidden = (_f = middlewareData.hide) == null ? void 0 : _f.referenceHidden;
|
|
4120
4539
|
const arrowX = (_g = middlewareData.arrow) == null ? void 0 : _g.x;
|
|
4121
4540
|
const arrowY = (_h = middlewareData.arrow) == null ? void 0 : _h.y;
|
|
4541
|
+
const originX = (_i = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _i.originX;
|
|
4542
|
+
const originY = (_j = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _j.originY;
|
|
4122
4543
|
const setArrow = react.useCallback(arrowEl => {
|
|
4123
4544
|
arrowRef.current = arrowEl;
|
|
4124
4545
|
}, []);
|
|
@@ -4161,6 +4582,7 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4161
4582
|
children: /* @__PURE__ */jsxRuntime.jsx(PopoverCard, {
|
|
4162
4583
|
...restProps,
|
|
4163
4584
|
__unstable_margins: margins,
|
|
4585
|
+
animate,
|
|
4164
4586
|
arrow: arrowProp,
|
|
4165
4587
|
arrowRef: setArrow,
|
|
4166
4588
|
arrowX,
|
|
@@ -4173,6 +4595,8 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4173
4595
|
ref: setFloating,
|
|
4174
4596
|
scheme,
|
|
4175
4597
|
shadow,
|
|
4598
|
+
originX,
|
|
4599
|
+
originY,
|
|
4176
4600
|
strategy,
|
|
4177
4601
|
tone,
|
|
4178
4602
|
width: matchReferenceWidth ? referenceWidthRef.current : width,
|
|
@@ -4182,23 +4606,31 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4182
4606
|
})
|
|
4183
4607
|
});
|
|
4184
4608
|
return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4185
|
-
children: [
|
|
4186
|
-
|
|
4187
|
-
|
|
4609
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
4610
|
+
condition: animate,
|
|
4611
|
+
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
4612
|
+
children
|
|
4613
|
+
}),
|
|
4614
|
+
children: open && /* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
4615
|
+
condition: !!portal,
|
|
4616
|
+
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(Portal, {
|
|
4617
|
+
__unstable_name: typeof portal === "string" ? portal : void 0,
|
|
4618
|
+
children
|
|
4619
|
+
}),
|
|
4188
4620
|
children: popover
|
|
4189
|
-
})
|
|
4621
|
+
})
|
|
4190
4622
|
}), child]
|
|
4191
4623
|
});
|
|
4192
4624
|
}));
|
|
4193
4625
|
Popover.displayName = "Popover";
|
|
4194
|
-
var __freeze$
|
|
4195
|
-
var __defProp$
|
|
4196
|
-
var __template$
|
|
4197
|
-
value: __freeze$
|
|
4626
|
+
var __freeze$l = Object.freeze;
|
|
4627
|
+
var __defProp$l = Object.defineProperty;
|
|
4628
|
+
var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
|
|
4629
|
+
value: __freeze$l(raw || cooked.slice())
|
|
4198
4630
|
}));
|
|
4199
|
-
var _a$
|
|
4631
|
+
var _a$l, _b$d;
|
|
4200
4632
|
function radioBaseStyle() {
|
|
4201
|
-
return styled.css(_a$
|
|
4633
|
+
return styled.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 "])));
|
|
4202
4634
|
}
|
|
4203
4635
|
function inputElementStyle(props) {
|
|
4204
4636
|
const {
|
|
@@ -4206,7 +4638,7 @@ function inputElementStyle(props) {
|
|
|
4206
4638
|
input
|
|
4207
4639
|
} = theme.getTheme_v2(props.theme);
|
|
4208
4640
|
const dist = (input.radio.size - input.radio.markSize) / 2;
|
|
4209
|
-
return styled.css(_b$d || (_b$d = __template$
|
|
4641
|
+
return styled.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({
|
|
4210
4642
|
color: color.input.default.enabled.border,
|
|
4211
4643
|
width: input.border.width
|
|
4212
4644
|
}), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.input.default.enabled.fg, focusRingStyle({
|
|
@@ -4251,27 +4683,27 @@ const Radio = react.forwardRef(function Radio2(props, forwardedRef) {
|
|
|
4251
4683
|
}), /* @__PURE__ */jsxRuntime.jsx("span", {})]
|
|
4252
4684
|
});
|
|
4253
4685
|
});
|
|
4254
|
-
var __freeze$
|
|
4255
|
-
var __defProp$
|
|
4256
|
-
var __template$
|
|
4257
|
-
value: __freeze$
|
|
4686
|
+
var __freeze$k = Object.freeze;
|
|
4687
|
+
var __defProp$k = Object.defineProperty;
|
|
4688
|
+
var __template$k = (cooked, raw) => __freeze$k(__defProp$k(cooked, "raw", {
|
|
4689
|
+
value: __freeze$k(raw || cooked.slice())
|
|
4258
4690
|
}));
|
|
4259
|
-
var _a$
|
|
4691
|
+
var _a$k, _b$c, _c$6, _d$5;
|
|
4260
4692
|
function rootStyle() {
|
|
4261
|
-
return styled.css(_a$
|
|
4693
|
+
return styled.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 "])));
|
|
4262
4694
|
}
|
|
4263
4695
|
function inputBaseStyle(props) {
|
|
4264
4696
|
const {
|
|
4265
4697
|
font
|
|
4266
4698
|
} = theme.getTheme_v2(props.theme);
|
|
4267
|
-
return styled.css(_b$c || (_b$c = __template$
|
|
4699
|
+
return styled.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);
|
|
4268
4700
|
}
|
|
4269
4701
|
function inputColorStyle(props) {
|
|
4270
4702
|
const {
|
|
4271
4703
|
color,
|
|
4272
4704
|
input
|
|
4273
4705
|
} = theme.getTheme_v2(props.theme);
|
|
4274
|
-
return styled.css(_c$6 || (_c$6 = __template$
|
|
4706
|
+
return styled.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({
|
|
4275
4707
|
color: color.input.default.enabled.border,
|
|
4276
4708
|
width: input.border.width
|
|
4277
4709
|
}), color.input.default.hovered.bg, color.input.default.hovered.fg, focusRingBorderStyle({
|
|
@@ -4314,7 +4746,7 @@ function iconBoxStyle(props) {
|
|
|
4314
4746
|
const {
|
|
4315
4747
|
color
|
|
4316
4748
|
} = theme.getTheme_v2(props.theme);
|
|
4317
|
-
return styled.css(_d$5 || (_d$5 = __template$
|
|
4749
|
+
return styled.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);
|
|
4318
4750
|
}
|
|
4319
4751
|
const selectStyle = {
|
|
4320
4752
|
root: rootStyle,
|
|
@@ -4331,7 +4763,7 @@ const Select = react.forwardRef(function Select2(props, forwardedRef) {
|
|
|
4331
4763
|
disabled,
|
|
4332
4764
|
fontSize = 2,
|
|
4333
4765
|
padding = 3,
|
|
4334
|
-
radius =
|
|
4766
|
+
radius = 2,
|
|
4335
4767
|
readOnly,
|
|
4336
4768
|
space = 3,
|
|
4337
4769
|
...restProps
|
|
@@ -4398,24 +4830,24 @@ const Stack = react.forwardRef(function Stack2(props, ref) {
|
|
|
4398
4830
|
ref
|
|
4399
4831
|
});
|
|
4400
4832
|
});
|
|
4401
|
-
var __freeze$
|
|
4402
|
-
var __defProp$
|
|
4403
|
-
var __template$
|
|
4404
|
-
value: __freeze$
|
|
4833
|
+
var __freeze$j = Object.freeze;
|
|
4834
|
+
var __defProp$j = Object.defineProperty;
|
|
4835
|
+
var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
|
|
4836
|
+
value: __freeze$j(raw || cooked.slice())
|
|
4405
4837
|
}));
|
|
4406
|
-
var _a$
|
|
4838
|
+
var _a$j, _b$b, _c$5, _d$4, _e$2, _f$2, _g;
|
|
4407
4839
|
function switchBaseStyles() {
|
|
4408
|
-
return styled.css(_a$
|
|
4840
|
+
return styled.css(_a$j || (_a$j = __template$j(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
4409
4841
|
}
|
|
4410
4842
|
function switchInputStyles() {
|
|
4411
|
-
return styled.css(_b$b || (_b$b = __template$
|
|
4843
|
+
return styled.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 "])));
|
|
4412
4844
|
}
|
|
4413
4845
|
function switchRepresentationStyles(props) {
|
|
4414
4846
|
const {
|
|
4415
4847
|
color,
|
|
4416
4848
|
input
|
|
4417
4849
|
} = theme.getTheme_v2(props.theme);
|
|
4418
|
-
return styled.css(_c$5 || (_c$5 = __template$
|
|
4850
|
+
return styled.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({
|
|
4419
4851
|
focusRing: input.switch.focusRing
|
|
4420
4852
|
}), 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);
|
|
4421
4853
|
}
|
|
@@ -4423,7 +4855,7 @@ function switchTrackStyles(props) {
|
|
|
4423
4855
|
const {
|
|
4424
4856
|
input
|
|
4425
4857
|
} = theme.getTheme_v2(props.theme);
|
|
4426
|
-
return styled.css(_d$4 || (_d$4 = __template$
|
|
4858
|
+
return styled.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));
|
|
4427
4859
|
}
|
|
4428
4860
|
function switchThumbStyles(props) {
|
|
4429
4861
|
const {
|
|
@@ -4439,7 +4871,7 @@ function switchThumbStyles(props) {
|
|
|
4439
4871
|
const checkedOffset = trackWidth - trackPadding * 2 - size;
|
|
4440
4872
|
const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
|
|
4441
4873
|
const checked = $indeterminate !== true && props.$checked === true;
|
|
4442
|
-
return styled.css(_g || (_g = __template$
|
|
4874
|
+
return styled.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 && styled.css(_e$2 || (_e$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && styled.css(_f$2 || (_f$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
|
|
4443
4875
|
}
|
|
4444
4876
|
const Root$d = styled__default.default.span(switchBaseStyles);
|
|
4445
4877
|
const Input$2 = styled__default.default.input(switchInputStyles);
|
|
@@ -4483,14 +4915,14 @@ const Switch = react.forwardRef(function Switch2(props, forwardedRef) {
|
|
|
4483
4915
|
})]
|
|
4484
4916
|
});
|
|
4485
4917
|
});
|
|
4486
|
-
var __freeze$
|
|
4487
|
-
var __defProp$
|
|
4488
|
-
var __template$
|
|
4489
|
-
value: __freeze$
|
|
4918
|
+
var __freeze$i = Object.freeze;
|
|
4919
|
+
var __defProp$i = Object.defineProperty;
|
|
4920
|
+
var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
|
|
4921
|
+
value: __freeze$i(raw || cooked.slice())
|
|
4490
4922
|
}));
|
|
4491
|
-
var _a$
|
|
4923
|
+
var _a$i;
|
|
4492
4924
|
const Root$c = styled__default.default.span(textInputRootStyle);
|
|
4493
|
-
const InputRoot$1 = styled__default.default.span(_a$
|
|
4925
|
+
const InputRoot$1 = styled__default.default.span(_a$i || (_a$i = __template$i(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4494
4926
|
const Input$1 = styled__default.default.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4495
4927
|
const Presentation$1 = styled__default.default.div(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4496
4928
|
const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
@@ -4534,30 +4966,30 @@ const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
4534
4966
|
})
|
|
4535
4967
|
});
|
|
4536
4968
|
});
|
|
4537
|
-
var __freeze$
|
|
4538
|
-
var __defProp$
|
|
4539
|
-
var __template$
|
|
4540
|
-
value: __freeze$
|
|
4969
|
+
var __freeze$h = Object.freeze;
|
|
4970
|
+
var __defProp$h = Object.defineProperty;
|
|
4971
|
+
var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
|
|
4972
|
+
value: __freeze$h(raw || cooked.slice())
|
|
4541
4973
|
}));
|
|
4542
|
-
var _a$
|
|
4974
|
+
var _a$h, _b$a, _c$4, _d$3, _e$1, _f$1;
|
|
4543
4975
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
4544
4976
|
zIndex: 2
|
|
4545
4977
|
};
|
|
4546
4978
|
const Root$b = styled__default.default(Card).attrs({
|
|
4547
4979
|
forwardedAs: "span"
|
|
4548
4980
|
})(textInputRootStyle);
|
|
4549
|
-
const InputRoot = styled__default.default.span(_a$
|
|
4981
|
+
const InputRoot = styled__default.default.span(_a$h || (_a$h = __template$h(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4550
4982
|
const Prefix = styled__default.default(Card).attrs({
|
|
4551
4983
|
forwardedAs: "span"
|
|
4552
|
-
})(_b$a || (_b$a = __template$
|
|
4984
|
+
})(_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"])));
|
|
4553
4985
|
const Suffix = styled__default.default(Card).attrs({
|
|
4554
4986
|
forwardedAs: "span"
|
|
4555
|
-
})(_c$4 || (_c$4 = __template$
|
|
4987
|
+
})(_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"])));
|
|
4556
4988
|
const Input = styled__default.default.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4557
4989
|
const Presentation = styled__default.default.span(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4558
|
-
const LeftBox = styled__default.default(Box)(_d$3 || (_d$3 = __template$
|
|
4559
|
-
const RightBox = styled__default.default(Box)(_e$1 || (_e$1 = __template$
|
|
4560
|
-
const RightCard = styled__default.default(Card)(_f$1 || (_f$1 = __template$
|
|
4990
|
+
const LeftBox = styled__default.default(Box)(_d$3 || (_d$3 = __template$h(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
|
|
4991
|
+
const RightBox = styled__default.default(Box)(_e$1 || (_e$1 = __template$h(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4992
|
+
const RightCard = styled__default.default(Card)(_f$1 || (_f$1 = __template$h(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4561
4993
|
const TextInputClearButton = styled__default.default(Button)({
|
|
4562
4994
|
"&:not([hidden])": {
|
|
4563
4995
|
display: "block"
|
|
@@ -4632,13 +5064,13 @@ const TextInput = react.forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
4632
5064
|
padding,
|
|
4633
5065
|
children: /* @__PURE__ */jsxRuntime.jsxs(Text, {
|
|
4634
5066
|
size: fontSize,
|
|
4635
|
-
children: [react.isValidElement(icon) && icon,
|
|
5067
|
+
children: [react.isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && react.createElement(icon)]
|
|
4636
5068
|
})
|
|
4637
5069
|
}), !$hasClearButton && iconRight && /* @__PURE__ */jsxRuntime.jsx(RightBox, {
|
|
4638
5070
|
padding,
|
|
4639
5071
|
children: /* @__PURE__ */jsxRuntime.jsxs(Text, {
|
|
4640
5072
|
size: fontSize,
|
|
4641
|
-
children: [react.isValidElement(iconRight) && iconRight,
|
|
5073
|
+
children: [react.isValidElement(iconRight) && iconRight, reactIsExports.isValidElementType(iconRight) && react.createElement(iconRight)]
|
|
4642
5074
|
})
|
|
4643
5075
|
})]
|
|
4644
5076
|
}), [__unstable_disableFocusRing, border, fontSize, icon, iconRight, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]);
|
|
@@ -4725,17 +5157,6 @@ function useDelayedState(initialState) {
|
|
|
4725
5157
|
}, []);
|
|
4726
5158
|
return [state, onStateChange];
|
|
4727
5159
|
}
|
|
4728
|
-
function ConditionalWrapper(_ref5) {
|
|
4729
|
-
let {
|
|
4730
|
-
children,
|
|
4731
|
-
condition,
|
|
4732
|
-
wrapper
|
|
4733
|
-
} = _ref5;
|
|
4734
|
-
if (!condition) {
|
|
4735
|
-
return children;
|
|
4736
|
-
}
|
|
4737
|
-
return wrapper(children);
|
|
4738
|
-
}
|
|
4739
5160
|
const DEFAULT_TOOLTIP_ARROW_WIDTH = 15;
|
|
4740
5161
|
const DEFAULT_TOOLTIP_ARROW_HEIGHT = 6;
|
|
4741
5162
|
const DEFAULT_TOOLTIP_ARROW_RADIUS = 2;
|
|
@@ -4755,6 +5176,63 @@ const DEFAULT_FALLBACK_PLACEMENTS = {
|
|
|
4755
5176
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4756
5177
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4757
5178
|
};
|
|
5179
|
+
var __freeze$g = Object.freeze;
|
|
5180
|
+
var __defProp$g = Object.defineProperty;
|
|
5181
|
+
var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
|
|
5182
|
+
value: __freeze$g(raw || cooked.slice())
|
|
5183
|
+
}));
|
|
5184
|
+
var _a$g;
|
|
5185
|
+
const MotionCard = styled__default.default(framerMotion.motion(Card))(_a$g || (_a$g = __template$g([""])));
|
|
5186
|
+
const TooltipCard = react.memo(react.forwardRef(function TooltipCard2(props, ref) {
|
|
5187
|
+
const {
|
|
5188
|
+
animate,
|
|
5189
|
+
arrow,
|
|
5190
|
+
arrowRef,
|
|
5191
|
+
arrowX,
|
|
5192
|
+
arrowY,
|
|
5193
|
+
children,
|
|
5194
|
+
originX,
|
|
5195
|
+
originY,
|
|
5196
|
+
padding,
|
|
5197
|
+
placement,
|
|
5198
|
+
radius,
|
|
5199
|
+
scheme,
|
|
5200
|
+
shadow,
|
|
5201
|
+
style,
|
|
5202
|
+
...restProps
|
|
5203
|
+
} = props;
|
|
5204
|
+
const rootStyle = react.useMemo(() => ({
|
|
5205
|
+
originX,
|
|
5206
|
+
originY,
|
|
5207
|
+
...style
|
|
5208
|
+
}), [originX, originY, style]);
|
|
5209
|
+
const arrowStyle = react.useMemo(() => ({
|
|
5210
|
+
left: arrowX !== null ? arrowX : void 0,
|
|
5211
|
+
top: arrowY !== null ? arrowY : void 0,
|
|
5212
|
+
right: void 0,
|
|
5213
|
+
bottom: void 0
|
|
5214
|
+
}), [arrowX, arrowY]);
|
|
5215
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MotionCard, {
|
|
5216
|
+
"data-ui": "Tooltip__card",
|
|
5217
|
+
...restProps,
|
|
5218
|
+
"data-placement": placement,
|
|
5219
|
+
padding,
|
|
5220
|
+
radius,
|
|
5221
|
+
ref,
|
|
5222
|
+
scheme,
|
|
5223
|
+
shadow,
|
|
5224
|
+
style: rootStyle,
|
|
5225
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
5226
|
+
children: [children, arrow && /* @__PURE__ */jsxRuntime.jsx(Arrow, {
|
|
5227
|
+
ref: arrowRef,
|
|
5228
|
+
style: arrowStyle,
|
|
5229
|
+
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
5230
|
+
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
5231
|
+
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
5232
|
+
})]
|
|
5233
|
+
});
|
|
5234
|
+
}));
|
|
5235
|
+
TooltipCard.displayName = "TooltipCard";
|
|
4758
5236
|
const key$4 = Symbol.for("@sanity/ui/context/tooltipDelayGroup");
|
|
4759
5237
|
globalScope[key$4] = globalScope[key$4] || react.createContext(null);
|
|
4760
5238
|
const TooltipDelayGroupContext = globalScope[key$4];
|
|
@@ -4791,19 +5269,20 @@ var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
|
|
|
4791
5269
|
value: __freeze$f(raw || cooked.slice())
|
|
4792
5270
|
}));
|
|
4793
5271
|
var _a$f;
|
|
4794
|
-
const Root$a = styled__default.default(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])),
|
|
5272
|
+
const Root$a = styled__default.default(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])), _ref7 => {
|
|
4795
5273
|
let {
|
|
4796
5274
|
$maxWidth
|
|
4797
|
-
} =
|
|
5275
|
+
} = _ref7;
|
|
4798
5276
|
return $maxWidth;
|
|
4799
5277
|
});
|
|
4800
5278
|
const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
4801
|
-
var _a2, _b, _c, _d, _e;
|
|
5279
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
4802
5280
|
const boundaryElementContext = useBoundaryElement();
|
|
4803
5281
|
const {
|
|
4804
5282
|
layer
|
|
4805
5283
|
} = useTheme_v2();
|
|
4806
5284
|
const {
|
|
5285
|
+
animate = false,
|
|
4807
5286
|
arrow: arrowProp = false,
|
|
4808
5287
|
boundaryElement = boundaryElementContext == null ? void 0 : boundaryElementContext.element,
|
|
4809
5288
|
children: childProp,
|
|
@@ -4818,7 +5297,6 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4818
5297
|
shadow = 2,
|
|
4819
5298
|
zOffset = layer.tooltip.zOffset,
|
|
4820
5299
|
delay,
|
|
4821
|
-
animate = false,
|
|
4822
5300
|
...restProps
|
|
4823
5301
|
} = props;
|
|
4824
5302
|
const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
|
|
@@ -4854,8 +5332,11 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4854
5332
|
padding: DEFAULT_TOOLTIP_PADDING
|
|
4855
5333
|
}));
|
|
4856
5334
|
}
|
|
5335
|
+
if (animate) {
|
|
5336
|
+
ret.push(origin);
|
|
5337
|
+
}
|
|
4857
5338
|
return ret;
|
|
4858
|
-
}, [arrowProp, boundaryElement, fallbackPlacements]);
|
|
5339
|
+
}, [animate, arrowProp, boundaryElement, fallbackPlacements]);
|
|
4859
5340
|
const {
|
|
4860
5341
|
floatingStyles,
|
|
4861
5342
|
placement,
|
|
@@ -4869,12 +5350,8 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4869
5350
|
});
|
|
4870
5351
|
const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
|
|
4871
5352
|
const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
|
|
4872
|
-
const
|
|
4873
|
-
|
|
4874
|
-
top: arrowY !== null ? arrowY : void 0,
|
|
4875
|
-
right: void 0,
|
|
4876
|
-
bottom: void 0
|
|
4877
|
-
}), [arrowX, arrowY]);
|
|
5353
|
+
const originX = (_f = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _f.originX;
|
|
5354
|
+
const originY = (_g = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _g.originY;
|
|
4878
5355
|
const tooltipId = react.useId();
|
|
4879
5356
|
const [isOpen, setIsOpen] = useDelayedState(false);
|
|
4880
5357
|
const delayGroupContext = useTooltipDelayGroup();
|
|
@@ -4996,53 +5473,33 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4996
5473
|
}, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
|
|
4997
5474
|
if (!child) return /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
4998
5475
|
if (disabled) return child;
|
|
4999
|
-
const
|
|
5476
|
+
const tooltip = /* @__PURE__ */jsxRuntime.jsx(Root$a, {
|
|
5000
5477
|
"data-ui": "Tooltip",
|
|
5001
5478
|
...restProps,
|
|
5002
5479
|
ref: setFloating,
|
|
5003
5480
|
style: floatingStyles,
|
|
5004
5481
|
zOffset,
|
|
5005
5482
|
$maxWidth: tooltipWidth,
|
|
5006
|
-
children: /* @__PURE__ */jsxRuntime.jsx(
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
duration: 0.3,
|
|
5023
|
-
type: "spring"
|
|
5024
|
-
},
|
|
5025
|
-
children
|
|
5026
|
-
}),
|
|
5027
|
-
children: /* @__PURE__ */jsxRuntime.jsxs(Card, {
|
|
5028
|
-
"data-ui": "Tooltip__card",
|
|
5029
|
-
"data-placement": placement,
|
|
5030
|
-
padding,
|
|
5031
|
-
radius,
|
|
5032
|
-
scheme,
|
|
5033
|
-
shadow,
|
|
5034
|
-
children: [content, arrowProp && /* @__PURE__ */jsxRuntime.jsx(Arrow, {
|
|
5035
|
-
ref: setArrow,
|
|
5036
|
-
style: arrowStyle,
|
|
5037
|
-
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
5038
|
-
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
5039
|
-
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
5040
|
-
})]
|
|
5041
|
-
})
|
|
5483
|
+
children: /* @__PURE__ */jsxRuntime.jsx(TooltipCard, {
|
|
5484
|
+
...restProps,
|
|
5485
|
+
animate,
|
|
5486
|
+
arrow: arrowProp,
|
|
5487
|
+
arrowRef: setArrow,
|
|
5488
|
+
arrowX,
|
|
5489
|
+
arrowY,
|
|
5490
|
+
originX,
|
|
5491
|
+
originY,
|
|
5492
|
+
padding,
|
|
5493
|
+
placement,
|
|
5494
|
+
radius,
|
|
5495
|
+
ref: setFloating,
|
|
5496
|
+
scheme,
|
|
5497
|
+
shadow,
|
|
5498
|
+
children: content
|
|
5042
5499
|
})
|
|
5043
5500
|
});
|
|
5044
5501
|
return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5045
|
-
children: [
|
|
5502
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
5046
5503
|
condition: animate,
|
|
5047
5504
|
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
5048
5505
|
children
|
|
@@ -5053,9 +5510,9 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
5053
5510
|
__unstable_name: typeof portalProp === "string" ? portalProp : void 0,
|
|
5054
5511
|
children
|
|
5055
5512
|
}),
|
|
5056
|
-
children:
|
|
5513
|
+
children: tooltip
|
|
5057
5514
|
})
|
|
5058
|
-
})]
|
|
5515
|
+
}), child]
|
|
5059
5516
|
});
|
|
5060
5517
|
});
|
|
5061
5518
|
var __freeze$e = Object.freeze;
|
|
@@ -5212,10 +5669,10 @@ const InnerAutocomplete = react.forwardRef(function InnerAutocomplete2(props, re
|
|
|
5212
5669
|
query,
|
|
5213
5670
|
value
|
|
5214
5671
|
} = state;
|
|
5215
|
-
const defaultRenderOption = react.useCallback(
|
|
5672
|
+
const defaultRenderOption = react.useCallback(_ref8 => {
|
|
5216
5673
|
let {
|
|
5217
5674
|
value: value2
|
|
5218
|
-
} =
|
|
5675
|
+
} = _ref8;
|
|
5219
5676
|
return /* @__PURE__ */jsxRuntime.jsx(Card, {
|
|
5220
5677
|
"data-as": "button",
|
|
5221
5678
|
padding: paddingProp,
|
|
@@ -5674,10 +6131,10 @@ var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
|
|
|
5674
6131
|
value: __freeze$c(raw || cooked.slice())
|
|
5675
6132
|
}));
|
|
5676
6133
|
var _a$c, _b$7;
|
|
5677
|
-
function dialogStyle(
|
|
6134
|
+
function dialogStyle(_ref9) {
|
|
5678
6135
|
let {
|
|
5679
6136
|
theme: theme$1
|
|
5680
|
-
} =
|
|
6137
|
+
} = _ref9;
|
|
5681
6138
|
const {
|
|
5682
6139
|
color
|
|
5683
6140
|
} = theme.getTheme_v2(theme$1);
|
|
@@ -6417,7 +6874,7 @@ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
|
|
|
6417
6874
|
registerElement,
|
|
6418
6875
|
shouldFocus
|
|
6419
6876
|
}), [buttonElement, handleMenuClickOutside, handleMenuEscape, handleItemClick, id, handleBlur, registerElement, shouldFocus]);
|
|
6420
|
-
const menu =
|
|
6877
|
+
const menu = reactIsExports.isElement(menuProp) ? react.cloneElement(menuProp, menuProps) : null;
|
|
6421
6878
|
const setButtonRef = react.useCallback(el => {
|
|
6422
6879
|
if (typeof ref === "function") {
|
|
6423
6880
|
ref(el);
|
|
@@ -6426,7 +6883,7 @@ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
|
|
|
6426
6883
|
}
|
|
6427
6884
|
setButtonElement(el);
|
|
6428
6885
|
}, [ref]);
|
|
6429
|
-
const button = react.useMemo(() =>
|
|
6886
|
+
const button = react.useMemo(() => reactIsExports.isElement(buttonProp) ? react.cloneElement(buttonProp, {
|
|
6430
6887
|
"data-ui": "MenuButton",
|
|
6431
6888
|
id,
|
|
6432
6889
|
onClick: handleButtonClick,
|
|
@@ -6613,7 +7070,7 @@ function MenuGroup(props) {
|
|
|
6613
7070
|
padding,
|
|
6614
7071
|
children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
|
|
6615
7072
|
size: fontSize,
|
|
6616
|
-
children: [react.isValidElement(icon) && icon,
|
|
7073
|
+
children: [react.isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && react.createElement(icon)]
|
|
6617
7074
|
}), /* @__PURE__ */jsxRuntime.jsx(Box, {
|
|
6618
7075
|
flex: 1,
|
|
6619
7076
|
children: /* @__PURE__ */jsxRuntime.jsx(Text, {
|
|
@@ -6716,7 +7173,7 @@ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
|
|
|
6716
7173
|
...paddingProps,
|
|
6717
7174
|
children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
|
|
6718
7175
|
size: fontSize,
|
|
6719
|
-
children: [react.isValidElement(icon) && icon,
|
|
7176
|
+
children: [react.isValidElement(icon) && icon, reactIsExports.isValidElementType(icon) && react.createElement(icon)]
|
|
6720
7177
|
}), text && /* @__PURE__ */jsxRuntime.jsx(Box, {
|
|
6721
7178
|
flex: 1,
|
|
6722
7179
|
children: /* @__PURE__ */jsxRuntime.jsx(Text, {
|
|
@@ -6734,7 +7191,7 @@ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
|
|
|
6734
7191
|
}
|
|
6735
7192
|
}), iconRight && /* @__PURE__ */jsxRuntime.jsxs(Text, {
|
|
6736
7193
|
size: fontSize,
|
|
6737
|
-
children: [react.isValidElement(iconRight) && iconRight,
|
|
7194
|
+
children: [react.isValidElement(iconRight) && iconRight, reactIsExports.isValidElementType(iconRight) && react.createElement(iconRight)]
|
|
6738
7195
|
})]
|
|
6739
7196
|
}), children && /* @__PURE__ */jsxRuntime.jsx(Box, {
|
|
6740
7197
|
as: "span",
|
|
@@ -6751,15 +7208,15 @@ var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
|
|
|
6751
7208
|
var _a$6, _b$3, _c$1, _d;
|
|
6752
7209
|
const keyframe = styled.keyframes(_a$6 || (_a$6 = __template$6(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
|
|
6753
7210
|
const animation = styled.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);
|
|
6754
|
-
const skeletonStyle = styled.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"])),
|
|
7211
|
+
const skeletonStyle = styled.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 => {
|
|
6755
7212
|
let {
|
|
6756
7213
|
$visible
|
|
6757
|
-
} =
|
|
7214
|
+
} = _ref10;
|
|
6758
7215
|
return $visible ? 1 : 0;
|
|
6759
|
-
},
|
|
7216
|
+
}, _ref11 => {
|
|
6760
7217
|
let {
|
|
6761
7218
|
$animated
|
|
6762
|
-
} =
|
|
7219
|
+
} = _ref11;
|
|
6763
7220
|
return $animated ? animation : styled.css(_c$1 || (_c$1 = __template$6(["\n background-color: var(--card-skeleton-color-from);\n "])));
|
|
6764
7221
|
});
|
|
6765
7222
|
const Root$4 = styled__default.default(Box)(responsiveRadiusStyle, skeletonStyle);
|
|
@@ -7144,12 +7601,12 @@ function ToastProvider(props) {
|
|
|
7144
7601
|
paddingY,
|
|
7145
7602
|
children: /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
7146
7603
|
initial: false,
|
|
7147
|
-
children: state.map(
|
|
7604
|
+
children: state.map(_ref12 => {
|
|
7148
7605
|
let {
|
|
7149
7606
|
dismiss,
|
|
7150
7607
|
id,
|
|
7151
7608
|
params
|
|
7152
|
-
} =
|
|
7609
|
+
} = _ref12;
|
|
7153
7610
|
return /* @__PURE__ */jsxRuntime.jsx(framerMotion.motion.div, {
|
|
7154
7611
|
animate: {
|
|
7155
7612
|
opacity: 1,
|
|
@@ -7657,6 +8114,7 @@ exports.Card = Card;
|
|
|
7657
8114
|
exports.Checkbox = Checkbox;
|
|
7658
8115
|
exports.Code = Code;
|
|
7659
8116
|
exports.CodeSkeleton = CodeSkeleton;
|
|
8117
|
+
exports.ConditionalWrapper = ConditionalWrapper;
|
|
7660
8118
|
exports.Container = Container;
|
|
7661
8119
|
exports.Dialog = Dialog;
|
|
7662
8120
|
exports.DialogContext = DialogContext;
|