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