@mission-studio/puck 1.0.5 → 1.0.16
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/ResponsiveToggleField-BihXsGIJ.d.mts +26 -0
- package/dist/ResponsiveToggleField-CfBKL5oY.d.ts +26 -0
- package/dist/chunk-A3QDUUOF.mjs +80 -0
- package/dist/chunk-D3L26TIT.mjs +76 -0
- package/dist/chunk-KV2RSRAM.mjs +114 -0
- package/dist/{chunk-R7TH6TWG.mjs → chunk-ML3AS3AY.mjs} +56 -84
- package/dist/{chunk-OZYZPWP7.mjs → chunk-SYXQQITG.mjs} +253 -287
- package/dist/config/server.d.mts +5 -0
- package/dist/config/server.d.ts +5 -0
- package/dist/config/server.js +2207 -0
- package/dist/config/server.mjs +133 -0
- package/dist/config-entry.js +334 -395
- package/dist/config-entry.mjs +5 -3
- package/dist/editor.d.mts +5 -2
- package/dist/editor.d.ts +5 -2
- package/dist/editor.js +271 -309
- package/dist/editor.mjs +10 -6
- package/dist/hooks/index.d.mts +3 -2
- package/dist/hooks/index.d.ts +3 -2
- package/dist/index.d.mts +7 -287
- package/dist/index.d.ts +7 -287
- package/dist/index.js +59 -92
- package/dist/index.mjs +20 -16
- package/dist/renderer.d.mts +289 -0
- package/dist/renderer.d.ts +289 -0
- package/dist/renderer.js +2162 -0
- package/dist/renderer.mjs +57 -0
- package/dist/resolve/index.d.mts +10 -0
- package/dist/resolve/index.d.ts +10 -0
- package/dist/resolve/index.js +202 -0
- package/dist/resolve/index.mjs +124 -0
- package/dist/styles.css +1 -1
- package/dist/types-D-CIduaE.d.mts +111 -0
- package/dist/types-D-CIduaE.d.ts +111 -0
- package/dist/typography-DwjKOx3F.d.mts +49 -0
- package/dist/typography-DwjKOx3F.d.ts +49 -0
- package/package.json +16 -1
- package/dist/ResponsiveToggleField-CVhKzDAT.d.mts +0 -183
- package/dist/ResponsiveToggleField-CVhKzDAT.d.ts +0 -183
- package/dist/chunk-TTKY3YGP.mjs +0 -262
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
borderRadiusScale,
|
|
3
|
-
cn,
|
|
4
3
|
fontFamilies,
|
|
5
4
|
fontSizes,
|
|
6
5
|
fontWeights,
|
|
7
6
|
getClosestBorderRadiusValue,
|
|
8
7
|
getClosestSpacingValue,
|
|
9
8
|
getFontSizeCSS,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
spacingScale
|
|
10
|
+
} from "./chunk-A3QDUUOF.mjs";
|
|
11
|
+
import {
|
|
13
12
|
shadowPresets,
|
|
14
|
-
spacingScale,
|
|
15
13
|
useEntries,
|
|
16
14
|
useTheme
|
|
17
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KV2RSRAM.mjs";
|
|
16
|
+
import {
|
|
17
|
+
cn,
|
|
18
|
+
hexToRgba,
|
|
19
|
+
isValidHex,
|
|
20
|
+
normalizeHex
|
|
21
|
+
} from "./chunk-D3L26TIT.mjs";
|
|
18
22
|
|
|
19
23
|
// fields/BorderRadiusField.tsx
|
|
20
24
|
import { useState } from "react";
|
|
@@ -408,8 +412,8 @@ function ColorPickerField({
|
|
|
408
412
|
}
|
|
409
413
|
|
|
410
414
|
// node_modules/@radix-ui/react-select/dist/index.mjs
|
|
411
|
-
import * as
|
|
412
|
-
import * as
|
|
415
|
+
import * as React31 from "react";
|
|
416
|
+
import * as ReactDOM4 from "react-dom";
|
|
413
417
|
|
|
414
418
|
// node_modules/@radix-ui/number/dist/index.mjs
|
|
415
419
|
function clamp(value, [min2, max2]) {
|
|
@@ -3375,51 +3379,13 @@ var Portal = React18.forwardRef((props, forwardedRef) => {
|
|
|
3375
3379
|
});
|
|
3376
3380
|
Portal.displayName = PORTAL_NAME;
|
|
3377
3381
|
|
|
3378
|
-
// node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3379
|
-
import * as React19 from "react";
|
|
3380
|
-
import * as ReactDOM4 from "react-dom";
|
|
3381
|
-
import { createSlot as createSlot4 } from "@radix-ui/react-slot";
|
|
3382
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3383
|
-
var NODES2 = [
|
|
3384
|
-
"a",
|
|
3385
|
-
"button",
|
|
3386
|
-
"div",
|
|
3387
|
-
"form",
|
|
3388
|
-
"h2",
|
|
3389
|
-
"h3",
|
|
3390
|
-
"img",
|
|
3391
|
-
"input",
|
|
3392
|
-
"label",
|
|
3393
|
-
"li",
|
|
3394
|
-
"nav",
|
|
3395
|
-
"ol",
|
|
3396
|
-
"p",
|
|
3397
|
-
"select",
|
|
3398
|
-
"span",
|
|
3399
|
-
"svg",
|
|
3400
|
-
"ul"
|
|
3401
|
-
];
|
|
3402
|
-
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
3403
|
-
const Slot3 = createSlot4(`Primitive.${node}`);
|
|
3404
|
-
const Node2 = React19.forwardRef((props, forwardedRef) => {
|
|
3405
|
-
const { asChild, ...primitiveProps } = props;
|
|
3406
|
-
const Comp = asChild ? Slot3 : node;
|
|
3407
|
-
if (typeof window !== "undefined") {
|
|
3408
|
-
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
3409
|
-
}
|
|
3410
|
-
return /* @__PURE__ */ jsx17(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
3411
|
-
});
|
|
3412
|
-
Node2.displayName = `Primitive.${node}`;
|
|
3413
|
-
return { ...primitive, [node]: Node2 };
|
|
3414
|
-
}, {});
|
|
3415
|
-
|
|
3416
3382
|
// node_modules/@radix-ui/react-select/dist/index.mjs
|
|
3417
|
-
import { createSlot as
|
|
3383
|
+
import { createSlot as createSlot4 } from "@radix-ui/react-slot";
|
|
3418
3384
|
|
|
3419
3385
|
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
3420
|
-
import * as
|
|
3386
|
+
import * as React19 from "react";
|
|
3421
3387
|
import * as React23 from "react";
|
|
3422
|
-
var useInsertionEffect =
|
|
3388
|
+
var useInsertionEffect = React19[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3423
3389
|
function useControllableState({
|
|
3424
3390
|
prop,
|
|
3425
3391
|
defaultProp,
|
|
@@ -3434,8 +3400,8 @@ function useControllableState({
|
|
|
3434
3400
|
const isControlled = prop !== void 0;
|
|
3435
3401
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3436
3402
|
if (true) {
|
|
3437
|
-
const isControlledRef =
|
|
3438
|
-
|
|
3403
|
+
const isControlledRef = React19.useRef(prop !== void 0);
|
|
3404
|
+
React19.useEffect(() => {
|
|
3439
3405
|
const wasControlled = isControlledRef.current;
|
|
3440
3406
|
if (wasControlled !== isControlled) {
|
|
3441
3407
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -3447,7 +3413,7 @@ function useControllableState({
|
|
|
3447
3413
|
isControlledRef.current = isControlled;
|
|
3448
3414
|
}, [isControlled, caller]);
|
|
3449
3415
|
}
|
|
3450
|
-
const setValue =
|
|
3416
|
+
const setValue = React19.useCallback(
|
|
3451
3417
|
(nextValue) => {
|
|
3452
3418
|
if (isControlled) {
|
|
3453
3419
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -3466,13 +3432,13 @@ function useUncontrolledState({
|
|
|
3466
3432
|
defaultProp,
|
|
3467
3433
|
onChange
|
|
3468
3434
|
}) {
|
|
3469
|
-
const [value, setValue] =
|
|
3470
|
-
const prevValueRef =
|
|
3471
|
-
const onChangeRef =
|
|
3435
|
+
const [value, setValue] = React19.useState(defaultProp);
|
|
3436
|
+
const prevValueRef = React19.useRef(value);
|
|
3437
|
+
const onChangeRef = React19.useRef(onChange);
|
|
3472
3438
|
useInsertionEffect(() => {
|
|
3473
3439
|
onChangeRef.current = onChange;
|
|
3474
3440
|
}, [onChange]);
|
|
3475
|
-
|
|
3441
|
+
React19.useEffect(() => {
|
|
3476
3442
|
if (prevValueRef.current !== value) {
|
|
3477
3443
|
onChangeRef.current?.(value);
|
|
3478
3444
|
prevValueRef.current = value;
|
|
@@ -3485,10 +3451,10 @@ function isFunction(value) {
|
|
|
3485
3451
|
}
|
|
3486
3452
|
|
|
3487
3453
|
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
3488
|
-
import * as
|
|
3454
|
+
import * as React20 from "react";
|
|
3489
3455
|
function usePrevious(value) {
|
|
3490
|
-
const ref =
|
|
3491
|
-
return
|
|
3456
|
+
const ref = React20.useRef({ value, previous: value });
|
|
3457
|
+
return React20.useMemo(() => {
|
|
3492
3458
|
if (ref.current.value !== value) {
|
|
3493
3459
|
ref.current.previous = ref.current.value;
|
|
3494
3460
|
ref.current.value = value;
|
|
@@ -3498,8 +3464,8 @@ function usePrevious(value) {
|
|
|
3498
3464
|
}
|
|
3499
3465
|
|
|
3500
3466
|
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
3501
|
-
import * as
|
|
3502
|
-
import { jsx as
|
|
3467
|
+
import * as React21 from "react";
|
|
3468
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3503
3469
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
3504
3470
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
3505
3471
|
position: "absolute",
|
|
@@ -3514,9 +3480,9 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
3514
3480
|
wordWrap: "normal"
|
|
3515
3481
|
});
|
|
3516
3482
|
var NAME2 = "VisuallyHidden";
|
|
3517
|
-
var VisuallyHidden =
|
|
3483
|
+
var VisuallyHidden = React21.forwardRef(
|
|
3518
3484
|
(props, forwardedRef) => {
|
|
3519
|
-
return /* @__PURE__ */
|
|
3485
|
+
return /* @__PURE__ */ jsx17(
|
|
3520
3486
|
Primitive.span,
|
|
3521
3487
|
{
|
|
3522
3488
|
...props,
|
|
@@ -3682,10 +3648,10 @@ function __spreadArray(to, from, pack) {
|
|
|
3682
3648
|
}
|
|
3683
3649
|
|
|
3684
3650
|
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
3685
|
-
import * as
|
|
3651
|
+
import * as React30 from "react";
|
|
3686
3652
|
|
|
3687
3653
|
// node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
3688
|
-
import * as
|
|
3654
|
+
import * as React26 from "react";
|
|
3689
3655
|
|
|
3690
3656
|
// node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
3691
3657
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -3732,8 +3698,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
3732
3698
|
}
|
|
3733
3699
|
|
|
3734
3700
|
// node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
3735
|
-
import * as
|
|
3736
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
3701
|
+
import * as React24 from "react";
|
|
3702
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React24.useLayoutEffect : React24.useEffect;
|
|
3737
3703
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
3738
3704
|
function useMergeRefs(refs, defaultValue) {
|
|
3739
3705
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -3850,7 +3816,7 @@ function createSidecarMedium(options) {
|
|
|
3850
3816
|
}
|
|
3851
3817
|
|
|
3852
3818
|
// node_modules/use-sidecar/dist/es2015/exports.js
|
|
3853
|
-
import * as
|
|
3819
|
+
import * as React25 from "react";
|
|
3854
3820
|
var SideCar = function(_a) {
|
|
3855
3821
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
3856
3822
|
if (!sideCar) {
|
|
@@ -3860,7 +3826,7 @@ var SideCar = function(_a) {
|
|
|
3860
3826
|
if (!Target) {
|
|
3861
3827
|
throw new Error("Sidecar medium not found");
|
|
3862
3828
|
}
|
|
3863
|
-
return
|
|
3829
|
+
return React25.createElement(Target, __assign({}, rest));
|
|
3864
3830
|
};
|
|
3865
3831
|
SideCar.isSideCarExport = true;
|
|
3866
3832
|
function exportSidecar(medium, exported) {
|
|
@@ -3875,9 +3841,9 @@ var effectCar = createSidecarMedium();
|
|
|
3875
3841
|
var nothing = function() {
|
|
3876
3842
|
return;
|
|
3877
3843
|
};
|
|
3878
|
-
var RemoveScroll =
|
|
3879
|
-
var ref =
|
|
3880
|
-
var _a =
|
|
3844
|
+
var RemoveScroll = React26.forwardRef(function(props, parentRef) {
|
|
3845
|
+
var ref = React26.useRef(null);
|
|
3846
|
+
var _a = React26.useState({
|
|
3881
3847
|
onScrollCapture: nothing,
|
|
3882
3848
|
onWheelCapture: nothing,
|
|
3883
3849
|
onTouchMoveCapture: nothing
|
|
@@ -3886,11 +3852,11 @@ var RemoveScroll = React27.forwardRef(function(props, parentRef) {
|
|
|
3886
3852
|
var SideCar2 = sideCar;
|
|
3887
3853
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
3888
3854
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
3889
|
-
return
|
|
3890
|
-
|
|
3855
|
+
return React26.createElement(
|
|
3856
|
+
React26.Fragment,
|
|
3891
3857
|
null,
|
|
3892
|
-
enabled &&
|
|
3893
|
-
forwardProps ?
|
|
3858
|
+
enabled && React26.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
3859
|
+
forwardProps ? React26.cloneElement(React26.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React26.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
3894
3860
|
);
|
|
3895
3861
|
});
|
|
3896
3862
|
RemoveScroll.defaultProps = {
|
|
@@ -3904,13 +3870,13 @@ RemoveScroll.classNames = {
|
|
|
3904
3870
|
};
|
|
3905
3871
|
|
|
3906
3872
|
// node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
3907
|
-
import * as
|
|
3873
|
+
import * as React29 from "react";
|
|
3908
3874
|
|
|
3909
3875
|
// node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
3910
|
-
import * as
|
|
3876
|
+
import * as React28 from "react";
|
|
3911
3877
|
|
|
3912
3878
|
// node_modules/react-style-singleton/dist/es2015/hook.js
|
|
3913
|
-
import * as
|
|
3879
|
+
import * as React27 from "react";
|
|
3914
3880
|
|
|
3915
3881
|
// node_modules/get-nonce/dist/es2015/index.js
|
|
3916
3882
|
var currentNonce;
|
|
@@ -3974,7 +3940,7 @@ var stylesheetSingleton = function() {
|
|
|
3974
3940
|
var styleHookSingleton = function() {
|
|
3975
3941
|
var sheet = stylesheetSingleton();
|
|
3976
3942
|
return function(styles, isDynamic) {
|
|
3977
|
-
|
|
3943
|
+
React27.useEffect(function() {
|
|
3978
3944
|
sheet.add(styles);
|
|
3979
3945
|
return function() {
|
|
3980
3946
|
sheet.remove();
|
|
@@ -4048,7 +4014,7 @@ var getCurrentUseCounter = function() {
|
|
|
4048
4014
|
return isFinite(counter) ? counter : 0;
|
|
4049
4015
|
};
|
|
4050
4016
|
var useLockAttribute = function() {
|
|
4051
|
-
|
|
4017
|
+
React28.useEffect(function() {
|
|
4052
4018
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4053
4019
|
return function() {
|
|
4054
4020
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -4063,10 +4029,10 @@ var useLockAttribute = function() {
|
|
|
4063
4029
|
var RemoveScrollBar = function(_a) {
|
|
4064
4030
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
4065
4031
|
useLockAttribute();
|
|
4066
|
-
var gap =
|
|
4032
|
+
var gap = React28.useMemo(function() {
|
|
4067
4033
|
return getGapWidth(gapMode);
|
|
4068
4034
|
}, [gapMode]);
|
|
4069
|
-
return
|
|
4035
|
+
return React28.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
4070
4036
|
};
|
|
4071
4037
|
|
|
4072
4038
|
// node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -4207,16 +4173,16 @@ var generateStyle = function(id) {
|
|
|
4207
4173
|
var idCounter = 0;
|
|
4208
4174
|
var lockStack = [];
|
|
4209
4175
|
function RemoveScrollSideCar(props) {
|
|
4210
|
-
var shouldPreventQueue =
|
|
4211
|
-
var touchStartRef =
|
|
4212
|
-
var activeAxis =
|
|
4213
|
-
var id =
|
|
4214
|
-
var Style2 =
|
|
4215
|
-
var lastProps =
|
|
4216
|
-
|
|
4176
|
+
var shouldPreventQueue = React29.useRef([]);
|
|
4177
|
+
var touchStartRef = React29.useRef([0, 0]);
|
|
4178
|
+
var activeAxis = React29.useRef();
|
|
4179
|
+
var id = React29.useState(idCounter++)[0];
|
|
4180
|
+
var Style2 = React29.useState(styleSingleton)[0];
|
|
4181
|
+
var lastProps = React29.useRef(props);
|
|
4182
|
+
React29.useEffect(function() {
|
|
4217
4183
|
lastProps.current = props;
|
|
4218
4184
|
}, [props]);
|
|
4219
|
-
|
|
4185
|
+
React29.useEffect(function() {
|
|
4220
4186
|
if (props.inert) {
|
|
4221
4187
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
4222
4188
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -4232,7 +4198,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4232
4198
|
}
|
|
4233
4199
|
return;
|
|
4234
4200
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
4235
|
-
var shouldCancelEvent =
|
|
4201
|
+
var shouldCancelEvent = React29.useCallback(function(event, parent) {
|
|
4236
4202
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
4237
4203
|
return !lastProps.current.allowPinchZoom;
|
|
4238
4204
|
}
|
|
@@ -4274,7 +4240,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4274
4240
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
4275
4241
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
4276
4242
|
}, []);
|
|
4277
|
-
var shouldPrevent =
|
|
4243
|
+
var shouldPrevent = React29.useCallback(function(_event) {
|
|
4278
4244
|
var event = _event;
|
|
4279
4245
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
4280
4246
|
return;
|
|
@@ -4301,7 +4267,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4301
4267
|
}
|
|
4302
4268
|
}
|
|
4303
4269
|
}, []);
|
|
4304
|
-
var shouldCancel =
|
|
4270
|
+
var shouldCancel = React29.useCallback(function(name, delta, target, should) {
|
|
4305
4271
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
4306
4272
|
shouldPreventQueue.current.push(event);
|
|
4307
4273
|
setTimeout(function() {
|
|
@@ -4310,17 +4276,17 @@ function RemoveScrollSideCar(props) {
|
|
|
4310
4276
|
});
|
|
4311
4277
|
}, 1);
|
|
4312
4278
|
}, []);
|
|
4313
|
-
var scrollTouchStart =
|
|
4279
|
+
var scrollTouchStart = React29.useCallback(function(event) {
|
|
4314
4280
|
touchStartRef.current = getTouchXY(event);
|
|
4315
4281
|
activeAxis.current = void 0;
|
|
4316
4282
|
}, []);
|
|
4317
|
-
var scrollWheel =
|
|
4283
|
+
var scrollWheel = React29.useCallback(function(event) {
|
|
4318
4284
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4319
4285
|
}, []);
|
|
4320
|
-
var scrollTouchMove =
|
|
4286
|
+
var scrollTouchMove = React29.useCallback(function(event) {
|
|
4321
4287
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4322
4288
|
}, []);
|
|
4323
|
-
|
|
4289
|
+
React29.useEffect(function() {
|
|
4324
4290
|
lockStack.push(Style2);
|
|
4325
4291
|
props.setCallbacks({
|
|
4326
4292
|
onScrollCapture: scrollWheel,
|
|
@@ -4340,11 +4306,11 @@ function RemoveScrollSideCar(props) {
|
|
|
4340
4306
|
};
|
|
4341
4307
|
}, []);
|
|
4342
4308
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
4343
|
-
return
|
|
4344
|
-
|
|
4309
|
+
return React29.createElement(
|
|
4310
|
+
React29.Fragment,
|
|
4345
4311
|
null,
|
|
4346
|
-
inert ?
|
|
4347
|
-
removeScrollBar ?
|
|
4312
|
+
inert ? React29.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
4313
|
+
removeScrollBar ? React29.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
4348
4314
|
);
|
|
4349
4315
|
}
|
|
4350
4316
|
function getOutermostShadowParent(node) {
|
|
@@ -4363,14 +4329,14 @@ function getOutermostShadowParent(node) {
|
|
|
4363
4329
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
4364
4330
|
|
|
4365
4331
|
// node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4366
|
-
var ReactRemoveScroll =
|
|
4367
|
-
return
|
|
4332
|
+
var ReactRemoveScroll = React30.forwardRef(function(props, ref) {
|
|
4333
|
+
return React30.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
4368
4334
|
});
|
|
4369
4335
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
4370
4336
|
var Combination_default = ReactRemoveScroll;
|
|
4371
4337
|
|
|
4372
4338
|
// node_modules/@radix-ui/react-select/dist/index.mjs
|
|
4373
|
-
import { Fragment as Fragment3, jsx as
|
|
4339
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4374
4340
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
4375
4341
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
4376
4342
|
var SELECT_NAME = "Select";
|
|
@@ -4400,9 +4366,9 @@ var Select = (props) => {
|
|
|
4400
4366
|
form
|
|
4401
4367
|
} = props;
|
|
4402
4368
|
const popperScope = usePopperScope(__scopeSelect);
|
|
4403
|
-
const [trigger, setTrigger] =
|
|
4404
|
-
const [valueNode, setValueNode] =
|
|
4405
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
4369
|
+
const [trigger, setTrigger] = React31.useState(null);
|
|
4370
|
+
const [valueNode, setValueNode] = React31.useState(null);
|
|
4371
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React31.useState(false);
|
|
4406
4372
|
const direction = useDirection(dir);
|
|
4407
4373
|
const [open, setOpen] = useControllableState({
|
|
4408
4374
|
prop: openProp,
|
|
@@ -4416,11 +4382,11 @@ var Select = (props) => {
|
|
|
4416
4382
|
onChange: onValueChange,
|
|
4417
4383
|
caller: SELECT_NAME
|
|
4418
4384
|
});
|
|
4419
|
-
const triggerPointerDownPosRef =
|
|
4385
|
+
const triggerPointerDownPosRef = React31.useRef(null);
|
|
4420
4386
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
4421
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
4387
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React31.useState(/* @__PURE__ */ new Set());
|
|
4422
4388
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
4423
|
-
return /* @__PURE__ */
|
|
4389
|
+
return /* @__PURE__ */ jsx18(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs4(
|
|
4424
4390
|
SelectProvider,
|
|
4425
4391
|
{
|
|
4426
4392
|
required,
|
|
@@ -4440,14 +4406,14 @@ var Select = (props) => {
|
|
|
4440
4406
|
triggerPointerDownPosRef,
|
|
4441
4407
|
disabled,
|
|
4442
4408
|
children: [
|
|
4443
|
-
/* @__PURE__ */
|
|
4409
|
+
/* @__PURE__ */ jsx18(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx18(
|
|
4444
4410
|
SelectNativeOptionsProvider,
|
|
4445
4411
|
{
|
|
4446
4412
|
scope: props.__scopeSelect,
|
|
4447
|
-
onNativeOptionAdd:
|
|
4413
|
+
onNativeOptionAdd: React31.useCallback((option) => {
|
|
4448
4414
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
4449
4415
|
}, []),
|
|
4450
|
-
onNativeOptionRemove:
|
|
4416
|
+
onNativeOptionRemove: React31.useCallback((option) => {
|
|
4451
4417
|
setNativeOptionsSet((prev) => {
|
|
4452
4418
|
const optionsSet = new Set(prev);
|
|
4453
4419
|
optionsSet.delete(option);
|
|
@@ -4470,7 +4436,7 @@ var Select = (props) => {
|
|
|
4470
4436
|
disabled,
|
|
4471
4437
|
form,
|
|
4472
4438
|
children: [
|
|
4473
|
-
value === void 0 ? /* @__PURE__ */
|
|
4439
|
+
value === void 0 ? /* @__PURE__ */ jsx18("option", { value: "" }) : null,
|
|
4474
4440
|
Array.from(nativeOptionsSet)
|
|
4475
4441
|
]
|
|
4476
4442
|
},
|
|
@@ -4482,7 +4448,7 @@ var Select = (props) => {
|
|
|
4482
4448
|
};
|
|
4483
4449
|
Select.displayName = SELECT_NAME;
|
|
4484
4450
|
var TRIGGER_NAME = "SelectTrigger";
|
|
4485
|
-
var SelectTrigger =
|
|
4451
|
+
var SelectTrigger = React31.forwardRef(
|
|
4486
4452
|
(props, forwardedRef) => {
|
|
4487
4453
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
4488
4454
|
const popperScope = usePopperScope(__scopeSelect);
|
|
@@ -4490,7 +4456,7 @@ var SelectTrigger = React32.forwardRef(
|
|
|
4490
4456
|
const isDisabled = context.disabled || disabled;
|
|
4491
4457
|
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
4492
4458
|
const getItems = useCollection(__scopeSelect);
|
|
4493
|
-
const pointerTypeRef =
|
|
4459
|
+
const pointerTypeRef = React31.useRef("touch");
|
|
4494
4460
|
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
|
|
4495
4461
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
4496
4462
|
const currentItem = enabledItems.find((item) => item.value === context.value);
|
|
@@ -4511,8 +4477,8 @@ var SelectTrigger = React32.forwardRef(
|
|
|
4511
4477
|
};
|
|
4512
4478
|
}
|
|
4513
4479
|
};
|
|
4514
|
-
return /* @__PURE__ */
|
|
4515
|
-
|
|
4480
|
+
return /* @__PURE__ */ jsx18(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx18(
|
|
4481
|
+
Primitive.button,
|
|
4516
4482
|
{
|
|
4517
4483
|
type: "button",
|
|
4518
4484
|
role: "combobox",
|
|
@@ -4560,7 +4526,7 @@ var SelectTrigger = React32.forwardRef(
|
|
|
4560
4526
|
);
|
|
4561
4527
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
4562
4528
|
var VALUE_NAME = "SelectValue";
|
|
4563
|
-
var SelectValue =
|
|
4529
|
+
var SelectValue = React31.forwardRef(
|
|
4564
4530
|
(props, forwardedRef) => {
|
|
4565
4531
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
4566
4532
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
@@ -4570,55 +4536,55 @@ var SelectValue = React32.forwardRef(
|
|
|
4570
4536
|
useLayoutEffect2(() => {
|
|
4571
4537
|
onValueNodeHasChildrenChange(hasChildren);
|
|
4572
4538
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
4573
|
-
return /* @__PURE__ */
|
|
4574
|
-
|
|
4539
|
+
return /* @__PURE__ */ jsx18(
|
|
4540
|
+
Primitive.span,
|
|
4575
4541
|
{
|
|
4576
4542
|
...valueProps,
|
|
4577
4543
|
ref: composedRefs,
|
|
4578
4544
|
style: { pointerEvents: "none" },
|
|
4579
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */
|
|
4545
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx18(Fragment3, { children: placeholder }) : children
|
|
4580
4546
|
}
|
|
4581
4547
|
);
|
|
4582
4548
|
}
|
|
4583
4549
|
);
|
|
4584
4550
|
SelectValue.displayName = VALUE_NAME;
|
|
4585
4551
|
var ICON_NAME = "SelectIcon";
|
|
4586
|
-
var SelectIcon =
|
|
4552
|
+
var SelectIcon = React31.forwardRef(
|
|
4587
4553
|
(props, forwardedRef) => {
|
|
4588
4554
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
4589
|
-
return /* @__PURE__ */
|
|
4555
|
+
return /* @__PURE__ */ jsx18(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
|
4590
4556
|
}
|
|
4591
4557
|
);
|
|
4592
4558
|
SelectIcon.displayName = ICON_NAME;
|
|
4593
4559
|
var PORTAL_NAME2 = "SelectPortal";
|
|
4594
4560
|
var SelectPortal = (props) => {
|
|
4595
|
-
return /* @__PURE__ */
|
|
4561
|
+
return /* @__PURE__ */ jsx18(Portal, { asChild: true, ...props });
|
|
4596
4562
|
};
|
|
4597
4563
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
4598
4564
|
var CONTENT_NAME2 = "SelectContent";
|
|
4599
|
-
var SelectContent =
|
|
4565
|
+
var SelectContent = React31.forwardRef(
|
|
4600
4566
|
(props, forwardedRef) => {
|
|
4601
4567
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
4602
|
-
const [fragment, setFragment] =
|
|
4568
|
+
const [fragment, setFragment] = React31.useState();
|
|
4603
4569
|
useLayoutEffect2(() => {
|
|
4604
4570
|
setFragment(new DocumentFragment());
|
|
4605
4571
|
}, []);
|
|
4606
4572
|
if (!context.open) {
|
|
4607
4573
|
const frag = fragment;
|
|
4608
|
-
return frag ?
|
|
4609
|
-
/* @__PURE__ */
|
|
4574
|
+
return frag ? ReactDOM4.createPortal(
|
|
4575
|
+
/* @__PURE__ */ jsx18(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx18(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx18("div", { children: props.children }) }) }),
|
|
4610
4576
|
frag
|
|
4611
4577
|
) : null;
|
|
4612
4578
|
}
|
|
4613
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ jsx18(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
4614
4580
|
}
|
|
4615
4581
|
);
|
|
4616
4582
|
SelectContent.displayName = CONTENT_NAME2;
|
|
4617
4583
|
var CONTENT_MARGIN = 10;
|
|
4618
4584
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
4619
4585
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
4620
|
-
var Slot2 =
|
|
4621
|
-
var SelectContentImpl =
|
|
4586
|
+
var Slot2 = createSlot4("SelectContent.RemoveScroll");
|
|
4587
|
+
var SelectContentImpl = React31.forwardRef(
|
|
4622
4588
|
(props, forwardedRef) => {
|
|
4623
4589
|
const {
|
|
4624
4590
|
__scopeSelect,
|
|
@@ -4642,21 +4608,21 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4642
4608
|
...contentProps
|
|
4643
4609
|
} = props;
|
|
4644
4610
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
4645
|
-
const [content, setContent] =
|
|
4646
|
-
const [viewport, setViewport] =
|
|
4611
|
+
const [content, setContent] = React31.useState(null);
|
|
4612
|
+
const [viewport, setViewport] = React31.useState(null);
|
|
4647
4613
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
4648
|
-
const [selectedItem, setSelectedItem] =
|
|
4649
|
-
const [selectedItemText, setSelectedItemText] =
|
|
4614
|
+
const [selectedItem, setSelectedItem] = React31.useState(null);
|
|
4615
|
+
const [selectedItemText, setSelectedItemText] = React31.useState(
|
|
4650
4616
|
null
|
|
4651
4617
|
);
|
|
4652
4618
|
const getItems = useCollection(__scopeSelect);
|
|
4653
|
-
const [isPositioned, setIsPositioned] =
|
|
4654
|
-
const firstValidItemFoundRef =
|
|
4655
|
-
|
|
4619
|
+
const [isPositioned, setIsPositioned] = React31.useState(false);
|
|
4620
|
+
const firstValidItemFoundRef = React31.useRef(false);
|
|
4621
|
+
React31.useEffect(() => {
|
|
4656
4622
|
if (content) return hideOthers(content);
|
|
4657
4623
|
}, [content]);
|
|
4658
4624
|
useFocusGuards();
|
|
4659
|
-
const focusFirst2 =
|
|
4625
|
+
const focusFirst2 = React31.useCallback(
|
|
4660
4626
|
(candidates) => {
|
|
4661
4627
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
4662
4628
|
const [lastItem] = restItems.slice(-1);
|
|
@@ -4672,17 +4638,17 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4672
4638
|
},
|
|
4673
4639
|
[getItems, viewport]
|
|
4674
4640
|
);
|
|
4675
|
-
const focusSelectedItem =
|
|
4641
|
+
const focusSelectedItem = React31.useCallback(
|
|
4676
4642
|
() => focusFirst2([selectedItem, content]),
|
|
4677
4643
|
[focusFirst2, selectedItem, content]
|
|
4678
4644
|
);
|
|
4679
|
-
|
|
4645
|
+
React31.useEffect(() => {
|
|
4680
4646
|
if (isPositioned) {
|
|
4681
4647
|
focusSelectedItem();
|
|
4682
4648
|
}
|
|
4683
4649
|
}, [isPositioned, focusSelectedItem]);
|
|
4684
4650
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
4685
|
-
|
|
4651
|
+
React31.useEffect(() => {
|
|
4686
4652
|
if (content) {
|
|
4687
4653
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
4688
4654
|
const handlePointerMove = (event) => {
|
|
@@ -4712,7 +4678,7 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4712
4678
|
};
|
|
4713
4679
|
}
|
|
4714
4680
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
4715
|
-
|
|
4681
|
+
React31.useEffect(() => {
|
|
4716
4682
|
const close = () => onOpenChange(false);
|
|
4717
4683
|
window.addEventListener("blur", close);
|
|
4718
4684
|
window.addEventListener("resize", close);
|
|
@@ -4729,7 +4695,7 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4729
4695
|
setTimeout(() => nextItem.ref.current.focus());
|
|
4730
4696
|
}
|
|
4731
4697
|
});
|
|
4732
|
-
const itemRefCallback =
|
|
4698
|
+
const itemRefCallback = React31.useCallback(
|
|
4733
4699
|
(node, value, disabled) => {
|
|
4734
4700
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4735
4701
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -4740,8 +4706,8 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4740
4706
|
},
|
|
4741
4707
|
[context.value]
|
|
4742
4708
|
);
|
|
4743
|
-
const handleItemLeave =
|
|
4744
|
-
const itemTextRefCallback =
|
|
4709
|
+
const handleItemLeave = React31.useCallback(() => content?.focus(), [content]);
|
|
4710
|
+
const itemTextRefCallback = React31.useCallback(
|
|
4745
4711
|
(node, value, disabled) => {
|
|
4746
4712
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4747
4713
|
const isSelectedItem = context.value !== void 0 && context.value === value;
|
|
@@ -4764,7 +4730,7 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4764
4730
|
hideWhenDetached,
|
|
4765
4731
|
avoidCollisions
|
|
4766
4732
|
} : {};
|
|
4767
|
-
return /* @__PURE__ */
|
|
4733
|
+
return /* @__PURE__ */ jsx18(
|
|
4768
4734
|
SelectContentProvider,
|
|
4769
4735
|
{
|
|
4770
4736
|
scope: __scopeSelect,
|
|
@@ -4780,7 +4746,7 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4780
4746
|
position,
|
|
4781
4747
|
isPositioned,
|
|
4782
4748
|
searchRef,
|
|
4783
|
-
children: /* @__PURE__ */
|
|
4749
|
+
children: /* @__PURE__ */ jsx18(Combination_default, { as: Slot2, allowPinchZoom: true, children: /* @__PURE__ */ jsx18(
|
|
4784
4750
|
FocusScope,
|
|
4785
4751
|
{
|
|
4786
4752
|
asChild: true,
|
|
@@ -4792,7 +4758,7 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4792
4758
|
context.trigger?.focus({ preventScroll: true });
|
|
4793
4759
|
event.preventDefault();
|
|
4794
4760
|
}),
|
|
4795
|
-
children: /* @__PURE__ */
|
|
4761
|
+
children: /* @__PURE__ */ jsx18(
|
|
4796
4762
|
DismissableLayer,
|
|
4797
4763
|
{
|
|
4798
4764
|
asChild: true,
|
|
@@ -4801,7 +4767,7 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4801
4767
|
onPointerDownOutside,
|
|
4802
4768
|
onFocusOutside: (event) => event.preventDefault(),
|
|
4803
4769
|
onDismiss: () => context.onOpenChange(false),
|
|
4804
|
-
children: /* @__PURE__ */
|
|
4770
|
+
children: /* @__PURE__ */ jsx18(
|
|
4805
4771
|
SelectPosition,
|
|
4806
4772
|
{
|
|
4807
4773
|
role: "listbox",
|
|
@@ -4852,18 +4818,18 @@ var SelectContentImpl = React32.forwardRef(
|
|
|
4852
4818
|
);
|
|
4853
4819
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
4854
4820
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
4855
|
-
var SelectItemAlignedPosition =
|
|
4821
|
+
var SelectItemAlignedPosition = React31.forwardRef((props, forwardedRef) => {
|
|
4856
4822
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
4857
4823
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
4858
4824
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
4859
|
-
const [contentWrapper, setContentWrapper] =
|
|
4860
|
-
const [content, setContent] =
|
|
4825
|
+
const [contentWrapper, setContentWrapper] = React31.useState(null);
|
|
4826
|
+
const [content, setContent] = React31.useState(null);
|
|
4861
4827
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
4862
4828
|
const getItems = useCollection(__scopeSelect);
|
|
4863
|
-
const shouldExpandOnScrollRef =
|
|
4864
|
-
const shouldRepositionRef =
|
|
4829
|
+
const shouldExpandOnScrollRef = React31.useRef(false);
|
|
4830
|
+
const shouldRepositionRef = React31.useRef(true);
|
|
4865
4831
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
4866
|
-
const position =
|
|
4832
|
+
const position = React31.useCallback(() => {
|
|
4867
4833
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
4868
4834
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
4869
4835
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -4963,11 +4929,11 @@ var SelectItemAlignedPosition = React32.forwardRef((props, forwardedRef) => {
|
|
|
4963
4929
|
onPlaced
|
|
4964
4930
|
]);
|
|
4965
4931
|
useLayoutEffect2(() => position(), [position]);
|
|
4966
|
-
const [contentZIndex, setContentZIndex] =
|
|
4932
|
+
const [contentZIndex, setContentZIndex] = React31.useState();
|
|
4967
4933
|
useLayoutEffect2(() => {
|
|
4968
4934
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
4969
4935
|
}, [content]);
|
|
4970
|
-
const handleScrollButtonChange =
|
|
4936
|
+
const handleScrollButtonChange = React31.useCallback(
|
|
4971
4937
|
(node) => {
|
|
4972
4938
|
if (node && shouldRepositionRef.current === true) {
|
|
4973
4939
|
position();
|
|
@@ -4977,14 +4943,14 @@ var SelectItemAlignedPosition = React32.forwardRef((props, forwardedRef) => {
|
|
|
4977
4943
|
},
|
|
4978
4944
|
[position, focusSelectedItem]
|
|
4979
4945
|
);
|
|
4980
|
-
return /* @__PURE__ */
|
|
4946
|
+
return /* @__PURE__ */ jsx18(
|
|
4981
4947
|
SelectViewportProvider,
|
|
4982
4948
|
{
|
|
4983
4949
|
scope: __scopeSelect,
|
|
4984
4950
|
contentWrapper,
|
|
4985
4951
|
shouldExpandOnScrollRef,
|
|
4986
4952
|
onScrollButtonChange: handleScrollButtonChange,
|
|
4987
|
-
children: /* @__PURE__ */
|
|
4953
|
+
children: /* @__PURE__ */ jsx18(
|
|
4988
4954
|
"div",
|
|
4989
4955
|
{
|
|
4990
4956
|
ref: setContentWrapper,
|
|
@@ -4994,8 +4960,8 @@ var SelectItemAlignedPosition = React32.forwardRef((props, forwardedRef) => {
|
|
|
4994
4960
|
position: "fixed",
|
|
4995
4961
|
zIndex: contentZIndex
|
|
4996
4962
|
},
|
|
4997
|
-
children: /* @__PURE__ */
|
|
4998
|
-
|
|
4963
|
+
children: /* @__PURE__ */ jsx18(
|
|
4964
|
+
Primitive.div,
|
|
4999
4965
|
{
|
|
5000
4966
|
...popperProps,
|
|
5001
4967
|
ref: composedRefs,
|
|
@@ -5016,7 +4982,7 @@ var SelectItemAlignedPosition = React32.forwardRef((props, forwardedRef) => {
|
|
|
5016
4982
|
});
|
|
5017
4983
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
5018
4984
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
5019
|
-
var SelectPopperPosition =
|
|
4985
|
+
var SelectPopperPosition = React31.forwardRef((props, forwardedRef) => {
|
|
5020
4986
|
const {
|
|
5021
4987
|
__scopeSelect,
|
|
5022
4988
|
align = "start",
|
|
@@ -5024,7 +4990,7 @@ var SelectPopperPosition = React32.forwardRef((props, forwardedRef) => {
|
|
|
5024
4990
|
...popperProps
|
|
5025
4991
|
} = props;
|
|
5026
4992
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5027
|
-
return /* @__PURE__ */
|
|
4993
|
+
return /* @__PURE__ */ jsx18(
|
|
5028
4994
|
Content,
|
|
5029
4995
|
{
|
|
5030
4996
|
...popperScope,
|
|
@@ -5051,15 +5017,15 @@ var SelectPopperPosition = React32.forwardRef((props, forwardedRef) => {
|
|
|
5051
5017
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
5052
5018
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
5053
5019
|
var VIEWPORT_NAME = "SelectViewport";
|
|
5054
|
-
var SelectViewport =
|
|
5020
|
+
var SelectViewport = React31.forwardRef(
|
|
5055
5021
|
(props, forwardedRef) => {
|
|
5056
5022
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
5057
5023
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
5058
5024
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
5059
5025
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
5060
|
-
const prevScrollTopRef =
|
|
5026
|
+
const prevScrollTopRef = React31.useRef(0);
|
|
5061
5027
|
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
5062
|
-
/* @__PURE__ */
|
|
5028
|
+
/* @__PURE__ */ jsx18(
|
|
5063
5029
|
"style",
|
|
5064
5030
|
{
|
|
5065
5031
|
dangerouslySetInnerHTML: {
|
|
@@ -5068,8 +5034,8 @@ var SelectViewport = React32.forwardRef(
|
|
|
5068
5034
|
nonce
|
|
5069
5035
|
}
|
|
5070
5036
|
),
|
|
5071
|
-
/* @__PURE__ */
|
|
5072
|
-
|
|
5037
|
+
/* @__PURE__ */ jsx18(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx18(
|
|
5038
|
+
Primitive.div,
|
|
5073
5039
|
{
|
|
5074
5040
|
"data-radix-select-viewport": "",
|
|
5075
5041
|
role: "presentation",
|
|
@@ -5120,26 +5086,26 @@ var SelectViewport = React32.forwardRef(
|
|
|
5120
5086
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
5121
5087
|
var GROUP_NAME = "SelectGroup";
|
|
5122
5088
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
5123
|
-
var SelectGroup =
|
|
5089
|
+
var SelectGroup = React31.forwardRef(
|
|
5124
5090
|
(props, forwardedRef) => {
|
|
5125
5091
|
const { __scopeSelect, ...groupProps } = props;
|
|
5126
5092
|
const groupId = useId();
|
|
5127
|
-
return /* @__PURE__ */
|
|
5093
|
+
return /* @__PURE__ */ jsx18(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx18(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
5128
5094
|
}
|
|
5129
5095
|
);
|
|
5130
5096
|
SelectGroup.displayName = GROUP_NAME;
|
|
5131
5097
|
var LABEL_NAME = "SelectLabel";
|
|
5132
|
-
var SelectLabel =
|
|
5098
|
+
var SelectLabel = React31.forwardRef(
|
|
5133
5099
|
(props, forwardedRef) => {
|
|
5134
5100
|
const { __scopeSelect, ...labelProps } = props;
|
|
5135
5101
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
5136
|
-
return /* @__PURE__ */
|
|
5102
|
+
return /* @__PURE__ */ jsx18(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
5137
5103
|
}
|
|
5138
5104
|
);
|
|
5139
5105
|
SelectLabel.displayName = LABEL_NAME;
|
|
5140
5106
|
var ITEM_NAME = "SelectItem";
|
|
5141
5107
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
5142
|
-
var SelectItem =
|
|
5108
|
+
var SelectItem = React31.forwardRef(
|
|
5143
5109
|
(props, forwardedRef) => {
|
|
5144
5110
|
const {
|
|
5145
5111
|
__scopeSelect,
|
|
@@ -5151,14 +5117,14 @@ var SelectItem = React32.forwardRef(
|
|
|
5151
5117
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
5152
5118
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
5153
5119
|
const isSelected = context.value === value;
|
|
5154
|
-
const [textValue, setTextValue] =
|
|
5155
|
-
const [isFocused, setIsFocused] =
|
|
5120
|
+
const [textValue, setTextValue] = React31.useState(textValueProp ?? "");
|
|
5121
|
+
const [isFocused, setIsFocused] = React31.useState(false);
|
|
5156
5122
|
const composedRefs = useComposedRefs(
|
|
5157
5123
|
forwardedRef,
|
|
5158
5124
|
(node) => contentContext.itemRefCallback?.(node, value, disabled)
|
|
5159
5125
|
);
|
|
5160
5126
|
const textId = useId();
|
|
5161
|
-
const pointerTypeRef =
|
|
5127
|
+
const pointerTypeRef = React31.useRef("touch");
|
|
5162
5128
|
const handleSelect = () => {
|
|
5163
5129
|
if (!disabled) {
|
|
5164
5130
|
context.onValueChange(value);
|
|
@@ -5170,7 +5136,7 @@ var SelectItem = React32.forwardRef(
|
|
|
5170
5136
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
5171
5137
|
);
|
|
5172
5138
|
}
|
|
5173
|
-
return /* @__PURE__ */
|
|
5139
|
+
return /* @__PURE__ */ jsx18(
|
|
5174
5140
|
SelectItemContextProvider,
|
|
5175
5141
|
{
|
|
5176
5142
|
scope: __scopeSelect,
|
|
@@ -5178,18 +5144,18 @@ var SelectItem = React32.forwardRef(
|
|
|
5178
5144
|
disabled,
|
|
5179
5145
|
textId,
|
|
5180
5146
|
isSelected,
|
|
5181
|
-
onItemTextChange:
|
|
5147
|
+
onItemTextChange: React31.useCallback((node) => {
|
|
5182
5148
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
5183
5149
|
}, []),
|
|
5184
|
-
children: /* @__PURE__ */
|
|
5150
|
+
children: /* @__PURE__ */ jsx18(
|
|
5185
5151
|
Collection.ItemSlot,
|
|
5186
5152
|
{
|
|
5187
5153
|
scope: __scopeSelect,
|
|
5188
5154
|
value,
|
|
5189
5155
|
disabled,
|
|
5190
5156
|
textValue,
|
|
5191
|
-
children: /* @__PURE__ */
|
|
5192
|
-
|
|
5157
|
+
children: /* @__PURE__ */ jsx18(
|
|
5158
|
+
Primitive.div,
|
|
5193
5159
|
{
|
|
5194
5160
|
role: "option",
|
|
5195
5161
|
"aria-labelledby": textId,
|
|
@@ -5241,14 +5207,14 @@ var SelectItem = React32.forwardRef(
|
|
|
5241
5207
|
);
|
|
5242
5208
|
SelectItem.displayName = ITEM_NAME;
|
|
5243
5209
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
5244
|
-
var SelectItemText =
|
|
5210
|
+
var SelectItemText = React31.forwardRef(
|
|
5245
5211
|
(props, forwardedRef) => {
|
|
5246
5212
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
5247
5213
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5248
5214
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5249
5215
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5250
5216
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5251
|
-
const [itemTextNode, setItemTextNode] =
|
|
5217
|
+
const [itemTextNode, setItemTextNode] = React31.useState(null);
|
|
5252
5218
|
const composedRefs = useComposedRefs(
|
|
5253
5219
|
forwardedRef,
|
|
5254
5220
|
(node) => setItemTextNode(node),
|
|
@@ -5256,8 +5222,8 @@ var SelectItemText = React32.forwardRef(
|
|
|
5256
5222
|
(node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)
|
|
5257
5223
|
);
|
|
5258
5224
|
const textContent = itemTextNode?.textContent;
|
|
5259
|
-
const nativeOption =
|
|
5260
|
-
() => /* @__PURE__ */
|
|
5225
|
+
const nativeOption = React31.useMemo(
|
|
5226
|
+
() => /* @__PURE__ */ jsx18("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
5261
5227
|
[itemContext.disabled, itemContext.value, textContent]
|
|
5262
5228
|
);
|
|
5263
5229
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
@@ -5266,26 +5232,26 @@ var SelectItemText = React32.forwardRef(
|
|
|
5266
5232
|
return () => onNativeOptionRemove(nativeOption);
|
|
5267
5233
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
5268
5234
|
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
5269
|
-
/* @__PURE__ */
|
|
5270
|
-
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ?
|
|
5235
|
+
/* @__PURE__ */ jsx18(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
5236
|
+
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
5271
5237
|
] });
|
|
5272
5238
|
}
|
|
5273
5239
|
);
|
|
5274
5240
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
5275
5241
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
5276
|
-
var SelectItemIndicator =
|
|
5242
|
+
var SelectItemIndicator = React31.forwardRef(
|
|
5277
5243
|
(props, forwardedRef) => {
|
|
5278
5244
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
5279
5245
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
5280
|
-
return itemContext.isSelected ? /* @__PURE__ */
|
|
5246
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx18(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
5281
5247
|
}
|
|
5282
5248
|
);
|
|
5283
5249
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
5284
5250
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
5285
|
-
var SelectScrollUpButton =
|
|
5251
|
+
var SelectScrollUpButton = React31.forwardRef((props, forwardedRef) => {
|
|
5286
5252
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5287
5253
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5288
|
-
const [canScrollUp, setCanScrollUp] =
|
|
5254
|
+
const [canScrollUp, setCanScrollUp] = React31.useState(false);
|
|
5289
5255
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5290
5256
|
useLayoutEffect2(() => {
|
|
5291
5257
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -5300,7 +5266,7 @@ var SelectScrollUpButton = React32.forwardRef((props, forwardedRef) => {
|
|
|
5300
5266
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
5301
5267
|
}
|
|
5302
5268
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5303
|
-
return canScrollUp ? /* @__PURE__ */
|
|
5269
|
+
return canScrollUp ? /* @__PURE__ */ jsx18(
|
|
5304
5270
|
SelectScrollButtonImpl,
|
|
5305
5271
|
{
|
|
5306
5272
|
...props,
|
|
@@ -5316,10 +5282,10 @@ var SelectScrollUpButton = React32.forwardRef((props, forwardedRef) => {
|
|
|
5316
5282
|
});
|
|
5317
5283
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
5318
5284
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
5319
|
-
var SelectScrollDownButton =
|
|
5285
|
+
var SelectScrollDownButton = React31.forwardRef((props, forwardedRef) => {
|
|
5320
5286
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5321
5287
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5322
|
-
const [canScrollDown, setCanScrollDown] =
|
|
5288
|
+
const [canScrollDown, setCanScrollDown] = React31.useState(false);
|
|
5323
5289
|
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5324
5290
|
useLayoutEffect2(() => {
|
|
5325
5291
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
@@ -5335,7 +5301,7 @@ var SelectScrollDownButton = React32.forwardRef((props, forwardedRef) => {
|
|
|
5335
5301
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
5336
5302
|
}
|
|
5337
5303
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5338
|
-
return canScrollDown ? /* @__PURE__ */
|
|
5304
|
+
return canScrollDown ? /* @__PURE__ */ jsx18(
|
|
5339
5305
|
SelectScrollButtonImpl,
|
|
5340
5306
|
{
|
|
5341
5307
|
...props,
|
|
@@ -5350,26 +5316,26 @@ var SelectScrollDownButton = React32.forwardRef((props, forwardedRef) => {
|
|
|
5350
5316
|
) : null;
|
|
5351
5317
|
});
|
|
5352
5318
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
5353
|
-
var SelectScrollButtonImpl =
|
|
5319
|
+
var SelectScrollButtonImpl = React31.forwardRef((props, forwardedRef) => {
|
|
5354
5320
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
5355
5321
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
5356
|
-
const autoScrollTimerRef =
|
|
5322
|
+
const autoScrollTimerRef = React31.useRef(null);
|
|
5357
5323
|
const getItems = useCollection(__scopeSelect);
|
|
5358
|
-
const clearAutoScrollTimer =
|
|
5324
|
+
const clearAutoScrollTimer = React31.useCallback(() => {
|
|
5359
5325
|
if (autoScrollTimerRef.current !== null) {
|
|
5360
5326
|
window.clearInterval(autoScrollTimerRef.current);
|
|
5361
5327
|
autoScrollTimerRef.current = null;
|
|
5362
5328
|
}
|
|
5363
5329
|
}, []);
|
|
5364
|
-
|
|
5330
|
+
React31.useEffect(() => {
|
|
5365
5331
|
return () => clearAutoScrollTimer();
|
|
5366
5332
|
}, [clearAutoScrollTimer]);
|
|
5367
5333
|
useLayoutEffect2(() => {
|
|
5368
5334
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
5369
5335
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
5370
5336
|
}, [getItems]);
|
|
5371
|
-
return /* @__PURE__ */
|
|
5372
|
-
|
|
5337
|
+
return /* @__PURE__ */ jsx18(
|
|
5338
|
+
Primitive.div,
|
|
5373
5339
|
{
|
|
5374
5340
|
"aria-hidden": true,
|
|
5375
5341
|
...scrollIndicatorProps,
|
|
@@ -5393,31 +5359,31 @@ var SelectScrollButtonImpl = React32.forwardRef((props, forwardedRef) => {
|
|
|
5393
5359
|
);
|
|
5394
5360
|
});
|
|
5395
5361
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
5396
|
-
var SelectSeparator =
|
|
5362
|
+
var SelectSeparator = React31.forwardRef(
|
|
5397
5363
|
(props, forwardedRef) => {
|
|
5398
5364
|
const { __scopeSelect, ...separatorProps } = props;
|
|
5399
|
-
return /* @__PURE__ */
|
|
5365
|
+
return /* @__PURE__ */ jsx18(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
5400
5366
|
}
|
|
5401
5367
|
);
|
|
5402
5368
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
5403
5369
|
var ARROW_NAME2 = "SelectArrow";
|
|
5404
|
-
var SelectArrow =
|
|
5370
|
+
var SelectArrow = React31.forwardRef(
|
|
5405
5371
|
(props, forwardedRef) => {
|
|
5406
5372
|
const { __scopeSelect, ...arrowProps } = props;
|
|
5407
5373
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5408
5374
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
5409
5375
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
5410
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */
|
|
5376
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx18(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
5411
5377
|
}
|
|
5412
5378
|
);
|
|
5413
5379
|
SelectArrow.displayName = ARROW_NAME2;
|
|
5414
5380
|
var BUBBLE_INPUT_NAME = "SelectBubbleInput";
|
|
5415
|
-
var SelectBubbleInput =
|
|
5381
|
+
var SelectBubbleInput = React31.forwardRef(
|
|
5416
5382
|
({ __scopeSelect, value, ...props }, forwardedRef) => {
|
|
5417
|
-
const ref =
|
|
5383
|
+
const ref = React31.useRef(null);
|
|
5418
5384
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
5419
5385
|
const prevValue = usePrevious(value);
|
|
5420
|
-
|
|
5386
|
+
React31.useEffect(() => {
|
|
5421
5387
|
const select = ref.current;
|
|
5422
5388
|
if (!select) return;
|
|
5423
5389
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
@@ -5432,8 +5398,8 @@ var SelectBubbleInput = React32.forwardRef(
|
|
|
5432
5398
|
select.dispatchEvent(event);
|
|
5433
5399
|
}
|
|
5434
5400
|
}, [prevValue, value]);
|
|
5435
|
-
return /* @__PURE__ */
|
|
5436
|
-
|
|
5401
|
+
return /* @__PURE__ */ jsx18(
|
|
5402
|
+
Primitive.select,
|
|
5437
5403
|
{
|
|
5438
5404
|
...props,
|
|
5439
5405
|
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style },
|
|
@@ -5449,9 +5415,9 @@ function shouldShowPlaceholder(value) {
|
|
|
5449
5415
|
}
|
|
5450
5416
|
function useTypeaheadSearch(onSearchChange) {
|
|
5451
5417
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
5452
|
-
const searchRef =
|
|
5453
|
-
const timerRef =
|
|
5454
|
-
const handleTypeaheadSearch =
|
|
5418
|
+
const searchRef = React31.useRef("");
|
|
5419
|
+
const timerRef = React31.useRef(0);
|
|
5420
|
+
const handleTypeaheadSearch = React31.useCallback(
|
|
5455
5421
|
(key) => {
|
|
5456
5422
|
const search = searchRef.current + key;
|
|
5457
5423
|
handleSearchChange(search);
|
|
@@ -5463,11 +5429,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
5463
5429
|
},
|
|
5464
5430
|
[handleSearchChange]
|
|
5465
5431
|
);
|
|
5466
|
-
const resetTypeahead =
|
|
5432
|
+
const resetTypeahead = React31.useCallback(() => {
|
|
5467
5433
|
searchRef.current = "";
|
|
5468
5434
|
window.clearTimeout(timerRef.current);
|
|
5469
5435
|
}, []);
|
|
5470
|
-
|
|
5436
|
+
React31.useEffect(() => {
|
|
5471
5437
|
return () => window.clearTimeout(timerRef.current);
|
|
5472
5438
|
}, []);
|
|
5473
5439
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -5502,16 +5468,16 @@ var ScrollDownButton = SelectScrollDownButton;
|
|
|
5502
5468
|
|
|
5503
5469
|
// shadcn/select.tsx
|
|
5504
5470
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5505
|
-
import { jsx as
|
|
5471
|
+
import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
5506
5472
|
function Select2({
|
|
5507
5473
|
...props
|
|
5508
5474
|
}) {
|
|
5509
|
-
return /* @__PURE__ */
|
|
5475
|
+
return /* @__PURE__ */ jsx19(Root23, { "data-slot": "select", ...props });
|
|
5510
5476
|
}
|
|
5511
5477
|
function SelectValue2({
|
|
5512
5478
|
...props
|
|
5513
5479
|
}) {
|
|
5514
|
-
return /* @__PURE__ */
|
|
5480
|
+
return /* @__PURE__ */ jsx19(Value, { "data-slot": "select-value", ...props });
|
|
5515
5481
|
}
|
|
5516
5482
|
function SelectTrigger2({
|
|
5517
5483
|
className,
|
|
@@ -5531,7 +5497,7 @@ function SelectTrigger2({
|
|
|
5531
5497
|
...props,
|
|
5532
5498
|
children: [
|
|
5533
5499
|
children,
|
|
5534
|
-
/* @__PURE__ */
|
|
5500
|
+
/* @__PURE__ */ jsx19(Icon, { asChild: true, children: /* @__PURE__ */ jsx19(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
5535
5501
|
]
|
|
5536
5502
|
}
|
|
5537
5503
|
);
|
|
@@ -5543,7 +5509,7 @@ function SelectContent2({
|
|
|
5543
5509
|
align = "center",
|
|
5544
5510
|
...props
|
|
5545
5511
|
}) {
|
|
5546
|
-
return /* @__PURE__ */
|
|
5512
|
+
return /* @__PURE__ */ jsx19(Portal2, { children: /* @__PURE__ */ jsxs5(
|
|
5547
5513
|
Content2,
|
|
5548
5514
|
{
|
|
5549
5515
|
"data-slot": "select-content",
|
|
@@ -5556,8 +5522,8 @@ function SelectContent2({
|
|
|
5556
5522
|
align,
|
|
5557
5523
|
...props,
|
|
5558
5524
|
children: [
|
|
5559
|
-
/* @__PURE__ */
|
|
5560
|
-
/* @__PURE__ */
|
|
5525
|
+
/* @__PURE__ */ jsx19(SelectScrollUpButton2, {}),
|
|
5526
|
+
/* @__PURE__ */ jsx19(
|
|
5561
5527
|
Viewport,
|
|
5562
5528
|
{
|
|
5563
5529
|
className: cn(
|
|
@@ -5567,7 +5533,7 @@ function SelectContent2({
|
|
|
5567
5533
|
children
|
|
5568
5534
|
}
|
|
5569
5535
|
),
|
|
5570
|
-
/* @__PURE__ */
|
|
5536
|
+
/* @__PURE__ */ jsx19(SelectScrollDownButton2, {})
|
|
5571
5537
|
]
|
|
5572
5538
|
}
|
|
5573
5539
|
) });
|
|
@@ -5587,15 +5553,15 @@ function SelectItem2({
|
|
|
5587
5553
|
),
|
|
5588
5554
|
...props,
|
|
5589
5555
|
children: [
|
|
5590
|
-
/* @__PURE__ */
|
|
5556
|
+
/* @__PURE__ */ jsx19(
|
|
5591
5557
|
"span",
|
|
5592
5558
|
{
|
|
5593
5559
|
"data-slot": "select-item-indicator",
|
|
5594
5560
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
5595
|
-
children: /* @__PURE__ */
|
|
5561
|
+
children: /* @__PURE__ */ jsx19(ItemIndicator, { children: /* @__PURE__ */ jsx19(CheckIcon, { className: "size-4" }) })
|
|
5596
5562
|
}
|
|
5597
5563
|
),
|
|
5598
|
-
/* @__PURE__ */
|
|
5564
|
+
/* @__PURE__ */ jsx19(ItemText, { children })
|
|
5599
5565
|
]
|
|
5600
5566
|
}
|
|
5601
5567
|
);
|
|
@@ -5604,7 +5570,7 @@ function SelectScrollUpButton2({
|
|
|
5604
5570
|
className,
|
|
5605
5571
|
...props
|
|
5606
5572
|
}) {
|
|
5607
|
-
return /* @__PURE__ */
|
|
5573
|
+
return /* @__PURE__ */ jsx19(
|
|
5608
5574
|
ScrollUpButton,
|
|
5609
5575
|
{
|
|
5610
5576
|
"data-slot": "select-scroll-up-button",
|
|
@@ -5613,7 +5579,7 @@ function SelectScrollUpButton2({
|
|
|
5613
5579
|
className
|
|
5614
5580
|
),
|
|
5615
5581
|
...props,
|
|
5616
|
-
children: /* @__PURE__ */
|
|
5582
|
+
children: /* @__PURE__ */ jsx19(ChevronUpIcon, { className: "size-4" })
|
|
5617
5583
|
}
|
|
5618
5584
|
);
|
|
5619
5585
|
}
|
|
@@ -5621,7 +5587,7 @@ function SelectScrollDownButton2({
|
|
|
5621
5587
|
className,
|
|
5622
5588
|
...props
|
|
5623
5589
|
}) {
|
|
5624
|
-
return /* @__PURE__ */
|
|
5590
|
+
return /* @__PURE__ */ jsx19(
|
|
5625
5591
|
ScrollDownButton,
|
|
5626
5592
|
{
|
|
5627
5593
|
"data-slot": "select-scroll-down-button",
|
|
@@ -5630,13 +5596,13 @@ function SelectScrollDownButton2({
|
|
|
5630
5596
|
className
|
|
5631
5597
|
),
|
|
5632
5598
|
...props,
|
|
5633
|
-
children: /* @__PURE__ */
|
|
5599
|
+
children: /* @__PURE__ */ jsx19(ChevronDownIcon, { className: "size-4" })
|
|
5634
5600
|
}
|
|
5635
5601
|
);
|
|
5636
5602
|
}
|
|
5637
5603
|
|
|
5638
5604
|
// fields/EntryBoundTextField.tsx
|
|
5639
|
-
import { jsx as
|
|
5605
|
+
import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
5640
5606
|
function isEntryBoundValue(value) {
|
|
5641
5607
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
5642
5608
|
}
|
|
@@ -5693,8 +5659,8 @@ function EntryBoundTextField({
|
|
|
5693
5659
|
const hasEntries = entryNames.length > 0;
|
|
5694
5660
|
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
|
|
5695
5661
|
/* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between", children: [
|
|
5696
|
-
/* @__PURE__ */
|
|
5697
|
-
hasEntries && /* @__PURE__ */
|
|
5662
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm font-medium", children: label }),
|
|
5663
|
+
hasEntries && /* @__PURE__ */ jsx20(
|
|
5698
5664
|
Toggle,
|
|
5699
5665
|
{
|
|
5700
5666
|
pressed: isUsingEntry,
|
|
@@ -5716,8 +5682,8 @@ function EntryBoundTextField({
|
|
|
5716
5682
|
onValueChange: handleEntryChange,
|
|
5717
5683
|
disabled,
|
|
5718
5684
|
children: [
|
|
5719
|
-
/* @__PURE__ */
|
|
5720
|
-
/* @__PURE__ */
|
|
5685
|
+
/* @__PURE__ */ jsx20(SelectTrigger2, { className: "flex-1", children: /* @__PURE__ */ jsx20(SelectValue2, { placeholder: "Select entry" }) }),
|
|
5686
|
+
/* @__PURE__ */ jsx20(SelectContent2, { children: entryNames.map((name) => /* @__PURE__ */ jsx20(SelectItem2, { value: name, children: name }, name)) })
|
|
5721
5687
|
]
|
|
5722
5688
|
}
|
|
5723
5689
|
),
|
|
@@ -5728,17 +5694,17 @@ function EntryBoundTextField({
|
|
|
5728
5694
|
onValueChange: handleFieldChange,
|
|
5729
5695
|
disabled: disabled || !currentEntryName,
|
|
5730
5696
|
children: [
|
|
5731
|
-
/* @__PURE__ */
|
|
5732
|
-
/* @__PURE__ */
|
|
5697
|
+
/* @__PURE__ */ jsx20(SelectTrigger2, { className: "flex-1", children: /* @__PURE__ */ jsx20(SelectValue2, { placeholder: "Select field" }) }),
|
|
5698
|
+
/* @__PURE__ */ jsx20(SelectContent2, { children: availableFields.map((field) => /* @__PURE__ */ jsx20(SelectItem2, { value: field, children: field }, field)) })
|
|
5733
5699
|
]
|
|
5734
5700
|
}
|
|
5735
5701
|
)
|
|
5736
5702
|
] }),
|
|
5737
5703
|
resolvedValue && /* @__PURE__ */ jsxs6("div", { className: "bg-muted rounded-md p-2", children: [
|
|
5738
|
-
/* @__PURE__ */
|
|
5739
|
-
/* @__PURE__ */
|
|
5704
|
+
/* @__PURE__ */ jsx20(Label, { className: "text-muted-foreground text-xs", children: "Preview" }),
|
|
5705
|
+
/* @__PURE__ */ jsx20("p", { className: "text-sm", children: resolvedValue })
|
|
5740
5706
|
] })
|
|
5741
|
-
] }) : /* @__PURE__ */
|
|
5707
|
+
] }) : /* @__PURE__ */ jsx20(
|
|
5742
5708
|
Input,
|
|
5743
5709
|
{
|
|
5744
5710
|
value: resolvedValue,
|
|
@@ -5757,7 +5723,7 @@ function createEntryBoundTextField(label, placeholder) {
|
|
|
5757
5723
|
value,
|
|
5758
5724
|
onChange,
|
|
5759
5725
|
readOnly
|
|
5760
|
-
}) => /* @__PURE__ */
|
|
5726
|
+
}) => /* @__PURE__ */ jsx20(
|
|
5761
5727
|
EntryBoundTextField,
|
|
5762
5728
|
{
|
|
5763
5729
|
value,
|
|
@@ -5772,7 +5738,7 @@ function createEntryBoundTextField(label, placeholder) {
|
|
|
5772
5738
|
|
|
5773
5739
|
// fields/ResponsiveToggleField.tsx
|
|
5774
5740
|
import { Monitor, Smartphone } from "lucide-react";
|
|
5775
|
-
import { jsx as
|
|
5741
|
+
import { jsx as jsx21, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5776
5742
|
var breakpoints = [
|
|
5777
5743
|
{ key: "mobile", label: "Mobile", icon: Smartphone },
|
|
5778
5744
|
{ key: "desktop", label: "Desktop", icon: Monitor }
|
|
@@ -5794,8 +5760,8 @@ function ResponsiveToggleField({
|
|
|
5794
5760
|
});
|
|
5795
5761
|
};
|
|
5796
5762
|
return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-3", children: [
|
|
5797
|
-
/* @__PURE__ */
|
|
5798
|
-
/* @__PURE__ */
|
|
5763
|
+
/* @__PURE__ */ jsx21(Label, { className: "text-sm font-medium", children: label }),
|
|
5764
|
+
/* @__PURE__ */ jsx21("div", { className: "flex gap-2", children: breakpoints.map(({ key, label: bpLabel, icon: Icon2 }) => /* @__PURE__ */ jsxs7(
|
|
5799
5765
|
"button",
|
|
5800
5766
|
{
|
|
5801
5767
|
type: "button",
|
|
@@ -5807,13 +5773,13 @@ function ResponsiveToggleField({
|
|
|
5807
5773
|
),
|
|
5808
5774
|
"aria-label": `${bpLabel} visibility`,
|
|
5809
5775
|
children: [
|
|
5810
|
-
/* @__PURE__ */
|
|
5811
|
-
/* @__PURE__ */
|
|
5776
|
+
/* @__PURE__ */ jsx21(Icon2, { className: "size-5" }),
|
|
5777
|
+
/* @__PURE__ */ jsx21("span", { className: "text-xs font-medium", children: bpLabel })
|
|
5812
5778
|
]
|
|
5813
5779
|
},
|
|
5814
5780
|
key
|
|
5815
5781
|
)) }),
|
|
5816
|
-
/* @__PURE__ */
|
|
5782
|
+
/* @__PURE__ */ jsx21("p", { className: "text-muted-foreground text-xs", children: !visibility.mobile && !visibility.desktop ? "Hidden on all devices" : `Visible on ${[
|
|
5817
5783
|
visibility.mobile && "mobile",
|
|
5818
5784
|
visibility.desktop && "desktop"
|
|
5819
5785
|
].filter(Boolean).join(" & ")}` })
|
|
@@ -5821,7 +5787,7 @@ function ResponsiveToggleField({
|
|
|
5821
5787
|
}
|
|
5822
5788
|
|
|
5823
5789
|
// fields/ShadowField.tsx
|
|
5824
|
-
import { jsx as
|
|
5790
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5825
5791
|
function ShadowField({
|
|
5826
5792
|
value,
|
|
5827
5793
|
onChangeAction,
|
|
@@ -5830,8 +5796,8 @@ function ShadowField({
|
|
|
5830
5796
|
}) {
|
|
5831
5797
|
const currentValue = value ?? "none";
|
|
5832
5798
|
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-3", children: [
|
|
5833
|
-
/* @__PURE__ */
|
|
5834
|
-
/* @__PURE__ */
|
|
5799
|
+
/* @__PURE__ */ jsx23(Label, { className: "text-sm font-medium", children: label }),
|
|
5800
|
+
/* @__PURE__ */ jsx23("div", { className: "grid grid-cols-4 gap-2", children: shadowPresets.map((preset) => /* @__PURE__ */ jsxs8(
|
|
5835
5801
|
Button,
|
|
5836
5802
|
{
|
|
5837
5803
|
type: "button",
|
|
@@ -5844,14 +5810,14 @@ function ShadowField({
|
|
|
5844
5810
|
currentValue === preset.value && "ring-ring ring-2"
|
|
5845
5811
|
),
|
|
5846
5812
|
children: [
|
|
5847
|
-
/* @__PURE__ */
|
|
5813
|
+
/* @__PURE__ */ jsx23(
|
|
5848
5814
|
"div",
|
|
5849
5815
|
{
|
|
5850
5816
|
className: "bg-background size-8 rounded",
|
|
5851
5817
|
style: { boxShadow: preset.css }
|
|
5852
5818
|
}
|
|
5853
5819
|
),
|
|
5854
|
-
/* @__PURE__ */
|
|
5820
|
+
/* @__PURE__ */ jsx23("span", { className: "text-xs", children: preset.label })
|
|
5855
5821
|
]
|
|
5856
5822
|
},
|
|
5857
5823
|
preset.value
|
|
@@ -5862,7 +5828,7 @@ function ShadowField({
|
|
|
5862
5828
|
// fields/SpacingSliderField.tsx
|
|
5863
5829
|
import { useState as useState15 } from "react";
|
|
5864
5830
|
import { Magnet as Magnet2 } from "lucide-react";
|
|
5865
|
-
import { jsx as
|
|
5831
|
+
import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
5866
5832
|
var MAX_VALUE2 = spacingScale[spacingScale.length - 1].value;
|
|
5867
5833
|
function SpacingSliderField({
|
|
5868
5834
|
value,
|
|
@@ -5904,8 +5870,8 @@ function SpacingSliderField({
|
|
|
5904
5870
|
const displayLabel = matchingPreset?.label ?? "Custom";
|
|
5905
5871
|
return /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-3", children: [
|
|
5906
5872
|
/* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between", children: [
|
|
5907
|
-
/* @__PURE__ */
|
|
5908
|
-
/* @__PURE__ */
|
|
5873
|
+
/* @__PURE__ */ jsx24(Label, { className: "text-sm font-medium", children: label }),
|
|
5874
|
+
/* @__PURE__ */ jsx24(
|
|
5909
5875
|
Toggle,
|
|
5910
5876
|
{
|
|
5911
5877
|
pressed: quantized,
|
|
@@ -5914,13 +5880,13 @@ function SpacingSliderField({
|
|
|
5914
5880
|
variant: "outline",
|
|
5915
5881
|
"aria-label": "Snap to grid",
|
|
5916
5882
|
title: quantized ? "Snap to grid (on)" : "Snap to grid (off)",
|
|
5917
|
-
children: /* @__PURE__ */
|
|
5883
|
+
children: /* @__PURE__ */ jsx24(Magnet2, { className: "size-3.5" })
|
|
5918
5884
|
}
|
|
5919
5885
|
)
|
|
5920
5886
|
] }),
|
|
5921
5887
|
/* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
/* @__PURE__ */
|
|
5888
|
+
/* @__PURE__ */ jsx24("span", { className: "text-muted-foreground flex-1 text-sm", children: displayLabel }),
|
|
5889
|
+
/* @__PURE__ */ jsx24(
|
|
5924
5890
|
Input,
|
|
5925
5891
|
{
|
|
5926
5892
|
type: "number",
|
|
@@ -5932,9 +5898,9 @@ function SpacingSliderField({
|
|
|
5932
5898
|
max: MAX_VALUE2
|
|
5933
5899
|
}
|
|
5934
5900
|
),
|
|
5935
|
-
/* @__PURE__ */
|
|
5901
|
+
/* @__PURE__ */ jsx24("span", { className: "text-muted-foreground text-xs", children: "px" })
|
|
5936
5902
|
] }),
|
|
5937
|
-
/* @__PURE__ */
|
|
5903
|
+
/* @__PURE__ */ jsx24(
|
|
5938
5904
|
Slider,
|
|
5939
5905
|
{
|
|
5940
5906
|
value: [currentValue],
|
|
@@ -5945,7 +5911,7 @@ function SpacingSliderField({
|
|
|
5945
5911
|
disabled
|
|
5946
5912
|
}
|
|
5947
5913
|
),
|
|
5948
|
-
/* @__PURE__ */
|
|
5914
|
+
/* @__PURE__ */ jsx24("div", { className: "flex flex-wrap gap-1", children: spacingScale.filter((_, i) => i % 2 === 0 || i === spacingScale.length - 1).map((preset) => /* @__PURE__ */ jsx24(
|
|
5949
5915
|
Button,
|
|
5950
5916
|
{
|
|
5951
5917
|
type: "button",
|
|
@@ -5961,7 +5927,7 @@ function SpacingSliderField({
|
|
|
5961
5927
|
}
|
|
5962
5928
|
|
|
5963
5929
|
// fields/ThemeableColorField.tsx
|
|
5964
|
-
import { jsx as
|
|
5930
|
+
import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5965
5931
|
function isThemeableValue(value) {
|
|
5966
5932
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
5967
5933
|
}
|
|
@@ -5988,8 +5954,8 @@ function ThemeableColorField({
|
|
|
5988
5954
|
};
|
|
5989
5955
|
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-2", children: [
|
|
5990
5956
|
/* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between", children: [
|
|
5991
|
-
/* @__PURE__ */
|
|
5992
|
-
/* @__PURE__ */
|
|
5957
|
+
/* @__PURE__ */ jsx25("span", { className: "text-sm font-medium", children: label }),
|
|
5958
|
+
/* @__PURE__ */ jsx25(
|
|
5993
5959
|
Toggle,
|
|
5994
5960
|
{
|
|
5995
5961
|
pressed: isUsingTheme,
|
|
@@ -6003,7 +5969,7 @@ function ThemeableColorField({
|
|
|
6003
5969
|
)
|
|
6004
5970
|
] }),
|
|
6005
5971
|
isUsingTheme ? /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 rounded-md border p-2", children: [
|
|
6006
|
-
/* @__PURE__ */
|
|
5972
|
+
/* @__PURE__ */ jsx25(
|
|
6007
5973
|
"div",
|
|
6008
5974
|
{
|
|
6009
5975
|
className: "size-6 shrink-0 rounded border",
|
|
@@ -6016,7 +5982,7 @@ function ThemeableColorField({
|
|
|
6016
5982
|
"Theme: ",
|
|
6017
5983
|
themeKey
|
|
6018
5984
|
] })
|
|
6019
|
-
] }) : /* @__PURE__ */
|
|
5985
|
+
] }) : /* @__PURE__ */ jsx25(
|
|
6020
5986
|
ColorPickerField,
|
|
6021
5987
|
{
|
|
6022
5988
|
value: customValue,
|
|
@@ -6035,7 +6001,7 @@ function createThemeableColorField(label, themeKey) {
|
|
|
6035
6001
|
value,
|
|
6036
6002
|
onChange,
|
|
6037
6003
|
readOnly
|
|
6038
|
-
}) => /* @__PURE__ */
|
|
6004
|
+
}) => /* @__PURE__ */ jsx25(
|
|
6039
6005
|
ThemeableColorField,
|
|
6040
6006
|
{
|
|
6041
6007
|
value,
|
|
@@ -6049,7 +6015,7 @@ function createThemeableColorField(label, themeKey) {
|
|
|
6049
6015
|
}
|
|
6050
6016
|
|
|
6051
6017
|
// fields/TypographyField.tsx
|
|
6052
|
-
import { jsx as
|
|
6018
|
+
import { jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
6053
6019
|
function TypographyField({
|
|
6054
6020
|
value,
|
|
6055
6021
|
onChangeAction,
|
|
@@ -6081,8 +6047,8 @@ function TypographyField({
|
|
|
6081
6047
|
});
|
|
6082
6048
|
};
|
|
6083
6049
|
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-3", children: [
|
|
6084
|
-
/* @__PURE__ */
|
|
6085
|
-
/* @__PURE__ */
|
|
6050
|
+
/* @__PURE__ */ jsx26(Label, { className: "text-sm font-medium", children: label }),
|
|
6051
|
+
/* @__PURE__ */ jsx26(
|
|
6086
6052
|
"div",
|
|
6087
6053
|
{
|
|
6088
6054
|
className: "bg-muted rounded-md p-3 text-center",
|
|
@@ -6095,7 +6061,7 @@ function TypographyField({
|
|
|
6095
6061
|
}
|
|
6096
6062
|
),
|
|
6097
6063
|
/* @__PURE__ */ jsxs11("div", { children: [
|
|
6098
|
-
/* @__PURE__ */
|
|
6064
|
+
/* @__PURE__ */ jsx26(Label, { className: "text-muted-foreground mb-1.5 text-xs", children: "Family" }),
|
|
6099
6065
|
/* @__PURE__ */ jsxs11(
|
|
6100
6066
|
Select2,
|
|
6101
6067
|
{
|
|
@@ -6103,8 +6069,8 @@ function TypographyField({
|
|
|
6103
6069
|
onValueChange: handleFamilyChange,
|
|
6104
6070
|
disabled,
|
|
6105
6071
|
children: [
|
|
6106
|
-
/* @__PURE__ */
|
|
6107
|
-
/* @__PURE__ */
|
|
6072
|
+
/* @__PURE__ */ jsx26(SelectTrigger2, { className: "h-8", children: /* @__PURE__ */ jsx26(SelectValue2, {}) }),
|
|
6073
|
+
/* @__PURE__ */ jsx26(SelectContent2, { children: fontFamilies.map((font) => /* @__PURE__ */ jsx26(
|
|
6108
6074
|
SelectItem2,
|
|
6109
6075
|
{
|
|
6110
6076
|
value: font.value,
|
|
@@ -6118,8 +6084,8 @@ function TypographyField({
|
|
|
6118
6084
|
)
|
|
6119
6085
|
] }),
|
|
6120
6086
|
/* @__PURE__ */ jsxs11("div", { children: [
|
|
6121
|
-
/* @__PURE__ */
|
|
6122
|
-
/* @__PURE__ */
|
|
6087
|
+
/* @__PURE__ */ jsx26(Label, { className: "text-muted-foreground mb-1.5 text-xs", children: "Size" }),
|
|
6088
|
+
/* @__PURE__ */ jsx26("div", { className: "flex flex-wrap gap-1", children: fontSizes.map((size4) => /* @__PURE__ */ jsx26(
|
|
6123
6089
|
Button,
|
|
6124
6090
|
{
|
|
6125
6091
|
type: "button",
|
|
@@ -6133,8 +6099,8 @@ function TypographyField({
|
|
|
6133
6099
|
)) })
|
|
6134
6100
|
] }),
|
|
6135
6101
|
/* @__PURE__ */ jsxs11("div", { children: [
|
|
6136
|
-
/* @__PURE__ */
|
|
6137
|
-
/* @__PURE__ */
|
|
6102
|
+
/* @__PURE__ */ jsx26(Label, { className: "text-muted-foreground mb-1.5 text-xs", children: "Weight" }),
|
|
6103
|
+
/* @__PURE__ */ jsx26("div", { className: "flex flex-wrap gap-1", children: fontWeights.map((weight) => /* @__PURE__ */ jsx26(
|
|
6138
6104
|
Button,
|
|
6139
6105
|
{
|
|
6140
6106
|
type: "button",
|
|
@@ -6151,7 +6117,7 @@ function TypographyField({
|
|
|
6151
6117
|
}
|
|
6152
6118
|
|
|
6153
6119
|
// fields/index.tsx
|
|
6154
|
-
import { jsx as
|
|
6120
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
6155
6121
|
function createColorField(label) {
|
|
6156
6122
|
return {
|
|
6157
6123
|
type: "custom",
|
|
@@ -6160,7 +6126,7 @@ function createColorField(label) {
|
|
|
6160
6126
|
value,
|
|
6161
6127
|
onChange,
|
|
6162
6128
|
readOnly
|
|
6163
|
-
}) => /* @__PURE__ */
|
|
6129
|
+
}) => /* @__PURE__ */ jsx27(
|
|
6164
6130
|
ColorPickerField,
|
|
6165
6131
|
{
|
|
6166
6132
|
value,
|
|
@@ -6179,7 +6145,7 @@ function createSpacingField(label) {
|
|
|
6179
6145
|
value,
|
|
6180
6146
|
onChange,
|
|
6181
6147
|
readOnly
|
|
6182
|
-
}) => /* @__PURE__ */
|
|
6148
|
+
}) => /* @__PURE__ */ jsx27(
|
|
6183
6149
|
SpacingSliderField,
|
|
6184
6150
|
{
|
|
6185
6151
|
value,
|
|
@@ -6198,7 +6164,7 @@ function createShadowField(label) {
|
|
|
6198
6164
|
value,
|
|
6199
6165
|
onChange,
|
|
6200
6166
|
readOnly
|
|
6201
|
-
}) => /* @__PURE__ */
|
|
6167
|
+
}) => /* @__PURE__ */ jsx27(
|
|
6202
6168
|
ShadowField,
|
|
6203
6169
|
{
|
|
6204
6170
|
value,
|
|
@@ -6217,7 +6183,7 @@ function createBorderRadiusField(label) {
|
|
|
6217
6183
|
value,
|
|
6218
6184
|
onChange,
|
|
6219
6185
|
readOnly
|
|
6220
|
-
}) => /* @__PURE__ */
|
|
6186
|
+
}) => /* @__PURE__ */ jsx27(
|
|
6221
6187
|
BorderRadiusField,
|
|
6222
6188
|
{
|
|
6223
6189
|
value,
|
|
@@ -6236,7 +6202,7 @@ function createTypographyField(label) {
|
|
|
6236
6202
|
value,
|
|
6237
6203
|
onChange,
|
|
6238
6204
|
readOnly
|
|
6239
|
-
}) => /* @__PURE__ */
|
|
6205
|
+
}) => /* @__PURE__ */ jsx27(
|
|
6240
6206
|
TypographyField,
|
|
6241
6207
|
{
|
|
6242
6208
|
value,
|
|
@@ -6255,7 +6221,7 @@ function createResponsiveField(label) {
|
|
|
6255
6221
|
value,
|
|
6256
6222
|
onChange,
|
|
6257
6223
|
readOnly
|
|
6258
|
-
}) => /* @__PURE__ */
|
|
6224
|
+
}) => /* @__PURE__ */ jsx27(
|
|
6259
6225
|
ResponsiveToggleField,
|
|
6260
6226
|
{
|
|
6261
6227
|
value,
|