@marigold/components 11.4.1 → 11.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +125 -17
- package/dist/index.d.ts +125 -17
- package/dist/index.js +1063 -1021
- package/dist/index.mjs +904 -862
- package/package.json +24 -24
package/dist/index.mjs
CHANGED
|
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
|
|
|
206
206
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
207
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
208
208
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
209
|
+
var Fragment13 = REACT_FRAGMENT_TYPE;
|
|
210
210
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
211
|
var Memo = REACT_MEMO_TYPE;
|
|
212
212
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
|
|
|
265
265
|
exports.ContextProvider = ContextProvider;
|
|
266
266
|
exports.Element = Element2;
|
|
267
267
|
exports.ForwardRef = ForwardRef;
|
|
268
|
-
exports.Fragment =
|
|
268
|
+
exports.Fragment = Fragment13;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo;
|
|
271
271
|
exports.Portal = Portal;
|
|
@@ -1058,7 +1058,7 @@ var HelpText = ({
|
|
|
1058
1058
|
return Array.isArray(messages) ? messages.map((msg, idx) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
1059
1059
|
/* @__PURE__ */ jsx8(Icon, { className: classNames3.icon }),
|
|
1060
1060
|
msg
|
|
1061
|
-
] }, idx)) : /* @__PURE__ */ jsxs3("div", { className: "flex items-
|
|
1061
|
+
] }, idx)) : /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-start gap-1", children: [
|
|
1062
1062
|
/* @__PURE__ */ jsx8(Icon, { className: classNames3.icon }),
|
|
1063
1063
|
messages
|
|
1064
1064
|
] });
|
|
@@ -1089,7 +1089,7 @@ var _Label = ({ size: size2, variant, children, ...props }) => {
|
|
|
1089
1089
|
Label,
|
|
1090
1090
|
{
|
|
1091
1091
|
...props,
|
|
1092
|
-
className: cn5(classNames3.container, "flex w-[var(--labelWidth)]"),
|
|
1092
|
+
className: cn5(classNames3.container, "inline-flex w-[var(--labelWidth)]"),
|
|
1093
1093
|
style: createVar3({ labelWidth }),
|
|
1094
1094
|
children: [
|
|
1095
1095
|
children,
|
|
@@ -1957,9 +1957,9 @@ var _Checkbox = forwardRef14(
|
|
|
1957
1957
|
checked,
|
|
1958
1958
|
defaultChecked,
|
|
1959
1959
|
indeterminate,
|
|
1960
|
-
children,
|
|
1961
1960
|
variant,
|
|
1962
1961
|
size: size2,
|
|
1962
|
+
label,
|
|
1963
1963
|
...rest
|
|
1964
1964
|
}, ref) => {
|
|
1965
1965
|
const props = {
|
|
@@ -1998,7 +1998,7 @@ var _Checkbox = forwardRef14(
|
|
|
1998
1998
|
className: classNames3.checkbox
|
|
1999
1999
|
}
|
|
2000
2000
|
),
|
|
2001
|
-
children
|
|
2001
|
+
(props.children || label) && /* @__PURE__ */ jsx36("div", { className: classNames3.label, children: props.children || label })
|
|
2002
2002
|
] })
|
|
2003
2003
|
}
|
|
2004
2004
|
);
|
|
@@ -2104,31 +2104,48 @@ var Container = ({
|
|
|
2104
2104
|
|
|
2105
2105
|
// src/Dialog/Dialog.tsx
|
|
2106
2106
|
import {
|
|
2107
|
-
forwardRef as
|
|
2107
|
+
forwardRef as forwardRef18,
|
|
2108
2108
|
useContext as useContext9
|
|
2109
2109
|
} from "react";
|
|
2110
2110
|
import { Dialog, OverlayTriggerStateContext as OverlayTriggerStateContext2 } from "react-aria-components";
|
|
2111
|
-
import { cn as cn26, useClassNames as
|
|
2111
|
+
import { cn as cn26, useClassNames as useClassNames24 } from "@marigold/system";
|
|
2112
2112
|
|
|
2113
|
-
// src/
|
|
2113
|
+
// src/CloseButton/CloseButton.tsx
|
|
2114
2114
|
import { forwardRef as forwardRef15 } from "react";
|
|
2115
|
-
import {
|
|
2115
|
+
import { Button as Button5 } from "react-aria-components";
|
|
2116
|
+
import { useClassNames as useClassNames20 } from "@marigold/system";
|
|
2116
2117
|
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2117
|
-
var
|
|
2118
|
+
var CloseButton = forwardRef15(
|
|
2119
|
+
({ className, size: size2, variant, ...props }, ref) => {
|
|
2120
|
+
const classNames3 = useClassNames20({
|
|
2121
|
+
component: "CloseButton",
|
|
2122
|
+
className,
|
|
2123
|
+
size: size2,
|
|
2124
|
+
variant
|
|
2125
|
+
});
|
|
2126
|
+
return /* @__PURE__ */ jsx39(Button5, { ref, className: classNames3, ...props, children: /* @__PURE__ */ jsx39("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx39("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
2127
|
+
}
|
|
2128
|
+
);
|
|
2129
|
+
|
|
2130
|
+
// src/Overlay/Modal.tsx
|
|
2131
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
2132
|
+
import { Modal } from "react-aria-components";
|
|
2133
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2134
|
+
var _Modal = forwardRef16(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
2118
2135
|
const props = {
|
|
2119
2136
|
isOpen: open,
|
|
2120
2137
|
isDismissable: dismissable,
|
|
2121
2138
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
2122
2139
|
...rest
|
|
2123
2140
|
};
|
|
2124
|
-
return /* @__PURE__ */
|
|
2141
|
+
return /* @__PURE__ */ jsx40(
|
|
2125
2142
|
Underlay,
|
|
2126
2143
|
{
|
|
2127
2144
|
dismissable,
|
|
2128
2145
|
keyboardDismissable,
|
|
2129
2146
|
open,
|
|
2130
2147
|
variant: "modal",
|
|
2131
|
-
children: /* @__PURE__ */
|
|
2148
|
+
children: /* @__PURE__ */ jsx40(
|
|
2132
2149
|
Modal,
|
|
2133
2150
|
{
|
|
2134
2151
|
ref,
|
|
@@ -2142,7 +2159,7 @@ var _Modal = forwardRef15(({ open, dismissable, keyboardDismissable, ...rest },
|
|
|
2142
2159
|
});
|
|
2143
2160
|
|
|
2144
2161
|
// src/Overlay/NonModal.tsx
|
|
2145
|
-
import { forwardRef as
|
|
2162
|
+
import { forwardRef as forwardRef17, useContext as useContext8 } from "react";
|
|
2146
2163
|
import {
|
|
2147
2164
|
OverlayTriggerStateContext,
|
|
2148
2165
|
Provider
|
|
@@ -2231,7 +2248,7 @@ var useNonModal = ({ nonModalRef, keyboardDismissable = true }, state) => {
|
|
|
2231
2248
|
};
|
|
2232
2249
|
|
|
2233
2250
|
// src/Overlay/NonModal.tsx
|
|
2234
|
-
import { jsx as
|
|
2251
|
+
import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2235
2252
|
var NonModalInner = ({ state, isExiting, ...props }) => {
|
|
2236
2253
|
const { nonModalProps } = useNonModal(props, state);
|
|
2237
2254
|
const ref = props.nonModalRef;
|
|
@@ -2266,21 +2283,21 @@ var NonModalInner = ({ state, isExiting, ...props }) => {
|
|
|
2266
2283
|
"data-exiting": isExiting || void 0,
|
|
2267
2284
|
children: [
|
|
2268
2285
|
renderProps.children,
|
|
2269
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ jsx41(DismissButton, { onDismiss: state.close })
|
|
2270
2287
|
]
|
|
2271
2288
|
}
|
|
2272
2289
|
);
|
|
2273
|
-
return /* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ jsx41(
|
|
2274
2291
|
Overlay,
|
|
2275
2292
|
{
|
|
2276
2293
|
isExiting,
|
|
2277
2294
|
portalContainer,
|
|
2278
2295
|
disableFocusManagement: true,
|
|
2279
|
-
children: /* @__PURE__ */
|
|
2296
|
+
children: /* @__PURE__ */ jsx41(FocusScope, { restoreFocus: true, children: /* @__PURE__ */ jsx41(Provider, { values: [[OverlayTriggerStateContext, state]], children: overlay }) })
|
|
2280
2297
|
}
|
|
2281
2298
|
);
|
|
2282
2299
|
};
|
|
2283
|
-
var NonModal =
|
|
2300
|
+
var NonModal = forwardRef17(
|
|
2284
2301
|
({ open, ...rest }, ref) => {
|
|
2285
2302
|
const props = {
|
|
2286
2303
|
isOpen: open,
|
|
@@ -2295,7 +2312,7 @@ var NonModal = forwardRef16(
|
|
|
2295
2312
|
if (state && !state.isOpen && !isExiting || isSSR) {
|
|
2296
2313
|
return null;
|
|
2297
2314
|
}
|
|
2298
|
-
return /* @__PURE__ */
|
|
2315
|
+
return /* @__PURE__ */ jsx41(
|
|
2299
2316
|
NonModalInner,
|
|
2300
2317
|
{
|
|
2301
2318
|
...props,
|
|
@@ -2308,43 +2325,43 @@ var NonModal = forwardRef16(
|
|
|
2308
2325
|
);
|
|
2309
2326
|
|
|
2310
2327
|
// src/Dialog/DialogActions.tsx
|
|
2311
|
-
import { cn as cn23, useClassNames as
|
|
2312
|
-
import { jsx as
|
|
2328
|
+
import { cn as cn23, useClassNames as useClassNames21 } from "@marigold/system";
|
|
2329
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2313
2330
|
var DialogActions = ({ variant, size: size2, children }) => {
|
|
2314
|
-
const classNames3 =
|
|
2315
|
-
return /* @__PURE__ */
|
|
2331
|
+
const classNames3 = useClassNames21({ component: "Dialog", variant, size: size2 });
|
|
2332
|
+
return /* @__PURE__ */ jsx42("div", { className: cn23("[grid-area:actions]", classNames3.actions), children });
|
|
2316
2333
|
};
|
|
2317
2334
|
|
|
2318
2335
|
// src/Dialog/DialogContent.tsx
|
|
2319
|
-
import { cn as cn24, useClassNames as
|
|
2320
|
-
import { jsx as
|
|
2336
|
+
import { cn as cn24, useClassNames as useClassNames22 } from "@marigold/system";
|
|
2337
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2321
2338
|
var DialogContent = ({
|
|
2322
2339
|
variant,
|
|
2323
2340
|
size: size2,
|
|
2324
2341
|
children
|
|
2325
2342
|
}) => {
|
|
2326
|
-
const classNames3 =
|
|
2327
|
-
return /* @__PURE__ */
|
|
2343
|
+
const classNames3 = useClassNames22({ component: "Dialog", variant, size: size2 });
|
|
2344
|
+
return /* @__PURE__ */ jsx43("div", { className: cn24("[grid-area:content]", classNames3.content), children });
|
|
2328
2345
|
};
|
|
2329
2346
|
|
|
2330
2347
|
// src/Dialog/DialogTitle.tsx
|
|
2331
2348
|
import { Header as Header2, Heading as Heading2 } from "react-aria-components";
|
|
2332
|
-
import { cn as cn25, useClassNames as
|
|
2333
|
-
import { jsx as
|
|
2349
|
+
import { cn as cn25, useClassNames as useClassNames23 } from "@marigold/system";
|
|
2350
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2334
2351
|
var DialogTitle = ({ variant, size: size2, children }) => {
|
|
2335
|
-
const classNames3 =
|
|
2352
|
+
const classNames3 = useClassNames23({
|
|
2336
2353
|
component: "Dialog",
|
|
2337
2354
|
variant,
|
|
2338
2355
|
size: size2
|
|
2339
2356
|
});
|
|
2340
|
-
return /* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ jsx44(Header2, { className: cn25("[grid-area:title]", classNames3.header), children: /* @__PURE__ */ jsx44(Heading2, { slot: "title", className: classNames3.title, children }) });
|
|
2341
2358
|
};
|
|
2342
2359
|
|
|
2343
2360
|
// src/Dialog/DialogTrigger.tsx
|
|
2344
2361
|
import { createContext as createContext6 } from "react";
|
|
2345
2362
|
import { DialogTrigger } from "react-aria-components";
|
|
2346
2363
|
import { PressResponder } from "@react-aria/interactions";
|
|
2347
|
-
import { jsx as
|
|
2364
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2348
2365
|
var DialogContext = createContext6({});
|
|
2349
2366
|
var _DialogTrigger = ({
|
|
2350
2367
|
open,
|
|
@@ -2359,37 +2376,15 @@ var _DialogTrigger = ({
|
|
|
2359
2376
|
isKeyboardDismissDisabled: !keyboardDismissable,
|
|
2360
2377
|
...rest
|
|
2361
2378
|
};
|
|
2362
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ jsx45(DialogContext.Provider, { value: props, children: /* @__PURE__ */ jsx45(DialogTrigger, { ...props, children: /* @__PURE__ */ jsx45(PressResponder, { isPressed: false, children: props.children }) }) });
|
|
2363
2380
|
};
|
|
2364
2381
|
|
|
2365
2382
|
// src/Dialog/Dialog.tsx
|
|
2366
|
-
import { jsx as
|
|
2367
|
-
var
|
|
2368
|
-
const ctx = useContext9(OverlayTriggerStateContext2);
|
|
2369
|
-
return /* @__PURE__ */ jsx45(
|
|
2370
|
-
"button",
|
|
2371
|
-
{
|
|
2372
|
-
className: cn26(
|
|
2373
|
-
"h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
|
|
2374
|
-
className
|
|
2375
|
-
),
|
|
2376
|
-
onClick: ctx == null ? void 0 : ctx.close,
|
|
2377
|
-
slot: "dismiss-button",
|
|
2378
|
-
children: /* @__PURE__ */ jsx45("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx45(
|
|
2379
|
-
"path",
|
|
2380
|
-
{
|
|
2381
|
-
fillRule: "evenodd",
|
|
2382
|
-
clipRule: "evenodd",
|
|
2383
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
2384
|
-
}
|
|
2385
|
-
) })
|
|
2386
|
-
}
|
|
2387
|
-
);
|
|
2388
|
-
};
|
|
2389
|
-
var _Dialog = forwardRef17(
|
|
2383
|
+
import { jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2384
|
+
var _Dialog = forwardRef18(
|
|
2390
2385
|
(props, ref) => {
|
|
2391
2386
|
var _a;
|
|
2392
|
-
const classNames3 =
|
|
2387
|
+
const classNames3 = useClassNames24({
|
|
2393
2388
|
component: "Dialog",
|
|
2394
2389
|
variant: props.variant,
|
|
2395
2390
|
size: props.size
|
|
@@ -2400,7 +2395,7 @@ var _Dialog = forwardRef17(
|
|
|
2400
2395
|
close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
|
|
2401
2396
|
}
|
|
2402
2397
|
}) : props.children;
|
|
2403
|
-
return /* @__PURE__ */
|
|
2398
|
+
return /* @__PURE__ */ jsx46(
|
|
2404
2399
|
_Modal,
|
|
2405
2400
|
{
|
|
2406
2401
|
dismissable: isDismissable,
|
|
@@ -2417,7 +2412,13 @@ var _Dialog = forwardRef17(
|
|
|
2417
2412
|
classNames3.container
|
|
2418
2413
|
),
|
|
2419
2414
|
children: [
|
|
2420
|
-
props.closeButton && /* @__PURE__ */
|
|
2415
|
+
props.closeButton && /* @__PURE__ */ jsx46(
|
|
2416
|
+
CloseButton,
|
|
2417
|
+
{
|
|
2418
|
+
className: classNames3.closeButton,
|
|
2419
|
+
onPress: state == null ? void 0 : state.close
|
|
2420
|
+
}
|
|
2421
|
+
),
|
|
2421
2422
|
children
|
|
2422
2423
|
]
|
|
2423
2424
|
}
|
|
@@ -2433,33 +2434,205 @@ _Dialog.Actions = DialogActions;
|
|
|
2433
2434
|
|
|
2434
2435
|
// src/Divider/Divider.tsx
|
|
2435
2436
|
import { Separator } from "react-aria-components";
|
|
2436
|
-
import { cn as cn27, useClassNames as
|
|
2437
|
-
import { jsx as
|
|
2437
|
+
import { cn as cn27, useClassNames as useClassNames25 } from "@marigold/system";
|
|
2438
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2438
2439
|
var _Divider = ({ variant, ...props }) => {
|
|
2439
|
-
const classNames3 =
|
|
2440
|
-
return /* @__PURE__ */
|
|
2440
|
+
const classNames3 = useClassNames25({ component: "Divider", variant });
|
|
2441
|
+
return /* @__PURE__ */ jsx47(Separator, { className: cn27("border-none", classNames3), ...props });
|
|
2441
2442
|
};
|
|
2442
2443
|
|
|
2444
|
+
// src/Drawer/Drawer.tsx
|
|
2445
|
+
import { useContext as useContext11, useRef } from "react";
|
|
2446
|
+
import { Dialog as Dialog2, OverlayTriggerStateContext as OverlayTriggerStateContext3 } from "react-aria-components";
|
|
2447
|
+
import { useLandmark } from "@react-aria/landmark";
|
|
2448
|
+
import { cn as cn32, useClassNames as useClassNames29, useSmallScreen as useSmallScreen3 } from "@marigold/system";
|
|
2449
|
+
|
|
2450
|
+
// src/Drawer/Context.tsx
|
|
2451
|
+
import { createContext as createContext7, useContext as useContext10 } from "react";
|
|
2452
|
+
var DrawerContext = createContext7({
|
|
2453
|
+
variant: void 0,
|
|
2454
|
+
size: void 0
|
|
2455
|
+
});
|
|
2456
|
+
var useDrawerContext = () => useContext10(DrawerContext);
|
|
2457
|
+
|
|
2458
|
+
// src/Drawer/DrawerActions.tsx
|
|
2459
|
+
import { cn as cn28, useClassNames as useClassNames26 } from "@marigold/system";
|
|
2460
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2461
|
+
var DrawerActions = ({ variant, size: size2, children }) => {
|
|
2462
|
+
const ctx = useDrawerContext();
|
|
2463
|
+
const classNames3 = useClassNames26({
|
|
2464
|
+
component: "Drawer",
|
|
2465
|
+
variant: variant != null ? variant : ctx.variant,
|
|
2466
|
+
size: size2 != null ? size2 : ctx.size
|
|
2467
|
+
});
|
|
2468
|
+
return /* @__PURE__ */ jsx48(
|
|
2469
|
+
"div",
|
|
2470
|
+
{
|
|
2471
|
+
className: cn28("[grid-area:actions]", classNames3.actions),
|
|
2472
|
+
style: { "--i": 2 },
|
|
2473
|
+
children
|
|
2474
|
+
}
|
|
2475
|
+
);
|
|
2476
|
+
};
|
|
2477
|
+
|
|
2478
|
+
// src/Drawer/DrawerContent.tsx
|
|
2479
|
+
import { cn as cn29, useClassNames as useClassNames27 } from "@marigold/system";
|
|
2480
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2481
|
+
var DrawerContent = ({
|
|
2482
|
+
variant,
|
|
2483
|
+
size: size2,
|
|
2484
|
+
children
|
|
2485
|
+
}) => {
|
|
2486
|
+
const ctx = useDrawerContext();
|
|
2487
|
+
const classNames3 = useClassNames27({
|
|
2488
|
+
component: "Drawer",
|
|
2489
|
+
variant: variant != null ? variant : ctx.variant,
|
|
2490
|
+
size: size2 != null ? size2 : ctx.size
|
|
2491
|
+
});
|
|
2492
|
+
return /* @__PURE__ */ jsx49(
|
|
2493
|
+
"div",
|
|
2494
|
+
{
|
|
2495
|
+
className: cn29("[grid-area:content]", classNames3.content),
|
|
2496
|
+
style: { "--i": 1 },
|
|
2497
|
+
children
|
|
2498
|
+
}
|
|
2499
|
+
);
|
|
2500
|
+
};
|
|
2501
|
+
|
|
2502
|
+
// src/Drawer/DrawerModal.tsx
|
|
2503
|
+
import { cn as cn30, useSmallScreen as useSmallScreen2 } from "@marigold/system";
|
|
2504
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2505
|
+
var DrawerModal = ({
|
|
2506
|
+
children,
|
|
2507
|
+
className,
|
|
2508
|
+
...props
|
|
2509
|
+
}) => {
|
|
2510
|
+
const isSmallScreen = useSmallScreen2();
|
|
2511
|
+
return isSmallScreen ? /* @__PURE__ */ jsx50(_Modal, { children }) : /* @__PURE__ */ jsx50(
|
|
2512
|
+
NonModal,
|
|
2513
|
+
{
|
|
2514
|
+
...props,
|
|
2515
|
+
className: cn30("fixed top-0 right-0 bottom-0", className),
|
|
2516
|
+
children
|
|
2517
|
+
}
|
|
2518
|
+
);
|
|
2519
|
+
};
|
|
2520
|
+
|
|
2521
|
+
// src/Drawer/DrawerTitle.tsx
|
|
2522
|
+
import { Header as Header3, Heading as Heading3 } from "react-aria-components";
|
|
2523
|
+
import { cn as cn31, useClassNames as useClassNames28 } from "@marigold/system";
|
|
2524
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2525
|
+
var DrawerTitle = ({ variant, size: size2, children }) => {
|
|
2526
|
+
const ctx = useDrawerContext();
|
|
2527
|
+
const classNames3 = useClassNames28({
|
|
2528
|
+
component: "Drawer",
|
|
2529
|
+
variant: variant != null ? variant : ctx.variant,
|
|
2530
|
+
size: size2 != null ? size2 : ctx.size
|
|
2531
|
+
});
|
|
2532
|
+
return /* @__PURE__ */ jsx51(
|
|
2533
|
+
Header3,
|
|
2534
|
+
{
|
|
2535
|
+
className: cn31("[grid-area:title]", classNames3.header),
|
|
2536
|
+
style: { "--i": 0 },
|
|
2537
|
+
children: /* @__PURE__ */ jsx51(Heading3, { slot: "title", level: 2, className: classNames3.title, children })
|
|
2538
|
+
}
|
|
2539
|
+
);
|
|
2540
|
+
};
|
|
2541
|
+
|
|
2542
|
+
// src/Drawer/DrawerTrigger.tsx
|
|
2543
|
+
import { DialogTrigger as DialogTrigger2 } from "react-aria-components";
|
|
2544
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2545
|
+
var DrawerTrigger = ({
|
|
2546
|
+
open,
|
|
2547
|
+
children,
|
|
2548
|
+
...props
|
|
2549
|
+
}) => /* @__PURE__ */ jsx52(DialogTrigger2, { isOpen: open, ...props, children });
|
|
2550
|
+
|
|
2551
|
+
// src/Drawer/Drawer.tsx
|
|
2552
|
+
import { jsx as jsx53, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2553
|
+
var Drawer = ({
|
|
2554
|
+
children,
|
|
2555
|
+
variant,
|
|
2556
|
+
size: size2,
|
|
2557
|
+
open,
|
|
2558
|
+
keyboardDismissable,
|
|
2559
|
+
closeButton,
|
|
2560
|
+
role = "complementary",
|
|
2561
|
+
...props
|
|
2562
|
+
}) => {
|
|
2563
|
+
const ref = useRef(null);
|
|
2564
|
+
const classNames3 = useClassNames29({ component: "Drawer", variant, size: size2 });
|
|
2565
|
+
const ctx = useContext11(OverlayTriggerStateContext3);
|
|
2566
|
+
const isSmallScreen = useSmallScreen3();
|
|
2567
|
+
const landmarkAria = useLandmark({ ...props, role }, ref);
|
|
2568
|
+
const landmarkProps = isSmallScreen ? {} : landmarkAria.landmarkProps;
|
|
2569
|
+
return /* @__PURE__ */ jsx53(
|
|
2570
|
+
DrawerModal,
|
|
2571
|
+
{
|
|
2572
|
+
className: classNames3.overlay,
|
|
2573
|
+
open,
|
|
2574
|
+
keyboardDismissable,
|
|
2575
|
+
children: /* @__PURE__ */ jsx53(DrawerContext.Provider, { value: { variant, size: size2 }, children: /* @__PURE__ */ jsxs17(
|
|
2576
|
+
Dialog2,
|
|
2577
|
+
{
|
|
2578
|
+
...props,
|
|
2579
|
+
...landmarkProps,
|
|
2580
|
+
className: cn32(
|
|
2581
|
+
"h-(--visual-viewport-height) outline-none",
|
|
2582
|
+
'grid [grid-template-areas:"title"_"content"_"actions"]',
|
|
2583
|
+
classNames3.container
|
|
2584
|
+
),
|
|
2585
|
+
children: [
|
|
2586
|
+
closeButton && /* @__PURE__ */ jsx53(
|
|
2587
|
+
CloseButton,
|
|
2588
|
+
{
|
|
2589
|
+
"aria-label": "dismiss drawer",
|
|
2590
|
+
style: { "--i": 0 },
|
|
2591
|
+
className: classNames3.closeButton,
|
|
2592
|
+
onPress: ctx == null ? void 0 : ctx.close
|
|
2593
|
+
}
|
|
2594
|
+
),
|
|
2595
|
+
children
|
|
2596
|
+
]
|
|
2597
|
+
}
|
|
2598
|
+
) })
|
|
2599
|
+
}
|
|
2600
|
+
);
|
|
2601
|
+
};
|
|
2602
|
+
Drawer.Trigger = DrawerTrigger;
|
|
2603
|
+
Drawer.Title = DrawerTitle;
|
|
2604
|
+
Drawer.Content = DrawerContent;
|
|
2605
|
+
Drawer.Actions = DrawerActions;
|
|
2606
|
+
|
|
2443
2607
|
// src/Footer/Footer.tsx
|
|
2444
|
-
import { useClassNames as
|
|
2445
|
-
import { jsx as
|
|
2608
|
+
import { useClassNames as useClassNames30 } from "@marigold/system";
|
|
2609
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2446
2610
|
var Footer = ({ children, variant, size: size2, ...props }) => {
|
|
2447
|
-
const classNames3 =
|
|
2448
|
-
return /* @__PURE__ */
|
|
2611
|
+
const classNames3 = useClassNames30({ component: "Footer", variant, size: size2 });
|
|
2612
|
+
return /* @__PURE__ */ jsx54("footer", { ...props, className: classNames3, children });
|
|
2449
2613
|
};
|
|
2450
2614
|
|
|
2451
2615
|
// src/Form/Form.tsx
|
|
2452
2616
|
import { Form } from "react-aria-components";
|
|
2617
|
+
import { cn as cn33, maxWidth as twMaxWidth } from "@marigold/system";
|
|
2618
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2619
|
+
var _Form = ({ unstyled, maxWidth = "full", ...props }) => /* @__PURE__ */ jsx55(
|
|
2620
|
+
Form,
|
|
2621
|
+
{
|
|
2622
|
+
...props,
|
|
2623
|
+
className: cn33(twMaxWidth[maxWidth], unstyled && "contents")
|
|
2624
|
+
}
|
|
2625
|
+
);
|
|
2453
2626
|
|
|
2454
2627
|
// src/Grid/Grid.tsx
|
|
2455
|
-
import { cn as
|
|
2628
|
+
import { cn as cn34, gapSpace as gapSpace6, height as twHeight } from "@marigold/system";
|
|
2456
2629
|
|
|
2457
2630
|
// src/Grid/GridArea.tsx
|
|
2458
|
-
import { jsx as
|
|
2459
|
-
var GridArea = ({ name, children }) => /* @__PURE__ */
|
|
2631
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2632
|
+
var GridArea = ({ name, children }) => /* @__PURE__ */ jsx56("div", { style: { gridArea: name }, children });
|
|
2460
2633
|
|
|
2461
2634
|
// src/Grid/Grid.tsx
|
|
2462
|
-
import { jsx as
|
|
2635
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
2463
2636
|
var parseGridAreas = (areas) => areas.map((area) => `"${area}"`).join("\n");
|
|
2464
2637
|
var parseTemplateValue = (values) => values.map((val) => typeof val === "number" ? `${val}fr` : val).join(" ");
|
|
2465
2638
|
var Grid = ({
|
|
@@ -2471,10 +2644,10 @@ var Grid = ({
|
|
|
2471
2644
|
space = 0,
|
|
2472
2645
|
...props
|
|
2473
2646
|
}) => {
|
|
2474
|
-
return /* @__PURE__ */
|
|
2647
|
+
return /* @__PURE__ */ jsx57(
|
|
2475
2648
|
"div",
|
|
2476
2649
|
{
|
|
2477
|
-
className:
|
|
2650
|
+
className: cn34("grid", gapSpace6[space], twHeight[height]),
|
|
2478
2651
|
style: {
|
|
2479
2652
|
gridTemplateAreas: parseGridAreas(areas),
|
|
2480
2653
|
gridTemplateColumns: parseTemplateValue(columns),
|
|
@@ -2488,27 +2661,27 @@ var Grid = ({
|
|
|
2488
2661
|
Grid.Area = GridArea;
|
|
2489
2662
|
|
|
2490
2663
|
// src/Header/Header.tsx
|
|
2491
|
-
import { Header as
|
|
2492
|
-
import { useClassNames as
|
|
2493
|
-
import { jsx as
|
|
2664
|
+
import { Header as Header4 } from "react-aria-components";
|
|
2665
|
+
import { useClassNames as useClassNames31 } from "@marigold/system";
|
|
2666
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
2494
2667
|
var _Header = ({ variant, size: size2, ...props }) => {
|
|
2495
|
-
const classNames3 =
|
|
2668
|
+
const classNames3 = useClassNames31({
|
|
2496
2669
|
component: "Header",
|
|
2497
2670
|
variant,
|
|
2498
2671
|
size: size2
|
|
2499
2672
|
});
|
|
2500
|
-
return /* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ jsx58(Header4, { className: classNames3, ...props, children: props.children });
|
|
2501
2674
|
};
|
|
2502
2675
|
|
|
2503
2676
|
// src/Headline/Headline.tsx
|
|
2504
|
-
import { Heading as
|
|
2677
|
+
import { Heading as Heading4 } from "react-aria-components";
|
|
2505
2678
|
import {
|
|
2506
|
-
cn as
|
|
2679
|
+
cn as cn35,
|
|
2507
2680
|
ensureCssVar,
|
|
2508
2681
|
textAlign,
|
|
2509
|
-
useClassNames as
|
|
2682
|
+
useClassNames as useClassNames32
|
|
2510
2683
|
} from "@marigold/system";
|
|
2511
|
-
import { jsx as
|
|
2684
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2512
2685
|
var _Headline = ({
|
|
2513
2686
|
variant,
|
|
2514
2687
|
size: size2,
|
|
@@ -2518,17 +2691,17 @@ var _Headline = ({
|
|
|
2518
2691
|
level = "1",
|
|
2519
2692
|
...props
|
|
2520
2693
|
}) => {
|
|
2521
|
-
const classNames3 =
|
|
2694
|
+
const classNames3 = useClassNames32({
|
|
2522
2695
|
component: "Headline",
|
|
2523
2696
|
variant,
|
|
2524
2697
|
size: size2 != null ? size2 : `level-${level}`
|
|
2525
2698
|
});
|
|
2526
|
-
return /* @__PURE__ */
|
|
2527
|
-
|
|
2699
|
+
return /* @__PURE__ */ jsx59(
|
|
2700
|
+
Heading4,
|
|
2528
2701
|
{
|
|
2529
2702
|
level: Number(level),
|
|
2530
2703
|
...props,
|
|
2531
|
-
className:
|
|
2704
|
+
className: cn35(
|
|
2532
2705
|
classNames3,
|
|
2533
2706
|
"max-w-(--maxHeadlineWidth)",
|
|
2534
2707
|
// possibly set by a <Container>
|
|
@@ -2542,12 +2715,12 @@ var _Headline = ({
|
|
|
2542
2715
|
|
|
2543
2716
|
// src/Image/Image.tsx
|
|
2544
2717
|
import {
|
|
2545
|
-
cn as
|
|
2718
|
+
cn as cn36,
|
|
2546
2719
|
objectFit,
|
|
2547
2720
|
objectPosition,
|
|
2548
|
-
useClassNames as
|
|
2721
|
+
useClassNames as useClassNames33
|
|
2549
2722
|
} from "@marigold/system";
|
|
2550
|
-
import { jsx as
|
|
2723
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
2551
2724
|
var Image = ({
|
|
2552
2725
|
variant,
|
|
2553
2726
|
size: size2,
|
|
@@ -2555,13 +2728,13 @@ var Image = ({
|
|
|
2555
2728
|
position: position2 = "none",
|
|
2556
2729
|
...props
|
|
2557
2730
|
}) => {
|
|
2558
|
-
const classNames3 =
|
|
2559
|
-
return /* @__PURE__ */
|
|
2731
|
+
const classNames3 = useClassNames33({ component: "Image", variant, size: size2 });
|
|
2732
|
+
return /* @__PURE__ */ jsx60(
|
|
2560
2733
|
"img",
|
|
2561
2734
|
{
|
|
2562
2735
|
...props,
|
|
2563
2736
|
alt: props.alt,
|
|
2564
|
-
className:
|
|
2737
|
+
className: cn36(
|
|
2565
2738
|
fit !== "none" && "h-full w-full",
|
|
2566
2739
|
classNames3,
|
|
2567
2740
|
objectFit[fit],
|
|
@@ -2572,8 +2745,8 @@ var Image = ({
|
|
|
2572
2745
|
};
|
|
2573
2746
|
|
|
2574
2747
|
// src/Inline/Inline.tsx
|
|
2575
|
-
import { alignment, cn as
|
|
2576
|
-
import { jsx as
|
|
2748
|
+
import { alignment, cn as cn37, gapSpace as gapSpace7 } from "@marigold/system";
|
|
2749
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2577
2750
|
var Inline = ({
|
|
2578
2751
|
space = 0,
|
|
2579
2752
|
alignX,
|
|
@@ -2582,11 +2755,11 @@ var Inline = ({
|
|
|
2582
2755
|
...props
|
|
2583
2756
|
}) => {
|
|
2584
2757
|
var _a, _b, _c, _d;
|
|
2585
|
-
return /* @__PURE__ */
|
|
2758
|
+
return /* @__PURE__ */ jsx61(
|
|
2586
2759
|
"div",
|
|
2587
2760
|
{
|
|
2588
2761
|
...props,
|
|
2589
|
-
className:
|
|
2762
|
+
className: cn37(
|
|
2590
2763
|
"flex flex-wrap",
|
|
2591
2764
|
gapSpace7[space],
|
|
2592
2765
|
alignX && ((_b = (_a = alignment) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -2598,19 +2771,19 @@ var Inline = ({
|
|
|
2598
2771
|
};
|
|
2599
2772
|
|
|
2600
2773
|
// src/DateField/DateField.tsx
|
|
2601
|
-
import { forwardRef as
|
|
2774
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
2602
2775
|
import { DateField } from "react-aria-components";
|
|
2603
2776
|
|
|
2604
2777
|
// src/DateField/DateInput.tsx
|
|
2605
2778
|
import { DateInput, Group } from "react-aria-components";
|
|
2606
|
-
import { useClassNames as
|
|
2779
|
+
import { useClassNames as useClassNames34 } from "@marigold/system";
|
|
2607
2780
|
|
|
2608
2781
|
// src/DateField/DateSegment.tsx
|
|
2609
2782
|
import { DateSegment } from "react-aria-components";
|
|
2610
|
-
import { cn as
|
|
2611
|
-
import { Fragment as Fragment4, jsx as
|
|
2783
|
+
import { cn as cn38 } from "@marigold/system";
|
|
2784
|
+
import { Fragment as Fragment4, jsx as jsx62, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2612
2785
|
var _DateSegment = ({ segment, ...props }) => {
|
|
2613
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsx62(
|
|
2614
2787
|
DateSegment,
|
|
2615
2788
|
{
|
|
2616
2789
|
...props,
|
|
@@ -2618,37 +2791,37 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
2618
2791
|
style: {
|
|
2619
2792
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
2620
2793
|
},
|
|
2621
|
-
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */
|
|
2622
|
-
/* @__PURE__ */
|
|
2794
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
2795
|
+
/* @__PURE__ */ jsx62(
|
|
2623
2796
|
"span",
|
|
2624
2797
|
{
|
|
2625
2798
|
"aria-hidden": "true",
|
|
2626
|
-
className:
|
|
2799
|
+
className: cn38(
|
|
2627
2800
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
2628
2801
|
"pointer-events-none w-full text-center"
|
|
2629
2802
|
),
|
|
2630
2803
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
2631
2804
|
}
|
|
2632
2805
|
),
|
|
2633
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ jsx62("span", { children: isPlaceholder ? "" : segment.type === "month" || segment.type === "day" ? segment.text.padStart(2, "0") : text })
|
|
2634
2807
|
] })
|
|
2635
2808
|
}
|
|
2636
2809
|
);
|
|
2637
2810
|
};
|
|
2638
2811
|
|
|
2639
2812
|
// src/DateField/DateInput.tsx
|
|
2640
|
-
import { jsx as
|
|
2813
|
+
import { jsx as jsx63, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2641
2814
|
var _DateInput = ({ variant, size: size2, action, ...props }) => {
|
|
2642
|
-
const classNames3 =
|
|
2643
|
-
return /* @__PURE__ */
|
|
2644
|
-
/* @__PURE__ */
|
|
2815
|
+
const classNames3 = useClassNames34({ component: "DateField", variant, size: size2 });
|
|
2816
|
+
return /* @__PURE__ */ jsxs19(Group, { className: classNames3.field, children: [
|
|
2817
|
+
/* @__PURE__ */ jsx63(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx63(_DateSegment, { className: classNames3.segment, segment }) }),
|
|
2645
2818
|
action ? action : null
|
|
2646
2819
|
] });
|
|
2647
2820
|
};
|
|
2648
2821
|
|
|
2649
2822
|
// src/DateField/DateField.tsx
|
|
2650
|
-
import { jsx as
|
|
2651
|
-
var _DateField =
|
|
2823
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2824
|
+
var _DateField = forwardRef19(
|
|
2652
2825
|
({
|
|
2653
2826
|
variant,
|
|
2654
2827
|
size: size2,
|
|
@@ -2666,7 +2839,7 @@ var _DateField = forwardRef18(
|
|
|
2666
2839
|
isRequired: required,
|
|
2667
2840
|
...rest
|
|
2668
2841
|
};
|
|
2669
|
-
return /* @__PURE__ */
|
|
2842
|
+
return /* @__PURE__ */ jsx64(
|
|
2670
2843
|
FieldBase,
|
|
2671
2844
|
{
|
|
2672
2845
|
as: DateField,
|
|
@@ -2674,7 +2847,7 @@ var _DateField = forwardRef18(
|
|
|
2674
2847
|
size: size2,
|
|
2675
2848
|
ref,
|
|
2676
2849
|
...props,
|
|
2677
|
-
children: /* @__PURE__ */
|
|
2850
|
+
children: /* @__PURE__ */ jsx64(_DateInput, { action })
|
|
2678
2851
|
}
|
|
2679
2852
|
);
|
|
2680
2853
|
}
|
|
@@ -2683,7 +2856,7 @@ var _DateField = forwardRef18(
|
|
|
2683
2856
|
// src/Calendar/Calendar.tsx
|
|
2684
2857
|
import { useState } from "react";
|
|
2685
2858
|
import { Calendar } from "react-aria-components";
|
|
2686
|
-
import { cn as
|
|
2859
|
+
import { cn as cn42, useClassNames as useClassNames39 } from "@marigold/system";
|
|
2687
2860
|
|
|
2688
2861
|
// src/Calendar/CalendarGrid.tsx
|
|
2689
2862
|
import {
|
|
@@ -2691,18 +2864,18 @@ import {
|
|
|
2691
2864
|
CalendarGrid,
|
|
2692
2865
|
CalendarGridBody
|
|
2693
2866
|
} from "react-aria-components";
|
|
2694
|
-
import { cn as
|
|
2867
|
+
import { cn as cn39, useClassNames as useClassNames36 } from "@marigold/system";
|
|
2695
2868
|
|
|
2696
2869
|
// src/Calendar/CalendarGridHeader.tsx
|
|
2697
2870
|
import { startOfWeek, today } from "@internationalized/date";
|
|
2698
|
-
import { useContext as
|
|
2871
|
+
import { useContext as useContext12, useMemo as useMemo2 } from "react";
|
|
2699
2872
|
import { CalendarStateContext } from "react-aria-components";
|
|
2700
2873
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
2701
2874
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
2702
|
-
import { useClassNames as
|
|
2703
|
-
import { jsx as
|
|
2875
|
+
import { useClassNames as useClassNames35 } from "@marigold/system";
|
|
2876
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2704
2877
|
function CalendarGridHeader(props) {
|
|
2705
|
-
const state =
|
|
2878
|
+
const state = useContext12(CalendarStateContext);
|
|
2706
2879
|
const { headerProps } = useCalendarGrid(props, state);
|
|
2707
2880
|
const { locale } = useLocale();
|
|
2708
2881
|
const dayFormatter = useDateFormatter({
|
|
@@ -2717,21 +2890,21 @@ function CalendarGridHeader(props) {
|
|
|
2717
2890
|
return dayFormatter.format(dateDay);
|
|
2718
2891
|
});
|
|
2719
2892
|
}, [locale, state.timeZone, dayFormatter]);
|
|
2720
|
-
const classNames3 =
|
|
2721
|
-
return /* @__PURE__ */
|
|
2893
|
+
const classNames3 = useClassNames35({ component: "Calendar" });
|
|
2894
|
+
return /* @__PURE__ */ jsx65("thead", { ...headerProps, children: /* @__PURE__ */ jsx65("tr", { children: weekDays.map((day, index2) => /* @__PURE__ */ jsx65("th", { className: classNames3.calendarHeader, children: day.substring(0, 2) }, index2)) }) });
|
|
2722
2895
|
}
|
|
2723
2896
|
|
|
2724
2897
|
// src/Calendar/CalendarGrid.tsx
|
|
2725
|
-
import { jsx as
|
|
2898
|
+
import { jsx as jsx66, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2726
2899
|
var _CalendarGrid = () => {
|
|
2727
|
-
const classNames3 =
|
|
2728
|
-
return /* @__PURE__ */
|
|
2729
|
-
/* @__PURE__ */
|
|
2730
|
-
/* @__PURE__ */
|
|
2900
|
+
const classNames3 = useClassNames36({ component: "Calendar" });
|
|
2901
|
+
return /* @__PURE__ */ jsxs20(CalendarGrid, { className: classNames3.calendarGrid, children: [
|
|
2902
|
+
/* @__PURE__ */ jsx66(CalendarGridHeader, {}),
|
|
2903
|
+
/* @__PURE__ */ jsx66(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx66(
|
|
2731
2904
|
CalendarCell,
|
|
2732
2905
|
{
|
|
2733
2906
|
date,
|
|
2734
|
-
className:
|
|
2907
|
+
className: cn39(
|
|
2735
2908
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
2736
2909
|
classNames3.calendarCell
|
|
2737
2910
|
)
|
|
@@ -2741,9 +2914,9 @@ var _CalendarGrid = () => {
|
|
|
2741
2914
|
};
|
|
2742
2915
|
|
|
2743
2916
|
// src/Calendar/CalendarListBox.tsx
|
|
2744
|
-
import { useContext as
|
|
2917
|
+
import { useContext as useContext13 } from "react";
|
|
2745
2918
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
2746
|
-
import { cn as
|
|
2919
|
+
import { cn as cn40, useClassNames as useClassNames37 } from "@marigold/system";
|
|
2747
2920
|
|
|
2748
2921
|
// src/Calendar/useFormattedMonths.tsx
|
|
2749
2922
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -2762,60 +2935,60 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
2762
2935
|
}
|
|
2763
2936
|
|
|
2764
2937
|
// src/Calendar/CalendarListBox.tsx
|
|
2765
|
-
import { jsx as
|
|
2938
|
+
import { jsx as jsx67, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2766
2939
|
function CalendarListBox({
|
|
2767
2940
|
type,
|
|
2768
2941
|
isDisabled,
|
|
2769
2942
|
setSelectedDropdown
|
|
2770
2943
|
}) {
|
|
2771
|
-
const state =
|
|
2944
|
+
const state = useContext13(CalendarStateContext2);
|
|
2772
2945
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
2773
2946
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
2774
|
-
const { select: selectClassNames } =
|
|
2775
|
-
return /* @__PURE__ */
|
|
2947
|
+
const { select: selectClassNames } = useClassNames37({ component: "Select" });
|
|
2948
|
+
return /* @__PURE__ */ jsxs21(
|
|
2776
2949
|
"button",
|
|
2777
2950
|
{
|
|
2778
2951
|
disabled: isDisabled,
|
|
2779
2952
|
onClick: () => setSelectedDropdown(type),
|
|
2780
|
-
className:
|
|
2953
|
+
className: cn40(buttonStyles, selectClassNames),
|
|
2781
2954
|
"data-testid": type,
|
|
2782
2955
|
children: [
|
|
2783
2956
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
2784
|
-
/* @__PURE__ */
|
|
2957
|
+
/* @__PURE__ */ jsx67(ChevronDown, {})
|
|
2785
2958
|
]
|
|
2786
2959
|
}
|
|
2787
2960
|
);
|
|
2788
2961
|
}
|
|
2789
2962
|
|
|
2790
2963
|
// src/Calendar/MonthControls.tsx
|
|
2791
|
-
import { cn as
|
|
2792
|
-
import { jsx as
|
|
2964
|
+
import { cn as cn41, useClassNames as useClassNames38 } from "@marigold/system";
|
|
2965
|
+
import { jsx as jsx68, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2793
2966
|
function MonthControls() {
|
|
2794
|
-
const classNames3 =
|
|
2795
|
-
return /* @__PURE__ */
|
|
2967
|
+
const classNames3 = useClassNames38({ component: "Calendar" });
|
|
2968
|
+
return /* @__PURE__ */ jsxs22(
|
|
2796
2969
|
"div",
|
|
2797
2970
|
{
|
|
2798
|
-
className:
|
|
2971
|
+
className: cn41(
|
|
2799
2972
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button]:px-2 [&_button]:py-1 [&_button:disabled]:cursor-not-allowed",
|
|
2800
2973
|
classNames3.calendarControllers
|
|
2801
2974
|
),
|
|
2802
2975
|
children: [
|
|
2803
|
-
/* @__PURE__ */
|
|
2976
|
+
/* @__PURE__ */ jsx68(
|
|
2804
2977
|
IconButton,
|
|
2805
2978
|
{
|
|
2806
|
-
className:
|
|
2979
|
+
className: cn41("inline-flex items-center justify-center gap-[0.5ch]"),
|
|
2807
2980
|
variant: "navigation",
|
|
2808
2981
|
slot: "previous",
|
|
2809
|
-
children: /* @__PURE__ */
|
|
2982
|
+
children: /* @__PURE__ */ jsx68(ChevronLeft, {})
|
|
2810
2983
|
}
|
|
2811
2984
|
),
|
|
2812
|
-
/* @__PURE__ */
|
|
2985
|
+
/* @__PURE__ */ jsx68(
|
|
2813
2986
|
IconButton,
|
|
2814
2987
|
{
|
|
2815
|
-
className:
|
|
2988
|
+
className: cn41("inline-flex items-center justify-center gap-[0.5ch]"),
|
|
2816
2989
|
variant: "navigation",
|
|
2817
2990
|
slot: "next",
|
|
2818
|
-
children: /* @__PURE__ */
|
|
2991
|
+
children: /* @__PURE__ */ jsx68(ChevronRight, {})
|
|
2819
2992
|
}
|
|
2820
2993
|
)
|
|
2821
2994
|
]
|
|
@@ -2825,24 +2998,24 @@ function MonthControls() {
|
|
|
2825
2998
|
var MonthControls_default = MonthControls;
|
|
2826
2999
|
|
|
2827
3000
|
// src/Calendar/MonthListBox.tsx
|
|
2828
|
-
import { useContext as
|
|
3001
|
+
import { useContext as useContext14 } from "react";
|
|
2829
3002
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
2830
|
-
import { jsx as
|
|
3003
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2831
3004
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
2832
|
-
const state =
|
|
3005
|
+
const state = useContext14(CalendarStateContext3);
|
|
2833
3006
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
2834
3007
|
let onChange2 = (index2) => {
|
|
2835
3008
|
let value = Number(index2) + 1;
|
|
2836
3009
|
let date = state.focusedDate.set({ month: value });
|
|
2837
3010
|
state.setFocusedDate(date);
|
|
2838
3011
|
};
|
|
2839
|
-
return /* @__PURE__ */
|
|
3012
|
+
return /* @__PURE__ */ jsx69(
|
|
2840
3013
|
"ul",
|
|
2841
3014
|
{
|
|
2842
3015
|
"data-testid": "monthOptions",
|
|
2843
3016
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
2844
3017
|
children: months.map((month, index2) => {
|
|
2845
|
-
return /* @__PURE__ */
|
|
3018
|
+
return /* @__PURE__ */ jsx69("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx69(
|
|
2846
3019
|
_Button,
|
|
2847
3020
|
{
|
|
2848
3021
|
slot: "previous",
|
|
@@ -2864,15 +3037,15 @@ var MonthListBox_default = MonthListBox;
|
|
|
2864
3037
|
|
|
2865
3038
|
// src/Calendar/YearListBox.tsx
|
|
2866
3039
|
import {
|
|
2867
|
-
useContext as
|
|
3040
|
+
useContext as useContext15,
|
|
2868
3041
|
useEffect,
|
|
2869
|
-
useRef
|
|
3042
|
+
useRef as useRef2
|
|
2870
3043
|
} from "react";
|
|
2871
3044
|
import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
2872
3045
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
2873
|
-
import { jsx as
|
|
3046
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2874
3047
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
2875
|
-
const state =
|
|
3048
|
+
const state = useContext15(CalendarStateContext4);
|
|
2876
3049
|
const years = [];
|
|
2877
3050
|
let formatter = useDateFormatter3({
|
|
2878
3051
|
year: "numeric",
|
|
@@ -2885,7 +3058,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
2885
3058
|
formatted: formatter.format(date.toDate(state.timeZone))
|
|
2886
3059
|
});
|
|
2887
3060
|
}
|
|
2888
|
-
const activeButtonRef =
|
|
3061
|
+
const activeButtonRef = useRef2(null);
|
|
2889
3062
|
useEffect(() => {
|
|
2890
3063
|
if (activeButtonRef.current) {
|
|
2891
3064
|
const activeButton = activeButtonRef.current;
|
|
@@ -2900,19 +3073,19 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
2900
3073
|
let date = years[index2].value;
|
|
2901
3074
|
state.setFocusedDate(date);
|
|
2902
3075
|
};
|
|
2903
|
-
return /* @__PURE__ */
|
|
3076
|
+
return /* @__PURE__ */ jsx70(
|
|
2904
3077
|
"ul",
|
|
2905
3078
|
{
|
|
2906
3079
|
"data-testid": "yearOptions",
|
|
2907
3080
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
2908
3081
|
children: years.map((year, index2) => {
|
|
2909
3082
|
const isActive = +year.formatted === state.focusedDate.year;
|
|
2910
|
-
return /* @__PURE__ */
|
|
3083
|
+
return /* @__PURE__ */ jsx70("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx70(
|
|
2911
3084
|
"div",
|
|
2912
3085
|
{
|
|
2913
3086
|
ref: isActive ? activeButtonRef : null,
|
|
2914
3087
|
style: { height: "100%", width: "100%" },
|
|
2915
|
-
children: /* @__PURE__ */
|
|
3088
|
+
children: /* @__PURE__ */ jsx70(
|
|
2916
3089
|
_Button,
|
|
2917
3090
|
{
|
|
2918
3091
|
slot: "previous",
|
|
@@ -2937,7 +3110,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
2937
3110
|
var YearListBox_default = YearListBox;
|
|
2938
3111
|
|
|
2939
3112
|
// src/Calendar/Calendar.tsx
|
|
2940
|
-
import { Fragment as Fragment5, jsx as
|
|
3113
|
+
import { Fragment as Fragment5, jsx as jsx71, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2941
3114
|
var _Calendar = ({
|
|
2942
3115
|
disabled,
|
|
2943
3116
|
readOnly,
|
|
@@ -2952,24 +3125,24 @@ var _Calendar = ({
|
|
|
2952
3125
|
isDateUnavailable: dateUnavailable,
|
|
2953
3126
|
...rest
|
|
2954
3127
|
};
|
|
2955
|
-
const classNames3 =
|
|
3128
|
+
const classNames3 = useClassNames39({ component: "Calendar" });
|
|
2956
3129
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
2957
3130
|
const ViewMap = {
|
|
2958
|
-
month: /* @__PURE__ */
|
|
2959
|
-
year: /* @__PURE__ */
|
|
3131
|
+
month: /* @__PURE__ */ jsx71(MonthListBox_default, { setSelectedDropdown }),
|
|
3132
|
+
year: /* @__PURE__ */ jsx71(YearListBox_default, { setSelectedDropdown })
|
|
2960
3133
|
};
|
|
2961
|
-
return /* @__PURE__ */
|
|
3134
|
+
return /* @__PURE__ */ jsx71(
|
|
2962
3135
|
Calendar,
|
|
2963
3136
|
{
|
|
2964
|
-
className:
|
|
3137
|
+
className: cn42(
|
|
2965
3138
|
"flex min-h-[350px] w-fit flex-col rounded-xs p-4",
|
|
2966
3139
|
classNames3.calendar
|
|
2967
3140
|
),
|
|
2968
3141
|
...props,
|
|
2969
|
-
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */
|
|
2970
|
-
/* @__PURE__ */
|
|
2971
|
-
/* @__PURE__ */
|
|
2972
|
-
/* @__PURE__ */
|
|
3142
|
+
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
3143
|
+
/* @__PURE__ */ jsxs23("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3144
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex w-fit gap-4", children: [
|
|
3145
|
+
/* @__PURE__ */ jsx71(
|
|
2973
3146
|
CalendarListBox,
|
|
2974
3147
|
{
|
|
2975
3148
|
type: "month",
|
|
@@ -2977,7 +3150,7 @@ var _Calendar = ({
|
|
|
2977
3150
|
setSelectedDropdown
|
|
2978
3151
|
}
|
|
2979
3152
|
),
|
|
2980
|
-
/* @__PURE__ */
|
|
3153
|
+
/* @__PURE__ */ jsx71(
|
|
2981
3154
|
CalendarListBox,
|
|
2982
3155
|
{
|
|
2983
3156
|
type: "year",
|
|
@@ -2986,9 +3159,9 @@ var _Calendar = ({
|
|
|
2986
3159
|
}
|
|
2987
3160
|
)
|
|
2988
3161
|
] }),
|
|
2989
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ jsx71(MonthControls_default, {})
|
|
2990
3163
|
] }),
|
|
2991
|
-
/* @__PURE__ */
|
|
3164
|
+
/* @__PURE__ */ jsx71(_CalendarGrid, {})
|
|
2992
3165
|
] })
|
|
2993
3166
|
}
|
|
2994
3167
|
);
|
|
@@ -2996,9 +3169,9 @@ var _Calendar = ({
|
|
|
2996
3169
|
|
|
2997
3170
|
// src/DatePicker/DatePicker.tsx
|
|
2998
3171
|
import React6 from "react";
|
|
2999
|
-
import { DatePicker, Dialog as
|
|
3000
|
-
import { useClassNames as
|
|
3001
|
-
import { jsx as
|
|
3172
|
+
import { DatePicker, Dialog as Dialog3 } from "react-aria-components";
|
|
3173
|
+
import { useClassNames as useClassNames40 } from "@marigold/system";
|
|
3174
|
+
import { jsx as jsx72, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3002
3175
|
var _DatePicker = React6.forwardRef(
|
|
3003
3176
|
({
|
|
3004
3177
|
dateUnavailable,
|
|
@@ -3022,12 +3195,12 @@ var _DatePicker = React6.forwardRef(
|
|
|
3022
3195
|
granularity,
|
|
3023
3196
|
...rest
|
|
3024
3197
|
};
|
|
3025
|
-
const classNames3 =
|
|
3198
|
+
const classNames3 = useClassNames40({
|
|
3026
3199
|
component: "DatePicker",
|
|
3027
3200
|
size: size2,
|
|
3028
3201
|
variant
|
|
3029
3202
|
});
|
|
3030
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ jsxs24(
|
|
3031
3204
|
FieldBase,
|
|
3032
3205
|
{
|
|
3033
3206
|
as: DatePicker,
|
|
@@ -3036,10 +3209,10 @@ var _DatePicker = React6.forwardRef(
|
|
|
3036
3209
|
...props,
|
|
3037
3210
|
ref,
|
|
3038
3211
|
children: [
|
|
3039
|
-
/* @__PURE__ */
|
|
3212
|
+
/* @__PURE__ */ jsx72(
|
|
3040
3213
|
_DateInput,
|
|
3041
3214
|
{
|
|
3042
|
-
action: /* @__PURE__ */
|
|
3215
|
+
action: /* @__PURE__ */ jsx72(IconButton, { className: classNames3, children: /* @__PURE__ */ jsx72(
|
|
3043
3216
|
"svg",
|
|
3044
3217
|
{
|
|
3045
3218
|
"data-testid": "action",
|
|
@@ -3047,12 +3220,12 @@ var _DatePicker = React6.forwardRef(
|
|
|
3047
3220
|
width: 24,
|
|
3048
3221
|
height: 24,
|
|
3049
3222
|
fill: "currentColor",
|
|
3050
|
-
children: /* @__PURE__ */
|
|
3223
|
+
children: /* @__PURE__ */ jsx72("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
3051
3224
|
}
|
|
3052
3225
|
) })
|
|
3053
3226
|
}
|
|
3054
3227
|
),
|
|
3055
|
-
/* @__PURE__ */
|
|
3228
|
+
/* @__PURE__ */ jsx72(_Popover, { children: /* @__PURE__ */ jsx72(Dialog3, { children: /* @__PURE__ */ jsx72(_Calendar, { disabled }) }) })
|
|
3056
3229
|
]
|
|
3057
3230
|
}
|
|
3058
3231
|
);
|
|
@@ -3061,16 +3234,16 @@ var _DatePicker = React6.forwardRef(
|
|
|
3061
3234
|
|
|
3062
3235
|
// src/Inset/Inset.tsx
|
|
3063
3236
|
import {
|
|
3064
|
-
cn as
|
|
3237
|
+
cn as cn43,
|
|
3065
3238
|
paddingSpace as paddingSpace2,
|
|
3066
3239
|
paddingSpaceX as paddingSpaceX2,
|
|
3067
3240
|
paddingSpaceY as paddingSpaceY2
|
|
3068
3241
|
} from "@marigold/system";
|
|
3069
|
-
import { jsx as
|
|
3070
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
3242
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3243
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx73(
|
|
3071
3244
|
"div",
|
|
3072
3245
|
{
|
|
3073
|
-
className:
|
|
3246
|
+
className: cn43(
|
|
3074
3247
|
space && paddingSpace2[space],
|
|
3075
3248
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
3076
3249
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -3080,38 +3253,38 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx65(
|
|
|
3080
3253
|
);
|
|
3081
3254
|
|
|
3082
3255
|
// src/Link/Link.tsx
|
|
3083
|
-
import { forwardRef as
|
|
3256
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
3084
3257
|
import { Link } from "react-aria-components";
|
|
3085
|
-
import { useClassNames as
|
|
3086
|
-
import { jsx as
|
|
3087
|
-
var _Link =
|
|
3258
|
+
import { useClassNames as useClassNames41 } from "@marigold/system";
|
|
3259
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
3260
|
+
var _Link = forwardRef20(
|
|
3088
3261
|
({ variant, size: size2, disabled, children, ...props }, ref) => {
|
|
3089
|
-
const classNames3 =
|
|
3262
|
+
const classNames3 = useClassNames41({
|
|
3090
3263
|
component: "Link",
|
|
3091
3264
|
variant,
|
|
3092
3265
|
size: size2
|
|
3093
3266
|
});
|
|
3094
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsx74(Link, { ...props, ref, className: classNames3, isDisabled: disabled, children });
|
|
3095
3268
|
}
|
|
3096
3269
|
);
|
|
3097
3270
|
|
|
3098
3271
|
// src/List/List.tsx
|
|
3099
|
-
import { useClassNames as
|
|
3272
|
+
import { useClassNames as useClassNames42 } from "@marigold/system";
|
|
3100
3273
|
|
|
3101
3274
|
// src/List/Context.ts
|
|
3102
|
-
import { createContext as
|
|
3103
|
-
var ListContext =
|
|
3104
|
-
var useListContext = () =>
|
|
3275
|
+
import { createContext as createContext8, useContext as useContext16 } from "react";
|
|
3276
|
+
var ListContext = createContext8({});
|
|
3277
|
+
var useListContext = () => useContext16(ListContext);
|
|
3105
3278
|
|
|
3106
3279
|
// src/List/ListItem.tsx
|
|
3107
|
-
import { jsx as
|
|
3280
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
3108
3281
|
var ListItem = ({ children, ...props }) => {
|
|
3109
3282
|
const { classNames: classNames3 } = useListContext();
|
|
3110
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsx75("li", { ...props, className: classNames3, children });
|
|
3111
3284
|
};
|
|
3112
3285
|
|
|
3113
3286
|
// src/List/List.tsx
|
|
3114
|
-
import { jsx as
|
|
3287
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
3115
3288
|
var List = ({
|
|
3116
3289
|
as = "ul",
|
|
3117
3290
|
children,
|
|
@@ -3120,38 +3293,38 @@ var List = ({
|
|
|
3120
3293
|
...props
|
|
3121
3294
|
}) => {
|
|
3122
3295
|
const Component2 = as;
|
|
3123
|
-
const classNames3 =
|
|
3124
|
-
return /* @__PURE__ */
|
|
3296
|
+
const classNames3 = useClassNames42({ component: "List", variant, size: size2 });
|
|
3297
|
+
return /* @__PURE__ */ jsx76(Component2, { ...props, className: classNames3[as], children: /* @__PURE__ */ jsx76(ListContext.Provider, { value: { classNames: classNames3.item }, children }) });
|
|
3125
3298
|
};
|
|
3126
3299
|
List.Item = ListItem;
|
|
3127
3300
|
|
|
3128
3301
|
// src/Menu/Menu.tsx
|
|
3129
3302
|
import { Menu, MenuTrigger } from "react-aria-components";
|
|
3130
|
-
import { useClassNames as
|
|
3303
|
+
import { useClassNames as useClassNames45 } from "@marigold/system";
|
|
3131
3304
|
|
|
3132
3305
|
// src/Menu/MenuItem.tsx
|
|
3133
3306
|
import { MenuItem } from "react-aria-components";
|
|
3134
|
-
import { useClassNames as
|
|
3135
|
-
import { jsx as
|
|
3307
|
+
import { useClassNames as useClassNames43 } from "@marigold/system";
|
|
3308
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3136
3309
|
var _MenuItem = ({ children, ...props }) => {
|
|
3137
|
-
const classNames3 =
|
|
3138
|
-
return /* @__PURE__ */
|
|
3310
|
+
const classNames3 = useClassNames43({ component: "Menu" });
|
|
3311
|
+
return /* @__PURE__ */ jsx77(MenuItem, { ...props, className: classNames3.item, children });
|
|
3139
3312
|
};
|
|
3140
3313
|
|
|
3141
3314
|
// src/Menu/MenuSection.tsx
|
|
3142
3315
|
import { MenuSection } from "react-aria-components";
|
|
3143
|
-
import { useClassNames as
|
|
3144
|
-
import { jsx as
|
|
3316
|
+
import { useClassNames as useClassNames44 } from "@marigold/system";
|
|
3317
|
+
import { jsx as jsx78, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3145
3318
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
3146
|
-
const className =
|
|
3147
|
-
return /* @__PURE__ */
|
|
3148
|
-
/* @__PURE__ */
|
|
3319
|
+
const className = useClassNames44({ component: "Menu" });
|
|
3320
|
+
return /* @__PURE__ */ jsxs25(MenuSection, { ...props, children: [
|
|
3321
|
+
/* @__PURE__ */ jsx78(_Header, { className: className.section, children: title }),
|
|
3149
3322
|
children
|
|
3150
3323
|
] });
|
|
3151
3324
|
};
|
|
3152
3325
|
|
|
3153
3326
|
// src/Menu/Menu.tsx
|
|
3154
|
-
import { jsx as
|
|
3327
|
+
import { jsx as jsx79, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3155
3328
|
var _Menu = ({
|
|
3156
3329
|
children,
|
|
3157
3330
|
label,
|
|
@@ -3163,10 +3336,10 @@ var _Menu = ({
|
|
|
3163
3336
|
"aria-label": ariaLabel,
|
|
3164
3337
|
...props
|
|
3165
3338
|
}) => {
|
|
3166
|
-
const classNames3 =
|
|
3167
|
-
return /* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3169
|
-
/* @__PURE__ */
|
|
3339
|
+
const classNames3 = useClassNames45({ component: "Menu", variant, size: size2 });
|
|
3340
|
+
return /* @__PURE__ */ jsxs26(MenuTrigger, { ...props, children: [
|
|
3341
|
+
/* @__PURE__ */ jsx79(_Button, { variant: "menu", disabled, "aria-label": ariaLabel, children: label }),
|
|
3342
|
+
/* @__PURE__ */ jsx79(_Popover, { open, placement, children: /* @__PURE__ */ jsx79(Menu, { ...props, className: classNames3.container, children }) })
|
|
3170
3343
|
] });
|
|
3171
3344
|
};
|
|
3172
3345
|
_Menu.Item = _MenuItem;
|
|
@@ -3174,59 +3347,59 @@ _Menu.Section = _MenuSection;
|
|
|
3174
3347
|
|
|
3175
3348
|
// src/Menu/ActionMenu.tsx
|
|
3176
3349
|
import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
3177
|
-
import { SVG as SVG8, useClassNames as
|
|
3178
|
-
import { jsx as
|
|
3350
|
+
import { SVG as SVG8, useClassNames as useClassNames46 } from "@marigold/system";
|
|
3351
|
+
import { jsx as jsx80, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3179
3352
|
var ActionMenu = ({
|
|
3180
3353
|
variant,
|
|
3181
3354
|
size: size2,
|
|
3182
3355
|
disabled,
|
|
3183
3356
|
...props
|
|
3184
3357
|
}) => {
|
|
3185
|
-
const classNames3 =
|
|
3186
|
-
return /* @__PURE__ */
|
|
3187
|
-
/* @__PURE__ */
|
|
3188
|
-
/* @__PURE__ */
|
|
3358
|
+
const classNames3 = useClassNames46({ component: "Menu", variant, size: size2 });
|
|
3359
|
+
return /* @__PURE__ */ jsxs27(MenuTrigger2, { children: [
|
|
3360
|
+
/* @__PURE__ */ jsx80(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ jsx80(SVG8, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx80("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
3361
|
+
/* @__PURE__ */ jsx80(_Popover, { children: /* @__PURE__ */ jsx80(Menu2, { ...props, className: classNames3.container, children: props.children }) })
|
|
3189
3362
|
] });
|
|
3190
3363
|
};
|
|
3191
3364
|
|
|
3192
3365
|
// src/SectionMessage/SectionMessage.tsx
|
|
3193
|
-
import { useRef as
|
|
3366
|
+
import { useRef as useRef3, useState as useState2 } from "react";
|
|
3194
3367
|
import { useButton } from "@react-aria/button";
|
|
3195
|
-
import { cn as
|
|
3368
|
+
import { cn as cn46, useClassNames as useClassNames47 } from "@marigold/system";
|
|
3196
3369
|
|
|
3197
3370
|
// src/SectionMessage/Context.tsx
|
|
3198
|
-
import { createContext as
|
|
3199
|
-
var SectionMessageContext =
|
|
3200
|
-
var useSectionMessageContext = () =>
|
|
3371
|
+
import { createContext as createContext9, useContext as useContext17 } from "react";
|
|
3372
|
+
var SectionMessageContext = createContext9({});
|
|
3373
|
+
var useSectionMessageContext = () => useContext17(SectionMessageContext);
|
|
3201
3374
|
|
|
3202
3375
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
3203
|
-
import { cn as
|
|
3204
|
-
import { jsx as
|
|
3376
|
+
import { cn as cn44 } from "@marigold/system";
|
|
3377
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3205
3378
|
var SectionMessageContent = ({
|
|
3206
3379
|
children
|
|
3207
3380
|
}) => {
|
|
3208
3381
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3209
|
-
return /* @__PURE__ */
|
|
3382
|
+
return /* @__PURE__ */ jsx81("div", { className: cn44("[grid-area:content]", classNames3.content), children });
|
|
3210
3383
|
};
|
|
3211
3384
|
|
|
3212
3385
|
// src/SectionMessage/SectionMessageTitle.tsx
|
|
3213
|
-
import { cn as
|
|
3214
|
-
import { jsx as
|
|
3386
|
+
import { cn as cn45 } from "@marigold/system";
|
|
3387
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3215
3388
|
var SectionMessageTitle = ({ children }) => {
|
|
3216
3389
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3217
|
-
return /* @__PURE__ */
|
|
3390
|
+
return /* @__PURE__ */ jsx82("div", { className: cn45("[grid-area:title]", classNames3.title), children });
|
|
3218
3391
|
};
|
|
3219
3392
|
|
|
3220
3393
|
// src/SectionMessage/SectionMessage.tsx
|
|
3221
|
-
import { jsx as
|
|
3394
|
+
import { jsx as jsx83, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3222
3395
|
var icons = {
|
|
3223
|
-
success: () => /* @__PURE__ */
|
|
3396
|
+
success: () => /* @__PURE__ */ jsx83(
|
|
3224
3397
|
"svg",
|
|
3225
3398
|
{
|
|
3226
3399
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3227
3400
|
viewBox: "0 0 24 24",
|
|
3228
3401
|
fill: "currentColor",
|
|
3229
|
-
children: /* @__PURE__ */
|
|
3402
|
+
children: /* @__PURE__ */ jsx83(
|
|
3230
3403
|
"path",
|
|
3231
3404
|
{
|
|
3232
3405
|
fillRule: "evenodd",
|
|
@@ -3236,13 +3409,13 @@ var icons = {
|
|
|
3236
3409
|
)
|
|
3237
3410
|
}
|
|
3238
3411
|
),
|
|
3239
|
-
info: () => /* @__PURE__ */
|
|
3412
|
+
info: () => /* @__PURE__ */ jsx83(
|
|
3240
3413
|
"svg",
|
|
3241
3414
|
{
|
|
3242
3415
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3243
3416
|
viewBox: "0 0 24 24",
|
|
3244
3417
|
fill: "currentColor",
|
|
3245
|
-
children: /* @__PURE__ */
|
|
3418
|
+
children: /* @__PURE__ */ jsx83(
|
|
3246
3419
|
"path",
|
|
3247
3420
|
{
|
|
3248
3421
|
fillRule: "evenodd",
|
|
@@ -3252,13 +3425,13 @@ var icons = {
|
|
|
3252
3425
|
)
|
|
3253
3426
|
}
|
|
3254
3427
|
),
|
|
3255
|
-
warning: () => /* @__PURE__ */
|
|
3428
|
+
warning: () => /* @__PURE__ */ jsx83(
|
|
3256
3429
|
"svg",
|
|
3257
3430
|
{
|
|
3258
3431
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3259
3432
|
viewBox: "0 0 24 24",
|
|
3260
3433
|
fill: "currentColor",
|
|
3261
|
-
children: /* @__PURE__ */
|
|
3434
|
+
children: /* @__PURE__ */ jsx83(
|
|
3262
3435
|
"path",
|
|
3263
3436
|
{
|
|
3264
3437
|
fillRule: "evenodd",
|
|
@@ -3268,13 +3441,13 @@ var icons = {
|
|
|
3268
3441
|
)
|
|
3269
3442
|
}
|
|
3270
3443
|
),
|
|
3271
|
-
error: () => /* @__PURE__ */
|
|
3444
|
+
error: () => /* @__PURE__ */ jsx83(
|
|
3272
3445
|
"svg",
|
|
3273
3446
|
{
|
|
3274
3447
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3275
3448
|
viewBox: "0 0 24 24",
|
|
3276
3449
|
fill: "currentColor",
|
|
3277
|
-
children: /* @__PURE__ */
|
|
3450
|
+
children: /* @__PURE__ */ jsx83(
|
|
3278
3451
|
"path",
|
|
3279
3452
|
{
|
|
3280
3453
|
fillRule: "evenodd",
|
|
@@ -3294,8 +3467,8 @@ var SectionMessage = ({
|
|
|
3294
3467
|
onCloseChange,
|
|
3295
3468
|
...props
|
|
3296
3469
|
}) => {
|
|
3297
|
-
const buttonRef =
|
|
3298
|
-
const classNames3 =
|
|
3470
|
+
const buttonRef = useRef3(null);
|
|
3471
|
+
const classNames3 = useClassNames47({
|
|
3299
3472
|
component: "SectionMessage",
|
|
3300
3473
|
variant,
|
|
3301
3474
|
size: size2
|
|
@@ -3311,30 +3484,22 @@ var SectionMessage = ({
|
|
|
3311
3484
|
}
|
|
3312
3485
|
};
|
|
3313
3486
|
if (!isCurrentlyVisible) return null;
|
|
3314
|
-
return /* @__PURE__ */
|
|
3487
|
+
return /* @__PURE__ */ jsx83(SectionMessageContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsxs28(
|
|
3315
3488
|
"div",
|
|
3316
3489
|
{
|
|
3317
3490
|
role: variant === "error" ? "alert" : void 0,
|
|
3318
3491
|
...props,
|
|
3319
|
-
className:
|
|
3492
|
+
className: cn46("grid auto-rows-min", classNames3.container),
|
|
3320
3493
|
children: [
|
|
3321
|
-
/* @__PURE__ */
|
|
3322
|
-
closeButton && /* @__PURE__ */
|
|
3323
|
-
|
|
3494
|
+
/* @__PURE__ */ jsx83("div", { className: cn46("[grid-area:icon]", classNames3.icon), children: Icon4 && /* @__PURE__ */ jsx83(Icon4, {}) }),
|
|
3495
|
+
closeButton && /* @__PURE__ */ jsx83(
|
|
3496
|
+
CloseButton,
|
|
3324
3497
|
{
|
|
3325
3498
|
...buttonProps,
|
|
3326
3499
|
ref: buttonRef,
|
|
3327
3500
|
"aria-label": "close",
|
|
3328
|
-
className:
|
|
3329
|
-
|
|
3330
|
-
children: /* @__PURE__ */ jsx75("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx75(
|
|
3331
|
-
"path",
|
|
3332
|
-
{
|
|
3333
|
-
fillRule: "evenodd",
|
|
3334
|
-
clipRule: "evenodd",
|
|
3335
|
-
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
3336
|
-
}
|
|
3337
|
-
) })
|
|
3501
|
+
className: cn46("[grid-area:close]", classNames3.close),
|
|
3502
|
+
onPress: handleClose
|
|
3338
3503
|
}
|
|
3339
3504
|
),
|
|
3340
3505
|
children
|
|
@@ -3347,7 +3512,7 @@ SectionMessage.Content = SectionMessageContent;
|
|
|
3347
3512
|
|
|
3348
3513
|
// src/Multiselect/Multiselect.tsx
|
|
3349
3514
|
import {
|
|
3350
|
-
Button as
|
|
3515
|
+
Button as Button6,
|
|
3351
3516
|
ButtonContext,
|
|
3352
3517
|
FieldErrorContext as FieldErrorContext2,
|
|
3353
3518
|
InputContext,
|
|
@@ -3552,7 +3717,7 @@ function _extends() {
|
|
|
3552
3717
|
|
|
3553
3718
|
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/react-select.esm.js
|
|
3554
3719
|
import * as React11 from "react";
|
|
3555
|
-
import { forwardRef as
|
|
3720
|
+
import { forwardRef as forwardRef23, useMemo as useMemo5 } from "react";
|
|
3556
3721
|
|
|
3557
3722
|
// ../../node_modules/.pnpm/@babel+runtime@7.27.0/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
3558
3723
|
function _classCallCheck(a, n) {
|
|
@@ -3660,11 +3825,11 @@ function _toConsumableArray(r) {
|
|
|
3660
3825
|
|
|
3661
3826
|
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/Select-aab027f3.esm.js
|
|
3662
3827
|
import * as React10 from "react";
|
|
3663
|
-
import { useMemo as useMemo4, Fragment as Fragment8, useRef as
|
|
3828
|
+
import { useMemo as useMemo4, Fragment as Fragment8, useRef as useRef6, useCallback as useCallback3, useEffect as useEffect3, Component } from "react";
|
|
3664
3829
|
|
|
3665
3830
|
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.0_react@19.1.0/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
3666
3831
|
import * as React8 from "react";
|
|
3667
|
-
import { useContext as
|
|
3832
|
+
import { useContext as useContext19, forwardRef as forwardRef22 } from "react";
|
|
3668
3833
|
|
|
3669
3834
|
// ../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
3670
3835
|
var isDevelopment = false;
|
|
@@ -4852,15 +5017,15 @@ var EmotionCacheContext = /* @__PURE__ */ React8.createContext(
|
|
|
4852
5017
|
);
|
|
4853
5018
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
4854
5019
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
4855
|
-
return /* @__PURE__ */
|
|
4856
|
-
var cache =
|
|
5020
|
+
return /* @__PURE__ */ forwardRef22(function(props, ref) {
|
|
5021
|
+
var cache = useContext19(EmotionCacheContext);
|
|
4857
5022
|
return func(props, cache, ref);
|
|
4858
5023
|
});
|
|
4859
5024
|
};
|
|
4860
5025
|
if (!isBrowser4) {
|
|
4861
5026
|
withEmotionCache = function withEmotionCache3(func) {
|
|
4862
5027
|
return function(props) {
|
|
4863
|
-
var cache =
|
|
5028
|
+
var cache = useContext19(EmotionCacheContext);
|
|
4864
5029
|
if (cache === null) {
|
|
4865
5030
|
cache = createCache({
|
|
4866
5031
|
key: "css"
|
|
@@ -4944,7 +5109,7 @@ var Emotion$1 = Emotion;
|
|
|
4944
5109
|
import * as React9 from "react";
|
|
4945
5110
|
var import_extends2 = __toESM(require_extends());
|
|
4946
5111
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
4947
|
-
var
|
|
5112
|
+
var jsx84 = function jsx85(type, props) {
|
|
4948
5113
|
var args = arguments;
|
|
4949
5114
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
4950
5115
|
return React9.createElement.apply(void 0, args);
|
|
@@ -4962,7 +5127,7 @@ var jsx76 = function jsx77(type, props) {
|
|
|
4962
5127
|
var JSX;
|
|
4963
5128
|
/* @__PURE__ */ (function(_JSX) {
|
|
4964
5129
|
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
4965
|
-
})(
|
|
5130
|
+
})(jsx84 || (jsx84 = {}));
|
|
4966
5131
|
function css() {
|
|
4967
5132
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4968
5133
|
args[_key] = arguments[_key];
|
|
@@ -4992,7 +5157,7 @@ function _taggedTemplateLiteral(e, t) {
|
|
|
4992
5157
|
}
|
|
4993
5158
|
|
|
4994
5159
|
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/index-641ee5b8.esm.js
|
|
4995
|
-
import { useContext as
|
|
5160
|
+
import { useContext as useContext21, useRef as useRef5, useState as useState4, useMemo as useMemo3, useCallback as useCallback2, createContext as createContext11 } from "react";
|
|
4996
5161
|
import { createPortal } from "react-dom";
|
|
4997
5162
|
|
|
4998
5163
|
// ../../node_modules/.pnpm/@floating-ui+utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
@@ -5729,11 +5894,11 @@ var menuCSS = function menuCSS2(_ref23, unstyled) {
|
|
|
5729
5894
|
marginTop: spacing2.menuGutter
|
|
5730
5895
|
});
|
|
5731
5896
|
};
|
|
5732
|
-
var PortalPlacementContext = /* @__PURE__ */
|
|
5897
|
+
var PortalPlacementContext = /* @__PURE__ */ createContext11(null);
|
|
5733
5898
|
var MenuPlacer = function MenuPlacer2(props) {
|
|
5734
5899
|
var children = props.children, minMenuHeight = props.minMenuHeight, maxMenuHeight = props.maxMenuHeight, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition, menuShouldScrollIntoView = props.menuShouldScrollIntoView, theme = props.theme;
|
|
5735
|
-
var _ref3 =
|
|
5736
|
-
var ref =
|
|
5900
|
+
var _ref3 = useContext21(PortalPlacementContext) || {}, setPortalPlacement = _ref3.setPortalPlacement;
|
|
5901
|
+
var ref = useRef5(null);
|
|
5737
5902
|
var _useState = useState4(maxMenuHeight), _useState2 = _slicedToArray(_useState, 2), maxHeight = _useState2[0], setMaxHeight = _useState2[1];
|
|
5738
5903
|
var _useState3 = useState4(null), _useState4 = _slicedToArray(_useState3, 2), placement = _useState4[0], setPlacement = _useState4[1];
|
|
5739
5904
|
var controlHeight2 = theme.spacing.controlHeight;
|
|
@@ -5765,7 +5930,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
5765
5930
|
};
|
|
5766
5931
|
var Menu3 = function Menu4(props) {
|
|
5767
5932
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
5768
|
-
return
|
|
5933
|
+
return jsx84("div", _extends({}, getStyleProps(props, "menu", {
|
|
5769
5934
|
menu: true
|
|
5770
5935
|
}), {
|
|
5771
5936
|
ref: innerRef
|
|
@@ -5787,7 +5952,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
5787
5952
|
};
|
|
5788
5953
|
var MenuList = function MenuList2(props) {
|
|
5789
5954
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
5790
|
-
return
|
|
5955
|
+
return jsx84("div", _extends({}, getStyleProps(props, "menuList", {
|
|
5791
5956
|
"menu-list": true,
|
|
5792
5957
|
"menu-list--is-multi": isMulti
|
|
5793
5958
|
}), {
|
|
@@ -5807,7 +5972,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
5807
5972
|
var loadingMessageCSS = noticeCSS;
|
|
5808
5973
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
5809
5974
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
5810
|
-
return
|
|
5975
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
5811
5976
|
children,
|
|
5812
5977
|
innerProps
|
|
5813
5978
|
}), "noOptionsMessage", {
|
|
@@ -5817,7 +5982,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
5817
5982
|
};
|
|
5818
5983
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
5819
5984
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
5820
|
-
return
|
|
5985
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
5821
5986
|
children,
|
|
5822
5987
|
innerProps
|
|
5823
5988
|
}), "loadingMessage", {
|
|
@@ -5837,8 +6002,8 @@ var menuPortalCSS = function menuPortalCSS2(_ref8) {
|
|
|
5837
6002
|
};
|
|
5838
6003
|
var MenuPortal = function MenuPortal2(props) {
|
|
5839
6004
|
var appendTo = props.appendTo, children = props.children, controlElement = props.controlElement, innerProps = props.innerProps, menuPlacement = props.menuPlacement, menuPosition = props.menuPosition;
|
|
5840
|
-
var menuPortalRef =
|
|
5841
|
-
var cleanupRef =
|
|
6005
|
+
var menuPortalRef = useRef5(null);
|
|
6006
|
+
var cleanupRef = useRef5(null);
|
|
5842
6007
|
var _useState5 = useState4(coercePlacement(menuPlacement)), _useState6 = _slicedToArray(_useState5, 2), placement = _useState6[0], setPortalPlacement = _useState6[1];
|
|
5843
6008
|
var portalPlacementContext = useMemo3(function() {
|
|
5844
6009
|
return {
|
|
@@ -5880,7 +6045,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
5880
6045
|
runAutoUpdate();
|
|
5881
6046
|
}, [runAutoUpdate]);
|
|
5882
6047
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
5883
|
-
var menuWrapper =
|
|
6048
|
+
var menuWrapper = jsx84("div", _extends({
|
|
5884
6049
|
ref: setMenuPortalElement
|
|
5885
6050
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
5886
6051
|
offset: computedPosition.offset,
|
|
@@ -5889,7 +6054,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
5889
6054
|
}), "menuPortal", {
|
|
5890
6055
|
"menu-portal": true
|
|
5891
6056
|
}), innerProps), children);
|
|
5892
|
-
return
|
|
6057
|
+
return jsx84(PortalPlacementContext.Provider, {
|
|
5893
6058
|
value: portalPlacementContext
|
|
5894
6059
|
}, appendTo ? /* @__PURE__ */ createPortal(menuWrapper, appendTo) : menuWrapper);
|
|
5895
6060
|
};
|
|
@@ -5905,7 +6070,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
5905
6070
|
};
|
|
5906
6071
|
var SelectContainer = function SelectContainer2(props) {
|
|
5907
6072
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
5908
|
-
return
|
|
6073
|
+
return jsx84("div", _extends({}, getStyleProps(props, "container", {
|
|
5909
6074
|
"--is-disabled": isDisabled,
|
|
5910
6075
|
"--is-rtl": isRtl
|
|
5911
6076
|
}), innerProps), children);
|
|
@@ -5926,7 +6091,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
5926
6091
|
};
|
|
5927
6092
|
var ValueContainer = function ValueContainer2(props) {
|
|
5928
6093
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
5929
|
-
return
|
|
6094
|
+
return jsx84("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
5930
6095
|
"value-container": true,
|
|
5931
6096
|
"value-container--is-multi": isMulti,
|
|
5932
6097
|
"value-container--has-value": hasValue
|
|
@@ -5942,7 +6107,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
5942
6107
|
};
|
|
5943
6108
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
5944
6109
|
var children = props.children, innerProps = props.innerProps;
|
|
5945
|
-
return
|
|
6110
|
+
return jsx84("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
5946
6111
|
indicators: true
|
|
5947
6112
|
}), innerProps), children);
|
|
5948
6113
|
};
|
|
@@ -5963,7 +6128,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
5963
6128
|
};
|
|
5964
6129
|
var Svg = function Svg2(_ref3) {
|
|
5965
6130
|
var size2 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
5966
|
-
return
|
|
6131
|
+
return jsx84("svg", _extends({
|
|
5967
6132
|
height: size2,
|
|
5968
6133
|
width: size2,
|
|
5969
6134
|
viewBox: "0 0 20 20",
|
|
@@ -5973,16 +6138,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
5973
6138
|
}, props));
|
|
5974
6139
|
};
|
|
5975
6140
|
var CrossIcon = function CrossIcon2(props) {
|
|
5976
|
-
return
|
|
6141
|
+
return jsx84(Svg, _extends({
|
|
5977
6142
|
size: 20
|
|
5978
|
-
}, props),
|
|
6143
|
+
}, props), jsx84("path", {
|
|
5979
6144
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
5980
6145
|
}));
|
|
5981
6146
|
};
|
|
5982
6147
|
var DownChevron = function DownChevron2(props) {
|
|
5983
|
-
return
|
|
6148
|
+
return jsx84(Svg, _extends({
|
|
5984
6149
|
size: 20
|
|
5985
|
-
}, props),
|
|
6150
|
+
}, props), jsx84("path", {
|
|
5986
6151
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
5987
6152
|
}));
|
|
5988
6153
|
};
|
|
@@ -6003,18 +6168,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
6003
6168
|
var dropdownIndicatorCSS = baseCSS;
|
|
6004
6169
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
6005
6170
|
var children = props.children, innerProps = props.innerProps;
|
|
6006
|
-
return
|
|
6171
|
+
return jsx84("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
6007
6172
|
indicator: true,
|
|
6008
6173
|
"dropdown-indicator": true
|
|
6009
|
-
}), innerProps), children ||
|
|
6174
|
+
}), innerProps), children || jsx84(DownChevron, null));
|
|
6010
6175
|
};
|
|
6011
6176
|
var clearIndicatorCSS = baseCSS;
|
|
6012
6177
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
6013
6178
|
var children = props.children, innerProps = props.innerProps;
|
|
6014
|
-
return
|
|
6179
|
+
return jsx84("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
6015
6180
|
indicator: true,
|
|
6016
6181
|
"clear-indicator": true
|
|
6017
|
-
}), innerProps), children ||
|
|
6182
|
+
}), innerProps), children || jsx84(CrossIcon, null));
|
|
6018
6183
|
};
|
|
6019
6184
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
6020
6185
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -6030,7 +6195,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
6030
6195
|
};
|
|
6031
6196
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
6032
6197
|
var innerProps = props.innerProps;
|
|
6033
|
-
return
|
|
6198
|
+
return jsx84("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
6034
6199
|
"indicator-separator": true
|
|
6035
6200
|
})));
|
|
6036
6201
|
};
|
|
@@ -6054,7 +6219,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
6054
6219
|
};
|
|
6055
6220
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
6056
6221
|
var delay = _ref6.delay, offset2 = _ref6.offset;
|
|
6057
|
-
return
|
|
6222
|
+
return jsx84("span", {
|
|
6058
6223
|
css: /* @__PURE__ */ css({
|
|
6059
6224
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
6060
6225
|
backgroundColor: "currentColor",
|
|
@@ -6069,20 +6234,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
6069
6234
|
};
|
|
6070
6235
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
6071
6236
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size2 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
6072
|
-
return
|
|
6237
|
+
return jsx84("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
6073
6238
|
innerProps,
|
|
6074
6239
|
isRtl,
|
|
6075
6240
|
size: size2
|
|
6076
6241
|
}), "loadingIndicator", {
|
|
6077
6242
|
indicator: true,
|
|
6078
6243
|
"loading-indicator": true
|
|
6079
|
-
}), innerProps),
|
|
6244
|
+
}), innerProps), jsx84(LoadingDot, {
|
|
6080
6245
|
delay: 0,
|
|
6081
6246
|
offset: isRtl
|
|
6082
|
-
}),
|
|
6247
|
+
}), jsx84(LoadingDot, {
|
|
6083
6248
|
delay: 160,
|
|
6084
6249
|
offset: true
|
|
6085
|
-
}),
|
|
6250
|
+
}), jsx84(LoadingDot, {
|
|
6086
6251
|
delay: 320,
|
|
6087
6252
|
offset: !isRtl
|
|
6088
6253
|
}));
|
|
@@ -6114,7 +6279,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
6114
6279
|
};
|
|
6115
6280
|
var Control = function Control2(props) {
|
|
6116
6281
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
6117
|
-
return
|
|
6282
|
+
return jsx84("div", _extends({
|
|
6118
6283
|
ref: innerRef
|
|
6119
6284
|
}, getStyleProps(props, "control", {
|
|
6120
6285
|
control: true,
|
|
@@ -6135,16 +6300,16 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
6135
6300
|
};
|
|
6136
6301
|
};
|
|
6137
6302
|
var Group2 = function Group3(props) {
|
|
6138
|
-
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames2 = props.getClassNames,
|
|
6139
|
-
return
|
|
6303
|
+
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames2 = props.getClassNames, Heading5 = props.Heading, headingProps = props.headingProps, innerProps = props.innerProps, label = props.label, theme = props.theme, selectProps = props.selectProps;
|
|
6304
|
+
return jsx84("div", _extends({}, getStyleProps(props, "group", {
|
|
6140
6305
|
group: true
|
|
6141
|
-
}), innerProps),
|
|
6306
|
+
}), innerProps), jsx84(Heading5, _extends({}, headingProps, {
|
|
6142
6307
|
selectProps,
|
|
6143
6308
|
theme,
|
|
6144
6309
|
getStyles,
|
|
6145
6310
|
getClassNames: getClassNames2,
|
|
6146
6311
|
cx
|
|
6147
|
-
}), label),
|
|
6312
|
+
}), label), jsx84("div", null, children));
|
|
6148
6313
|
};
|
|
6149
6314
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
6150
6315
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -6166,7 +6331,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
6166
6331
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
6167
6332
|
_cleanCommonProps.data;
|
|
6168
6333
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
6169
|
-
return
|
|
6334
|
+
return jsx84("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
6170
6335
|
"group-heading": true
|
|
6171
6336
|
}), innerProps));
|
|
6172
6337
|
};
|
|
@@ -6218,11 +6383,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
6218
6383
|
var Input2 = function Input3(props) {
|
|
6219
6384
|
var cx = props.cx, value = props.value;
|
|
6220
6385
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
6221
|
-
return
|
|
6386
|
+
return jsx84("div", _extends({}, getStyleProps(props, "input", {
|
|
6222
6387
|
"input-container": true
|
|
6223
6388
|
}), {
|
|
6224
6389
|
"data-value": value || ""
|
|
6225
|
-
}),
|
|
6390
|
+
}), jsx84("input", _extends({
|
|
6226
6391
|
className: cx({
|
|
6227
6392
|
input: true
|
|
6228
6393
|
}, inputClassName),
|
|
@@ -6276,35 +6441,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
6276
6441
|
};
|
|
6277
6442
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
6278
6443
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
6279
|
-
return
|
|
6444
|
+
return jsx84("div", innerProps, children);
|
|
6280
6445
|
};
|
|
6281
6446
|
var MultiValueContainer = MultiValueGeneric;
|
|
6282
6447
|
var MultiValueLabel = MultiValueGeneric;
|
|
6283
6448
|
function MultiValueRemove(_ref5) {
|
|
6284
6449
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
6285
|
-
return
|
|
6450
|
+
return jsx84("div", _extends({
|
|
6286
6451
|
role: "button"
|
|
6287
|
-
}, innerProps), children ||
|
|
6452
|
+
}, innerProps), children || jsx84(CrossIcon, {
|
|
6288
6453
|
size: 14
|
|
6289
6454
|
}));
|
|
6290
6455
|
}
|
|
6291
6456
|
var MultiValue = function MultiValue2(props) {
|
|
6292
6457
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
6293
6458
|
var Container2 = components2.Container, Label3 = components2.Label, Remove = components2.Remove;
|
|
6294
|
-
return
|
|
6459
|
+
return jsx84(Container2, {
|
|
6295
6460
|
data,
|
|
6296
6461
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
6297
6462
|
"multi-value": true,
|
|
6298
6463
|
"multi-value--is-disabled": isDisabled
|
|
6299
6464
|
})), innerProps),
|
|
6300
6465
|
selectProps
|
|
6301
|
-
},
|
|
6466
|
+
}, jsx84(Label3, {
|
|
6302
6467
|
data,
|
|
6303
6468
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
6304
6469
|
"multi-value__label": true
|
|
6305
6470
|
})),
|
|
6306
6471
|
selectProps
|
|
6307
|
-
}, children),
|
|
6472
|
+
}, children), jsx84(Remove, {
|
|
6308
6473
|
data,
|
|
6309
6474
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
6310
6475
|
"multi-value__remove": true
|
|
@@ -6337,7 +6502,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
6337
6502
|
};
|
|
6338
6503
|
var Option = function Option2(props) {
|
|
6339
6504
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
6340
|
-
return
|
|
6505
|
+
return jsx84("div", _extends({}, getStyleProps(props, "option", {
|
|
6341
6506
|
option: true,
|
|
6342
6507
|
"option--is-disabled": isDisabled,
|
|
6343
6508
|
"option--is-focused": isFocused,
|
|
@@ -6361,7 +6526,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
6361
6526
|
};
|
|
6362
6527
|
var Placeholder = function Placeholder2(props) {
|
|
6363
6528
|
var children = props.children, innerProps = props.innerProps;
|
|
6364
|
-
return
|
|
6529
|
+
return jsx84("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
6365
6530
|
placeholder: true
|
|
6366
6531
|
}), innerProps), children);
|
|
6367
6532
|
};
|
|
@@ -6383,7 +6548,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
6383
6548
|
};
|
|
6384
6549
|
var SingleValue = function SingleValue2(props) {
|
|
6385
6550
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
6386
|
-
return
|
|
6551
|
+
return jsx84("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
6387
6552
|
"single-value": true,
|
|
6388
6553
|
"single-value--is-disabled": isDisabled
|
|
6389
6554
|
}), innerProps), children);
|
|
@@ -6485,7 +6650,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
6485
6650
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
6486
6651
|
};
|
|
6487
6652
|
var A11yText = function A11yText2(props) {
|
|
6488
|
-
return
|
|
6653
|
+
return jsx84("span", _extends({
|
|
6489
6654
|
css: _ref
|
|
6490
6655
|
}, props));
|
|
6491
6656
|
};
|
|
@@ -6620,18 +6785,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6620
6785
|
}
|
|
6621
6786
|
return guidanceMsg;
|
|
6622
6787
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
6623
|
-
var ScreenReaderText =
|
|
6788
|
+
var ScreenReaderText = jsx84(Fragment8, null, jsx84("span", {
|
|
6624
6789
|
id: "aria-selection"
|
|
6625
|
-
}, ariaSelected),
|
|
6790
|
+
}, ariaSelected), jsx84("span", {
|
|
6626
6791
|
id: "aria-focused"
|
|
6627
|
-
}, ariaFocused),
|
|
6792
|
+
}, ariaFocused), jsx84("span", {
|
|
6628
6793
|
id: "aria-results"
|
|
6629
|
-
}, ariaResults),
|
|
6794
|
+
}, ariaResults), jsx84("span", {
|
|
6630
6795
|
id: "aria-guidance"
|
|
6631
6796
|
}, ariaGuidance));
|
|
6632
|
-
return
|
|
6797
|
+
return jsx84(Fragment8, null, jsx84(A11yText$1, {
|
|
6633
6798
|
id
|
|
6634
|
-
}, isInitialFocus && ScreenReaderText),
|
|
6799
|
+
}, isInitialFocus && ScreenReaderText), jsx84(A11yText$1, {
|
|
6635
6800
|
"aria-live": ariaLive,
|
|
6636
6801
|
"aria-atomic": "false",
|
|
6637
6802
|
"aria-relevant": "additions text",
|
|
@@ -6944,7 +7109,7 @@ var _excluded4 = ["innerRef"];
|
|
|
6944
7109
|
function DummyInput(_ref3) {
|
|
6945
7110
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
6946
7111
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
6947
|
-
return
|
|
7112
|
+
return jsx84("input", _extends({
|
|
6948
7113
|
ref: innerRef
|
|
6949
7114
|
}, filteredProps, {
|
|
6950
7115
|
css: /* @__PURE__ */ css({
|
|
@@ -6976,10 +7141,10 @@ var cancelScroll = function cancelScroll2(event) {
|
|
|
6976
7141
|
};
|
|
6977
7142
|
function useScrollCapture(_ref3) {
|
|
6978
7143
|
var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
|
|
6979
|
-
var isBottom =
|
|
6980
|
-
var isTop =
|
|
6981
|
-
var touchStart =
|
|
6982
|
-
var scrollTarget =
|
|
7144
|
+
var isBottom = useRef6(false);
|
|
7145
|
+
var isTop = useRef6(false);
|
|
7146
|
+
var touchStart = useRef6(0);
|
|
7147
|
+
var scrollTarget = useRef6(null);
|
|
6983
7148
|
var handleEventDelta = useCallback3(function(event, delta) {
|
|
6984
7149
|
if (scrollTarget.current === null) return;
|
|
6985
7150
|
var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
|
|
@@ -7086,8 +7251,8 @@ var listenerOptions = {
|
|
|
7086
7251
|
};
|
|
7087
7252
|
function useScrollLock(_ref3) {
|
|
7088
7253
|
var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
7089
|
-
var originalStyles =
|
|
7090
|
-
var scrollTarget =
|
|
7254
|
+
var originalStyles = useRef6({});
|
|
7255
|
+
var scrollTarget = useRef6(null);
|
|
7091
7256
|
var addScrollLock = useCallback3(function(touchScrollTarget) {
|
|
7092
7257
|
if (!canUseDOM) return;
|
|
7093
7258
|
var target = document.body;
|
|
@@ -7186,7 +7351,7 @@ function ScrollManager(_ref3) {
|
|
|
7186
7351
|
setScrollCaptureTarget(element);
|
|
7187
7352
|
setScrollLockTarget(element);
|
|
7188
7353
|
};
|
|
7189
|
-
return
|
|
7354
|
+
return jsx84(Fragment8, null, lockEnabled && jsx84("div", {
|
|
7190
7355
|
onClick: blurSelectInput,
|
|
7191
7356
|
css: _ref2$1
|
|
7192
7357
|
}), children(targetRef));
|
|
@@ -7205,7 +7370,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
7205
7370
|
};
|
|
7206
7371
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
7207
7372
|
var name = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
7208
|
-
return
|
|
7373
|
+
return jsx84("input", {
|
|
7209
7374
|
required: true,
|
|
7210
7375
|
name,
|
|
7211
7376
|
tabIndex: -1,
|
|
@@ -8780,7 +8945,7 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
8780
8945
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
8781
8946
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
8782
8947
|
import "react-dom";
|
|
8783
|
-
var StateManagedSelect = /* @__PURE__ */
|
|
8948
|
+
var StateManagedSelect = /* @__PURE__ */ forwardRef23(function(props, ref) {
|
|
8784
8949
|
var baseSelectProps = useStateManager(props);
|
|
8785
8950
|
return /* @__PURE__ */ React11.createElement(Select, _extends({
|
|
8786
8951
|
ref
|
|
@@ -8788,7 +8953,7 @@ var StateManagedSelect = /* @__PURE__ */ forwardRef22(function(props, ref) {
|
|
|
8788
8953
|
});
|
|
8789
8954
|
var StateManagedSelect$1 = StateManagedSelect;
|
|
8790
8955
|
|
|
8791
|
-
// ../../node_modules/.pnpm/@react-aria+label@3.7.
|
|
8956
|
+
// ../../node_modules/.pnpm/@react-aria+label@3.7.17_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/label/dist/useLabel.mjs
|
|
8792
8957
|
import { useId as $83Elw$useId, useLabels as $83Elw$useLabels } from "@react-aria/utils";
|
|
8793
8958
|
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
8794
8959
|
let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
|
|
@@ -8801,7 +8966,7 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
8801
8966
|
id: labelId,
|
|
8802
8967
|
htmlFor: labelElementType === "label" ? id : void 0
|
|
8803
8968
|
};
|
|
8804
|
-
} else if (!ariaLabelledby && !ariaLabel) console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
|
|
8969
|
+
} else if (!ariaLabelledby && !ariaLabel && process.env.NODE_ENV !== "production") console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");
|
|
8805
8970
|
let fieldProps = (0, $83Elw$useLabels)({
|
|
8806
8971
|
id,
|
|
8807
8972
|
"aria-label": ariaLabel,
|
|
@@ -8813,7 +8978,7 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
8813
8978
|
};
|
|
8814
8979
|
}
|
|
8815
8980
|
|
|
8816
|
-
// ../../node_modules/.pnpm/@react-aria+label@3.7.
|
|
8981
|
+
// ../../node_modules/.pnpm/@react-aria+label@3.7.17_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/label/dist/useField.mjs
|
|
8817
8982
|
import { useSlotId as $2kC82$useSlotId, mergeProps as $2kC82$mergeProps } from "@react-aria/utils";
|
|
8818
8983
|
function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
8819
8984
|
let { description, errorMessage, isInvalid, validationState } = props;
|
|
@@ -8852,8 +9017,8 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
|
8852
9017
|
|
|
8853
9018
|
// src/Multiselect/Multiselect.tsx
|
|
8854
9019
|
import { useId } from "@react-aria/utils";
|
|
8855
|
-
import { cn as
|
|
8856
|
-
import { jsx as
|
|
9020
|
+
import { cn as cn47, useClassNames as useClassNames48 } from "@marigold/system";
|
|
9021
|
+
import { jsx as jsx86, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
8857
9022
|
var propsToBeRemoved = [
|
|
8858
9023
|
"clearValue",
|
|
8859
9024
|
"getStyles",
|
|
@@ -8879,7 +9044,7 @@ var Input4 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
|
8879
9044
|
},
|
|
8880
9045
|
{}
|
|
8881
9046
|
);
|
|
8882
|
-
return /* @__PURE__ */
|
|
9047
|
+
return /* @__PURE__ */ jsx86(
|
|
8883
9048
|
_Input2,
|
|
8884
9049
|
{
|
|
8885
9050
|
disabled: props.isDisabled,
|
|
@@ -8890,20 +9055,20 @@ var Input4 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
|
8890
9055
|
);
|
|
8891
9056
|
};
|
|
8892
9057
|
var MultiValueRemove2 = ({ innerProps }) => {
|
|
8893
|
-
return /* @__PURE__ */
|
|
9058
|
+
return /* @__PURE__ */ jsx86(Button6, { slot: "remove", ...innerProps, children: /* @__PURE__ */ jsx86("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx86("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
8894
9059
|
};
|
|
8895
9060
|
var getClassNames = (classNames3) => ({
|
|
8896
|
-
control: () =>
|
|
9061
|
+
control: () => cn47(
|
|
8897
9062
|
"relative flex items-center box-border flex-wrap justify-between",
|
|
8898
9063
|
classNames3.container
|
|
8899
9064
|
),
|
|
8900
9065
|
container: () => "pointer-events-auto",
|
|
8901
9066
|
indicatorSeparator: () => "hidden",
|
|
8902
|
-
menu: () =>
|
|
8903
|
-
menuList: () =>
|
|
8904
|
-
multiValue: () =>
|
|
9067
|
+
menu: () => cn47("b", classNames3.listContainer),
|
|
9068
|
+
menuList: () => cn47("overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh] p-0", classNames3.list),
|
|
9069
|
+
multiValue: () => cn47(classNames3.tag, "m-0 "),
|
|
8905
9070
|
multiValueLabel: () => "p-0",
|
|
8906
|
-
option: ({ isFocused }) =>
|
|
9071
|
+
option: ({ isFocused }) => cn47(classNames3.option, { isFocused }),
|
|
8907
9072
|
placeholder: () => "hidden",
|
|
8908
9073
|
valueContainer: () => classNames3.valueContainer
|
|
8909
9074
|
});
|
|
@@ -8924,7 +9089,7 @@ var Multiselect = ({
|
|
|
8924
9089
|
onSelectionChange,
|
|
8925
9090
|
...rest
|
|
8926
9091
|
}) => {
|
|
8927
|
-
const classNames3 =
|
|
9092
|
+
const classNames3 = useClassNames48({
|
|
8928
9093
|
component: "MultiSelect",
|
|
8929
9094
|
size: size2,
|
|
8930
9095
|
variant
|
|
@@ -8942,7 +9107,7 @@ var Multiselect = ({
|
|
|
8942
9107
|
label: props.label,
|
|
8943
9108
|
errorMessage
|
|
8944
9109
|
});
|
|
8945
|
-
return /* @__PURE__ */
|
|
9110
|
+
return /* @__PURE__ */ jsx86(
|
|
8946
9111
|
Provider2,
|
|
8947
9112
|
{
|
|
8948
9113
|
values: [
|
|
@@ -8968,20 +9133,20 @@ var Multiselect = ({
|
|
|
8968
9133
|
// react-select doesn't handle readonly so we had to do it manually here
|
|
8969
9134
|
// keep to the button disabled in read only to prevent menu from opening
|
|
8970
9135
|
isDisabled: disabled || readOnly,
|
|
8971
|
-
className:
|
|
9136
|
+
className: cn47("flex items-center", classNames3.closeButton)
|
|
8972
9137
|
}
|
|
8973
9138
|
]
|
|
8974
9139
|
],
|
|
8975
|
-
children: /* @__PURE__ */
|
|
9140
|
+
children: /* @__PURE__ */ jsxs29(
|
|
8976
9141
|
"div",
|
|
8977
9142
|
{
|
|
8978
|
-
className:
|
|
9143
|
+
className: cn47(classNames3.field, "group/field"),
|
|
8979
9144
|
"data-required": props.required,
|
|
8980
9145
|
"data-invalid": error,
|
|
8981
9146
|
"data-readonly": readOnly,
|
|
8982
9147
|
children: [
|
|
8983
|
-
props.label && /* @__PURE__ */
|
|
8984
|
-
/* @__PURE__ */
|
|
9148
|
+
props.label && /* @__PURE__ */ jsx86(_Label, { ...labelProps, children: props.label }),
|
|
9149
|
+
/* @__PURE__ */ jsx86(
|
|
8985
9150
|
StateManagedSelect$1,
|
|
8986
9151
|
{
|
|
8987
9152
|
...props,
|
|
@@ -9015,19 +9180,19 @@ var Multiselect = ({
|
|
|
9015
9180
|
components: {
|
|
9016
9181
|
Input: Input4,
|
|
9017
9182
|
MultiValueRemove: MultiValueRemove2,
|
|
9018
|
-
DropdownIndicator: ({ innerProps, isDisabled }) => /* @__PURE__ */
|
|
9183
|
+
DropdownIndicator: ({ innerProps, isDisabled }) => /* @__PURE__ */ jsx86(
|
|
9019
9184
|
"button",
|
|
9020
9185
|
{
|
|
9021
9186
|
...innerProps,
|
|
9022
9187
|
disabled: isDisabled,
|
|
9023
9188
|
className: classNames3.icon,
|
|
9024
|
-
children: /* @__PURE__ */
|
|
9189
|
+
children: /* @__PURE__ */ jsx86(ChevronDown, { className: "size-4" })
|
|
9025
9190
|
}
|
|
9026
9191
|
)
|
|
9027
9192
|
}
|
|
9028
9193
|
}
|
|
9029
9194
|
),
|
|
9030
|
-
/* @__PURE__ */
|
|
9195
|
+
/* @__PURE__ */ jsx86(HelpText, { description, errorMessage })
|
|
9031
9196
|
]
|
|
9032
9197
|
}
|
|
9033
9198
|
)
|
|
@@ -9036,15 +9201,15 @@ var Multiselect = ({
|
|
|
9036
9201
|
};
|
|
9037
9202
|
|
|
9038
9203
|
// src/NumberField/NumberField.tsx
|
|
9039
|
-
import { forwardRef as
|
|
9204
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
9040
9205
|
import { Group as Group4, Input as Input5, NumberField } from "react-aria-components";
|
|
9041
|
-
import { cn as
|
|
9206
|
+
import { cn as cn49, useClassNames as useClassNames49 } from "@marigold/system";
|
|
9042
9207
|
|
|
9043
9208
|
// src/NumberField/StepButton.tsx
|
|
9044
|
-
import { Button as
|
|
9045
|
-
import { cn as
|
|
9046
|
-
import { jsx as
|
|
9047
|
-
var Plus = () => /* @__PURE__ */
|
|
9209
|
+
import { Button as Button7 } from "react-aria-components";
|
|
9210
|
+
import { cn as cn48 } from "@marigold/system";
|
|
9211
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
9212
|
+
var Plus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx87(
|
|
9048
9213
|
"path",
|
|
9049
9214
|
{
|
|
9050
9215
|
fillRule: "evenodd",
|
|
@@ -9052,7 +9217,7 @@ var Plus = () => /* @__PURE__ */ jsx79("svg", { width: 16, height: 16, viewBox:
|
|
|
9052
9217
|
d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
|
|
9053
9218
|
}
|
|
9054
9219
|
) });
|
|
9055
|
-
var Minus = () => /* @__PURE__ */
|
|
9220
|
+
var Minus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx87(
|
|
9056
9221
|
"path",
|
|
9057
9222
|
{
|
|
9058
9223
|
fillRule: "evenodd",
|
|
@@ -9062,10 +9227,10 @@ var Minus = () => /* @__PURE__ */ jsx79("svg", { width: 16, height: 16, viewBox:
|
|
|
9062
9227
|
) });
|
|
9063
9228
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
9064
9229
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
9065
|
-
return /* @__PURE__ */
|
|
9066
|
-
|
|
9230
|
+
return /* @__PURE__ */ jsx87(
|
|
9231
|
+
Button7,
|
|
9067
9232
|
{
|
|
9068
|
-
className:
|
|
9233
|
+
className: cn48(
|
|
9069
9234
|
[
|
|
9070
9235
|
"flex items-center justify-center",
|
|
9071
9236
|
"cursor-pointer data-disabled:cursor-not-allowed"
|
|
@@ -9073,14 +9238,14 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
9073
9238
|
className
|
|
9074
9239
|
),
|
|
9075
9240
|
...props,
|
|
9076
|
-
children: /* @__PURE__ */
|
|
9241
|
+
children: /* @__PURE__ */ jsx87(Icon4, {})
|
|
9077
9242
|
}
|
|
9078
9243
|
);
|
|
9079
9244
|
};
|
|
9080
9245
|
|
|
9081
9246
|
// src/NumberField/NumberField.tsx
|
|
9082
|
-
import { jsx as
|
|
9083
|
-
var _NumberField =
|
|
9247
|
+
import { jsx as jsx88, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
9248
|
+
var _NumberField = forwardRef24(
|
|
9084
9249
|
({
|
|
9085
9250
|
variant,
|
|
9086
9251
|
size: size2,
|
|
@@ -9091,7 +9256,7 @@ var _NumberField = forwardRef23(
|
|
|
9091
9256
|
hideStepper,
|
|
9092
9257
|
...rest
|
|
9093
9258
|
}, ref) => {
|
|
9094
|
-
const classNames3 =
|
|
9259
|
+
const classNames3 = useClassNames49({
|
|
9095
9260
|
component: "NumberField",
|
|
9096
9261
|
size: size2,
|
|
9097
9262
|
variant
|
|
@@ -9104,15 +9269,15 @@ var _NumberField = forwardRef23(
|
|
|
9104
9269
|
...rest
|
|
9105
9270
|
};
|
|
9106
9271
|
const showStepper = !hideStepper && !readOnly;
|
|
9107
|
-
return /* @__PURE__ */
|
|
9272
|
+
return /* @__PURE__ */ jsx88(
|
|
9108
9273
|
FieldBase,
|
|
9109
9274
|
{
|
|
9110
9275
|
as: NumberField,
|
|
9111
9276
|
...props,
|
|
9112
9277
|
"data-readonly": readOnly ? "true" : void 0,
|
|
9113
9278
|
"data-stepper": showStepper ? "true" : void 0,
|
|
9114
|
-
children: /* @__PURE__ */
|
|
9115
|
-
showStepper && /* @__PURE__ */
|
|
9279
|
+
children: /* @__PURE__ */ jsxs30(Group4, { className: cn49("flex items-stretch", classNames3.group), children: [
|
|
9280
|
+
showStepper && /* @__PURE__ */ jsx88(
|
|
9116
9281
|
_StepButton,
|
|
9117
9282
|
{
|
|
9118
9283
|
className: classNames3.stepper,
|
|
@@ -9120,14 +9285,14 @@ var _NumberField = forwardRef23(
|
|
|
9120
9285
|
slot: "decrement"
|
|
9121
9286
|
}
|
|
9122
9287
|
),
|
|
9123
|
-
/* @__PURE__ */
|
|
9288
|
+
/* @__PURE__ */ jsx88(
|
|
9124
9289
|
Input5,
|
|
9125
9290
|
{
|
|
9126
9291
|
ref,
|
|
9127
|
-
className:
|
|
9292
|
+
className: cn49("h-full flex-1 outline-none", classNames3.input)
|
|
9128
9293
|
}
|
|
9129
9294
|
),
|
|
9130
|
-
showStepper && /* @__PURE__ */
|
|
9295
|
+
showStepper && /* @__PURE__ */ jsx88(
|
|
9131
9296
|
_StepButton,
|
|
9132
9297
|
{
|
|
9133
9298
|
className: classNames3.stepper,
|
|
@@ -9142,13 +9307,14 @@ var _NumberField = forwardRef23(
|
|
|
9142
9307
|
);
|
|
9143
9308
|
|
|
9144
9309
|
// src/Pagination/Pagination.tsx
|
|
9145
|
-
import { useEffect as
|
|
9146
|
-
import {
|
|
9310
|
+
import { useEffect as useEffect4, useRef as useRef9, useState as useState5 } from "react";
|
|
9311
|
+
import { FocusScope as FocusScope2, useFocusManager } from "@react-aria/focus";
|
|
9312
|
+
import { useClassNames as useClassNames52 } from "@marigold/system";
|
|
9147
9313
|
|
|
9148
9314
|
// src/Pagination/Ellipsis.tsx
|
|
9149
|
-
import { jsx as
|
|
9315
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
9150
9316
|
var Ellipsis = () => {
|
|
9151
|
-
return /* @__PURE__ */
|
|
9317
|
+
return /* @__PURE__ */ jsx89(
|
|
9152
9318
|
"span",
|
|
9153
9319
|
{
|
|
9154
9320
|
className: "text-text-base flex h-8 w-8 items-center justify-center",
|
|
@@ -9159,13 +9325,13 @@ var Ellipsis = () => {
|
|
|
9159
9325
|
};
|
|
9160
9326
|
|
|
9161
9327
|
// src/Pagination/NavigationButton.tsx
|
|
9162
|
-
import
|
|
9328
|
+
import { useRef as useRef7 } from "react";
|
|
9163
9329
|
import { useButton as useButton2 } from "@react-aria/button";
|
|
9164
|
-
import { cn as
|
|
9165
|
-
import { jsxs as
|
|
9330
|
+
import { cn as cn50, useClassNames as useClassNames50 } from "@marigold/system";
|
|
9331
|
+
import { jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9166
9332
|
var NavigationButton = (props) => {
|
|
9167
|
-
const ref =
|
|
9168
|
-
const classNames3 =
|
|
9333
|
+
const ref = useRef7(null);
|
|
9334
|
+
const classNames3 = useClassNames50({
|
|
9169
9335
|
component: "Pagination"
|
|
9170
9336
|
});
|
|
9171
9337
|
let { buttonProps } = useButton2(props, ref);
|
|
@@ -9178,20 +9344,14 @@ var NavigationButton = (props) => {
|
|
|
9178
9344
|
position: position2,
|
|
9179
9345
|
...rest
|
|
9180
9346
|
} = props;
|
|
9181
|
-
|
|
9182
|
-
if (registerRef) {
|
|
9183
|
-
registerRef(ref.current);
|
|
9184
|
-
return () => registerRef(null);
|
|
9185
|
-
}
|
|
9186
|
-
}, [registerRef]);
|
|
9187
|
-
return /* @__PURE__ */ jsxs30(
|
|
9347
|
+
return /* @__PURE__ */ jsxs31(
|
|
9188
9348
|
"button",
|
|
9189
9349
|
{
|
|
9190
9350
|
ref,
|
|
9191
9351
|
...buttonProps,
|
|
9192
9352
|
...rest,
|
|
9193
9353
|
disabled: isDisabled,
|
|
9194
|
-
className:
|
|
9354
|
+
className: cn50(classNames3.navigationButton, controlLabel && "w-24 px-2"),
|
|
9195
9355
|
"data-selected": isSelected,
|
|
9196
9356
|
children: [
|
|
9197
9357
|
position2 === "left" && children,
|
|
@@ -9203,24 +9363,18 @@ var NavigationButton = (props) => {
|
|
|
9203
9363
|
};
|
|
9204
9364
|
|
|
9205
9365
|
// src/Pagination/PageButton.tsx
|
|
9206
|
-
import {
|
|
9366
|
+
import { useRef as useRef8 } from "react";
|
|
9207
9367
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
9208
|
-
import { useClassNames as
|
|
9209
|
-
import { jsx as
|
|
9368
|
+
import { useClassNames as useClassNames51 } from "@marigold/system";
|
|
9369
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
9210
9370
|
var PageButton = (props) => {
|
|
9211
|
-
const ref =
|
|
9212
|
-
const classNames3 =
|
|
9371
|
+
const ref = useRef8(null);
|
|
9372
|
+
const classNames3 = useClassNames51({
|
|
9213
9373
|
component: "Pagination"
|
|
9214
9374
|
});
|
|
9215
9375
|
let { buttonProps } = useButton3(props, ref);
|
|
9216
|
-
let { page, selected,
|
|
9217
|
-
|
|
9218
|
-
if (registerRef) {
|
|
9219
|
-
registerRef(ref.current);
|
|
9220
|
-
return () => registerRef(null);
|
|
9221
|
-
}
|
|
9222
|
-
}, [registerRef]);
|
|
9223
|
-
return /* @__PURE__ */ jsx82(
|
|
9376
|
+
let { page, selected, isDisabled } = props;
|
|
9377
|
+
return /* @__PURE__ */ jsx90(
|
|
9224
9378
|
"button",
|
|
9225
9379
|
{
|
|
9226
9380
|
ref,
|
|
@@ -9236,122 +9390,6 @@ var PageButton = (props) => {
|
|
|
9236
9390
|
);
|
|
9237
9391
|
};
|
|
9238
9392
|
|
|
9239
|
-
// src/Pagination/useKeyboardNavigation.tsx
|
|
9240
|
-
import { useCallback as useCallback4, useRef as useRef7, useState as useState5 } from "react";
|
|
9241
|
-
import { useKeyboard } from "@react-aria/interactions";
|
|
9242
|
-
var NavigationTypes = {
|
|
9243
|
-
Prev: "prev",
|
|
9244
|
-
Next: "next",
|
|
9245
|
-
Page: "page",
|
|
9246
|
-
Ellipsis: "ellipsis"
|
|
9247
|
-
};
|
|
9248
|
-
var useKeyboardNavigation = ({
|
|
9249
|
-
page,
|
|
9250
|
-
totalPages,
|
|
9251
|
-
onChange: onChange2 = () => {
|
|
9252
|
-
}
|
|
9253
|
-
}) => {
|
|
9254
|
-
const containerRef = useRef7(null);
|
|
9255
|
-
const [focusedItem, setFocusedItem] = useState5({
|
|
9256
|
-
type: "page",
|
|
9257
|
-
value: page
|
|
9258
|
-
});
|
|
9259
|
-
const navigationItems = useRef7([]);
|
|
9260
|
-
const buttonRefs = useRef7(/* @__PURE__ */ new Map());
|
|
9261
|
-
const isItemDisabled = useCallback4(
|
|
9262
|
-
(item) => {
|
|
9263
|
-
if (item.type === NavigationTypes.Prev) return page <= 1;
|
|
9264
|
-
if (item.type === NavigationTypes.Next) return page >= totalPages;
|
|
9265
|
-
return item.type === NavigationTypes.Ellipsis;
|
|
9266
|
-
},
|
|
9267
|
-
[page, totalPages]
|
|
9268
|
-
);
|
|
9269
|
-
const findNextFocusableItem = useCallback4(
|
|
9270
|
-
(current, direction) => {
|
|
9271
|
-
const items = navigationItems.current.filter(
|
|
9272
|
-
(item) => !isItemDisabled(item)
|
|
9273
|
-
);
|
|
9274
|
-
const currentIndex = items.findIndex(
|
|
9275
|
-
(item) => item.type === current.type && item.value === current.value
|
|
9276
|
-
);
|
|
9277
|
-
if (currentIndex === -1) {
|
|
9278
|
-
return items[0] || { type: NavigationTypes.Page, value: page };
|
|
9279
|
-
}
|
|
9280
|
-
const nextIndex = direction === "next" ? (currentIndex + 1) % items.length : (currentIndex - 1 + items.length) % items.length;
|
|
9281
|
-
return items[nextIndex];
|
|
9282
|
-
},
|
|
9283
|
-
[isItemDisabled, page]
|
|
9284
|
-
);
|
|
9285
|
-
const focusItem = useCallback4(
|
|
9286
|
-
(item) => {
|
|
9287
|
-
if (isItemDisabled(item)) return;
|
|
9288
|
-
const key = `${item.type}-${item.value}`;
|
|
9289
|
-
const element = buttonRefs.current.get(key);
|
|
9290
|
-
if (element && typeof element.focus === "function") {
|
|
9291
|
-
element.focus();
|
|
9292
|
-
setFocusedItem(item);
|
|
9293
|
-
}
|
|
9294
|
-
},
|
|
9295
|
-
[isItemDisabled]
|
|
9296
|
-
);
|
|
9297
|
-
const { keyboardProps } = useKeyboard({
|
|
9298
|
-
onKeyDown: (e) => {
|
|
9299
|
-
let newFocusedItem = focusedItem;
|
|
9300
|
-
switch (e.key) {
|
|
9301
|
-
case "ArrowLeft":
|
|
9302
|
-
newFocusedItem = findNextFocusableItem(focusedItem, "prev");
|
|
9303
|
-
break;
|
|
9304
|
-
case "ArrowRight":
|
|
9305
|
-
newFocusedItem = findNextFocusableItem(focusedItem, "next");
|
|
9306
|
-
break;
|
|
9307
|
-
case "Home":
|
|
9308
|
-
newFocusedItem = navigationItems.current.find((item) => !isItemDisabled(item)) || focusedItem;
|
|
9309
|
-
break;
|
|
9310
|
-
case "End":
|
|
9311
|
-
newFocusedItem = [...navigationItems.current].reverse().find((item) => !isItemDisabled(item)) || focusedItem;
|
|
9312
|
-
break;
|
|
9313
|
-
case "Enter":
|
|
9314
|
-
case " ":
|
|
9315
|
-
if (isItemDisabled(focusedItem)) return;
|
|
9316
|
-
if (focusedItem.type === NavigationTypes.Page && typeof focusedItem.value === "number") {
|
|
9317
|
-
onChange2(focusedItem.value);
|
|
9318
|
-
} else if (focusedItem.type === NavigationTypes.Prev && page > 1) {
|
|
9319
|
-
onChange2(page - 1);
|
|
9320
|
-
} else if (focusedItem.type === NavigationTypes.Next && page < totalPages) {
|
|
9321
|
-
onChange2(page + 1);
|
|
9322
|
-
}
|
|
9323
|
-
break;
|
|
9324
|
-
default:
|
|
9325
|
-
return;
|
|
9326
|
-
}
|
|
9327
|
-
if (newFocusedItem !== focusedItem) {
|
|
9328
|
-
focusItem(newFocusedItem);
|
|
9329
|
-
}
|
|
9330
|
-
}
|
|
9331
|
-
});
|
|
9332
|
-
const registerRef = useCallback4(
|
|
9333
|
-
(type, value, ref) => {
|
|
9334
|
-
const key = `${type}-${value}`;
|
|
9335
|
-
if (ref) {
|
|
9336
|
-
buttonRefs.current.set(key, ref);
|
|
9337
|
-
} else {
|
|
9338
|
-
buttonRefs.current.delete(key);
|
|
9339
|
-
}
|
|
9340
|
-
},
|
|
9341
|
-
[]
|
|
9342
|
-
);
|
|
9343
|
-
const setNavigationItems = useCallback4((items) => {
|
|
9344
|
-
navigationItems.current = items;
|
|
9345
|
-
}, []);
|
|
9346
|
-
return {
|
|
9347
|
-
containerRef,
|
|
9348
|
-
keyboardProps,
|
|
9349
|
-
registerRef,
|
|
9350
|
-
setNavigationItems,
|
|
9351
|
-
setFocusedItem
|
|
9352
|
-
};
|
|
9353
|
-
};
|
|
9354
|
-
|
|
9355
9393
|
// src/Pagination/usePageRange.tsx
|
|
9356
9394
|
var usePageRange = ({ currentPage, totalPages }) => {
|
|
9357
9395
|
const getPageRange = () => {
|
|
@@ -9383,23 +9421,21 @@ var usePageRange = ({ currentPage, totalPages }) => {
|
|
|
9383
9421
|
};
|
|
9384
9422
|
|
|
9385
9423
|
// src/Pagination/Pagination.tsx
|
|
9386
|
-
import { jsx as
|
|
9387
|
-
var
|
|
9388
|
-
|
|
9389
|
-
page,
|
|
9390
|
-
totalItems,
|
|
9424
|
+
import { Fragment as Fragment9, jsx as jsx91, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9425
|
+
var InnerPagination = ({
|
|
9426
|
+
currentPage,
|
|
9391
9427
|
pageSize,
|
|
9392
|
-
|
|
9393
|
-
|
|
9428
|
+
totalPages,
|
|
9429
|
+
pageRange,
|
|
9430
|
+
setCurrentPage,
|
|
9431
|
+
onChange: onChange2,
|
|
9394
9432
|
controlLabels
|
|
9395
9433
|
}) => {
|
|
9396
|
-
const
|
|
9397
|
-
const
|
|
9398
|
-
const
|
|
9399
|
-
const
|
|
9400
|
-
|
|
9401
|
-
});
|
|
9402
|
-
useEffect6(() => {
|
|
9434
|
+
const focusManager = useFocusManager();
|
|
9435
|
+
const isFirstPage = currentPage === 1;
|
|
9436
|
+
const isLastPage = currentPage === totalPages || totalPages === 0;
|
|
9437
|
+
const isFirstRender = useRef9(true);
|
|
9438
|
+
useEffect4(() => {
|
|
9403
9439
|
if (isFirstRender.current) {
|
|
9404
9440
|
isFirstRender.current = false;
|
|
9405
9441
|
return;
|
|
@@ -9408,96 +9444,110 @@ var _Pagination = ({
|
|
|
9408
9444
|
}, [pageSize]);
|
|
9409
9445
|
const handlePageChange = (newPage) => {
|
|
9410
9446
|
setCurrentPage(newPage);
|
|
9411
|
-
onChange2
|
|
9447
|
+
if (onChange2) {
|
|
9448
|
+
onChange2(newPage);
|
|
9449
|
+
}
|
|
9412
9450
|
};
|
|
9413
|
-
const
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9451
|
+
const classNames3 = useClassNames52({ component: "Pagination" });
|
|
9452
|
+
const handleKeyDown = (onEnter) => (e) => {
|
|
9453
|
+
if (e.key === "ArrowRight") {
|
|
9454
|
+
e.preventDefault();
|
|
9455
|
+
focusManager == null ? void 0 : focusManager.focusNext({ wrap: true });
|
|
9456
|
+
} else if (e.key === "ArrowLeft") {
|
|
9457
|
+
e.preventDefault();
|
|
9458
|
+
focusManager == null ? void 0 : focusManager.focusPrevious({ wrap: true });
|
|
9459
|
+
} else if (e.key === "Enter" || e.key === " ") {
|
|
9460
|
+
e.preventDefault();
|
|
9461
|
+
onEnter();
|
|
9462
|
+
}
|
|
9463
|
+
};
|
|
9464
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
9465
|
+
/* @__PURE__ */ jsx91(
|
|
9466
|
+
NavigationButton,
|
|
9467
|
+
{
|
|
9468
|
+
onClick: () => handlePageChange(Math.max(1, currentPage - 1)),
|
|
9469
|
+
"aria-label": "Page previous",
|
|
9470
|
+
isDisabled: isFirstPage,
|
|
9471
|
+
controlLabel: controlLabels == null ? void 0 : controlLabels[0],
|
|
9472
|
+
position: "left",
|
|
9473
|
+
onKeyDown: handleKeyDown(() => handlePageChange(currentPage - 1)),
|
|
9474
|
+
children: /* @__PURE__ */ jsx91(ChevronLeft, { className: classNames3.icon })
|
|
9475
|
+
}
|
|
9476
|
+
),
|
|
9477
|
+
/* @__PURE__ */ jsx91("div", { className: "flex items-center space-x-2", children: totalPages > 0 ? pageRange.map(
|
|
9478
|
+
(pageNumber, index2) => pageNumber === "ellipsis" ? /* @__PURE__ */ jsx91(Ellipsis, {}, `ellipsis-${index2}`) : /* @__PURE__ */ jsx91(
|
|
9479
|
+
PageButton,
|
|
9480
|
+
{
|
|
9481
|
+
page: pageNumber,
|
|
9482
|
+
selected: pageNumber === currentPage,
|
|
9483
|
+
onClick: () => handlePageChange(pageNumber),
|
|
9484
|
+
onKeyDown: handleKeyDown(() => handlePageChange(pageNumber))
|
|
9485
|
+
},
|
|
9486
|
+
pageNumber
|
|
9487
|
+
)
|
|
9488
|
+
) : /* @__PURE__ */ jsx91(PageButton, { page: 1, isDisabled: true }, 1) }),
|
|
9489
|
+
/* @__PURE__ */ jsx91(
|
|
9490
|
+
NavigationButton,
|
|
9491
|
+
{
|
|
9492
|
+
onClick: () => handlePageChange(Math.min(totalPages, currentPage + 1)),
|
|
9493
|
+
"aria-label": "Page next",
|
|
9494
|
+
isDisabled: isLastPage,
|
|
9495
|
+
controlLabel: controlLabels == null ? void 0 : controlLabels[1],
|
|
9496
|
+
position: "right",
|
|
9497
|
+
onKeyDown: handleKeyDown(() => handlePageChange(currentPage + 1)),
|
|
9498
|
+
children: /* @__PURE__ */ jsx91(ChevronRight, { className: classNames3.icon })
|
|
9499
|
+
}
|
|
9500
|
+
)
|
|
9501
|
+
] });
|
|
9502
|
+
};
|
|
9503
|
+
var _Pagination = ({
|
|
9504
|
+
defaultPage = 1,
|
|
9505
|
+
page,
|
|
9506
|
+
totalItems,
|
|
9507
|
+
pageSize,
|
|
9508
|
+
...props
|
|
9509
|
+
}) => {
|
|
9510
|
+
const [currentPage, setCurrentPage] = useState5(page != null ? page : defaultPage);
|
|
9511
|
+
const totalPages = Math.ceil(totalItems / pageSize);
|
|
9418
9512
|
const pageRange = usePageRange({ currentPage, totalPages });
|
|
9419
|
-
|
|
9420
|
-
const items = [
|
|
9421
|
-
{ type: NavigationTypes.Prev, value: currentPage - 1 },
|
|
9422
|
-
...pageRange.map((value) => ({
|
|
9423
|
-
type: typeof value === "number" ? NavigationTypes.Page : NavigationTypes.Ellipsis,
|
|
9424
|
-
value
|
|
9425
|
-
})),
|
|
9426
|
-
{ type: NavigationTypes.Next, value: currentPage + 1 }
|
|
9427
|
-
];
|
|
9428
|
-
setNavigationItems(items);
|
|
9429
|
-
}, [pageRange, currentPage, setNavigationItems]);
|
|
9430
|
-
useEffect6(() => {
|
|
9431
|
-
setFocusedItem({ type: NavigationTypes.Page, value: currentPage });
|
|
9432
|
-
}, [currentPage, setFocusedItem]);
|
|
9433
|
-
const isFirstPage = currentPage === 1;
|
|
9434
|
-
const isLastPage = currentPage === totalPages || totalPages === 0;
|
|
9435
|
-
return /* @__PURE__ */ jsxs31(
|
|
9513
|
+
return /* @__PURE__ */ jsx91(
|
|
9436
9514
|
"nav",
|
|
9437
9515
|
{
|
|
9438
9516
|
className: "flex items-center justify-center space-x-2",
|
|
9439
9517
|
"aria-label": `Page ${currentPage} of ${totalPages}`,
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
children: /* @__PURE__ */ jsx83(ChevronLeft, { className: cn45(classNames3.icon) })
|
|
9452
|
-
}
|
|
9453
|
-
),
|
|
9454
|
-
/* @__PURE__ */ jsx83("div", { className: "flex items-center space-x-2", children: totalPages > 0 ? pageRange.map(
|
|
9455
|
-
(pageNumber, index2) => pageNumber === "ellipsis" ? /* @__PURE__ */ jsx83(Ellipsis, {}, `ellipsis-${index2}`) : /* @__PURE__ */ jsx83(
|
|
9456
|
-
PageButton,
|
|
9457
|
-
{
|
|
9458
|
-
page: pageNumber,
|
|
9459
|
-
selected: pageNumber === currentPage,
|
|
9460
|
-
onClick: () => handlePageChange(pageNumber),
|
|
9461
|
-
registerRef: (ref) => registerRef(NavigationTypes.Page, pageNumber, ref)
|
|
9462
|
-
},
|
|
9463
|
-
pageNumber
|
|
9464
|
-
)
|
|
9465
|
-
) : /* @__PURE__ */ jsx83(PageButton, { page: 1, isDisabled: true }, 1) }),
|
|
9466
|
-
/* @__PURE__ */ jsx83(
|
|
9467
|
-
NavigationButton,
|
|
9468
|
-
{
|
|
9469
|
-
onClick: () => handlePageChange(Math.min(totalPages, currentPage + 1)),
|
|
9470
|
-
"aria-label": "Page next",
|
|
9471
|
-
isDisabled: isLastPage,
|
|
9472
|
-
registerRef: (ref) => registerRef(NavigationTypes.Next, currentPage + 1, ref),
|
|
9473
|
-
controlLabel: controlLabels == null ? void 0 : controlLabels[1],
|
|
9474
|
-
position: "right",
|
|
9475
|
-
children: /* @__PURE__ */ jsx83(ChevronRight, { className: cn45(classNames3.icon) })
|
|
9476
|
-
}
|
|
9477
|
-
)
|
|
9478
|
-
]
|
|
9518
|
+
children: /* @__PURE__ */ jsx91(FocusScope2, { restoreFocus: true, children: /* @__PURE__ */ jsx91(
|
|
9519
|
+
InnerPagination,
|
|
9520
|
+
{
|
|
9521
|
+
pageSize,
|
|
9522
|
+
currentPage,
|
|
9523
|
+
totalPages,
|
|
9524
|
+
pageRange,
|
|
9525
|
+
setCurrentPage,
|
|
9526
|
+
...props
|
|
9527
|
+
}
|
|
9528
|
+
) })
|
|
9479
9529
|
}
|
|
9480
9530
|
);
|
|
9481
9531
|
};
|
|
9482
9532
|
|
|
9483
9533
|
// src/Radio/Radio.tsx
|
|
9484
9534
|
import {
|
|
9485
|
-
forwardRef as
|
|
9535
|
+
forwardRef as forwardRef25
|
|
9486
9536
|
} from "react";
|
|
9487
9537
|
import { Radio } from "react-aria-components";
|
|
9488
|
-
import { cn as
|
|
9538
|
+
import { cn as cn52, useClassNames as useClassNames54 } from "@marigold/system";
|
|
9489
9539
|
|
|
9490
9540
|
// src/Radio/Context.ts
|
|
9491
|
-
import { createContext as
|
|
9492
|
-
var RadioGroupContext =
|
|
9541
|
+
import { createContext as createContext12, useContext as useContext22 } from "react";
|
|
9542
|
+
var RadioGroupContext = createContext12(
|
|
9493
9543
|
null
|
|
9494
9544
|
);
|
|
9495
|
-
var useRadioGroupContext = () =>
|
|
9545
|
+
var useRadioGroupContext = () => useContext22(RadioGroupContext);
|
|
9496
9546
|
|
|
9497
9547
|
// src/Radio/RadioGroup.tsx
|
|
9498
9548
|
import { RadioGroup } from "react-aria-components";
|
|
9499
|
-
import { cn as
|
|
9500
|
-
import { jsx as
|
|
9549
|
+
import { cn as cn51, useClassNames as useClassNames53 } from "@marigold/system";
|
|
9550
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
9501
9551
|
var _RadioGroup = ({
|
|
9502
9552
|
variant,
|
|
9503
9553
|
size: size2,
|
|
@@ -9513,7 +9563,7 @@ var _RadioGroup = ({
|
|
|
9513
9563
|
width,
|
|
9514
9564
|
...rest
|
|
9515
9565
|
}) => {
|
|
9516
|
-
const classNames3 =
|
|
9566
|
+
const classNames3 = useClassNames53({ component: "Radio", variant, size: size2 });
|
|
9517
9567
|
const props = {
|
|
9518
9568
|
isDisabled: disabled,
|
|
9519
9569
|
isReadOnly: readOnly,
|
|
@@ -9521,7 +9571,7 @@ var _RadioGroup = ({
|
|
|
9521
9571
|
isInvalid: error,
|
|
9522
9572
|
...rest
|
|
9523
9573
|
};
|
|
9524
|
-
return /* @__PURE__ */
|
|
9574
|
+
return /* @__PURE__ */ jsx92(
|
|
9525
9575
|
FieldBase,
|
|
9526
9576
|
{
|
|
9527
9577
|
as: RadioGroup,
|
|
@@ -9532,18 +9582,18 @@ var _RadioGroup = ({
|
|
|
9532
9582
|
variant,
|
|
9533
9583
|
size: size2,
|
|
9534
9584
|
...props,
|
|
9535
|
-
children: /* @__PURE__ */
|
|
9585
|
+
children: /* @__PURE__ */ jsx92(
|
|
9536
9586
|
"div",
|
|
9537
9587
|
{
|
|
9538
9588
|
role: "presentation",
|
|
9539
9589
|
"data-testid": "group",
|
|
9540
9590
|
"data-orientation": orientation,
|
|
9541
|
-
className:
|
|
9591
|
+
className: cn51(
|
|
9542
9592
|
classNames3.group,
|
|
9543
9593
|
"flex items-start",
|
|
9544
9594
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
9545
9595
|
),
|
|
9546
|
-
children: /* @__PURE__ */
|
|
9596
|
+
children: /* @__PURE__ */ jsx92(RadioGroupContext.Provider, { value: { width, variant, size: size2 }, children })
|
|
9547
9597
|
}
|
|
9548
9598
|
)
|
|
9549
9599
|
}
|
|
@@ -9551,33 +9601,33 @@ var _RadioGroup = ({
|
|
|
9551
9601
|
};
|
|
9552
9602
|
|
|
9553
9603
|
// src/Radio/Radio.tsx
|
|
9554
|
-
import { Fragment as
|
|
9555
|
-
var Dot = () => /* @__PURE__ */
|
|
9556
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
9604
|
+
import { Fragment as Fragment10, jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9605
|
+
var Dot = () => /* @__PURE__ */ jsx93("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx93("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
9606
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx93(
|
|
9557
9607
|
"div",
|
|
9558
9608
|
{
|
|
9559
|
-
className:
|
|
9609
|
+
className: cn52(
|
|
9560
9610
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
9561
9611
|
className
|
|
9562
9612
|
),
|
|
9563
9613
|
"aria-hidden": "true",
|
|
9564
9614
|
...props,
|
|
9565
|
-
children: checked ? /* @__PURE__ */
|
|
9615
|
+
children: checked ? /* @__PURE__ */ jsx93(Dot, {}) : null
|
|
9566
9616
|
}
|
|
9567
9617
|
);
|
|
9568
|
-
var _Radio =
|
|
9618
|
+
var _Radio = forwardRef25(
|
|
9569
9619
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
9570
9620
|
const { variant, size: size2, width: groupWidth } = useRadioGroupContext();
|
|
9571
|
-
const classNames3 =
|
|
9621
|
+
const classNames3 = useClassNames54({
|
|
9572
9622
|
component: "Radio",
|
|
9573
9623
|
variant: variant || props.variant,
|
|
9574
9624
|
size: size2 || props.size
|
|
9575
9625
|
});
|
|
9576
|
-
return /* @__PURE__ */
|
|
9626
|
+
return /* @__PURE__ */ jsx93(
|
|
9577
9627
|
Radio,
|
|
9578
9628
|
{
|
|
9579
9629
|
ref,
|
|
9580
|
-
className:
|
|
9630
|
+
className: cn52(
|
|
9581
9631
|
"group/radio",
|
|
9582
9632
|
"relative flex items-center gap-[1ch]",
|
|
9583
9633
|
width || groupWidth || "w-full",
|
|
@@ -9586,18 +9636,18 @@ var _Radio = forwardRef24(
|
|
|
9586
9636
|
value,
|
|
9587
9637
|
isDisabled: disabled,
|
|
9588
9638
|
...props,
|
|
9589
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
9590
|
-
/* @__PURE__ */
|
|
9639
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs33(Fragment10, { children: [
|
|
9640
|
+
/* @__PURE__ */ jsx93(
|
|
9591
9641
|
Icon3,
|
|
9592
9642
|
{
|
|
9593
9643
|
checked: isSelected,
|
|
9594
|
-
className:
|
|
9644
|
+
className: cn52(
|
|
9595
9645
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
9596
9646
|
classNames3.radio
|
|
9597
9647
|
)
|
|
9598
9648
|
}
|
|
9599
9649
|
),
|
|
9600
|
-
/* @__PURE__ */
|
|
9650
|
+
/* @__PURE__ */ jsx93("div", { className: classNames3.label, children })
|
|
9601
9651
|
] })
|
|
9602
9652
|
}
|
|
9603
9653
|
);
|
|
@@ -9606,10 +9656,10 @@ var _Radio = forwardRef24(
|
|
|
9606
9656
|
_Radio.Group = _RadioGroup;
|
|
9607
9657
|
|
|
9608
9658
|
// src/SearchField/SearchField.tsx
|
|
9609
|
-
import { forwardRef as
|
|
9659
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
9610
9660
|
import { SearchField } from "react-aria-components";
|
|
9611
|
-
import { jsx as
|
|
9612
|
-
var _SearchField =
|
|
9661
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
9662
|
+
var _SearchField = forwardRef26(
|
|
9613
9663
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
9614
9664
|
const props = {
|
|
9615
9665
|
...rest,
|
|
@@ -9618,7 +9668,7 @@ var _SearchField = forwardRef25(
|
|
|
9618
9668
|
isReadOnly: readOnly,
|
|
9619
9669
|
isInvalid: error
|
|
9620
9670
|
};
|
|
9621
|
-
return /* @__PURE__ */
|
|
9671
|
+
return /* @__PURE__ */ jsx94(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx94(
|
|
9622
9672
|
SearchInput,
|
|
9623
9673
|
{
|
|
9624
9674
|
ref,
|
|
@@ -9629,11 +9679,11 @@ var _SearchField = forwardRef25(
|
|
|
9629
9679
|
);
|
|
9630
9680
|
|
|
9631
9681
|
// src/Select/Select.tsx
|
|
9632
|
-
import { forwardRef as
|
|
9682
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
9633
9683
|
import { Select as Select2, SelectValue } from "react-aria-components";
|
|
9634
|
-
import { cn as
|
|
9635
|
-
import { jsx as
|
|
9636
|
-
var _Select =
|
|
9684
|
+
import { cn as cn53, useClassNames as useClassNames55 } from "@marigold/system";
|
|
9685
|
+
import { jsx as jsx95, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9686
|
+
var _Select = forwardRef27(
|
|
9637
9687
|
({
|
|
9638
9688
|
disabled,
|
|
9639
9689
|
required,
|
|
@@ -9653,22 +9703,22 @@ var _Select = forwardRef26(
|
|
|
9653
9703
|
onSelectionChange: onChange2,
|
|
9654
9704
|
...rest
|
|
9655
9705
|
};
|
|
9656
|
-
const classNames3 =
|
|
9657
|
-
return /* @__PURE__ */
|
|
9658
|
-
/* @__PURE__ */
|
|
9706
|
+
const classNames3 = useClassNames55({ component: "Select", variant, size: size2 });
|
|
9707
|
+
return /* @__PURE__ */ jsxs34(FieldBase, { as: Select2, ref, variant, size: size2, ...props, children: [
|
|
9708
|
+
/* @__PURE__ */ jsxs34(
|
|
9659
9709
|
IconButton,
|
|
9660
9710
|
{
|
|
9661
|
-
className:
|
|
9711
|
+
className: cn53(
|
|
9662
9712
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
9663
9713
|
classNames3.select
|
|
9664
9714
|
),
|
|
9665
9715
|
children: [
|
|
9666
|
-
/* @__PURE__ */
|
|
9667
|
-
/* @__PURE__ */
|
|
9716
|
+
/* @__PURE__ */ jsx95(SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
9717
|
+
/* @__PURE__ */ jsx95(ChevronDown, { className: cn53("size-4", classNames3.icon) })
|
|
9668
9718
|
]
|
|
9669
9719
|
}
|
|
9670
9720
|
),
|
|
9671
|
-
/* @__PURE__ */
|
|
9721
|
+
/* @__PURE__ */ jsx95(_Popover, { children: /* @__PURE__ */ jsx95(_ListBox, { items, children: props.children }) })
|
|
9672
9722
|
] });
|
|
9673
9723
|
}
|
|
9674
9724
|
);
|
|
@@ -9677,36 +9727,36 @@ _Select.Section = _ListBox.Section;
|
|
|
9677
9727
|
|
|
9678
9728
|
// src/SelectList/SelectList.tsx
|
|
9679
9729
|
import {
|
|
9680
|
-
forwardRef as
|
|
9730
|
+
forwardRef as forwardRef29
|
|
9681
9731
|
} from "react";
|
|
9682
9732
|
import { GridList as SelectList } from "react-aria-components";
|
|
9683
|
-
import { cn as
|
|
9733
|
+
import { cn as cn55, useClassNames as useClassNames56 } from "@marigold/system";
|
|
9684
9734
|
|
|
9685
9735
|
// src/SelectList/Context.ts
|
|
9686
|
-
import { createContext as
|
|
9687
|
-
var SelectListContext =
|
|
9736
|
+
import { createContext as createContext13, useContext as useContext23 } from "react";
|
|
9737
|
+
var SelectListContext = createContext13(
|
|
9688
9738
|
{}
|
|
9689
9739
|
);
|
|
9690
|
-
var useSelectListContext = () =>
|
|
9740
|
+
var useSelectListContext = () => useContext23(SelectListContext);
|
|
9691
9741
|
|
|
9692
9742
|
// src/SelectList/SelectListItem.tsx
|
|
9693
|
-
import { forwardRef as
|
|
9743
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
9694
9744
|
import { GridListItem as SelectListItem } from "react-aria-components";
|
|
9695
|
-
import { cn as
|
|
9696
|
-
import { jsx as
|
|
9697
|
-
var _SelectListItem =
|
|
9745
|
+
import { cn as cn54 } from "@marigold/system";
|
|
9746
|
+
import { jsx as jsx96, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9747
|
+
var _SelectListItem = forwardRef28(
|
|
9698
9748
|
({ children, ...props }, ref) => {
|
|
9699
9749
|
let textValue = typeof children === "string" ? children : void 0;
|
|
9700
9750
|
const { classNames: classNames3 } = useSelectListContext();
|
|
9701
|
-
return /* @__PURE__ */
|
|
9751
|
+
return /* @__PURE__ */ jsx96(
|
|
9702
9752
|
SelectListItem,
|
|
9703
9753
|
{
|
|
9704
9754
|
textValue,
|
|
9705
9755
|
...props,
|
|
9706
|
-
className:
|
|
9756
|
+
className: cn54("group-[layout=grid]/list:flex-row", classNames3 == null ? void 0 : classNames3.option),
|
|
9707
9757
|
ref,
|
|
9708
|
-
children: ({ selectionMode }) => /* @__PURE__ */
|
|
9709
|
-
selectionMode === "multiple" && /* @__PURE__ */
|
|
9758
|
+
children: ({ selectionMode }) => /* @__PURE__ */ jsxs35("div", { className: "flex gap-2", children: [
|
|
9759
|
+
selectionMode === "multiple" && /* @__PURE__ */ jsx96(_Checkbox, { slot: "selection" }),
|
|
9710
9760
|
children
|
|
9711
9761
|
] })
|
|
9712
9762
|
}
|
|
@@ -9715,21 +9765,21 @@ var _SelectListItem = forwardRef27(
|
|
|
9715
9765
|
);
|
|
9716
9766
|
|
|
9717
9767
|
// src/SelectList/SelectList.tsx
|
|
9718
|
-
import { jsx as
|
|
9719
|
-
var _SelectList =
|
|
9768
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
9769
|
+
var _SelectList = forwardRef29(
|
|
9720
9770
|
({ onChange: onChange2, ...rest }, ref) => {
|
|
9721
|
-
const classNames3 =
|
|
9771
|
+
const classNames3 = useClassNames56({ component: "ListBox" });
|
|
9722
9772
|
const props = {
|
|
9723
9773
|
onSelectionChange: onChange2,
|
|
9724
9774
|
...rest
|
|
9725
9775
|
};
|
|
9726
|
-
return /* @__PURE__ */
|
|
9776
|
+
return /* @__PURE__ */ jsx97(SelectListContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsx97("div", { className: classNames3.container, children: /* @__PURE__ */ jsx97(
|
|
9727
9777
|
SelectList,
|
|
9728
9778
|
{
|
|
9729
9779
|
...props,
|
|
9730
9780
|
layout: "grid",
|
|
9731
9781
|
ref,
|
|
9732
|
-
className:
|
|
9782
|
+
className: cn55(
|
|
9733
9783
|
"group/list overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
9734
9784
|
classNames3.list
|
|
9735
9785
|
),
|
|
@@ -9741,25 +9791,25 @@ var _SelectList = forwardRef28(
|
|
|
9741
9791
|
_SelectList.Item = _SelectListItem;
|
|
9742
9792
|
|
|
9743
9793
|
// src/Scrollable/Scrollable.tsx
|
|
9744
|
-
import { cn as
|
|
9745
|
-
import { jsx as
|
|
9794
|
+
import { cn as cn56, createVar as createVar8, width as twWidth2 } from "@marigold/system";
|
|
9795
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
9746
9796
|
var Scrollable = ({
|
|
9747
9797
|
children,
|
|
9748
9798
|
width = "full",
|
|
9749
9799
|
height,
|
|
9750
9800
|
...props
|
|
9751
|
-
}) => /* @__PURE__ */
|
|
9801
|
+
}) => /* @__PURE__ */ jsx98(
|
|
9752
9802
|
"div",
|
|
9753
9803
|
{
|
|
9754
9804
|
...props,
|
|
9755
|
-
className:
|
|
9805
|
+
className: cn56(["sticky h-(--height) overflow-auto", twWidth2[width]]),
|
|
9756
9806
|
style: createVar8({ height }),
|
|
9757
9807
|
children
|
|
9758
9808
|
}
|
|
9759
9809
|
);
|
|
9760
9810
|
|
|
9761
9811
|
// src/Slider/Slider.tsx
|
|
9762
|
-
import { forwardRef as
|
|
9812
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
9763
9813
|
import {
|
|
9764
9814
|
Slider,
|
|
9765
9815
|
SliderOutput,
|
|
@@ -9767,12 +9817,12 @@ import {
|
|
|
9767
9817
|
SliderTrack
|
|
9768
9818
|
} from "react-aria-components";
|
|
9769
9819
|
import {
|
|
9770
|
-
cn as
|
|
9820
|
+
cn as cn57,
|
|
9771
9821
|
width as twWidth3,
|
|
9772
|
-
useClassNames as
|
|
9822
|
+
useClassNames as useClassNames57
|
|
9773
9823
|
} from "@marigold/system";
|
|
9774
|
-
import { Fragment as
|
|
9775
|
-
var _Slider =
|
|
9824
|
+
import { Fragment as Fragment11, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
9825
|
+
var _Slider = forwardRef30(
|
|
9776
9826
|
({
|
|
9777
9827
|
thumbLabels,
|
|
9778
9828
|
variant,
|
|
@@ -9782,7 +9832,7 @@ var _Slider = forwardRef29(
|
|
|
9782
9832
|
label,
|
|
9783
9833
|
...rest
|
|
9784
9834
|
}, ref) => {
|
|
9785
|
-
const classNames3 =
|
|
9835
|
+
const classNames3 = useClassNames57({
|
|
9786
9836
|
component: "Slider",
|
|
9787
9837
|
variant,
|
|
9788
9838
|
size: size2
|
|
@@ -9791,11 +9841,11 @@ var _Slider = forwardRef29(
|
|
|
9791
9841
|
isDisabled: disabled,
|
|
9792
9842
|
...rest
|
|
9793
9843
|
};
|
|
9794
|
-
return /* @__PURE__ */
|
|
9844
|
+
return /* @__PURE__ */ jsxs36(
|
|
9795
9845
|
FieldBase,
|
|
9796
9846
|
{
|
|
9797
9847
|
as: Slider,
|
|
9798
|
-
className:
|
|
9848
|
+
className: cn57(
|
|
9799
9849
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
9800
9850
|
classNames3.container,
|
|
9801
9851
|
twWidth3[width]
|
|
@@ -9803,26 +9853,26 @@ var _Slider = forwardRef29(
|
|
|
9803
9853
|
ref,
|
|
9804
9854
|
...props,
|
|
9805
9855
|
children: [
|
|
9806
|
-
/* @__PURE__ */
|
|
9807
|
-
/* @__PURE__ */
|
|
9808
|
-
/* @__PURE__ */
|
|
9856
|
+
/* @__PURE__ */ jsx99(_Label, { children: props.children && props.children || label && label }),
|
|
9857
|
+
/* @__PURE__ */ jsx99(SliderOutput, { className: cn57("flex justify-end", classNames3.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
9858
|
+
/* @__PURE__ */ jsx99(
|
|
9809
9859
|
SliderTrack,
|
|
9810
9860
|
{
|
|
9811
|
-
className:
|
|
9812
|
-
children: ({ state }) => /* @__PURE__ */
|
|
9813
|
-
/* @__PURE__ */
|
|
9861
|
+
className: cn57("relative col-span-2 h-2 w-full", classNames3.track),
|
|
9862
|
+
children: ({ state }) => /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
9863
|
+
/* @__PURE__ */ jsx99(
|
|
9814
9864
|
"div",
|
|
9815
9865
|
{
|
|
9816
|
-
className:
|
|
9866
|
+
className: cn57(
|
|
9817
9867
|
"absolute top-[50%] h-2 w-full translate-y-[-50%]",
|
|
9818
9868
|
classNames3.track
|
|
9819
9869
|
)
|
|
9820
9870
|
}
|
|
9821
9871
|
),
|
|
9822
|
-
/* @__PURE__ */
|
|
9872
|
+
/* @__PURE__ */ jsx99(
|
|
9823
9873
|
"div",
|
|
9824
9874
|
{
|
|
9825
|
-
className:
|
|
9875
|
+
className: cn57(
|
|
9826
9876
|
"absolute top-[50%] h-2 translate-y-[-50%]",
|
|
9827
9877
|
classNames3.selectedTrack
|
|
9828
9878
|
),
|
|
@@ -9832,10 +9882,10 @@ var _Slider = forwardRef29(
|
|
|
9832
9882
|
}
|
|
9833
9883
|
}
|
|
9834
9884
|
),
|
|
9835
|
-
state.values.map((_, i) => /* @__PURE__ */
|
|
9885
|
+
state.values.map((_, i) => /* @__PURE__ */ jsx99(
|
|
9836
9886
|
SliderThumb,
|
|
9837
9887
|
{
|
|
9838
|
-
className:
|
|
9888
|
+
className: cn57("top-1/2 cursor-pointer", classNames3.thumb),
|
|
9839
9889
|
index: i,
|
|
9840
9890
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i],
|
|
9841
9891
|
name: thumbLabels == null ? void 0 : thumbLabels[i]
|
|
@@ -9852,12 +9902,12 @@ var _Slider = forwardRef29(
|
|
|
9852
9902
|
);
|
|
9853
9903
|
|
|
9854
9904
|
// src/Split/Split.tsx
|
|
9855
|
-
import { jsx as
|
|
9856
|
-
var Split = () => /* @__PURE__ */
|
|
9905
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
9906
|
+
var Split = () => /* @__PURE__ */ jsx100("div", { role: "separator", className: "grow" });
|
|
9857
9907
|
|
|
9858
9908
|
// src/Stack/Stack.tsx
|
|
9859
|
-
import { alignment as alignment2, cn as
|
|
9860
|
-
import { jsx as
|
|
9909
|
+
import { alignment as alignment2, cn as cn58, gapSpace as gapSpace8 } from "@marigold/system";
|
|
9910
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
9861
9911
|
var Stack = ({
|
|
9862
9912
|
children,
|
|
9863
9913
|
space = 0,
|
|
@@ -9867,10 +9917,10 @@ var Stack = ({
|
|
|
9867
9917
|
...props
|
|
9868
9918
|
}) => {
|
|
9869
9919
|
var _a, _b, _c, _d;
|
|
9870
|
-
return /* @__PURE__ */
|
|
9920
|
+
return /* @__PURE__ */ jsx101(
|
|
9871
9921
|
"div",
|
|
9872
9922
|
{
|
|
9873
|
-
className:
|
|
9923
|
+
className: cn58(
|
|
9874
9924
|
"flex flex-col",
|
|
9875
9925
|
gapSpace8[space],
|
|
9876
9926
|
alignX && ((_b = (_a = alignment2) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -9884,46 +9934,46 @@ var Stack = ({
|
|
|
9884
9934
|
};
|
|
9885
9935
|
|
|
9886
9936
|
// src/Switch/Switch.tsx
|
|
9887
|
-
import { forwardRef as
|
|
9937
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
9888
9938
|
import { Switch } from "react-aria-components";
|
|
9889
9939
|
import {
|
|
9890
|
-
cn as
|
|
9940
|
+
cn as cn59,
|
|
9891
9941
|
width as twWidth4,
|
|
9892
|
-
useClassNames as
|
|
9942
|
+
useClassNames as useClassNames58
|
|
9893
9943
|
} from "@marigold/system";
|
|
9894
|
-
import { jsx as
|
|
9895
|
-
var _Switch =
|
|
9944
|
+
import { jsx as jsx102, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
9945
|
+
var _Switch = forwardRef31(
|
|
9896
9946
|
({
|
|
9897
9947
|
variant,
|
|
9898
9948
|
size: size2,
|
|
9899
9949
|
width = "full",
|
|
9900
|
-
|
|
9950
|
+
label,
|
|
9901
9951
|
selected,
|
|
9902
9952
|
disabled,
|
|
9903
9953
|
readOnly,
|
|
9904
9954
|
...rest
|
|
9905
9955
|
}, ref) => {
|
|
9906
|
-
const classNames3 =
|
|
9956
|
+
const classNames3 = useClassNames58({ component: "Switch", size: size2, variant });
|
|
9907
9957
|
const props = {
|
|
9908
9958
|
isDisabled: disabled,
|
|
9909
9959
|
isReadOnly: readOnly,
|
|
9910
9960
|
isSelected: selected,
|
|
9911
9961
|
...rest
|
|
9912
9962
|
};
|
|
9913
|
-
return /* @__PURE__ */
|
|
9963
|
+
return /* @__PURE__ */ jsxs37(
|
|
9914
9964
|
Switch,
|
|
9915
9965
|
{
|
|
9916
9966
|
...props,
|
|
9917
9967
|
ref,
|
|
9918
|
-
className:
|
|
9968
|
+
className: cn59(
|
|
9919
9969
|
twWidth4[width],
|
|
9920
9970
|
"group/switch",
|
|
9921
9971
|
"flex items-center gap-[1ch]",
|
|
9922
9972
|
classNames3.container
|
|
9923
9973
|
),
|
|
9924
9974
|
children: [
|
|
9925
|
-
/* @__PURE__ */
|
|
9926
|
-
/* @__PURE__ */
|
|
9975
|
+
(props.children || label) && /* @__PURE__ */ jsx102(_Label, { elementType: "span", children: props.children || label }),
|
|
9976
|
+
/* @__PURE__ */ jsx102("div", { className: "relative", children: /* @__PURE__ */ jsx102("div", { className: classNames3.track, children: /* @__PURE__ */ jsx102("div", { className: classNames3.thumb }) }) })
|
|
9927
9977
|
]
|
|
9928
9978
|
}
|
|
9929
9979
|
);
|
|
@@ -9931,26 +9981,26 @@ var _Switch = forwardRef30(
|
|
|
9931
9981
|
);
|
|
9932
9982
|
|
|
9933
9983
|
// src/Table/Table.tsx
|
|
9934
|
-
import { useRef as
|
|
9984
|
+
import { useRef as useRef16 } from "react";
|
|
9935
9985
|
import { useTable } from "@react-aria/table";
|
|
9936
9986
|
import {
|
|
9937
9987
|
TableBody as Body2,
|
|
9938
9988
|
Cell,
|
|
9939
9989
|
Column,
|
|
9940
|
-
TableHeader as
|
|
9990
|
+
TableHeader as Header5,
|
|
9941
9991
|
Row,
|
|
9942
9992
|
useTableState
|
|
9943
9993
|
} from "@react-stately/table";
|
|
9944
|
-
import { cn as
|
|
9994
|
+
import { cn as cn66, useClassNames as useClassNames60 } from "@marigold/system";
|
|
9945
9995
|
|
|
9946
9996
|
// src/Table/Context.tsx
|
|
9947
|
-
import { createContext as
|
|
9948
|
-
var TableContext =
|
|
9949
|
-
var useTableContext = () =>
|
|
9997
|
+
import { createContext as createContext14, useContext as useContext24 } from "react";
|
|
9998
|
+
var TableContext = createContext14({});
|
|
9999
|
+
var useTableContext = () => useContext24(TableContext);
|
|
9950
10000
|
|
|
9951
10001
|
// src/Table/TableBody.tsx
|
|
9952
10002
|
import { useTableRowGroup } from "@react-aria/table";
|
|
9953
|
-
import { jsx as
|
|
10003
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
9954
10004
|
var TableBody = ({
|
|
9955
10005
|
children,
|
|
9956
10006
|
className,
|
|
@@ -9959,7 +10009,7 @@ var TableBody = ({
|
|
|
9959
10009
|
const { rowGroupProps } = useTableRowGroup();
|
|
9960
10010
|
const { state, classNames: classNames3 } = useTableContext();
|
|
9961
10011
|
if (state.collection.size === 0 && emptyState) {
|
|
9962
|
-
return /* @__PURE__ */
|
|
10012
|
+
return /* @__PURE__ */ jsx103("tbody", { className, children: /* @__PURE__ */ jsx103("tr", { className: classNames3 == null ? void 0 : classNames3.row, role: "row", children: /* @__PURE__ */ jsx103(
|
|
9963
10013
|
"td",
|
|
9964
10014
|
{
|
|
9965
10015
|
className: classNames3 == null ? void 0 : classNames3.cell,
|
|
@@ -9969,18 +10019,18 @@ var TableBody = ({
|
|
|
9969
10019
|
}
|
|
9970
10020
|
) }) });
|
|
9971
10021
|
}
|
|
9972
|
-
return /* @__PURE__ */
|
|
10022
|
+
return /* @__PURE__ */ jsx103("tbody", { ...rowGroupProps, className, children });
|
|
9973
10023
|
};
|
|
9974
10024
|
|
|
9975
10025
|
// src/Table/TableCell.tsx
|
|
9976
|
-
import { useRef as
|
|
10026
|
+
import { useRef as useRef10 } from "react";
|
|
9977
10027
|
import { useFocusRing } from "@react-aria/focus";
|
|
9978
10028
|
import { useTableCell } from "@react-aria/table";
|
|
9979
10029
|
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
|
9980
|
-
import { cn as
|
|
9981
|
-
import { jsx as
|
|
10030
|
+
import { cn as cn60, useStateProps } from "@marigold/system";
|
|
10031
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
9982
10032
|
var TableCell = ({ cell, align = "left" }) => {
|
|
9983
|
-
const ref =
|
|
10033
|
+
const ref = useRef10(null);
|
|
9984
10034
|
const { interactive, state, classNames: classNames3 } = useTableContext();
|
|
9985
10035
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
9986
10036
|
const { gridCellProps } = useTableCell(
|
|
@@ -10001,11 +10051,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
10001
10051
|
};
|
|
10002
10052
|
const { focusProps, isFocusVisible } = useFocusRing();
|
|
10003
10053
|
const stateProps = useStateProps({ disabled, focusVisible: isFocusVisible });
|
|
10004
|
-
return /* @__PURE__ */
|
|
10054
|
+
return /* @__PURE__ */ jsx104(
|
|
10005
10055
|
"td",
|
|
10006
10056
|
{
|
|
10007
10057
|
ref,
|
|
10008
|
-
className:
|
|
10058
|
+
className: cn60(classNames3 == null ? void 0 : classNames3.cell),
|
|
10009
10059
|
...mergeProps2(cellProps, focusProps),
|
|
10010
10060
|
...stateProps,
|
|
10011
10061
|
align,
|
|
@@ -10015,11 +10065,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
10015
10065
|
};
|
|
10016
10066
|
|
|
10017
10067
|
// src/Table/TableCheckboxCell.tsx
|
|
10018
|
-
import { useRef as
|
|
10068
|
+
import { useRef as useRef11 } from "react";
|
|
10019
10069
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
10020
10070
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
10021
10071
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
10022
|
-
import { cn as
|
|
10072
|
+
import { cn as cn61, useStateProps as useStateProps2 } from "@marigold/system";
|
|
10023
10073
|
|
|
10024
10074
|
// src/Table/utils.ts
|
|
10025
10075
|
var mapCheckboxProps = ({
|
|
@@ -10042,9 +10092,9 @@ var mapCheckboxProps = ({
|
|
|
10042
10092
|
};
|
|
10043
10093
|
|
|
10044
10094
|
// src/Table/TableCheckboxCell.tsx
|
|
10045
|
-
import { jsx as
|
|
10095
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
10046
10096
|
var TableCheckboxCell = ({ cell }) => {
|
|
10047
|
-
const ref =
|
|
10097
|
+
const ref = useRef11(null);
|
|
10048
10098
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10049
10099
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
10050
10100
|
const { gridCellProps } = useTableCell2(
|
|
@@ -10059,33 +10109,33 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
10059
10109
|
);
|
|
10060
10110
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
10061
10111
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
10062
|
-
return /* @__PURE__ */
|
|
10112
|
+
return /* @__PURE__ */ jsx105(
|
|
10063
10113
|
"td",
|
|
10064
10114
|
{
|
|
10065
10115
|
ref,
|
|
10066
|
-
className:
|
|
10116
|
+
className: cn61("text-center align-middle leading-none", classNames3 == null ? void 0 : classNames3.cell),
|
|
10067
10117
|
...mergeProps3(gridCellProps, focusProps),
|
|
10068
10118
|
...stateProps,
|
|
10069
|
-
children: /* @__PURE__ */
|
|
10119
|
+
children: /* @__PURE__ */ jsx105(_Checkbox, { ...checkboxProps })
|
|
10070
10120
|
}
|
|
10071
10121
|
);
|
|
10072
10122
|
};
|
|
10073
10123
|
|
|
10074
10124
|
// src/Table/TableColumnHeader.tsx
|
|
10075
|
-
import { useRef as
|
|
10125
|
+
import { useRef as useRef12 } from "react";
|
|
10076
10126
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
10077
10127
|
import { useHover } from "@react-aria/interactions";
|
|
10078
10128
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
10079
10129
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
10080
|
-
import { cn as
|
|
10081
|
-
import { jsx as
|
|
10130
|
+
import { cn as cn62, width as twWidth5, useStateProps as useStateProps3 } from "@marigold/system";
|
|
10131
|
+
import { jsx as jsx106, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10082
10132
|
var TableColumnHeader = ({
|
|
10083
10133
|
column: column2,
|
|
10084
10134
|
width = "auto",
|
|
10085
10135
|
align = "left"
|
|
10086
10136
|
}) => {
|
|
10087
10137
|
var _a, _b;
|
|
10088
|
-
const ref =
|
|
10138
|
+
const ref = useRef12(null);
|
|
10089
10139
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10090
10140
|
const { columnHeaderProps } = useTableColumnHeader(
|
|
10091
10141
|
{
|
|
@@ -10100,18 +10150,18 @@ var TableColumnHeader = ({
|
|
|
10100
10150
|
hover: isHovered,
|
|
10101
10151
|
focusVisible: isFocusVisible
|
|
10102
10152
|
});
|
|
10103
|
-
return /* @__PURE__ */
|
|
10153
|
+
return /* @__PURE__ */ jsxs38(
|
|
10104
10154
|
"th",
|
|
10105
10155
|
{
|
|
10106
10156
|
colSpan: column2.colspan,
|
|
10107
10157
|
ref,
|
|
10108
|
-
className:
|
|
10158
|
+
className: cn62("cursor-default", twWidth5[width], classNames3 == null ? void 0 : classNames3.header),
|
|
10109
10159
|
...mergeProps4(columnHeaderProps, hoverProps, focusProps),
|
|
10110
10160
|
...stateProps,
|
|
10111
10161
|
align,
|
|
10112
10162
|
children: [
|
|
10113
10163
|
column2.rendered,
|
|
10114
|
-
column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
10164
|
+
column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx106(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx106(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx106("span", { className: "hidden", children: /* @__PURE__ */ jsx106(SortDown, { className: "inline-block" }) }))
|
|
10115
10165
|
]
|
|
10116
10166
|
}
|
|
10117
10167
|
);
|
|
@@ -10119,16 +10169,16 @@ var TableColumnHeader = ({
|
|
|
10119
10169
|
|
|
10120
10170
|
// src/Table/TableHeader.tsx
|
|
10121
10171
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
10122
|
-
import { cn as
|
|
10123
|
-
import { jsx as
|
|
10172
|
+
import { cn as cn63 } from "@marigold/system";
|
|
10173
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
10124
10174
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
10125
10175
|
const { rowGroupProps } = useTableRowGroup2();
|
|
10126
10176
|
const { classNames: classNames3 } = useTableContext();
|
|
10127
|
-
return /* @__PURE__ */
|
|
10177
|
+
return /* @__PURE__ */ jsx107(
|
|
10128
10178
|
"thead",
|
|
10129
10179
|
{
|
|
10130
10180
|
...rowGroupProps,
|
|
10131
|
-
className:
|
|
10181
|
+
className: cn63(
|
|
10132
10182
|
classNames3 == null ? void 0 : classNames3.thead,
|
|
10133
10183
|
// for sticky header &th needs to be sticky for b2b and core theme
|
|
10134
10184
|
// for rui sticky is applied to thead
|
|
@@ -10140,33 +10190,33 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
10140
10190
|
};
|
|
10141
10191
|
|
|
10142
10192
|
// src/Table/TableHeaderRow.tsx
|
|
10143
|
-
import { useRef as
|
|
10193
|
+
import { useRef as useRef13 } from "react";
|
|
10144
10194
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
10145
|
-
import { jsx as
|
|
10195
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
10146
10196
|
var TableHeaderRow = ({
|
|
10147
10197
|
item,
|
|
10148
10198
|
className,
|
|
10149
10199
|
children
|
|
10150
10200
|
}) => {
|
|
10151
10201
|
const { state } = useTableContext();
|
|
10152
|
-
const ref =
|
|
10202
|
+
const ref = useRef13(null);
|
|
10153
10203
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
10154
|
-
return /* @__PURE__ */
|
|
10204
|
+
return /* @__PURE__ */ jsx108("tr", { ...rowProps, className, ref, children });
|
|
10155
10205
|
};
|
|
10156
10206
|
|
|
10157
10207
|
// src/Table/TableRow.tsx
|
|
10158
|
-
import { useRef as
|
|
10208
|
+
import { useRef as useRef14 } from "react";
|
|
10159
10209
|
import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
10160
10210
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
10161
10211
|
import { useTableRow } from "@react-aria/table";
|
|
10162
10212
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
10163
|
-
import { cn as
|
|
10164
|
-
import { jsx as
|
|
10213
|
+
import { cn as cn64, useClassNames as useClassNames59, useStateProps as useStateProps4 } from "@marigold/system";
|
|
10214
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
10165
10215
|
var TableRow = ({ children, row }) => {
|
|
10166
|
-
const ref =
|
|
10216
|
+
const ref = useRef14(null);
|
|
10167
10217
|
const { interactive, state, ...ctx } = useTableContext();
|
|
10168
10218
|
const { variant, size: size2 } = row.props;
|
|
10169
|
-
const classNames3 =
|
|
10219
|
+
const classNames3 = useClassNames59({
|
|
10170
10220
|
component: "Table",
|
|
10171
10221
|
variant: variant || ctx.variant,
|
|
10172
10222
|
size: size2 || ctx.size
|
|
@@ -10191,11 +10241,11 @@ var TableRow = ({ children, row }) => {
|
|
|
10191
10241
|
focusVisible: isFocusVisible,
|
|
10192
10242
|
active: isPressed
|
|
10193
10243
|
});
|
|
10194
|
-
return /* @__PURE__ */
|
|
10244
|
+
return /* @__PURE__ */ jsx109(
|
|
10195
10245
|
"tr",
|
|
10196
10246
|
{
|
|
10197
10247
|
ref,
|
|
10198
|
-
className:
|
|
10248
|
+
className: cn64(
|
|
10199
10249
|
[
|
|
10200
10250
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
10201
10251
|
],
|
|
@@ -10209,7 +10259,7 @@ var TableRow = ({ children, row }) => {
|
|
|
10209
10259
|
};
|
|
10210
10260
|
|
|
10211
10261
|
// src/Table/TableSelectAllCell.tsx
|
|
10212
|
-
import { useRef as
|
|
10262
|
+
import { useRef as useRef15 } from "react";
|
|
10213
10263
|
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
10214
10264
|
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
10215
10265
|
import {
|
|
@@ -10218,17 +10268,17 @@ import {
|
|
|
10218
10268
|
} from "@react-aria/table";
|
|
10219
10269
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
10220
10270
|
import {
|
|
10221
|
-
cn as
|
|
10271
|
+
cn as cn65,
|
|
10222
10272
|
width as twWidth6,
|
|
10223
10273
|
useStateProps as useStateProps5
|
|
10224
10274
|
} from "@marigold/system";
|
|
10225
|
-
import { jsx as
|
|
10275
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
10226
10276
|
var TableSelectAllCell = ({
|
|
10227
10277
|
column: column2,
|
|
10228
10278
|
width = "auto",
|
|
10229
10279
|
align = "left"
|
|
10230
10280
|
}) => {
|
|
10231
|
-
const ref =
|
|
10281
|
+
const ref = useRef15(null);
|
|
10232
10282
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10233
10283
|
const { columnHeaderProps } = useTableColumnHeader2(
|
|
10234
10284
|
{
|
|
@@ -10244,21 +10294,21 @@ var TableSelectAllCell = ({
|
|
|
10244
10294
|
hover: isHovered,
|
|
10245
10295
|
focusVisible: isFocusVisible
|
|
10246
10296
|
});
|
|
10247
|
-
return /* @__PURE__ */
|
|
10297
|
+
return /* @__PURE__ */ jsx110(
|
|
10248
10298
|
"th",
|
|
10249
10299
|
{
|
|
10250
10300
|
ref,
|
|
10251
|
-
className:
|
|
10301
|
+
className: cn65(twWidth6[width], ["leading-none"], classNames3 == null ? void 0 : classNames3.header),
|
|
10252
10302
|
...mergeProps6(columnHeaderProps, hoverProps, focusProps),
|
|
10253
10303
|
...stateProps,
|
|
10254
10304
|
align,
|
|
10255
|
-
children: /* @__PURE__ */
|
|
10305
|
+
children: /* @__PURE__ */ jsx110(_Checkbox, { ...checkboxProps })
|
|
10256
10306
|
}
|
|
10257
10307
|
);
|
|
10258
10308
|
};
|
|
10259
10309
|
|
|
10260
10310
|
// src/Table/Table.tsx
|
|
10261
|
-
import { jsx as
|
|
10311
|
+
import { jsx as jsx111, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
10262
10312
|
var Table = ({
|
|
10263
10313
|
variant,
|
|
10264
10314
|
size: size2,
|
|
@@ -10270,7 +10320,7 @@ var Table = ({
|
|
|
10270
10320
|
...props
|
|
10271
10321
|
}) => {
|
|
10272
10322
|
const interactive = selectionMode !== "none";
|
|
10273
|
-
const tableRef =
|
|
10323
|
+
const tableRef = useRef16(null);
|
|
10274
10324
|
const state = useTableState({
|
|
10275
10325
|
...props,
|
|
10276
10326
|
selectionMode,
|
|
@@ -10281,21 +10331,21 @@ var Table = ({
|
|
|
10281
10331
|
state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
10282
10332
|
}
|
|
10283
10333
|
const { gridProps } = useTable(props, state, tableRef);
|
|
10284
|
-
const classNames3 =
|
|
10334
|
+
const classNames3 = useClassNames60({
|
|
10285
10335
|
component: "Table",
|
|
10286
10336
|
variant,
|
|
10287
10337
|
size: size2
|
|
10288
10338
|
});
|
|
10289
10339
|
const { collection } = state;
|
|
10290
|
-
return /* @__PURE__ */
|
|
10340
|
+
return /* @__PURE__ */ jsx111(
|
|
10291
10341
|
TableContext.Provider,
|
|
10292
10342
|
{
|
|
10293
10343
|
value: { state, interactive, classNames: classNames3, variant, size: size2 },
|
|
10294
|
-
children: /* @__PURE__ */
|
|
10344
|
+
children: /* @__PURE__ */ jsxs39(
|
|
10295
10345
|
"table",
|
|
10296
10346
|
{
|
|
10297
10347
|
ref: tableRef,
|
|
10298
|
-
className:
|
|
10348
|
+
className: cn66(
|
|
10299
10349
|
"group/table",
|
|
10300
10350
|
"border-collapse",
|
|
10301
10351
|
stretch ? "table w-full" : "block",
|
|
@@ -10303,7 +10353,7 @@ var Table = ({
|
|
|
10303
10353
|
),
|
|
10304
10354
|
...gridProps,
|
|
10305
10355
|
children: [
|
|
10306
|
-
/* @__PURE__ */
|
|
10356
|
+
/* @__PURE__ */ jsx111(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx111(
|
|
10307
10357
|
TableHeaderRow,
|
|
10308
10358
|
{
|
|
10309
10359
|
item: headerRow,
|
|
@@ -10311,7 +10361,7 @@ var Table = ({
|
|
|
10311
10361
|
children: [...collection.getChildren(headerRow.key)].map(
|
|
10312
10362
|
(column2) => {
|
|
10313
10363
|
var _a, _b, _c, _d, _e;
|
|
10314
|
-
return ((_a = column2.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
10364
|
+
return ((_a = column2.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx111(
|
|
10315
10365
|
TableSelectAllCell,
|
|
10316
10366
|
{
|
|
10317
10367
|
width: (_b = column2.props) == null ? void 0 : _b.width,
|
|
@@ -10319,7 +10369,7 @@ var Table = ({
|
|
|
10319
10369
|
align: (_c = column2.props) == null ? void 0 : _c.align
|
|
10320
10370
|
},
|
|
10321
10371
|
column2.key
|
|
10322
|
-
) : /* @__PURE__ */
|
|
10372
|
+
) : /* @__PURE__ */ jsx111(
|
|
10323
10373
|
TableColumnHeader,
|
|
10324
10374
|
{
|
|
10325
10375
|
width: (_d = column2.props) == null ? void 0 : _d.width,
|
|
@@ -10333,12 +10383,12 @@ var Table = ({
|
|
|
10333
10383
|
},
|
|
10334
10384
|
headerRow.key
|
|
10335
10385
|
)) }),
|
|
10336
|
-
/* @__PURE__ */
|
|
10386
|
+
/* @__PURE__ */ jsxs39(TableBody, { className: classNames3.body, emptyState, children: [
|
|
10337
10387
|
...collection.rows.map(
|
|
10338
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
10388
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx111(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index2) => {
|
|
10339
10389
|
var _a, _b;
|
|
10340
10390
|
const currentColumn = collection.columns[index2];
|
|
10341
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
10391
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx111(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx111(
|
|
10342
10392
|
TableCell,
|
|
10343
10393
|
{
|
|
10344
10394
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
@@ -10358,22 +10408,22 @@ var Table = ({
|
|
|
10358
10408
|
Table.Body = Body2;
|
|
10359
10409
|
Table.Cell = Cell;
|
|
10360
10410
|
Table.Column = Column;
|
|
10361
|
-
Table.Header =
|
|
10411
|
+
Table.Header = Header5;
|
|
10362
10412
|
Table.Row = Row;
|
|
10363
10413
|
|
|
10364
10414
|
// src/Text/Text.tsx
|
|
10365
10415
|
import { Text as Text2 } from "react-aria-components";
|
|
10366
10416
|
import {
|
|
10367
|
-
cn as
|
|
10417
|
+
cn as cn67,
|
|
10368
10418
|
cursorStyle,
|
|
10369
10419
|
ensureCssVar as ensureCssVar2,
|
|
10370
10420
|
fontWeight,
|
|
10371
10421
|
textAlign as textAlign2,
|
|
10372
10422
|
textSize,
|
|
10373
10423
|
textStyle,
|
|
10374
|
-
useClassNames as
|
|
10424
|
+
useClassNames as useClassNames61
|
|
10375
10425
|
} from "@marigold/system";
|
|
10376
|
-
import { jsx as
|
|
10426
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
10377
10427
|
var _Text = ({
|
|
10378
10428
|
variant,
|
|
10379
10429
|
size: size2,
|
|
@@ -10387,19 +10437,19 @@ var _Text = ({
|
|
|
10387
10437
|
as = "div",
|
|
10388
10438
|
...props
|
|
10389
10439
|
}) => {
|
|
10390
|
-
const classNames3 =
|
|
10440
|
+
const classNames3 = useClassNames61({
|
|
10391
10441
|
component: "Text",
|
|
10392
10442
|
variant,
|
|
10393
10443
|
size: size2
|
|
10394
10444
|
});
|
|
10395
10445
|
const Component2 = props.slot ? Text2 : as;
|
|
10396
10446
|
const elementType = props.slot ? { elementType: as } : {};
|
|
10397
|
-
return /* @__PURE__ */
|
|
10447
|
+
return /* @__PURE__ */ jsx112(
|
|
10398
10448
|
Component2,
|
|
10399
10449
|
{
|
|
10400
10450
|
...props,
|
|
10401
10451
|
...elementType,
|
|
10402
|
-
className:
|
|
10452
|
+
className: cn67(
|
|
10403
10453
|
"max-w-(--maxTextWidth)",
|
|
10404
10454
|
// possibly set by a <Container>
|
|
10405
10455
|
classNames3,
|
|
@@ -10416,11 +10466,11 @@ var _Text = ({
|
|
|
10416
10466
|
};
|
|
10417
10467
|
|
|
10418
10468
|
// src/TextArea/TextArea.tsx
|
|
10419
|
-
import { forwardRef as
|
|
10469
|
+
import { forwardRef as forwardRef32 } from "react";
|
|
10420
10470
|
import { TextArea, TextField } from "react-aria-components";
|
|
10421
|
-
import { useClassNames as
|
|
10422
|
-
import { jsx as
|
|
10423
|
-
var _TextArea =
|
|
10471
|
+
import { useClassNames as useClassNames62 } from "@marigold/system";
|
|
10472
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
10473
|
+
var _TextArea = forwardRef32(
|
|
10424
10474
|
({
|
|
10425
10475
|
variant,
|
|
10426
10476
|
size: size2,
|
|
@@ -10431,7 +10481,7 @@ var _TextArea = forwardRef31(
|
|
|
10431
10481
|
rows,
|
|
10432
10482
|
...rest
|
|
10433
10483
|
}, ref) => {
|
|
10434
|
-
const classNames3 =
|
|
10484
|
+
const classNames3 = useClassNames62({ component: "TextArea", variant, size: size2 });
|
|
10435
10485
|
const props = {
|
|
10436
10486
|
isDisabled: disabled,
|
|
10437
10487
|
isReadOnly: readOnly,
|
|
@@ -10439,15 +10489,15 @@ var _TextArea = forwardRef31(
|
|
|
10439
10489
|
isRequired: required,
|
|
10440
10490
|
...rest
|
|
10441
10491
|
};
|
|
10442
|
-
return /* @__PURE__ */
|
|
10492
|
+
return /* @__PURE__ */ jsx113(FieldBase, { as: TextField, ...props, variant, size: size2, children: /* @__PURE__ */ jsx113(TextArea, { className: classNames3, ref, rows }) });
|
|
10443
10493
|
}
|
|
10444
10494
|
);
|
|
10445
10495
|
|
|
10446
10496
|
// src/TextField/TextField.tsx
|
|
10447
|
-
import { forwardRef as
|
|
10497
|
+
import { forwardRef as forwardRef33 } from "react";
|
|
10448
10498
|
import { TextField as TextField2 } from "react-aria-components";
|
|
10449
|
-
import { jsx as
|
|
10450
|
-
var _TextField =
|
|
10499
|
+
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
10500
|
+
var _TextField = forwardRef33(
|
|
10451
10501
|
({ required, disabled, readOnly, error, ...rest }, ref) => {
|
|
10452
10502
|
const props = {
|
|
10453
10503
|
isDisabled: disabled,
|
|
@@ -10456,13 +10506,13 @@ var _TextField = forwardRef32(
|
|
|
10456
10506
|
isRequired: required,
|
|
10457
10507
|
...rest
|
|
10458
10508
|
};
|
|
10459
|
-
return /* @__PURE__ */
|
|
10509
|
+
return /* @__PURE__ */ jsx114(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx114(_Input, { ref }) });
|
|
10460
10510
|
}
|
|
10461
10511
|
);
|
|
10462
10512
|
|
|
10463
10513
|
// src/Tiles/Tiles.tsx
|
|
10464
|
-
import { cn as
|
|
10465
|
-
import { jsx as
|
|
10514
|
+
import { cn as cn68, createVar as createVar9, gapSpace as gapSpace9 } from "@marigold/system";
|
|
10515
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
10466
10516
|
var Tiles = ({
|
|
10467
10517
|
space = 0,
|
|
10468
10518
|
stretch = false,
|
|
@@ -10475,11 +10525,11 @@ var Tiles = ({
|
|
|
10475
10525
|
if (stretch) {
|
|
10476
10526
|
column2 = `minmax(${column2}, 1fr)`;
|
|
10477
10527
|
}
|
|
10478
|
-
return /* @__PURE__ */
|
|
10528
|
+
return /* @__PURE__ */ jsx115(
|
|
10479
10529
|
"div",
|
|
10480
10530
|
{
|
|
10481
10531
|
...props,
|
|
10482
|
-
className:
|
|
10532
|
+
className: cn68(
|
|
10483
10533
|
"grid",
|
|
10484
10534
|
gapSpace9[space],
|
|
10485
10535
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -10493,11 +10543,11 @@ var Tiles = ({
|
|
|
10493
10543
|
|
|
10494
10544
|
// src/Tooltip/Tooltip.tsx
|
|
10495
10545
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
10496
|
-
import { cn as
|
|
10546
|
+
import { cn as cn69, useClassNames as useClassNames63 } from "@marigold/system";
|
|
10497
10547
|
|
|
10498
10548
|
// src/Tooltip/TooltipTrigger.tsx
|
|
10499
10549
|
import { TooltipTrigger } from "react-aria-components";
|
|
10500
|
-
import { jsx as
|
|
10550
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
10501
10551
|
var _TooltipTrigger = ({
|
|
10502
10552
|
delay = 1e3,
|
|
10503
10553
|
children,
|
|
@@ -10511,26 +10561,26 @@ var _TooltipTrigger = ({
|
|
|
10511
10561
|
isOpen: open,
|
|
10512
10562
|
delay
|
|
10513
10563
|
};
|
|
10514
|
-
return /* @__PURE__ */
|
|
10564
|
+
return /* @__PURE__ */ jsx116(TooltipTrigger, { ...props, children });
|
|
10515
10565
|
};
|
|
10516
10566
|
|
|
10517
10567
|
// src/Tooltip/Tooltip.tsx
|
|
10518
|
-
import { jsx as
|
|
10568
|
+
import { jsx as jsx117, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
10519
10569
|
var _Tooltip = ({ children, variant, size: size2, open, ...rest }) => {
|
|
10520
10570
|
const props = {
|
|
10521
10571
|
...rest,
|
|
10522
10572
|
isOpen: open
|
|
10523
10573
|
};
|
|
10524
|
-
const classNames3 =
|
|
10574
|
+
const classNames3 = useClassNames63({ component: "Tooltip", variant, size: size2 });
|
|
10525
10575
|
const portal = usePortalContainer();
|
|
10526
|
-
return /* @__PURE__ */
|
|
10576
|
+
return /* @__PURE__ */ jsxs40(
|
|
10527
10577
|
Tooltip,
|
|
10528
10578
|
{
|
|
10529
10579
|
...props,
|
|
10530
|
-
className:
|
|
10580
|
+
className: cn69("group/tooltip", classNames3.container),
|
|
10531
10581
|
UNSTABLE_portalContainer: portal,
|
|
10532
10582
|
children: [
|
|
10533
|
-
/* @__PURE__ */
|
|
10583
|
+
/* @__PURE__ */ jsx117(OverlayArrow, { className: classNames3.arrow, children: /* @__PURE__ */ jsx117("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx117("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
10534
10584
|
children
|
|
10535
10585
|
]
|
|
10536
10586
|
}
|
|
@@ -10539,13 +10589,13 @@ var _Tooltip = ({ children, variant, size: size2, open, ...rest }) => {
|
|
|
10539
10589
|
_Tooltip.Trigger = _TooltipTrigger;
|
|
10540
10590
|
|
|
10541
10591
|
// src/TagGroup/Tag.tsx
|
|
10542
|
-
import {
|
|
10543
|
-
import { cn as
|
|
10592
|
+
import { Tag } from "react-aria-components";
|
|
10593
|
+
import { cn as cn70, useClassNames as useClassNames65 } from "@marigold/system";
|
|
10544
10594
|
|
|
10545
10595
|
// src/TagGroup/TagGroup.tsx
|
|
10546
10596
|
import { TagGroup, TagList } from "react-aria-components";
|
|
10547
|
-
import { useClassNames as
|
|
10548
|
-
import { jsx as
|
|
10597
|
+
import { useClassNames as useClassNames64 } from "@marigold/system";
|
|
10598
|
+
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
10549
10599
|
var _TagGroup = ({
|
|
10550
10600
|
width,
|
|
10551
10601
|
items,
|
|
@@ -10555,8 +10605,8 @@ var _TagGroup = ({
|
|
|
10555
10605
|
size: size2,
|
|
10556
10606
|
...rest
|
|
10557
10607
|
}) => {
|
|
10558
|
-
const classNames3 =
|
|
10559
|
-
return /* @__PURE__ */
|
|
10608
|
+
const classNames3 = useClassNames64({ component: "Tag", variant, size: size2 });
|
|
10609
|
+
return /* @__PURE__ */ jsx118(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx118(
|
|
10560
10610
|
TagList,
|
|
10561
10611
|
{
|
|
10562
10612
|
items,
|
|
@@ -10568,31 +10618,23 @@ var _TagGroup = ({
|
|
|
10568
10618
|
};
|
|
10569
10619
|
|
|
10570
10620
|
// src/TagGroup/Tag.tsx
|
|
10571
|
-
import { Fragment as
|
|
10572
|
-
var CloseButton2 = ({ className }) => {
|
|
10573
|
-
return /* @__PURE__ */ jsx111(Button7, { slot: "remove", className, children: /* @__PURE__ */ jsx111("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx111("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
10574
|
-
};
|
|
10621
|
+
import { Fragment as Fragment12, jsx as jsx119, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
10575
10622
|
var _Tag = ({ variant, size: size2, children, disabled, ...rest }) => {
|
|
10576
10623
|
let textValue = typeof children === "string" ? children : void 0;
|
|
10577
|
-
const classNames3 =
|
|
10624
|
+
const classNames3 = useClassNames65({ component: "Tag", variant, size: size2 });
|
|
10578
10625
|
const props = {
|
|
10579
10626
|
isDisabled: disabled,
|
|
10580
10627
|
...rest
|
|
10581
10628
|
};
|
|
10582
|
-
return /* @__PURE__ */
|
|
10629
|
+
return /* @__PURE__ */ jsx119(
|
|
10583
10630
|
Tag,
|
|
10584
10631
|
{
|
|
10585
10632
|
textValue,
|
|
10586
10633
|
...props,
|
|
10587
|
-
className:
|
|
10588
|
-
children: ({ allowsRemoving }) => /* @__PURE__ */
|
|
10634
|
+
className: cn70("data-selection-mode:cursor-pointer", classNames3.tag),
|
|
10635
|
+
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs41(Fragment12, { children: [
|
|
10589
10636
|
children,
|
|
10590
|
-
allowsRemoving && /* @__PURE__ */
|
|
10591
|
-
CloseButton2,
|
|
10592
|
-
{
|
|
10593
|
-
className: cn65("flex items-center", classNames3.closeButton)
|
|
10594
|
-
}
|
|
10595
|
-
)
|
|
10637
|
+
allowsRemoving && /* @__PURE__ */ jsx119(CloseButton, { className: classNames3.closeButton, slot: "remove" })
|
|
10596
10638
|
] })
|
|
10597
10639
|
}
|
|
10598
10640
|
);
|
|
@@ -10603,14 +10645,14 @@ _Tag.Group = _TagGroup;
|
|
|
10603
10645
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
10604
10646
|
|
|
10605
10647
|
// src/XLoader/XLoader.tsx
|
|
10606
|
-
import { Dialog as
|
|
10648
|
+
import { Dialog as Dialog4, Modal as Modal2 } from "react-aria-components";
|
|
10607
10649
|
import { useId as useId2 } from "@react-aria/utils";
|
|
10608
|
-
import { useClassNames as
|
|
10650
|
+
import { useClassNames as useClassNames67 } from "@marigold/system";
|
|
10609
10651
|
|
|
10610
10652
|
// src/XLoader/BaseLoader.tsx
|
|
10611
10653
|
import { Label as Label2, ProgressBar as ProgressBar2 } from "react-aria-components";
|
|
10612
10654
|
import { useLocalizedStringFormatter as useLocalizedStringFormatter2 } from "@react-aria/i18n";
|
|
10613
|
-
import { useClassNames as
|
|
10655
|
+
import { useClassNames as useClassNames66 } from "@marigold/system";
|
|
10614
10656
|
|
|
10615
10657
|
// src/intl/messages.ts
|
|
10616
10658
|
var intlMessages2 = {
|
|
@@ -10623,7 +10665,7 @@ var intlMessages2 = {
|
|
|
10623
10665
|
};
|
|
10624
10666
|
|
|
10625
10667
|
// src/XLoader/BaseLoader.tsx
|
|
10626
|
-
import { jsx as
|
|
10668
|
+
import { jsx as jsx120, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
10627
10669
|
var BaseLoader = ({
|
|
10628
10670
|
variant,
|
|
10629
10671
|
size: size2,
|
|
@@ -10632,8 +10674,8 @@ var BaseLoader = ({
|
|
|
10632
10674
|
...props
|
|
10633
10675
|
}) => {
|
|
10634
10676
|
const stringFormatter = useLocalizedStringFormatter2(intlMessages2, "marigold");
|
|
10635
|
-
const className =
|
|
10636
|
-
return /* @__PURE__ */
|
|
10677
|
+
const className = useClassNames66({ component: "XLoader", variant, size: size2 });
|
|
10678
|
+
return /* @__PURE__ */ jsxs42(
|
|
10637
10679
|
ProgressBar2,
|
|
10638
10680
|
{
|
|
10639
10681
|
className: className.container,
|
|
@@ -10641,7 +10683,7 @@ var BaseLoader = ({
|
|
|
10641
10683
|
"aria-label": ariaLabel || children ? ariaLabel : stringFormatter.format("loadingMessage"),
|
|
10642
10684
|
...props,
|
|
10643
10685
|
children: [
|
|
10644
|
-
/* @__PURE__ */
|
|
10686
|
+
/* @__PURE__ */ jsxs42(
|
|
10645
10687
|
"svg",
|
|
10646
10688
|
{
|
|
10647
10689
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10649,13 +10691,13 @@ var BaseLoader = ({
|
|
|
10649
10691
|
fill: "currentColor",
|
|
10650
10692
|
className: className.loader,
|
|
10651
10693
|
children: [
|
|
10652
|
-
/* @__PURE__ */
|
|
10653
|
-
/* @__PURE__ */
|
|
10694
|
+
/* @__PURE__ */ jsx120("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
10695
|
+
/* @__PURE__ */ jsx120(
|
|
10654
10696
|
"path",
|
|
10655
10697
|
{
|
|
10656
10698
|
id: "XMLID_5_",
|
|
10657
10699
|
d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10658
|
-
children: /* @__PURE__ */
|
|
10700
|
+
children: /* @__PURE__ */ jsx120(
|
|
10659
10701
|
"animate",
|
|
10660
10702
|
{
|
|
10661
10703
|
attributeName: "opacity",
|
|
@@ -10668,12 +10710,12 @@ var BaseLoader = ({
|
|
|
10668
10710
|
)
|
|
10669
10711
|
}
|
|
10670
10712
|
),
|
|
10671
|
-
/* @__PURE__ */
|
|
10713
|
+
/* @__PURE__ */ jsx120(
|
|
10672
10714
|
"path",
|
|
10673
10715
|
{
|
|
10674
10716
|
id: "XMLID_18_",
|
|
10675
10717
|
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10676
|
-
children: /* @__PURE__ */
|
|
10718
|
+
children: /* @__PURE__ */ jsx120(
|
|
10677
10719
|
"animate",
|
|
10678
10720
|
{
|
|
10679
10721
|
attributeName: "opacity",
|
|
@@ -10686,12 +10728,12 @@ var BaseLoader = ({
|
|
|
10686
10728
|
)
|
|
10687
10729
|
}
|
|
10688
10730
|
),
|
|
10689
|
-
/* @__PURE__ */
|
|
10731
|
+
/* @__PURE__ */ jsx120(
|
|
10690
10732
|
"path",
|
|
10691
10733
|
{
|
|
10692
10734
|
id: "XMLID_19_",
|
|
10693
10735
|
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10694
|
-
children: /* @__PURE__ */
|
|
10736
|
+
children: /* @__PURE__ */ jsx120(
|
|
10695
10737
|
"animate",
|
|
10696
10738
|
{
|
|
10697
10739
|
attributeName: "opacity",
|
|
@@ -10704,12 +10746,12 @@ var BaseLoader = ({
|
|
|
10704
10746
|
)
|
|
10705
10747
|
}
|
|
10706
10748
|
),
|
|
10707
|
-
/* @__PURE__ */
|
|
10749
|
+
/* @__PURE__ */ jsx120(
|
|
10708
10750
|
"path",
|
|
10709
10751
|
{
|
|
10710
10752
|
id: "XMLID_20_",
|
|
10711
10753
|
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10712
|
-
children: /* @__PURE__ */
|
|
10754
|
+
children: /* @__PURE__ */ jsx120(
|
|
10713
10755
|
"animate",
|
|
10714
10756
|
{
|
|
10715
10757
|
attributeName: "opacity",
|
|
@@ -10722,12 +10764,12 @@ var BaseLoader = ({
|
|
|
10722
10764
|
)
|
|
10723
10765
|
}
|
|
10724
10766
|
),
|
|
10725
|
-
/* @__PURE__ */
|
|
10767
|
+
/* @__PURE__ */ jsx120(
|
|
10726
10768
|
"path",
|
|
10727
10769
|
{
|
|
10728
10770
|
id: "XMLID_21_",
|
|
10729
10771
|
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z",
|
|
10730
|
-
children: /* @__PURE__ */
|
|
10772
|
+
children: /* @__PURE__ */ jsx120(
|
|
10731
10773
|
"animate",
|
|
10732
10774
|
{
|
|
10733
10775
|
attributeName: "opacity",
|
|
@@ -10740,12 +10782,12 @@ var BaseLoader = ({
|
|
|
10740
10782
|
)
|
|
10741
10783
|
}
|
|
10742
10784
|
),
|
|
10743
|
-
/* @__PURE__ */
|
|
10785
|
+
/* @__PURE__ */ jsx120(
|
|
10744
10786
|
"path",
|
|
10745
10787
|
{
|
|
10746
10788
|
id: "XMLID_22_",
|
|
10747
10789
|
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z",
|
|
10748
|
-
children: /* @__PURE__ */
|
|
10790
|
+
children: /* @__PURE__ */ jsx120(
|
|
10749
10791
|
"animate",
|
|
10750
10792
|
{
|
|
10751
10793
|
attributeName: "opacity",
|
|
@@ -10758,12 +10800,12 @@ var BaseLoader = ({
|
|
|
10758
10800
|
)
|
|
10759
10801
|
}
|
|
10760
10802
|
),
|
|
10761
|
-
/* @__PURE__ */
|
|
10803
|
+
/* @__PURE__ */ jsx120(
|
|
10762
10804
|
"path",
|
|
10763
10805
|
{
|
|
10764
10806
|
id: "XMLID_23_",
|
|
10765
10807
|
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
10766
|
-
children: /* @__PURE__ */
|
|
10808
|
+
children: /* @__PURE__ */ jsx120(
|
|
10767
10809
|
"animate",
|
|
10768
10810
|
{
|
|
10769
10811
|
attributeName: "opacity",
|
|
@@ -10776,12 +10818,12 @@ var BaseLoader = ({
|
|
|
10776
10818
|
)
|
|
10777
10819
|
}
|
|
10778
10820
|
),
|
|
10779
|
-
/* @__PURE__ */
|
|
10821
|
+
/* @__PURE__ */ jsx120(
|
|
10780
10822
|
"path",
|
|
10781
10823
|
{
|
|
10782
10824
|
id: "XMLID_24_",
|
|
10783
10825
|
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
10784
|
-
children: /* @__PURE__ */
|
|
10826
|
+
children: /* @__PURE__ */ jsx120(
|
|
10785
10827
|
"animate",
|
|
10786
10828
|
{
|
|
10787
10829
|
attributeName: "opacity",
|
|
@@ -10794,12 +10836,12 @@ var BaseLoader = ({
|
|
|
10794
10836
|
)
|
|
10795
10837
|
}
|
|
10796
10838
|
),
|
|
10797
|
-
/* @__PURE__ */
|
|
10839
|
+
/* @__PURE__ */ jsx120(
|
|
10798
10840
|
"path",
|
|
10799
10841
|
{
|
|
10800
10842
|
id: "XMLID_25_",
|
|
10801
10843
|
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
10802
|
-
children: /* @__PURE__ */
|
|
10844
|
+
children: /* @__PURE__ */ jsx120(
|
|
10803
10845
|
"animate",
|
|
10804
10846
|
{
|
|
10805
10847
|
attributeName: "opacity",
|
|
@@ -10812,12 +10854,12 @@ var BaseLoader = ({
|
|
|
10812
10854
|
)
|
|
10813
10855
|
}
|
|
10814
10856
|
),
|
|
10815
|
-
/* @__PURE__ */
|
|
10857
|
+
/* @__PURE__ */ jsx120(
|
|
10816
10858
|
"path",
|
|
10817
10859
|
{
|
|
10818
10860
|
id: "XMLID_26_",
|
|
10819
10861
|
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
10820
|
-
children: /* @__PURE__ */
|
|
10862
|
+
children: /* @__PURE__ */ jsx120(
|
|
10821
10863
|
"animate",
|
|
10822
10864
|
{
|
|
10823
10865
|
attributeName: "opacity",
|
|
@@ -10830,12 +10872,12 @@ var BaseLoader = ({
|
|
|
10830
10872
|
)
|
|
10831
10873
|
}
|
|
10832
10874
|
),
|
|
10833
|
-
/* @__PURE__ */
|
|
10875
|
+
/* @__PURE__ */ jsx120(
|
|
10834
10876
|
"path",
|
|
10835
10877
|
{
|
|
10836
10878
|
id: "XMLID_27_",
|
|
10837
10879
|
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
10838
|
-
children: /* @__PURE__ */
|
|
10880
|
+
children: /* @__PURE__ */ jsx120(
|
|
10839
10881
|
"animate",
|
|
10840
10882
|
{
|
|
10841
10883
|
attributeName: "opacity",
|
|
@@ -10851,48 +10893,48 @@ var BaseLoader = ({
|
|
|
10851
10893
|
]
|
|
10852
10894
|
}
|
|
10853
10895
|
),
|
|
10854
|
-
children ? /* @__PURE__ */
|
|
10896
|
+
children ? /* @__PURE__ */ jsx120(Label2, { className: className.label, children }) : null
|
|
10855
10897
|
]
|
|
10856
10898
|
}
|
|
10857
10899
|
);
|
|
10858
10900
|
};
|
|
10859
10901
|
|
|
10860
10902
|
// src/XLoader/XLoader.tsx
|
|
10861
|
-
import { jsx as
|
|
10903
|
+
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
10862
10904
|
var LoaderFullScreen = (props) => {
|
|
10863
10905
|
const id = useId2();
|
|
10864
|
-
return /* @__PURE__ */
|
|
10906
|
+
return /* @__PURE__ */ jsx121(Underlay, { defaultOpen: true, keyboardDismissable: true, variant: "modal", children: /* @__PURE__ */ jsx121(Modal2, { className: "grid h-(--visual-viewport-height) cursor-progress place-items-center", children: /* @__PURE__ */ jsx121(Dialog4, { className: "outline-0", "aria-labelledby": id, children: /* @__PURE__ */ jsx121(BaseLoader, { id, ...props }) }) }) });
|
|
10865
10907
|
};
|
|
10866
10908
|
var LoaderSection = (props) => {
|
|
10867
|
-
const className =
|
|
10909
|
+
const className = useClassNames67({
|
|
10868
10910
|
component: "Underlay",
|
|
10869
10911
|
variant: "modal",
|
|
10870
10912
|
className: "flex size-full items-center justify-center"
|
|
10871
10913
|
});
|
|
10872
|
-
return /* @__PURE__ */
|
|
10914
|
+
return /* @__PURE__ */ jsx121("div", { className, children: /* @__PURE__ */ jsx121(BaseLoader, { ...props }) });
|
|
10873
10915
|
};
|
|
10874
|
-
var XLoader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PURE__ */
|
|
10916
|
+
var XLoader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PURE__ */ jsx121(LoaderFullScreen, { variant: variant != null ? variant : "inverted", ...props }) : mode === "section" ? /* @__PURE__ */ jsx121(LoaderSection, { variant: variant != null ? variant : "inverted", ...props }) : /* @__PURE__ */ jsx121(BaseLoader, { variant, ...props });
|
|
10875
10917
|
|
|
10876
10918
|
// src/Tabs/Tabs.tsx
|
|
10877
10919
|
import { Tabs } from "react-aria-components";
|
|
10878
|
-
import { useClassNames as
|
|
10920
|
+
import { useClassNames as useClassNames68 } from "@marigold/system";
|
|
10879
10921
|
|
|
10880
10922
|
// src/Tabs/Context.ts
|
|
10881
|
-
import { createContext as
|
|
10882
|
-
var TabContext =
|
|
10883
|
-
var useTabContext = () =>
|
|
10923
|
+
import { createContext as createContext15, useContext as useContext25 } from "react";
|
|
10924
|
+
var TabContext = createContext15({});
|
|
10925
|
+
var useTabContext = () => useContext25(TabContext);
|
|
10884
10926
|
|
|
10885
10927
|
// src/Tabs/Tab.tsx
|
|
10886
10928
|
import { Tab } from "react-aria-components";
|
|
10887
|
-
import { cn as
|
|
10888
|
-
import { jsx as
|
|
10929
|
+
import { cn as cn71 } from "@marigold/system";
|
|
10930
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
10889
10931
|
var _Tab = (props) => {
|
|
10890
10932
|
const { classNames: classNames3 } = useTabContext();
|
|
10891
|
-
return /* @__PURE__ */
|
|
10933
|
+
return /* @__PURE__ */ jsx122(
|
|
10892
10934
|
Tab,
|
|
10893
10935
|
{
|
|
10894
10936
|
...props,
|
|
10895
|
-
className:
|
|
10937
|
+
className: cn71(
|
|
10896
10938
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
10897
10939
|
classNames3.tab
|
|
10898
10940
|
),
|
|
@@ -10903,15 +10945,15 @@ var _Tab = (props) => {
|
|
|
10903
10945
|
|
|
10904
10946
|
// src/Tabs/TabList.tsx
|
|
10905
10947
|
import { TabList } from "react-aria-components";
|
|
10906
|
-
import { cn as
|
|
10907
|
-
import { jsx as
|
|
10948
|
+
import { cn as cn72, gapSpace as gapSpace10 } from "@marigold/system";
|
|
10949
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
10908
10950
|
var _TabList = ({ space = 2, ...props }) => {
|
|
10909
10951
|
const { classNames: classNames3 } = useTabContext();
|
|
10910
|
-
return /* @__PURE__ */
|
|
10952
|
+
return /* @__PURE__ */ jsx123(
|
|
10911
10953
|
TabList,
|
|
10912
10954
|
{
|
|
10913
10955
|
...props,
|
|
10914
|
-
className:
|
|
10956
|
+
className: cn72("flex", gapSpace10[space], classNames3.tabsList),
|
|
10915
10957
|
children: props.children
|
|
10916
10958
|
}
|
|
10917
10959
|
);
|
|
@@ -10919,25 +10961,25 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
10919
10961
|
|
|
10920
10962
|
// src/Tabs/TabPanel.tsx
|
|
10921
10963
|
import { TabPanel } from "react-aria-components";
|
|
10922
|
-
import { jsx as
|
|
10964
|
+
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
10923
10965
|
var _TabPanel = (props) => {
|
|
10924
10966
|
const { classNames: classNames3 } = useTabContext();
|
|
10925
|
-
return /* @__PURE__ */
|
|
10967
|
+
return /* @__PURE__ */ jsx124(TabPanel, { ...props, className: classNames3.tabpanel, children: props.children });
|
|
10926
10968
|
};
|
|
10927
10969
|
|
|
10928
10970
|
// src/Tabs/Tabs.tsx
|
|
10929
|
-
import { jsx as
|
|
10971
|
+
import { jsx as jsx125 } from "react/jsx-runtime";
|
|
10930
10972
|
var _Tabs = ({ disabled, variant, size: size2 = "medium", ...rest }) => {
|
|
10931
10973
|
const props = {
|
|
10932
10974
|
isDisabled: disabled,
|
|
10933
10975
|
...rest
|
|
10934
10976
|
};
|
|
10935
|
-
const classNames3 =
|
|
10977
|
+
const classNames3 = useClassNames68({
|
|
10936
10978
|
component: "Tabs",
|
|
10937
10979
|
size: size2,
|
|
10938
10980
|
variant
|
|
10939
10981
|
});
|
|
10940
|
-
return /* @__PURE__ */
|
|
10982
|
+
return /* @__PURE__ */ jsx125(TabContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsx125(Tabs, { ...props, className: classNames3.container, children: props.children }) });
|
|
10941
10983
|
};
|
|
10942
10984
|
_Tabs.List = _TabList;
|
|
10943
10985
|
_Tabs.TabPanel = _TabPanel;
|
|
@@ -10961,7 +11003,6 @@ export {
|
|
|
10961
11003
|
Center,
|
|
10962
11004
|
_Checkbox as Checkbox,
|
|
10963
11005
|
_CheckboxGroup as CheckboxGroup,
|
|
10964
|
-
CloseButton2 as CloseButton,
|
|
10965
11006
|
Columns,
|
|
10966
11007
|
_ComboBox as ComboBox,
|
|
10967
11008
|
Container,
|
|
@@ -10969,11 +11010,12 @@ export {
|
|
|
10969
11010
|
_DatePicker as DatePicker,
|
|
10970
11011
|
_Dialog as Dialog,
|
|
10971
11012
|
_Divider as Divider,
|
|
11013
|
+
Drawer,
|
|
10972
11014
|
FieldBase,
|
|
10973
11015
|
FieldGroup,
|
|
10974
11016
|
FieldGroupContext,
|
|
10975
11017
|
Footer,
|
|
10976
|
-
Form,
|
|
11018
|
+
_Form as Form,
|
|
10977
11019
|
Grid,
|
|
10978
11020
|
_Header as Header,
|
|
10979
11021
|
_Headline as Headline,
|