@dreamtree-org/twreact-ui 2.0.4 → 2.0.5
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/README.md +11 -3
- package/ai-skills/dreamtree-ui.md +4 -3
- package/dist/ai-schema.json +135 -0
- package/dist/charts/index.d.ts +2 -1
- package/dist/charts/index.js +297 -12
- package/dist/components/charts/ChartFrame.d.ts +1 -0
- package/dist/components/charts/ChartFrame.d.ts.map +1 -1
- package/dist/components/charts/ScatterChart.d.ts +4 -0
- package/dist/components/charts/ScatterChart.d.ts.map +1 -0
- package/dist/components/charts/ScatterTooltip.d.ts +14 -0
- package/dist/components/charts/ScatterTooltip.d.ts.map +1 -0
- package/dist/components/charts/scatterData.d.ts +17 -0
- package/dist/components/charts/scatterData.d.ts.map +1 -0
- package/dist/components/navigation/Sidebar.d.ts.map +1 -1
- package/dist/components/utility/Sortable.d.ts.map +1 -1
- package/dist/components/utility/SortableGroup.d.ts +15 -0
- package/dist/components/utility/SortableGroup.d.ts.map +1 -0
- package/dist/esm/charts/index.js +1 -0
- package/dist/esm/components/charts/ChartFrame.js +5 -5
- package/dist/esm/components/charts/ScatterChart.js +204 -0
- package/dist/esm/components/charts/ScatterTooltip.js +61 -0
- package/dist/esm/components/charts/scatterData.js +43 -0
- package/dist/esm/components/utility/Sortable.js +70 -48
- package/dist/esm/components/utility/SortableGroup.js +48 -0
- package/dist/esm/hooks/useSortable.js +96 -30
- package/dist/esm/hooks/useSortableGroup.js +268 -0
- package/dist/esm/index.js +1 -0
- package/dist/hooks/useSortable.d.ts +12 -3
- package/dist/hooks/useSortable.d.ts.map +1 -1
- package/dist/hooks/useSortableGroup.d.ts +43 -0
- package/dist/hooks/useSortableGroup.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +865 -474
- package/dist/index.js +865 -473
- package/dist/types/charts.d.ts +28 -0
- package/dist/types/charts.d.ts.map +1 -1
- package/dist/types/index.d.ts +33 -0
- package/dist/types/index.d.ts.map +1 -1
- package/doc/README.md +2 -0
- package/mcp/catalog.snapshot.json +224 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3359,9 +3359,9 @@ var TOUCH_TARGET = "[@media(pointer:coarse)]:min-h-11 [@media(pointer:coarse)]:m
|
|
|
3359
3359
|
// off under prefers-reduced-motion. Add to pressables (buttons, tiles, tab items).
|
|
3360
3360
|
var PRESS_FEEDBACK = "active:scale-[0.97] motion-reduce:active:scale-100 transition-transform duration-fast";
|
|
3361
3361
|
|
|
3362
|
-
var _excluded
|
|
3363
|
-
function ownKeys$
|
|
3364
|
-
function _objectSpread$
|
|
3362
|
+
var _excluded$10 = ["id", "className", "type", "label", "placeholder", "error", "success", "helperText", "disabled", "required", "clearable", "leftIcon", "rightIcon", "onClear", "showCount", "maxLength", "readOnly", "onChange", "value", "defaultValue", "size", "floatingLabel", "otp"];
|
|
3363
|
+
function ownKeys$1c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3364
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1c(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3365
3365
|
// Field heights. `md` keeps its 40px desktop look and grows to the 44px touch
|
|
3366
3366
|
// target on coarse pointers (same rule as Select); `lg` is 44px everywhere.
|
|
3367
3367
|
var SIZE_CLASSES$4 = {
|
|
@@ -3435,7 +3435,7 @@ var Input = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
3435
3435
|
floatingLabel = _props$floatingLabel === void 0 ? false : _props$floatingLabel,
|
|
3436
3436
|
_props$otp = props.otp,
|
|
3437
3437
|
otp = _props$otp === void 0 ? false : _props$otp,
|
|
3438
|
-
rest = _objectWithoutProperties$1(props, _excluded
|
|
3438
|
+
rest = _objectWithoutProperties$1(props, _excluded$10);
|
|
3439
3439
|
// `size` is the field size (sm|md|lg). A numeric value is the native
|
|
3440
3440
|
// `<input size>` attribute and is passed through unchanged.
|
|
3441
3441
|
var size = SIZE_CLASSES$4[sizeProp] ? sizeProp : "md";
|
|
@@ -3523,7 +3523,7 @@ var Input = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
3523
3523
|
className: "text-primary-400",
|
|
3524
3524
|
children: leftIcon
|
|
3525
3525
|
})
|
|
3526
|
-
}), jsx("input", _objectSpread$
|
|
3526
|
+
}), jsx("input", _objectSpread$1c(_objectSpread$1c({
|
|
3527
3527
|
id: inputId,
|
|
3528
3528
|
ref: setRefs,
|
|
3529
3529
|
type: inputType,
|
|
@@ -3595,9 +3595,9 @@ var Input = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
|
3595
3595
|
});
|
|
3596
3596
|
Input.displayName = "Input";
|
|
3597
3597
|
|
|
3598
|
-
var _excluded
|
|
3599
|
-
function ownKeys$
|
|
3600
|
-
function _objectSpread$
|
|
3598
|
+
var _excluded$$ = ["className", "variant", "size", "disabled", "loading", "children", "leftIcon", "rightIcon", "fullWidth", "as", "onClick"];
|
|
3599
|
+
function ownKeys$1b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3600
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1b(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3601
3601
|
// Square, icon-only sizes. Pair with an `aria-label` (there is no visible text).
|
|
3602
3602
|
var ICON_SIZES = {
|
|
3603
3603
|
'icon-sm': 'h-8 w-8 p-0',
|
|
@@ -3618,7 +3618,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3618
3618
|
fullWidth = _ref.fullWidth,
|
|
3619
3619
|
as = _ref.as,
|
|
3620
3620
|
onClick = _ref.onClick,
|
|
3621
|
-
props = _objectWithoutProperties$1(_ref, _excluded
|
|
3621
|
+
props = _objectWithoutProperties$1(_ref, _excluded$$);
|
|
3622
3622
|
// `as` renders any element or component (an <a>, a router Link) with the
|
|
3623
3623
|
// Button's look; a bare `href` implies an <a>.
|
|
3624
3624
|
var Component = as || (props.href !== undefined ? 'a' : 'button');
|
|
@@ -3654,7 +3654,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3654
3654
|
children: rightIcon
|
|
3655
3655
|
})]
|
|
3656
3656
|
});
|
|
3657
|
-
return jsx(Component, _objectSpread$
|
|
3657
|
+
return jsx(Component, _objectSpread$1b(_objectSpread$1b(_objectSpread$1b({
|
|
3658
3658
|
ref: ref,
|
|
3659
3659
|
className: baseClasses
|
|
3660
3660
|
}, isNativeButton ? {
|
|
@@ -3789,7 +3789,7 @@ function setRefs$1(node) {
|
|
|
3789
3789
|
}
|
|
3790
3790
|
|
|
3791
3791
|
// useLayoutEffect warns during SSR; fall back to useEffect on the server.
|
|
3792
|
-
var useIsomorphicLayoutEffect$
|
|
3792
|
+
var useIsomorphicLayoutEffect$9 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
3793
3793
|
/**
|
|
3794
3794
|
* Internal (not exported from the package): a ref that always holds the latest
|
|
3795
3795
|
* `value`. Lets an effect call the newest consumer callback (e.g. `onChange`)
|
|
@@ -3798,7 +3798,7 @@ var useIsomorphicLayoutEffect$8 = typeof window !== "undefined" ? useLayoutEffec
|
|
|
3798
3798
|
*/
|
|
3799
3799
|
function useLatestRef$1(value) {
|
|
3800
3800
|
var ref = useRef(value);
|
|
3801
|
-
useIsomorphicLayoutEffect$
|
|
3801
|
+
useIsomorphicLayoutEffect$9(function () {
|
|
3802
3802
|
ref.current = value;
|
|
3803
3803
|
});
|
|
3804
3804
|
return ref;
|
|
@@ -6214,8 +6214,8 @@ function usePresence(open) {
|
|
|
6214
6214
|
};
|
|
6215
6215
|
}
|
|
6216
6216
|
|
|
6217
|
-
function ownKeys$
|
|
6218
|
-
function _objectSpread$
|
|
6217
|
+
function ownKeys$1a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6218
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1a(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6219
6219
|
// Internal (not exported). The gesture core behind Sheet: a pointer drag along
|
|
6220
6220
|
// one axis, measured "toward dismiss" for the edge the sheet is attached to.
|
|
6221
6221
|
//
|
|
@@ -6417,12 +6417,12 @@ function useSheetDrag() {
|
|
|
6417
6417
|
return {
|
|
6418
6418
|
delta: delta,
|
|
6419
6419
|
dragging: dragging,
|
|
6420
|
-
dragProps: _objectSpread$
|
|
6420
|
+
dragProps: _objectSpread$1a(_objectSpread$1a({}, common), {}, {
|
|
6421
6421
|
onPointerDown: function onPointerDown(e) {
|
|
6422
6422
|
return start(e, false);
|
|
6423
6423
|
}
|
|
6424
6424
|
}),
|
|
6425
|
-
bodyDragProps: _objectSpread$
|
|
6425
|
+
bodyDragProps: _objectSpread$1a(_objectSpread$1a({}, common), {}, {
|
|
6426
6426
|
onPointerDown: function onPointerDown(e) {
|
|
6427
6427
|
return start(e, true);
|
|
6428
6428
|
}
|
|
@@ -6430,9 +6430,9 @@ function useSheetDrag() {
|
|
|
6430
6430
|
};
|
|
6431
6431
|
}
|
|
6432
6432
|
|
|
6433
|
-
var _excluded$
|
|
6434
|
-
function ownKeys$
|
|
6435
|
-
function _objectSpread$
|
|
6433
|
+
var _excluded$_ = ["open", "onClose", "placement", "snapPoints", "activeSnap", "defaultSnap", "onSnapChange", "dismissible", "dragEnabled", "handle", "scaleBackground", "initialFocus", "hasTitle", "hasDescription", "idPrefix", "testIdPrefix", "panelClassName", "handleBarClassName", "renderHeader", "children", "className", "style"];
|
|
6434
|
+
function ownKeys$19(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6435
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$19(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$19(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6436
6436
|
// Internal (not exported from the package). The shared sheet core behind
|
|
6437
6437
|
// `Sheet` and `Drawer` (ADR 0001 §1): portal, backdrop, presence (enter/exit
|
|
6438
6438
|
// motion), drag to dismiss + snap points, focus trap, scroll lock,
|
|
@@ -6608,7 +6608,7 @@ var SheetCore = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
6608
6608
|
children = _ref.children,
|
|
6609
6609
|
className = _ref.className,
|
|
6610
6610
|
style = _ref.style,
|
|
6611
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
6611
|
+
props = _objectWithoutProperties$1(_ref, _excluded$_);
|
|
6612
6612
|
var shown = Boolean(open);
|
|
6613
6613
|
var side = SHEET_PLACEMENTS.includes(placement) ? placement : "bottom";
|
|
6614
6614
|
var vertical = side === "bottom" || side === "top";
|
|
@@ -6796,7 +6796,7 @@ var SheetCore = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
6796
6796
|
if (!reducedMotion) {
|
|
6797
6797
|
if (side === "bottom" && presence.state === "entering") motionClass = "animate-sheet-in motion-reduce:animate-none";else if (exiting && useKeyframes) motionClass = "animate-sheet-out motion-reduce:animate-none";else if (exiting || side !== "bottom" && !entered) motionClass = OFFSCREEN[side];
|
|
6798
6798
|
}
|
|
6799
|
-
var panelStyle = _objectSpread$
|
|
6799
|
+
var panelStyle = _objectSpread$19({}, style);
|
|
6800
6800
|
if (height !== undefined) panelStyle.height = "".concat(height, "px");
|
|
6801
6801
|
var transform = translateFor(side, translate);
|
|
6802
6802
|
if (transform) panelStyle.transform = transform;
|
|
@@ -6835,7 +6835,7 @@ var SheetCore = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
6835
6835
|
"aria-hidden": "true",
|
|
6836
6836
|
className: cn("h-1.5 w-10 rounded-pill", handleBarClassName)
|
|
6837
6837
|
});
|
|
6838
|
-
var handleNode = showHandle ? snaps ? jsx("button", _objectSpread$
|
|
6838
|
+
var handleNode = showHandle ? snaps ? jsx("button", _objectSpread$19(_objectSpread$19({
|
|
6839
6839
|
type: "button",
|
|
6840
6840
|
"aria-label": "Resize sheet",
|
|
6841
6841
|
"aria-keyshortcuts": "ArrowUp ArrowDown",
|
|
@@ -6845,7 +6845,7 @@ var SheetCore = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
6845
6845
|
}, drag.dragProps), {}, {
|
|
6846
6846
|
className: cn("flex w-full shrink-0 justify-center pb-1 pt-3 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary-500", side === "top" && "pb-3 pt-1", grabClass),
|
|
6847
6847
|
children: handleBar
|
|
6848
|
-
})) : jsx("div", _objectSpread$
|
|
6848
|
+
})) : jsx("div", _objectSpread$19(_objectSpread$19({
|
|
6849
6849
|
"aria-hidden": "true",
|
|
6850
6850
|
"data-sheet-handle": "",
|
|
6851
6851
|
"data-testid": "".concat(testIdPrefix, "-handle")
|
|
@@ -6865,7 +6865,7 @@ var SheetCore = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
6865
6865
|
onClick: function onClick() {
|
|
6866
6866
|
return dismissible && requestClose("backdrop");
|
|
6867
6867
|
}
|
|
6868
|
-
}), jsxs("div", _objectSpread$
|
|
6868
|
+
}), jsxs("div", _objectSpread$19(_objectSpread$19({
|
|
6869
6869
|
ref: panelCallbackRef,
|
|
6870
6870
|
role: "dialog",
|
|
6871
6871
|
"aria-modal": "true",
|
|
@@ -6909,12 +6909,12 @@ var SheetCloseButton = function SheetCloseButton(_ref5) {
|
|
|
6909
6909
|
});
|
|
6910
6910
|
};
|
|
6911
6911
|
|
|
6912
|
-
var _excluded$
|
|
6912
|
+
var _excluded$Z = ["open", "isOpen", "placement", "title", "description", "showCloseButton", "haptics", "onSnapChange"],
|
|
6913
6913
|
_excluded2$9 = ["className"],
|
|
6914
6914
|
_excluded3$5 = ["className"],
|
|
6915
6915
|
_excluded4$3 = ["className"];
|
|
6916
|
-
function ownKeys$
|
|
6917
|
-
function _objectSpread$
|
|
6916
|
+
function ownKeys$18(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6917
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$18(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$18(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6918
6918
|
// Phone-native sheet (ADR 0001). Bottom by default; snap points, drag to
|
|
6919
6919
|
// dismiss, keyboard-aware via visualViewport. The behaviour lives in the
|
|
6920
6920
|
// internal sheet core (./sheetCore.jsx), shared with Drawer (DTUI-33).
|
|
@@ -6936,7 +6936,7 @@ var Sheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
6936
6936
|
_ref$haptics = _ref.haptics,
|
|
6937
6937
|
haptics = _ref$haptics === void 0 ? false : _ref$haptics,
|
|
6938
6938
|
onSnapChange = _ref.onSnapChange,
|
|
6939
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
6939
|
+
props = _objectWithoutProperties$1(_ref, _excluded$Z);
|
|
6940
6940
|
// Opt-in: a selection tick when a drag or arrow key settles on a new snap point.
|
|
6941
6941
|
var _useHaptics = useHaptics({
|
|
6942
6942
|
enabled: haptics
|
|
@@ -6974,7 +6974,7 @@ var Sheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
6974
6974
|
})]
|
|
6975
6975
|
}) : null;
|
|
6976
6976
|
};
|
|
6977
|
-
return jsx(SheetCore, _objectSpread$
|
|
6977
|
+
return jsx(SheetCore, _objectSpread$18({
|
|
6978
6978
|
ref: ref,
|
|
6979
6979
|
open: Boolean(open !== null && open !== void 0 ? open : isOpen),
|
|
6980
6980
|
placement: side,
|
|
@@ -6991,7 +6991,7 @@ var SheetHeader = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
6991
6991
|
props = _objectWithoutProperties$1(_ref3, _excluded2$9);
|
|
6992
6992
|
var ctx = useContext(SheetContext);
|
|
6993
6993
|
var dragProps = ctx ? mergeHandlers(ctx.headerDragProps, props) : {};
|
|
6994
|
-
return jsx("div", _objectSpread$
|
|
6994
|
+
return jsx("div", _objectSpread$18(_objectSpread$18(_objectSpread$18({
|
|
6995
6995
|
ref: ref
|
|
6996
6996
|
}, props), dragProps), {}, {
|
|
6997
6997
|
className: cn("shrink-0 border-b border-line px-4 py-3", ctx === null || ctx === void 0 ? void 0 : ctx.grabClass, className)
|
|
@@ -7002,7 +7002,7 @@ var SheetBody = /*#__PURE__*/React__default.forwardRef(function (_ref4, _ref5) {
|
|
|
7002
7002
|
props = _objectWithoutProperties$1(_ref4, _excluded3$5);
|
|
7003
7003
|
var ctx = useContext(SheetContext);
|
|
7004
7004
|
var dragProps = ctx ? mergeHandlers(ctx.bodyDragProps, props) : {};
|
|
7005
|
-
return jsx("div", _objectSpread$
|
|
7005
|
+
return jsx("div", _objectSpread$18(_objectSpread$18(_objectSpread$18({
|
|
7006
7006
|
ref: function ref(node) {
|
|
7007
7007
|
return setRefs$1(node, _ref5, ctx === null || ctx === void 0 ? void 0 : ctx.setBodyEl);
|
|
7008
7008
|
},
|
|
@@ -7014,7 +7014,7 @@ var SheetBody = /*#__PURE__*/React__default.forwardRef(function (_ref4, _ref5) {
|
|
|
7014
7014
|
var SheetFooter = /*#__PURE__*/React__default.forwardRef(function (_ref6, ref) {
|
|
7015
7015
|
var className = _ref6.className,
|
|
7016
7016
|
props = _objectWithoutProperties$1(_ref6, _excluded4$3);
|
|
7017
|
-
return jsx("div", _objectSpread$
|
|
7017
|
+
return jsx("div", _objectSpread$18({
|
|
7018
7018
|
ref: ref,
|
|
7019
7019
|
className: cn("sticky bottom-0 flex shrink-0 items-center justify-end gap-3 border-t border-line bg-surface px-4 py-3", className)
|
|
7020
7020
|
}, props));
|
|
@@ -7026,9 +7026,9 @@ Sheet.Header = SheetHeader;
|
|
|
7026
7026
|
Sheet.Body = SheetBody;
|
|
7027
7027
|
Sheet.Footer = SheetFooter;
|
|
7028
7028
|
|
|
7029
|
-
var _excluded$
|
|
7030
|
-
function ownKeys$
|
|
7031
|
-
function _objectSpread$
|
|
7029
|
+
var _excluded$Y = ["options", "value", "onChange", "placeholder", "label", "error", "helperText", "disabled", "required", "multiSelect", "searchable", "grouped", "onMenuItemRender", "className", "allowClear", "creatable", "onCreateOption", "onSearch", "loading", "selectAllOption", "closeOnSelect", "maxTagCount", "renderGroupLabel", "name", "size", "presentation"];
|
|
7030
|
+
function ownKeys$17(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7031
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$17(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$17(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7032
7032
|
/**
|
|
7033
7033
|
* Enhanced Select component (debounce removed)
|
|
7034
7034
|
* - Supports single and multi select
|
|
@@ -7084,7 +7084,7 @@ var normalizeGroups = function normalizeGroups(options) {
|
|
|
7084
7084
|
if (Array.isArray(item.options)) {
|
|
7085
7085
|
var valid = item.options.filter(isPlainObject$4);
|
|
7086
7086
|
if (valid.length !== item.options.length) malformed = true;
|
|
7087
|
-
groups.push(_objectSpread$
|
|
7087
|
+
groups.push(_objectSpread$17(_objectSpread$17({}, item), {}, {
|
|
7088
7088
|
options: valid
|
|
7089
7089
|
}));
|
|
7090
7090
|
return;
|
|
@@ -7107,7 +7107,7 @@ var flattenGroups = function flattenGroups() {
|
|
|
7107
7107
|
return groups.reduce(function (acc, g) {
|
|
7108
7108
|
var groupLabel = g.label;
|
|
7109
7109
|
g.options.forEach(function (opt) {
|
|
7110
|
-
return acc.push(_objectSpread$
|
|
7110
|
+
return acc.push(_objectSpread$17(_objectSpread$17({}, opt), {}, {
|
|
7111
7111
|
_group: groupLabel
|
|
7112
7112
|
}));
|
|
7113
7113
|
});
|
|
@@ -7182,7 +7182,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
7182
7182
|
size = _ref$size === void 0 ? "md" : _ref$size,
|
|
7183
7183
|
_ref$presentation = _ref.presentation,
|
|
7184
7184
|
presentation = _ref$presentation === void 0 ? "auto" : _ref$presentation,
|
|
7185
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
7185
|
+
props = _objectWithoutProperties$1(_ref, _excluded$Y);
|
|
7186
7186
|
var _useState = useState(false),
|
|
7187
7187
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7188
7188
|
isOpen = _useState2[0],
|
|
@@ -7263,7 +7263,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
7263
7263
|
var flatOptions = useMemo(function () {
|
|
7264
7264
|
if (grouped) return flattenGroups(groupedOptions);
|
|
7265
7265
|
return (Array.isArray(options) ? options : []).filter(isPlainObject$4).map(function (opt) {
|
|
7266
|
-
return _objectSpread$
|
|
7266
|
+
return _objectSpread$17({}, opt);
|
|
7267
7267
|
});
|
|
7268
7268
|
}, [options, grouped, groupedOptions]);
|
|
7269
7269
|
var selectedValues = useMemo(function () {
|
|
@@ -7297,7 +7297,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
7297
7297
|
};
|
|
7298
7298
|
if (grouped) {
|
|
7299
7299
|
return groupedOptions.map(function (g) {
|
|
7300
|
-
return _objectSpread$
|
|
7300
|
+
return _objectSpread$17(_objectSpread$17({}, g), {}, {
|
|
7301
7301
|
options: g.options.filter(matches)
|
|
7302
7302
|
});
|
|
7303
7303
|
}).filter(function (g) {
|
|
@@ -7589,7 +7589,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
7589
7589
|
className: "text-xs border border-slate-200 p-0.5 rounded-md cursor-pointer hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
7590
7590
|
onClick: function onClick() {
|
|
7591
7591
|
return setCollapsedGroups(function (prev) {
|
|
7592
|
-
return _objectSpread$
|
|
7592
|
+
return _objectSpread$17(_objectSpread$17({}, prev), {}, _defineProperty$4({}, group.label, !prev[group.label]));
|
|
7593
7593
|
});
|
|
7594
7594
|
},
|
|
7595
7595
|
children: jsx(ChevronDown, {
|
|
@@ -7756,7 +7756,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
7756
7756
|
}), jsxs("div", {
|
|
7757
7757
|
ref: wrapperRef,
|
|
7758
7758
|
className: "relative",
|
|
7759
|
-
children: [jsxs("button", _objectSpread$
|
|
7759
|
+
children: [jsxs("button", _objectSpread$17(_objectSpread$17({
|
|
7760
7760
|
ref: triggerRef,
|
|
7761
7761
|
type: "button",
|
|
7762
7762
|
id: baseId,
|
|
@@ -7833,7 +7833,7 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef
|
|
|
7833
7833
|
// by useFloatingPosition (flip / shift; width matches the
|
|
7834
7834
|
// trigger; max-height follows the room left). Transparent
|
|
7835
7835
|
// until the first position so it never flashes at (0,0).
|
|
7836
|
-
style: _objectSpread$
|
|
7836
|
+
style: _objectSpread$17(_objectSpread$17({}, floatingStyles), isPositioned ? {} : {
|
|
7837
7837
|
opacity: 0
|
|
7838
7838
|
}),
|
|
7839
7839
|
children: [searchable && jsx("div", {
|
|
@@ -8301,8 +8301,8 @@ var DEFAULT_ACTIONS = [{
|
|
|
8301
8301
|
})
|
|
8302
8302
|
}];
|
|
8303
8303
|
|
|
8304
|
-
function ownKeys$
|
|
8305
|
-
function _objectSpread$
|
|
8304
|
+
function ownKeys$16(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8305
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$16(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$16(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8306
8306
|
function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = true, u = false; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = true, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
8307
8307
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
8308
8308
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -8381,7 +8381,7 @@ var mergeDefaultActions = function mergeDefaultActions(overrides, defaults) {
|
|
|
8381
8381
|
_iterator.f();
|
|
8382
8382
|
}
|
|
8383
8383
|
var merged = defaults.map(function (d) {
|
|
8384
|
-
return d !== null && d !== void 0 && d.name && byName.has(d.name) ? _objectSpread$
|
|
8384
|
+
return d !== null && d !== void 0 && d.name && byName.has(d.name) ? _objectSpread$16(_objectSpread$16({}, d), byName.get(d.name)) : d;
|
|
8385
8385
|
});
|
|
8386
8386
|
var defaultNames = new Set(defaults.map(function (d) {
|
|
8387
8387
|
return d === null || d === void 0 ? void 0 : d.name;
|
|
@@ -8423,7 +8423,7 @@ var resolveActions = function resolveActions(actions, row, index) {
|
|
|
8423
8423
|
var action = _step2.value;
|
|
8424
8424
|
if (!action || _typeof$4(action) !== "object") continue;
|
|
8425
8425
|
if (callIfFn(action.hidden, row, index)) continue;
|
|
8426
|
-
var resolved = _objectSpread$
|
|
8426
|
+
var resolved = _objectSpread$16(_objectSpread$16({}, action), {}, {
|
|
8427
8427
|
label: callIfFn(action.label, row, index),
|
|
8428
8428
|
icon: callIfFn(action.icon, row, index),
|
|
8429
8429
|
disabled: !!callIfFn(action.disabled, row, index),
|
|
@@ -8711,8 +8711,8 @@ function ColumnMenu(_ref) {
|
|
|
8711
8711
|
});
|
|
8712
8712
|
}
|
|
8713
8713
|
|
|
8714
|
-
function ownKeys$
|
|
8715
|
-
function _objectSpread$
|
|
8714
|
+
function ownKeys$15(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8715
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$15(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$15(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8716
8716
|
var FIELD_CLASSES = "w-full rounded-md border border-line bg-surface px-3 py-2 text-base sm:text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-primary-500";
|
|
8717
8717
|
var FOOTER_BUTTON = "inline-flex min-h-11 flex-1 items-center justify-center rounded-lg px-4 text-sm font-medium outline-none focus-visible:ring-2 focus-visible:ring-primary-500 transition-colors duration-fast motion-reduce:transition-none";
|
|
8718
8718
|
/** Number of non-empty filters (the global search counts as one). */
|
|
@@ -8774,7 +8774,7 @@ function FilterSheet(_ref) {
|
|
|
8774
8774
|
};
|
|
8775
8775
|
var setField = function setField(key, value) {
|
|
8776
8776
|
return setDraft(function (prev) {
|
|
8777
|
-
return _objectSpread$
|
|
8777
|
+
return _objectSpread$15(_objectSpread$15({}, prev), {}, _defineProperty$4({}, key, value));
|
|
8778
8778
|
});
|
|
8779
8779
|
};
|
|
8780
8780
|
var formId = "".concat(idPrefix, "-filters");
|
|
@@ -9062,8 +9062,8 @@ function normalizeAction(action, idx) {
|
|
|
9062
9062
|
};
|
|
9063
9063
|
}
|
|
9064
9064
|
|
|
9065
|
-
function ownKeys$
|
|
9066
|
-
function _objectSpread$
|
|
9065
|
+
function ownKeys$14(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9066
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$14(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$14(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9067
9067
|
// Internal (not exported). Desktop presentation of the action menu: a
|
|
9068
9068
|
// portaled, floating `role="menu"` anchored to its trigger (flip + shift via
|
|
9069
9069
|
// useFloatingPosition), with roving focus and Escape/outside-press dismissal.
|
|
@@ -9174,7 +9174,7 @@ function MenuPopover(_ref) {
|
|
|
9174
9174
|
tabIndex: -1,
|
|
9175
9175
|
"data-presentation": "popover",
|
|
9176
9176
|
className: cn(MENU_CLASSES, className),
|
|
9177
|
-
style: _objectSpread$
|
|
9177
|
+
style: _objectSpread$14(_objectSpread$14({}, floatingStyles), {}, {
|
|
9178
9178
|
opacity: isPositioned ? 1 : 0
|
|
9179
9179
|
}),
|
|
9180
9180
|
onKeyDown: function onKeyDown(e) {
|
|
@@ -9226,9 +9226,9 @@ function MenuPopover(_ref) {
|
|
|
9226
9226
|
});
|
|
9227
9227
|
}
|
|
9228
9228
|
|
|
9229
|
-
var _excluded$
|
|
9230
|
-
function ownKeys$
|
|
9231
|
-
function _objectSpread$
|
|
9229
|
+
var _excluded$X = ["open", "onClose", "groups", "onSelectItem", "title", "message", "label", "cancelLabel", "emptyLabel", "itemClassName", "className"];
|
|
9230
|
+
function ownKeys$13(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9231
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$13(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$13(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9232
9232
|
// Internal. The one action-sheet implementation: an iOS-style action sheet in
|
|
9233
9233
|
// a bottom Sheet. Actions sit in rounded cards (one card per group),
|
|
9234
9234
|
// destructive actions use the error tone, and a separate Cancel button closes
|
|
@@ -9269,7 +9269,7 @@ var ActionSheetMenu = /*#__PURE__*/React__default.forwardRef(function ActionShee
|
|
|
9269
9269
|
emptyLabel = _ref$emptyLabel === void 0 ? "No actions" : _ref$emptyLabel,
|
|
9270
9270
|
itemClassName = _ref.itemClassName,
|
|
9271
9271
|
className = _ref.className,
|
|
9272
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
9272
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$X);
|
|
9273
9273
|
var nonEmpty = (groups || []).filter(function (g) {
|
|
9274
9274
|
return Array.isArray(g) && g.length > 0;
|
|
9275
9275
|
});
|
|
@@ -9291,7 +9291,7 @@ var ActionSheetMenu = /*#__PURE__*/React__default.forwardRef(function ActionShee
|
|
|
9291
9291
|
children: message
|
|
9292
9292
|
})]
|
|
9293
9293
|
}) : null;
|
|
9294
|
-
return jsx(Sheet, _objectSpread$
|
|
9294
|
+
return jsx(Sheet, _objectSpread$13(_objectSpread$13({
|
|
9295
9295
|
ref: ref,
|
|
9296
9296
|
open: open,
|
|
9297
9297
|
onClose: onClose,
|
|
@@ -9519,8 +9519,8 @@ function ActionMenu(_ref) {
|
|
|
9519
9519
|
});
|
|
9520
9520
|
}
|
|
9521
9521
|
|
|
9522
|
-
function ownKeys$
|
|
9523
|
-
function _objectSpread$
|
|
9522
|
+
function ownKeys$12(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9523
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$12(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$12(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9524
9524
|
/**
|
|
9525
9525
|
* Desktop table row component
|
|
9526
9526
|
*/
|
|
@@ -9607,7 +9607,7 @@ function TableRow(_ref) {
|
|
|
9607
9607
|
var isRowActive = interactive && (activeCell === null || activeCell === void 0 ? void 0 : activeCell.rowKey) === rowKey;
|
|
9608
9608
|
var effectiveRow = React__default.useMemo(function () {
|
|
9609
9609
|
if (!interactive || !pendingEdits || !pendingEdits[rowKey]) return row;
|
|
9610
|
-
return _objectSpread$
|
|
9610
|
+
return _objectSpread$12(_objectSpread$12({}, row), pendingEdits[rowKey]);
|
|
9611
9611
|
}, [interactive, pendingEdits, rowKey, row]);
|
|
9612
9612
|
return jsxs(React__default.Fragment, {
|
|
9613
9613
|
children: [jsxs("tr", {
|
|
@@ -10009,9 +10009,9 @@ function useSwipeGesture(_ref2) {
|
|
|
10009
10009
|
};
|
|
10010
10010
|
}
|
|
10011
10011
|
|
|
10012
|
-
var _excluded$
|
|
10013
|
-
function ownKeys
|
|
10014
|
-
function _objectSpread
|
|
10012
|
+
var _excluded$W = ["as", "children", "leadingActions", "trailingActions", "fullSwipe", "fullSwipeThreshold", "actionWidth", "open", "defaultOpen", "onOpenChange", "disabled", "moreActions", "moreActionsLabel", "menuPresentation", "contentClassName", "className", "onKeyDown"];
|
|
10013
|
+
function ownKeys$11(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10014
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$11(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$11(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10015
10015
|
// The iOS Mail / Gmail row: swipe horizontally to reveal actions, swipe all
|
|
10016
10016
|
// the way to commit the first one. Every action is also reachable without a
|
|
10017
10017
|
// gesture through the "More actions" button (a menu, or an action sheet on
|
|
@@ -10106,7 +10106,7 @@ var SwipeableListItem = /*#__PURE__*/React__default.forwardRef(function Swipeabl
|
|
|
10106
10106
|
contentClassName = _ref2.contentClassName,
|
|
10107
10107
|
className = _ref2.className,
|
|
10108
10108
|
onKeyDown = _ref2.onKeyDown,
|
|
10109
|
-
rest = _objectWithoutProperties$1(_ref2, _excluded$
|
|
10109
|
+
rest = _objectWithoutProperties$1(_ref2, _excluded$W);
|
|
10110
10110
|
var leading = useMemo(function () {
|
|
10111
10111
|
return Array.isArray(leadingActions) ? leadingActions : [];
|
|
10112
10112
|
}, [leadingActions]);
|
|
@@ -10209,7 +10209,7 @@ var SwipeableListItem = /*#__PURE__*/React__default.forwardRef(function Swipeabl
|
|
|
10209
10209
|
setOpenSide(null);
|
|
10210
10210
|
}
|
|
10211
10211
|
};
|
|
10212
|
-
return jsxs(Component, _objectSpread
|
|
10212
|
+
return jsxs(Component, _objectSpread$11(_objectSpread$11({
|
|
10213
10213
|
ref: function ref(node) {
|
|
10214
10214
|
return setRefs$1(node, rootRef, _ref4);
|
|
10215
10215
|
},
|
|
@@ -10234,7 +10234,7 @@ var SwipeableListItem = /*#__PURE__*/React__default.forwardRef(function Swipeabl
|
|
|
10234
10234
|
armed: armed === "trailing",
|
|
10235
10235
|
dragging: dragging,
|
|
10236
10236
|
onSelect: runAction
|
|
10237
|
-
}), jsx("div", _objectSpread
|
|
10237
|
+
}), jsx("div", _objectSpread$11(_objectSpread$11({
|
|
10238
10238
|
"data-swipe-content": "",
|
|
10239
10239
|
className: cn("relative bg-surface touch-pan-y", dragging ? "select-none" : cn("transition-transform", MOTION), contentClassName),
|
|
10240
10240
|
style: x ? {
|
|
@@ -10662,10 +10662,10 @@ function FieldInput(_ref) {
|
|
|
10662
10662
|
});
|
|
10663
10663
|
}
|
|
10664
10664
|
|
|
10665
|
-
var _excluded$
|
|
10665
|
+
var _excluded$V = ["data", "columns", "sortable", "filterable", "selectable", "pagination", "paginationPosition", "pageSize", "onSort", "onFilter", "onFetch", "onFilterChange", "onSelectionChange", "onRowClick", "hasDetails", "DetailsComponent", "className", "withAction", "onAction", "actions", "replaceDefaultActions", "showSerial", "cellClass", "rowClass", "globalSearch", "limitOptions", "showLimitSelector", "onLimitChange", "showReloadButton", "renderReloadButton", "onReload", "stripedRows", "theme", "responsiveBreakpoint", "showToolbar", "showColumnPicker", "wrapCells", "mobileMaxFields", "serverSide", "totalRecords", "pageNumber", "onPageChange", "TheadComponent", "TfootComponent", "interactive", "onSave", "onEdit", "onRowAdd", "onRowDelete", "editKeyBinding", "newRowPosition", "addRowRef", "onInitAddRow", "renderAddRowButton", "renderExternalAddRow", "actionMenuPresentation", "defaultMobileView", "mobileFiltersPresentation", "swipeActions", "stickyHeader"],
|
|
10666
10666
|
_excluded2$8 = ["_key", "_isNew"];
|
|
10667
|
-
function ownKeys$
|
|
10668
|
-
function _objectSpread$
|
|
10667
|
+
function ownKeys$10(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10668
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$10(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$10(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10669
10669
|
var DEFAULT_DATA = [];
|
|
10670
10670
|
var DEFAULT_COLUMNS = [];
|
|
10671
10671
|
var DEFAULT_THEME = {
|
|
@@ -10771,8 +10771,8 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
10771
10771
|
swipeActions = _ref.swipeActions,
|
|
10772
10772
|
_ref$stickyHeader = _ref.stickyHeader,
|
|
10773
10773
|
stickyHeader = _ref$stickyHeader === void 0 ? false : _ref$stickyHeader,
|
|
10774
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
10775
|
-
theme = _objectSpread$
|
|
10774
|
+
props = _objectWithoutProperties$1(_ref, _excluded$V);
|
|
10775
|
+
theme = _objectSpread$10(_objectSpread$10({}, DEFAULT_THEME), theme);
|
|
10776
10776
|
// Card mode follows a media query (SSR-safe): `defaultMobileView` on the
|
|
10777
10777
|
// server and while hydrating, then the live match. Same semantics as the old
|
|
10778
10778
|
// `window.innerWidth < responsiveBreakpoint` check.
|
|
@@ -10803,7 +10803,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
10803
10803
|
setCurrentPage = _useState8[1];
|
|
10804
10804
|
var _useState9 = useState(function () {
|
|
10805
10805
|
return Array.isArray(initialColumns) ? initialColumns.map(function (c) {
|
|
10806
|
-
return _objectSpread$
|
|
10806
|
+
return _objectSpread$10({}, c);
|
|
10807
10807
|
}) : [];
|
|
10808
10808
|
}),
|
|
10809
10809
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
@@ -10921,7 +10921,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
10921
10921
|
return getRowKey(r, i) === rowKey;
|
|
10922
10922
|
});
|
|
10923
10923
|
if (!origRow) return;
|
|
10924
|
-
var effectiveRow = _objectSpread$
|
|
10924
|
+
var effectiveRow = _objectSpread$10(_objectSpread$10({}, origRow), pendingEdits[rowKey] || {});
|
|
10925
10925
|
columnsState.forEach(function (col) {
|
|
10926
10926
|
var _col$rules;
|
|
10927
10927
|
if (col.isVisible === false) return;
|
|
@@ -10988,7 +10988,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
10988
10988
|
if (newRowIdx !== -1) {
|
|
10989
10989
|
setNewRows(function (prev) {
|
|
10990
10990
|
var next = _toConsumableArray$1(prev);
|
|
10991
|
-
next[newRowIdx] = _objectSpread$
|
|
10991
|
+
next[newRowIdx] = _objectSpread$10(_objectSpread$10({}, next[newRowIdx]), {}, _defineProperty$4({}, colKey, newValue));
|
|
10992
10992
|
onEdit === null || onEdit === void 0 || onEdit({
|
|
10993
10993
|
rowKey: rowKey,
|
|
10994
10994
|
colKey: colKey,
|
|
@@ -11001,11 +11001,11 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11001
11001
|
return;
|
|
11002
11002
|
}
|
|
11003
11003
|
setPendingEdits(function (prev) {
|
|
11004
|
-
var nextRowEdits = _objectSpread$
|
|
11004
|
+
var nextRowEdits = _objectSpread$10(_objectSpread$10({}, prev[rowKey] || {}), {}, _defineProperty$4({}, colKey, newValue));
|
|
11005
11005
|
var origRow = tableData.find(function (r, i) {
|
|
11006
11006
|
return getRowKey(r, i) === rowKey;
|
|
11007
11007
|
});
|
|
11008
|
-
var updatedRow = _objectSpread$
|
|
11008
|
+
var updatedRow = _objectSpread$10(_objectSpread$10({}, origRow), nextRowEdits);
|
|
11009
11009
|
onEdit === null || onEdit === void 0 || onEdit({
|
|
11010
11010
|
rowKey: rowKey,
|
|
11011
11011
|
colKey: colKey,
|
|
@@ -11013,7 +11013,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11013
11013
|
row: updatedRow,
|
|
11014
11014
|
isNew: false
|
|
11015
11015
|
});
|
|
11016
|
-
return _objectSpread$
|
|
11016
|
+
return _objectSpread$10(_objectSpread$10({}, prev), {}, _defineProperty$4({}, rowKey, nextRowEdits));
|
|
11017
11017
|
});
|
|
11018
11018
|
}, [newRows, tableData, onEdit]);
|
|
11019
11019
|
var _handleAddRow = useCallback(function (positionOverride) {
|
|
@@ -11081,7 +11081,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11081
11081
|
});
|
|
11082
11082
|
});
|
|
11083
11083
|
setPendingEdits(function (prev) {
|
|
11084
|
-
var next = _objectSpread$
|
|
11084
|
+
var next = _objectSpread$10({}, prev);
|
|
11085
11085
|
delete next[rowKey];
|
|
11086
11086
|
return next;
|
|
11087
11087
|
});
|
|
@@ -11107,7 +11107,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11107
11107
|
updatedTableData = tableData.map(function (row, i) {
|
|
11108
11108
|
var rKey = getRowKey(row, i);
|
|
11109
11109
|
if (dirtyEdits[rKey]) {
|
|
11110
|
-
return _objectSpread$
|
|
11110
|
+
return _objectSpread$10(_objectSpread$10({}, row), dirtyEdits[rKey]);
|
|
11111
11111
|
}
|
|
11112
11112
|
return row;
|
|
11113
11113
|
});
|
|
@@ -11240,7 +11240,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11240
11240
|
useEffect(function () {
|
|
11241
11241
|
if (initialColumns !== initialColumnsRef.current) {
|
|
11242
11242
|
setColumnsState(Array.isArray(initialColumns) ? initialColumns.map(function (c) {
|
|
11243
|
-
return _objectSpread$
|
|
11243
|
+
return _objectSpread$10({}, c);
|
|
11244
11244
|
}) : []);
|
|
11245
11245
|
initialColumnsRef.current = initialColumns;
|
|
11246
11246
|
}
|
|
@@ -11571,7 +11571,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11571
11571
|
var toggleColumnVisibility = useCallback(function (key) {
|
|
11572
11572
|
setColumnsState(function (prev) {
|
|
11573
11573
|
return prev.map(function (c) {
|
|
11574
|
-
return c.key === key ? _objectSpread$
|
|
11574
|
+
return c.key === key ? _objectSpread$10(_objectSpread$10({}, c), {}, {
|
|
11575
11575
|
isVisible: !(c.isVisible !== false)
|
|
11576
11576
|
}) : c;
|
|
11577
11577
|
});
|
|
@@ -11590,7 +11590,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11590
11590
|
}, [sortable, onSort]);
|
|
11591
11591
|
var handleFilter = useCallback(function (key, value) {
|
|
11592
11592
|
setFilters(function (prev) {
|
|
11593
|
-
var newFilters = _objectSpread$
|
|
11593
|
+
var newFilters = _objectSpread$10(_objectSpread$10({}, prev), {}, _defineProperty$4({}, key, value));
|
|
11594
11594
|
onFilter === null || onFilter === void 0 || onFilter(newFilters);
|
|
11595
11595
|
onFilterChange === null || onFilterChange === void 0 || onFilterChange(newFilters);
|
|
11596
11596
|
return newFilters;
|
|
@@ -11600,7 +11600,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
11600
11600
|
// Commits several filters at once (the phone filter sheet's Apply).
|
|
11601
11601
|
var applyFilters = useCallback(function (patch) {
|
|
11602
11602
|
setFilters(function (prev) {
|
|
11603
|
-
var newFilters = _objectSpread$
|
|
11603
|
+
var newFilters = _objectSpread$10(_objectSpread$10({}, prev), patch);
|
|
11604
11604
|
onFilter === null || onFilter === void 0 || onFilter(newFilters);
|
|
11605
11605
|
onFilterChange === null || onFilterChange === void 0 || onFilterChange(newFilters);
|
|
11606
11606
|
return newFilters;
|
|
@@ -12014,7 +12014,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
12014
12014
|
style: stickyHeader && stickyHeader !== true ? {
|
|
12015
12015
|
maxHeight: typeof stickyHeader === "number" ? "".concat(stickyHeader, "px") : stickyHeader
|
|
12016
12016
|
} : undefined,
|
|
12017
|
-
children: jsxs("table", _objectSpread$
|
|
12017
|
+
children: jsxs("table", _objectSpread$10(_objectSpread$10({
|
|
12018
12018
|
className: cn("min-w-full divide-y divide-line", className)
|
|
12019
12019
|
}, props), {}, {
|
|
12020
12020
|
children: [jsxs("thead", {
|
|
@@ -12164,7 +12164,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
12164
12164
|
}), interactive && newRowPosition !== "top" && renderAddRowClickableRow()]
|
|
12165
12165
|
}) : jsxs(Fragment, {
|
|
12166
12166
|
children: [interactive && newRowPosition === "top" && renderAddRowClickableRow(), interactive && newRowPosition === "top" && newRows.map(function (newRow, newIdx) {
|
|
12167
|
-
return jsx(TableRow, _objectSpread$
|
|
12167
|
+
return jsx(TableRow, _objectSpread$10({
|
|
12168
12168
|
row: newRow,
|
|
12169
12169
|
rowIndexInPage: newIdx,
|
|
12170
12170
|
startIndex: 0,
|
|
@@ -12173,14 +12173,14 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
12173
12173
|
onDeleteNewRow: handleDeleteNewRow
|
|
12174
12174
|
}, rowSharedProps), newRow._key);
|
|
12175
12175
|
}), paginatedData.map(function (row, rowIndexInPage) {
|
|
12176
|
-
return jsx(TableRow, _objectSpread$
|
|
12176
|
+
return jsx(TableRow, _objectSpread$10({
|
|
12177
12177
|
row: row,
|
|
12178
12178
|
rowIndexInPage: rowIndexInPage,
|
|
12179
12179
|
startIndex: startIndex,
|
|
12180
12180
|
visibleCount: visibleCount
|
|
12181
12181
|
}, rowSharedProps), getRowKey(row, startIndex + rowIndexInPage));
|
|
12182
12182
|
}), interactive && newRowPosition !== "top" && newRows.map(function (newRow, newIdx) {
|
|
12183
|
-
return jsx(TableRow, _objectSpread$
|
|
12183
|
+
return jsx(TableRow, _objectSpread$10({
|
|
12184
12184
|
row: newRow,
|
|
12185
12185
|
rowIndexInPage: paginatedData.length + newIdx,
|
|
12186
12186
|
startIndex: 0,
|
|
@@ -12220,7 +12220,7 @@ var Table = /*#__PURE__*/forwardRef(function Table(_ref, ref) {
|
|
|
12220
12220
|
})]
|
|
12221
12221
|
})
|
|
12222
12222
|
}) : paginatedData.map(function (row, rowIndexInPage) {
|
|
12223
|
-
return jsx(MobileCard, _objectSpread$
|
|
12223
|
+
return jsx(MobileCard, _objectSpread$10(_objectSpread$10({
|
|
12224
12224
|
row: row,
|
|
12225
12225
|
rowIndexInPage: rowIndexInPage,
|
|
12226
12226
|
startIndex: startIndex
|
|
@@ -12394,7 +12394,7 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
|
|
|
12394
12394
|
return result;
|
|
12395
12395
|
};
|
|
12396
12396
|
|
|
12397
|
-
const useIsomorphicLayoutEffect$
|
|
12397
|
+
const useIsomorphicLayoutEffect$8 = typeof window !== 'undefined' ? React__default.useLayoutEffect : React__default.useEffect;
|
|
12398
12398
|
|
|
12399
12399
|
/**
|
|
12400
12400
|
* This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.
|
|
@@ -12440,7 +12440,7 @@ function useFormState(props) {
|
|
|
12440
12440
|
isValid: false,
|
|
12441
12441
|
errors: false,
|
|
12442
12442
|
});
|
|
12443
|
-
useIsomorphicLayoutEffect$
|
|
12443
|
+
useIsomorphicLayoutEffect$8(() => control._subscribe({
|
|
12444
12444
|
name,
|
|
12445
12445
|
formState: _localProxyFormState.current,
|
|
12446
12446
|
exact,
|
|
@@ -12559,7 +12559,7 @@ function useWatch(props) {
|
|
|
12559
12559
|
}
|
|
12560
12560
|
}
|
|
12561
12561
|
}, [control._formValues, control._names, disabled, name]);
|
|
12562
|
-
useIsomorphicLayoutEffect$
|
|
12562
|
+
useIsomorphicLayoutEffect$8(() => {
|
|
12563
12563
|
if (_prevControl.current !== control ||
|
|
12564
12564
|
!deepEqual(_prevName.current, name)) {
|
|
12565
12565
|
_prevControl.current = control;
|
|
@@ -14640,7 +14640,7 @@ function useForm(props = {}) {
|
|
|
14640
14640
|
}
|
|
14641
14641
|
const control = _formControl.current.control;
|
|
14642
14642
|
control._options = props;
|
|
14643
|
-
useIsomorphicLayoutEffect$
|
|
14643
|
+
useIsomorphicLayoutEffect$8(() => {
|
|
14644
14644
|
const sub = control._subscribe({
|
|
14645
14645
|
formState: control._proxyFormState,
|
|
14646
14646
|
callback: () => updateFormState({ ...control._formState }),
|
|
@@ -17643,8 +17643,8 @@ function subMonths(dirtyDate, dirtyAmount) {
|
|
|
17643
17643
|
return addMonths(dirtyDate, -amount);
|
|
17644
17644
|
}
|
|
17645
17645
|
|
|
17646
|
-
function ownKeys
|
|
17647
|
-
function _objectSpread
|
|
17646
|
+
function ownKeys$$(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17647
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$$(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$$(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17648
17648
|
// Internal (not exported). The month calendar shared by DatePicker and
|
|
17649
17649
|
// DateRangePicker: month header, weekday row and an ARIA grid of days with a
|
|
17650
17650
|
// roving tabindex, arrow/Home/End/PageUp/PageDown navigation and (in sheet
|
|
@@ -17891,7 +17891,7 @@ function Calendar(_ref3) {
|
|
|
17891
17891
|
children: label
|
|
17892
17892
|
}, label);
|
|
17893
17893
|
})
|
|
17894
|
-
}), jsx("div", _objectSpread
|
|
17894
|
+
}), jsx("div", _objectSpread$$(_objectSpread$$({
|
|
17895
17895
|
ref: grid,
|
|
17896
17896
|
role: "grid",
|
|
17897
17897
|
"aria-label": format(month, "MMMM yyyy"),
|
|
@@ -18014,9 +18014,9 @@ function PickerSurface(_ref4) {
|
|
|
18014
18014
|
return portal && typeof document !== "undefined" ? /*#__PURE__*/ReactDOM__default.createPortal(popup, document.body) : popup;
|
|
18015
18015
|
}
|
|
18016
18016
|
|
|
18017
|
-
var _excluded$
|
|
18018
|
-
function ownKeys$
|
|
18019
|
-
function _objectSpread$
|
|
18017
|
+
var _excluded$U = ["value", "onChange", "placeholder", "label", "error", "helperText", "disabled", "required", "minDate", "maxDate", "className", "weekStartsOn", "portal", "displayFormat", "locale", "showClear", "closeOnSelect", "presentation"];
|
|
18018
|
+
function ownKeys$_(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18019
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$_(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$_(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18020
18020
|
var DatePicker = /*#__PURE__*/React__default.forwardRef(function (_ref, forwardedRef) {
|
|
18021
18021
|
var value = _ref.value,
|
|
18022
18022
|
onChange = _ref.onChange,
|
|
@@ -18044,7 +18044,7 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function (_ref, forwarde
|
|
|
18044
18044
|
closeOnSelect = _ref$closeOnSelect === void 0 ? true : _ref$closeOnSelect,
|
|
18045
18045
|
_ref$presentation = _ref.presentation,
|
|
18046
18046
|
presentation = _ref$presentation === void 0 ? "auto" : _ref$presentation,
|
|
18047
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
18047
|
+
props = _objectWithoutProperties$1(_ref, _excluded$U);
|
|
18048
18048
|
// Stable ids wiring label / helper / error to the trigger button.
|
|
18049
18049
|
// A consumer `id` (spread onto the trigger via ...props) wins.
|
|
18050
18050
|
var reactId = useId();
|
|
@@ -18208,7 +18208,7 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function (_ref, forwarde
|
|
|
18208
18208
|
}), jsxs("div", {
|
|
18209
18209
|
ref: fieldRef,
|
|
18210
18210
|
className: "relative",
|
|
18211
|
-
children: [jsxs("button", _objectSpread$
|
|
18211
|
+
children: [jsxs("button", _objectSpread$_(_objectSpread$_({
|
|
18212
18212
|
ref: triggerRef,
|
|
18213
18213
|
type: "button",
|
|
18214
18214
|
id: fieldId,
|
|
@@ -18295,9 +18295,9 @@ var DatePicker = /*#__PURE__*/React__default.forwardRef(function (_ref, forwarde
|
|
|
18295
18295
|
});
|
|
18296
18296
|
DatePicker.displayName = "DatePicker";
|
|
18297
18297
|
|
|
18298
|
-
var _excluded$
|
|
18299
|
-
function ownKeys$
|
|
18300
|
-
function _objectSpread$
|
|
18298
|
+
var _excluded$T = ["id", "name", "checked", "defaultChecked", "onChange", "disabled", "size", "color", "trackClass", "thumbClass", "className", "topLabel", "bottomLabel", "rightLabel", "leftLabel", "ariaLabel", "onPointerDown", "onPointerMove", "onPointerUp", "onPointerCancel", "haptics"];
|
|
18299
|
+
function ownKeys$Z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18300
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Z(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18301
18301
|
/**
|
|
18302
18302
|
* Switch.jsx
|
|
18303
18303
|
* - Plain JSX (no TypeScript)
|
|
@@ -18397,7 +18397,7 @@ var Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
|
|
18397
18397
|
onPointerCancel = props.onPointerCancel,
|
|
18398
18398
|
_props$haptics = props.haptics,
|
|
18399
18399
|
haptics = _props$haptics === void 0 ? false : _props$haptics,
|
|
18400
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
18400
|
+
rest = _objectWithoutProperties$1(props, _excluded$T);
|
|
18401
18401
|
var isControlled = typeof checked === "boolean";
|
|
18402
18402
|
var _useState = useState(defaultChecked),
|
|
18403
18403
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -18516,7 +18516,7 @@ var Switch = /*#__PURE__*/forwardRef(function Switch(props, ref) {
|
|
|
18516
18516
|
htmlFor: switchId,
|
|
18517
18517
|
className: labelOpacityClass,
|
|
18518
18518
|
children: leftLabel
|
|
18519
|
-
}) : null, jsxs("button", _objectSpread$
|
|
18519
|
+
}) : null, jsxs("button", _objectSpread$Z(_objectSpread$Z({
|
|
18520
18520
|
ref: ref,
|
|
18521
18521
|
id: switchId,
|
|
18522
18522
|
type: "button",
|
|
@@ -18700,9 +18700,9 @@ function useSliderPointer(_ref4) {
|
|
|
18700
18700
|
};
|
|
18701
18701
|
}
|
|
18702
18702
|
|
|
18703
|
-
var _excluded$
|
|
18704
|
-
function ownKeys$
|
|
18705
|
-
function _objectSpread$
|
|
18703
|
+
var _excluded$S = ["value", "defaultValue", "onChange", "onChangeEnd", "min", "max", "step", "largeStep", "disabled", "label", "showValue", "showBubble", "formatValue", "thumbLabels", "name", "className", "aria-label"];
|
|
18704
|
+
function ownKeys$Y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18705
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Y(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18706
18706
|
var DEFAULT_THUMB_LABELS = ["Minimum", "Maximum"];
|
|
18707
18707
|
var Slider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
18708
18708
|
var value = _ref.value,
|
|
@@ -18730,7 +18730,7 @@ var Slider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
18730
18730
|
name = _ref.name,
|
|
18731
18731
|
className = _ref.className,
|
|
18732
18732
|
ariaLabel = _ref["aria-label"],
|
|
18733
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
18733
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$S);
|
|
18734
18734
|
var labelId = "slider-label-".concat(useId());
|
|
18735
18735
|
var trackRef = useRef(null);
|
|
18736
18736
|
var bounds = useMemo(function () {
|
|
@@ -18778,7 +18778,7 @@ var Slider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
18778
18778
|
var display = values.map(function (v) {
|
|
18779
18779
|
return formatValue(v);
|
|
18780
18780
|
}).join(" – ");
|
|
18781
|
-
return jsxs("div", _objectSpread$
|
|
18781
|
+
return jsxs("div", _objectSpread$Y(_objectSpread$Y({
|
|
18782
18782
|
ref: ref,
|
|
18783
18783
|
className: cn("w-full", disabled && "opacity-50", className)
|
|
18784
18784
|
}, rest), {}, {
|
|
@@ -18793,7 +18793,7 @@ var Slider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
18793
18793
|
"aria-hidden": "true",
|
|
18794
18794
|
children: display
|
|
18795
18795
|
})]
|
|
18796
|
-
}), jsxs("div", _objectSpread$
|
|
18796
|
+
}), jsxs("div", _objectSpread$Y(_objectSpread$Y({
|
|
18797
18797
|
ref: trackRef,
|
|
18798
18798
|
className: cn(
|
|
18799
18799
|
// 44px tall row on coarse pointers so the whole strip is easy to grab.
|
|
@@ -18846,9 +18846,9 @@ var Slider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
18846
18846
|
});
|
|
18847
18847
|
Slider.displayName = "Slider";
|
|
18848
18848
|
|
|
18849
|
-
var _excluded$
|
|
18850
|
-
function ownKeys$
|
|
18851
|
-
function _objectSpread$
|
|
18849
|
+
var _excluded$R = ["value", "defaultValue", "onChange", "swatches", "showAlpha", "size", "disabled", "className", "label", "id"];
|
|
18850
|
+
function ownKeys$X(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18851
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$X(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$X(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18852
18852
|
/**
|
|
18853
18853
|
* ColorPicker.jsx
|
|
18854
18854
|
* A reusable, accessible, and Tailwind-friendly color picker component (plain JavaScript)
|
|
@@ -19001,7 +19001,7 @@ var ColorPicker = /*#__PURE__*/forwardRef(function ColorPicker(props, ref) {
|
|
|
19001
19001
|
_props$label = props.label,
|
|
19002
19002
|
label = _props$label === void 0 ? "Pick a color" : _props$label,
|
|
19003
19003
|
id = props.id,
|
|
19004
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
19004
|
+
rest = _objectWithoutProperties$1(props, _excluded$R);
|
|
19005
19005
|
// The visible <label> must point at a real control: the text value input
|
|
19006
19006
|
// takes the caller's `id` (or a generated one).
|
|
19007
19007
|
var autoId = useId();
|
|
@@ -19065,7 +19065,7 @@ var ColorPicker = /*#__PURE__*/forwardRef(function ColorPicker(props, ref) {
|
|
|
19065
19065
|
// Sizes outside sm/md/lg (the shared `Size` type also lists xs/xl/2xl) fall
|
|
19066
19066
|
// back to md instead of crashing on an undefined map entry.
|
|
19067
19067
|
var sizeMap = sizeMaps[size] || sizeMaps.md;
|
|
19068
|
-
return jsxs("div", _objectSpread$
|
|
19068
|
+
return jsxs("div", _objectSpread$X(_objectSpread$X({
|
|
19069
19069
|
ref: ref,
|
|
19070
19070
|
className: cn("inline-block", className)
|
|
19071
19071
|
}, rest), {}, {
|
|
@@ -19132,7 +19132,7 @@ var ColorPicker = /*#__PURE__*/forwardRef(function ColorPicker(props, ref) {
|
|
|
19132
19132
|
value: rgbaToHex(internal, false).slice(0, 7),
|
|
19133
19133
|
onChange: function onChange(e) {
|
|
19134
19134
|
var parsed = hexToRgba(e.target.value);
|
|
19135
|
-
if (parsed) pushChange(_objectSpread$
|
|
19135
|
+
if (parsed) pushChange(_objectSpread$X(_objectSpread$X({}, parsed), {}, {
|
|
19136
19136
|
a: internal.a
|
|
19137
19137
|
}));
|
|
19138
19138
|
},
|
|
@@ -19155,7 +19155,7 @@ var ColorPicker = /*#__PURE__*/forwardRef(function ColorPicker(props, ref) {
|
|
|
19155
19155
|
if (p) pushChange(p);else {
|
|
19156
19156
|
var maybe = v.startsWith("#") ? v : "#".concat(v);
|
|
19157
19157
|
var ph = hexToRgba(maybe);
|
|
19158
|
-
if (ph) pushChange(_objectSpread$
|
|
19158
|
+
if (ph) pushChange(_objectSpread$X(_objectSpread$X({}, ph), {}, {
|
|
19159
19159
|
a: internal.a
|
|
19160
19160
|
}));
|
|
19161
19161
|
}
|
|
@@ -19176,7 +19176,7 @@ var ColorPicker = /*#__PURE__*/forwardRef(function ColorPicker(props, ref) {
|
|
|
19176
19176
|
max: 100,
|
|
19177
19177
|
value: Math.round(((_internal$a = internal.a) !== null && _internal$a !== void 0 ? _internal$a : 1) * 100),
|
|
19178
19178
|
onChange: function onChange(v) {
|
|
19179
|
-
pushChange(_objectSpread$
|
|
19179
|
+
pushChange(_objectSpread$X(_objectSpread$X({}, internal), {}, {
|
|
19180
19180
|
a: clamp(v / 100, 0, 1)
|
|
19181
19181
|
}));
|
|
19182
19182
|
},
|
|
@@ -19189,11 +19189,11 @@ var ColorPicker = /*#__PURE__*/forwardRef(function ColorPicker(props, ref) {
|
|
|
19189
19189
|
});
|
|
19190
19190
|
ColorPicker.displayName = "ColorPicker";
|
|
19191
19191
|
|
|
19192
|
-
var _excluded$
|
|
19192
|
+
var _excluded$Q = ["fields", "onSubmit", "defaultValues", "validationSchema", "className", "submitText", "resetText", "submitButtonClass", "resetButtonClass", "showReset", "submitDisabled"],
|
|
19193
19193
|
_excluded2$7 = ["type", "name", "label", "required", "options", "placeholder", "helperText"],
|
|
19194
19194
|
_excluded3$4 = ["onChange", "ref", "value"];
|
|
19195
|
-
function ownKeys$
|
|
19196
|
-
function _objectSpread$
|
|
19195
|
+
function ownKeys$W(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19196
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$W(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$W(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19197
19197
|
/**
|
|
19198
19198
|
* Error / helper line rendered under Form-owned field markup (textarea,
|
|
19199
19199
|
* checkbox, radio, file, switch, color). Mirrors Input / Select / DatePicker:
|
|
@@ -19254,7 +19254,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19254
19254
|
showReset = _ref2$showReset === void 0 ? true : _ref2$showReset,
|
|
19255
19255
|
_ref2$submitDisabled = _ref2.submitDisabled,
|
|
19256
19256
|
submitDisabled = _ref2$submitDisabled === void 0 ? false : _ref2$submitDisabled,
|
|
19257
|
-
props = _objectWithoutProperties$1(_ref2, _excluded$
|
|
19257
|
+
props = _objectWithoutProperties$1(_ref2, _excluded$Q);
|
|
19258
19258
|
var methods = useForm({
|
|
19259
19259
|
defaultValues: defaultValues,
|
|
19260
19260
|
resolver: validationSchema
|
|
@@ -19300,7 +19300,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19300
19300
|
// hatch for extra component props and is still spread. An array must
|
|
19301
19301
|
// never be spread: it leaked index keys ("0", "1", …) as props/attributes.
|
|
19302
19302
|
var extraProps = options && _typeof$4(options) === "object" && !Array.isArray(options) ? options : undefined;
|
|
19303
|
-
var commonProps = _objectSpread$
|
|
19303
|
+
var commonProps = _objectSpread$W(_objectSpread$W({
|
|
19304
19304
|
name: name,
|
|
19305
19305
|
label: label,
|
|
19306
19306
|
required: required,
|
|
@@ -19322,7 +19322,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19322
19322
|
onChange = _ref3$field.onChange,
|
|
19323
19323
|
value = _ref3$field.value,
|
|
19324
19324
|
ref = _ref3$field.ref;
|
|
19325
|
-
return jsx(Input, _objectSpread$
|
|
19325
|
+
return jsx(Input, _objectSpread$W(_objectSpread$W({
|
|
19326
19326
|
type: type,
|
|
19327
19327
|
value: value || "",
|
|
19328
19328
|
onChange: onChange,
|
|
@@ -19349,7 +19349,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19349
19349
|
onChange = _ref4$field.onChange,
|
|
19350
19350
|
value = _ref4$field.value,
|
|
19351
19351
|
ref = _ref4$field.ref;
|
|
19352
|
-
return jsx(Select, _objectSpread$
|
|
19352
|
+
return jsx(Select, _objectSpread$W({
|
|
19353
19353
|
value: value,
|
|
19354
19354
|
onChange: onChange,
|
|
19355
19355
|
ref: ref,
|
|
@@ -19367,7 +19367,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19367
19367
|
onChange = _ref5$field.onChange,
|
|
19368
19368
|
value = _ref5$field.value,
|
|
19369
19369
|
ref = _ref5$field.ref;
|
|
19370
|
-
return jsx(DatePicker, _objectSpread$
|
|
19370
|
+
return jsx(DatePicker, _objectSpread$W({
|
|
19371
19371
|
value: value,
|
|
19372
19372
|
onChange: onChange,
|
|
19373
19373
|
ref: ref,
|
|
@@ -19550,7 +19550,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19550
19550
|
d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
|
|
19551
19551
|
})
|
|
19552
19552
|
}), "Choose File"]
|
|
19553
|
-
}), jsx("input", _objectSpread$
|
|
19553
|
+
}), jsx("input", _objectSpread$W(_objectSpread$W({}, field), {}, {
|
|
19554
19554
|
id: name,
|
|
19555
19555
|
ref: ref,
|
|
19556
19556
|
type: "file",
|
|
@@ -19565,13 +19565,13 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19565
19565
|
var reader = new FileReader();
|
|
19566
19566
|
reader.onloadend = function () {
|
|
19567
19567
|
setFilePreviews(function (prev) {
|
|
19568
|
-
return _objectSpread$
|
|
19568
|
+
return _objectSpread$W(_objectSpread$W({}, prev), {}, _defineProperty$4({}, name, reader.result));
|
|
19569
19569
|
});
|
|
19570
19570
|
};
|
|
19571
19571
|
reader.readAsDataURL(file);
|
|
19572
19572
|
} else {
|
|
19573
19573
|
setFilePreviews(function (prev) {
|
|
19574
|
-
return _objectSpread$
|
|
19574
|
+
return _objectSpread$W(_objectSpread$W({}, prev), {}, _defineProperty$4({}, name, null));
|
|
19575
19575
|
});
|
|
19576
19576
|
}
|
|
19577
19577
|
},
|
|
@@ -19585,7 +19585,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19585
19585
|
onClick: function onClick() {
|
|
19586
19586
|
_onChange3(null);
|
|
19587
19587
|
setFilePreviews(function (prev) {
|
|
19588
|
-
return _objectSpread$
|
|
19588
|
+
return _objectSpread$W(_objectSpread$W({}, prev), {}, _defineProperty$4({}, name, null));
|
|
19589
19589
|
});
|
|
19590
19590
|
},
|
|
19591
19591
|
className: "ml-3 text-sm text-error-600 hover:text-error-800",
|
|
@@ -19620,7 +19620,7 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19620
19620
|
ref = _ref0$field.ref;
|
|
19621
19621
|
return jsxs("div", {
|
|
19622
19622
|
className: "w-full",
|
|
19623
|
-
children: [jsx(Switch, _objectSpread$
|
|
19623
|
+
children: [jsx(Switch, _objectSpread$W({
|
|
19624
19624
|
checked: !!value,
|
|
19625
19625
|
onChange: onChange,
|
|
19626
19626
|
ref: ref,
|
|
@@ -19707,8 +19707,8 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19707
19707
|
}
|
|
19708
19708
|
return renderField(group);
|
|
19709
19709
|
};
|
|
19710
|
-
return jsx(FormProvider, _objectSpread$
|
|
19711
|
-
children: jsxs("form", _objectSpread$
|
|
19710
|
+
return jsx(FormProvider, _objectSpread$W(_objectSpread$W({}, methods), {}, {
|
|
19711
|
+
children: jsxs("form", _objectSpread$W(_objectSpread$W({
|
|
19712
19712
|
ref: ref,
|
|
19713
19713
|
className: cn("space-y-6", className),
|
|
19714
19714
|
onSubmit: handleSubmit(handleFormSubmit)
|
|
@@ -19735,9 +19735,9 @@ var Form = /*#__PURE__*/forwardRef(function Form(_ref2, ref) {
|
|
|
19735
19735
|
});
|
|
19736
19736
|
Form.displayName = "Form";
|
|
19737
19737
|
|
|
19738
|
-
var _excluded$
|
|
19739
|
-
function ownKeys$
|
|
19740
|
-
function _objectSpread$
|
|
19738
|
+
var _excluded$P = ["items", "allowMultiple", "defaultOpenIndexes", "onChange", "className", "headerClassName", "contentClassName", "chevronPosition", "chevronIcon", "bordered", "rounded", "size", "transitionDuration"];
|
|
19739
|
+
function ownKeys$V(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19740
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$V(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$V(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19741
19741
|
/**
|
|
19742
19742
|
* item.leftIcon may be:
|
|
19743
19743
|
* - ReactNode (e.g. <svg/>)
|
|
@@ -19769,7 +19769,7 @@ var Accordion = /*#__PURE__*/forwardRef(function Accordion(_ref, ref) {
|
|
|
19769
19769
|
size = _ref$size === void 0 ? "md" : _ref$size,
|
|
19770
19770
|
_ref$transitionDurati = _ref.transitionDuration,
|
|
19771
19771
|
transitionDuration = _ref$transitionDurati === void 0 ? 220 : _ref$transitionDurati,
|
|
19772
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
19772
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$P);
|
|
19773
19773
|
var saneDefault = Array.isArray(defaultOpenIndexes) ? defaultOpenIndexes.filter(function (i) {
|
|
19774
19774
|
return Number.isFinite(i) && i >= 0 && i < items.length;
|
|
19775
19775
|
}) : [];
|
|
@@ -19919,7 +19919,7 @@ var Accordion = /*#__PURE__*/forwardRef(function Accordion(_ref, ref) {
|
|
|
19919
19919
|
}
|
|
19920
19920
|
return left; // assume ReactNode
|
|
19921
19921
|
};
|
|
19922
|
-
return jsx("div", _objectSpread$
|
|
19922
|
+
return jsx("div", _objectSpread$V(_objectSpread$V({
|
|
19923
19923
|
ref: ref,
|
|
19924
19924
|
className: wrapperClasses,
|
|
19925
19925
|
role: "presentation"
|
|
@@ -20019,9 +20019,9 @@ var Accordion = /*#__PURE__*/forwardRef(function Accordion(_ref, ref) {
|
|
|
20019
20019
|
});
|
|
20020
20020
|
Accordion.displayName = "Accordion";
|
|
20021
20021
|
|
|
20022
|
-
var _excluded$
|
|
20023
|
-
function ownKeys$
|
|
20024
|
-
function _objectSpread$
|
|
20022
|
+
var _excluded$O = ["id", "name", "label", "checked", "defaultChecked", "onChange", "disabled", "required", "className", "size", "labelPosition", "value", "ariaLabel", "variant", "indeterminate", "color", "iconClass", "checkedClass", "wrapperProps", "haptics"];
|
|
20023
|
+
function ownKeys$U(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20024
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$U(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$U(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20025
20025
|
var SIZE_CLASSES$2 = {
|
|
20026
20026
|
sm: {
|
|
20027
20027
|
box: "h-4 w-4",
|
|
@@ -20118,7 +20118,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
20118
20118
|
wrapperProps = _ref.wrapperProps,
|
|
20119
20119
|
_ref$haptics = _ref.haptics,
|
|
20120
20120
|
haptics = _ref$haptics === void 0 ? false : _ref$haptics,
|
|
20121
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
20121
|
+
props = _objectWithoutProperties$1(_ref, _excluded$O);
|
|
20122
20122
|
var autoId = useId();
|
|
20123
20123
|
var inputId = id || "".concat(autoId, "-checkbox");
|
|
20124
20124
|
var inputRef = useRef(null);
|
|
@@ -20161,7 +20161,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
20161
20161
|
var iconState = function iconState(shown) {
|
|
20162
20162
|
return shown ? "opacity-100 scale-100" : "opacity-0 scale-50";
|
|
20163
20163
|
};
|
|
20164
|
-
return jsxs("div", _objectSpread$
|
|
20164
|
+
return jsxs("div", _objectSpread$U(_objectSpread$U({
|
|
20165
20165
|
className: cn("inline-flex items-center", className)
|
|
20166
20166
|
}, wrapperProps !== null && wrapperProps !== void 0 ? wrapperProps : {}), {}, {
|
|
20167
20167
|
children: [label && labelPosition === "left" && jsx("label", {
|
|
@@ -20171,7 +20171,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
20171
20171
|
}), jsxs("div", {
|
|
20172
20172
|
className: cn("relative inline-flex shrink-0 items-center justify-center rounded-sm border transition-shadow duration-fast motion-reduce:transition-none", sizeClass.box, disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer hover:shadow-sm", !disabled && showBoxBorder && "border-gray-300 dark:border-gray-600"),
|
|
20173
20173
|
"aria-disabled": disabled,
|
|
20174
|
-
children: [jsx("input", _objectSpread$
|
|
20174
|
+
children: [jsx("input", _objectSpread$U({
|
|
20175
20175
|
id: inputId,
|
|
20176
20176
|
ref: inputRef,
|
|
20177
20177
|
name: name,
|
|
@@ -20215,9 +20215,9 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
20215
20215
|
});
|
|
20216
20216
|
Checkbox.displayName = "Checkbox";
|
|
20217
20217
|
|
|
20218
|
-
var _excluded$
|
|
20219
|
-
function ownKeys$
|
|
20220
|
-
function _objectSpread$
|
|
20218
|
+
var _excluded$N = ["value", "onChange", "placeholder", "label", "error", "helperText", "disabled", "required", "minDate", "maxDate", "className", "weekStartsOn", "portal", "displayFormat", "locale", "showClear", "closeOnSelect", "presentation", "presets"];
|
|
20219
|
+
function ownKeys$T(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20220
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$T(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$T(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20221
20221
|
/*
|
|
20222
20222
|
Single-calendar DateRangePicker.
|
|
20223
20223
|
- Popover: tap/click start then end; the second pick commits (and closes
|
|
@@ -20259,7 +20259,7 @@ var DateRangePicker = /*#__PURE__*/forwardRef(function DateRangePicker(_ref, ref
|
|
|
20259
20259
|
_ref$presentation = _ref.presentation,
|
|
20260
20260
|
presentation = _ref$presentation === void 0 ? "auto" : _ref$presentation,
|
|
20261
20261
|
presets = _ref.presets,
|
|
20262
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
20262
|
+
props = _objectWithoutProperties$1(_ref, _excluded$N);
|
|
20263
20263
|
// Stable ids wiring label / helper / error to the trigger button.
|
|
20264
20264
|
// A consumer `id` (spread onto the trigger via ...props) wins.
|
|
20265
20265
|
var reactId = useId();
|
|
@@ -20559,7 +20559,7 @@ var DateRangePicker = /*#__PURE__*/forwardRef(function DateRangePicker(_ref, ref
|
|
|
20559
20559
|
}), jsxs("div", {
|
|
20560
20560
|
ref: fieldRef,
|
|
20561
20561
|
className: "relative",
|
|
20562
|
-
children: [jsxs("button", _objectSpread$
|
|
20562
|
+
children: [jsxs("button", _objectSpread$T(_objectSpread$T({
|
|
20563
20563
|
ref: triggerRef,
|
|
20564
20564
|
type: "button",
|
|
20565
20565
|
id: fieldId,
|
|
@@ -20655,9 +20655,9 @@ var DateRangePicker = /*#__PURE__*/forwardRef(function DateRangePicker(_ref, ref
|
|
|
20655
20655
|
});
|
|
20656
20656
|
DateRangePicker.displayName = "DateRangePicker";
|
|
20657
20657
|
|
|
20658
|
-
var _excluded$
|
|
20659
|
-
function ownKeys$
|
|
20660
|
-
function _objectSpread$
|
|
20658
|
+
var _excluded$M = ["size", "speed", "thickness", "color", "secondaryColor", "variant", "className", "inline", "ariaLabel", "text", "reverse", "style"];
|
|
20659
|
+
function ownKeys$S(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20660
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$S(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20661
20661
|
var sizeToPx = function sizeToPx(size) {
|
|
20662
20662
|
if (!size) return 24;
|
|
20663
20663
|
if (typeof size === "number") return size;
|
|
@@ -20702,13 +20702,13 @@ var Loader = /*#__PURE__*/forwardRef(function Loader(_ref, ref) {
|
|
|
20702
20702
|
_ref$reverse = _ref.reverse,
|
|
20703
20703
|
reverse = _ref$reverse === void 0 ? false : _ref$reverse,
|
|
20704
20704
|
style = _ref.style,
|
|
20705
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
20705
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$M);
|
|
20706
20706
|
var px = sizeToPx(size);
|
|
20707
20707
|
var wrapperClass = cn(inline ? "inline-flex" : "flex", "items-center gap-2", className);
|
|
20708
|
-
var rootStyle = _objectSpread$
|
|
20708
|
+
var rootStyle = _objectSpread$S({
|
|
20709
20709
|
"--dt-loader-speed": "".concat(speed, "s")
|
|
20710
20710
|
}, style);
|
|
20711
|
-
return jsxs("div", _objectSpread$
|
|
20711
|
+
return jsxs("div", _objectSpread$S(_objectSpread$S({
|
|
20712
20712
|
ref: ref,
|
|
20713
20713
|
role: "progressbar",
|
|
20714
20714
|
"aria-label": ariaLabel,
|
|
@@ -20758,7 +20758,7 @@ var Loader = /*#__PURE__*/forwardRef(function Loader(_ref, ref) {
|
|
|
20758
20758
|
}), variant === "bar" && jsx("div", {
|
|
20759
20759
|
"aria-hidden": true,
|
|
20760
20760
|
className: cn("relative overflow-hidden rounded-full", !secondaryColor && TRACK_BG),
|
|
20761
|
-
style: _objectSpread$
|
|
20761
|
+
style: _objectSpread$S({
|
|
20762
20762
|
width: Math.max(72, px * 2.5),
|
|
20763
20763
|
height: Math.max(6, px / 6)
|
|
20764
20764
|
}, secondaryColor ? {
|
|
@@ -20777,9 +20777,9 @@ var Loader = /*#__PURE__*/forwardRef(function Loader(_ref, ref) {
|
|
|
20777
20777
|
}));
|
|
20778
20778
|
});
|
|
20779
20779
|
|
|
20780
|
-
var _excluded$
|
|
20781
|
-
function ownKeys$
|
|
20782
|
-
function _objectSpread$
|
|
20780
|
+
var _excluded$L = ["min", "max", "step", "minGap", "value", "defaultValue", "onChange", "onFinalChange", "showInputs", "showTooltips", "disabled", "presets", "formatValue", "className", "size", "colorClass", "ariaLabel"];
|
|
20781
|
+
function ownKeys$R(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20782
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$R(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$R(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20783
20783
|
/**
|
|
20784
20784
|
* PriceRangePicker - dual-thumb range picker (Tailwind)
|
|
20785
20785
|
*
|
|
@@ -20862,7 +20862,7 @@ var PriceRangePicker = /*#__PURE__*/forwardRef(function PriceRangePicker(_ref, r
|
|
|
20862
20862
|
colorClass = _ref$colorClass === void 0 ? "bg-primary-600" : _ref$colorClass,
|
|
20863
20863
|
_ref$ariaLabel = _ref.ariaLabel,
|
|
20864
20864
|
ariaLabel = _ref$ariaLabel === void 0 ? "Price range" : _ref$ariaLabel,
|
|
20865
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
20865
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$L);
|
|
20866
20866
|
var isControlled = value && _typeof$4(value) === "object";
|
|
20867
20867
|
var _useState = useState(function () {
|
|
20868
20868
|
return isControlled ? {
|
|
@@ -20944,7 +20944,7 @@ var PriceRangePicker = /*#__PURE__*/forwardRef(function PriceRangePicker(_ref, r
|
|
|
20944
20944
|
var next = keyToValue(e.key, current[which], bounds);
|
|
20945
20945
|
if (next === null) return;
|
|
20946
20946
|
e.preventDefault();
|
|
20947
|
-
handleFinal(setValues(_objectSpread$
|
|
20947
|
+
handleFinal(setValues(_objectSpread$R(_objectSpread$R({}, current), {}, _defineProperty$4(_defineProperty$4({}, which, next), "_active", which))));
|
|
20948
20948
|
};
|
|
20949
20949
|
};
|
|
20950
20950
|
// Pointer drag on the track: grab the nearest thumb and follow the pointer.
|
|
@@ -20960,12 +20960,12 @@ var PriceRangePicker = /*#__PURE__*/forwardRef(function PriceRangePicker(_ref, r
|
|
|
20960
20960
|
var which = Math.abs(raw - current.min) < Math.abs(raw - current.max) || current.min === current.max && raw < current.min ? "min" : "max";
|
|
20961
20961
|
(_e$currentTarget$setP = (_e$currentTarget = e.currentTarget).setPointerCapture) === null || _e$currentTarget$setP === void 0 || _e$currentTarget$setP.call(_e$currentTarget, e.pointerId);
|
|
20962
20962
|
setDragging(which);
|
|
20963
|
-
setValues(_objectSpread$
|
|
20963
|
+
setValues(_objectSpread$R(_objectSpread$R({}, current), {}, _defineProperty$4(_defineProperty$4({}, which, raw), "_active", which)));
|
|
20964
20964
|
(_thumbRefs$current = thumbRefs[which === "min" ? 0 : 1].current) === null || _thumbRefs$current === void 0 || _thumbRefs$current.focus();
|
|
20965
20965
|
};
|
|
20966
20966
|
var onPointerMove = function onPointerMove(e) {
|
|
20967
20967
|
if (!dragging) return;
|
|
20968
|
-
setValues(_objectSpread$
|
|
20968
|
+
setValues(_objectSpread$R(_objectSpread$R({}, latest.current), {}, _defineProperty$4(_defineProperty$4({}, dragging, toValue(e.clientX)), "_active", dragging)));
|
|
20969
20969
|
};
|
|
20970
20970
|
var onPointerUp = function onPointerUp() {
|
|
20971
20971
|
if (!dragging) return;
|
|
@@ -21019,7 +21019,7 @@ var PriceRangePicker = /*#__PURE__*/forwardRef(function PriceRangePicker(_ref, r
|
|
|
21019
21019
|
vmin: current.min,
|
|
21020
21020
|
vmax: max
|
|
21021
21021
|
}];
|
|
21022
|
-
return jsxs("div", _objectSpread$
|
|
21022
|
+
return jsxs("div", _objectSpread$R(_objectSpread$R({
|
|
21023
21023
|
ref: ref,
|
|
21024
21024
|
className: cn("bg-surface rounded-lg p-4 w-full max-w-lg", className)
|
|
21025
21025
|
}, rest), {}, {
|
|
@@ -21133,9 +21133,9 @@ var PriceRangePicker = /*#__PURE__*/forwardRef(function PriceRangePicker(_ref, r
|
|
|
21133
21133
|
});
|
|
21134
21134
|
PriceRangePicker.displayName = "PriceRangePicker";
|
|
21135
21135
|
|
|
21136
|
-
var _excluded$
|
|
21137
|
-
function ownKeys$
|
|
21138
|
-
function _objectSpread$
|
|
21136
|
+
var _excluded$K = ["value", "max", "size", "showValue", "rounded", "variant", "striped", "animated", "label", "ariaLabel", "className", "style"];
|
|
21137
|
+
function ownKeys$Q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21138
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Q(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21139
21139
|
// ProgressBar. Colours come only from role tokens, so it follows the brand and
|
|
21140
21140
|
// dark mode (STUDIO-59). The HEX props `color` / `bgColor` / `valueColor` were
|
|
21141
21141
|
// removed in 2.0.0 (DTUI-65); pick a token tone with `variant` instead.
|
|
@@ -21194,7 +21194,7 @@ var ProgressBar = /*#__PURE__*/forwardRef(function ProgressBar(_ref, ref) {
|
|
|
21194
21194
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
21195
21195
|
_ref$style = _ref.style,
|
|
21196
21196
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
21197
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
21197
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$K);
|
|
21198
21198
|
var safeMax = typeof max === 'number' && max > 0 ? max : 100;
|
|
21199
21199
|
var safeValue = typeof value === 'number' ? value : 0;
|
|
21200
21200
|
var clamped = Math.max(0, Math.min(safeValue, safeMax));
|
|
@@ -21216,10 +21216,10 @@ var ProgressBar = /*#__PURE__*/forwardRef(function ProgressBar(_ref, ref) {
|
|
|
21216
21216
|
// Stripe motion is a Tailwind animation (DTUI-48) — no per-instance <style> tag —
|
|
21217
21217
|
// and stops under prefers-reduced-motion, as does the width transition.
|
|
21218
21218
|
var animatedClass = animated ? 'animate-progress-stripes motion-reduce:animate-none' : '';
|
|
21219
|
-
var finalFillStyle = _objectSpread$
|
|
21219
|
+
var finalFillStyle = _objectSpread$Q({
|
|
21220
21220
|
width: "".concat(percent, "%")
|
|
21221
21221
|
}, stripeStyle);
|
|
21222
|
-
return jsxs("div", _objectSpread$
|
|
21222
|
+
return jsxs("div", _objectSpread$Q(_objectSpread$Q({
|
|
21223
21223
|
ref: ref,
|
|
21224
21224
|
className: cn("w-full", className),
|
|
21225
21225
|
style: style
|
|
@@ -22431,9 +22431,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
22431
22431
|
var propTypesExports = propTypes.exports;
|
|
22432
22432
|
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
22433
22433
|
|
|
22434
|
-
var _excluded$
|
|
22435
|
-
function ownKeys$
|
|
22436
|
-
function _objectSpread$
|
|
22434
|
+
var _excluded$J = ["id", "name", "value", "checked", "defaultChecked", "onChange", "disabled", "required", "label", "size", "labelPosition", "radioColor", "className", "ariaLabel"];
|
|
22435
|
+
function ownKeys$P(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22436
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$P(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$P(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22437
22437
|
var SIZE_MAP = {
|
|
22438
22438
|
sm: {
|
|
22439
22439
|
outer: "h-4 w-4",
|
|
@@ -22471,7 +22471,7 @@ var Radio = /*#__PURE__*/forwardRef(function Radio(_ref, ref) {
|
|
|
22471
22471
|
_ref$className = _ref.className,
|
|
22472
22472
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
22473
22473
|
ariaLabel = _ref.ariaLabel,
|
|
22474
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
22474
|
+
props = _objectWithoutProperties$1(_ref, _excluded$J);
|
|
22475
22475
|
var autoId = useId();
|
|
22476
22476
|
var inputId = id || "".concat(autoId, "-radio");
|
|
22477
22477
|
// Default to the brand's primary token so the radio follows theming.
|
|
@@ -22542,7 +22542,7 @@ var Radio = /*#__PURE__*/forwardRef(function Radio(_ref, ref) {
|
|
|
22542
22542
|
"aria-hidden": "true",
|
|
22543
22543
|
children: " *"
|
|
22544
22544
|
}) : null]
|
|
22545
|
-
}), jsx("input", _objectSpread$
|
|
22545
|
+
}), jsx("input", _objectSpread$P({
|
|
22546
22546
|
ref: setRefs,
|
|
22547
22547
|
id: inputId,
|
|
22548
22548
|
type: "radio",
|
|
@@ -22610,9 +22610,9 @@ Radio.defaultProps = {
|
|
|
22610
22610
|
required: false
|
|
22611
22611
|
};
|
|
22612
22612
|
|
|
22613
|
-
var _excluded$
|
|
22614
|
-
function ownKeys$
|
|
22615
|
-
function _objectSpread$
|
|
22613
|
+
var _excluded$I = ["count", "value", "defaultValue", "readOnly", "icon", "toggledIcon", "size", "onChange", "onClick", "text", "className", "id", "name"];
|
|
22614
|
+
function ownKeys$O(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22615
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$O(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$O(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22616
22616
|
function StarFilled(_ref) {
|
|
22617
22617
|
var _ref$size = _ref.size,
|
|
22618
22618
|
size = _ref$size === void 0 ? 20 : _ref$size;
|
|
@@ -22666,7 +22666,7 @@ var Rate = /*#__PURE__*/forwardRef(function Rate(_ref3, ref) {
|
|
|
22666
22666
|
className = _ref3$className === void 0 ? "" : _ref3$className,
|
|
22667
22667
|
id = _ref3.id,
|
|
22668
22668
|
name = _ref3.name,
|
|
22669
|
-
rest = _objectWithoutProperties$1(_ref3, _excluded$
|
|
22669
|
+
rest = _objectWithoutProperties$1(_ref3, _excluded$I);
|
|
22670
22670
|
var _useState = useState(Math.max(0, Math.min(count, Math.floor(defaultValue || 0)))),
|
|
22671
22671
|
_useState2 = _slicedToArray(_useState, 2),
|
|
22672
22672
|
internalValue = _useState2[0],
|
|
@@ -22786,7 +22786,7 @@ var Rate = /*#__PURE__*/forwardRef(function Rate(_ref3, ref) {
|
|
|
22786
22786
|
if (target) target.focus();
|
|
22787
22787
|
if (next !== selectedValue) setValue(next);
|
|
22788
22788
|
};
|
|
22789
|
-
return jsxs("div", _objectSpread$
|
|
22789
|
+
return jsxs("div", _objectSpread$O(_objectSpread$O({
|
|
22790
22790
|
ref: ref,
|
|
22791
22791
|
id: id,
|
|
22792
22792
|
className: cn("inline-flex items-center gap-2", className),
|
|
@@ -22855,9 +22855,9 @@ var Rate = /*#__PURE__*/forwardRef(function Rate(_ref3, ref) {
|
|
|
22855
22855
|
});
|
|
22856
22856
|
Rate.displayName = "Rate";
|
|
22857
22857
|
|
|
22858
|
-
var _excluded$
|
|
22859
|
-
function ownKeys$
|
|
22860
|
-
function _objectSpread$
|
|
22858
|
+
var _excluded$H = ["label", "avatarSrc", "avatarAlt", "initials", "size", "onRemove", "onClick", "className", "closeClass", "ariaLabel", "onKeyDown", "avatarPosition", "avatarClassname", "initialClassname"];
|
|
22859
|
+
function ownKeys$N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22860
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$N(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22861
22861
|
var RoundedTag = /*#__PURE__*/forwardRef(function RoundedTag(_ref, ref) {
|
|
22862
22862
|
var label = _ref.label,
|
|
22863
22863
|
_ref$avatarSrc = _ref.avatarSrc,
|
|
@@ -22884,7 +22884,7 @@ var RoundedTag = /*#__PURE__*/forwardRef(function RoundedTag(_ref, ref) {
|
|
|
22884
22884
|
avatarClassname = _ref$avatarClassname === void 0 ? "" : _ref$avatarClassname,
|
|
22885
22885
|
_ref$initialClassname = _ref.initialClassname,
|
|
22886
22886
|
initialClassname = _ref$initialClassname === void 0 ? "" : _ref$initialClassname,
|
|
22887
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
22887
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$H);
|
|
22888
22888
|
var showAvatar = Boolean(avatarSrc || initials);
|
|
22889
22889
|
var sizes = {
|
|
22890
22890
|
sm: {
|
|
@@ -22947,7 +22947,7 @@ var RoundedTag = /*#__PURE__*/forwardRef(function RoundedTag(_ref, ref) {
|
|
|
22947
22947
|
children: initials
|
|
22948
22948
|
})
|
|
22949
22949
|
});
|
|
22950
|
-
return jsxs("div", _objectSpread$
|
|
22950
|
+
return jsxs("div", _objectSpread$N(_objectSpread$N({
|
|
22951
22951
|
ref: ref,
|
|
22952
22952
|
className: cn("inline-flex items-center rounded-full bg-gray-100 text-primary-800 dark:bg-gray-800 dark:text-gray-100", paddingClass, gapClass, s.text, clickable && ["cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-1 dark:focus-visible:ring-offset-gray-900", PRESS_FEEDBACK], className),
|
|
22953
22953
|
role: clickable ? "button" : "group",
|
|
@@ -22984,9 +22984,9 @@ var RoundedTag = /*#__PURE__*/forwardRef(function RoundedTag(_ref, ref) {
|
|
|
22984
22984
|
});
|
|
22985
22985
|
RoundedTag.displayName = "RoundedTag";
|
|
22986
22986
|
|
|
22987
|
-
var _excluded$
|
|
22988
|
-
function ownKeys$
|
|
22989
|
-
function _objectSpread$
|
|
22987
|
+
var _excluded$G = ["count", "circle", "height", "width", "rounded", "animated", "active", "gap", "inline", "className", "children", "style"];
|
|
22988
|
+
function ownKeys$M(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22989
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$M(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$M(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22990
22990
|
/**
|
|
22991
22991
|
* Skeleton Component (React)
|
|
22992
22992
|
*
|
|
@@ -23037,7 +23037,7 @@ var Skeleton = /*#__PURE__*/forwardRef(function Skeleton(_ref, ref) {
|
|
|
23037
23037
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
23038
23038
|
_ref$style = _ref.style,
|
|
23039
23039
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
23040
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
23040
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$G);
|
|
23041
23041
|
if (!active) return jsx(Fragment, {
|
|
23042
23042
|
children: children
|
|
23043
23043
|
});
|
|
@@ -23048,13 +23048,13 @@ var Skeleton = /*#__PURE__*/forwardRef(function Skeleton(_ref, ref) {
|
|
|
23048
23048
|
var items = Array.from({
|
|
23049
23049
|
length: Math.max(1, Math.floor(count))
|
|
23050
23050
|
});
|
|
23051
|
-
return jsx("div", _objectSpread$
|
|
23051
|
+
return jsx("div", _objectSpread$M(_objectSpread$M({
|
|
23052
23052
|
ref: ref,
|
|
23053
23053
|
className: cn("skeleton-wrapper", className),
|
|
23054
23054
|
role: "status",
|
|
23055
23055
|
"aria-busy": active,
|
|
23056
23056
|
"aria-live": "polite",
|
|
23057
|
-
style: _objectSpread$
|
|
23057
|
+
style: _objectSpread$M({
|
|
23058
23058
|
display: "flex",
|
|
23059
23059
|
flexDirection: containerDirection,
|
|
23060
23060
|
gap: gap,
|
|
@@ -23078,12 +23078,12 @@ var Skeleton = /*#__PURE__*/forwardRef(function Skeleton(_ref, ref) {
|
|
|
23078
23078
|
});
|
|
23079
23079
|
Skeleton.displayName = "Skeleton";
|
|
23080
23080
|
|
|
23081
|
-
var _excluded$
|
|
23081
|
+
var _excluded$F = ["children", "defaultIndex", "index", "onChange", "orientation", "size", "variant", "animated", "swipeable", "className"],
|
|
23082
23082
|
_excluded2$6 = ["children", "className"];
|
|
23083
|
-
function ownKeys$
|
|
23084
|
-
function _objectSpread$
|
|
23083
|
+
function ownKeys$L(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23084
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$L(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$L(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23085
23085
|
// useLayoutEffect warns during SSR; fall back to useEffect on the server.
|
|
23086
|
-
var useIsomorphicLayoutEffect$
|
|
23086
|
+
var useIsomorphicLayoutEffect$7 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
23087
23087
|
// Minimum horizontal travel (px) for a swipe to change tabs, and how much more
|
|
23088
23088
|
// horizontal than vertical it must be, so vertical page scrolls never switch tabs.
|
|
23089
23089
|
var SWIPE_THRESHOLD = 50;
|
|
@@ -23152,7 +23152,7 @@ var Tabs = /*#__PURE__*/forwardRef(function Tabs(_ref, ref) {
|
|
|
23152
23152
|
swipeable = _ref$swipeable === void 0 ? false : _ref$swipeable,
|
|
23153
23153
|
_ref$className = _ref.className,
|
|
23154
23154
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
23155
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
23155
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$F);
|
|
23156
23156
|
var isControlled = controlledIndex != null;
|
|
23157
23157
|
var _useState = useState(defaultIndex),
|
|
23158
23158
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23190,7 +23190,7 @@ var Tabs = /*#__PURE__*/forwardRef(function Tabs(_ref, ref) {
|
|
|
23190
23190
|
};
|
|
23191
23191
|
return jsx(TabsContext.Provider, {
|
|
23192
23192
|
value: value,
|
|
23193
|
-
children: jsx("div", _objectSpread$
|
|
23193
|
+
children: jsx("div", _objectSpread$L(_objectSpread$L({
|
|
23194
23194
|
ref: ref,
|
|
23195
23195
|
className: cn("tabs-root", className)
|
|
23196
23196
|
}, rest), {}, {
|
|
@@ -23225,7 +23225,7 @@ var TabList = /*#__PURE__*/forwardRef(function TabList(_ref2, ref) {
|
|
|
23225
23225
|
if (typeof ref === "function") ref(node);else if (ref) ref.current = node;
|
|
23226
23226
|
};
|
|
23227
23227
|
// Measure the active tab: position the indicator and scroll the tab into view.
|
|
23228
|
-
useIsomorphicLayoutEffect$
|
|
23228
|
+
useIsomorphicLayoutEffect$7(function () {
|
|
23229
23229
|
var list = listRef.current;
|
|
23230
23230
|
var tab = tabsRef.current[activeIndex];
|
|
23231
23231
|
if (!list || !tab) return undefined;
|
|
@@ -23259,7 +23259,7 @@ var TabList = /*#__PURE__*/forwardRef(function TabList(_ref2, ref) {
|
|
|
23259
23259
|
if (!hasIndicator && indicatorReady) setIndicatorReady(false);
|
|
23260
23260
|
}, [hasIndicator, indicatorReady, setIndicatorReady]);
|
|
23261
23261
|
var showIndicator = hasIndicator && indicatorReady && indicator;
|
|
23262
|
-
return jsxs("div", _objectSpread$
|
|
23262
|
+
return jsxs("div", _objectSpread$L(_objectSpread$L({
|
|
23263
23263
|
ref: setRefs,
|
|
23264
23264
|
role: "tablist",
|
|
23265
23265
|
"aria-orientation": orientation,
|
|
@@ -23459,7 +23459,7 @@ function Panels(_ref4) {
|
|
|
23459
23459
|
start.current = null;
|
|
23460
23460
|
}
|
|
23461
23461
|
} : {};
|
|
23462
|
-
return jsx("div", _objectSpread$
|
|
23462
|
+
return jsx("div", _objectSpread$L(_objectSpread$L({
|
|
23463
23463
|
// touch-pan-y: the browser keeps vertical scrolling; horizontal moves reach us.
|
|
23464
23464
|
className: cn("relative w-full", swipeable && "touch-pan-y", className)
|
|
23465
23465
|
}, swipeHandlers), {}, {
|
|
@@ -23510,9 +23510,9 @@ Tabs.Tab = Tab;
|
|
|
23510
23510
|
Tabs.Panels = Panels;
|
|
23511
23511
|
Tabs.Panel = Panel;
|
|
23512
23512
|
|
|
23513
|
-
var _excluded$
|
|
23514
|
-
function ownKeys$
|
|
23515
|
-
function _objectSpread$
|
|
23513
|
+
var _excluded$E = ["items", "trigger", "className", "menuClass", "menuItemClass", "closeOnSelect", "ariaLabel", "wrapperClassName", "presentation", "cancelLabel"];
|
|
23514
|
+
function ownKeys$K(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23515
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$K(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$K(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23516
23516
|
/**
|
|
23517
23517
|
* ThreeDotPopover
|
|
23518
23518
|
*
|
|
@@ -23549,7 +23549,7 @@ var ThreeDotPopoverSimple = /*#__PURE__*/forwardRef(function ThreeDotPopoverSimp
|
|
|
23549
23549
|
presentation = _ref$presentation === void 0 ? "auto" : _ref$presentation,
|
|
23550
23550
|
_ref$cancelLabel = _ref.cancelLabel,
|
|
23551
23551
|
cancelLabel = _ref$cancelLabel === void 0 ? "Cancel" : _ref$cancelLabel,
|
|
23552
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
23552
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$E);
|
|
23553
23553
|
var triggerRef = useRef(null);
|
|
23554
23554
|
var _useState = useState(null),
|
|
23555
23555
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23604,7 +23604,7 @@ var ThreeDotPopoverSimple = /*#__PURE__*/forwardRef(function ThreeDotPopoverSimp
|
|
|
23604
23604
|
"aria-expanded": open,
|
|
23605
23605
|
"aria-controls": open ? menuId : undefined
|
|
23606
23606
|
};
|
|
23607
|
-
var DefaultTrigger = jsx("button", _objectSpread$
|
|
23607
|
+
var DefaultTrigger = jsx("button", _objectSpread$K(_objectSpread$K({
|
|
23608
23608
|
type: "button",
|
|
23609
23609
|
"aria-label": ariaLabel
|
|
23610
23610
|
}, triggerA11y), {}, {
|
|
@@ -23619,7 +23619,7 @@ var ThreeDotPopoverSimple = /*#__PURE__*/forwardRef(function ThreeDotPopoverSimp
|
|
|
23619
23619
|
var triggerNode = trigger ?
|
|
23620
23620
|
/*#__PURE__*/
|
|
23621
23621
|
// eslint-disable-next-line react-hooks/refs -- setTriggerNode is a callback ref, run by React at commit
|
|
23622
|
-
React__default.cloneElement(trigger, _objectSpread$
|
|
23622
|
+
React__default.cloneElement(trigger, _objectSpread$K({
|
|
23623
23623
|
ref: setTriggerNode,
|
|
23624
23624
|
onClick: function onClick(e) {
|
|
23625
23625
|
trigger.props && trigger.props.onClick && trigger.props.onClick(e);
|
|
@@ -23630,7 +23630,7 @@ var ThreeDotPopoverSimple = /*#__PURE__*/forwardRef(function ThreeDotPopoverSimp
|
|
|
23630
23630
|
if (!e.defaultPrevented) onTriggerKeyDown(e);
|
|
23631
23631
|
}
|
|
23632
23632
|
}, triggerA11y)) : DefaultTrigger;
|
|
23633
|
-
return jsxs("div", _objectSpread$
|
|
23633
|
+
return jsxs("div", _objectSpread$K(_objectSpread$K({
|
|
23634
23634
|
ref: ref,
|
|
23635
23635
|
className: cn("inline-block relative", wrapperClassName)
|
|
23636
23636
|
}, rest), {}, {
|
|
@@ -23655,9 +23655,9 @@ var ThreeDotPopoverSimple = /*#__PURE__*/forwardRef(function ThreeDotPopoverSimp
|
|
|
23655
23655
|
});
|
|
23656
23656
|
ThreeDotPopoverSimple.displayName = "ThreeDotPopover";
|
|
23657
23657
|
|
|
23658
|
-
var _excluded$
|
|
23659
|
-
function ownKeys$
|
|
23660
|
-
function _objectSpread$
|
|
23658
|
+
var _excluded$D = ["position", "trigger", "content", "customTrigger", "children", "open", "defaultOpen", "onChange", "delay", "offset", "textClass", "bgClass", "className", "portal", "id", "style"];
|
|
23659
|
+
function ownKeys$J(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23660
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$J(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$J(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23661
23661
|
// Grace period (ms) before a hover tooltip closes after the pointer leaves the
|
|
23662
23662
|
// trigger, so the pointer can cross the `offset` gap onto the tooltip itself
|
|
23663
23663
|
// (WCAG 1.4.13 "hoverable").
|
|
@@ -23741,7 +23741,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(_ref, forwardedRef) {
|
|
|
23741
23741
|
portal = _ref$portal === void 0 ? true : _ref$portal,
|
|
23742
23742
|
propsId = _ref.id,
|
|
23743
23743
|
style = _ref.style,
|
|
23744
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
23744
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$D);
|
|
23745
23745
|
var triggerRef = useRef(null);
|
|
23746
23746
|
var tooltipRef = useRef(null);
|
|
23747
23747
|
var delayRef = useRef(null);
|
|
@@ -24061,7 +24061,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(_ref, forwardedRef) {
|
|
|
24061
24061
|
}
|
|
24062
24062
|
} : {};
|
|
24063
24063
|
// Tooltip box element
|
|
24064
|
-
var tooltipNode = open ? jsx("div", _objectSpread$
|
|
24064
|
+
var tooltipNode = open ? jsx("div", _objectSpread$J(_objectSpread$J(_objectSpread$J({
|
|
24065
24065
|
ref: function ref(node) {
|
|
24066
24066
|
return setRefs$1(node, tooltipRef, setFloating);
|
|
24067
24067
|
},
|
|
@@ -24070,7 +24070,7 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(_ref, forwardedRef) {
|
|
|
24070
24070
|
"data-placement": placement
|
|
24071
24071
|
}, rest), tipHoverProps), {}, {
|
|
24072
24072
|
className: cn("z-tooltip transform-gpu transition-opacity duration-150 motion-reduce:transition-none", className),
|
|
24073
|
-
style: _objectSpread$
|
|
24073
|
+
style: _objectSpread$J(_objectSpread$J({}, floatingStyles), style),
|
|
24074
24074
|
children: jsx("div", {
|
|
24075
24075
|
className: cn("max-w-xs rounded-md border border-line px-3 py-2 text-sm shadow-lg shadow-black/5", bgClass, textClass),
|
|
24076
24076
|
children: renderContent()
|
|
@@ -24083,9 +24083,9 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(_ref, forwardedRef) {
|
|
|
24083
24083
|
});
|
|
24084
24084
|
Tooltip.displayName = "Tooltip";
|
|
24085
24085
|
|
|
24086
|
-
var _excluded$
|
|
24087
|
-
function ownKeys$
|
|
24088
|
-
function _objectSpread$
|
|
24086
|
+
var _excluded$C = ["value", "onChange", "inputProps", "icon", "iconProps", "iconPosition", "placeholder", "fullWidth", "className"];
|
|
24087
|
+
function ownKeys$I(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24088
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$I(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$I(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24089
24089
|
// User-facing copy for GeolocationPositionError codes (and "unsupported").
|
|
24090
24090
|
var LOCATION_ERROR_MESSAGES = {
|
|
24091
24091
|
unsupported: "Location isn't available in this browser.",
|
|
@@ -24132,7 +24132,7 @@ var LocationPicker = /*#__PURE__*/forwardRef(function LocationPicker(_ref, ref)
|
|
|
24132
24132
|
_ref$fullWidth = _ref.fullWidth,
|
|
24133
24133
|
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
24134
24134
|
className = _ref.className,
|
|
24135
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
24135
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$C);
|
|
24136
24136
|
var _useState = useState(function () {
|
|
24137
24137
|
return formatCoords(value);
|
|
24138
24138
|
}),
|
|
@@ -24258,7 +24258,7 @@ var LocationPicker = /*#__PURE__*/forwardRef(function LocationPicker(_ref, ref)
|
|
|
24258
24258
|
strokeLinecap: "round"
|
|
24259
24259
|
})]
|
|
24260
24260
|
});
|
|
24261
|
-
var iconButton = jsx("button", _objectSpread$
|
|
24261
|
+
var iconButton = jsx("button", _objectSpread$I(_objectSpread$I({
|
|
24262
24262
|
type: "button",
|
|
24263
24263
|
onClick: handleIconClick
|
|
24264
24264
|
}, iconProps), {}, {
|
|
@@ -24270,13 +24270,13 @@ var LocationPicker = /*#__PURE__*/forwardRef(function LocationPicker(_ref, ref)
|
|
|
24270
24270
|
}));
|
|
24271
24271
|
// The 44px touch target is wider than p-1, so leave room for it on coarse pointers.
|
|
24272
24272
|
var inputPaddingClass = iconPosition === "right" ? "pr-10 [@media(pointer:coarse)]:pr-12" : "pl-10 [@media(pointer:coarse)]:pl-12";
|
|
24273
|
-
return jsxs("div", _objectSpread$
|
|
24273
|
+
return jsxs("div", _objectSpread$I(_objectSpread$I({
|
|
24274
24274
|
className: cn(fullWidth ? "flex w-full flex-col" : "inline-flex flex-col", className),
|
|
24275
24275
|
"data-status": status
|
|
24276
24276
|
}, rest), {}, {
|
|
24277
24277
|
children: [jsxs("div", {
|
|
24278
24278
|
className: cn("relative", fullWidth && "w-full"),
|
|
24279
|
-
children: [jsx("input", _objectSpread$
|
|
24279
|
+
children: [jsx("input", _objectSpread$I(_objectSpread$I({
|
|
24280
24280
|
ref: ref,
|
|
24281
24281
|
type: "text",
|
|
24282
24282
|
placeholder: placeholder,
|
|
@@ -24304,9 +24304,9 @@ var LocationPicker = /*#__PURE__*/forwardRef(function LocationPicker(_ref, ref)
|
|
|
24304
24304
|
});
|
|
24305
24305
|
LocationPicker.displayName = "LocationPicker";
|
|
24306
24306
|
|
|
24307
|
-
var _excluded$
|
|
24308
|
-
function ownKeys$
|
|
24309
|
-
function _objectSpread$
|
|
24307
|
+
var _excluded$B = ["lang", "continuous", "interimResults", "onSpeechComplete", "onSpeaking", "onError", "onStart", "onStop", "renderButton", "autoStart", "disabled", "resetOnStart", "className"];
|
|
24308
|
+
function ownKeys$H(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24309
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$H(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$H(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24310
24310
|
// Level bars (DTUI-42). There is no audio-level API without getUserMedia, so the
|
|
24311
24311
|
// bars show *whether* speech is being heard (speechstart / results), not volume.
|
|
24312
24312
|
var LEVEL_BARS = [{
|
|
@@ -24352,7 +24352,7 @@ var SpeechToText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24352
24352
|
_ref$resetOnStart = _ref.resetOnStart,
|
|
24353
24353
|
resetOnStart = _ref$resetOnStart === void 0 ? false : _ref$resetOnStart,
|
|
24354
24354
|
className = _ref.className,
|
|
24355
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
24355
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$B);
|
|
24356
24356
|
var recognitionRef = useRef(null);
|
|
24357
24357
|
var isMountedRef = useRef(true);
|
|
24358
24358
|
var autoStartedRef = useRef(false);
|
|
@@ -24531,7 +24531,7 @@ var SpeechToText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24531
24531
|
});
|
|
24532
24532
|
}
|
|
24533
24533
|
var isDisabled = disabled || !_isSupported;
|
|
24534
|
-
return jsxs("button", _objectSpread$
|
|
24534
|
+
return jsxs("button", _objectSpread$H(_objectSpread$H({
|
|
24535
24535
|
type: "button",
|
|
24536
24536
|
"aria-pressed": _isListening,
|
|
24537
24537
|
"aria-label": _isListening ? "Stop listening" : "Start listening",
|
|
@@ -24575,9 +24575,9 @@ var SpeechToText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24575
24575
|
});
|
|
24576
24576
|
SpeechToText.displayName = "SpeechToText";
|
|
24577
24577
|
|
|
24578
|
-
var _excluded$
|
|
24579
|
-
function ownKeys$
|
|
24580
|
-
function _objectSpread$
|
|
24578
|
+
var _excluded$A = ["text", "rate", "pitch", "onSpeak", "onError", "renderButton", "disabled", "className"];
|
|
24579
|
+
function ownKeys$G(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24580
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24581
24581
|
var UNSUPPORTED_MESSAGE = "Text-to-speech is not supported in this browser";
|
|
24582
24582
|
// `interrupted` / `canceled` fire when playback is stopped on purpose (our own
|
|
24583
24583
|
// cancel(), or another utterance taking over) — not failures worth surfacing.
|
|
@@ -24600,7 +24600,7 @@ var TextToSpeech = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24600
24600
|
_ref$disabled = _ref.disabled,
|
|
24601
24601
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24602
24602
|
className = _ref.className,
|
|
24603
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
24603
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$A);
|
|
24604
24604
|
var _useState = useState(false),
|
|
24605
24605
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24606
24606
|
isSpeaking = _useState2[0],
|
|
@@ -24688,7 +24688,7 @@ var TextToSpeech = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24688
24688
|
stop: stop
|
|
24689
24689
|
});
|
|
24690
24690
|
}
|
|
24691
|
-
return jsxs("button", _objectSpread$
|
|
24691
|
+
return jsxs("button", _objectSpread$G(_objectSpread$G({
|
|
24692
24692
|
ref: ref,
|
|
24693
24693
|
type: "button",
|
|
24694
24694
|
onClick: handleClick,
|
|
@@ -24714,10 +24714,10 @@ var TextToSpeech = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
24714
24714
|
});
|
|
24715
24715
|
TextToSpeech.displayName = "TextToSpeech";
|
|
24716
24716
|
|
|
24717
|
-
var _excluded$
|
|
24718
|
-
function ownKeys$
|
|
24719
|
-
function _objectSpread$
|
|
24720
|
-
var useIsomorphicLayoutEffect$
|
|
24717
|
+
var _excluded$z = ["id", "className", "label", "error", "helperText", "required", "disabled", "showCount", "maxLength", "autoResize", "rows", "maxRows", "value", "defaultValue", "onChange", "size"];
|
|
24718
|
+
function ownKeys$F(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24719
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$F(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$F(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24720
|
+
var useIsomorphicLayoutEffect$6 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
24721
24721
|
function fitToContent(el, maxRows) {
|
|
24722
24722
|
if (!el) return;
|
|
24723
24723
|
el.style.height = "auto";
|
|
@@ -24763,7 +24763,7 @@ var Textarea = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
24763
24763
|
onChange = _ref.onChange,
|
|
24764
24764
|
_ref$size = _ref.size,
|
|
24765
24765
|
size = _ref$size === void 0 ? "md" : _ref$size,
|
|
24766
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
24766
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$z);
|
|
24767
24767
|
var reactId = useId();
|
|
24768
24768
|
var textareaId = id || "textarea-".concat(reactId);
|
|
24769
24769
|
var errorId = "".concat(textareaId, "-error");
|
|
@@ -24780,7 +24780,7 @@ var Textarea = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
24780
24780
|
uncontrolledLength = _useState2[0],
|
|
24781
24781
|
setUncontrolledLength = _useState2[1];
|
|
24782
24782
|
var length = isControlled ? String(value !== null && value !== void 0 ? value : "").length : uncontrolledLength;
|
|
24783
|
-
useIsomorphicLayoutEffect$
|
|
24783
|
+
useIsomorphicLayoutEffect$6(function () {
|
|
24784
24784
|
if (autoResize) fitToContent(localRef.current, maxRows);
|
|
24785
24785
|
}, [autoResize, maxRows, value]);
|
|
24786
24786
|
var handleChange = function handleChange(e) {
|
|
@@ -24799,7 +24799,7 @@ var Textarea = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
24799
24799
|
"aria-hidden": "true",
|
|
24800
24800
|
children: "*"
|
|
24801
24801
|
})]
|
|
24802
|
-
}), jsx("textarea", _objectSpread$
|
|
24802
|
+
}), jsx("textarea", _objectSpread$F(_objectSpread$F({}, rest), {}, {
|
|
24803
24803
|
id: textareaId,
|
|
24804
24804
|
ref: setRef,
|
|
24805
24805
|
rows: rows,
|
|
@@ -24840,9 +24840,9 @@ var Textarea = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
24840
24840
|
});
|
|
24841
24841
|
Textarea.displayName = "Textarea";
|
|
24842
24842
|
|
|
24843
|
-
var _excluded$
|
|
24844
|
-
function ownKeys$
|
|
24845
|
-
function _objectSpread$
|
|
24843
|
+
var _excluded$y = ["trigger", "children", "open", "defaultOpen", "onOpenChange", "placement", "offset", "title", "initialFocusRef", "disabled", "presentation", "id", "className", "style"];
|
|
24844
|
+
function ownKeys$E(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24845
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24846
24846
|
function useOutsideClose(open, anchorRef, panelRef, close) {
|
|
24847
24847
|
useEffect(function () {
|
|
24848
24848
|
if (!open) return undefined;
|
|
@@ -24880,7 +24880,7 @@ var Popover = /*#__PURE__*/React__default.forwardRef(function (_ref, _ref2) {
|
|
|
24880
24880
|
idProp = _ref.id,
|
|
24881
24881
|
className = _ref.className,
|
|
24882
24882
|
style = _ref.style,
|
|
24883
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
24883
|
+
props = _objectWithoutProperties$1(_ref, _excluded$y);
|
|
24884
24884
|
var anchorRef = useRef(null);
|
|
24885
24885
|
var panelRef = useRef(null);
|
|
24886
24886
|
var reactId = useId();
|
|
@@ -24968,7 +24968,7 @@ var Popover = /*#__PURE__*/React__default.forwardRef(function (_ref, _ref2) {
|
|
|
24968
24968
|
// backdrop, the modal focus trap, Escape and focus return.
|
|
24969
24969
|
if (asSheet) {
|
|
24970
24970
|
return jsxs(Fragment, {
|
|
24971
|
-
children: [anchor, jsx(Sheet, _objectSpread$
|
|
24971
|
+
children: [anchor, jsx(Sheet, _objectSpread$E(_objectSpread$E({
|
|
24972
24972
|
ref: _ref2,
|
|
24973
24973
|
open: open,
|
|
24974
24974
|
onClose: close,
|
|
@@ -24986,7 +24986,7 @@ var Popover = /*#__PURE__*/React__default.forwardRef(function (_ref, _ref2) {
|
|
|
24986
24986
|
});
|
|
24987
24987
|
}
|
|
24988
24988
|
return jsxs(Fragment, {
|
|
24989
|
-
children: [anchor, open && typeof document !== "undefined" && /*#__PURE__*/createPortal(jsxs("div", _objectSpread$
|
|
24989
|
+
children: [anchor, open && typeof document !== "undefined" && /*#__PURE__*/createPortal(jsxs("div", _objectSpread$E(_objectSpread$E({
|
|
24990
24990
|
ref: function ref(node) {
|
|
24991
24991
|
return setRefs$1(node, panelRef, _ref2, setFloating);
|
|
24992
24992
|
},
|
|
@@ -24998,7 +24998,7 @@ var Popover = /*#__PURE__*/React__default.forwardRef(function (_ref, _ref2) {
|
|
|
24998
24998
|
"data-side": resolvedPlacement.split("-")[0],
|
|
24999
24999
|
"data-presentation": "popover",
|
|
25000
25000
|
className: cn("z-popover min-w-[12rem] max-w-sm rounded-lg border border-gray-200 bg-white p-4 text-sm text-gray-900 shadow-lg focus:outline-none", "dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100", "animate-fade-in motion-reduce:animate-none", className),
|
|
25001
|
-
style: _objectSpread$
|
|
25001
|
+
style: _objectSpread$E(_objectSpread$E({}, floatingStyles), style)
|
|
25002
25002
|
}, props), {}, {
|
|
25003
25003
|
children: [title && jsx("h2", {
|
|
25004
25004
|
id: titleId,
|
|
@@ -25010,11 +25010,11 @@ var Popover = /*#__PURE__*/React__default.forwardRef(function (_ref, _ref2) {
|
|
|
25010
25010
|
});
|
|
25011
25011
|
Popover.displayName = "Popover";
|
|
25012
25012
|
|
|
25013
|
-
var _excluded$
|
|
25014
|
-
function ownKeys$
|
|
25015
|
-
function _objectSpread$
|
|
25013
|
+
var _excluded$x = ["options", "value", "defaultValue", "onChange", "size", "fullWidth", "name", "disabled", "className"];
|
|
25014
|
+
function ownKeys$D(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25015
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$D(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$D(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25016
25016
|
// useLayoutEffect warns during SSR; fall back to useEffect on the server.
|
|
25017
|
-
var useIsomorphicLayoutEffect$
|
|
25017
|
+
var useIsomorphicLayoutEffect$5 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
25018
25018
|
// Same padding / type scale as `Tabs` segments, so the two read as one control.
|
|
25019
25019
|
var SIZE_CLASSES = {
|
|
25020
25020
|
sm: "px-2 py-1 text-sm",
|
|
@@ -25061,7 +25061,7 @@ var SegmentedControl = /*#__PURE__*/forwardRef(function SegmentedControl(_ref, _
|
|
|
25061
25061
|
_ref$disabled = _ref.disabled,
|
|
25062
25062
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
25063
25063
|
className = _ref.className,
|
|
25064
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
25064
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$x);
|
|
25065
25065
|
var _useControllableState = useControllableState({
|
|
25066
25066
|
value: valueProp,
|
|
25067
25067
|
defaultValue: defaultValue,
|
|
@@ -25084,7 +25084,7 @@ var SegmentedControl = /*#__PURE__*/forwardRef(function SegmentedControl(_ref, _
|
|
|
25084
25084
|
var tabbableIndex = selectedEnabled ? selectedIndex : firstEnabled;
|
|
25085
25085
|
// Measure the selected option and move the thumb under it. Runs before paint,
|
|
25086
25086
|
// so the thumb never flashes; the CSS transition animates the slide.
|
|
25087
|
-
useIsomorphicLayoutEffect$
|
|
25087
|
+
useIsomorphicLayoutEffect$5(function () {
|
|
25088
25088
|
var root = rootRef.current;
|
|
25089
25089
|
var option = optionRefs.current[selectedIndex];
|
|
25090
25090
|
if (!root || !option) return undefined;
|
|
@@ -25137,7 +25137,7 @@ var SegmentedControl = /*#__PURE__*/forwardRef(function SegmentedControl(_ref, _
|
|
|
25137
25137
|
(_optionRefs$current$t = optionRefs.current[target]) === null || _optionRefs$current$t === void 0 || _optionRefs$current$t.focus();
|
|
25138
25138
|
select(target);
|
|
25139
25139
|
};
|
|
25140
|
-
return jsxs("div", _objectSpread$
|
|
25140
|
+
return jsxs("div", _objectSpread$D(_objectSpread$D({
|
|
25141
25141
|
ref: function ref(node) {
|
|
25142
25142
|
return setRefs$1(node, rootRef, _ref2);
|
|
25143
25143
|
},
|
|
@@ -25191,9 +25191,9 @@ var SegmentedControl = /*#__PURE__*/forwardRef(function SegmentedControl(_ref, _
|
|
|
25191
25191
|
});
|
|
25192
25192
|
SegmentedControl.displayName = "SegmentedControl";
|
|
25193
25193
|
|
|
25194
|
-
var _excluded$
|
|
25195
|
-
function ownKeys$
|
|
25196
|
-
function _objectSpread$
|
|
25194
|
+
var _excluded$w = ["value", "defaultValue", "onChange", "onValueChange", "onSearch", "onCancel", "onClear", "placeholder", "cancelLabel", "clearLabel", "showCancel", "presentation", "results", "renderResults", "resultsOpen", "onResultsOpenChange", "resultsLabel", "disabled", "readOnly", "className", "inputClassName", "style", "onFocus", "onBlur", "onKeyDown", "onClick", "aria-label"];
|
|
25195
|
+
function ownKeys$C(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25196
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$C(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25197
25197
|
// iOS-style search field (DTUI-58): leading icon, clear button, a "Cancel"
|
|
25198
25198
|
// text button on phones while focused, and an optional results surface that
|
|
25199
25199
|
// is a full-height Sheet on phones and a popover beneath the field elsewhere.
|
|
@@ -25253,7 +25253,7 @@ var SearchField = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
25253
25253
|
onKeyDown = _ref.onKeyDown,
|
|
25254
25254
|
onClick = _ref.onClick,
|
|
25255
25255
|
ariaLabel = _ref["aria-label"],
|
|
25256
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
25256
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$w);
|
|
25257
25257
|
var _useControllableState = useControllableState({
|
|
25258
25258
|
value: valueProp,
|
|
25259
25259
|
defaultValue: defaultValue,
|
|
@@ -25428,7 +25428,7 @@ var SearchField = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
25428
25428
|
onChange: handleChange,
|
|
25429
25429
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rest["aria-labelledby"] ? undefined : placeholder || "Search"
|
|
25430
25430
|
};
|
|
25431
|
-
var inlineInput = jsx("input", _objectSpread$
|
|
25431
|
+
var inlineInput = jsx("input", _objectSpread$C(_objectSpread$C(_objectSpread$C({
|
|
25432
25432
|
ref: inputCallbackRef
|
|
25433
25433
|
}, sharedInputProps), {}, {
|
|
25434
25434
|
"aria-controls": popoverOpen ? resultsId : undefined,
|
|
@@ -25469,7 +25469,7 @@ var SearchField = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
25469
25469
|
className: "flex shrink-0 items-center gap-2 border-b border-line px-4 py-3",
|
|
25470
25470
|
children: renderRow({
|
|
25471
25471
|
inSheet: true,
|
|
25472
|
-
inputProps: jsx("input", _objectSpread$
|
|
25472
|
+
inputProps: jsx("input", _objectSpread$C(_objectSpread$C({
|
|
25473
25473
|
ref: sheetInputRef
|
|
25474
25474
|
}, sharedInputProps), {}, {
|
|
25475
25475
|
"aria-controls": resultsId,
|
|
@@ -25490,9 +25490,9 @@ var SearchField = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
25490
25490
|
});
|
|
25491
25491
|
SearchField.displayName = "SearchField";
|
|
25492
25492
|
|
|
25493
|
-
var _excluded$
|
|
25494
|
-
function ownKeys$
|
|
25495
|
-
function _objectSpread$
|
|
25493
|
+
var _excluded$v = ["items", "collapsed", "collapsible", "onToggle", "className", "containerClassName", "stickyOffset", "logo", "footer", "user", "onUserClick", "drawerPosition", "isMobileOpen", "setIsMobileOpen", "showCollapsedTooltips", "tooltipOptions", "linkAs", "expandedIds", "defaultExpandedIds", "onExpandedChange", "swipeable"];
|
|
25494
|
+
function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25495
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25496
25496
|
// From `md` up the sidebar is an in-flow sticky column; below it, the same
|
|
25497
25497
|
// tree becomes an off-canvas drawer (modal dialog while open).
|
|
25498
25498
|
var SIDEBAR_DESKTOP_QUERY = "(min-width: 768px)";
|
|
@@ -25593,7 +25593,7 @@ function useEdgeSwipe(_ref) {
|
|
|
25593
25593
|
return enabled ? distance : 0;
|
|
25594
25594
|
}
|
|
25595
25595
|
// useLayoutEffect warns during SSR; fall back to useEffect on the server.
|
|
25596
|
-
var useIsomorphicLayoutEffect$
|
|
25596
|
+
var useIsomorphicLayoutEffect$4 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
25597
25597
|
// Ctrl/Cmd/Shift/Alt-click or a non-primary button: the browser opens the
|
|
25598
25598
|
// link in a new tab/window, so the sidebar must not react as if navigating.
|
|
25599
25599
|
var isModifiedClick = function isModifiedClick(e) {
|
|
@@ -25702,7 +25702,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
25702
25702
|
onExpandedChange = _ref2.onExpandedChange,
|
|
25703
25703
|
_ref2$swipeable = _ref2.swipeable,
|
|
25704
25704
|
swipeable = _ref2$swipeable === void 0 ? true : _ref2$swipeable,
|
|
25705
|
-
props = _objectWithoutProperties$1(_ref2, _excluded$
|
|
25705
|
+
props = _objectWithoutProperties$1(_ref2, _excluded$v);
|
|
25706
25706
|
// -- expansion (controlled via `expandedIds`, else internal) ----------------
|
|
25707
25707
|
var isExpansionControlled = expandedIds !== undefined;
|
|
25708
25708
|
var activeAncestors = useMemo(function () {
|
|
@@ -25771,7 +25771,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
25771
25771
|
// The drawer stays mounted (it slides in/out), so when it is shut it must
|
|
25772
25772
|
// leave the tab order and the a11y tree. `inert` is set imperatively: React
|
|
25773
25773
|
// 18 does not know the attribute and React 19 treats `inert=""` as false.
|
|
25774
|
-
useIsomorphicLayoutEffect$
|
|
25774
|
+
useIsomorphicLayoutEffect$4(function () {
|
|
25775
25775
|
var drawer = drawerRef.current;
|
|
25776
25776
|
if (!drawer) return;
|
|
25777
25777
|
if (drawerMode && !mobileOpen) drawer.setAttribute("inert", "");else drawer.removeAttribute("inert");
|
|
@@ -25892,7 +25892,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
25892
25892
|
className: "relative h-4 w-0",
|
|
25893
25893
|
children: compactBadge
|
|
25894
25894
|
});
|
|
25895
|
-
var itemEl = jsxs(ItemTag, _objectSpread$
|
|
25895
|
+
var itemEl = jsxs(ItemTag, _objectSpread$B(_objectSpread$B({}, hasHref ? {
|
|
25896
25896
|
href: item.href,
|
|
25897
25897
|
target: item.target,
|
|
25898
25898
|
rel: (_item$rel = item.rel) !== null && _item$rel !== void 0 ? _item$rel : item.target === "_blank" ? "noopener noreferrer" : undefined,
|
|
@@ -25955,7 +25955,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
25955
25955
|
}));
|
|
25956
25956
|
return jsxs("div", {
|
|
25957
25957
|
className: "relative",
|
|
25958
|
-
children: [showTooltipForThis ? jsx(Tooltip, _objectSpread$
|
|
25958
|
+
children: [showTooltipForThis ? jsx(Tooltip, _objectSpread$B(_objectSpread$B({}, tooltipOptions), {}, {
|
|
25959
25959
|
trigger: "hover",
|
|
25960
25960
|
content: item.label,
|
|
25961
25961
|
position: "right",
|
|
@@ -26130,7 +26130,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
26130
26130
|
},
|
|
26131
26131
|
"aria-hidden": "true",
|
|
26132
26132
|
"data-sidebar-backdrop": ""
|
|
26133
|
-
}), jsx("aside", _objectSpread$
|
|
26133
|
+
}), jsx("aside", _objectSpread$B(_objectSpread$B(_objectSpread$B({
|
|
26134
26134
|
ref: drawerRef,
|
|
26135
26135
|
className: drawerClasses,
|
|
26136
26136
|
style: drawerTransform ? {
|
|
@@ -26145,7 +26145,7 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
26145
26145
|
"aria-hidden": mobileOpen ? undefined : true,
|
|
26146
26146
|
tabIndex: -1
|
|
26147
26147
|
} : {}), closeDrag.bodyDragProps), {}, {
|
|
26148
|
-
children: jsx("div", _objectSpread$
|
|
26148
|
+
children: jsx("div", _objectSpread$B(_objectSpread$B({
|
|
26149
26149
|
ref: ref,
|
|
26150
26150
|
className: cn("h-full", className)
|
|
26151
26151
|
}, props), {}, {
|
|
@@ -26156,9 +26156,9 @@ var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
26156
26156
|
});
|
|
26157
26157
|
Sidebar.displayName = "Sidebar";
|
|
26158
26158
|
|
|
26159
|
-
var _excluded$
|
|
26160
|
-
function ownKeys$
|
|
26161
|
-
function _objectSpread$
|
|
26159
|
+
var _excluded$u = ["trigger", "children", "placement", "className"];
|
|
26160
|
+
function ownKeys$A(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26161
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26162
26162
|
var Dropdown = function Dropdown(_ref) {
|
|
26163
26163
|
var trigger = _ref.trigger,
|
|
26164
26164
|
children = _ref.children,
|
|
@@ -26166,7 +26166,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
26166
26166
|
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
|
|
26167
26167
|
_ref$className = _ref.className,
|
|
26168
26168
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
26169
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
26169
|
+
props = _objectWithoutProperties$1(_ref, _excluded$u);
|
|
26170
26170
|
var _useState = useState(false),
|
|
26171
26171
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26172
26172
|
isOpen = _useState2[0],
|
|
@@ -26189,7 +26189,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
26189
26189
|
'top-start': 'bottom-full left-0 mb-1',
|
|
26190
26190
|
'top-end': 'bottom-full right-0 mb-1'
|
|
26191
26191
|
};
|
|
26192
|
-
return jsxs("div", _objectSpread$
|
|
26192
|
+
return jsxs("div", _objectSpread$A(_objectSpread$A({
|
|
26193
26193
|
className: "relative inline-block ".concat(className),
|
|
26194
26194
|
ref: dropdownRef
|
|
26195
26195
|
}, props), {}, {
|
|
@@ -26205,9 +26205,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
26205
26205
|
}));
|
|
26206
26206
|
};
|
|
26207
26207
|
|
|
26208
|
-
var _excluded$
|
|
26209
|
-
function ownKeys$
|
|
26210
|
-
function _objectSpread$
|
|
26208
|
+
var _excluded$t = ["src", "alt", "name", "size", "shape", "status", "className"];
|
|
26209
|
+
function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26210
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26211
26211
|
// Internal (not exported from the package): shared with AvatarGroup's "+N" tile.
|
|
26212
26212
|
var AVATAR_SIZES = {
|
|
26213
26213
|
xs: 'h-6 w-6 text-xs',
|
|
@@ -26227,7 +26227,7 @@ var Avatar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
26227
26227
|
shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
|
|
26228
26228
|
status = _ref.status,
|
|
26229
26229
|
className = _ref.className,
|
|
26230
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
26230
|
+
props = _objectWithoutProperties$1(_ref, _excluded$t);
|
|
26231
26231
|
// State-driven fallback: a broken image swaps to initials / icon without
|
|
26232
26232
|
// touching the DOM directly. Reset whenever `src` changes
|
|
26233
26233
|
// (adjust-during-render pattern).
|
|
@@ -26268,7 +26268,7 @@ var Avatar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
26268
26268
|
return jsxs("div", {
|
|
26269
26269
|
ref: ref,
|
|
26270
26270
|
className: "relative inline-block",
|
|
26271
|
-
children: [jsx("div", _objectSpread$
|
|
26271
|
+
children: [jsx("div", _objectSpread$z(_objectSpread$z({
|
|
26272
26272
|
className: cn('flex items-center justify-center bg-gray-100 text-primary-600 font-medium dark:bg-gray-800 dark:text-primary-300', sizes[size], {
|
|
26273
26273
|
'rounded-full': shape === 'circle',
|
|
26274
26274
|
'rounded-md': shape === 'square',
|
|
@@ -26303,11 +26303,11 @@ var Avatar = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
26303
26303
|
});
|
|
26304
26304
|
Avatar.displayName = 'Avatar';
|
|
26305
26305
|
|
|
26306
|
-
var _excluded$
|
|
26306
|
+
var _excluded$s = ["emitter", "content", "notifications"],
|
|
26307
26307
|
_excluded2$5 = ["emitter", "logo", "center", "items", "user", "notifications", "searchable", "onSearch", "leftIcon", "rightMenuContent", "onLeftIconClick", "leftIconLabel", "leftIconProps", "onLoginClick", "onLogoutClick", "className", "onFetch", "isMobileOpen", "setIsMobileOpen", "sticky", "largeTitle"],
|
|
26308
26308
|
_excluded3$3 = ["className", "onClick"];
|
|
26309
|
-
function ownKeys$
|
|
26310
|
-
function _objectSpread$
|
|
26309
|
+
function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26310
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26311
26311
|
var NO_NOTIFICATIONS = [];
|
|
26312
26312
|
// Icon-only bar buttons: 36px on desktop, the 44px touch target on coarse pointers.
|
|
26313
26313
|
var ICON_BUTTON = cn("inline-flex items-center justify-center rounded-md p-2 text-primary-400 hover:text-primary-500 hover:bg-gray-100 dark:hover:bg-gray-800", "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500", TOUCH_TARGET);
|
|
@@ -26505,10 +26505,10 @@ var RightMenuContent = function RightMenuContent(_ref2) {
|
|
|
26505
26505
|
_ref2.content;
|
|
26506
26506
|
var _ref2$notifications = _ref2.notifications,
|
|
26507
26507
|
notifications = _ref2$notifications === void 0 ? [] : _ref2$notifications,
|
|
26508
|
-
props = _objectWithoutProperties$1(_ref2, _excluded$
|
|
26508
|
+
props = _objectWithoutProperties$1(_ref2, _excluded$s);
|
|
26509
26509
|
return jsx("div", {
|
|
26510
26510
|
className: "relative",
|
|
26511
|
-
children: jsx(NotificationsDropdown, _objectSpread$
|
|
26511
|
+
children: jsx(NotificationsDropdown, _objectSpread$y({
|
|
26512
26512
|
emitter: emitter,
|
|
26513
26513
|
notifications: notifications
|
|
26514
26514
|
}, props))
|
|
@@ -26643,11 +26643,11 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
26643
26643
|
};
|
|
26644
26644
|
// RightMenuContent: prefer prop if provided, else fallback
|
|
26645
26645
|
var RightMenuComponent = typeof RightMenuContentProp === "function" ? RightMenuContentProp : function (rest) {
|
|
26646
|
-
return jsx(RightMenuContent, _objectSpread$
|
|
26646
|
+
return jsx(RightMenuContent, _objectSpread$y({
|
|
26647
26647
|
emitter: emitter
|
|
26648
26648
|
}, rest));
|
|
26649
26649
|
};
|
|
26650
|
-
return jsxs("nav", _objectSpread$
|
|
26650
|
+
return jsxs("nav", _objectSpread$y(_objectSpread$y({
|
|
26651
26651
|
ref: ref,
|
|
26652
26652
|
className: cn("bg-surface text-foreground border-b border-line px-4 sm:px-6 lg:px-8", sticky && "sticky top-0 z-sticky pt-safe supports-[backdrop-filter]:bg-surface/80 supports-[backdrop-filter]:backdrop-blur", className),
|
|
26653
26653
|
"data-sticky": sticky ? "" : undefined
|
|
@@ -26666,7 +26666,7 @@ var Navbar = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
26666
26666
|
"aria-hidden": true
|
|
26667
26667
|
}), jsxs("div", {
|
|
26668
26668
|
className: "flex min-w-0 items-center",
|
|
26669
|
-
children: [leftIcon !== false && jsx("button", _objectSpread$
|
|
26669
|
+
children: [leftIcon !== false && jsx("button", _objectSpread$y(_objectSpread$y({
|
|
26670
26670
|
type: "button",
|
|
26671
26671
|
"aria-label": leftIconLabel
|
|
26672
26672
|
}, leftIconRest), {}, {
|
|
@@ -26880,10 +26880,10 @@ Navbar.propTypes = {
|
|
|
26880
26880
|
largeTitle: PropTypes.node
|
|
26881
26881
|
};
|
|
26882
26882
|
|
|
26883
|
-
var _excluded$
|
|
26883
|
+
var _excluded$r = ["items", "linkAs", "hideOnScroll", "badgeMax", "className", "onFocus"],
|
|
26884
26884
|
_excluded2$4 = ["className"];
|
|
26885
|
-
function ownKeys$
|
|
26886
|
-
function _objectSpread$
|
|
26885
|
+
function ownKeys$x(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26886
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26887
26887
|
var hasBadge = function hasBadge(badge) {
|
|
26888
26888
|
return badge === 0 || Boolean(badge);
|
|
26889
26889
|
};
|
|
@@ -26952,7 +26952,7 @@ var FootNav = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
|
26952
26952
|
badgeMax = _ref4$badgeMax === void 0 ? 99 : _ref4$badgeMax,
|
|
26953
26953
|
className = _ref4.className,
|
|
26954
26954
|
onFocus = _ref4.onFocus,
|
|
26955
|
-
props = _objectWithoutProperties$1(_ref4, _excluded$
|
|
26955
|
+
props = _objectWithoutProperties$1(_ref4, _excluded$r);
|
|
26956
26956
|
var _useHideOnScroll = useHideOnScroll(hideOnScroll),
|
|
26957
26957
|
_useHideOnScroll2 = _slicedToArray(_useHideOnScroll, 2),
|
|
26958
26958
|
hidden = _useHideOnScroll2[0],
|
|
@@ -26962,7 +26962,7 @@ var FootNav = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
|
26962
26962
|
if (hidden) setHidden(false);
|
|
26963
26963
|
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
26964
26964
|
};
|
|
26965
|
-
return jsx("nav", _objectSpread$
|
|
26965
|
+
return jsx("nav", _objectSpread$x(_objectSpread$x({
|
|
26966
26966
|
ref: ref,
|
|
26967
26967
|
"aria-label": "Primary",
|
|
26968
26968
|
"data-hidden": hideOnScroll ? String(hidden) : undefined,
|
|
@@ -26978,14 +26978,14 @@ var FootNav = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
|
26978
26978
|
var isAction = item.variant === 'action';
|
|
26979
26979
|
var isLink = item.href !== undefined || item.to !== undefined;
|
|
26980
26980
|
var Item = isLink ? linkAs || 'a' : 'button';
|
|
26981
|
-
var linkProps = isLink ? _objectSpread$
|
|
26981
|
+
var linkProps = isLink ? _objectSpread$x({
|
|
26982
26982
|
href: item.href
|
|
26983
26983
|
}, linkAs ? {
|
|
26984
26984
|
to: (_item$to = item.to) !== null && _item$to !== void 0 ? _item$to : item.href
|
|
26985
26985
|
} : {}) : {
|
|
26986
26986
|
type: 'button'
|
|
26987
26987
|
};
|
|
26988
|
-
return jsxs(Item, _objectSpread$
|
|
26988
|
+
return jsxs(Item, _objectSpread$x(_objectSpread$x(_objectSpread$x({}, linkProps), {}, {
|
|
26989
26989
|
"aria-current": item.active ? 'page' : undefined,
|
|
26990
26990
|
"data-variant": isAction ? 'action' : undefined
|
|
26991
26991
|
}, passthrough(item)), {}, {
|
|
@@ -27027,7 +27027,7 @@ FootNav.displayName = 'FootNav';
|
|
|
27027
27027
|
var FootNavSpacer = /*#__PURE__*/React__default.forwardRef(function (_ref5, ref) {
|
|
27028
27028
|
var className = _ref5.className,
|
|
27029
27029
|
props = _objectWithoutProperties$1(_ref5, _excluded2$4);
|
|
27030
|
-
return jsx("div", _objectSpread$
|
|
27030
|
+
return jsx("div", _objectSpread$x(_objectSpread$x({
|
|
27031
27031
|
ref: ref,
|
|
27032
27032
|
"aria-hidden": "true",
|
|
27033
27033
|
"data-slot": "footnav-spacer",
|
|
@@ -27041,9 +27041,9 @@ var FootNavSpacer = /*#__PURE__*/React__default.forwardRef(function (_ref5, ref)
|
|
|
27041
27041
|
FootNavSpacer.displayName = 'FootNav.Spacer';
|
|
27042
27042
|
FootNav.Spacer = FootNavSpacer;
|
|
27043
27043
|
|
|
27044
|
-
var _excluded$
|
|
27045
|
-
function ownKeys$
|
|
27046
|
-
function _objectSpread$
|
|
27044
|
+
var _excluded$q = ["items", "separator", "showHome", "homeIcon", "onHomeClick", "maxItems", "className"];
|
|
27045
|
+
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27046
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27047
27047
|
// Items without an `id` still need a stable, unique React key.
|
|
27048
27048
|
var itemKey = function itemKey(item, index) {
|
|
27049
27049
|
var _ref, _item$href;
|
|
@@ -27084,7 +27084,7 @@ var Breadcrumbs = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
27084
27084
|
onHomeClick = _ref3.onHomeClick,
|
|
27085
27085
|
maxItems = _ref3.maxItems,
|
|
27086
27086
|
className = _ref3.className,
|
|
27087
|
-
props = _objectWithoutProperties$1(_ref3, _excluded$
|
|
27087
|
+
props = _objectWithoutProperties$1(_ref3, _excluded$q);
|
|
27088
27088
|
var _useState = useState(false),
|
|
27089
27089
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27090
27090
|
expanded = _useState2[0],
|
|
@@ -27119,7 +27119,7 @@ var Breadcrumbs = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
27119
27119
|
children: separator
|
|
27120
27120
|
});
|
|
27121
27121
|
};
|
|
27122
|
-
return jsx("nav", _objectSpread$
|
|
27122
|
+
return jsx("nav", _objectSpread$w(_objectSpread$w({
|
|
27123
27123
|
ref: ref,
|
|
27124
27124
|
className: cn('flex min-w-0 items-center space-x-1 text-sm', className),
|
|
27125
27125
|
"aria-label": "Breadcrumb"
|
|
@@ -27171,12 +27171,12 @@ var Breadcrumbs = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
27171
27171
|
});
|
|
27172
27172
|
Breadcrumbs.displayName = 'Breadcrumbs';
|
|
27173
27173
|
|
|
27174
|
-
var _excluded$
|
|
27174
|
+
var _excluded$p = ["isOpen", "onClose", "title", "children", "size", "dismissible", "showCloseButton", "footer", "className", "onOpen", "presentation"],
|
|
27175
27175
|
_excluded2$3 = ["children", "className"],
|
|
27176
27176
|
_excluded3$2 = ["children", "className"],
|
|
27177
27177
|
_excluded4$2 = ["children", "className"];
|
|
27178
|
-
function ownKeys$
|
|
27179
|
-
function _objectSpread$
|
|
27178
|
+
function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27179
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27180
27180
|
// Exit length of the centred modal. `animate-scale-out` / `animate-fade-out`
|
|
27181
27181
|
// run for duration-fast (120ms) with `forwards`, so the panel stays invisible
|
|
27182
27182
|
// for the few ms before it unmounts.
|
|
@@ -27232,7 +27232,7 @@ var Dialog = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
27232
27232
|
onOpen = _ref2.onOpen,
|
|
27233
27233
|
_ref2$presentation = _ref2.presentation,
|
|
27234
27234
|
presentation = _ref2$presentation === void 0 ? 'auto' : _ref2$presentation,
|
|
27235
|
-
props = _objectWithoutProperties$1(_ref2, _excluded$
|
|
27235
|
+
props = _objectWithoutProperties$1(_ref2, _excluded$p);
|
|
27236
27236
|
var dialogRef = useRef(null);
|
|
27237
27237
|
// Unique per instance so two open dialogs never share an aria-labelledby target.
|
|
27238
27238
|
var titleId = "dialog-title-".concat(useId());
|
|
@@ -27280,7 +27280,7 @@ var Dialog = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
27280
27280
|
var _onCloseRef$current2;
|
|
27281
27281
|
return (_onCloseRef$current2 = onCloseRef.current) === null || _onCloseRef$current2 === void 0 ? void 0 : _onCloseRef$current2.call(onCloseRef);
|
|
27282
27282
|
};
|
|
27283
|
-
return jsxs(Sheet, _objectSpread$
|
|
27283
|
+
return jsxs(Sheet, _objectSpread$v(_objectSpread$v({
|
|
27284
27284
|
ref: panelRef,
|
|
27285
27285
|
isOpen: Boolean(isOpen),
|
|
27286
27286
|
onClose: close,
|
|
@@ -27322,7 +27322,7 @@ var Dialog = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
|
27322
27322
|
className: cn('fixed inset-0 z-modal flex items-center justify-center bg-black/50 motion-reduce:animate-none', SAFE_GUTTER, exiting ? 'pointer-events-none animate-fade-out' : 'animate-fade-in'),
|
|
27323
27323
|
"data-state": presence.state,
|
|
27324
27324
|
onClick: handleBackdropClick,
|
|
27325
|
-
children: jsxs("div", _objectSpread$
|
|
27325
|
+
children: jsxs("div", _objectSpread$v(_objectSpread$v({
|
|
27326
27326
|
ref: panelRef,
|
|
27327
27327
|
className: cn('flex w-full flex-col overflow-hidden rounded-lg border border-line bg-surface text-foreground shadow-xl focus:outline-none motion-reduce:animate-none', PANEL_MAX_HEIGHT, exiting ? 'animate-scale-out' : 'animate-scale-in', sizeClasses[size], className),
|
|
27328
27328
|
tabIndex: -1,
|
|
@@ -27358,7 +27358,7 @@ var DialogHeader = function DialogHeader(_ref3) {
|
|
|
27358
27358
|
var children = _ref3.children,
|
|
27359
27359
|
className = _ref3.className,
|
|
27360
27360
|
props = _objectWithoutProperties$1(_ref3, _excluded2$3);
|
|
27361
|
-
return jsx("div", _objectSpread$
|
|
27361
|
+
return jsx("div", _objectSpread$v(_objectSpread$v({
|
|
27362
27362
|
className: cn('border-b border-line px-6 py-4', className)
|
|
27363
27363
|
}, props), {}, {
|
|
27364
27364
|
children: children
|
|
@@ -27368,7 +27368,7 @@ var DialogBody = function DialogBody(_ref4) {
|
|
|
27368
27368
|
var children = _ref4.children,
|
|
27369
27369
|
className = _ref4.className,
|
|
27370
27370
|
props = _objectWithoutProperties$1(_ref4, _excluded3$2);
|
|
27371
|
-
return jsx("div", _objectSpread$
|
|
27371
|
+
return jsx("div", _objectSpread$v(_objectSpread$v({
|
|
27372
27372
|
className: cn('px-6 py-4', className)
|
|
27373
27373
|
}, props), {}, {
|
|
27374
27374
|
children: children
|
|
@@ -27378,7 +27378,7 @@ var DialogFooter = function DialogFooter(_ref5) {
|
|
|
27378
27378
|
var children = _ref5.children,
|
|
27379
27379
|
className = _ref5.className,
|
|
27380
27380
|
props = _objectWithoutProperties$1(_ref5, _excluded4$2);
|
|
27381
|
-
return jsx("div", _objectSpread$
|
|
27381
|
+
return jsx("div", _objectSpread$v(_objectSpread$v({
|
|
27382
27382
|
className: cn('flex items-center justify-end gap-3 border-t border-line px-6 py-4', className)
|
|
27383
27383
|
}, props), {}, {
|
|
27384
27384
|
children: children
|
|
@@ -27437,9 +27437,9 @@ function useToastSwipe(_ref) {
|
|
|
27437
27437
|
};
|
|
27438
27438
|
}
|
|
27439
27439
|
|
|
27440
|
-
var _excluded$
|
|
27441
|
-
function ownKeys$
|
|
27442
|
-
function _objectSpread$
|
|
27440
|
+
var _excluded$o = ["id", "title", "message", "description", "type", "duration", "onClose", "position", "statusIcon", "actions", "color", "footerNote", "showFooterNote", "portal", "paused", "swipeToDismiss", "mobilePosition", "mobileOffset", "closeLabel", "className", "style", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onPointerDown", "onPointerUp", "onPointerCancel"];
|
|
27441
|
+
function ownKeys$u(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27442
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27443
27443
|
// The single toast card. Re-exported as `Toast` from ./Toast.jsx, which also
|
|
27444
27444
|
// holds the provider / hook; the stack lives in ./ToastStack.jsx.
|
|
27445
27445
|
// Errors interrupt (role="alert", assertive); everything else waits for the
|
|
@@ -27527,7 +27527,7 @@ function usePauseReasons() {
|
|
|
27527
27527
|
setReasons = _useState2[1];
|
|
27528
27528
|
var set = useCallback(function (reason, on) {
|
|
27529
27529
|
setReasons(function (prev) {
|
|
27530
|
-
return Boolean(prev[reason]) === on ? prev : _objectSpread$
|
|
27530
|
+
return Boolean(prev[reason]) === on ? prev : _objectSpread$u(_objectSpread$u({}, prev), {}, _defineProperty$4({}, reason, on));
|
|
27531
27531
|
});
|
|
27532
27532
|
}, []);
|
|
27533
27533
|
return [Object.values(reasons).some(Boolean), set];
|
|
@@ -27572,7 +27572,7 @@ var Toast = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
27572
27572
|
onPointerDown = _ref.onPointerDown,
|
|
27573
27573
|
onPointerUp = _ref.onPointerUp,
|
|
27574
27574
|
onPointerCancel = _ref.onPointerCancel,
|
|
27575
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
27575
|
+
props = _objectWithoutProperties$1(_ref, _excluded$o);
|
|
27576
27576
|
var _useState3 = useState(true),
|
|
27577
27577
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
27578
27578
|
isVisible = _useState4[0],
|
|
@@ -27656,7 +27656,7 @@ var Toast = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
27656
27656
|
var positionClass = mobileClass || STANDALONE_POSITION_CLASSES[position] || STANDALONE_POSITION_CLASSES['top-right'];
|
|
27657
27657
|
// Swipe: follow the finger, fade with distance, then leave the way it went.
|
|
27658
27658
|
// A centred standalone toast keeps its -50% shift under the inline transform.
|
|
27659
|
-
var rootStyle = _objectSpread$
|
|
27659
|
+
var rootStyle = _objectSpread$u({}, style);
|
|
27660
27660
|
if (mobileClass && mobileOffset != null) rootStyle[MOBILE_OFFSET_VAR] = toCssLength(mobileOffset);
|
|
27661
27661
|
var centerShift = portal && !mobileClass && /-center$/.test(position) ? 'translateX(-50%) ' : '';
|
|
27662
27662
|
if (swipe.swipedOut) {
|
|
@@ -27672,7 +27672,7 @@ var Toast = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
27672
27672
|
var onTouchRelease = function onTouchRelease() {
|
|
27673
27673
|
return setPaused('touch', false);
|
|
27674
27674
|
};
|
|
27675
|
-
var toastContent = jsxs("div", _objectSpread$
|
|
27675
|
+
var toastContent = jsxs("div", _objectSpread$u(_objectSpread$u(_objectSpread$u({
|
|
27676
27676
|
ref: ref,
|
|
27677
27677
|
"data-swiping": swipe.dragging ? '' : undefined,
|
|
27678
27678
|
"data-swipe-out": swipe.swipedOut ? swipe.swipedOut > 0 ? 'right' : 'left' : undefined,
|
|
@@ -27775,8 +27775,8 @@ var Toast = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
27775
27775
|
});
|
|
27776
27776
|
Toast.displayName = 'Toast';
|
|
27777
27777
|
|
|
27778
|
-
function ownKeys$
|
|
27779
|
-
function _objectSpread$
|
|
27778
|
+
function ownKeys$t(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27779
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27780
27780
|
// Internal (not exported). The stack behind <ToastContainer> and
|
|
27781
27781
|
// <ToastProvider>. Up to `visibleToasts` toasts list normally; past that the
|
|
27782
27782
|
// stack collapses Sonner-style (newest in front, older ones peeking behind)
|
|
@@ -27883,7 +27883,7 @@ var ToastStack = function ToastStack(_ref) {
|
|
|
27883
27883
|
"data-toast-depth": depth,
|
|
27884
27884
|
className: cn('pointer-events-auto w-full', mobile ? 'max-w-none' : 'max-w-md', collapsible && 'transition-[transform,opacity] duration-base ease-standard motion-reduce:transition-none', collapsed && ['col-start-1 row-start-1', fromBottom ? 'self-end' : 'self-start'], collapsed && depth >= limit && 'pointer-events-none'),
|
|
27885
27885
|
style: collapsed ? collapsedStyle(depth, fromBottom, limit) : undefined,
|
|
27886
|
-
children: jsx(Toast, _objectSpread$
|
|
27886
|
+
children: jsx(Toast, _objectSpread$t(_objectSpread$t({}, t), {}, {
|
|
27887
27887
|
portal: false,
|
|
27888
27888
|
position: position,
|
|
27889
27889
|
paused: collapsible && interacting ? true : t.paused,
|
|
@@ -27896,9 +27896,9 @@ var ToastStack = function ToastStack(_ref) {
|
|
|
27896
27896
|
}), document.body);
|
|
27897
27897
|
};
|
|
27898
27898
|
|
|
27899
|
-
var _excluded$
|
|
27900
|
-
function ownKeys$
|
|
27901
|
-
function _objectSpread$
|
|
27899
|
+
var _excluded$n = ["children", "position", "className"];
|
|
27900
|
+
function ownKeys$s(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27901
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27902
27902
|
// The toast family: the card (./ToastItem.jsx), the stack (./ToastStack.jsx),
|
|
27903
27903
|
// and the queue shared by <ToastProvider> / useToast().
|
|
27904
27904
|
// Shared queue for <ToastProvider>. `null` outside a provider, where useToast
|
|
@@ -27911,7 +27911,7 @@ var ToastContainer = function ToastContainer(props) {
|
|
|
27911
27911
|
// legacy `<ToastContainer toasts={useToast().toasts} />` would render every
|
|
27912
27912
|
// toast twice. Skip it when it is handed the provider's own queue.
|
|
27913
27913
|
if (shared && props.toasts === shared.toasts) return null;
|
|
27914
|
-
return jsx(ToastStack, _objectSpread$
|
|
27914
|
+
return jsx(ToastStack, _objectSpread$s({}, props));
|
|
27915
27915
|
};
|
|
27916
27916
|
var useToastQueue = function useToastQueue() {
|
|
27917
27917
|
var _useState = useState([]),
|
|
@@ -27920,7 +27920,7 @@ var useToastQueue = function useToastQueue() {
|
|
|
27920
27920
|
setToasts = _useState2[1];
|
|
27921
27921
|
var addToast = useCallback(function (toastOptions) {
|
|
27922
27922
|
var id = toastOptions.id || "".concat(Date.now(), "-").concat(Math.random().toString(36).slice(2, 7));
|
|
27923
|
-
var newToast = _objectSpread$
|
|
27923
|
+
var newToast = _objectSpread$s(_objectSpread$s({}, toastOptions), {}, {
|
|
27924
27924
|
id: id
|
|
27925
27925
|
});
|
|
27926
27926
|
setToasts(function (prev) {
|
|
@@ -27943,7 +27943,7 @@ var useToastQueue = function useToastQueue() {
|
|
|
27943
27943
|
var toast = useMemo(function () {
|
|
27944
27944
|
var withType = function withType(type) {
|
|
27945
27945
|
return function (title, message, options) {
|
|
27946
|
-
return addToast(_objectSpread$
|
|
27946
|
+
return addToast(_objectSpread$s({
|
|
27947
27947
|
title: title,
|
|
27948
27948
|
message: message,
|
|
27949
27949
|
type: type
|
|
@@ -27980,11 +27980,11 @@ var ToastProvider = function ToastProvider(_ref) {
|
|
|
27980
27980
|
position = _ref$position === void 0 ? 'top-right' : _ref$position,
|
|
27981
27981
|
_ref$className = _ref.className,
|
|
27982
27982
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
27983
|
-
stackProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
27983
|
+
stackProps = _objectWithoutProperties$1(_ref, _excluded$n);
|
|
27984
27984
|
var queue = useToastQueue();
|
|
27985
27985
|
return jsxs(ToastContext.Provider, {
|
|
27986
27986
|
value: queue,
|
|
27987
|
-
children: [children, jsx(ToastStack, _objectSpread$
|
|
27987
|
+
children: [children, jsx(ToastStack, _objectSpread$s({
|
|
27988
27988
|
toasts: queue.toasts,
|
|
27989
27989
|
position: position,
|
|
27990
27990
|
onRemove: queue.removeToast,
|
|
@@ -28001,9 +28001,9 @@ var useToast = function useToast() {
|
|
|
28001
28001
|
return shared !== null && shared !== void 0 ? shared : local;
|
|
28002
28002
|
};
|
|
28003
28003
|
|
|
28004
|
-
var _excluded$
|
|
28005
|
-
function ownKeys$
|
|
28006
|
-
function _objectSpread$
|
|
28004
|
+
var _excluded$m = ["variant", "title", "children", "actions", "dismissible", "onDismiss", "dismissLabel", "className"];
|
|
28005
|
+
function ownKeys$r(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28006
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28007
28007
|
// error / warning need attention now (role="alert", assertive); info / success
|
|
28008
28008
|
// / neutral must not interrupt (role="status", polite).
|
|
28009
28009
|
var URGENT_VARIANTS = new Set(['error', 'warning']);
|
|
@@ -28061,10 +28061,10 @@ var Alert = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28061
28061
|
_ref$dismissLabel = _ref.dismissLabel,
|
|
28062
28062
|
dismissLabel = _ref$dismissLabel === void 0 ? 'Dismiss' : _ref$dismissLabel,
|
|
28063
28063
|
className = _ref.className,
|
|
28064
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
28064
|
+
props = _objectWithoutProperties$1(_ref, _excluded$m);
|
|
28065
28065
|
var styles = VARIANTS[variant] || VARIANTS.info;
|
|
28066
28066
|
var Icon = styles.Icon;
|
|
28067
|
-
return jsx("div", _objectSpread$
|
|
28067
|
+
return jsx("div", _objectSpread$r(_objectSpread$r({
|
|
28068
28068
|
ref: ref,
|
|
28069
28069
|
className: cn('rounded-md border p-4 animate-fade-in motion-reduce:animate-none', styles.container, className),
|
|
28070
28070
|
role: URGENT_VARIANTS.has(variant) ? 'alert' : 'status'
|
|
@@ -28110,12 +28110,12 @@ var Alert = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28110
28110
|
});
|
|
28111
28111
|
Alert.displayName = 'Alert';
|
|
28112
28112
|
|
|
28113
|
-
var _excluded$
|
|
28113
|
+
var _excluded$l = ["isOpen", "onClose", "title", "description", "children", "placement", "size", "dismissible", "showCloseButton", "footer", "initialFocusRef", "handle", "swipeToClose"],
|
|
28114
28114
|
_excluded2$2 = ["className"],
|
|
28115
28115
|
_excluded3$1 = ["className"],
|
|
28116
28116
|
_excluded4$1 = ["className"];
|
|
28117
|
-
function ownKeys$
|
|
28118
|
-
function _objectSpread$
|
|
28117
|
+
function ownKeys$q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28118
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28119
28119
|
// Record-peek / editor panel. Built on the internal sheet core (ADR 0001,
|
|
28120
28120
|
// DTUI-33): it slides in and out from its edge, stays mounted through the
|
|
28121
28121
|
// exit, and `swipeToClose` drags it toward its own edge on every placement.
|
|
@@ -28174,7 +28174,7 @@ var DrawerTitleBar = function DrawerTitleBar(_ref2) {
|
|
|
28174
28174
|
var _useGrabZone = useGrabZone({}),
|
|
28175
28175
|
dragProps = _useGrabZone.dragProps,
|
|
28176
28176
|
grabClass = _useGrabZone.grabClass;
|
|
28177
|
-
return jsx("div", _objectSpread$
|
|
28177
|
+
return jsx("div", _objectSpread$q(_objectSpread$q({}, dragProps), {}, {
|
|
28178
28178
|
className: cn("flex shrink-0 items-start justify-between gap-4 border-b border-gray-200 px-6 py-4 dark:border-gray-700", grabClass, className),
|
|
28179
28179
|
children: children
|
|
28180
28180
|
}));
|
|
@@ -28198,7 +28198,7 @@ var Drawer = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
28198
28198
|
handle = _ref3.handle,
|
|
28199
28199
|
_ref3$swipeToClose = _ref3.swipeToClose,
|
|
28200
28200
|
swipeToClose = _ref3$swipeToClose === void 0 ? false : _ref3$swipeToClose,
|
|
28201
|
-
props = _objectWithoutProperties$1(_ref3, _excluded$
|
|
28201
|
+
props = _objectWithoutProperties$1(_ref3, _excluded$l);
|
|
28202
28202
|
var side = PLACEMENT_CLASSES[placement] ? placement : "right";
|
|
28203
28203
|
var sizes = side === "top" || side === "bottom" ? EDGE_SIZES : SIDE_SIZES;
|
|
28204
28204
|
// Without title/description/footer the children are the panel content, so
|
|
@@ -28236,7 +28236,7 @@ var Drawer = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
|
28236
28236
|
})]
|
|
28237
28237
|
});
|
|
28238
28238
|
};
|
|
28239
|
-
return jsx(SheetCore, _objectSpread$
|
|
28239
|
+
return jsx(SheetCore, _objectSpread$q(_objectSpread$q({
|
|
28240
28240
|
ref: ref,
|
|
28241
28241
|
open: Boolean(isOpen),
|
|
28242
28242
|
onClose: close,
|
|
@@ -28271,7 +28271,7 @@ var DrawerHeader = /*#__PURE__*/React__default.forwardRef(function (_ref5, ref)
|
|
|
28271
28271
|
var _useGrabZone2 = useGrabZone(props),
|
|
28272
28272
|
dragProps = _useGrabZone2.dragProps,
|
|
28273
28273
|
grabClass = _useGrabZone2.grabClass;
|
|
28274
|
-
return jsx("div", _objectSpread$
|
|
28274
|
+
return jsx("div", _objectSpread$q(_objectSpread$q(_objectSpread$q({
|
|
28275
28275
|
ref: ref
|
|
28276
28276
|
}, props), dragProps), {}, {
|
|
28277
28277
|
className: cn("border-b border-gray-200 px-6 py-4 dark:border-gray-700", grabClass, className)
|
|
@@ -28280,7 +28280,7 @@ var DrawerHeader = /*#__PURE__*/React__default.forwardRef(function (_ref5, ref)
|
|
|
28280
28280
|
var DrawerBody = /*#__PURE__*/React__default.forwardRef(function (_ref6, ref) {
|
|
28281
28281
|
var className = _ref6.className,
|
|
28282
28282
|
props = _objectWithoutProperties$1(_ref6, _excluded3$1);
|
|
28283
|
-
return jsx("div", _objectSpread$
|
|
28283
|
+
return jsx("div", _objectSpread$q({
|
|
28284
28284
|
ref: ref,
|
|
28285
28285
|
className: cn("min-h-0 flex-1 overflow-y-auto px-6 py-4", className)
|
|
28286
28286
|
}, props));
|
|
@@ -28288,7 +28288,7 @@ var DrawerBody = /*#__PURE__*/React__default.forwardRef(function (_ref6, ref) {
|
|
|
28288
28288
|
var DrawerFooter = /*#__PURE__*/React__default.forwardRef(function (_ref7, ref) {
|
|
28289
28289
|
var className = _ref7.className,
|
|
28290
28290
|
props = _objectWithoutProperties$1(_ref7, _excluded4$1);
|
|
28291
|
-
return jsx("div", _objectSpread$
|
|
28291
|
+
return jsx("div", _objectSpread$q({
|
|
28292
28292
|
ref: ref,
|
|
28293
28293
|
className: cn("flex items-center justify-end gap-3 border-t border-gray-200 px-6 py-4 dark:border-gray-700", className)
|
|
28294
28294
|
}, props));
|
|
@@ -28300,9 +28300,9 @@ Drawer.Header = DrawerHeader;
|
|
|
28300
28300
|
Drawer.Body = DrawerBody;
|
|
28301
28301
|
Drawer.Footer = DrawerFooter;
|
|
28302
28302
|
|
|
28303
|
-
var _excluded$
|
|
28304
|
-
function ownKeys$
|
|
28305
|
-
function _objectSpread$
|
|
28303
|
+
var _excluded$k = ["open", "isOpen", "onClose", "title", "message", "actions", "cancelLabel", "className", "aria-label"];
|
|
28304
|
+
function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28305
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28306
28306
|
// iOS UIAlertController-style action sheet on the bottom Sheet: an optional
|
|
28307
28307
|
// title + message, a card of actions (destructive ones in the error tone) and
|
|
28308
28308
|
// a separate Cancel. The same implementation (ActionSheetMenu) renders the
|
|
@@ -28323,7 +28323,7 @@ var ActionSheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28323
28323
|
cancelLabel = _ref$cancelLabel === void 0 ? "Cancel" : _ref$cancelLabel,
|
|
28324
28324
|
className = _ref.className,
|
|
28325
28325
|
ariaLabel = _ref["aria-label"],
|
|
28326
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
28326
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$k);
|
|
28327
28327
|
var items = (Array.isArray(actions) ? actions : []).filter(Boolean).map(normalizeAction);
|
|
28328
28328
|
var selectItem = function selectItem(item) {
|
|
28329
28329
|
var _item$onSelect;
|
|
@@ -28331,7 +28331,7 @@ var ActionSheet = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28331
28331
|
(_item$onSelect = item.onSelect) === null || _item$onSelect === void 0 || _item$onSelect.call(item);
|
|
28332
28332
|
_onClose === null || _onClose === void 0 || _onClose("select");
|
|
28333
28333
|
};
|
|
28334
|
-
return jsx(ActionSheetMenu, _objectSpread$
|
|
28334
|
+
return jsx(ActionSheetMenu, _objectSpread$p({
|
|
28335
28335
|
ref: ref,
|
|
28336
28336
|
open: Boolean(open !== null && open !== void 0 ? open : isOpen),
|
|
28337
28337
|
onClose: function onClose(reason) {
|
|
@@ -28499,10 +28499,10 @@ var TourSpotlight = function TourSpotlight(_ref) {
|
|
|
28499
28499
|
};
|
|
28500
28500
|
TourSpotlight.displayName = "TourSpotlight";
|
|
28501
28501
|
|
|
28502
|
-
var _excluded$
|
|
28503
|
-
function ownKeys$
|
|
28504
|
-
function _objectSpread$
|
|
28505
|
-
var useIsomorphicLayoutEffect$
|
|
28502
|
+
var _excluded$j = ["open", "steps", "onClose", "onFinish", "step", "defaultStep", "onStepChange", "labels", "targetTimeout", "spotlightPadding", "presentation", "className", "style", "onPointerDown", "onPointerUp", "onPointerCancel", "onClickCapture"];
|
|
28503
|
+
function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28504
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28505
|
+
var useIsomorphicLayoutEffect$3 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
28506
28506
|
// Docked (phone) card: a horizontal swipe at least this long (px), and clearly
|
|
28507
28507
|
// more horizontal than vertical, goes to the next / previous step.
|
|
28508
28508
|
var SWIPE_DISTANCE = 50;
|
|
@@ -28554,7 +28554,7 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
28554
28554
|
_onPointerUp = _ref.onPointerUp,
|
|
28555
28555
|
_onPointerCancel = _ref.onPointerCancel,
|
|
28556
28556
|
_onClickCapture = _ref.onClickCapture,
|
|
28557
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
28557
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$j);
|
|
28558
28558
|
var cardRef = useRef(null);
|
|
28559
28559
|
var swipeRef = useRef({
|
|
28560
28560
|
x: 0,
|
|
@@ -28563,7 +28563,7 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
28563
28563
|
swipedAt: -Infinity
|
|
28564
28564
|
});
|
|
28565
28565
|
var baseId = useId();
|
|
28566
|
-
var text = _objectSpread$
|
|
28566
|
+
var text = _objectSpread$o(_objectSpread$o({}, DEFAULT_LABELS), labels);
|
|
28567
28567
|
var docked = usePresentation(presentation) === "sheet";
|
|
28568
28568
|
// Each opening is a new session: the uncontrolled step restarts and stale
|
|
28569
28569
|
// target measurements from the previous run are ignored.
|
|
@@ -28606,7 +28606,7 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
28606
28606
|
setFloating = refs.setFloating;
|
|
28607
28607
|
// The target's measured box is the (virtual) reference; useTourTarget
|
|
28608
28608
|
// re-measures it on scroll/resize.
|
|
28609
|
-
useIsomorphicLayoutEffect$
|
|
28609
|
+
useIsomorphicLayoutEffect$3(function () {
|
|
28610
28610
|
setReference(anchored ? {
|
|
28611
28611
|
getBoundingClientRect: function getBoundingClientRect() {
|
|
28612
28612
|
return rect;
|
|
@@ -28616,7 +28616,7 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
28616
28616
|
var goTo = function goTo(next) {
|
|
28617
28617
|
if (next < 0 || next >= total || next === index) return;
|
|
28618
28618
|
if (stepProp === undefined) setSession(function (s) {
|
|
28619
|
-
return _objectSpread$
|
|
28619
|
+
return _objectSpread$o(_objectSpread$o({}, s), {}, {
|
|
28620
28620
|
step: next
|
|
28621
28621
|
});
|
|
28622
28622
|
});
|
|
@@ -28695,7 +28695,7 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
28695
28695
|
children: [jsx(TourSpotlight, {
|
|
28696
28696
|
rect: ready ? rect : null,
|
|
28697
28697
|
padding: spotlightPadding
|
|
28698
|
-
}), jsxs("div", _objectSpread$
|
|
28698
|
+
}), jsxs("div", _objectSpread$o(_objectSpread$o(_objectSpread$o({
|
|
28699
28699
|
ref: function ref(node) {
|
|
28700
28700
|
return setRefs$1(node, cardRef, _ref2, setFloating);
|
|
28701
28701
|
},
|
|
@@ -28708,7 +28708,7 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
28708
28708
|
"data-placement": placementAttr,
|
|
28709
28709
|
"data-presentation": docked ? "sheet" : "popover",
|
|
28710
28710
|
className: cn("fixed overflow-y-auto overscroll-contain rounded-lg border border-gray-200 bg-white text-gray-900 shadow-xl focus:outline-none", "dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100", "transition-opacity duration-200 motion-reduce:transition-none", docked ? "inset-x-4 bottom-4 max-h-[60dvh] pb-safe touch-pan-y" : "w-[min(22rem,calc(100vw-2rem))] max-h-[calc(100dvh-2rem)]", !docked && !rect && "left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2", ready ? "opacity-100" : "pointer-events-none opacity-0", className),
|
|
28711
|
-
style: anchored ? _objectSpread$
|
|
28711
|
+
style: anchored ? _objectSpread$o(_objectSpread$o({}, floatingStyles), style) : style
|
|
28712
28712
|
}, swipeHandlers), rest), {}, {
|
|
28713
28713
|
children: [jsxs("div", {
|
|
28714
28714
|
className: "flex items-start justify-between gap-3 px-4 pt-4",
|
|
@@ -28774,9 +28774,9 @@ var Tour = /*#__PURE__*/forwardRef(function (_ref, _ref2) {
|
|
|
28774
28774
|
});
|
|
28775
28775
|
Tour.displayName = "Tour";
|
|
28776
28776
|
|
|
28777
|
-
var _excluded$
|
|
28778
|
-
function ownKeys$
|
|
28779
|
-
function _objectSpread$
|
|
28777
|
+
var _excluded$i = ["children", "variant", "size", "rounded", "dot", "icon", "max", "className"];
|
|
28778
|
+
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28779
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28780
28780
|
// Light: 100 fill + 800 text (≥4.5:1). Dark: a tinted 900 fill + 200 text.
|
|
28781
28781
|
var variants = {
|
|
28782
28782
|
"default": 'bg-gray-100 text-primary-800 dark:bg-gray-800 dark:text-gray-100',
|
|
@@ -28813,9 +28813,9 @@ var Badge = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28813
28813
|
icon = _ref.icon,
|
|
28814
28814
|
max = _ref.max,
|
|
28815
28815
|
className = _ref.className,
|
|
28816
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
28816
|
+
props = _objectWithoutProperties$1(_ref, _excluded$i);
|
|
28817
28817
|
var hasLead = dot || Boolean(icon);
|
|
28818
|
-
return jsxs("span", _objectSpread$
|
|
28818
|
+
return jsxs("span", _objectSpread$n(_objectSpread$n({
|
|
28819
28819
|
ref: ref,
|
|
28820
28820
|
className: cn('inline-flex items-center font-medium', variants[variant], sizes[size] || sizes.md, {
|
|
28821
28821
|
'rounded-full': rounded,
|
|
@@ -28837,9 +28837,9 @@ var Badge = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28837
28837
|
});
|
|
28838
28838
|
Badge.displayName = 'Badge';
|
|
28839
28839
|
|
|
28840
|
-
var _excluded$
|
|
28841
|
-
function ownKeys$
|
|
28842
|
-
function _objectSpread$
|
|
28840
|
+
var _excluded$h = ["children", "max", "size", "className"];
|
|
28841
|
+
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28842
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28843
28843
|
// Overlap grows with the avatar so the stack reads the same at every size.
|
|
28844
28844
|
var OVERLAP = {
|
|
28845
28845
|
xs: '-space-x-1.5',
|
|
@@ -28858,13 +28858,13 @@ var AvatarGroup = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28858
28858
|
_ref$size = _ref.size,
|
|
28859
28859
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
28860
28860
|
className = _ref.className,
|
|
28861
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
28861
|
+
props = _objectWithoutProperties$1(_ref, _excluded$h);
|
|
28862
28862
|
var avatars = React__default.Children.toArray(children).filter(React__default.isValidElement);
|
|
28863
28863
|
var limit = typeof max === 'number' && max >= 0 ? max : avatars.length;
|
|
28864
28864
|
var visible = avatars.slice(0, limit);
|
|
28865
28865
|
var overflow = avatars.length - visible.length;
|
|
28866
28866
|
var sizeKey = AVATAR_SIZES[size] ? size : 'md';
|
|
28867
|
-
return jsxs("div", _objectSpread$
|
|
28867
|
+
return jsxs("div", _objectSpread$m(_objectSpread$m({
|
|
28868
28868
|
ref: ref,
|
|
28869
28869
|
role: "group",
|
|
28870
28870
|
className: cn('flex items-center', OVERLAP[sizeKey], className)
|
|
@@ -28887,14 +28887,14 @@ var AvatarGroup = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28887
28887
|
});
|
|
28888
28888
|
AvatarGroup.displayName = 'AvatarGroup';
|
|
28889
28889
|
|
|
28890
|
-
var _excluded$
|
|
28890
|
+
var _excluded$g = ["children", "className", "hover", "interactive", "onClick", "onKeyDown"],
|
|
28891
28891
|
_excluded2$1 = ["children", "className"],
|
|
28892
28892
|
_excluded3 = ["children", "className"],
|
|
28893
28893
|
_excluded4 = ["children", "className"],
|
|
28894
28894
|
_excluded5 = ["children", "className"],
|
|
28895
28895
|
_excluded6 = ["children", "className"];
|
|
28896
|
-
function ownKeys$
|
|
28897
|
-
function _objectSpread$
|
|
28896
|
+
function ownKeys$l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28897
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28898
28898
|
// Interactive cards: hover lift, press shrink and a keyboard focus ring. The
|
|
28899
28899
|
// transition list covers both the shadow and the press transform.
|
|
28900
28900
|
var INTERACTIVE_CLASSES = cn('cursor-pointer hover:shadow-md focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900', PRESS_FEEDBACK, 'transition-[box-shadow,transform] duration-fast ease-standard motion-reduce:transition-none');
|
|
@@ -28907,7 +28907,7 @@ var Card = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28907
28907
|
interactive = _ref$interactive === void 0 ? false : _ref$interactive,
|
|
28908
28908
|
onClick = _ref.onClick,
|
|
28909
28909
|
onKeyDown = _ref.onKeyDown,
|
|
28910
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
28910
|
+
props = _objectWithoutProperties$1(_ref, _excluded$g);
|
|
28911
28911
|
// A clickable interactive card with no role of its own becomes a keyboard
|
|
28912
28912
|
// operable button (Tab to it, Enter / Space to activate).
|
|
28913
28913
|
var actsAsButton = interactive && typeof onClick === 'function' && props.role === undefined;
|
|
@@ -28919,7 +28919,7 @@ var Card = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28919
28919
|
onClick(e);
|
|
28920
28920
|
}
|
|
28921
28921
|
};
|
|
28922
|
-
return jsx("div", _objectSpread$
|
|
28922
|
+
return jsx("div", _objectSpread$l(_objectSpread$l({
|
|
28923
28923
|
ref: ref,
|
|
28924
28924
|
role: actsAsButton ? 'button' : undefined,
|
|
28925
28925
|
tabIndex: actsAsButton ? 0 : undefined,
|
|
@@ -28938,7 +28938,7 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
28938
28938
|
var children = _ref2.children,
|
|
28939
28939
|
className = _ref2.className,
|
|
28940
28940
|
props = _objectWithoutProperties$1(_ref2, _excluded2$1);
|
|
28941
|
-
return jsx("div", _objectSpread$
|
|
28941
|
+
return jsx("div", _objectSpread$l(_objectSpread$l({
|
|
28942
28942
|
className: cn('px-4 sm:px-6 py-4 border-b border-line', className)
|
|
28943
28943
|
}, props), {}, {
|
|
28944
28944
|
children: children
|
|
@@ -28948,7 +28948,7 @@ var CardTitle = function CardTitle(_ref3) {
|
|
|
28948
28948
|
var children = _ref3.children,
|
|
28949
28949
|
className = _ref3.className,
|
|
28950
28950
|
props = _objectWithoutProperties$1(_ref3, _excluded3);
|
|
28951
|
-
return jsx("h3", _objectSpread$
|
|
28951
|
+
return jsx("h3", _objectSpread$l(_objectSpread$l({
|
|
28952
28952
|
className: cn('text-lg font-semibold text-primary-900 dark:text-primary-100', className)
|
|
28953
28953
|
}, props), {}, {
|
|
28954
28954
|
children: children
|
|
@@ -28958,7 +28958,7 @@ var CardDescription = function CardDescription(_ref4) {
|
|
|
28958
28958
|
var children = _ref4.children,
|
|
28959
28959
|
className = _ref4.className,
|
|
28960
28960
|
props = _objectWithoutProperties$1(_ref4, _excluded4);
|
|
28961
|
-
return jsx("p", _objectSpread$
|
|
28961
|
+
return jsx("p", _objectSpread$l(_objectSpread$l({
|
|
28962
28962
|
className: cn('text-sm text-primary-600 dark:text-primary-300', className)
|
|
28963
28963
|
}, props), {}, {
|
|
28964
28964
|
children: children
|
|
@@ -28968,7 +28968,7 @@ var CardContent = function CardContent(_ref5) {
|
|
|
28968
28968
|
var children = _ref5.children,
|
|
28969
28969
|
className = _ref5.className,
|
|
28970
28970
|
props = _objectWithoutProperties$1(_ref5, _excluded5);
|
|
28971
|
-
return jsx("div", _objectSpread$
|
|
28971
|
+
return jsx("div", _objectSpread$l(_objectSpread$l({
|
|
28972
28972
|
className: cn('px-4 sm:px-6 py-4', className)
|
|
28973
28973
|
}, props), {}, {
|
|
28974
28974
|
children: children
|
|
@@ -28978,7 +28978,7 @@ var CardFooter = function CardFooter(_ref6) {
|
|
|
28978
28978
|
var children = _ref6.children,
|
|
28979
28979
|
className = _ref6.className,
|
|
28980
28980
|
props = _objectWithoutProperties$1(_ref6, _excluded6);
|
|
28981
|
-
return jsx("div", _objectSpread$
|
|
28981
|
+
return jsx("div", _objectSpread$l(_objectSpread$l({
|
|
28982
28982
|
className: cn('px-4 sm:px-6 py-4 border-t border-line', className)
|
|
28983
28983
|
}, props), {}, {
|
|
28984
28984
|
children: children
|
|
@@ -28990,9 +28990,9 @@ Card.Description = CardDescription;
|
|
|
28990
28990
|
Card.Content = CardContent;
|
|
28991
28991
|
Card.Footer = CardFooter;
|
|
28992
28992
|
|
|
28993
|
-
var _excluded$
|
|
28994
|
-
function ownKeys$
|
|
28995
|
-
function _objectSpread$
|
|
28993
|
+
var _excluded$f = ["currentPage", "totalPages", "onPageChange", "showFirstLast", "showPrevNext", "maxVisiblePages", "className"];
|
|
28994
|
+
function ownKeys$k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28995
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28996
28996
|
// Shared button chrome: dark-safe surface, focus-visible ring, 44px target on coarse pointers.
|
|
28997
28997
|
var BUTTON_BASE = cn('inline-flex items-center justify-center rounded-md border px-3 py-2 text-sm font-medium', 'transition-colors duration-fast motion-reduce:transition-none', 'outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900', TOUCH_TARGET);
|
|
28998
28998
|
var BUTTON_IDLE = 'border-gray-300 bg-white hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:hover:bg-gray-800';
|
|
@@ -29011,7 +29011,7 @@ var Pagination = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29011
29011
|
_ref$maxVisiblePages = _ref.maxVisiblePages,
|
|
29012
29012
|
maxVisiblePages = _ref$maxVisiblePages === void 0 ? 5 : _ref$maxVisiblePages,
|
|
29013
29013
|
className = _ref.className,
|
|
29014
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
29014
|
+
props = _objectWithoutProperties$1(_ref, _excluded$f);
|
|
29015
29015
|
var getVisiblePages = function getVisiblePages() {
|
|
29016
29016
|
var pages = [];
|
|
29017
29017
|
var halfVisible = Math.floor(maxVisiblePages / 2);
|
|
@@ -29041,7 +29041,7 @@ var Pagination = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29041
29041
|
// prev/next buttons to drive it; otherwise the full layout shows everywhere.
|
|
29042
29042
|
var compact = showPrevNext;
|
|
29043
29043
|
var fullOnly = compact ? 'hidden sm:inline-flex' : '';
|
|
29044
|
-
return jsxs("nav", _objectSpread$
|
|
29044
|
+
return jsxs("nav", _objectSpread$k(_objectSpread$k({
|
|
29045
29045
|
ref: ref,
|
|
29046
29046
|
className: cn('flex flex-wrap items-center justify-center gap-1', className),
|
|
29047
29047
|
"aria-label": "Pagination"
|
|
@@ -29112,9 +29112,9 @@ var Pagination = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29112
29112
|
});
|
|
29113
29113
|
Pagination.displayName = 'Pagination';
|
|
29114
29114
|
|
|
29115
|
-
var _excluded$
|
|
29116
|
-
function ownKeys$
|
|
29117
|
-
function _objectSpread$
|
|
29115
|
+
var _excluded$e = ["steps", "currentStep", "orientation", "variant", "onStepClick", "className"];
|
|
29116
|
+
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29117
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29118
29118
|
// Layout classes per orientation. "auto" stacks vertically below `sm` and lays
|
|
29119
29119
|
// out horizontally from `sm` up. Every class is written out literally so
|
|
29120
29120
|
// Tailwind's content scan picks it up.
|
|
@@ -29181,7 +29181,7 @@ var Stepper = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29181
29181
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
29182
29182
|
onStepClick = _ref.onStepClick,
|
|
29183
29183
|
className = _ref.className,
|
|
29184
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
29184
|
+
props = _objectWithoutProperties$1(_ref, _excluded$e);
|
|
29185
29185
|
var getStepStatus = function getStepStatus(stepIndex) {
|
|
29186
29186
|
if (stepIndex < currentStep) return 'completed';
|
|
29187
29187
|
if (stepIndex === currentStep) return 'current';
|
|
@@ -29199,7 +29199,7 @@ var Stepper = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29199
29199
|
};
|
|
29200
29200
|
// Compact progress dots: no titles, just one dot per step (current = pill).
|
|
29201
29201
|
if (variant === 'dots') {
|
|
29202
|
-
return jsx("nav", _objectSpread$
|
|
29202
|
+
return jsx("nav", _objectSpread$j(_objectSpread$j({
|
|
29203
29203
|
ref: ref,
|
|
29204
29204
|
className: cn('flex flex-row items-center gap-1', className),
|
|
29205
29205
|
"aria-label": "Progress",
|
|
@@ -29225,7 +29225,7 @@ var Stepper = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29225
29225
|
}));
|
|
29226
29226
|
}
|
|
29227
29227
|
var layout = LAYOUT[orientation] || LAYOUT.horizontal;
|
|
29228
|
-
return jsx("nav", _objectSpread$
|
|
29228
|
+
return jsx("nav", _objectSpread$j(_objectSpread$j({
|
|
29229
29229
|
ref: ref,
|
|
29230
29230
|
className: cn('flex', layout.nav, className),
|
|
29231
29231
|
"aria-label": "Progress"
|
|
@@ -29274,9 +29274,9 @@ var Stepper = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29274
29274
|
});
|
|
29275
29275
|
Stepper.displayName = 'Stepper';
|
|
29276
29276
|
|
|
29277
|
-
var _excluded$
|
|
29278
|
-
function ownKeys$
|
|
29279
|
-
function _objectSpread$
|
|
29277
|
+
var _excluded$d = ["accept", "multiple", "maxSize", "onFileSelect", "onFileRemove", "files", "disabled", "capture", "className"];
|
|
29278
|
+
function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29279
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29280
29280
|
var COARSE_POINTER_QUERY = '(pointer: coarse)';
|
|
29281
29281
|
// PRESS_FEEDBACK sets transition-transform; this keeps the colour transition as well.
|
|
29282
29282
|
var TRANSITION_WITH_PRESS = 'transition-[color,background-color,border-color,transform]';
|
|
@@ -29301,7 +29301,7 @@ var FileUpload = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29301
29301
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
29302
29302
|
capture = _ref.capture,
|
|
29303
29303
|
className = _ref.className,
|
|
29304
|
-
props = _objectWithoutProperties$1(_ref, _excluded$
|
|
29304
|
+
props = _objectWithoutProperties$1(_ref, _excluded$d);
|
|
29305
29305
|
var _useState = useState(false),
|
|
29306
29306
|
_useState2 = _slicedToArray(_useState, 2),
|
|
29307
29307
|
isDragOver = _useState2[0],
|
|
@@ -29392,7 +29392,7 @@ var FileUpload = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29392
29392
|
className: "text-xs text-primary-500 dark:text-primary-300 mt-1",
|
|
29393
29393
|
children: [accept && "Accepted formats: ".concat(accept), maxSize && " \u2022 Max size: ".concat(formatFileSize(maxSize))]
|
|
29394
29394
|
});
|
|
29395
|
-
return jsxs("div", _objectSpread$
|
|
29395
|
+
return jsxs("div", _objectSpread$i(_objectSpread$i({
|
|
29396
29396
|
ref: ref,
|
|
29397
29397
|
className: cn('w-full', className)
|
|
29398
29398
|
}, props), {}, {
|
|
@@ -29526,9 +29526,9 @@ var Condition = function Condition(_ref) {
|
|
|
29526
29526
|
return condition ? children : fallback;
|
|
29527
29527
|
};
|
|
29528
29528
|
|
|
29529
|
-
var _excluded$
|
|
29530
|
-
function ownKeys$
|
|
29531
|
-
function _objectSpread$
|
|
29529
|
+
var _excluded$c = ["children", "autoPlay", "interval", "showDots", "className", "itemClassName", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchStart", "onTouchEnd"];
|
|
29530
|
+
function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29531
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29532
29532
|
// Arrows stay visible at rest (touch devices have no hover) and use the surface /
|
|
29533
29533
|
// foreground role tokens so they read on light and dark themes alike.
|
|
29534
29534
|
var ARROW_CLASSES = "absolute top-1/2 -translate-y-1/2 z-10 inline-flex items-center justify-center p-2 rounded-full bg-surface/80 backdrop-blur-md border border-line text-foreground shadow-lg transition-colors motion-reduce:transition-none hover:bg-surface focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500";
|
|
@@ -29563,7 +29563,7 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function Carousel(props, r
|
|
|
29563
29563
|
_onBlur = props.onBlur,
|
|
29564
29564
|
_onTouchStart = props.onTouchStart,
|
|
29565
29565
|
_onTouchEnd = props.onTouchEnd,
|
|
29566
|
-
rest = _objectWithoutProperties$1(props, _excluded$
|
|
29566
|
+
rest = _objectWithoutProperties$1(props, _excluded$c);
|
|
29567
29567
|
var reducedMotion = useReducedMotion();
|
|
29568
29568
|
var _React$useState = React__default.useState(0),
|
|
29569
29569
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -29631,7 +29631,7 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function Carousel(props, r
|
|
|
29631
29631
|
return clearInterval(timer);
|
|
29632
29632
|
};
|
|
29633
29633
|
}, [isAutoPlaying, next, interval]);
|
|
29634
|
-
return jsxs("div", _objectSpread$
|
|
29634
|
+
return jsxs("div", _objectSpread$h(_objectSpread$h({
|
|
29635
29635
|
ref: ref,
|
|
29636
29636
|
role: "region",
|
|
29637
29637
|
"aria-roledescription": "carousel",
|
|
@@ -29743,7 +29743,25 @@ Carousel.displayName = "Carousel";
|
|
|
29743
29743
|
|
|
29744
29744
|
// Internal (not exported). Keyboard + pointer reordering for Sortable. Both
|
|
29745
29745
|
// work on a draft list of keys while the user is moving an item and only call
|
|
29746
|
-
// `commit(fromIndex, toIndex)` when the item is dropped.
|
|
29746
|
+
// `commit(fromIndex, toIndex)` when the item is dropped. Inside a SortableGroup
|
|
29747
|
+
// they also get a `cross` object (see useSortableGroup.js) that takes over when
|
|
29748
|
+
// the item is carried into another list; without one they behave as before.
|
|
29749
|
+
var defaultGetKey = function defaultGetKey(item, index) {
|
|
29750
|
+
var _ref, _item$id;
|
|
29751
|
+
return (_ref = (_item$id = item === null || item === void 0 ? void 0 : item.id) !== null && _item$id !== void 0 ? _item$id : item === null || item === void 0 ? void 0 : item.key) !== null && _ref !== void 0 ? _ref : index;
|
|
29752
|
+
};
|
|
29753
|
+
var defaultGetItemLabel = function defaultGetItemLabel(item, index) {
|
|
29754
|
+
var _ref2, _ref3, _item$label;
|
|
29755
|
+
return typeof item === "string" || typeof item === "number" ? String(item) : (_ref2 = (_ref3 = (_item$label = item === null || item === void 0 ? void 0 : item.label) !== null && _item$label !== void 0 ? _item$label : item === null || item === void 0 ? void 0 : item.title) !== null && _ref3 !== void 0 ? _ref3 : item === null || item === void 0 ? void 0 : item.name) !== null && _ref2 !== void 0 ? _ref2 : "Item ".concat(index + 1);
|
|
29756
|
+
};
|
|
29757
|
+
function arrayMove(list, from, to) {
|
|
29758
|
+
var next = list.slice();
|
|
29759
|
+
var _next$splice = next.splice(from, 1),
|
|
29760
|
+
_next$splice2 = _slicedToArray(_next$splice, 1),
|
|
29761
|
+
moved = _next$splice2[0];
|
|
29762
|
+
next.splice(to, 0, moved);
|
|
29763
|
+
return next;
|
|
29764
|
+
}
|
|
29747
29765
|
function moveKey(keys, key, toIndex) {
|
|
29748
29766
|
var next = keys.filter(function (k) {
|
|
29749
29767
|
return k !== key;
|
|
@@ -29764,6 +29782,17 @@ var DEFAULT_SORTABLE_MESSAGES = {
|
|
|
29764
29782
|
},
|
|
29765
29783
|
cancelled: function cancelled(label, position) {
|
|
29766
29784
|
return "Reorder cancelled. ".concat(label, " returned to position ").concat(position, ".");
|
|
29785
|
+
},
|
|
29786
|
+
// Only used inside a SortableGroup.
|
|
29787
|
+
groupInstructions: "Use the arrow keys across the list (Left and Right in a vertical list) to carry it to the previous or next list.",
|
|
29788
|
+
movedToList: function movedToList(label, list, position, total) {
|
|
29789
|
+
return "".concat(label, " moved to ").concat(list, ", position ").concat(position, " of ").concat(total, ".");
|
|
29790
|
+
},
|
|
29791
|
+
droppedInList: function droppedInList(label, list, position, total) {
|
|
29792
|
+
return "".concat(label, " dropped in ").concat(list, " at position ").concat(position, " of ").concat(total, ".");
|
|
29793
|
+
},
|
|
29794
|
+
refused: function refused(label, list) {
|
|
29795
|
+
return "".concat(label, " cannot be dropped in ").concat(list, ".");
|
|
29767
29796
|
}
|
|
29768
29797
|
};
|
|
29769
29798
|
var PREV_KEYS = {
|
|
@@ -29774,13 +29803,31 @@ var NEXT_KEYS = {
|
|
|
29774
29803
|
vertical: ["ArrowDown"],
|
|
29775
29804
|
horizontal: ["ArrowRight"]
|
|
29776
29805
|
};
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
|
|
29806
|
+
// Cross-axis arrows step between the lists of a SortableGroup.
|
|
29807
|
+
var LIST_KEYS = {
|
|
29808
|
+
vertical: {
|
|
29809
|
+
ArrowLeft: -1,
|
|
29810
|
+
ArrowRight: 1
|
|
29811
|
+
},
|
|
29812
|
+
horizontal: {
|
|
29813
|
+
ArrowUp: -1,
|
|
29814
|
+
ArrowDown: 1
|
|
29815
|
+
}
|
|
29816
|
+
};
|
|
29817
|
+
var stepOf = function stepOf(e, orientation, cross) {
|
|
29818
|
+
return {
|
|
29819
|
+
delta: PREV_KEYS[orientation].includes(e.key) ? -1 : NEXT_KEYS[orientation].includes(e.key) ? 1 : 0,
|
|
29820
|
+
list: cross ? LIST_KEYS[orientation][e.key] || 0 : 0
|
|
29821
|
+
};
|
|
29822
|
+
};
|
|
29823
|
+
function useSortableKeyboard(_ref4) {
|
|
29824
|
+
var keys = _ref4.keys,
|
|
29825
|
+
setDraft = _ref4.setDraft,
|
|
29826
|
+
commit = _ref4.commit,
|
|
29827
|
+
announce = _ref4.announce,
|
|
29828
|
+
labelFor = _ref4.labelFor,
|
|
29829
|
+
orientation = _ref4.orientation,
|
|
29830
|
+
cross = _ref4.cross;
|
|
29784
29831
|
var _useState = useState(null),
|
|
29785
29832
|
_useState2 = _slicedToArray(_useState, 2),
|
|
29786
29833
|
grabbed = _useState2[0],
|
|
@@ -29798,21 +29845,27 @@ function useSortableKeyboard(_ref) {
|
|
|
29798
29845
|
setGrabbed(key);
|
|
29799
29846
|
setDraft(keys);
|
|
29800
29847
|
announce("grabbed", labelFor(key), index + 1, total);
|
|
29801
|
-
|
|
29802
|
-
setGrabbed(null);
|
|
29803
|
-
commit(origin.current, index);
|
|
29804
|
-
announce("dropped", labelFor(key), index + 1, total);
|
|
29848
|
+
return;
|
|
29805
29849
|
}
|
|
29850
|
+
var crossed = cross === null || cross === void 0 ? void 0 : cross.drop(key);
|
|
29851
|
+
if (crossed === "refused") return;
|
|
29852
|
+
setGrabbed(null);
|
|
29853
|
+
if (crossed) return;
|
|
29854
|
+
commit(origin.current, index);
|
|
29855
|
+
announce("dropped", labelFor(key), index + 1, total);
|
|
29806
29856
|
} else if (grabbed === key && e.key === "Escape") {
|
|
29807
29857
|
e.preventDefault();
|
|
29808
29858
|
setGrabbed(null);
|
|
29809
29859
|
setDraft(null);
|
|
29860
|
+
cross === null || cross === void 0 || cross.cancel();
|
|
29810
29861
|
announce("cancelled", labelFor(key), origin.current + 1, total);
|
|
29811
29862
|
} else if (grabbed === key) {
|
|
29812
|
-
var
|
|
29813
|
-
if (!delta) return;
|
|
29863
|
+
var step = stepOf(e, orientation, cross);
|
|
29864
|
+
if (!step.delta && !step.list) return;
|
|
29814
29865
|
e.preventDefault();
|
|
29815
|
-
|
|
29866
|
+
if (step.list) return cross.step(key, step.list);
|
|
29867
|
+
if (cross !== null && cross !== void 0 && cross.nudge(key, step.delta)) return;
|
|
29868
|
+
var to = Math.max(0, Math.min(total - 1, index + step.delta));
|
|
29816
29869
|
if (to === index) return;
|
|
29817
29870
|
setDraft(moveKey(keys, key, to));
|
|
29818
29871
|
announce("moved", labelFor(key), to + 1, total);
|
|
@@ -29822,7 +29875,8 @@ function useSortableKeyboard(_ref) {
|
|
|
29822
29875
|
var cancel = useCallback(function () {
|
|
29823
29876
|
setGrabbed(null);
|
|
29824
29877
|
setDraft(null);
|
|
29825
|
-
|
|
29878
|
+
cross === null || cross === void 0 || cross.cancel();
|
|
29879
|
+
}, [setDraft, cross]);
|
|
29826
29880
|
return {
|
|
29827
29881
|
grabbed: grabbed,
|
|
29828
29882
|
keyDownFor: keyDownFor,
|
|
@@ -29868,13 +29922,14 @@ var raf = function raf(cb) {
|
|
|
29868
29922
|
var caf = function caf(id) {
|
|
29869
29923
|
return typeof window.cancelAnimationFrame === "function" ? window.cancelAnimationFrame(id) : clearTimeout(id);
|
|
29870
29924
|
};
|
|
29871
|
-
function useSortablePointer(
|
|
29872
|
-
var keys =
|
|
29873
|
-
setDraft =
|
|
29874
|
-
commit =
|
|
29875
|
-
nodeFor =
|
|
29876
|
-
orientation =
|
|
29877
|
-
disabled =
|
|
29925
|
+
function useSortablePointer(_ref5) {
|
|
29926
|
+
var keys = _ref5.keys,
|
|
29927
|
+
setDraft = _ref5.setDraft,
|
|
29928
|
+
commit = _ref5.commit,
|
|
29929
|
+
nodeFor = _ref5.nodeFor,
|
|
29930
|
+
orientation = _ref5.orientation,
|
|
29931
|
+
disabled = _ref5.disabled,
|
|
29932
|
+
cross = _ref5.cross;
|
|
29878
29933
|
var _useState3 = useState(null),
|
|
29879
29934
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
29880
29935
|
dragging = _useState4[0],
|
|
@@ -29884,7 +29939,8 @@ function useSortablePointer(_ref2) {
|
|
|
29884
29939
|
keys: keys,
|
|
29885
29940
|
commit: commit,
|
|
29886
29941
|
nodeFor: nodeFor,
|
|
29887
|
-
orientation: orientation
|
|
29942
|
+
orientation: orientation,
|
|
29943
|
+
cross: cross
|
|
29888
29944
|
});
|
|
29889
29945
|
var end = useCallback(function () {
|
|
29890
29946
|
var _session$current;
|
|
@@ -29913,9 +29969,9 @@ function useSortablePointer(_ref2) {
|
|
|
29913
29969
|
// `longPress`: on touch, wait LONG_PRESS_DELAY before picking the item up (used
|
|
29914
29970
|
// when the whole item is the drag source, so the list still scrolls on swipe).
|
|
29915
29971
|
var startFor = function startFor(key) {
|
|
29916
|
-
var
|
|
29917
|
-
|
|
29918
|
-
longPress =
|
|
29972
|
+
var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
29973
|
+
_ref6$longPress = _ref6.longPress,
|
|
29974
|
+
longPress = _ref6$longPress === void 0 ? false : _ref6$longPress;
|
|
29919
29975
|
return function (e) {
|
|
29920
29976
|
if (disabled || e.button > 0) return;
|
|
29921
29977
|
var start = {
|
|
@@ -29928,6 +29984,12 @@ function useSortablePointer(_ref2) {
|
|
|
29928
29984
|
var point = start;
|
|
29929
29985
|
var pressTimer = null;
|
|
29930
29986
|
var frame = null;
|
|
29987
|
+
// Over another list of the group, the source list keeps its original order
|
|
29988
|
+
// and the target list shows where the item would land.
|
|
29989
|
+
var track = function track() {
|
|
29990
|
+
var _latest$current$cross;
|
|
29991
|
+
if ((_latest$current$cross = latest.current.cross) !== null && _latest$current$cross !== void 0 && _latest$current$cross.over(point, key)) setDraft(null);else setDraft(moveKey(latest.current.keys, key, targetIndex(point, key)));
|
|
29992
|
+
};
|
|
29931
29993
|
var scrollTarget = function scrollTarget() {
|
|
29932
29994
|
return getScrollParent(latest.current.nodeFor(key), latest.current.orientation);
|
|
29933
29995
|
};
|
|
@@ -29952,7 +30014,7 @@ function useSortablePointer(_ref2) {
|
|
|
29952
30014
|
} else if (typeof window.scrollBy === "function") {
|
|
29953
30015
|
window.scrollBy(dx, dy);
|
|
29954
30016
|
}
|
|
29955
|
-
|
|
30017
|
+
track();
|
|
29956
30018
|
frame = raf(_autoScroll);
|
|
29957
30019
|
};
|
|
29958
30020
|
var activate = function activate() {
|
|
@@ -29974,20 +30036,24 @@ function useSortablePointer(_ref2) {
|
|
|
29974
30036
|
if (distance < DRAG_THRESHOLD) return;
|
|
29975
30037
|
activate();
|
|
29976
30038
|
}
|
|
29977
|
-
|
|
30039
|
+
track();
|
|
29978
30040
|
if (frame === null) frame = raf(_autoScroll);
|
|
29979
30041
|
};
|
|
29980
30042
|
var onUp = function onUp() {
|
|
30043
|
+
var _latest$current$cross2;
|
|
29981
30044
|
end();
|
|
29982
30045
|
if (!active) return;
|
|
29983
30046
|
setDragging(null);
|
|
30047
|
+
if ((_latest$current$cross2 = latest.current.cross) !== null && _latest$current$cross2 !== void 0 && _latest$current$cross2.release()) return;
|
|
29984
30048
|
latest.current.commit(from, latest.current.keys.indexOf(key));
|
|
29985
30049
|
};
|
|
29986
30050
|
var onCancel = function onCancel() {
|
|
30051
|
+
var _latest$current$cross3;
|
|
29987
30052
|
end();
|
|
29988
30053
|
if (!active) return;
|
|
29989
30054
|
setDragging(null);
|
|
29990
30055
|
setDraft(null);
|
|
30056
|
+
(_latest$current$cross3 = latest.current.cross) === null || _latest$current$cross3 === void 0 || _latest$current$cross3.cancel();
|
|
29991
30057
|
};
|
|
29992
30058
|
// Once a touch drag is live, stop the browser from scrolling (and from firing
|
|
29993
30059
|
// pointercancel); before that, let the page scroll normally.
|
|
@@ -30025,47 +30091,338 @@ function useSortablePointer(_ref2) {
|
|
|
30025
30091
|
};
|
|
30026
30092
|
}
|
|
30027
30093
|
|
|
30094
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30095
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30096
|
+
// Internal (not exported). Cross-list moves for Sortable lists inside a
|
|
30097
|
+
// SortableGroup. The group holds one "carry": the item on its way from one list
|
|
30098
|
+
// to another, the target `{ listId, index }` and whether `canDrop` allows it.
|
|
30099
|
+
// The target list draws a placeholder from it; nothing is committed until the
|
|
30100
|
+
// drop, so a refused target is never shown as a success.
|
|
30101
|
+
var useIsomorphicLayoutEffect$2 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
30102
|
+
var SortableGroupContext = /*#__PURE__*/createContext(null);
|
|
30103
|
+
var documentOrder = function documentOrder(a, b) {
|
|
30104
|
+
return a === b ? 0 : a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
30105
|
+
};
|
|
30106
|
+
var contains = function contains(rect, point) {
|
|
30107
|
+
return point.x >= rect.left && point.x <= rect.right && point.y >= rect.top && point.y <= rect.bottom;
|
|
30108
|
+
};
|
|
30109
|
+
/** Insertion index for `point` among the items of a list (midpoint hit-test). */
|
|
30110
|
+
function indexAt(list, point) {
|
|
30111
|
+
var index = list.itemKeys.findIndex(function (k) {
|
|
30112
|
+
var _list$nodeFor;
|
|
30113
|
+
var rect = (_list$nodeFor = list.nodeFor(k)) === null || _list$nodeFor === void 0 ? void 0 : _list$nodeFor.getBoundingClientRect();
|
|
30114
|
+
if (!rect) return false;
|
|
30115
|
+
return list.orientation === "horizontal" ? point.x < rect.left + rect.width / 2 : point.y < rect.top + rect.height / 2;
|
|
30116
|
+
});
|
|
30117
|
+
return index === -1 ? list.itemKeys.length : index;
|
|
30118
|
+
}
|
|
30119
|
+
/** State + stable API behind <SortableGroup>. */
|
|
30120
|
+
function useSortableGroupState(_ref) {
|
|
30121
|
+
var onMove = _ref.onMove,
|
|
30122
|
+
canDrop = _ref.canDrop;
|
|
30123
|
+
var lists = useRef(new Map());
|
|
30124
|
+
var carryRef = useRef(null);
|
|
30125
|
+
var focusRef = useRef(null);
|
|
30126
|
+
var _useState = useState(null),
|
|
30127
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30128
|
+
carry = _useState2[0],
|
|
30129
|
+
setCarryState = _useState2[1];
|
|
30130
|
+
var latest = useLatestRef$1({
|
|
30131
|
+
onMove: onMove,
|
|
30132
|
+
canDrop: canDrop
|
|
30133
|
+
});
|
|
30134
|
+
var api = useMemo(function () {
|
|
30135
|
+
var setCarry = function setCarry(next) {
|
|
30136
|
+
carryRef.current = next;
|
|
30137
|
+
setCarryState(next);
|
|
30138
|
+
return next;
|
|
30139
|
+
};
|
|
30140
|
+
var read = function read(id) {
|
|
30141
|
+
var _lists$current$get;
|
|
30142
|
+
return (_lists$current$get = lists.current.get(id)) === null || _lists$current$get === void 0 ? void 0 : _lists$current$get();
|
|
30143
|
+
};
|
|
30144
|
+
return {
|
|
30145
|
+
pendingFocus: function pendingFocus() {
|
|
30146
|
+
return focusRef.current;
|
|
30147
|
+
},
|
|
30148
|
+
clearFocus: function clearFocus() {
|
|
30149
|
+
focusRef.current = null;
|
|
30150
|
+
},
|
|
30151
|
+
read: read,
|
|
30152
|
+
current: function current() {
|
|
30153
|
+
return carryRef.current;
|
|
30154
|
+
},
|
|
30155
|
+
register: function register(id, reader) {
|
|
30156
|
+
lists.current.set(id, reader);
|
|
30157
|
+
return function () {
|
|
30158
|
+
if (lists.current.get(id) === reader) lists.current["delete"](id);
|
|
30159
|
+
};
|
|
30160
|
+
},
|
|
30161
|
+
/** List ids in document order (only lists that are mounted). */
|
|
30162
|
+
order: function order() {
|
|
30163
|
+
return _toConsumableArray$1(lists.current.keys()).filter(function (id) {
|
|
30164
|
+
var _read;
|
|
30165
|
+
return (_read = read(id)) === null || _read === void 0 ? void 0 : _read.node;
|
|
30166
|
+
}).sort(function (a, b) {
|
|
30167
|
+
return documentOrder(read(a).node, read(b).node);
|
|
30168
|
+
});
|
|
30169
|
+
},
|
|
30170
|
+
aim: function aim(from, item, target) {
|
|
30171
|
+
var c = carryRef.current;
|
|
30172
|
+
if (c && c.from.listId === from.listId && c.target.listId === target.listId && c.target.index === target.index) return c;
|
|
30173
|
+
var test = latest.current.canDrop;
|
|
30174
|
+
return setCarry({
|
|
30175
|
+
from: from,
|
|
30176
|
+
item: item,
|
|
30177
|
+
target: target,
|
|
30178
|
+
allowed: test ? Boolean(test(item, target, from)) : true
|
|
30179
|
+
});
|
|
30180
|
+
},
|
|
30181
|
+
clear: function clear() {
|
|
30182
|
+
if (carryRef.current) setCarry(null);
|
|
30183
|
+
},
|
|
30184
|
+
drop: function drop(c, focus) {
|
|
30185
|
+
var _latest$current$onMov, _latest$current;
|
|
30186
|
+
setCarry(null);
|
|
30187
|
+
focusRef.current = focus || null;
|
|
30188
|
+
(_latest$current$onMov = (_latest$current = latest.current).onMove) === null || _latest$current$onMov === void 0 || _latest$current$onMov.call(_latest$current, {
|
|
30189
|
+
item: c.item,
|
|
30190
|
+
from: c.from,
|
|
30191
|
+
to: c.target
|
|
30192
|
+
});
|
|
30193
|
+
}
|
|
30194
|
+
};
|
|
30195
|
+
}, [latest]);
|
|
30196
|
+
return useMemo(function () {
|
|
30197
|
+
return {
|
|
30198
|
+
api: api,
|
|
30199
|
+
carry: carry
|
|
30200
|
+
};
|
|
30201
|
+
}, [api, carry]);
|
|
30202
|
+
}
|
|
30203
|
+
function makeCross(api, latest) {
|
|
30204
|
+
var me = function me() {
|
|
30205
|
+
return latest.current;
|
|
30206
|
+
};
|
|
30207
|
+
var origin = function origin(key) {
|
|
30208
|
+
var m = me();
|
|
30209
|
+
var index = m.itemKeys.indexOf(key);
|
|
30210
|
+
return {
|
|
30211
|
+
from: {
|
|
30212
|
+
listId: m.listId,
|
|
30213
|
+
index: index
|
|
30214
|
+
},
|
|
30215
|
+
item: m.items[index]
|
|
30216
|
+
};
|
|
30217
|
+
};
|
|
30218
|
+
var say = function say(kind, key) {
|
|
30219
|
+
var _me;
|
|
30220
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
30221
|
+
args[_key - 2] = arguments[_key];
|
|
30222
|
+
}
|
|
30223
|
+
return (_me = me()).announce.apply(_me, [kind, me().labelFor(key)].concat(args));
|
|
30224
|
+
};
|
|
30225
|
+
var aimAt = function aimAt(key, target) {
|
|
30226
|
+
var _origin = origin(key),
|
|
30227
|
+
from = _origin.from,
|
|
30228
|
+
item = _origin.item;
|
|
30229
|
+
var next = api.aim(from, item, target);
|
|
30230
|
+
var list = api.read(target.listId);
|
|
30231
|
+
if (next.allowed) say("movedToList", key, list.label, target.index + 1, list.items.length + 1);else say("refused", key, list.label);
|
|
30232
|
+
};
|
|
30233
|
+
return {
|
|
30234
|
+
// Pointer: true while the pointer is over another list of the group.
|
|
30235
|
+
over: function over(point, key) {
|
|
30236
|
+
var id = api.order().find(function (other) {
|
|
30237
|
+
return other !== me().listId && contains(api.read(other).node.getBoundingClientRect(), point);
|
|
30238
|
+
});
|
|
30239
|
+
if (id === undefined) {
|
|
30240
|
+
api.clear();
|
|
30241
|
+
return false;
|
|
30242
|
+
}
|
|
30243
|
+
var _origin2 = origin(key),
|
|
30244
|
+
from = _origin2.from,
|
|
30245
|
+
item = _origin2.item;
|
|
30246
|
+
api.aim(from, item, {
|
|
30247
|
+
listId: id,
|
|
30248
|
+
index: indexAt(api.read(id), point)
|
|
30249
|
+
});
|
|
30250
|
+
return true;
|
|
30251
|
+
},
|
|
30252
|
+
// Pointer drop: true when the drop was handled here (moved, or refused and dropped nowhere).
|
|
30253
|
+
release: function release() {
|
|
30254
|
+
var c = api.current();
|
|
30255
|
+
if (!c) return false;
|
|
30256
|
+
if (c.allowed) api.drop(c);else api.clear();
|
|
30257
|
+
return true;
|
|
30258
|
+
},
|
|
30259
|
+
// Keyboard: carry the item to the previous (-1) or next (1) list.
|
|
30260
|
+
step: function step(key, dir) {
|
|
30261
|
+
var m = me();
|
|
30262
|
+
var ids = api.order();
|
|
30263
|
+
var c = api.current();
|
|
30264
|
+
var nextId = ids[ids.indexOf(c ? c.target.listId : m.listId) + dir];
|
|
30265
|
+
if (nextId === undefined) return;
|
|
30266
|
+
m.setDraft(null);
|
|
30267
|
+
if (nextId === m.listId) {
|
|
30268
|
+
api.clear();
|
|
30269
|
+
say("moved", key, m.itemKeys.indexOf(key) + 1, m.itemKeys.length);
|
|
30270
|
+
return;
|
|
30271
|
+
}
|
|
30272
|
+
var index = c ? c.target.index : m.keys.indexOf(key);
|
|
30273
|
+
aimAt(key, {
|
|
30274
|
+
listId: nextId,
|
|
30275
|
+
index: Math.min(index, api.read(nextId).items.length)
|
|
30276
|
+
});
|
|
30277
|
+
},
|
|
30278
|
+
// Keyboard: move within the target list; false when the item is still in its own list.
|
|
30279
|
+
nudge: function nudge(key, delta) {
|
|
30280
|
+
var c = api.current();
|
|
30281
|
+
if (!c) return false;
|
|
30282
|
+
var size = api.read(c.target.listId).items.length;
|
|
30283
|
+
var index = Math.max(0, Math.min(size, c.target.index + delta));
|
|
30284
|
+
if (index !== c.target.index) aimAt(key, {
|
|
30285
|
+
listId: c.target.listId,
|
|
30286
|
+
index: index
|
|
30287
|
+
});
|
|
30288
|
+
return true;
|
|
30289
|
+
},
|
|
30290
|
+
// Keyboard drop: "dropped", "refused" (keep carrying) or false (in-list drop).
|
|
30291
|
+
drop: function drop(key) {
|
|
30292
|
+
var c = api.current();
|
|
30293
|
+
if (!c) return false;
|
|
30294
|
+
var list = api.read(c.target.listId);
|
|
30295
|
+
if (!c.allowed) {
|
|
30296
|
+
say("refused", key, list.label);
|
|
30297
|
+
return "refused";
|
|
30298
|
+
}
|
|
30299
|
+
api.drop(c, {
|
|
30300
|
+
listId: c.target.listId,
|
|
30301
|
+
key: list.getKey(c.item, c.target.index)
|
|
30302
|
+
});
|
|
30303
|
+
say("droppedInList", key, list.label, c.target.index + 1, list.items.length + 1);
|
|
30304
|
+
return "dropped";
|
|
30305
|
+
},
|
|
30306
|
+
cancel: function cancel() {
|
|
30307
|
+
return api.clear();
|
|
30308
|
+
}
|
|
30309
|
+
};
|
|
30310
|
+
}
|
|
30311
|
+
/**
|
|
30312
|
+
* Wires one Sortable into the surrounding SortableGroup (if any). Outside a
|
|
30313
|
+
* group, or without an `id`, it returns `{ cross: undefined }` and the list
|
|
30314
|
+
* behaves exactly like a standalone Sortable.
|
|
30315
|
+
*/
|
|
30316
|
+
function useSortableGroupMember(options) {
|
|
30317
|
+
var _group$api;
|
|
30318
|
+
var group = useContext(SortableGroupContext);
|
|
30319
|
+
var latest = useLatestRef$1(options);
|
|
30320
|
+
var listId = options.listId,
|
|
30321
|
+
itemKeys = options.itemKeys,
|
|
30322
|
+
nodeFor = options.nodeFor;
|
|
30323
|
+
var api = listId == null ? null : (_group$api = group === null || group === void 0 ? void 0 : group.api) !== null && _group$api !== void 0 ? _group$api : null;
|
|
30324
|
+
useEffect(function () {
|
|
30325
|
+
return api ? api.register(listId, function () {
|
|
30326
|
+
return _objectSpread$g(_objectSpread$g({}, latest.current), {}, {
|
|
30327
|
+
node: latest.current.listRef.current
|
|
30328
|
+
});
|
|
30329
|
+
}) : undefined;
|
|
30330
|
+
}, [api, listId, latest]);
|
|
30331
|
+
var cross = useMemo(function () {
|
|
30332
|
+
return api ? makeCross(api, latest) : undefined;
|
|
30333
|
+
}, [api, latest]);
|
|
30334
|
+
// After a keyboard drop the moved item mounts here; keep focus on it.
|
|
30335
|
+
var signature = itemKeys.join("\0");
|
|
30336
|
+
useIsomorphicLayoutEffect$2(function () {
|
|
30337
|
+
var pending = api === null || api === void 0 ? void 0 : api.pendingFocus();
|
|
30338
|
+
if (!pending || pending.listId !== listId) return;
|
|
30339
|
+
var node = nodeFor(pending.key);
|
|
30340
|
+
if (node) {
|
|
30341
|
+
api.clearFocus();
|
|
30342
|
+
node.focus();
|
|
30343
|
+
}
|
|
30344
|
+
}, [api, listId, signature, nodeFor]);
|
|
30345
|
+
var carry = api ? group.carry : null;
|
|
30346
|
+
return {
|
|
30347
|
+
cross: cross,
|
|
30348
|
+
// Where another list's item would land in this list.
|
|
30349
|
+
incoming: carry && carry.target.listId === listId ? {
|
|
30350
|
+
index: carry.target.index,
|
|
30351
|
+
allowed: carry.allowed
|
|
30352
|
+
} : null,
|
|
30353
|
+
// This list's item currently aimed at another list.
|
|
30354
|
+
outgoing: carry && carry.from.listId === listId ? carry : null
|
|
30355
|
+
};
|
|
30356
|
+
}
|
|
30357
|
+
|
|
30358
|
+
var _excluded$b = ["onMove", "canDrop", "className", "children"];
|
|
30359
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30360
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30361
|
+
/**
|
|
30362
|
+
* Connects several `<Sortable id="…">` lists so items can move between them
|
|
30363
|
+
* (pointer drag, or the cross-axis arrow keys while an item is picked up).
|
|
30364
|
+
* `canDrop(item, target, from)` is asked before a target is shown as droppable;
|
|
30365
|
+
* a refused target is marked as such and dropping there does nothing.
|
|
30366
|
+
*/
|
|
30367
|
+
var SortableGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
30368
|
+
var onMove = _ref.onMove,
|
|
30369
|
+
canDrop = _ref.canDrop,
|
|
30370
|
+
className = _ref.className,
|
|
30371
|
+
children = _ref.children,
|
|
30372
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$b);
|
|
30373
|
+
var value = useSortableGroupState({
|
|
30374
|
+
onMove: onMove,
|
|
30375
|
+
canDrop: canDrop
|
|
30376
|
+
});
|
|
30377
|
+
return jsx(SortableGroupContext.Provider, {
|
|
30378
|
+
value: value,
|
|
30379
|
+
children: jsx("div", _objectSpread$f(_objectSpread$f({
|
|
30380
|
+
ref: ref,
|
|
30381
|
+
className: cn(className),
|
|
30382
|
+
"data-sortable-group": ""
|
|
30383
|
+
}, rest), {}, {
|
|
30384
|
+
children: children
|
|
30385
|
+
}))
|
|
30386
|
+
});
|
|
30387
|
+
});
|
|
30388
|
+
SortableGroup.displayName = "SortableGroup";
|
|
30389
|
+
/** Where an item from another list would land; styled by whether `canDrop` allows it. */
|
|
30390
|
+
function SortablePlaceholder(_ref2) {
|
|
30391
|
+
var Tag = _ref2.as,
|
|
30392
|
+
allowed = _ref2.allowed;
|
|
30393
|
+
return jsx(Tag, {
|
|
30394
|
+
"aria-hidden": "true",
|
|
30395
|
+
"data-sortable-placeholder": allowed ? "allowed" : "refused",
|
|
30396
|
+
className: cn("min-h-10 rounded-md border-2 border-dashed", allowed ? "border-primary-500 bg-primary-50 dark:bg-primary-950/40" : "cursor-not-allowed border-error-500 bg-error-50 opacity-60 dark:bg-error-950/40")
|
|
30397
|
+
});
|
|
30398
|
+
}
|
|
30399
|
+
|
|
30028
30400
|
var _excluded$a = ["items", "onReorder", "renderItem", "getKey", "getItemLabel", "disabled", "handle", "orientation", "as", "itemClassName", "messages", "className"];
|
|
30029
30401
|
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30030
30402
|
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), true).forEach(function (r) { _defineProperty$4(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30031
30403
|
var useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
30032
|
-
var
|
|
30033
|
-
var
|
|
30034
|
-
|
|
30035
|
-
|
|
30036
|
-
|
|
30037
|
-
|
|
30038
|
-
|
|
30039
|
-
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
|
|
30043
|
-
|
|
30044
|
-
|
|
30045
|
-
|
|
30046
|
-
|
|
30047
|
-
|
|
30048
|
-
|
|
30049
|
-
|
|
30050
|
-
|
|
30051
|
-
|
|
30052
|
-
|
|
30053
|
-
|
|
30054
|
-
getKey = _ref4$getKey === void 0 ? defaultGetKey : _ref4$getKey,
|
|
30055
|
-
_ref4$getItemLabel = _ref4.getItemLabel,
|
|
30056
|
-
getItemLabel = _ref4$getItemLabel === void 0 ? defaultGetItemLabel : _ref4$getItemLabel,
|
|
30057
|
-
_ref4$disabled = _ref4.disabled,
|
|
30058
|
-
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
30059
|
-
_ref4$handle = _ref4.handle,
|
|
30060
|
-
handle = _ref4$handle === void 0 ? false : _ref4$handle,
|
|
30061
|
-
_ref4$orientation = _ref4.orientation,
|
|
30062
|
-
orientation = _ref4$orientation === void 0 ? "vertical" : _ref4$orientation,
|
|
30063
|
-
_ref4$as = _ref4.as,
|
|
30064
|
-
List = _ref4$as === void 0 ? "ul" : _ref4$as,
|
|
30065
|
-
itemClassName = _ref4.itemClassName,
|
|
30066
|
-
messages = _ref4.messages,
|
|
30067
|
-
className = _ref4.className,
|
|
30068
|
-
rest = _objectWithoutProperties$1(_ref4, _excluded$a);
|
|
30404
|
+
var Sortable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
30405
|
+
var _rest$ariaLabel;
|
|
30406
|
+
var _ref$items = _ref.items,
|
|
30407
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
30408
|
+
onReorder = _ref.onReorder,
|
|
30409
|
+
renderItem = _ref.renderItem,
|
|
30410
|
+
_ref$getKey = _ref.getKey,
|
|
30411
|
+
getKey = _ref$getKey === void 0 ? defaultGetKey : _ref$getKey,
|
|
30412
|
+
_ref$getItemLabel = _ref.getItemLabel,
|
|
30413
|
+
getItemLabel = _ref$getItemLabel === void 0 ? defaultGetItemLabel : _ref$getItemLabel,
|
|
30414
|
+
_ref$disabled = _ref.disabled,
|
|
30415
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
30416
|
+
_ref$handle = _ref.handle,
|
|
30417
|
+
handle = _ref$handle === void 0 ? false : _ref$handle,
|
|
30418
|
+
_ref$orientation = _ref.orientation,
|
|
30419
|
+
orientation = _ref$orientation === void 0 ? "vertical" : _ref$orientation,
|
|
30420
|
+
_ref$as = _ref.as,
|
|
30421
|
+
List = _ref$as === void 0 ? "ul" : _ref$as,
|
|
30422
|
+
itemClassName = _ref.itemClassName,
|
|
30423
|
+
messages = _ref.messages,
|
|
30424
|
+
className = _ref.className,
|
|
30425
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$a);
|
|
30069
30426
|
var instructionsId = "sortable-instructions-".concat(useId());
|
|
30070
30427
|
var text = useMemo(function () {
|
|
30071
30428
|
return _objectSpread$e(_objectSpread$e({}, DEFAULT_SORTABLE_MESSAGES), messages);
|
|
@@ -30080,6 +30437,10 @@ var Sortable = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
30080
30437
|
announcement = _useState4[0],
|
|
30081
30438
|
setAnnouncement = _useState4[1];
|
|
30082
30439
|
var nodes = useRef(new Map());
|
|
30440
|
+
var listRef = useRef(null);
|
|
30441
|
+
var setListRef = useCallback(function (node) {
|
|
30442
|
+
return setRefs$1(node, listRef, ref);
|
|
30443
|
+
}, [ref]);
|
|
30083
30444
|
var itemKeys = items.map(function (item, i) {
|
|
30084
30445
|
return getKey(item, i);
|
|
30085
30446
|
});
|
|
@@ -30113,13 +30474,32 @@ var Sortable = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
30113
30474
|
var nodeFor = useCallback(function (key) {
|
|
30114
30475
|
return nodes.current.get(key);
|
|
30115
30476
|
}, []);
|
|
30477
|
+
// Inside a <SortableGroup>, `id` names this list; `cross` handles moves to other lists.
|
|
30478
|
+
var _useSortableGroupMemb = useSortableGroupMember({
|
|
30479
|
+
listId: rest.id,
|
|
30480
|
+
label: (_rest$ariaLabel = rest["aria-label"]) !== null && _rest$ariaLabel !== void 0 ? _rest$ariaLabel : String(rest.id),
|
|
30481
|
+
items: items,
|
|
30482
|
+
itemKeys: itemKeys,
|
|
30483
|
+
keys: keys,
|
|
30484
|
+
getKey: getKey,
|
|
30485
|
+
nodeFor: nodeFor,
|
|
30486
|
+
listRef: listRef,
|
|
30487
|
+
orientation: axis,
|
|
30488
|
+
setDraft: setDraft,
|
|
30489
|
+
announce: announce,
|
|
30490
|
+
labelFor: labelFor
|
|
30491
|
+
}),
|
|
30492
|
+
cross = _useSortableGroupMemb.cross,
|
|
30493
|
+
incoming = _useSortableGroupMemb.incoming,
|
|
30494
|
+
outgoing = _useSortableGroupMemb.outgoing;
|
|
30116
30495
|
var keyboard = useSortableKeyboard({
|
|
30117
30496
|
keys: keys,
|
|
30118
30497
|
setDraft: setDraft,
|
|
30119
30498
|
commit: commit,
|
|
30120
30499
|
announce: announce,
|
|
30121
30500
|
labelFor: labelFor,
|
|
30122
|
-
orientation: axis
|
|
30501
|
+
orientation: axis,
|
|
30502
|
+
cross: cross
|
|
30123
30503
|
});
|
|
30124
30504
|
var pointer = useSortablePointer({
|
|
30125
30505
|
keys: keys,
|
|
@@ -30127,7 +30507,8 @@ var Sortable = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
30127
30507
|
commit: commit,
|
|
30128
30508
|
nodeFor: nodeFor,
|
|
30129
30509
|
orientation: axis,
|
|
30130
|
-
disabled: disabled
|
|
30510
|
+
disabled: disabled,
|
|
30511
|
+
cross: cross
|
|
30131
30512
|
});
|
|
30132
30513
|
// Moving DOM nodes can drop focus; keep it on the item being carried.
|
|
30133
30514
|
useIsomorphicLayoutEffect$1(function () {
|
|
@@ -30146,24 +30527,30 @@ var Sortable = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
30146
30527
|
var isNativeList = List === "ul" || List === "ol";
|
|
30147
30528
|
var ItemTag = isNativeList ? "li" : "div";
|
|
30148
30529
|
return jsxs(Fragment, {
|
|
30149
|
-
children: [
|
|
30150
|
-
ref:
|
|
30530
|
+
children: [jsxs(List, _objectSpread$e(_objectSpread$e({
|
|
30531
|
+
ref: setListRef,
|
|
30151
30532
|
className: cn("flex", axis === "horizontal" ? "flex-row gap-2" : "flex-col gap-2", className),
|
|
30152
30533
|
"data-orientation": axis,
|
|
30534
|
+
"data-drop-target": incoming ? incoming.allowed ? "allowed" : "refused" : undefined,
|
|
30153
30535
|
role: isNativeList ? undefined : "list"
|
|
30154
30536
|
}, rest), {}, {
|
|
30155
|
-
children: keys.
|
|
30537
|
+
children: [keys.flatMap(function (key, index) {
|
|
30156
30538
|
var _byKey$get = byKey.get(key),
|
|
30157
30539
|
item = _byKey$get.item,
|
|
30158
30540
|
originalIndex = _byKey$get.index;
|
|
30159
30541
|
var isGrabbed = keyboard.grabbed === key;
|
|
30160
30542
|
var isDragging = pointer.dragging === key;
|
|
30543
|
+
var isLeaving = outgoing !== null && (isGrabbed || isDragging);
|
|
30161
30544
|
var startDrag = disabled ? undefined : pointer.startFor(key);
|
|
30162
30545
|
// Whole-item drags wait for a long-press on touch so the page still scrolls.
|
|
30163
30546
|
var startItemDrag = disabled || handle ? undefined : pointer.startFor(key, {
|
|
30164
30547
|
longPress: true
|
|
30165
30548
|
});
|
|
30166
|
-
|
|
30549
|
+
var placeholder = (incoming === null || incoming === void 0 ? void 0 : incoming.index) === index ? [jsx(SortablePlaceholder, {
|
|
30550
|
+
as: ItemTag,
|
|
30551
|
+
allowed: incoming.allowed
|
|
30552
|
+
}, "dt-sortable-placeholder")] : [];
|
|
30553
|
+
return placeholder.concat(jsx(ItemTag, {
|
|
30167
30554
|
ref: function ref(node) {
|
|
30168
30555
|
if (node) nodes.current.set(key, node);else nodes.current["delete"](key);
|
|
30169
30556
|
},
|
|
@@ -30173,12 +30560,13 @@ var Sortable = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
30173
30560
|
role: isNativeList ? undefined : "listitem",
|
|
30174
30561
|
"data-dragging": isDragging || undefined,
|
|
30175
30562
|
"data-grabbed": isGrabbed || undefined,
|
|
30563
|
+
"data-leaving": isLeaving ? outgoing.allowed ? "allowed" : "refused" : undefined,
|
|
30176
30564
|
onKeyDown: disabled ? undefined : keyboard.keyDownFor(key),
|
|
30177
30565
|
onBlur: function onBlur(e) {
|
|
30178
30566
|
if (isGrabbed && e.relatedTarget && !e.currentTarget.contains(e.relatedTarget)) keyboard.cancel();
|
|
30179
30567
|
},
|
|
30180
30568
|
onPointerDown: startItemDrag,
|
|
30181
|
-
className: cn("rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:focus:ring-offset-gray-900", !disabled && !handle && "cursor-grab select-none [-webkit-touch-callout:none]", (isGrabbed || isDragging) && "relative z-10 shadow-lg ring-2 ring-primary-500 opacity-90", itemClassName),
|
|
30569
|
+
className: cn("rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:focus:ring-offset-gray-900", !disabled && !handle && "cursor-grab select-none [-webkit-touch-callout:none]", (isGrabbed || isDragging) && "relative z-10 shadow-lg ring-2 ring-primary-500 opacity-90", isLeaving && (outgoing.allowed ? "opacity-50" : "cursor-not-allowed ring-error-500 opacity-50"), itemClassName),
|
|
30182
30570
|
children: renderItem ? renderItem(item, {
|
|
30183
30571
|
index: index,
|
|
30184
30572
|
originalIndex: originalIndex,
|
|
@@ -30196,12 +30584,15 @@ var Sortable = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
|
30196
30584
|
return moveBy(originalIndex, 1);
|
|
30197
30585
|
}
|
|
30198
30586
|
}) : labelFor(key)
|
|
30199
|
-
}, key);
|
|
30200
|
-
})
|
|
30587
|
+
}, key));
|
|
30588
|
+
}), incoming && incoming.index >= keys.length && jsx(SortablePlaceholder, {
|
|
30589
|
+
as: ItemTag,
|
|
30590
|
+
allowed: incoming.allowed
|
|
30591
|
+
})]
|
|
30201
30592
|
})), jsx("span", {
|
|
30202
30593
|
id: instructionsId,
|
|
30203
30594
|
className: "sr-only",
|
|
30204
|
-
children: text.instructions
|
|
30595
|
+
children: cross ? "".concat(text.instructions, " ").concat(text.groupInstructions) : text.instructions
|
|
30205
30596
|
}), jsx("span", {
|
|
30206
30597
|
role: "status",
|
|
30207
30598
|
"aria-live": "assertive",
|
|
@@ -39942,4 +40333,4 @@ var StoreProvider = function StoreProvider(_ref) {
|
|
|
39942
40333
|
});
|
|
39943
40334
|
};
|
|
39944
40335
|
|
|
39945
|
-
export { Accordion, ActionSheet, Alert, AppShell, Avatar, AvatarGroup, Badge, BottomActionBar, Breadcrumbs, Button, Card, Carousel, Checkbox, ColorPicker, Condition, ConfirmDialog, DatePicker, DateRangePicker, Dialog, Drawer, EmitterClass as Emitter, EmptyState, ErrorState, FileUpload, FootNav, Form, Helpers, Input, Loader, LoadingState, LocationPicker, Navbar, PageHeader, Pagination, Popover, PriceRangePicker, ProgressBar, PullToRefresh, Radio, Rate, RoundedTag, SearchField, SegmentedControl, Select, Sheet, Sidebar, Skeleton, Slider, Sortable, SpeechToText, StatCard, StatusPill, Stepper, StoreProvider, SwipeableListItem, Switch, Table, Tabs, TextToSpeech, Textarea, ThemeProvider, ThreeDotPopoverSimple as ThreeDotPopover, Toast, ToastContainer, ToastProvider, Tooltip, Tour, cn, useApi, useHaptics, useMixins, useTheme, useToast };
|
|
40336
|
+
export { Accordion, ActionSheet, Alert, AppShell, Avatar, AvatarGroup, Badge, BottomActionBar, Breadcrumbs, Button, Card, Carousel, Checkbox, ColorPicker, Condition, ConfirmDialog, DatePicker, DateRangePicker, Dialog, Drawer, EmitterClass as Emitter, EmptyState, ErrorState, FileUpload, FootNav, Form, Helpers, Input, Loader, LoadingState, LocationPicker, Navbar, PageHeader, Pagination, Popover, PriceRangePicker, ProgressBar, PullToRefresh, Radio, Rate, RoundedTag, SearchField, SegmentedControl, Select, Sheet, Sidebar, Skeleton, Slider, Sortable, SortableGroup, SpeechToText, StatCard, StatusPill, Stepper, StoreProvider, SwipeableListItem, Switch, Table, Tabs, TextToSpeech, Textarea, ThemeProvider, ThreeDotPopoverSimple as ThreeDotPopover, Toast, ToastContainer, ToastProvider, Tooltip, Tour, cn, useApi, useHaptics, useMixins, useTheme, useToast };
|