pollination-react-io 1.88.0 → 1.88.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.esm.js +263 -614
- package/build/index.esm.js.map +1 -1
- package/build/index.js +263 -614
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
@@ -213,10 +213,10 @@ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultCon
|
|
213
213
|
|
214
214
|
/* -------------------------------------------------------------------------------------------------
|
215
215
|
* Slot
|
216
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
216
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
217
217
|
const { children: children , ...slotProps } = props;
|
218
218
|
const childrenArray = React.Children.toArray(children);
|
219
|
-
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
219
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable$1);
|
220
220
|
if (slottable) {
|
221
221
|
// the new element to render is the one passed as a child of `Slottable`
|
222
222
|
const newElement = slottable.props.children;
|
@@ -228,35 +228,35 @@ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultCon
|
|
228
228
|
return /*#__PURE__*/ React.isValidElement(newElement) ? newElement.props.children : null;
|
229
229
|
} else return child;
|
230
230
|
});
|
231
|
-
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$L({}, slotProps, {
|
231
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone$1, _extends$L({}, slotProps, {
|
232
232
|
ref: forwardedRef
|
233
233
|
}), /*#__PURE__*/ React.isValidElement(newElement) ? /*#__PURE__*/ React.cloneElement(newElement, undefined, newChildren) : null);
|
234
234
|
}
|
235
|
-
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$L({}, slotProps, {
|
235
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone$1, _extends$L({}, slotProps, {
|
236
236
|
ref: forwardedRef
|
237
237
|
}), children);
|
238
238
|
});
|
239
|
-
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
239
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360$1.displayName = 'Slot';
|
240
240
|
/* -------------------------------------------------------------------------------------------------
|
241
241
|
* SlotClone
|
242
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
242
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone$1 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
243
243
|
const { children: children , ...slotProps } = props;
|
244
244
|
if (/*#__PURE__*/ React.isValidElement(children)) return /*#__PURE__*/ React.cloneElement(children, {
|
245
|
-
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
245
|
+
...$5e63c961fc1ce211$var$mergeProps$1(slotProps, children.props),
|
246
246
|
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
247
247
|
});
|
248
248
|
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
249
249
|
});
|
250
|
-
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
250
|
+
$5e63c961fc1ce211$var$SlotClone$1.displayName = 'SlotClone';
|
251
251
|
/* -------------------------------------------------------------------------------------------------
|
252
252
|
* Slottable
|
253
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
253
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1 = ({ children: children })=>{
|
254
254
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
255
255
|
};
|
256
|
-
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
257
|
-
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
256
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable$1(child) {
|
257
|
+
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1;
|
258
258
|
}
|
259
|
-
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
259
|
+
function $5e63c961fc1ce211$var$mergeProps$1(slotProps, childProps) {
|
260
260
|
// all child props should override
|
261
261
|
const overrideProps = {
|
262
262
|
...childProps
|
@@ -284,7 +284,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
284
284
|
};
|
285
285
|
}
|
286
286
|
|
287
|
-
const $8927f6f2acc4f386$var$NODES = [
|
287
|
+
const $8927f6f2acc4f386$var$NODES$1 = [
|
288
288
|
'a',
|
289
289
|
'button',
|
290
290
|
'div',
|
@@ -303,10 +303,10 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
303
303
|
// prettier-ignore
|
304
304
|
/* -------------------------------------------------------------------------------------------------
|
305
305
|
* Primitive
|
306
|
-
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
306
|
+
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034$1 = $8927f6f2acc4f386$var$NODES$1.reduce((primitive, node)=>{
|
307
307
|
const Node = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
308
308
|
const { asChild: asChild , ...primitiveProps } = props;
|
309
|
-
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
309
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360$1 : node;
|
310
310
|
React.useEffect(()=>{
|
311
311
|
window[Symbol.for('radix-ui')] = true;
|
312
312
|
}, []);
|
@@ -374,7 +374,7 @@ const $cddcb0b647441e34$export$e2255cf6045e8d47 = /*#__PURE__*/ React.forwardRef
|
|
374
374
|
scope: __scopeAvatar,
|
375
375
|
imageLoadingStatus: imageLoadingStatus,
|
376
376
|
onImageLoadingStatusChange: setImageLoadingStatus
|
377
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$L({}, avatarProps, {
|
377
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends$L({}, avatarProps, {
|
378
378
|
ref: forwardedRef
|
379
379
|
})));
|
380
380
|
});
|
@@ -395,7 +395,7 @@ const $cddcb0b647441e34$export$2cd8ae1985206fe8 = /*#__PURE__*/ React.forwardRef
|
|
395
395
|
imageLoadingStatus,
|
396
396
|
handleLoadingStatusChange
|
397
397
|
]);
|
398
|
-
return imageLoadingStatus === 'loaded' ? /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends$L({}, imageProps, {
|
398
|
+
return imageLoadingStatus === 'loaded' ? /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.img, _extends$L({}, imageProps, {
|
399
399
|
ref: forwardedRef,
|
400
400
|
src: src
|
401
401
|
})) : null;
|
@@ -417,7 +417,7 @@ const $cddcb0b647441e34$export$69fffb6a9571fbfe = /*#__PURE__*/ React.forwardRef
|
|
417
417
|
}, [
|
418
418
|
delayMs
|
419
419
|
]);
|
420
|
-
return canRender && context.imageLoadingStatus !== 'loaded' ? /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$L({}, fallbackProps, {
|
420
|
+
return canRender && context.imageLoadingStatus !== 'loaded' ? /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends$L({}, fallbackProps, {
|
421
421
|
ref: forwardedRef
|
422
422
|
})) : null;
|
423
423
|
});
|
@@ -6774,7 +6774,7 @@ const $89eedd556c436f6a$export$1ff3c3f08ae963c0 = /*#__PURE__*/ React.forwardRef
|
|
6774
6774
|
'aria-orientation': ariaOrientation,
|
6775
6775
|
role: 'separator'
|
6776
6776
|
};
|
6777
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
6777
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
6778
6778
|
"data-orientation": orientation
|
6779
6779
|
}, semanticProps, domProps, {
|
6780
6780
|
ref: forwardedRef
|
@@ -9119,7 +9119,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
9119
9119
|
const { scope: scope , children: children } = props;
|
9120
9120
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
9121
9121
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
|
9122
|
-
return /*#__PURE__*/ React__default["default"].createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
|
9122
|
+
return /*#__PURE__*/ React__default["default"].createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
9123
9123
|
ref: composedRefs
|
9124
9124
|
}, children);
|
9125
9125
|
});
|
@@ -9140,7 +9140,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
9140
9140
|
return ()=>void context.itemMap.delete(ref)
|
9141
9141
|
;
|
9142
9142
|
});
|
9143
|
-
return /*#__PURE__*/ React__default["default"].createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
|
9143
|
+
return /*#__PURE__*/ React__default["default"].createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360$1, {
|
9144
9144
|
[ITEM_DATA_ATTR]: '',
|
9145
9145
|
ref: composedRefs
|
9146
9146
|
}, children);
|
@@ -9293,7 +9293,7 @@ const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ React.forwardRef
|
|
9293
9293
|
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
|
9294
9294
|
;
|
9295
9295
|
}, []);
|
9296
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({}, layerProps, {
|
9296
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({}, layerProps, {
|
9297
9297
|
ref: composedRefs,
|
9298
9298
|
style: {
|
9299
9299
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
|
@@ -9565,7 +9565,7 @@ const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ React.forwardRef
|
|
9565
9565
|
trapped,
|
9566
9566
|
focusScope.paused
|
9567
9567
|
]);
|
9568
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
9568
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
9569
9569
|
tabIndex: -1
|
9570
9570
|
}, scopeProps, {
|
9571
9571
|
ref: composedRefs,
|
@@ -11340,7 +11340,7 @@ const arrow = options => {
|
|
11340
11340
|
|
11341
11341
|
const $7e8f5cd07187803e$export$21b07c8f274aebd5 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
11342
11342
|
const { children: children , width: width = 10 , height: height = 5 , ...arrowProps } = props;
|
11343
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.svg, _extends$L({}, arrowProps, {
|
11343
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.svg, _extends$L({}, arrowProps, {
|
11344
11344
|
ref: forwardedRef,
|
11345
11345
|
width: width,
|
11346
11346
|
height: height,
|
@@ -11427,7 +11427,7 @@ const $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = /*#__PURE__*/ React.forwardRef(
|
|
11427
11427
|
// `anchorRef` with their virtual ref in this case.
|
11428
11428
|
context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);
|
11429
11429
|
});
|
11430
|
-
return virtualRef ? null : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({}, anchorProps, {
|
11430
|
+
return virtualRef ? null : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({}, anchorProps, {
|
11431
11431
|
ref: composedRefs
|
11432
11432
|
}));
|
11433
11433
|
});
|
@@ -11583,7 +11583,7 @@ const $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ React.forwardRef(
|
|
11583
11583
|
scope: __scopePopper,
|
11584
11584
|
hasParent: true,
|
11585
11585
|
positionUpdateFns: positionUpdateFns
|
11586
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, commonProps)) : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, commonProps)));
|
11586
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, commonProps)) : /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, commonProps)));
|
11587
11587
|
});
|
11588
11588
|
/* -------------------------------------------------------------------------------------------------
|
11589
11589
|
* PopperArrow
|
@@ -11873,7 +11873,7 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ React.forwardRef
|
|
11873
11873
|
]),
|
11874
11874
|
onItemShiftTab: React.useCallback(()=>setIsTabbingBackOut(true)
|
11875
11875
|
, [])
|
11876
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
11876
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
11877
11877
|
tabIndex: isTabbingBackOut ? -1 : 0,
|
11878
11878
|
"data-orientation": orientation
|
11879
11879
|
}, groupProps, {
|
@@ -11931,7 +11931,7 @@ const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /*#__PURE__*/ React.forwardRef(
|
|
11931
11931
|
id: id,
|
11932
11932
|
focusable: focusable,
|
11933
11933
|
active: active
|
11934
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$L({
|
11934
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends$L({
|
11935
11935
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
11936
11936
|
"data-orientation": context.orientation
|
11937
11937
|
}, itemProps, {
|
@@ -12924,7 +12924,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
12924
12924
|
const lastPointerXRef = React.useRef(0);
|
12925
12925
|
const ScrollLockWrapper = disableOutsideScroll ? $epM9y$RemoveScroll : React.Fragment;
|
12926
12926
|
const scrollLockWrapperProps = disableOutsideScroll ? {
|
12927
|
-
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
12927
|
+
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360$1,
|
12928
12928
|
allowPinchZoom: true
|
12929
12929
|
} : undefined;
|
12930
12930
|
const handleTypeaheadSearch = (key)=>{
|
@@ -13073,7 +13073,7 @@ const $6cc32821e9371a1c$var$MenuRootContentNonModal = /*#__PURE__*/ React.forwar
|
|
13073
13073
|
});
|
13074
13074
|
const $6cc32821e9371a1c$export$22a631d1f72787bb = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
13075
13075
|
const { __scopeMenu: __scopeMenu , ...groupProps } = props;
|
13076
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
13076
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
13077
13077
|
role: "group"
|
13078
13078
|
}, groupProps, {
|
13079
13079
|
ref: forwardedRef
|
@@ -13081,7 +13081,7 @@ const $6cc32821e9371a1c$export$22a631d1f72787bb = /*#__PURE__*/ React.forwardRef
|
|
13081
13081
|
});
|
13082
13082
|
const $6cc32821e9371a1c$export$dd37bec0e8a99143 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
13083
13083
|
const { __scopeMenu: __scopeMenu , ...labelProps } = props;
|
13084
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({}, labelProps, {
|
13084
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({}, labelProps, {
|
13085
13085
|
ref: forwardedRef
|
13086
13086
|
}));
|
13087
13087
|
});
|
@@ -13168,7 +13168,7 @@ const $6cc32821e9371a1c$export$2ce376c2cc3355c8 = /*#__PURE__*/ React.forwardRef
|
|
13168
13168
|
asChild: true
|
13169
13169
|
}, rovingFocusGroupScope, {
|
13170
13170
|
focusable: !disabled
|
13171
|
-
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
13171
|
+
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
13172
13172
|
role: "menuitem",
|
13173
13173
|
"data-highlighted": isFocused ? '' : undefined,
|
13174
13174
|
"aria-disabled": disabled || undefined,
|
@@ -13263,7 +13263,7 @@ const $6cc32821e9371a1c$export$a2593e23056970a3 = /*#__PURE__*/ React.forwardRef
|
|
13263
13263
|
const indicatorContext = $6cc32821e9371a1c$var$useItemIndicatorContext($6cc32821e9371a1c$var$ITEM_INDICATOR_NAME, __scopeMenu);
|
13264
13264
|
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
13265
13265
|
present: forceMount || indicatorContext.checked
|
13266
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$L({}, itemIndicatorProps, {
|
13266
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends$L({}, itemIndicatorProps, {
|
13267
13267
|
ref: forwardedRef,
|
13268
13268
|
"data-state": $6cc32821e9371a1c$var$getCheckedState(indicatorContext.checked)
|
13269
13269
|
})));
|
@@ -13415,7 +13415,7 @@ const $d08ef79370b62062$export$d2469213b3befba9 = /*#__PURE__*/ React.forwardRef
|
|
13415
13415
|
const menuScope = $d08ef79370b62062$var$useMenuScope(__scopeDropdownMenu);
|
13416
13416
|
return /*#__PURE__*/ React.createElement($6cc32821e9371a1c$export$b688253958b8dfe7, _extends$L({
|
13417
13417
|
asChild: true
|
13418
|
-
}, menuScope), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$L({
|
13418
|
+
}, menuScope), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends$L({
|
13419
13419
|
type: "button",
|
13420
13420
|
id: context.triggerId,
|
13421
13421
|
"aria-haspopup": "menu",
|
@@ -15349,7 +15349,7 @@ const $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ React.forwardRef
|
|
15349
15349
|
, [
|
15350
15350
|
setOpen
|
15351
15351
|
])
|
15352
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
15352
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
15353
15353
|
"data-state": $409067139f391064$var$getState(open),
|
15354
15354
|
"data-disabled": disabled ? '' : undefined
|
15355
15355
|
}, collapsibleProps, {
|
@@ -15362,7 +15362,7 @@ const $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ React.forwardRef
|
|
15362
15362
|
const $409067139f391064$export$c135dce7b15bbbdc = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
15363
15363
|
const { __scopeCollapsible: __scopeCollapsible , ...triggerProps } = props;
|
15364
15364
|
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$TRIGGER_NAME, __scopeCollapsible);
|
15365
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$L({
|
15365
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends$L({
|
15366
15366
|
type: "button",
|
15367
15367
|
"aria-controls": context.contentId,
|
15368
15368
|
"aria-expanded": context.open || false,
|
@@ -15438,7 +15438,7 @@ const $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ React.forwardRef
|
|
15438
15438
|
context.open,
|
15439
15439
|
present
|
15440
15440
|
]);
|
15441
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
15441
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
15442
15442
|
"data-state": $409067139f391064$var$getState(context.open),
|
15443
15443
|
"data-disabled": context.disabled ? '' : undefined,
|
15444
15444
|
id: context.contentId,
|
@@ -15647,7 +15647,7 @@ const $ce77a8961b41be9e$export$d7b12c4107be0d61 = /*#__PURE__*/ React.forwardRef
|
|
15647
15647
|
scope: __scopeRadio,
|
15648
15648
|
checked: checked,
|
15649
15649
|
disabled: disabled
|
15650
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$L({
|
15650
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends$L({
|
15651
15651
|
type: "button",
|
15652
15652
|
role: "radio",
|
15653
15653
|
"aria-checked": checked,
|
@@ -15690,7 +15690,7 @@ const $ce77a8961b41be9e$export$d35a9ffa9a04f9e7 = /*#__PURE__*/ React.forwardRef
|
|
15690
15690
|
const context = $ce77a8961b41be9e$var$useRadioContext($ce77a8961b41be9e$var$INDICATOR_NAME, __scopeRadio);
|
15691
15691
|
return /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
15692
15692
|
present: forceMount || context.checked
|
15693
|
-
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$L({
|
15693
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends$L({
|
15694
15694
|
"data-state": $ce77a8961b41be9e$var$getState(context.checked),
|
15695
15695
|
"data-disabled": context.disabled ? '' : undefined
|
15696
15696
|
}, indicatorProps, {
|
@@ -15780,7 +15780,7 @@ const $f99a8c78507165f7$export$a98f0dcb43a68a25 = /*#__PURE__*/ React.forwardRef
|
|
15780
15780
|
orientation: orientation,
|
15781
15781
|
dir: direction,
|
15782
15782
|
loop: loop
|
15783
|
-
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$L({
|
15783
|
+
}), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.div, _extends$L({
|
15784
15784
|
role: "radiogroup",
|
15785
15785
|
"aria-required": required,
|
15786
15786
|
"aria-orientation": orientation,
|
@@ -15970,7 +15970,7 @@ var TextInput = function (_a) {
|
|
15970
15970
|
};
|
15971
15971
|
|
15972
15972
|
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
15973
|
-
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$L({}, props, {
|
15973
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.span, _extends$L({}, props, {
|
15974
15974
|
ref: forwardedRef,
|
15975
15975
|
style: {
|
15976
15976
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
@@ -16107,7 +16107,7 @@ const $a093c7e1ec25a057$export$8c610744efcf8a1d = /*#__PURE__*/ React.forwardRef
|
|
16107
16107
|
]);
|
16108
16108
|
return /*#__PURE__*/ React.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7, _extends$L({
|
16109
16109
|
asChild: true
|
16110
|
-
}, popperScope), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$L({
|
16110
|
+
}, popperScope), /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034$1.button, _extends$L({
|
16111
16111
|
// We purposefully avoid adding `type=button` here because tooltip triggers are also
|
16112
16112
|
// commonly anchors and the anchor `type` attribute signifies MIME type.
|
16113
16113
|
"aria-describedby": context.open ? context.contentId : undefined,
|
@@ -16315,7 +16315,7 @@ const $a093c7e1ec25a057$var$TooltipContentImpl = /*#__PURE__*/ React.forwardRef(
|
|
16315
16315
|
// re-namespace exposed content custom property
|
16316
16316
|
['--radix-tooltip-content-transform-origin']: 'var(--radix-popper-transform-origin)'
|
16317
16317
|
}
|
16318
|
-
}), /*#__PURE__*/ React.createElement($5e63c961fc1ce211$export$d9f1ccf0bdb05d45, null, children), /*#__PURE__*/ React.createElement($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, {
|
16318
|
+
}), /*#__PURE__*/ React.createElement($5e63c961fc1ce211$export$d9f1ccf0bdb05d45$1, null, children), /*#__PURE__*/ React.createElement($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, {
|
16319
16319
|
scope: __scopeTooltip,
|
16320
16320
|
isInside: true
|
16321
16321
|
}, /*#__PURE__*/ React.createElement($ea1ef594cf570d83$export$be92b6f5f03c0fe9, {
|
@@ -45272,589 +45272,237 @@ var generateSchema = function (inputs) {
|
|
45272
45272
|
});
|
45273
45273
|
};
|
45274
45274
|
|
45275
|
-
|
45276
|
-
|
45277
|
-
|
45278
|
-
|
45279
|
-
|
45280
|
-
|
45281
|
-
|
45282
|
-
|
45283
|
-
|
45284
|
-
|
45285
|
-
|
45286
|
-
|
45287
|
-
|
45288
|
-
|
45289
|
-
|
45290
|
-
|
45291
|
-
|
45292
|
-
|
45293
|
-
|
45294
|
-
|
45295
|
-
}
|
45296
|
-
|
45297
|
-
return target;
|
45298
|
-
};
|
45299
|
-
return _extends.apply(this, arguments);
|
45300
|
-
}
|
45301
|
-
|
45302
|
-
/*
|
45303
|
-
The MIT License (MIT)
|
45304
|
-
|
45305
|
-
Copyright (c) 2015 instructure-react
|
45306
|
-
|
45307
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
45308
|
-
of this software and associated documentation files (the "Software"), to deal
|
45309
|
-
in the Software without restriction, including without limitation the rights
|
45310
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
45311
|
-
copies of the Software, and to permit persons to whom the Software is
|
45312
|
-
furnished to do so, subject to the following conditions:
|
45313
|
-
|
45314
|
-
The above copyright notice and this permission notice shall be included in all
|
45315
|
-
copies or substantial portions of the Software.
|
45316
|
-
|
45317
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
45318
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
45319
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
45320
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
45321
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
45322
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
45323
|
-
SOFTWARE.
|
45324
|
-
*/
|
45325
|
-
var uncheckedIcon = React__default["default"].createElement('svg', {
|
45326
|
-
viewBox: "-2 -5 14 20",
|
45327
|
-
height: "100%",
|
45328
|
-
width: "100%",
|
45329
|
-
style: {
|
45330
|
-
position: "absolute",
|
45331
|
-
top: 0
|
45332
|
-
}
|
45333
|
-
}, React__default["default"].createElement('path', {
|
45334
|
-
d: "M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",
|
45335
|
-
fill: "#fff",
|
45336
|
-
fillRule: "evenodd"
|
45337
|
-
}));
|
45338
|
-
var checkedIcon = React__default["default"].createElement('svg', {
|
45339
|
-
height: "100%",
|
45340
|
-
width: "100%",
|
45341
|
-
viewBox: "-2 -5 17 21",
|
45342
|
-
style: {
|
45343
|
-
position: "absolute",
|
45344
|
-
top: 0
|
45345
|
-
}
|
45346
|
-
}, React__default["default"].createElement('path', {
|
45347
|
-
d: "M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",
|
45348
|
-
fill: "#fff",
|
45349
|
-
fillRule: "evenodd"
|
45350
|
-
}));
|
45351
|
-
|
45352
|
-
function createBackgroundColor(pos, checkedPos, uncheckedPos, offColor, onColor) {
|
45353
|
-
var relativePos = (pos - uncheckedPos) / (checkedPos - uncheckedPos);
|
45354
|
-
|
45355
|
-
if (relativePos === 0) {
|
45356
|
-
return offColor;
|
45357
|
-
}
|
45358
|
-
|
45359
|
-
if (relativePos === 1) {
|
45360
|
-
return onColor;
|
45361
|
-
}
|
45362
|
-
|
45363
|
-
var newColor = "#";
|
45364
|
-
|
45365
|
-
for (var i = 1; i < 6; i += 2) {
|
45366
|
-
var offComponent = parseInt(offColor.substr(i, 2), 16);
|
45367
|
-
var onComponent = parseInt(onColor.substr(i, 2), 16);
|
45368
|
-
var weightedValue = Math.round((1 - relativePos) * offComponent + relativePos * onComponent);
|
45369
|
-
var newComponent = weightedValue.toString(16);
|
45370
|
-
|
45371
|
-
if (newComponent.length === 1) {
|
45372
|
-
newComponent = "0" + newComponent;
|
45275
|
+
/* -------------------------------------------------------------------------------------------------
|
45276
|
+
* Slot
|
45277
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
45278
|
+
const { children: children , ...slotProps } = props;
|
45279
|
+
const childrenArray = React.Children.toArray(children);
|
45280
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
45281
|
+
if (slottable) {
|
45282
|
+
// the new element to render is the one passed as a child of `Slottable`
|
45283
|
+
const newElement = slottable.props.children;
|
45284
|
+
const newChildren = childrenArray.map((child)=>{
|
45285
|
+
if (child === slottable) {
|
45286
|
+
// because the new element will be the one rendered, we are only interested
|
45287
|
+
// in grabbing its children (`newElement.props.children`)
|
45288
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
45289
|
+
return /*#__PURE__*/ React.isValidElement(newElement) ? newElement.props.children : null;
|
45290
|
+
} else return child;
|
45291
|
+
});
|
45292
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$L({}, slotProps, {
|
45293
|
+
ref: forwardedRef
|
45294
|
+
}), /*#__PURE__*/ React.isValidElement(newElement) ? /*#__PURE__*/ React.cloneElement(newElement, undefined, newChildren) : null);
|
45373
45295
|
}
|
45374
|
-
|
45375
|
-
|
45376
|
-
|
45377
|
-
|
45378
|
-
|
45379
|
-
|
45380
|
-
|
45381
|
-
|
45382
|
-
|
45383
|
-
return
|
45384
|
-
|
45385
|
-
|
45386
|
-
|
45387
|
-
|
45388
|
-
|
45389
|
-
|
45390
|
-
|
45391
|
-
|
45392
|
-
|
45393
|
-
|
45394
|
-
|
45395
|
-
function getBackgroundColor(pos, checkedPos, uncheckedPos, offColor, onColor) {
|
45396
|
-
var sixDigitOffColor = convertShorthandColor(offColor);
|
45397
|
-
var sixDigitOnColor = convertShorthandColor(onColor);
|
45398
|
-
return createBackgroundColor(pos, checkedPos, uncheckedPos, sixDigitOffColor, sixDigitOnColor);
|
45399
|
-
}
|
45400
|
-
|
45401
|
-
// Make sure color props are strings that start with "#" since other ways to write colors are not supported.
|
45402
|
-
var hexColorPropType = function (props, propName, componentName) {
|
45403
|
-
var prop = props[propName];
|
45404
|
-
|
45405
|
-
if (typeof prop !== "string" || prop[0] !== "#" || prop.length !== 4 && prop.length !== 7) {
|
45406
|
-
return new Error("Invalid prop '" + propName + "' supplied to '" + componentName + "'. '" + propName + "' has to be either a 3-digit or 6-digit hex-color string. Valid examples: '#abc', '#123456'");
|
45407
|
-
}
|
45408
|
-
|
45409
|
-
return null;
|
45296
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$L({}, slotProps, {
|
45297
|
+
ref: forwardedRef
|
45298
|
+
}), children);
|
45299
|
+
});
|
45300
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
45301
|
+
/* -------------------------------------------------------------------------------------------------
|
45302
|
+
* SlotClone
|
45303
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
45304
|
+
const { children: children , ...slotProps } = props;
|
45305
|
+
if (/*#__PURE__*/ React.isValidElement(children)) return /*#__PURE__*/ React.cloneElement(children, {
|
45306
|
+
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
45307
|
+
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
45308
|
+
});
|
45309
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
45310
|
+
});
|
45311
|
+
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
45312
|
+
/* -------------------------------------------------------------------------------------------------
|
45313
|
+
* Slottable
|
45314
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
45315
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
45410
45316
|
};
|
45411
|
-
|
45412
|
-
|
45413
|
-
var target = {};
|
45414
|
-
|
45415
|
-
for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k];
|
45416
|
-
|
45417
|
-
return target;
|
45317
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
45318
|
+
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
45418
45319
|
}
|
45419
|
-
|
45420
|
-
|
45421
|
-
|
45422
|
-
|
45423
|
-
var height = props.height;
|
45424
|
-
var width = props.width;
|
45425
|
-
var handleDiameter = props.handleDiameter;
|
45426
|
-
var checked = props.checked;
|
45427
|
-
this.$handleDiameter = handleDiameter || height - 2;
|
45428
|
-
this.$checkedPos = Math.max(width - height, width - (height + this.$handleDiameter) / 2);
|
45429
|
-
this.$uncheckedPos = Math.max(0, (height - this.$handleDiameter) / 2);
|
45430
|
-
this.state = {
|
45431
|
-
$pos: checked ? this.$checkedPos : this.$uncheckedPos
|
45320
|
+
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
45321
|
+
// all child props should override
|
45322
|
+
const overrideProps = {
|
45323
|
+
...childProps
|
45432
45324
|
};
|
45433
|
-
|
45434
|
-
|
45435
|
-
|
45436
|
-
|
45437
|
-
|
45438
|
-
|
45439
|
-
|
45440
|
-
|
45441
|
-
|
45442
|
-
|
45443
|
-
|
45444
|
-
|
45445
|
-
|
45446
|
-
|
45447
|
-
|
45448
|
-
|
45449
|
-
|
45450
|
-
|
45451
|
-
|
45452
|
-
|
45453
|
-
ReactSwitch.prototype.componentDidMount = function componentDidMount() {
|
45454
|
-
this.$isMounted = true;
|
45455
|
-
};
|
45456
|
-
|
45457
|
-
ReactSwitch.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
|
45458
|
-
if (prevProps.checked === this.props.checked) {
|
45459
|
-
return;
|
45325
|
+
for(const propName in childProps){
|
45326
|
+
const slotPropValue = slotProps[propName];
|
45327
|
+
const childPropValue = childProps[propName];
|
45328
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
45329
|
+
if (isHandler) {
|
45330
|
+
// if the handler exists on both, we compose them
|
45331
|
+
if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
|
45332
|
+
childPropValue(...args);
|
45333
|
+
slotPropValue(...args);
|
45334
|
+
};
|
45335
|
+
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
45336
|
+
} else if (propName === 'style') overrideProps[propName] = {
|
45337
|
+
...slotPropValue,
|
45338
|
+
...childPropValue
|
45339
|
+
};
|
45340
|
+
else if (propName === 'className') overrideProps[propName] = [
|
45341
|
+
slotPropValue,
|
45342
|
+
childPropValue
|
45343
|
+
].filter(Boolean).join(' ');
|
45460
45344
|
}
|
45345
|
+
return {
|
45346
|
+
...slotProps,
|
45347
|
+
...overrideProps
|
45348
|
+
};
|
45349
|
+
}
|
45461
45350
|
|
45462
|
-
|
45463
|
-
|
45464
|
-
|
45351
|
+
const $8927f6f2acc4f386$var$NODES = [
|
45352
|
+
'a',
|
45353
|
+
'button',
|
45354
|
+
'div',
|
45355
|
+
'form',
|
45356
|
+
'h2',
|
45357
|
+
'h3',
|
45358
|
+
'img',
|
45359
|
+
'input',
|
45360
|
+
'label',
|
45361
|
+
'li',
|
45362
|
+
'nav',
|
45363
|
+
'ol',
|
45364
|
+
'p',
|
45365
|
+
'span',
|
45366
|
+
'svg',
|
45367
|
+
'ul'
|
45368
|
+
]; // Temporary while we await merge of this fix:
|
45369
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
45370
|
+
// prettier-ignore
|
45371
|
+
/* -------------------------------------------------------------------------------------------------
|
45372
|
+
* Primitive
|
45373
|
+
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
45374
|
+
const Node = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
45375
|
+
const { asChild: asChild , ...primitiveProps } = props;
|
45376
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
45377
|
+
React.useEffect(()=>{
|
45378
|
+
window[Symbol.for('radix-ui')] = true;
|
45379
|
+
}, []);
|
45380
|
+
return /*#__PURE__*/ React.createElement(Comp, _extends$L({}, primitiveProps, {
|
45381
|
+
ref: forwardedRef
|
45382
|
+
}));
|
45465
45383
|
});
|
45466
|
-
|
45467
|
-
|
45468
|
-
|
45469
|
-
|
45470
|
-
|
45384
|
+
Node.displayName = `Primitive.${node}`;
|
45385
|
+
return {
|
45386
|
+
...primitive,
|
45387
|
+
[node]: Node
|
45388
|
+
};
|
45389
|
+
}, {});
|
45471
45390
|
|
45472
|
-
|
45473
|
-
|
45474
|
-
|
45475
|
-
|
45476
|
-
|
45477
|
-
|
45391
|
+
/* -------------------------------------------------------------------------------------------------
|
45392
|
+
* Switch
|
45393
|
+
* -----------------------------------------------------------------------------------------------*/ const $6be4966fd9bbc698$var$SWITCH_NAME = 'Switch';
|
45394
|
+
const [$6be4966fd9bbc698$var$createSwitchContext, $6be4966fd9bbc698$export$cf7f5f17f69cbd43] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($6be4966fd9bbc698$var$SWITCH_NAME);
|
45395
|
+
const [$6be4966fd9bbc698$var$SwitchProvider, $6be4966fd9bbc698$var$useSwitchContext] = $6be4966fd9bbc698$var$createSwitchContext($6be4966fd9bbc698$var$SWITCH_NAME);
|
45396
|
+
const $6be4966fd9bbc698$export$b5d5cf8927ab7262 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
45397
|
+
const { __scopeSwitch: __scopeSwitch , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...switchProps } = props;
|
45398
|
+
const [button, setButton] = React.useState(null);
|
45399
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setButton(node)
|
45400
|
+
);
|
45401
|
+
const hasConsumerStoppedPropagationRef = React.useRef(false); // We set this to true by default so that events bubble to forms without JS (SSR)
|
45402
|
+
const isFormControl = button ? Boolean(button.closest('form')) : true;
|
45403
|
+
const [checked = false, setChecked] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
45404
|
+
prop: checkedProp,
|
45405
|
+
defaultProp: defaultChecked,
|
45406
|
+
onChange: onCheckedChange
|
45478
45407
|
});
|
45479
|
-
|
45480
|
-
|
45481
|
-
|
45482
|
-
|
45483
|
-
|
45484
|
-
|
45485
|
-
|
45486
|
-
|
45487
|
-
|
45488
|
-
|
45489
|
-
|
45490
|
-
|
45491
|
-
|
45492
|
-
|
45493
|
-
|
45494
|
-
|
45495
|
-
|
45496
|
-
|
45497
|
-
|
45498
|
-
|
45499
|
-
|
45500
|
-
|
45501
|
-
|
45502
|
-
|
45503
|
-
|
45504
|
-
|
45505
|
-
|
45506
|
-
|
45507
|
-
|
45508
|
-
|
45509
|
-
|
45510
|
-
|
45511
|
-
|
45512
|
-
|
45513
|
-
|
45514
|
-
|
45515
|
-
Set position state back to the previous position even if user drags the switch with intention to change the state.
|
45516
|
-
This is to prevent the switch from getting stuck in the middle if the event isn't handled in the onChange callback.
|
45517
|
-
*/
|
45518
|
-
|
45519
|
-
var prevPos = this.props.checked ? this.$checkedPos : this.$uncheckedPos;
|
45520
|
-
this.setState({
|
45521
|
-
$pos: prevPos
|
45522
|
-
}); // Act as if the user clicked the handle if they didn't drag it _or_ the dragged it for less than 250ms
|
45523
|
-
|
45524
|
-
var timeSinceStart = Date.now() - $dragStartingTime;
|
45525
|
-
var isSimulatedClick = !$isDragging || timeSinceStart < 250; // Handle when the user has dragged the switch more than halfway from either side
|
45526
|
-
|
45527
|
-
var isDraggedHalfway = checked && $pos <= halfwayCheckpoint || !checked && $pos >= halfwayCheckpoint;
|
45528
|
-
|
45529
|
-
if (isSimulatedClick || isDraggedHalfway) {
|
45530
|
-
this.$onChange(event);
|
45531
|
-
}
|
45532
|
-
|
45533
|
-
if (this.$isMounted) {
|
45534
|
-
this.setState({
|
45535
|
-
$isDragging: false,
|
45536
|
-
$hasOutline: false
|
45537
|
-
});
|
45538
|
-
}
|
45539
|
-
|
45540
|
-
this.$lastDragAt = Date.now();
|
45541
|
-
};
|
45542
|
-
|
45543
|
-
ReactSwitch.prototype.$onMouseDown = function $onMouseDown(event) {
|
45544
|
-
event.preventDefault(); // Ignore right click and scroll
|
45545
|
-
|
45546
|
-
if (typeof event.button === "number" && event.button !== 0) {
|
45547
|
-
return;
|
45548
|
-
}
|
45549
|
-
|
45550
|
-
this.$onDragStart(event.clientX);
|
45551
|
-
window.addEventListener("mousemove", this.$onMouseMove);
|
45552
|
-
window.addEventListener("mouseup", this.$onMouseUp);
|
45553
|
-
};
|
45554
|
-
|
45555
|
-
ReactSwitch.prototype.$onMouseMove = function $onMouseMove(event) {
|
45556
|
-
event.preventDefault();
|
45557
|
-
this.$onDrag(event.clientX);
|
45558
|
-
};
|
45559
|
-
|
45560
|
-
ReactSwitch.prototype.$onMouseUp = function $onMouseUp(event) {
|
45561
|
-
this.$onDragStop(event);
|
45562
|
-
window.removeEventListener("mousemove", this.$onMouseMove);
|
45563
|
-
window.removeEventListener("mouseup", this.$onMouseUp);
|
45564
|
-
};
|
45565
|
-
|
45566
|
-
ReactSwitch.prototype.$onTouchStart = function $onTouchStart(event) {
|
45567
|
-
this.$checkedStateFromDragging = null;
|
45568
|
-
this.$onDragStart(event.touches[0].clientX);
|
45569
|
-
};
|
45570
|
-
|
45571
|
-
ReactSwitch.prototype.$onTouchMove = function $onTouchMove(event) {
|
45572
|
-
this.$onDrag(event.touches[0].clientX);
|
45573
|
-
};
|
45574
|
-
|
45575
|
-
ReactSwitch.prototype.$onTouchEnd = function $onTouchEnd(event) {
|
45576
|
-
event.preventDefault();
|
45577
|
-
this.$onDragStop(event);
|
45578
|
-
};
|
45579
|
-
|
45580
|
-
ReactSwitch.prototype.$onInputChange = function $onInputChange(event) {
|
45581
|
-
// This condition is unfortunately needed in some browsers where the input's change event might get triggered
|
45582
|
-
// right after the dragstop event is triggered (occurs when dropping over a label element)
|
45583
|
-
if (Date.now() - this.$lastDragAt > 50) {
|
45584
|
-
this.$onChange(event); // Prevent clicking label, but not key activation from setting outline to true - yes, this is absurd
|
45585
|
-
|
45586
|
-
if (Date.now() - this.$lastKeyUpAt > 50) {
|
45587
|
-
if (this.$isMounted) {
|
45588
|
-
this.setState({
|
45589
|
-
$hasOutline: false
|
45590
|
-
});
|
45408
|
+
return /*#__PURE__*/ React.createElement($6be4966fd9bbc698$var$SwitchProvider, {
|
45409
|
+
scope: __scopeSwitch,
|
45410
|
+
checked: checked,
|
45411
|
+
disabled: disabled
|
45412
|
+
}, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$L({
|
45413
|
+
type: "button",
|
45414
|
+
role: "switch",
|
45415
|
+
"aria-checked": checked,
|
45416
|
+
"aria-required": required,
|
45417
|
+
"data-state": $6be4966fd9bbc698$var$getState(checked),
|
45418
|
+
"data-disabled": disabled ? '' : undefined,
|
45419
|
+
disabled: disabled,
|
45420
|
+
value: value
|
45421
|
+
}, switchProps, {
|
45422
|
+
ref: composedRefs,
|
45423
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event)=>{
|
45424
|
+
setChecked((prevChecked)=>!prevChecked
|
45425
|
+
);
|
45426
|
+
if (isFormControl) {
|
45427
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(); // if switch is in a form, stop propagation from the button so that we only propagate
|
45428
|
+
// one click event (from the input). We propagate changes from an input so that native
|
45429
|
+
// form validation works and form events reflect switch updates.
|
45430
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
45431
|
+
}
|
45432
|
+
})
|
45433
|
+
})), isFormControl && /*#__PURE__*/ React.createElement($6be4966fd9bbc698$var$BubbleInput, {
|
45434
|
+
control: button,
|
45435
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
45436
|
+
name: name,
|
45437
|
+
value: value,
|
45438
|
+
checked: checked,
|
45439
|
+
required: required,
|
45440
|
+
disabled: disabled // We transform because the input is absolutely positioned but we have
|
45441
|
+
,
|
45442
|
+
style: {
|
45443
|
+
transform: 'translateX(-100%)'
|
45591
45444
|
}
|
45592
|
-
|
45593
|
-
}
|
45594
|
-
};
|
45595
|
-
|
45596
|
-
ReactSwitch.prototype.$onKeyUp = function $onKeyUp() {
|
45597
|
-
this.$lastKeyUpAt = Date.now();
|
45598
|
-
};
|
45599
|
-
|
45600
|
-
ReactSwitch.prototype.$setHasOutline = function $setHasOutline() {
|
45601
|
-
this.setState({
|
45602
|
-
$hasOutline: true
|
45603
|
-
});
|
45604
|
-
};
|
45605
|
-
|
45606
|
-
ReactSwitch.prototype.$unsetHasOutline = function $unsetHasOutline() {
|
45607
|
-
this.setState({
|
45608
|
-
$hasOutline: false
|
45609
|
-
});
|
45610
|
-
};
|
45611
|
-
|
45612
|
-
ReactSwitch.prototype.$getInputRef = function $getInputRef(el) {
|
45613
|
-
this.$inputRef = el;
|
45614
|
-
};
|
45615
|
-
|
45616
|
-
ReactSwitch.prototype.$onClick = function $onClick(event) {
|
45617
|
-
event.preventDefault();
|
45618
|
-
this.$inputRef.focus();
|
45619
|
-
this.$onChange(event);
|
45620
|
-
|
45621
|
-
if (this.$isMounted) {
|
45622
|
-
this.setState({
|
45623
|
-
$hasOutline: false
|
45624
|
-
});
|
45625
|
-
}
|
45626
|
-
};
|
45627
|
-
|
45628
|
-
ReactSwitch.prototype.$onChange = function $onChange(event) {
|
45629
|
-
var ref = this.props;
|
45630
|
-
var checked = ref.checked;
|
45631
|
-
var onChange = ref.onChange;
|
45632
|
-
var id = ref.id;
|
45633
|
-
onChange(!checked, event, id);
|
45634
|
-
};
|
45635
|
-
|
45636
|
-
ReactSwitch.prototype.render = function render() {
|
45637
|
-
var ref = this.props;
|
45638
|
-
var checked = ref.checked;
|
45639
|
-
var disabled = ref.disabled;
|
45640
|
-
var className = ref.className;
|
45641
|
-
var offColor = ref.offColor;
|
45642
|
-
var onColor = ref.onColor;
|
45643
|
-
var offHandleColor = ref.offHandleColor;
|
45644
|
-
var onHandleColor = ref.onHandleColor;
|
45645
|
-
var checkedIcon = ref.checkedIcon;
|
45646
|
-
var uncheckedIcon = ref.uncheckedIcon;
|
45647
|
-
var checkedHandleIcon = ref.checkedHandleIcon;
|
45648
|
-
var uncheckedHandleIcon = ref.uncheckedHandleIcon;
|
45649
|
-
var boxShadow = ref.boxShadow;
|
45650
|
-
var activeBoxShadow = ref.activeBoxShadow;
|
45651
|
-
var height = ref.height;
|
45652
|
-
var width = ref.width;
|
45653
|
-
var borderRadius = ref.borderRadius;
|
45654
|
-
ref.handleDiameter;
|
45655
|
-
var rest$1 = objectWithoutProperties(ref, ["checked", "disabled", "className", "offColor", "onColor", "offHandleColor", "onHandleColor", "checkedIcon", "uncheckedIcon", "checkedHandleIcon", "uncheckedHandleIcon", "boxShadow", "activeBoxShadow", "height", "width", "borderRadius", "handleDiameter"]);
|
45656
|
-
var rest = rest$1;
|
45657
|
-
var ref$1 = this.state;
|
45658
|
-
var $pos = ref$1.$pos;
|
45659
|
-
var $isDragging = ref$1.$isDragging;
|
45660
|
-
var $hasOutline = ref$1.$hasOutline;
|
45661
|
-
var rootStyle = {
|
45662
|
-
position: "relative",
|
45663
|
-
display: "inline-block",
|
45664
|
-
textAlign: "left",
|
45665
|
-
opacity: disabled ? 0.5 : 1,
|
45666
|
-
direction: "ltr",
|
45667
|
-
borderRadius: height / 2,
|
45668
|
-
WebkitTransition: "opacity 0.25s",
|
45669
|
-
MozTransition: "opacity 0.25s",
|
45670
|
-
transition: "opacity 0.25s",
|
45671
|
-
touchAction: "none",
|
45672
|
-
WebkitTapHighlightColor: "rgba(0, 0, 0, 0)",
|
45673
|
-
WebkitUserSelect: "none",
|
45674
|
-
MozUserSelect: "none",
|
45675
|
-
msUserSelect: "none",
|
45676
|
-
userSelect: "none"
|
45677
|
-
};
|
45678
|
-
var backgroundStyle = {
|
45679
|
-
height: height,
|
45680
|
-
width: width,
|
45681
|
-
margin: Math.max(0, (this.$handleDiameter - height) / 2),
|
45682
|
-
position: "relative",
|
45683
|
-
background: getBackgroundColor($pos, this.$checkedPos, this.$uncheckedPos, offColor, onColor),
|
45684
|
-
borderRadius: typeof borderRadius === "number" ? borderRadius : height / 2,
|
45685
|
-
cursor: disabled ? "default" : "pointer",
|
45686
|
-
WebkitTransition: $isDragging ? null : "background 0.25s",
|
45687
|
-
MozTransition: $isDragging ? null : "background 0.25s",
|
45688
|
-
transition: $isDragging ? null : "background 0.25s"
|
45689
|
-
};
|
45690
|
-
var checkedIconStyle = {
|
45691
|
-
height: height,
|
45692
|
-
width: Math.min(height * 1.5, width - (this.$handleDiameter + height) / 2 + 1),
|
45693
|
-
position: "relative",
|
45694
|
-
opacity: ($pos - this.$uncheckedPos) / (this.$checkedPos - this.$uncheckedPos),
|
45695
|
-
pointerEvents: "none",
|
45696
|
-
WebkitTransition: $isDragging ? null : "opacity 0.25s",
|
45697
|
-
MozTransition: $isDragging ? null : "opacity 0.25s",
|
45698
|
-
transition: $isDragging ? null : "opacity 0.25s"
|
45699
|
-
};
|
45700
|
-
var uncheckedIconStyle = {
|
45701
|
-
height: height,
|
45702
|
-
width: Math.min(height * 1.5, width - (this.$handleDiameter + height) / 2 + 1),
|
45703
|
-
position: "absolute",
|
45704
|
-
opacity: 1 - ($pos - this.$uncheckedPos) / (this.$checkedPos - this.$uncheckedPos),
|
45705
|
-
right: 0,
|
45706
|
-
top: 0,
|
45707
|
-
pointerEvents: "none",
|
45708
|
-
WebkitTransition: $isDragging ? null : "opacity 0.25s",
|
45709
|
-
MozTransition: $isDragging ? null : "opacity 0.25s",
|
45710
|
-
transition: $isDragging ? null : "opacity 0.25s"
|
45711
|
-
};
|
45712
|
-
var handleStyle = {
|
45713
|
-
height: this.$handleDiameter,
|
45714
|
-
width: this.$handleDiameter,
|
45715
|
-
background: getBackgroundColor($pos, this.$checkedPos, this.$uncheckedPos, offHandleColor, onHandleColor),
|
45716
|
-
display: "inline-block",
|
45717
|
-
cursor: disabled ? "default" : "pointer",
|
45718
|
-
borderRadius: typeof borderRadius === "number" ? borderRadius - 1 : "50%",
|
45719
|
-
position: "absolute",
|
45720
|
-
transform: "translateX(" + $pos + "px)",
|
45721
|
-
top: Math.max(0, (height - this.$handleDiameter) / 2),
|
45722
|
-
outline: 0,
|
45723
|
-
boxShadow: $hasOutline ? activeBoxShadow : boxShadow,
|
45724
|
-
border: 0,
|
45725
|
-
WebkitTransition: $isDragging ? null : "background-color 0.25s, transform 0.25s, box-shadow 0.15s",
|
45726
|
-
MozTransition: $isDragging ? null : "background-color 0.25s, transform 0.25s, box-shadow 0.15s",
|
45727
|
-
transition: $isDragging ? null : "background-color 0.25s, transform 0.25s, box-shadow 0.15s"
|
45728
|
-
};
|
45729
|
-
var uncheckedHandleIconStyle = {
|
45730
|
-
height: this.$handleDiameter,
|
45731
|
-
width: this.$handleDiameter,
|
45732
|
-
opacity: Math.max((1 - ($pos - this.$uncheckedPos) / (this.$checkedPos - this.$uncheckedPos) - 0.5) * 2, 0),
|
45733
|
-
position: "absolute",
|
45734
|
-
left: 0,
|
45735
|
-
top: 0,
|
45736
|
-
pointerEvents: "none",
|
45737
|
-
WebkitTransition: $isDragging ? null : "opacity 0.25s",
|
45738
|
-
MozTransition: $isDragging ? null : "opacity 0.25s",
|
45739
|
-
transition: $isDragging ? null : "opacity 0.25s"
|
45740
|
-
};
|
45741
|
-
var checkedHandleIconStyle = {
|
45742
|
-
height: this.$handleDiameter,
|
45743
|
-
width: this.$handleDiameter,
|
45744
|
-
opacity: Math.max((($pos - this.$uncheckedPos) / (this.$checkedPos - this.$uncheckedPos) - 0.5) * 2, 0),
|
45745
|
-
position: "absolute",
|
45746
|
-
left: 0,
|
45747
|
-
top: 0,
|
45748
|
-
pointerEvents: "none",
|
45749
|
-
WebkitTransition: $isDragging ? null : "opacity 0.25s",
|
45750
|
-
MozTransition: $isDragging ? null : "opacity 0.25s",
|
45751
|
-
transition: $isDragging ? null : "opacity 0.25s"
|
45752
|
-
};
|
45753
|
-
var inputStyle = {
|
45754
|
-
border: 0,
|
45755
|
-
clip: "rect(0 0 0 0)",
|
45756
|
-
height: 1,
|
45757
|
-
margin: -1,
|
45758
|
-
overflow: "hidden",
|
45759
|
-
padding: 0,
|
45760
|
-
position: "absolute",
|
45761
|
-
width: 1
|
45762
|
-
};
|
45763
|
-
return React__default["default"].createElement('div', {
|
45764
|
-
className: className,
|
45765
|
-
style: rootStyle
|
45766
|
-
}, React__default["default"].createElement('div', {
|
45767
|
-
className: "react-switch-bg",
|
45768
|
-
style: backgroundStyle,
|
45769
|
-
onClick: disabled ? null : this.$onClick,
|
45770
|
-
onMouseDown: function (e) {
|
45771
|
-
return e.preventDefault();
|
45772
|
-
}
|
45773
|
-
}, checkedIcon && React__default["default"].createElement('div', {
|
45774
|
-
style: checkedIconStyle
|
45775
|
-
}, checkedIcon), uncheckedIcon && React__default["default"].createElement('div', {
|
45776
|
-
style: uncheckedIconStyle
|
45777
|
-
}, uncheckedIcon)), React__default["default"].createElement('div', {
|
45778
|
-
className: "react-switch-handle",
|
45779
|
-
style: handleStyle,
|
45780
|
-
onClick: function (e) {
|
45781
|
-
return e.preventDefault();
|
45782
|
-
},
|
45783
|
-
onMouseDown: disabled ? null : this.$onMouseDown,
|
45784
|
-
onTouchStart: disabled ? null : this.$onTouchStart,
|
45785
|
-
onTouchMove: disabled ? null : this.$onTouchMove,
|
45786
|
-
onTouchEnd: disabled ? null : this.$onTouchEnd,
|
45787
|
-
onTouchCancel: disabled ? null : this.$unsetHasOutline
|
45788
|
-
}, uncheckedHandleIcon && React__default["default"].createElement('div', {
|
45789
|
-
style: uncheckedHandleIconStyle
|
45790
|
-
}, uncheckedHandleIcon), checkedHandleIcon && React__default["default"].createElement('div', {
|
45791
|
-
style: checkedHandleIconStyle
|
45792
|
-
}, checkedHandleIcon)), React__default["default"].createElement('input', _extends({}, {
|
45793
|
-
type: "checkbox",
|
45794
|
-
role: "switch",
|
45795
|
-
'aria-checked': checked,
|
45796
|
-
checked: checked,
|
45797
|
-
disabled: disabled,
|
45798
|
-
style: inputStyle
|
45799
|
-
}, rest, {
|
45800
|
-
ref: this.$getInputRef,
|
45801
|
-
onFocus: this.$setHasOutline,
|
45802
|
-
onBlur: this.$unsetHasOutline,
|
45803
|
-
onKeyUp: this.$onKeyUp,
|
45804
|
-
onChange: this.$onInputChange
|
45805
|
-
})));
|
45806
|
-
};
|
45807
|
-
|
45808
|
-
return ReactSwitch;
|
45809
|
-
}(React__default["default"].Component);
|
45810
|
-
|
45811
|
-
ReactSwitch.propTypes = {
|
45812
|
-
checked: require$$7$1.bool.isRequired,
|
45813
|
-
onChange: require$$7$1.func.isRequired,
|
45814
|
-
disabled: require$$7$1.bool,
|
45815
|
-
offColor: hexColorPropType,
|
45816
|
-
onColor: hexColorPropType,
|
45817
|
-
offHandleColor: hexColorPropType,
|
45818
|
-
onHandleColor: hexColorPropType,
|
45819
|
-
handleDiameter: require$$7$1.number,
|
45820
|
-
uncheckedIcon: require$$7$1.oneOfType([require$$7$1.bool, require$$7$1.element]),
|
45821
|
-
checkedIcon: require$$7$1.oneOfType([require$$7$1.bool, require$$7$1.element]),
|
45822
|
-
boxShadow: require$$7$1.string,
|
45823
|
-
borderRadius: require$$7$1.number,
|
45824
|
-
activeBoxShadow: require$$7$1.string,
|
45825
|
-
uncheckedHandleIcon: require$$7$1.element,
|
45826
|
-
checkedHandleIcon: require$$7$1.element,
|
45827
|
-
height: require$$7$1.number,
|
45828
|
-
width: require$$7$1.number,
|
45829
|
-
id: require$$7$1.string,
|
45830
|
-
className: require$$7$1.string
|
45831
|
-
};
|
45832
|
-
ReactSwitch.defaultProps = {
|
45833
|
-
disabled: false,
|
45834
|
-
offColor: "#888",
|
45835
|
-
onColor: "#080",
|
45836
|
-
offHandleColor: "#fff",
|
45837
|
-
onHandleColor: "#fff",
|
45838
|
-
uncheckedIcon: uncheckedIcon,
|
45839
|
-
checkedIcon: checkedIcon,
|
45840
|
-
boxShadow: null,
|
45841
|
-
activeBoxShadow: "0 0 2px 3px #3bf",
|
45842
|
-
height: 28,
|
45843
|
-
width: 56
|
45844
|
-
};
|
45845
|
-
|
45846
|
-
exports["default"] = ReactSwitch;
|
45445
|
+
}));
|
45847
45446
|
});
|
45848
|
-
|
45849
|
-
|
45850
|
-
|
45851
|
-
|
45852
|
-
}
|
45853
|
-
|
45854
|
-
|
45447
|
+
/* -------------------------------------------------------------------------------------------------
|
45448
|
+
* SwitchThumb
|
45449
|
+
* -----------------------------------------------------------------------------------------------*/ const $6be4966fd9bbc698$var$THUMB_NAME = 'SwitchThumb';
|
45450
|
+
const $6be4966fd9bbc698$export$4d07bf653ea69106 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
45451
|
+
const { __scopeSwitch: __scopeSwitch , ...thumbProps } = props;
|
45452
|
+
const context = $6be4966fd9bbc698$var$useSwitchContext($6be4966fd9bbc698$var$THUMB_NAME, __scopeSwitch);
|
45453
|
+
return /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$L({
|
45454
|
+
"data-state": $6be4966fd9bbc698$var$getState(context.checked),
|
45455
|
+
"data-disabled": context.disabled ? '' : undefined
|
45456
|
+
}, thumbProps, {
|
45457
|
+
ref: forwardedRef
|
45458
|
+
}));
|
45855
45459
|
});
|
45460
|
+
/* ---------------------------------------------------------------------------------------------- */ const $6be4966fd9bbc698$var$BubbleInput = (props)=>{
|
45461
|
+
const { control: control , checked: checked , bubbles: bubbles = true , ...inputProps } = props;
|
45462
|
+
const ref = React.useRef(null);
|
45463
|
+
const prevChecked = $010c2913dbd2fe3d$export$5cae361ad82dce8b(checked);
|
45464
|
+
const controlSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(control); // Bubble checked change to parents (e.g form change event)
|
45465
|
+
React.useEffect(()=>{
|
45466
|
+
const input = ref.current;
|
45467
|
+
const inputProto = window.HTMLInputElement.prototype;
|
45468
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'checked');
|
45469
|
+
const setChecked = descriptor.set;
|
45470
|
+
if (prevChecked !== checked && setChecked) {
|
45471
|
+
const event = new Event('click', {
|
45472
|
+
bubbles: bubbles
|
45473
|
+
});
|
45474
|
+
setChecked.call(input, checked);
|
45475
|
+
input.dispatchEvent(event);
|
45476
|
+
}
|
45477
|
+
}, [
|
45478
|
+
prevChecked,
|
45479
|
+
checked,
|
45480
|
+
bubbles
|
45481
|
+
]);
|
45482
|
+
return /*#__PURE__*/ React.createElement("input", _extends$L({
|
45483
|
+
type: "checkbox",
|
45484
|
+
"aria-hidden": true,
|
45485
|
+
defaultChecked: checked
|
45486
|
+
}, inputProps, {
|
45487
|
+
tabIndex: -1,
|
45488
|
+
ref: ref,
|
45489
|
+
style: {
|
45490
|
+
...props.style,
|
45491
|
+
...controlSize,
|
45492
|
+
position: 'absolute',
|
45493
|
+
pointerEvents: 'none',
|
45494
|
+
opacity: 0,
|
45495
|
+
margin: 0
|
45496
|
+
}
|
45497
|
+
}));
|
45498
|
+
};
|
45499
|
+
function $6be4966fd9bbc698$var$getState(checked) {
|
45500
|
+
return checked ? 'checked' : 'unchecked';
|
45501
|
+
}
|
45502
|
+
const $6be4966fd9bbc698$export$be92b6f5f03c0fe9 = $6be4966fd9bbc698$export$b5d5cf8927ab7262;
|
45503
|
+
const $6be4966fd9bbc698$export$6521433ed15a34db = $6be4966fd9bbc698$export$4d07bf653ea69106;
|
45856
45504
|
|
45857
|
-
var css_248z$9 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.cards-recipe {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));\n grid-auto-rows: auto;\n grid-gap: 1rem;\n}\n\n.cards-recipe-header {\n display: grid;\n grid-template-columns: repeat(auto-fill, 1fr);\n grid-auto-rows: auto;\n grid-gap: 0.75rem;\n}\n\n.cards-container-recipe {\n border: 1px solid rgba(0, 0, 0, 0.125);\n padding: 10px 0 0 0;\n margin: 10px 0 0 0;\n border-radius: 6px;\n}\n\n.cards-container-title-recipe {\n margin: 0 0 10px 0;\n font-size: 17px !important;\n}";
|
45505
|
+
var css_248z$9 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.cards-recipe {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));\n grid-auto-rows: auto;\n grid-gap: 1rem;\n}\n\n.cards-recipe-header {\n display: grid;\n grid-template-columns: repeat(auto-fill, 1fr);\n grid-auto-rows: auto;\n grid-gap: 0.75rem;\n}\n\n.cards-container-recipe {\n border: 1px solid rgba(0, 0, 0, 0.125);\n padding: 10px 0 0 0;\n margin: 10px 0 0 0;\n border-radius: 6px;\n}\n\n.cards-container-title-recipe {\n margin: 0 0 10px 0;\n font-size: 17px !important;\n}\n\n.SwitchRoot {\n all: unset;\n width: 42px;\n height: 25px;\n background-color: var(--slate11);\n border-radius: 9999px;\n position: relative;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.SwitchRoot:focus {\n border: none !important;\n}\n\n.SwitchRoot[data-state=checked] {\n background-color: #1890ff;\n}\n\n.SwitchThumb {\n all: unset;\n display: block;\n width: 21px;\n height: 21px;\n background-color: white;\n border-radius: 100%;\n box-shadow: 0 2px 2px var(--slate11);\n transition: transform 100ms;\n transform: translateX(2px);\n will-change: transform;\n}\n\n.SwitchThumb[data-state=checked] {\n transform: translateX(19px);\n}";
|
45858
45506
|
styleInject(css_248z$9);
|
45859
45507
|
|
45860
45508
|
var IconContext = /*#__PURE__*/React.createContext({});
|
@@ -47573,7 +47221,8 @@ var RecipeForm = function (_a) {
|
|
47573
47221
|
React__default["default"].createElement(TextInput, { inputProps: __assign(__assign({}, register('study-description')), { defaultValue: '' }), asTextArea: true, reset: function () { return handleReset({ name: 'study-description',
|
47574
47222
|
default: '' }); } })),
|
47575
47223
|
host !== 'web' && displaySettings && React__default["default"].createElement(FormInput, { name: 'load-input-aliases', description: 'Enable handlers for an additional validation and/or to convert inputs to objects that are needed by the recipe.' },
|
47576
|
-
React__default["default"].createElement(
|
47224
|
+
React__default["default"].createElement($6be4966fd9bbc698$export$be92b6f5f03c0fe9, { className: 'SwitchRoot', id: 'po-material-switch', checked: handlers, onClick: function (e) { return setHandlers(function (prev) { return !prev; }); } },
|
47225
|
+
React__default["default"].createElement($6be4966fd9bbc698$export$6521433ed15a34db, { className: 'SwitchThumb' }))))),
|
47577
47226
|
React__default["default"].createElement(Tabs, { forceRenderTabPanel: true },
|
47578
47227
|
React__default["default"].createElement(TabList, { style: {
|
47579
47228
|
flex: 1,
|