@process.co/ui 0.0.22 → 0.0.23
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/css/ui.css +48 -0
- package/dist/components/dev/index.cjs +213 -7
- package/dist/components/dev/index.cjs.map +1 -1
- package/dist/components/dev/index.d.cts +64 -3
- package/dist/components/dev/index.d.ts +64 -3
- package/dist/components/dev/index.js +214 -9
- package/dist/components/dev/index.js.map +1 -1
- package/dist/components/fields/index.cjs.map +1 -1
- package/dist/components/fields/index.js.map +1 -1
- package/dist/components/slots/index.cjs +73 -59
- package/dist/components/slots/index.cjs.map +1 -1
- package/dist/components/slots/index.d.cts +1 -1
- package/dist/components/slots/index.d.ts +1 -1
- package/dist/components/slots/index.js +73 -60
- package/dist/components/slots/index.js.map +1 -1
- package/dist/{index-NpNmoYuX.d.cts → index-D4Fc9AJv.d.cts} +15 -2
- package/dist/{index-NpNmoYuX.d.ts → index-D4Fc9AJv.d.ts} +15 -2
- package/dist/index.cjs +14 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React4 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
require('react-dom');
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ function _interopNamespace(e) {
|
|
|
22
22
|
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
|
|
26
26
|
|
|
27
27
|
var __create = Object.create;
|
|
28
28
|
var __defProp = Object.defineProperty;
|
|
@@ -1064,6 +1064,7 @@ var require_package = __commonJS({
|
|
|
1064
1064
|
};
|
|
1065
1065
|
}
|
|
1066
1066
|
});
|
|
1067
|
+
var DevContext = React4.createContext(null);
|
|
1067
1068
|
|
|
1068
1069
|
// src/components/slots/SlotElements.tsx
|
|
1069
1070
|
var SlotElements = (props) => {
|
|
@@ -1102,10 +1103,10 @@ function composeRefs(...refs) {
|
|
|
1102
1103
|
};
|
|
1103
1104
|
}
|
|
1104
1105
|
function useComposedRefs(...refs) {
|
|
1105
|
-
return
|
|
1106
|
+
return React4__namespace.useCallback(composeRefs(...refs), refs);
|
|
1106
1107
|
}
|
|
1107
1108
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
1108
|
-
var use =
|
|
1109
|
+
var use = React4__namespace[" use ".trim().toString()];
|
|
1109
1110
|
function isPromiseLike(value) {
|
|
1110
1111
|
return typeof value === "object" && value !== null && "then" in value;
|
|
1111
1112
|
}
|
|
@@ -1115,24 +1116,24 @@ function isLazyComponent(element) {
|
|
|
1115
1116
|
// @__NO_SIDE_EFFECTS__
|
|
1116
1117
|
function createSlot(ownerName) {
|
|
1117
1118
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
1118
|
-
const Slot2 =
|
|
1119
|
+
const Slot2 = React4__namespace.forwardRef((props, forwardedRef) => {
|
|
1119
1120
|
let { children, ...slotProps } = props;
|
|
1120
1121
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
1121
1122
|
children = use(children._payload);
|
|
1122
1123
|
}
|
|
1123
|
-
const childrenArray =
|
|
1124
|
+
const childrenArray = React4__namespace.Children.toArray(children);
|
|
1124
1125
|
const slottable = childrenArray.find(isSlottable);
|
|
1125
1126
|
if (slottable) {
|
|
1126
1127
|
const newElement = slottable.props.children;
|
|
1127
1128
|
const newChildren = childrenArray.map((child) => {
|
|
1128
1129
|
if (child === slottable) {
|
|
1129
|
-
if (
|
|
1130
|
-
return
|
|
1130
|
+
if (React4__namespace.Children.count(newElement) > 1) return React4__namespace.Children.only(null);
|
|
1131
|
+
return React4__namespace.isValidElement(newElement) ? newElement.props.children : null;
|
|
1131
1132
|
} else {
|
|
1132
1133
|
return child;
|
|
1133
1134
|
}
|
|
1134
1135
|
});
|
|
1135
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
1136
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React4__namespace.isValidElement(newElement) ? React4__namespace.cloneElement(newElement, void 0, newChildren) : null });
|
|
1136
1137
|
}
|
|
1137
1138
|
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
1138
1139
|
});
|
|
@@ -1142,27 +1143,27 @@ function createSlot(ownerName) {
|
|
|
1142
1143
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
1143
1144
|
// @__NO_SIDE_EFFECTS__
|
|
1144
1145
|
function createSlotClone(ownerName) {
|
|
1145
|
-
const SlotClone =
|
|
1146
|
+
const SlotClone = React4__namespace.forwardRef((props, forwardedRef) => {
|
|
1146
1147
|
let { children, ...slotProps } = props;
|
|
1147
1148
|
if (isLazyComponent(children) && typeof use === "function") {
|
|
1148
1149
|
children = use(children._payload);
|
|
1149
1150
|
}
|
|
1150
|
-
if (
|
|
1151
|
+
if (React4__namespace.isValidElement(children)) {
|
|
1151
1152
|
const childrenRef = getElementRef(children);
|
|
1152
1153
|
const props2 = mergeProps(slotProps, children.props);
|
|
1153
|
-
if (children.type !==
|
|
1154
|
+
if (children.type !== React4__namespace.Fragment) {
|
|
1154
1155
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
1155
1156
|
}
|
|
1156
|
-
return
|
|
1157
|
+
return React4__namespace.cloneElement(children, props2);
|
|
1157
1158
|
}
|
|
1158
|
-
return
|
|
1159
|
+
return React4__namespace.Children.count(children) > 1 ? React4__namespace.Children.only(null) : null;
|
|
1159
1160
|
});
|
|
1160
1161
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
1161
1162
|
return SlotClone;
|
|
1162
1163
|
}
|
|
1163
1164
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
1164
1165
|
function isSlottable(child) {
|
|
1165
|
-
return
|
|
1166
|
+
return React4__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
1166
1167
|
}
|
|
1167
1168
|
function mergeProps(slotProps, childProps) {
|
|
1168
1169
|
const overrideProps = { ...childProps };
|
|
@@ -4309,7 +4310,7 @@ function Button({
|
|
|
4309
4310
|
...props
|
|
4310
4311
|
}) {
|
|
4311
4312
|
const Comp = asChild ? Slot : "button";
|
|
4312
|
-
return /* @__PURE__ */
|
|
4313
|
+
return /* @__PURE__ */ React4__namespace.createElement(
|
|
4313
4314
|
Comp,
|
|
4314
4315
|
{
|
|
4315
4316
|
"data-slot": "button",
|
|
@@ -4335,32 +4336,32 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
4335
4336
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
4336
4337
|
let defaultContexts = [];
|
|
4337
4338
|
function createContext3(rootComponentName, defaultContext) {
|
|
4338
|
-
const BaseContext =
|
|
4339
|
+
const BaseContext = React4__namespace.createContext(defaultContext);
|
|
4339
4340
|
const index = defaultContexts.length;
|
|
4340
4341
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
4341
4342
|
const Provider = (props) => {
|
|
4342
4343
|
const { scope, children, ...context } = props;
|
|
4343
4344
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
4344
|
-
const value =
|
|
4345
|
+
const value = React4__namespace.useMemo(() => context, Object.values(context));
|
|
4345
4346
|
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
4346
4347
|
};
|
|
4347
4348
|
Provider.displayName = rootComponentName + "Provider";
|
|
4348
|
-
function
|
|
4349
|
+
function useContext22(consumerName, scope) {
|
|
4349
4350
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
4350
|
-
const context =
|
|
4351
|
+
const context = React4__namespace.useContext(Context);
|
|
4351
4352
|
if (context) return context;
|
|
4352
4353
|
if (defaultContext !== void 0) return defaultContext;
|
|
4353
4354
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
4354
4355
|
}
|
|
4355
|
-
return [Provider,
|
|
4356
|
+
return [Provider, useContext22];
|
|
4356
4357
|
}
|
|
4357
4358
|
const createScope = () => {
|
|
4358
4359
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
4359
|
-
return
|
|
4360
|
+
return React4__namespace.createContext(defaultContext);
|
|
4360
4361
|
});
|
|
4361
4362
|
return function useScope(scope) {
|
|
4362
4363
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
4363
|
-
return
|
|
4364
|
+
return React4__namespace.useMemo(
|
|
4364
4365
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
4365
4366
|
[scope, contexts]
|
|
4366
4367
|
);
|
|
@@ -4383,15 +4384,15 @@ function composeContextScopes(...scopes) {
|
|
|
4383
4384
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
4384
4385
|
return { ...nextScopes2, ...currentScope };
|
|
4385
4386
|
}, {});
|
|
4386
|
-
return
|
|
4387
|
+
return React4__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
4387
4388
|
};
|
|
4388
4389
|
};
|
|
4389
4390
|
createScope.scopeName = baseScope.scopeName;
|
|
4390
4391
|
return createScope;
|
|
4391
4392
|
}
|
|
4392
|
-
var useLayoutEffect2 = globalThis?.document ?
|
|
4393
|
+
var useLayoutEffect2 = globalThis?.document ? React4__namespace.useLayoutEffect : () => {
|
|
4393
4394
|
};
|
|
4394
|
-
var useInsertionEffect =
|
|
4395
|
+
var useInsertionEffect = React4__namespace[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
4395
4396
|
function useControllableState({
|
|
4396
4397
|
prop,
|
|
4397
4398
|
defaultProp,
|
|
@@ -4406,8 +4407,8 @@ function useControllableState({
|
|
|
4406
4407
|
const isControlled = prop !== void 0;
|
|
4407
4408
|
const value = isControlled ? prop : uncontrolledProp;
|
|
4408
4409
|
{
|
|
4409
|
-
const isControlledRef =
|
|
4410
|
-
|
|
4410
|
+
const isControlledRef = React4__namespace.useRef(prop !== void 0);
|
|
4411
|
+
React4__namespace.useEffect(() => {
|
|
4411
4412
|
const wasControlled = isControlledRef.current;
|
|
4412
4413
|
if (wasControlled !== isControlled) {
|
|
4413
4414
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -4419,7 +4420,7 @@ function useControllableState({
|
|
|
4419
4420
|
isControlledRef.current = isControlled;
|
|
4420
4421
|
}, [isControlled, caller]);
|
|
4421
4422
|
}
|
|
4422
|
-
const setValue =
|
|
4423
|
+
const setValue = React4__namespace.useCallback(
|
|
4423
4424
|
(nextValue) => {
|
|
4424
4425
|
if (isControlled) {
|
|
4425
4426
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -4438,13 +4439,13 @@ function useUncontrolledState({
|
|
|
4438
4439
|
defaultProp,
|
|
4439
4440
|
onChange: onChange2
|
|
4440
4441
|
}) {
|
|
4441
|
-
const [value, setValue] =
|
|
4442
|
-
const prevValueRef =
|
|
4443
|
-
const onChangeRef =
|
|
4442
|
+
const [value, setValue] = React4__namespace.useState(defaultProp);
|
|
4443
|
+
const prevValueRef = React4__namespace.useRef(value);
|
|
4444
|
+
const onChangeRef = React4__namespace.useRef(onChange2);
|
|
4444
4445
|
useInsertionEffect(() => {
|
|
4445
4446
|
onChangeRef.current = onChange2;
|
|
4446
4447
|
}, [onChange2]);
|
|
4447
|
-
|
|
4448
|
+
React4__namespace.useEffect(() => {
|
|
4448
4449
|
if (prevValueRef.current !== value) {
|
|
4449
4450
|
onChangeRef.current?.(value);
|
|
4450
4451
|
prevValueRef.current = value;
|
|
@@ -4456,8 +4457,8 @@ function isFunction(value) {
|
|
|
4456
4457
|
return typeof value === "function";
|
|
4457
4458
|
}
|
|
4458
4459
|
function usePrevious(value) {
|
|
4459
|
-
const ref =
|
|
4460
|
-
return
|
|
4460
|
+
const ref = React4__namespace.useRef({ value, previous: value });
|
|
4461
|
+
return React4__namespace.useMemo(() => {
|
|
4461
4462
|
if (ref.current.value !== value) {
|
|
4462
4463
|
ref.current.previous = ref.current.value;
|
|
4463
4464
|
ref.current.value = value;
|
|
@@ -4466,7 +4467,7 @@ function usePrevious(value) {
|
|
|
4466
4467
|
}, [value]);
|
|
4467
4468
|
}
|
|
4468
4469
|
function useSize(element) {
|
|
4469
|
-
const [size, setSize] =
|
|
4470
|
+
const [size, setSize] = React4__namespace.useState(void 0);
|
|
4470
4471
|
useLayoutEffect2(() => {
|
|
4471
4472
|
if (element) {
|
|
4472
4473
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -4502,21 +4503,21 @@ function useSize(element) {
|
|
|
4502
4503
|
// @__NO_SIDE_EFFECTS__
|
|
4503
4504
|
function createSlot2(ownerName) {
|
|
4504
4505
|
const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
4505
|
-
const Slot2 =
|
|
4506
|
+
const Slot2 = React4__namespace.forwardRef((props, forwardedRef) => {
|
|
4506
4507
|
const { children, ...slotProps } = props;
|
|
4507
|
-
const childrenArray =
|
|
4508
|
+
const childrenArray = React4__namespace.Children.toArray(children);
|
|
4508
4509
|
const slottable = childrenArray.find(isSlottable2);
|
|
4509
4510
|
if (slottable) {
|
|
4510
4511
|
const newElement = slottable.props.children;
|
|
4511
4512
|
const newChildren = childrenArray.map((child) => {
|
|
4512
4513
|
if (child === slottable) {
|
|
4513
|
-
if (
|
|
4514
|
-
return
|
|
4514
|
+
if (React4__namespace.Children.count(newElement) > 1) return React4__namespace.Children.only(null);
|
|
4515
|
+
return React4__namespace.isValidElement(newElement) ? newElement.props.children : null;
|
|
4515
4516
|
} else {
|
|
4516
4517
|
return child;
|
|
4517
4518
|
}
|
|
4518
4519
|
});
|
|
4519
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
4520
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React4__namespace.isValidElement(newElement) ? React4__namespace.cloneElement(newElement, void 0, newChildren) : null });
|
|
4520
4521
|
}
|
|
4521
4522
|
return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
4522
4523
|
});
|
|
@@ -4525,24 +4526,24 @@ function createSlot2(ownerName) {
|
|
|
4525
4526
|
}
|
|
4526
4527
|
// @__NO_SIDE_EFFECTS__
|
|
4527
4528
|
function createSlotClone2(ownerName) {
|
|
4528
|
-
const SlotClone =
|
|
4529
|
+
const SlotClone = React4__namespace.forwardRef((props, forwardedRef) => {
|
|
4529
4530
|
const { children, ...slotProps } = props;
|
|
4530
|
-
if (
|
|
4531
|
+
if (React4__namespace.isValidElement(children)) {
|
|
4531
4532
|
const childrenRef = getElementRef2(children);
|
|
4532
4533
|
const props2 = mergeProps2(slotProps, children.props);
|
|
4533
|
-
if (children.type !==
|
|
4534
|
+
if (children.type !== React4__namespace.Fragment) {
|
|
4534
4535
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
4535
4536
|
}
|
|
4536
|
-
return
|
|
4537
|
+
return React4__namespace.cloneElement(children, props2);
|
|
4537
4538
|
}
|
|
4538
|
-
return
|
|
4539
|
+
return React4__namespace.Children.count(children) > 1 ? React4__namespace.Children.only(null) : null;
|
|
4539
4540
|
});
|
|
4540
4541
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
4541
4542
|
return SlotClone;
|
|
4542
4543
|
}
|
|
4543
4544
|
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
4544
4545
|
function isSlottable2(child) {
|
|
4545
|
-
return
|
|
4546
|
+
return React4__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
4546
4547
|
}
|
|
4547
4548
|
function mergeProps2(slotProps, childProps) {
|
|
4548
4549
|
const overrideProps = { ...childProps };
|
|
@@ -4602,7 +4603,7 @@ var NODES = [
|
|
|
4602
4603
|
];
|
|
4603
4604
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
4604
4605
|
const Slot2 = createSlot2(`Primitive.${node}`);
|
|
4605
|
-
const Node2 =
|
|
4606
|
+
const Node2 = React4__namespace.forwardRef((props, forwardedRef) => {
|
|
4606
4607
|
const { asChild, ...primitiveProps } = props;
|
|
4607
4608
|
const Comp = asChild ? Slot2 : node;
|
|
4608
4609
|
if (typeof window !== "undefined") {
|
|
@@ -4616,7 +4617,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
4616
4617
|
var SWITCH_NAME = "Switch";
|
|
4617
4618
|
var [createSwitchContext] = createContextScope(SWITCH_NAME);
|
|
4618
4619
|
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
4619
|
-
var Switch =
|
|
4620
|
+
var Switch = React4__namespace.forwardRef(
|
|
4620
4621
|
(props, forwardedRef) => {
|
|
4621
4622
|
const {
|
|
4622
4623
|
__scopeSwitch,
|
|
@@ -4630,9 +4631,9 @@ var Switch = React3__namespace.forwardRef(
|
|
|
4630
4631
|
form,
|
|
4631
4632
|
...switchProps
|
|
4632
4633
|
} = props;
|
|
4633
|
-
const [button, setButton] =
|
|
4634
|
+
const [button, setButton] = React4__namespace.useState(null);
|
|
4634
4635
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
4635
|
-
const hasConsumerStoppedPropagationRef =
|
|
4636
|
+
const hasConsumerStoppedPropagationRef = React4__namespace.useRef(false);
|
|
4636
4637
|
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
4637
4638
|
const [checked, setChecked] = useControllableState({
|
|
4638
4639
|
prop: checkedProp,
|
|
@@ -4682,7 +4683,7 @@ var Switch = React3__namespace.forwardRef(
|
|
|
4682
4683
|
);
|
|
4683
4684
|
Switch.displayName = SWITCH_NAME;
|
|
4684
4685
|
var THUMB_NAME = "SwitchThumb";
|
|
4685
|
-
var SwitchThumb =
|
|
4686
|
+
var SwitchThumb = React4__namespace.forwardRef(
|
|
4686
4687
|
(props, forwardedRef) => {
|
|
4687
4688
|
const { __scopeSwitch, ...thumbProps } = props;
|
|
4688
4689
|
const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
|
|
@@ -4699,7 +4700,7 @@ var SwitchThumb = React3__namespace.forwardRef(
|
|
|
4699
4700
|
);
|
|
4700
4701
|
SwitchThumb.displayName = THUMB_NAME;
|
|
4701
4702
|
var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
|
|
4702
|
-
var SwitchBubbleInput =
|
|
4703
|
+
var SwitchBubbleInput = React4__namespace.forwardRef(
|
|
4703
4704
|
({
|
|
4704
4705
|
__scopeSwitch,
|
|
4705
4706
|
control,
|
|
@@ -4707,11 +4708,11 @@ var SwitchBubbleInput = React3__namespace.forwardRef(
|
|
|
4707
4708
|
bubbles = true,
|
|
4708
4709
|
...props
|
|
4709
4710
|
}, forwardedRef) => {
|
|
4710
|
-
const ref =
|
|
4711
|
+
const ref = React4__namespace.useRef(null);
|
|
4711
4712
|
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
4712
4713
|
const prevChecked = usePrevious(checked);
|
|
4713
4714
|
const controlSize = useSize(control);
|
|
4714
|
-
|
|
4715
|
+
React4__namespace.useEffect(() => {
|
|
4715
4716
|
const input = ref.current;
|
|
4716
4717
|
if (!input) return;
|
|
4717
4718
|
const inputProto = window.HTMLInputElement.prototype;
|
|
@@ -4792,14 +4793,14 @@ var switchThumbVariants = cva(
|
|
|
4792
4793
|
}
|
|
4793
4794
|
);
|
|
4794
4795
|
function Switch2({ className, size, ...props }) {
|
|
4795
|
-
return /* @__PURE__ */
|
|
4796
|
+
return /* @__PURE__ */ React4__namespace.createElement(
|
|
4796
4797
|
Root,
|
|
4797
4798
|
{
|
|
4798
4799
|
"data-slot": "switch",
|
|
4799
4800
|
className: cn(switchRootVariants({ size }), className),
|
|
4800
4801
|
...props
|
|
4801
4802
|
},
|
|
4802
|
-
/* @__PURE__ */
|
|
4803
|
+
/* @__PURE__ */ React4__namespace.createElement(
|
|
4803
4804
|
Thumb,
|
|
4804
4805
|
{
|
|
4805
4806
|
"data-slot": "switch-thumb",
|
|
@@ -7924,7 +7925,7 @@ var defaultProps = {
|
|
|
7924
7925
|
swapOpacity: false,
|
|
7925
7926
|
widthAuto: false
|
|
7926
7927
|
};
|
|
7927
|
-
var FontAwesomeIcon = /* @__PURE__ */
|
|
7928
|
+
var FontAwesomeIcon = /* @__PURE__ */ React4__namespace.default.forwardRef(function(props, ref) {
|
|
7928
7929
|
var allProps = _objectSpread22(_objectSpread22({}, defaultProps), props);
|
|
7929
7930
|
var iconArgs = allProps.icon, maskArgs = allProps.mask, symbol = allProps.symbol, className = allProps.className, title = allProps.title, titleId = allProps.titleId, maskId = allProps.maskId;
|
|
7930
7931
|
var iconLookup = normalizeIconArgs(iconArgs);
|
|
@@ -7985,7 +7986,7 @@ FontAwesomeIcon.propTypes = {
|
|
|
7985
7986
|
swapOpacity: import_prop_types.default.bool,
|
|
7986
7987
|
widthAuto: import_prop_types.default.bool
|
|
7987
7988
|
};
|
|
7988
|
-
var convertCurry = convert.bind(null,
|
|
7989
|
+
var convertCurry = convert.bind(null, React4__namespace.default.createElement);
|
|
7989
7990
|
|
|
7990
7991
|
// ../../node_modules/.pnpm/@fortawesome+pro-solid-svg-icons@6.7.2/node_modules/@fortawesome/pro-solid-svg-icons/index.mjs
|
|
7991
7992
|
var faGripVertical = {
|
|
@@ -8010,6 +8011,18 @@ var SlotDragHandle = (props) => {
|
|
|
8010
8011
|
const { slotId } = props;
|
|
8011
8012
|
return /* @__PURE__ */ React.createElement("div", { className: "uii:cursor-grab" }, /* @__PURE__ */ React.createElement(FontAwesomeIcon, { icon: faGripVertical }));
|
|
8012
8013
|
};
|
|
8014
|
+
|
|
8015
|
+
// src/components/slots/index.tsx
|
|
8016
|
+
function useSlotContext(slotId) {
|
|
8017
|
+
const devContext = React4.useContext(DevContext);
|
|
8018
|
+
const [activeSlotId, setActiveSlotId] = React4.useState(void 0);
|
|
8019
|
+
React4.useEffect(() => {
|
|
8020
|
+
if (devContext) {
|
|
8021
|
+
setActiveSlotId(devContext.activeSlotId ?? void 0);
|
|
8022
|
+
}
|
|
8023
|
+
}, [devContext, slotId]);
|
|
8024
|
+
return { active: (activeSlotId ?? "") === slotId, enabled: true };
|
|
8025
|
+
}
|
|
8013
8026
|
/*! Bundled license information:
|
|
8014
8027
|
|
|
8015
8028
|
react-is/cjs/react-is.production.min.js:
|
|
@@ -8059,5 +8072,6 @@ exports.SlotDelete = SlotDelete;
|
|
|
8059
8072
|
exports.SlotDragHandle = SlotDragHandle;
|
|
8060
8073
|
exports.SlotElements = SlotElements;
|
|
8061
8074
|
exports.SlotEnable = SlotEnable;
|
|
8075
|
+
exports.useSlotContext = useSlotContext;
|
|
8062
8076
|
//# sourceMappingURL=index.cjs.map
|
|
8063
8077
|
//# sourceMappingURL=index.cjs.map
|