@marigold/components 12.0.2 → 12.0.4
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 +175 -60
- package/dist/index.d.ts +175 -60
- package/dist/index.js +1075 -847
- package/dist/index.mjs +798 -566
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -884,7 +884,7 @@ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
|
884
884
|
var AccordionHeader = ({ children }) => {
|
|
885
885
|
const { classNames: classNames3 } = useAccordionContext();
|
|
886
886
|
const { isExpanded } = useContext2(DisclosureStateContext);
|
|
887
|
-
return /* @__PURE__ */ jsx2(Heading, { children: /* @__PURE__ */ jsxs(Button, { slot: "trigger", className: classNames3.header, children: [
|
|
887
|
+
return /* @__PURE__ */ jsx2(Heading, { className: "flex-1", children: /* @__PURE__ */ jsxs(Button, { slot: "trigger", className: classNames3.header, children: [
|
|
888
888
|
children,
|
|
889
889
|
/* @__PURE__ */ jsx2(
|
|
890
890
|
ChevronDown,
|
|
@@ -2123,57 +2123,204 @@ var Container = ({
|
|
|
2123
2123
|
}
|
|
2124
2124
|
);
|
|
2125
2125
|
|
|
2126
|
+
// src/ContextualHelp/ContextualHelp.tsx
|
|
2127
|
+
import {
|
|
2128
|
+
forwardRef as forwardRef15
|
|
2129
|
+
} from "react";
|
|
2130
|
+
import {
|
|
2131
|
+
Button as Button5,
|
|
2132
|
+
Dialog,
|
|
2133
|
+
Popover as Popover2,
|
|
2134
|
+
DialogTrigger as RACDialogTrigger
|
|
2135
|
+
} from "react-aria-components";
|
|
2136
|
+
import { useClassNames as useClassNames22 } from "@marigold/system";
|
|
2137
|
+
|
|
2138
|
+
// src/ContextualHelp/ContextualHelpContent.tsx
|
|
2139
|
+
import { useClassNames as useClassNames20 } from "@marigold/system";
|
|
2140
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2141
|
+
var ContextualHelpContent = ({
|
|
2142
|
+
children,
|
|
2143
|
+
variant,
|
|
2144
|
+
size: size2
|
|
2145
|
+
}) => {
|
|
2146
|
+
const classNames3 = useClassNames20({
|
|
2147
|
+
component: "ContextualHelp",
|
|
2148
|
+
variant,
|
|
2149
|
+
size: size2
|
|
2150
|
+
});
|
|
2151
|
+
return /* @__PURE__ */ jsx39("div", { className: classNames3.content, children });
|
|
2152
|
+
};
|
|
2153
|
+
|
|
2154
|
+
// src/ContextualHelp/ContextualHelpTitle.tsx
|
|
2155
|
+
import { Heading as Heading2 } from "react-aria-components";
|
|
2156
|
+
import { useClassNames as useClassNames21 } from "@marigold/system";
|
|
2157
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2158
|
+
var ContextualHelpTitle = ({
|
|
2159
|
+
children,
|
|
2160
|
+
variant,
|
|
2161
|
+
size: size2
|
|
2162
|
+
}) => {
|
|
2163
|
+
const classNames3 = useClassNames21({
|
|
2164
|
+
component: "ContextualHelp",
|
|
2165
|
+
variant,
|
|
2166
|
+
size: size2
|
|
2167
|
+
});
|
|
2168
|
+
return /* @__PURE__ */ jsx40(Heading2, { className: classNames3.title, children });
|
|
2169
|
+
};
|
|
2170
|
+
|
|
2171
|
+
// src/ContextualHelp/ContextualHelp.tsx
|
|
2172
|
+
import { jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2173
|
+
var icons = {
|
|
2174
|
+
help: () => /* @__PURE__ */ jsxs16(
|
|
2175
|
+
"svg",
|
|
2176
|
+
{
|
|
2177
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2178
|
+
width: "24",
|
|
2179
|
+
height: "24",
|
|
2180
|
+
viewBox: "0 0 24 24",
|
|
2181
|
+
fill: "none",
|
|
2182
|
+
stroke: "currentColor",
|
|
2183
|
+
strokeWidth: "2",
|
|
2184
|
+
strokeLinecap: "round",
|
|
2185
|
+
strokeLinejoin: "round",
|
|
2186
|
+
className: "lucide lucide-circle-help-icon lucide-circle-help h-5",
|
|
2187
|
+
children: [
|
|
2188
|
+
/* @__PURE__ */ jsx41("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2189
|
+
/* @__PURE__ */ jsx41("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
2190
|
+
/* @__PURE__ */ jsx41("path", { d: "M12 17h.01" })
|
|
2191
|
+
]
|
|
2192
|
+
}
|
|
2193
|
+
),
|
|
2194
|
+
info: () => /* @__PURE__ */ jsxs16(
|
|
2195
|
+
"svg",
|
|
2196
|
+
{
|
|
2197
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2198
|
+
width: "24",
|
|
2199
|
+
height: "24",
|
|
2200
|
+
viewBox: "0 0 24 24",
|
|
2201
|
+
fill: "none",
|
|
2202
|
+
stroke: "currentColor",
|
|
2203
|
+
strokeWidth: "2",
|
|
2204
|
+
strokeLinecap: "round",
|
|
2205
|
+
strokeLinejoin: "round",
|
|
2206
|
+
className: "lucide lucide-info-icon lucide-info h-5",
|
|
2207
|
+
children: [
|
|
2208
|
+
/* @__PURE__ */ jsx41("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2209
|
+
/* @__PURE__ */ jsx41("path", { d: "M12 16v-4" }),
|
|
2210
|
+
/* @__PURE__ */ jsx41("path", { d: "M12 8h.01" })
|
|
2211
|
+
]
|
|
2212
|
+
}
|
|
2213
|
+
)
|
|
2214
|
+
};
|
|
2215
|
+
var DialogTrigger = forwardRef15(
|
|
2216
|
+
({ open, ...rest }, ref) => /* @__PURE__ */ jsx41(RACDialogTrigger, { isOpen: open, ...rest })
|
|
2217
|
+
);
|
|
2218
|
+
var _ContextualHelp = forwardRef15(
|
|
2219
|
+
({
|
|
2220
|
+
children,
|
|
2221
|
+
variant = "help",
|
|
2222
|
+
size: size2,
|
|
2223
|
+
width,
|
|
2224
|
+
placement = "bottom start",
|
|
2225
|
+
offset: offset2 = 8,
|
|
2226
|
+
defaultOpen,
|
|
2227
|
+
open,
|
|
2228
|
+
onOpenChange
|
|
2229
|
+
}, ref) => {
|
|
2230
|
+
var _a;
|
|
2231
|
+
const icon = (_a = icons[variant]) == null ? void 0 : _a.call(icons);
|
|
2232
|
+
const classNames3 = useClassNames22({
|
|
2233
|
+
component: "ContextualHelp",
|
|
2234
|
+
variant,
|
|
2235
|
+
size: size2
|
|
2236
|
+
});
|
|
2237
|
+
return /* @__PURE__ */ jsxs16(
|
|
2238
|
+
DialogTrigger,
|
|
2239
|
+
{
|
|
2240
|
+
defaultOpen,
|
|
2241
|
+
open,
|
|
2242
|
+
onOpenChange,
|
|
2243
|
+
children: [
|
|
2244
|
+
/* @__PURE__ */ jsx41(
|
|
2245
|
+
Button5,
|
|
2246
|
+
{
|
|
2247
|
+
ref,
|
|
2248
|
+
className: classNames3.trigger,
|
|
2249
|
+
"aria-label": variant === "info" ? "Information" : "Hilfe",
|
|
2250
|
+
children: icon
|
|
2251
|
+
}
|
|
2252
|
+
),
|
|
2253
|
+
/* @__PURE__ */ jsx41(
|
|
2254
|
+
Popover2,
|
|
2255
|
+
{
|
|
2256
|
+
placement,
|
|
2257
|
+
offset: offset2,
|
|
2258
|
+
className: classNames3.popover,
|
|
2259
|
+
...{
|
|
2260
|
+
[`data-${width != null ? width : "medium"}`]: true
|
|
2261
|
+
},
|
|
2262
|
+
children: /* @__PURE__ */ jsx41(Dialog, { className: (classNames3.dialog, "prose"), children })
|
|
2263
|
+
}
|
|
2264
|
+
)
|
|
2265
|
+
]
|
|
2266
|
+
}
|
|
2267
|
+
);
|
|
2268
|
+
}
|
|
2269
|
+
);
|
|
2270
|
+
_ContextualHelp.Title = ContextualHelpTitle;
|
|
2271
|
+
_ContextualHelp.Content = ContextualHelpContent;
|
|
2272
|
+
|
|
2126
2273
|
// src/Dialog/Dialog.tsx
|
|
2127
2274
|
import {
|
|
2128
|
-
forwardRef as
|
|
2275
|
+
forwardRef as forwardRef19,
|
|
2129
2276
|
useContext as useContext9
|
|
2130
2277
|
} from "react";
|
|
2131
|
-
import { Dialog, OverlayTriggerStateContext as OverlayTriggerStateContext2 } from "react-aria-components";
|
|
2132
|
-
import { cn as cn26, useClassNames as
|
|
2278
|
+
import { Dialog as Dialog2, OverlayTriggerStateContext as OverlayTriggerStateContext2 } from "react-aria-components";
|
|
2279
|
+
import { cn as cn26, useClassNames as useClassNames28 } from "@marigold/system";
|
|
2133
2280
|
|
|
2134
2281
|
// src/CloseButton/CloseButton.tsx
|
|
2135
|
-
import { forwardRef as
|
|
2136
|
-
import { Button as
|
|
2137
|
-
import { useClassNames as
|
|
2138
|
-
import { jsx as
|
|
2139
|
-
var CloseButton =
|
|
2282
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
2283
|
+
import { Button as Button6 } from "react-aria-components";
|
|
2284
|
+
import { useClassNames as useClassNames23 } from "@marigold/system";
|
|
2285
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2286
|
+
var CloseButton = forwardRef16(
|
|
2140
2287
|
({ className, size: size2, variant, ...props }, ref) => {
|
|
2141
|
-
const classNames3 =
|
|
2288
|
+
const classNames3 = useClassNames23({
|
|
2142
2289
|
component: "CloseButton",
|
|
2143
2290
|
className,
|
|
2144
2291
|
size: size2,
|
|
2145
2292
|
variant
|
|
2146
2293
|
});
|
|
2147
|
-
return /* @__PURE__ */
|
|
2294
|
+
return /* @__PURE__ */ jsx42(Button6, { ref, className: classNames3, ...props, children: /* @__PURE__ */ jsx42("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx42("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" }) }) });
|
|
2148
2295
|
}
|
|
2149
2296
|
);
|
|
2150
2297
|
|
|
2151
2298
|
// src/Overlay/Modal.tsx
|
|
2152
|
-
import { forwardRef as
|
|
2299
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
2153
2300
|
import { Modal } from "react-aria-components";
|
|
2154
|
-
import { useClassNames as
|
|
2155
|
-
import { jsx as
|
|
2156
|
-
var _Modal =
|
|
2301
|
+
import { useClassNames as useClassNames24 } from "@marigold/system";
|
|
2302
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2303
|
+
var _Modal = forwardRef17(({ size: size2, open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
2157
2304
|
const props = {
|
|
2158
2305
|
isOpen: open,
|
|
2159
2306
|
isDismissable: dismissable,
|
|
2160
2307
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
2161
2308
|
...rest
|
|
2162
2309
|
};
|
|
2163
|
-
const className =
|
|
2164
|
-
return /* @__PURE__ */
|
|
2310
|
+
const className = useClassNames24({ component: "Modal", size: size2 });
|
|
2311
|
+
return /* @__PURE__ */ jsx43(
|
|
2165
2312
|
Underlay,
|
|
2166
2313
|
{
|
|
2167
2314
|
dismissable,
|
|
2168
2315
|
keyboardDismissable,
|
|
2169
2316
|
open,
|
|
2170
|
-
children: /* @__PURE__ */
|
|
2317
|
+
children: /* @__PURE__ */ jsx43(Modal, { ...props, className, ref, children: props.children })
|
|
2171
2318
|
}
|
|
2172
2319
|
);
|
|
2173
2320
|
});
|
|
2174
2321
|
|
|
2175
2322
|
// src/Overlay/NonModal.tsx
|
|
2176
|
-
import { forwardRef as
|
|
2323
|
+
import { forwardRef as forwardRef18, useContext as useContext8 } from "react";
|
|
2177
2324
|
import {
|
|
2178
2325
|
OverlayTriggerStateContext,
|
|
2179
2326
|
Provider
|
|
@@ -2262,7 +2409,7 @@ var useNonModal = ({ nonModalRef, keyboardDismissable = true }, state) => {
|
|
|
2262
2409
|
};
|
|
2263
2410
|
|
|
2264
2411
|
// src/Overlay/NonModal.tsx
|
|
2265
|
-
import { jsx as
|
|
2412
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2266
2413
|
var NonModalInner = ({ state, isExiting, ...props }) => {
|
|
2267
2414
|
const { nonModalProps } = useNonModal(props, state);
|
|
2268
2415
|
const ref = props.nonModalRef;
|
|
@@ -2282,7 +2429,7 @@ var NonModalInner = ({ state, isExiting, ...props }) => {
|
|
|
2282
2429
|
...renderProps.style,
|
|
2283
2430
|
"--visual-viewport-height": viewport.height + "px"
|
|
2284
2431
|
};
|
|
2285
|
-
const overlay = /* @__PURE__ */
|
|
2432
|
+
const overlay = /* @__PURE__ */ jsxs17(
|
|
2286
2433
|
"div",
|
|
2287
2434
|
{
|
|
2288
2435
|
...mergeProps(filterDOMProps(props), nonModalProps),
|
|
@@ -2297,21 +2444,21 @@ var NonModalInner = ({ state, isExiting, ...props }) => {
|
|
|
2297
2444
|
"data-exiting": isExiting || void 0,
|
|
2298
2445
|
children: [
|
|
2299
2446
|
renderProps.children,
|
|
2300
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ jsx44(DismissButton, { onDismiss: state.close })
|
|
2301
2448
|
]
|
|
2302
2449
|
}
|
|
2303
2450
|
);
|
|
2304
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ jsx44(
|
|
2305
2452
|
Overlay,
|
|
2306
2453
|
{
|
|
2307
2454
|
isExiting,
|
|
2308
2455
|
portalContainer,
|
|
2309
2456
|
disableFocusManagement: true,
|
|
2310
|
-
children: /* @__PURE__ */
|
|
2457
|
+
children: /* @__PURE__ */ jsx44(FocusScope, { restoreFocus: true, children: /* @__PURE__ */ jsx44(Provider, { values: [[OverlayTriggerStateContext, state]], children: overlay }) })
|
|
2311
2458
|
}
|
|
2312
2459
|
);
|
|
2313
2460
|
};
|
|
2314
|
-
var NonModal =
|
|
2461
|
+
var NonModal = forwardRef18(
|
|
2315
2462
|
({ open, ...rest }, ref) => {
|
|
2316
2463
|
const props = {
|
|
2317
2464
|
isOpen: open,
|
|
@@ -2326,7 +2473,7 @@ var NonModal = forwardRef17(
|
|
|
2326
2473
|
if (state && !state.isOpen && !isExiting || isSSR) {
|
|
2327
2474
|
return null;
|
|
2328
2475
|
}
|
|
2329
|
-
return /* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ jsx44(
|
|
2330
2477
|
NonModalInner,
|
|
2331
2478
|
{
|
|
2332
2479
|
...props,
|
|
@@ -2339,43 +2486,43 @@ var NonModal = forwardRef17(
|
|
|
2339
2486
|
);
|
|
2340
2487
|
|
|
2341
2488
|
// src/Dialog/DialogActions.tsx
|
|
2342
|
-
import { cn as cn23, useClassNames as
|
|
2343
|
-
import { jsx as
|
|
2489
|
+
import { cn as cn23, useClassNames as useClassNames25 } from "@marigold/system";
|
|
2490
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2344
2491
|
var DialogActions = ({ variant, size: size2, children }) => {
|
|
2345
|
-
const classNames3 =
|
|
2346
|
-
return /* @__PURE__ */
|
|
2492
|
+
const classNames3 = useClassNames25({ component: "Dialog", variant, size: size2 });
|
|
2493
|
+
return /* @__PURE__ */ jsx45("div", { className: cn23("[grid-area:actions]", classNames3.actions), children });
|
|
2347
2494
|
};
|
|
2348
2495
|
|
|
2349
2496
|
// src/Dialog/DialogContent.tsx
|
|
2350
|
-
import { cn as cn24, useClassNames as
|
|
2351
|
-
import { jsx as
|
|
2497
|
+
import { cn as cn24, useClassNames as useClassNames26 } from "@marigold/system";
|
|
2498
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2352
2499
|
var DialogContent = ({
|
|
2353
2500
|
variant,
|
|
2354
2501
|
size: size2,
|
|
2355
2502
|
children
|
|
2356
2503
|
}) => {
|
|
2357
|
-
const classNames3 =
|
|
2358
|
-
return /* @__PURE__ */
|
|
2504
|
+
const classNames3 = useClassNames26({ component: "Dialog", variant, size: size2 });
|
|
2505
|
+
return /* @__PURE__ */ jsx46("div", { className: cn24("[grid-area:content]", classNames3.content), children });
|
|
2359
2506
|
};
|
|
2360
2507
|
|
|
2361
2508
|
// src/Dialog/DialogTitle.tsx
|
|
2362
|
-
import { Header as Header2, Heading as
|
|
2363
|
-
import { cn as cn25, useClassNames as
|
|
2364
|
-
import { jsx as
|
|
2509
|
+
import { Header as Header2, Heading as Heading3 } from "react-aria-components";
|
|
2510
|
+
import { cn as cn25, useClassNames as useClassNames27 } from "@marigold/system";
|
|
2511
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2365
2512
|
var DialogTitle = ({ variant, size: size2, children }) => {
|
|
2366
|
-
const classNames3 =
|
|
2513
|
+
const classNames3 = useClassNames27({
|
|
2367
2514
|
component: "Dialog",
|
|
2368
2515
|
variant,
|
|
2369
2516
|
size: size2
|
|
2370
2517
|
});
|
|
2371
|
-
return /* @__PURE__ */
|
|
2518
|
+
return /* @__PURE__ */ jsx47(Header2, { className: cn25("[grid-area:title]", classNames3.header), children: /* @__PURE__ */ jsx47(Heading3, { slot: "title", className: classNames3.title, children }) });
|
|
2372
2519
|
};
|
|
2373
2520
|
|
|
2374
2521
|
// src/Dialog/DialogTrigger.tsx
|
|
2375
2522
|
import { createContext as createContext6 } from "react";
|
|
2376
|
-
import { DialogTrigger } from "react-aria-components";
|
|
2523
|
+
import { DialogTrigger as DialogTrigger2 } from "react-aria-components";
|
|
2377
2524
|
import { PressResponder } from "@react-aria/interactions";
|
|
2378
|
-
import { jsx as
|
|
2525
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2379
2526
|
var DialogContext = createContext6({});
|
|
2380
2527
|
var _DialogTrigger = ({
|
|
2381
2528
|
open,
|
|
@@ -2389,15 +2536,15 @@ var _DialogTrigger = ({
|
|
|
2389
2536
|
isKeyboardDismissDisabled: !keyboardDismissable,
|
|
2390
2537
|
...rest
|
|
2391
2538
|
};
|
|
2392
|
-
return /* @__PURE__ */
|
|
2539
|
+
return /* @__PURE__ */ jsx48(DialogContext.Provider, { value: props, children: /* @__PURE__ */ jsx48(DialogTrigger2, { ...props, children: /* @__PURE__ */ jsx48(PressResponder, { isPressed: false, children: props.children }) }) });
|
|
2393
2540
|
};
|
|
2394
2541
|
|
|
2395
2542
|
// src/Dialog/Dialog.tsx
|
|
2396
|
-
import { jsx as
|
|
2397
|
-
var _Dialog =
|
|
2543
|
+
import { jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2544
|
+
var _Dialog = forwardRef19(
|
|
2398
2545
|
({ variant, size: size2, ...props }, ref) => {
|
|
2399
2546
|
var _a;
|
|
2400
|
-
const classNames3 =
|
|
2547
|
+
const classNames3 = useClassNames28({
|
|
2401
2548
|
component: "Dialog",
|
|
2402
2549
|
variant,
|
|
2403
2550
|
size: size2
|
|
@@ -2408,15 +2555,15 @@ var _Dialog = forwardRef18(
|
|
|
2408
2555
|
close: (_a = state == null ? void 0 : state.close) != null ? _a : () => {
|
|
2409
2556
|
}
|
|
2410
2557
|
}) : props.children;
|
|
2411
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ jsx49(
|
|
2412
2559
|
_Modal,
|
|
2413
2560
|
{
|
|
2414
2561
|
dismissable: isDismissable,
|
|
2415
2562
|
keyboardDismissable: isKeyboardDismissDisabled,
|
|
2416
2563
|
open: isOpen,
|
|
2417
2564
|
size: size2,
|
|
2418
|
-
children: /* @__PURE__ */
|
|
2419
|
-
|
|
2565
|
+
children: /* @__PURE__ */ jsxs18(
|
|
2566
|
+
Dialog2,
|
|
2420
2567
|
{
|
|
2421
2568
|
...props,
|
|
2422
2569
|
ref,
|
|
@@ -2426,7 +2573,7 @@ var _Dialog = forwardRef18(
|
|
|
2426
2573
|
classNames3.container
|
|
2427
2574
|
),
|
|
2428
2575
|
children: [
|
|
2429
|
-
props.closeButton && /* @__PURE__ */
|
|
2576
|
+
props.closeButton && /* @__PURE__ */ jsx49(
|
|
2430
2577
|
CloseButton,
|
|
2431
2578
|
{
|
|
2432
2579
|
className: classNames3.closeButton,
|
|
@@ -2448,18 +2595,18 @@ _Dialog.Actions = DialogActions;
|
|
|
2448
2595
|
|
|
2449
2596
|
// src/Divider/Divider.tsx
|
|
2450
2597
|
import { Separator } from "react-aria-components";
|
|
2451
|
-
import { cn as cn27, useClassNames as
|
|
2452
|
-
import { jsx as
|
|
2598
|
+
import { cn as cn27, useClassNames as useClassNames29 } from "@marigold/system";
|
|
2599
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2453
2600
|
var _Divider = ({ variant, ...props }) => {
|
|
2454
|
-
const classNames3 =
|
|
2455
|
-
return /* @__PURE__ */
|
|
2601
|
+
const classNames3 = useClassNames29({ component: "Divider", variant });
|
|
2602
|
+
return /* @__PURE__ */ jsx50(Separator, { className: cn27("border-none", classNames3), ...props });
|
|
2456
2603
|
};
|
|
2457
2604
|
|
|
2458
2605
|
// src/Drawer/Drawer.tsx
|
|
2459
2606
|
import { useContext as useContext11, useRef } from "react";
|
|
2460
|
-
import { Dialog as
|
|
2607
|
+
import { Dialog as Dialog3, OverlayTriggerStateContext as OverlayTriggerStateContext3 } from "react-aria-components";
|
|
2461
2608
|
import { useLandmark } from "@react-aria/landmark";
|
|
2462
|
-
import { cn as cn32, useClassNames as
|
|
2609
|
+
import { cn as cn32, useClassNames as useClassNames33, useSmallScreen as useSmallScreen3 } from "@marigold/system";
|
|
2463
2610
|
|
|
2464
2611
|
// src/Drawer/Context.tsx
|
|
2465
2612
|
import { createContext as createContext7, useContext as useContext10 } from "react";
|
|
@@ -2470,16 +2617,16 @@ var DrawerContext = createContext7({
|
|
|
2470
2617
|
var useDrawerContext = () => useContext10(DrawerContext);
|
|
2471
2618
|
|
|
2472
2619
|
// src/Drawer/DrawerActions.tsx
|
|
2473
|
-
import { cn as cn28, useClassNames as
|
|
2474
|
-
import { jsx as
|
|
2620
|
+
import { cn as cn28, useClassNames as useClassNames30 } from "@marigold/system";
|
|
2621
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2475
2622
|
var DrawerActions = ({ variant, size: size2, children }) => {
|
|
2476
2623
|
const ctx = useDrawerContext();
|
|
2477
|
-
const classNames3 =
|
|
2624
|
+
const classNames3 = useClassNames30({
|
|
2478
2625
|
component: "Drawer",
|
|
2479
2626
|
variant: variant != null ? variant : ctx.variant,
|
|
2480
2627
|
size: size2 != null ? size2 : ctx.size
|
|
2481
2628
|
});
|
|
2482
|
-
return /* @__PURE__ */
|
|
2629
|
+
return /* @__PURE__ */ jsx51(
|
|
2483
2630
|
"div",
|
|
2484
2631
|
{
|
|
2485
2632
|
className: cn28("[grid-area:actions]", classNames3.actions),
|
|
@@ -2490,20 +2637,20 @@ var DrawerActions = ({ variant, size: size2, children }) => {
|
|
|
2490
2637
|
};
|
|
2491
2638
|
|
|
2492
2639
|
// src/Drawer/DrawerContent.tsx
|
|
2493
|
-
import { cn as cn29, useClassNames as
|
|
2494
|
-
import { jsx as
|
|
2640
|
+
import { cn as cn29, useClassNames as useClassNames31 } from "@marigold/system";
|
|
2641
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2495
2642
|
var DrawerContent = ({
|
|
2496
2643
|
variant,
|
|
2497
2644
|
size: size2,
|
|
2498
2645
|
children
|
|
2499
2646
|
}) => {
|
|
2500
2647
|
const ctx = useDrawerContext();
|
|
2501
|
-
const classNames3 =
|
|
2648
|
+
const classNames3 = useClassNames31({
|
|
2502
2649
|
component: "Drawer",
|
|
2503
2650
|
variant: variant != null ? variant : ctx.variant,
|
|
2504
2651
|
size: size2 != null ? size2 : ctx.size
|
|
2505
2652
|
});
|
|
2506
|
-
return /* @__PURE__ */
|
|
2653
|
+
return /* @__PURE__ */ jsx52(
|
|
2507
2654
|
"div",
|
|
2508
2655
|
{
|
|
2509
2656
|
className: cn29("[grid-area:content]", classNames3.content),
|
|
@@ -2515,14 +2662,14 @@ var DrawerContent = ({
|
|
|
2515
2662
|
|
|
2516
2663
|
// src/Drawer/DrawerModal.tsx
|
|
2517
2664
|
import { cn as cn30, useSmallScreen as useSmallScreen2 } from "@marigold/system";
|
|
2518
|
-
import { jsx as
|
|
2665
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2519
2666
|
var DrawerModal = ({
|
|
2520
2667
|
children,
|
|
2521
2668
|
className,
|
|
2522
2669
|
...props
|
|
2523
2670
|
}) => {
|
|
2524
2671
|
const isSmallScreen = useSmallScreen2();
|
|
2525
|
-
return isSmallScreen ? /* @__PURE__ */
|
|
2672
|
+
return isSmallScreen ? /* @__PURE__ */ jsx53(_Modal, { children }) : /* @__PURE__ */ jsx53(
|
|
2526
2673
|
NonModal,
|
|
2527
2674
|
{
|
|
2528
2675
|
...props,
|
|
@@ -2533,37 +2680,37 @@ var DrawerModal = ({
|
|
|
2533
2680
|
};
|
|
2534
2681
|
|
|
2535
2682
|
// src/Drawer/DrawerTitle.tsx
|
|
2536
|
-
import { Header as Header3, Heading as
|
|
2537
|
-
import { cn as cn31, useClassNames as
|
|
2538
|
-
import { jsx as
|
|
2683
|
+
import { Header as Header3, Heading as Heading4 } from "react-aria-components";
|
|
2684
|
+
import { cn as cn31, useClassNames as useClassNames32 } from "@marigold/system";
|
|
2685
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2539
2686
|
var DrawerTitle = ({ variant, size: size2, children }) => {
|
|
2540
|
-
const classNames3 =
|
|
2687
|
+
const classNames3 = useClassNames32({
|
|
2541
2688
|
component: "Drawer",
|
|
2542
2689
|
size: size2,
|
|
2543
2690
|
variant,
|
|
2544
2691
|
context: DrawerContext
|
|
2545
2692
|
});
|
|
2546
|
-
return /* @__PURE__ */
|
|
2693
|
+
return /* @__PURE__ */ jsx54(
|
|
2547
2694
|
Header3,
|
|
2548
2695
|
{
|
|
2549
2696
|
className: cn31("[grid-area:title]", classNames3.header),
|
|
2550
2697
|
style: { "--i": 0 },
|
|
2551
|
-
children: /* @__PURE__ */
|
|
2698
|
+
children: /* @__PURE__ */ jsx54(Heading4, { slot: "title", level: 2, className: classNames3.title, children })
|
|
2552
2699
|
}
|
|
2553
2700
|
);
|
|
2554
2701
|
};
|
|
2555
2702
|
|
|
2556
2703
|
// src/Drawer/DrawerTrigger.tsx
|
|
2557
|
-
import { DialogTrigger as
|
|
2558
|
-
import { jsx as
|
|
2704
|
+
import { DialogTrigger as DialogTrigger3 } from "react-aria-components";
|
|
2705
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2559
2706
|
var DrawerTrigger = ({
|
|
2560
2707
|
open,
|
|
2561
2708
|
children,
|
|
2562
2709
|
...props
|
|
2563
|
-
}) => /* @__PURE__ */
|
|
2710
|
+
}) => /* @__PURE__ */ jsx55(DialogTrigger3, { isOpen: open, ...props, children });
|
|
2564
2711
|
|
|
2565
2712
|
// src/Drawer/Drawer.tsx
|
|
2566
|
-
import { jsx as
|
|
2713
|
+
import { jsx as jsx56, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2567
2714
|
var Drawer = ({
|
|
2568
2715
|
children,
|
|
2569
2716
|
variant,
|
|
@@ -2575,19 +2722,19 @@ var Drawer = ({
|
|
|
2575
2722
|
...props
|
|
2576
2723
|
}) => {
|
|
2577
2724
|
const ref = useRef(null);
|
|
2578
|
-
const classNames3 =
|
|
2725
|
+
const classNames3 = useClassNames33({ component: "Drawer", variant, size: size2 });
|
|
2579
2726
|
const ctx = useContext11(OverlayTriggerStateContext3);
|
|
2580
2727
|
const isSmallScreen = useSmallScreen3();
|
|
2581
2728
|
const landmarkAria = useLandmark({ ...props, role }, ref);
|
|
2582
2729
|
const landmarkProps = isSmallScreen ? {} : landmarkAria.landmarkProps;
|
|
2583
|
-
return /* @__PURE__ */
|
|
2730
|
+
return /* @__PURE__ */ jsx56(
|
|
2584
2731
|
DrawerModal,
|
|
2585
2732
|
{
|
|
2586
2733
|
className: classNames3.overlay,
|
|
2587
2734
|
open,
|
|
2588
2735
|
keyboardDismissable,
|
|
2589
|
-
children: /* @__PURE__ */
|
|
2590
|
-
|
|
2736
|
+
children: /* @__PURE__ */ jsx56(DrawerContext.Provider, { value: { variant, size: size2 }, children: /* @__PURE__ */ jsxs19(
|
|
2737
|
+
Dialog3,
|
|
2591
2738
|
{
|
|
2592
2739
|
...props,
|
|
2593
2740
|
...landmarkProps,
|
|
@@ -2597,7 +2744,7 @@ var Drawer = ({
|
|
|
2597
2744
|
classNames3.container
|
|
2598
2745
|
),
|
|
2599
2746
|
children: [
|
|
2600
|
-
closeButton && /* @__PURE__ */
|
|
2747
|
+
closeButton && /* @__PURE__ */ jsx56(
|
|
2601
2748
|
CloseButton,
|
|
2602
2749
|
{
|
|
2603
2750
|
"aria-label": "dismiss drawer",
|
|
@@ -2619,18 +2766,18 @@ Drawer.Content = DrawerContent;
|
|
|
2619
2766
|
Drawer.Actions = DrawerActions;
|
|
2620
2767
|
|
|
2621
2768
|
// src/Footer/Footer.tsx
|
|
2622
|
-
import { useClassNames as
|
|
2623
|
-
import { jsx as
|
|
2769
|
+
import { useClassNames as useClassNames34 } from "@marigold/system";
|
|
2770
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
2624
2771
|
var Footer = ({ children, variant, size: size2, ...props }) => {
|
|
2625
|
-
const classNames3 =
|
|
2626
|
-
return /* @__PURE__ */
|
|
2772
|
+
const classNames3 = useClassNames34({ component: "Footer", variant, size: size2 });
|
|
2773
|
+
return /* @__PURE__ */ jsx57("footer", { ...props, className: classNames3, children });
|
|
2627
2774
|
};
|
|
2628
2775
|
|
|
2629
2776
|
// src/Form/Form.tsx
|
|
2630
2777
|
import { Form } from "react-aria-components";
|
|
2631
2778
|
import { cn as cn33, maxWidth as twMaxWidth } from "@marigold/system";
|
|
2632
|
-
import { jsx as
|
|
2633
|
-
var _Form = ({ unstyled, maxWidth = "full", ...props }) => /* @__PURE__ */
|
|
2779
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
2780
|
+
var _Form = ({ unstyled, maxWidth = "full", ...props }) => /* @__PURE__ */ jsx58(
|
|
2634
2781
|
Form,
|
|
2635
2782
|
{
|
|
2636
2783
|
...props,
|
|
@@ -2639,14 +2786,14 @@ var _Form = ({ unstyled, maxWidth = "full", ...props }) => /* @__PURE__ */ jsx55
|
|
|
2639
2786
|
);
|
|
2640
2787
|
|
|
2641
2788
|
// src/Grid/Grid.tsx
|
|
2642
|
-
import { cn as cn34, gapSpace as gapSpace6, height as twHeight } from "@marigold/system";
|
|
2789
|
+
import { alignment, cn as cn34, gapSpace as gapSpace6, height as twHeight } from "@marigold/system";
|
|
2643
2790
|
|
|
2644
2791
|
// src/Grid/GridArea.tsx
|
|
2645
|
-
import { jsx as
|
|
2646
|
-
var GridArea = ({ name, children }) => /* @__PURE__ */
|
|
2792
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2793
|
+
var GridArea = ({ name, children }) => /* @__PURE__ */ jsx59("div", { style: { gridArea: name }, children });
|
|
2647
2794
|
|
|
2648
2795
|
// src/Grid/Grid.tsx
|
|
2649
|
-
import { jsx as
|
|
2796
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
2650
2797
|
var parseGridAreas = (areas) => areas.map((area) => `"${area}"`).join("\n");
|
|
2651
2798
|
var parseTemplateValue = (values) => values.map((val) => typeof val === "number" ? `${val}fr` : val).join(" ");
|
|
2652
2799
|
var Grid = ({
|
|
@@ -2654,14 +2801,23 @@ var Grid = ({
|
|
|
2654
2801
|
areas,
|
|
2655
2802
|
columns,
|
|
2656
2803
|
rows,
|
|
2804
|
+
alignX,
|
|
2805
|
+
alignY,
|
|
2657
2806
|
height = "auto",
|
|
2658
2807
|
space = 0,
|
|
2659
2808
|
...props
|
|
2660
2809
|
}) => {
|
|
2661
|
-
|
|
2810
|
+
var _a, _b, _c, _d;
|
|
2811
|
+
return /* @__PURE__ */ jsx60(
|
|
2662
2812
|
"div",
|
|
2663
2813
|
{
|
|
2664
|
-
className: cn34(
|
|
2814
|
+
className: cn34(
|
|
2815
|
+
"grid",
|
|
2816
|
+
alignX && ((_b = (_a = alignment) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
2817
|
+
alignY && ((_d = (_c = alignment) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY]),
|
|
2818
|
+
gapSpace6[space],
|
|
2819
|
+
twHeight[height]
|
|
2820
|
+
),
|
|
2665
2821
|
style: {
|
|
2666
2822
|
gridTemplateAreas: parseGridAreas(areas),
|
|
2667
2823
|
gridTemplateColumns: parseTemplateValue(columns),
|
|
@@ -2676,26 +2832,26 @@ Grid.Area = GridArea;
|
|
|
2676
2832
|
|
|
2677
2833
|
// src/Header/Header.tsx
|
|
2678
2834
|
import { Header as Header4 } from "react-aria-components";
|
|
2679
|
-
import { useClassNames as
|
|
2680
|
-
import { jsx as
|
|
2835
|
+
import { useClassNames as useClassNames35 } from "@marigold/system";
|
|
2836
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2681
2837
|
var _Header = ({ variant, size: size2, ...props }) => {
|
|
2682
|
-
const classNames3 =
|
|
2838
|
+
const classNames3 = useClassNames35({
|
|
2683
2839
|
component: "Header",
|
|
2684
2840
|
variant,
|
|
2685
2841
|
size: size2
|
|
2686
2842
|
});
|
|
2687
|
-
return /* @__PURE__ */
|
|
2843
|
+
return /* @__PURE__ */ jsx61(Header4, { className: classNames3, ...props, children: props.children });
|
|
2688
2844
|
};
|
|
2689
2845
|
|
|
2690
2846
|
// src/Headline/Headline.tsx
|
|
2691
|
-
import { Heading as
|
|
2847
|
+
import { Heading as Heading5 } from "react-aria-components";
|
|
2692
2848
|
import {
|
|
2693
2849
|
cn as cn35,
|
|
2694
2850
|
ensureCssVar,
|
|
2695
2851
|
textAlign,
|
|
2696
|
-
useClassNames as
|
|
2852
|
+
useClassNames as useClassNames36
|
|
2697
2853
|
} from "@marigold/system";
|
|
2698
|
-
import { jsx as
|
|
2854
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2699
2855
|
var _Headline = ({
|
|
2700
2856
|
variant,
|
|
2701
2857
|
size: size2,
|
|
@@ -2705,13 +2861,13 @@ var _Headline = ({
|
|
|
2705
2861
|
level = "1",
|
|
2706
2862
|
...props
|
|
2707
2863
|
}) => {
|
|
2708
|
-
const classNames3 =
|
|
2864
|
+
const classNames3 = useClassNames36({
|
|
2709
2865
|
component: "Headline",
|
|
2710
2866
|
variant,
|
|
2711
2867
|
size: size2 != null ? size2 : `level-${level}`
|
|
2712
2868
|
});
|
|
2713
|
-
return /* @__PURE__ */
|
|
2714
|
-
|
|
2869
|
+
return /* @__PURE__ */ jsx62(
|
|
2870
|
+
Heading5,
|
|
2715
2871
|
{
|
|
2716
2872
|
level: Number(level),
|
|
2717
2873
|
...props,
|
|
@@ -2732,9 +2888,9 @@ import {
|
|
|
2732
2888
|
cn as cn36,
|
|
2733
2889
|
objectFit,
|
|
2734
2890
|
objectPosition,
|
|
2735
|
-
useClassNames as
|
|
2891
|
+
useClassNames as useClassNames37
|
|
2736
2892
|
} from "@marigold/system";
|
|
2737
|
-
import { jsx as
|
|
2893
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2738
2894
|
var Image = ({
|
|
2739
2895
|
variant,
|
|
2740
2896
|
size: size2,
|
|
@@ -2742,8 +2898,8 @@ var Image = ({
|
|
|
2742
2898
|
position: position2 = "none",
|
|
2743
2899
|
...props
|
|
2744
2900
|
}) => {
|
|
2745
|
-
const classNames3 =
|
|
2746
|
-
return /* @__PURE__ */
|
|
2901
|
+
const classNames3 = useClassNames37({ component: "Image", variant, size: size2 });
|
|
2902
|
+
return /* @__PURE__ */ jsx63(
|
|
2747
2903
|
"img",
|
|
2748
2904
|
{
|
|
2749
2905
|
...props,
|
|
@@ -2759,8 +2915,8 @@ var Image = ({
|
|
|
2759
2915
|
};
|
|
2760
2916
|
|
|
2761
2917
|
// src/Inline/Inline.tsx
|
|
2762
|
-
import { alignment, cn as cn37, gapSpace as gapSpace7 } from "@marigold/system";
|
|
2763
|
-
import { jsx as
|
|
2918
|
+
import { alignment as alignment2, cn as cn37, gapSpace as gapSpace7 } from "@marigold/system";
|
|
2919
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2764
2920
|
var Inline = ({
|
|
2765
2921
|
space = 0,
|
|
2766
2922
|
alignX,
|
|
@@ -2769,15 +2925,15 @@ var Inline = ({
|
|
|
2769
2925
|
...props
|
|
2770
2926
|
}) => {
|
|
2771
2927
|
var _a, _b, _c, _d;
|
|
2772
|
-
return /* @__PURE__ */
|
|
2928
|
+
return /* @__PURE__ */ jsx64(
|
|
2773
2929
|
"div",
|
|
2774
2930
|
{
|
|
2775
2931
|
...props,
|
|
2776
2932
|
className: cn37(
|
|
2777
2933
|
"flex flex-wrap",
|
|
2778
2934
|
gapSpace7[space],
|
|
2779
|
-
alignX && ((_b = (_a =
|
|
2780
|
-
alignY && ((_d = (_c =
|
|
2935
|
+
alignX && ((_b = (_a = alignment2) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
2936
|
+
alignY && ((_d = (_c = alignment2) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY])
|
|
2781
2937
|
),
|
|
2782
2938
|
children
|
|
2783
2939
|
}
|
|
@@ -2785,19 +2941,19 @@ var Inline = ({
|
|
|
2785
2941
|
};
|
|
2786
2942
|
|
|
2787
2943
|
// src/DateField/DateField.tsx
|
|
2788
|
-
import { forwardRef as
|
|
2944
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
2789
2945
|
import { DateField } from "react-aria-components";
|
|
2790
2946
|
|
|
2791
2947
|
// src/DateField/DateInput.tsx
|
|
2792
2948
|
import { DateInput, Group } from "react-aria-components";
|
|
2793
|
-
import { useClassNames as
|
|
2949
|
+
import { useClassNames as useClassNames38 } from "@marigold/system";
|
|
2794
2950
|
|
|
2795
2951
|
// src/DateField/DateSegment.tsx
|
|
2796
2952
|
import { DateSegment } from "react-aria-components";
|
|
2797
2953
|
import { cn as cn38 } from "@marigold/system";
|
|
2798
|
-
import { Fragment as Fragment5, jsx as
|
|
2954
|
+
import { Fragment as Fragment5, jsx as jsx65, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2799
2955
|
var _DateSegment = ({ segment, ...props }) => {
|
|
2800
|
-
return /* @__PURE__ */
|
|
2956
|
+
return /* @__PURE__ */ jsx65(
|
|
2801
2957
|
DateSegment,
|
|
2802
2958
|
{
|
|
2803
2959
|
...props,
|
|
@@ -2805,8 +2961,8 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
2805
2961
|
style: {
|
|
2806
2962
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
2807
2963
|
},
|
|
2808
|
-
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2964
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs20(Fragment5, { children: [
|
|
2965
|
+
/* @__PURE__ */ jsx65(
|
|
2810
2966
|
"span",
|
|
2811
2967
|
{
|
|
2812
2968
|
"aria-hidden": "true",
|
|
@@ -2817,25 +2973,25 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
2817
2973
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
2818
2974
|
}
|
|
2819
2975
|
),
|
|
2820
|
-
/* @__PURE__ */
|
|
2976
|
+
/* @__PURE__ */ jsx65("span", { children: isPlaceholder ? "" : segment.type === "month" || segment.type === "day" ? segment.text.padStart(2, "0") : text })
|
|
2821
2977
|
] })
|
|
2822
2978
|
}
|
|
2823
2979
|
);
|
|
2824
2980
|
};
|
|
2825
2981
|
|
|
2826
2982
|
// src/DateField/DateInput.tsx
|
|
2827
|
-
import { jsx as
|
|
2983
|
+
import { jsx as jsx66, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2828
2984
|
var _DateInput = ({ variant, size: size2, action, ...props }) => {
|
|
2829
|
-
const classNames3 =
|
|
2830
|
-
return /* @__PURE__ */
|
|
2831
|
-
/* @__PURE__ */
|
|
2985
|
+
const classNames3 = useClassNames38({ component: "DateField", variant, size: size2 });
|
|
2986
|
+
return /* @__PURE__ */ jsxs21(Group, { className: classNames3.field, children: [
|
|
2987
|
+
/* @__PURE__ */ jsx66(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx66(_DateSegment, { className: classNames3.segment, segment }) }),
|
|
2832
2988
|
action ? action : null
|
|
2833
2989
|
] });
|
|
2834
2990
|
};
|
|
2835
2991
|
|
|
2836
2992
|
// src/DateField/DateField.tsx
|
|
2837
|
-
import { jsx as
|
|
2838
|
-
var _DateField =
|
|
2993
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2994
|
+
var _DateField = forwardRef20(
|
|
2839
2995
|
({
|
|
2840
2996
|
variant,
|
|
2841
2997
|
size: size2,
|
|
@@ -2853,7 +3009,7 @@ var _DateField = forwardRef19(
|
|
|
2853
3009
|
isRequired: required,
|
|
2854
3010
|
...rest
|
|
2855
3011
|
};
|
|
2856
|
-
return /* @__PURE__ */
|
|
3012
|
+
return /* @__PURE__ */ jsx67(
|
|
2857
3013
|
FieldBase,
|
|
2858
3014
|
{
|
|
2859
3015
|
as: DateField,
|
|
@@ -2861,7 +3017,7 @@ var _DateField = forwardRef19(
|
|
|
2861
3017
|
size: size2,
|
|
2862
3018
|
ref,
|
|
2863
3019
|
...props,
|
|
2864
|
-
children: /* @__PURE__ */
|
|
3020
|
+
children: /* @__PURE__ */ jsx67(_DateInput, { action })
|
|
2865
3021
|
}
|
|
2866
3022
|
);
|
|
2867
3023
|
}
|
|
@@ -2870,7 +3026,7 @@ var _DateField = forwardRef19(
|
|
|
2870
3026
|
// src/Calendar/Calendar.tsx
|
|
2871
3027
|
import { useState } from "react";
|
|
2872
3028
|
import { Calendar } from "react-aria-components";
|
|
2873
|
-
import { cn as cn44, useClassNames as
|
|
3029
|
+
import { cn as cn44, useClassNames as useClassNames42 } from "@marigold/system";
|
|
2874
3030
|
|
|
2875
3031
|
// src/Calendar/CalendarGrid.tsx
|
|
2876
3032
|
import {
|
|
@@ -2878,7 +3034,7 @@ import {
|
|
|
2878
3034
|
CalendarGrid,
|
|
2879
3035
|
CalendarGridBody
|
|
2880
3036
|
} from "react-aria-components";
|
|
2881
|
-
import { cn as cn39, useClassNames as
|
|
3037
|
+
import { cn as cn39, useClassNames as useClassNames40 } from "@marigold/system";
|
|
2882
3038
|
|
|
2883
3039
|
// src/Calendar/CalendarGridHeader.tsx
|
|
2884
3040
|
import { startOfWeek, today } from "@internationalized/date";
|
|
@@ -2886,8 +3042,8 @@ import { useContext as useContext12, useMemo as useMemo2 } from "react";
|
|
|
2886
3042
|
import { CalendarStateContext } from "react-aria-components";
|
|
2887
3043
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
2888
3044
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
2889
|
-
import { useClassNames as
|
|
2890
|
-
import { jsx as
|
|
3045
|
+
import { useClassNames as useClassNames39 } from "@marigold/system";
|
|
3046
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
2891
3047
|
function CalendarGridHeader(props) {
|
|
2892
3048
|
const state = useContext12(CalendarStateContext);
|
|
2893
3049
|
const { headerProps } = useCalendarGrid(props, state);
|
|
@@ -2904,17 +3060,17 @@ function CalendarGridHeader(props) {
|
|
|
2904
3060
|
return dayFormatter.format(dateDay);
|
|
2905
3061
|
});
|
|
2906
3062
|
}, [locale, state.timeZone, dayFormatter]);
|
|
2907
|
-
const classNames3 =
|
|
2908
|
-
return /* @__PURE__ */
|
|
3063
|
+
const classNames3 = useClassNames39({ component: "Calendar" });
|
|
3064
|
+
return /* @__PURE__ */ jsx68("thead", { ...headerProps, children: /* @__PURE__ */ jsx68("tr", { children: weekDays.map((day, index2) => /* @__PURE__ */ jsx68("th", { className: classNames3.calendarHeader, children: day.substring(0, 2) }, index2)) }) });
|
|
2909
3065
|
}
|
|
2910
3066
|
|
|
2911
3067
|
// src/Calendar/CalendarGrid.tsx
|
|
2912
|
-
import { jsx as
|
|
3068
|
+
import { jsx as jsx69, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2913
3069
|
var _CalendarGrid = () => {
|
|
2914
|
-
const classNames3 =
|
|
2915
|
-
return /* @__PURE__ */
|
|
2916
|
-
/* @__PURE__ */
|
|
2917
|
-
/* @__PURE__ */
|
|
3070
|
+
const classNames3 = useClassNames40({ component: "Calendar" });
|
|
3071
|
+
return /* @__PURE__ */ jsxs22(CalendarGrid, { className: classNames3.calendarGrid, children: [
|
|
3072
|
+
/* @__PURE__ */ jsx69(CalendarGridHeader, {}),
|
|
3073
|
+
/* @__PURE__ */ jsx69(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx69(
|
|
2918
3074
|
CalendarCell,
|
|
2919
3075
|
{
|
|
2920
3076
|
date,
|
|
@@ -2954,7 +3110,7 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
2954
3110
|
}
|
|
2955
3111
|
|
|
2956
3112
|
// src/Calendar/CalendarListBox.tsx
|
|
2957
|
-
import { jsx as
|
|
3113
|
+
import { jsx as jsx70, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2958
3114
|
function CalendarListBox({
|
|
2959
3115
|
type,
|
|
2960
3116
|
isDisabled,
|
|
@@ -2964,7 +3120,7 @@ function CalendarListBox({
|
|
|
2964
3120
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
2965
3121
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
2966
3122
|
const { classNames: classNames3 } = useCalendarContext();
|
|
2967
|
-
return /* @__PURE__ */
|
|
3123
|
+
return /* @__PURE__ */ jsxs23(
|
|
2968
3124
|
"button",
|
|
2969
3125
|
{
|
|
2970
3126
|
disabled: isDisabled,
|
|
@@ -2973,18 +3129,18 @@ function CalendarListBox({
|
|
|
2973
3129
|
"data-testid": type,
|
|
2974
3130
|
children: [
|
|
2975
3131
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
2976
|
-
/* @__PURE__ */
|
|
3132
|
+
/* @__PURE__ */ jsx70(ChevronDown, {})
|
|
2977
3133
|
]
|
|
2978
3134
|
}
|
|
2979
3135
|
);
|
|
2980
3136
|
}
|
|
2981
3137
|
|
|
2982
3138
|
// src/Calendar/MonthControls.tsx
|
|
2983
|
-
import { cn as cn41, useClassNames as
|
|
2984
|
-
import { jsx as
|
|
3139
|
+
import { cn as cn41, useClassNames as useClassNames41 } from "@marigold/system";
|
|
3140
|
+
import { jsx as jsx71, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2985
3141
|
function MonthControls() {
|
|
2986
|
-
const classNames3 =
|
|
2987
|
-
return /* @__PURE__ */
|
|
3142
|
+
const classNames3 = useClassNames41({ component: "Calendar" });
|
|
3143
|
+
return /* @__PURE__ */ jsxs24(
|
|
2988
3144
|
"div",
|
|
2989
3145
|
{
|
|
2990
3146
|
className: cn41(
|
|
@@ -2992,22 +3148,22 @@ function MonthControls() {
|
|
|
2992
3148
|
classNames3.calendarControllers
|
|
2993
3149
|
),
|
|
2994
3150
|
children: [
|
|
2995
|
-
/* @__PURE__ */
|
|
3151
|
+
/* @__PURE__ */ jsx71(
|
|
2996
3152
|
IconButton,
|
|
2997
3153
|
{
|
|
2998
3154
|
className: cn41("inline-flex items-center justify-center gap-[0.5ch]"),
|
|
2999
3155
|
variant: "navigation",
|
|
3000
3156
|
slot: "previous",
|
|
3001
|
-
children: /* @__PURE__ */
|
|
3157
|
+
children: /* @__PURE__ */ jsx71(ChevronLeft, {})
|
|
3002
3158
|
}
|
|
3003
3159
|
),
|
|
3004
|
-
/* @__PURE__ */
|
|
3160
|
+
/* @__PURE__ */ jsx71(
|
|
3005
3161
|
IconButton,
|
|
3006
3162
|
{
|
|
3007
3163
|
className: cn41("inline-flex items-center justify-center gap-[0.5ch]"),
|
|
3008
3164
|
variant: "navigation",
|
|
3009
3165
|
slot: "next",
|
|
3010
|
-
children: /* @__PURE__ */
|
|
3166
|
+
children: /* @__PURE__ */ jsx71(ChevronRight, {})
|
|
3011
3167
|
}
|
|
3012
3168
|
)
|
|
3013
3169
|
]
|
|
@@ -3019,9 +3175,9 @@ var MonthControls_default = MonthControls;
|
|
|
3019
3175
|
// src/Calendar/MonthListBox.tsx
|
|
3020
3176
|
import { useContext as useContext15 } from "react";
|
|
3021
3177
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
3022
|
-
import { Button as
|
|
3178
|
+
import { Button as Button7 } from "react-aria-components";
|
|
3023
3179
|
import { cn as cn42 } from "@marigold/system";
|
|
3024
|
-
import { jsx as
|
|
3180
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3025
3181
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
3026
3182
|
const state = useContext15(CalendarStateContext3);
|
|
3027
3183
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
@@ -3031,15 +3187,15 @@ var MonthListBox = ({ setSelectedDropdown }) => {
|
|
|
3031
3187
|
state.setFocusedDate(date);
|
|
3032
3188
|
};
|
|
3033
3189
|
const { classNames: classNames3 } = useCalendarContext();
|
|
3034
|
-
return /* @__PURE__ */
|
|
3190
|
+
return /* @__PURE__ */ jsx72(
|
|
3035
3191
|
"ul",
|
|
3036
3192
|
{
|
|
3037
3193
|
"data-testid": "monthOptions",
|
|
3038
3194
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 p-2",
|
|
3039
3195
|
children: months.map((month, index2) => {
|
|
3040
3196
|
const isSelected = index2 === state.focusedDate.month - 1;
|
|
3041
|
-
return /* @__PURE__ */
|
|
3042
|
-
|
|
3197
|
+
return /* @__PURE__ */ jsx72("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx72(
|
|
3198
|
+
Button7,
|
|
3043
3199
|
{
|
|
3044
3200
|
slot: "previous",
|
|
3045
3201
|
onPress: () => {
|
|
@@ -3067,10 +3223,10 @@ import {
|
|
|
3067
3223
|
useEffect,
|
|
3068
3224
|
useRef as useRef2
|
|
3069
3225
|
} from "react";
|
|
3070
|
-
import { Button as
|
|
3226
|
+
import { Button as Button8, CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
3071
3227
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
3072
3228
|
import { cn as cn43 } from "@marigold/system";
|
|
3073
|
-
import { jsx as
|
|
3229
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3074
3230
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
3075
3231
|
const state = useContext16(CalendarStateContext4);
|
|
3076
3232
|
const { classNames: classNames3 } = useCalendarContext();
|
|
@@ -3101,20 +3257,20 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
3101
3257
|
let date = years[index2].value;
|
|
3102
3258
|
state.setFocusedDate(date);
|
|
3103
3259
|
};
|
|
3104
|
-
return /* @__PURE__ */
|
|
3260
|
+
return /* @__PURE__ */ jsx73(
|
|
3105
3261
|
"ul",
|
|
3106
3262
|
{
|
|
3107
3263
|
"data-testid": "yearOptions",
|
|
3108
3264
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
3109
3265
|
children: years.map((year, index2) => {
|
|
3110
3266
|
const isSelected = +year.formatted === state.focusedDate.year;
|
|
3111
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ jsx73("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx73(
|
|
3112
3268
|
"div",
|
|
3113
3269
|
{
|
|
3114
3270
|
ref: isSelected ? activeButtonRef : null,
|
|
3115
3271
|
className: "flex size-full justify-center",
|
|
3116
|
-
children: /* @__PURE__ */
|
|
3117
|
-
|
|
3272
|
+
children: /* @__PURE__ */ jsx73(
|
|
3273
|
+
Button8,
|
|
3118
3274
|
{
|
|
3119
3275
|
slot: "previous",
|
|
3120
3276
|
className: cn43(
|
|
@@ -3140,7 +3296,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
3140
3296
|
var YearListBox_default = YearListBox;
|
|
3141
3297
|
|
|
3142
3298
|
// src/Calendar/Calendar.tsx
|
|
3143
|
-
import { jsx as
|
|
3299
|
+
import { jsx as jsx74, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3144
3300
|
var _Calendar = ({
|
|
3145
3301
|
disabled,
|
|
3146
3302
|
readOnly,
|
|
@@ -3155,13 +3311,13 @@ var _Calendar = ({
|
|
|
3155
3311
|
isDateUnavailable: dateUnavailable,
|
|
3156
3312
|
...rest
|
|
3157
3313
|
};
|
|
3158
|
-
const classNames3 =
|
|
3314
|
+
const classNames3 = useClassNames42({ component: "Calendar", size: size2, variant });
|
|
3159
3315
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
3160
3316
|
const ViewMap = {
|
|
3161
|
-
month: /* @__PURE__ */
|
|
3162
|
-
year: /* @__PURE__ */
|
|
3317
|
+
month: /* @__PURE__ */ jsx74(MonthListBox_default, { setSelectedDropdown }),
|
|
3318
|
+
year: /* @__PURE__ */ jsx74(YearListBox_default, { setSelectedDropdown })
|
|
3163
3319
|
};
|
|
3164
|
-
return /* @__PURE__ */
|
|
3320
|
+
return /* @__PURE__ */ jsx74(CalendarContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsxs25(
|
|
3165
3321
|
Calendar,
|
|
3166
3322
|
{
|
|
3167
3323
|
className: cn44(
|
|
@@ -3170,7 +3326,7 @@ var _Calendar = ({
|
|
|
3170
3326
|
),
|
|
3171
3327
|
...props,
|
|
3172
3328
|
children: [
|
|
3173
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx74(
|
|
3174
3330
|
"div",
|
|
3175
3331
|
{
|
|
3176
3332
|
className: cn44(
|
|
@@ -3180,7 +3336,7 @@ var _Calendar = ({
|
|
|
3180
3336
|
children: ViewMap[selectedDropdown]
|
|
3181
3337
|
}
|
|
3182
3338
|
),
|
|
3183
|
-
/* @__PURE__ */
|
|
3339
|
+
/* @__PURE__ */ jsxs25(
|
|
3184
3340
|
"div",
|
|
3185
3341
|
{
|
|
3186
3342
|
className: cn44(
|
|
@@ -3188,8 +3344,8 @@ var _Calendar = ({
|
|
|
3188
3344
|
selectedDropdown && "pointer-events-none opacity-0"
|
|
3189
3345
|
),
|
|
3190
3346
|
children: [
|
|
3191
|
-
/* @__PURE__ */
|
|
3192
|
-
/* @__PURE__ */
|
|
3347
|
+
/* @__PURE__ */ jsxs25("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3348
|
+
/* @__PURE__ */ jsx74("div", { className: "flex w-fit gap-4", children: ["month", "year"].map((dateType) => /* @__PURE__ */ jsx74(
|
|
3193
3349
|
CalendarListBox,
|
|
3194
3350
|
{
|
|
3195
3351
|
type: dateType,
|
|
@@ -3198,9 +3354,9 @@ var _Calendar = ({
|
|
|
3198
3354
|
},
|
|
3199
3355
|
dateType
|
|
3200
3356
|
)) }),
|
|
3201
|
-
/* @__PURE__ */
|
|
3357
|
+
/* @__PURE__ */ jsx74(MonthControls_default, {})
|
|
3202
3358
|
] }),
|
|
3203
|
-
/* @__PURE__ */
|
|
3359
|
+
/* @__PURE__ */ jsx74(_CalendarGrid, {})
|
|
3204
3360
|
]
|
|
3205
3361
|
}
|
|
3206
3362
|
)
|
|
@@ -3211,9 +3367,9 @@ var _Calendar = ({
|
|
|
3211
3367
|
|
|
3212
3368
|
// src/DatePicker/DatePicker.tsx
|
|
3213
3369
|
import React6 from "react";
|
|
3214
|
-
import { DatePicker, Dialog as
|
|
3215
|
-
import { useClassNames as
|
|
3216
|
-
import { jsx as
|
|
3370
|
+
import { DatePicker, Dialog as Dialog4 } from "react-aria-components";
|
|
3371
|
+
import { useClassNames as useClassNames43 } from "@marigold/system";
|
|
3372
|
+
import { jsx as jsx75, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3217
3373
|
var _DatePicker = React6.forwardRef(
|
|
3218
3374
|
({
|
|
3219
3375
|
dateUnavailable,
|
|
@@ -3237,12 +3393,12 @@ var _DatePicker = React6.forwardRef(
|
|
|
3237
3393
|
granularity,
|
|
3238
3394
|
...rest
|
|
3239
3395
|
};
|
|
3240
|
-
const classNames3 =
|
|
3396
|
+
const classNames3 = useClassNames43({
|
|
3241
3397
|
component: "DatePicker",
|
|
3242
3398
|
size: size2,
|
|
3243
3399
|
variant
|
|
3244
3400
|
});
|
|
3245
|
-
return /* @__PURE__ */
|
|
3401
|
+
return /* @__PURE__ */ jsxs26(
|
|
3246
3402
|
FieldBase,
|
|
3247
3403
|
{
|
|
3248
3404
|
as: DatePicker,
|
|
@@ -3251,10 +3407,10 @@ var _DatePicker = React6.forwardRef(
|
|
|
3251
3407
|
...props,
|
|
3252
3408
|
ref,
|
|
3253
3409
|
children: [
|
|
3254
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ jsx75(
|
|
3255
3411
|
_DateInput,
|
|
3256
3412
|
{
|
|
3257
|
-
action: /* @__PURE__ */
|
|
3413
|
+
action: /* @__PURE__ */ jsx75(IconButton, { className: classNames3, children: /* @__PURE__ */ jsx75(
|
|
3258
3414
|
"svg",
|
|
3259
3415
|
{
|
|
3260
3416
|
"data-testid": "action",
|
|
@@ -3262,12 +3418,12 @@ var _DatePicker = React6.forwardRef(
|
|
|
3262
3418
|
width: 24,
|
|
3263
3419
|
height: 24,
|
|
3264
3420
|
fill: "currentColor",
|
|
3265
|
-
children: /* @__PURE__ */
|
|
3421
|
+
children: /* @__PURE__ */ jsx75("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" })
|
|
3266
3422
|
}
|
|
3267
3423
|
) })
|
|
3268
3424
|
}
|
|
3269
3425
|
),
|
|
3270
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ jsx75(_Popover, { children: /* @__PURE__ */ jsx75(Dialog4, { children: /* @__PURE__ */ jsx75(_Calendar, { disabled }) }) })
|
|
3271
3427
|
]
|
|
3272
3428
|
}
|
|
3273
3429
|
);
|
|
@@ -3281,8 +3437,8 @@ import {
|
|
|
3281
3437
|
paddingSpaceX as paddingSpaceX2,
|
|
3282
3438
|
paddingSpaceY as paddingSpaceY2
|
|
3283
3439
|
} from "@marigold/system";
|
|
3284
|
-
import { jsx as
|
|
3285
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
3440
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
3441
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx76(
|
|
3286
3442
|
"div",
|
|
3287
3443
|
{
|
|
3288
3444
|
className: cn45(
|
|
@@ -3295,23 +3451,23 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx73(
|
|
|
3295
3451
|
);
|
|
3296
3452
|
|
|
3297
3453
|
// src/Link/Link.tsx
|
|
3298
|
-
import { forwardRef as
|
|
3454
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
3299
3455
|
import { Link } from "react-aria-components";
|
|
3300
|
-
import { useClassNames as
|
|
3301
|
-
import { jsx as
|
|
3302
|
-
var _Link =
|
|
3456
|
+
import { useClassNames as useClassNames44 } from "@marigold/system";
|
|
3457
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3458
|
+
var _Link = forwardRef21(
|
|
3303
3459
|
({ variant, size: size2, disabled, children, ...props }, ref) => {
|
|
3304
|
-
const classNames3 =
|
|
3460
|
+
const classNames3 = useClassNames44({
|
|
3305
3461
|
component: "Link",
|
|
3306
3462
|
variant,
|
|
3307
3463
|
size: size2
|
|
3308
3464
|
});
|
|
3309
|
-
return /* @__PURE__ */
|
|
3465
|
+
return /* @__PURE__ */ jsx77(Link, { ...props, ref, className: classNames3, isDisabled: disabled, children });
|
|
3310
3466
|
}
|
|
3311
3467
|
);
|
|
3312
3468
|
|
|
3313
3469
|
// src/List/List.tsx
|
|
3314
|
-
import { useClassNames as
|
|
3470
|
+
import { useClassNames as useClassNames45 } from "@marigold/system";
|
|
3315
3471
|
|
|
3316
3472
|
// src/List/Context.ts
|
|
3317
3473
|
import { createContext as createContext9, useContext as useContext17 } from "react";
|
|
@@ -3319,14 +3475,14 @@ var ListContext = createContext9({});
|
|
|
3319
3475
|
var useListContext = () => useContext17(ListContext);
|
|
3320
3476
|
|
|
3321
3477
|
// src/List/ListItem.tsx
|
|
3322
|
-
import { jsx as
|
|
3478
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
3323
3479
|
var ListItem = ({ children, ...props }) => {
|
|
3324
3480
|
const { classNames: classNames3 } = useListContext();
|
|
3325
|
-
return /* @__PURE__ */
|
|
3481
|
+
return /* @__PURE__ */ jsx78("li", { ...props, className: classNames3, children });
|
|
3326
3482
|
};
|
|
3327
3483
|
|
|
3328
3484
|
// src/List/List.tsx
|
|
3329
|
-
import { jsx as
|
|
3485
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
3330
3486
|
var List = ({
|
|
3331
3487
|
as = "ul",
|
|
3332
3488
|
children,
|
|
@@ -3335,38 +3491,38 @@ var List = ({
|
|
|
3335
3491
|
...props
|
|
3336
3492
|
}) => {
|
|
3337
3493
|
const Component2 = as;
|
|
3338
|
-
const classNames3 =
|
|
3339
|
-
return /* @__PURE__ */
|
|
3494
|
+
const classNames3 = useClassNames45({ component: "List", variant, size: size2 });
|
|
3495
|
+
return /* @__PURE__ */ jsx79(Component2, { ...props, className: classNames3[as], children: /* @__PURE__ */ jsx79(ListContext.Provider, { value: { classNames: classNames3.item }, children }) });
|
|
3340
3496
|
};
|
|
3341
3497
|
List.Item = ListItem;
|
|
3342
3498
|
|
|
3343
3499
|
// src/Menu/Menu.tsx
|
|
3344
|
-
import { Button as
|
|
3345
|
-
import { useClassNames as
|
|
3500
|
+
import { Button as Button9, Menu, MenuTrigger } from "react-aria-components";
|
|
3501
|
+
import { useClassNames as useClassNames48 } from "@marigold/system";
|
|
3346
3502
|
|
|
3347
3503
|
// src/Menu/MenuItem.tsx
|
|
3348
3504
|
import { MenuItem } from "react-aria-components";
|
|
3349
|
-
import { useClassNames as
|
|
3350
|
-
import { jsx as
|
|
3505
|
+
import { useClassNames as useClassNames46 } from "@marigold/system";
|
|
3506
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
3351
3507
|
var _MenuItem = ({ children, ...props }) => {
|
|
3352
|
-
const classNames3 =
|
|
3353
|
-
return /* @__PURE__ */
|
|
3508
|
+
const classNames3 = useClassNames46({ component: "Menu" });
|
|
3509
|
+
return /* @__PURE__ */ jsx80(MenuItem, { ...props, className: classNames3.item, children });
|
|
3354
3510
|
};
|
|
3355
3511
|
|
|
3356
3512
|
// src/Menu/MenuSection.tsx
|
|
3357
3513
|
import { MenuSection } from "react-aria-components";
|
|
3358
|
-
import { useClassNames as
|
|
3359
|
-
import { jsx as
|
|
3514
|
+
import { useClassNames as useClassNames47 } from "@marigold/system";
|
|
3515
|
+
import { jsx as jsx81, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3360
3516
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
3361
|
-
const className =
|
|
3362
|
-
return /* @__PURE__ */
|
|
3363
|
-
/* @__PURE__ */
|
|
3517
|
+
const className = useClassNames47({ component: "Menu" });
|
|
3518
|
+
return /* @__PURE__ */ jsxs27(MenuSection, { ...props, children: [
|
|
3519
|
+
/* @__PURE__ */ jsx81(_Header, { className: className.section, children: title }),
|
|
3364
3520
|
children
|
|
3365
3521
|
] });
|
|
3366
3522
|
};
|
|
3367
3523
|
|
|
3368
3524
|
// src/Menu/Menu.tsx
|
|
3369
|
-
import { jsx as
|
|
3525
|
+
import { jsx as jsx82, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3370
3526
|
var _Menu = ({
|
|
3371
3527
|
children,
|
|
3372
3528
|
label,
|
|
@@ -3378,10 +3534,10 @@ var _Menu = ({
|
|
|
3378
3534
|
"aria-label": ariaLabel,
|
|
3379
3535
|
...props
|
|
3380
3536
|
}) => {
|
|
3381
|
-
const classNames3 =
|
|
3382
|
-
return /* @__PURE__ */
|
|
3383
|
-
/* @__PURE__ */
|
|
3384
|
-
|
|
3537
|
+
const classNames3 = useClassNames48({ component: "Menu", variant, size: size2 });
|
|
3538
|
+
return /* @__PURE__ */ jsxs28(MenuTrigger, { ...props, children: [
|
|
3539
|
+
/* @__PURE__ */ jsx82(
|
|
3540
|
+
Button9,
|
|
3385
3541
|
{
|
|
3386
3542
|
className: classNames3.button,
|
|
3387
3543
|
"aria-label": ariaLabel,
|
|
@@ -3389,33 +3545,49 @@ var _Menu = ({
|
|
|
3389
3545
|
children: label
|
|
3390
3546
|
}
|
|
3391
3547
|
),
|
|
3392
|
-
/* @__PURE__ */
|
|
3548
|
+
/* @__PURE__ */ jsx82(_Popover, { open, placement, children: /* @__PURE__ */ jsx82(Menu, { ...props, className: classNames3.container, children }) })
|
|
3393
3549
|
] });
|
|
3394
3550
|
};
|
|
3395
3551
|
_Menu.Item = _MenuItem;
|
|
3396
3552
|
_Menu.Section = _MenuSection;
|
|
3397
3553
|
|
|
3398
3554
|
// src/Menu/ActionMenu.tsx
|
|
3399
|
-
import { Button as
|
|
3400
|
-
import {
|
|
3401
|
-
import { jsx as
|
|
3555
|
+
import { Button as Button10, Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
3556
|
+
import { useClassNames as useClassNames49 } from "@marigold/system";
|
|
3557
|
+
import { jsx as jsx83, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3402
3558
|
var ActionMenu = ({
|
|
3403
3559
|
variant,
|
|
3404
3560
|
size: size2,
|
|
3405
3561
|
disabled,
|
|
3406
3562
|
...props
|
|
3407
3563
|
}) => {
|
|
3408
|
-
const classNames3 =
|
|
3409
|
-
return /* @__PURE__ */
|
|
3410
|
-
/* @__PURE__ */
|
|
3411
|
-
|
|
3564
|
+
const classNames3 = useClassNames49({ component: "Menu", variant, size: size2 });
|
|
3565
|
+
return /* @__PURE__ */ jsxs29(MenuTrigger2, { children: [
|
|
3566
|
+
/* @__PURE__ */ jsx83(Button10, { className: classNames3.button, isDisabled: disabled, children: /* @__PURE__ */ jsxs29(
|
|
3567
|
+
"svg",
|
|
3568
|
+
{
|
|
3569
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3570
|
+
viewBox: "0 0 24 24",
|
|
3571
|
+
fill: "none",
|
|
3572
|
+
stroke: "currentColor",
|
|
3573
|
+
strokeWidth: 2,
|
|
3574
|
+
strokeLinecap: "round",
|
|
3575
|
+
strokeLinejoin: "round",
|
|
3576
|
+
children: [
|
|
3577
|
+
/* @__PURE__ */ jsx83("circle", { cx: 12, cy: 12, r: 1 }),
|
|
3578
|
+
/* @__PURE__ */ jsx83("circle", { cx: 12, cy: 5, r: 1 }),
|
|
3579
|
+
/* @__PURE__ */ jsx83("circle", { cx: 12, cy: 19, r: 1 })
|
|
3580
|
+
]
|
|
3581
|
+
}
|
|
3582
|
+
) }),
|
|
3583
|
+
/* @__PURE__ */ jsx83(_Popover, { children: /* @__PURE__ */ jsx83(Menu2, { ...props, className: classNames3.container, children: props.children }) })
|
|
3412
3584
|
] });
|
|
3413
3585
|
};
|
|
3414
3586
|
|
|
3415
3587
|
// src/SectionMessage/SectionMessage.tsx
|
|
3416
3588
|
import { useRef as useRef3, useState as useState2 } from "react";
|
|
3417
3589
|
import { useButton } from "@react-aria/button";
|
|
3418
|
-
import { cn as cn48, useClassNames as
|
|
3590
|
+
import { cn as cn48, useClassNames as useClassNames50 } from "@marigold/system";
|
|
3419
3591
|
|
|
3420
3592
|
// src/SectionMessage/Context.tsx
|
|
3421
3593
|
import { createContext as createContext10, useContext as useContext18 } from "react";
|
|
@@ -3424,32 +3596,32 @@ var useSectionMessageContext = () => useContext18(SectionMessageContext);
|
|
|
3424
3596
|
|
|
3425
3597
|
// src/SectionMessage/SectionMessageContent.tsx
|
|
3426
3598
|
import { cn as cn46 } from "@marigold/system";
|
|
3427
|
-
import { jsx as
|
|
3599
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3428
3600
|
var SectionMessageContent = ({
|
|
3429
3601
|
children
|
|
3430
3602
|
}) => {
|
|
3431
3603
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3432
|
-
return /* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ jsx84("div", { className: cn46("[grid-area:content]", classNames3.content), children });
|
|
3433
3605
|
};
|
|
3434
3606
|
|
|
3435
3607
|
// src/SectionMessage/SectionMessageTitle.tsx
|
|
3436
3608
|
import { cn as cn47 } from "@marigold/system";
|
|
3437
|
-
import { jsx as
|
|
3609
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
3438
3610
|
var SectionMessageTitle = ({ children }) => {
|
|
3439
3611
|
const { classNames: classNames3 } = useSectionMessageContext();
|
|
3440
|
-
return /* @__PURE__ */
|
|
3612
|
+
return /* @__PURE__ */ jsx85("div", { className: cn47("[grid-area:title]", classNames3.title), children });
|
|
3441
3613
|
};
|
|
3442
3614
|
|
|
3443
3615
|
// src/SectionMessage/SectionMessage.tsx
|
|
3444
|
-
import { jsx as
|
|
3445
|
-
var
|
|
3446
|
-
success: () => /* @__PURE__ */
|
|
3616
|
+
import { jsx as jsx86, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3617
|
+
var icons2 = {
|
|
3618
|
+
success: () => /* @__PURE__ */ jsx86(
|
|
3447
3619
|
"svg",
|
|
3448
3620
|
{
|
|
3449
3621
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3450
3622
|
viewBox: "0 0 24 24",
|
|
3451
3623
|
fill: "currentColor",
|
|
3452
|
-
children: /* @__PURE__ */
|
|
3624
|
+
children: /* @__PURE__ */ jsx86(
|
|
3453
3625
|
"path",
|
|
3454
3626
|
{
|
|
3455
3627
|
fillRule: "evenodd",
|
|
@@ -3459,13 +3631,13 @@ var icons = {
|
|
|
3459
3631
|
)
|
|
3460
3632
|
}
|
|
3461
3633
|
),
|
|
3462
|
-
info: () => /* @__PURE__ */
|
|
3634
|
+
info: () => /* @__PURE__ */ jsx86(
|
|
3463
3635
|
"svg",
|
|
3464
3636
|
{
|
|
3465
3637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3466
3638
|
viewBox: "0 0 24 24",
|
|
3467
3639
|
fill: "currentColor",
|
|
3468
|
-
children: /* @__PURE__ */
|
|
3640
|
+
children: /* @__PURE__ */ jsx86(
|
|
3469
3641
|
"path",
|
|
3470
3642
|
{
|
|
3471
3643
|
fillRule: "evenodd",
|
|
@@ -3475,13 +3647,13 @@ var icons = {
|
|
|
3475
3647
|
)
|
|
3476
3648
|
}
|
|
3477
3649
|
),
|
|
3478
|
-
warning: () => /* @__PURE__ */
|
|
3650
|
+
warning: () => /* @__PURE__ */ jsx86(
|
|
3479
3651
|
"svg",
|
|
3480
3652
|
{
|
|
3481
3653
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3482
3654
|
viewBox: "0 0 24 24",
|
|
3483
3655
|
fill: "currentColor",
|
|
3484
|
-
children: /* @__PURE__ */
|
|
3656
|
+
children: /* @__PURE__ */ jsx86(
|
|
3485
3657
|
"path",
|
|
3486
3658
|
{
|
|
3487
3659
|
fillRule: "evenodd",
|
|
@@ -3491,13 +3663,13 @@ var icons = {
|
|
|
3491
3663
|
)
|
|
3492
3664
|
}
|
|
3493
3665
|
),
|
|
3494
|
-
error: () => /* @__PURE__ */
|
|
3666
|
+
error: () => /* @__PURE__ */ jsx86(
|
|
3495
3667
|
"svg",
|
|
3496
3668
|
{
|
|
3497
3669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3498
3670
|
viewBox: "0 0 24 24",
|
|
3499
3671
|
fill: "currentColor",
|
|
3500
|
-
children: /* @__PURE__ */
|
|
3672
|
+
children: /* @__PURE__ */ jsx86(
|
|
3501
3673
|
"path",
|
|
3502
3674
|
{
|
|
3503
3675
|
fillRule: "evenodd",
|
|
@@ -3518,12 +3690,12 @@ var SectionMessage = ({
|
|
|
3518
3690
|
...props
|
|
3519
3691
|
}) => {
|
|
3520
3692
|
const buttonRef = useRef3(null);
|
|
3521
|
-
const classNames3 =
|
|
3693
|
+
const classNames3 = useClassNames50({
|
|
3522
3694
|
component: "SectionMessage",
|
|
3523
3695
|
variant,
|
|
3524
3696
|
size: size2
|
|
3525
3697
|
});
|
|
3526
|
-
const Icon4 =
|
|
3698
|
+
const Icon4 = icons2[variant];
|
|
3527
3699
|
const [internalVisible, setInternalVisible] = useState2(true);
|
|
3528
3700
|
const isCurrentlyVisible = close != null ? close : internalVisible;
|
|
3529
3701
|
const { buttonProps } = useButton(props, buttonRef);
|
|
@@ -3534,15 +3706,15 @@ var SectionMessage = ({
|
|
|
3534
3706
|
}
|
|
3535
3707
|
};
|
|
3536
3708
|
if (!isCurrentlyVisible) return null;
|
|
3537
|
-
return /* @__PURE__ */
|
|
3709
|
+
return /* @__PURE__ */ jsx86(SectionMessageContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsxs30(
|
|
3538
3710
|
"div",
|
|
3539
3711
|
{
|
|
3540
3712
|
role: variant === "error" ? "alert" : void 0,
|
|
3541
3713
|
...props,
|
|
3542
3714
|
className: cn48("grid auto-rows-min", classNames3.container),
|
|
3543
3715
|
children: [
|
|
3544
|
-
/* @__PURE__ */
|
|
3545
|
-
closeButton && /* @__PURE__ */
|
|
3716
|
+
/* @__PURE__ */ jsx86("div", { className: cn48("[grid-area:icon]", classNames3.icon), children: Icon4 && /* @__PURE__ */ jsx86(Icon4, {}) }),
|
|
3717
|
+
closeButton && /* @__PURE__ */ jsx86(
|
|
3546
3718
|
CloseButton,
|
|
3547
3719
|
{
|
|
3548
3720
|
...buttonProps,
|
|
@@ -3562,7 +3734,7 @@ SectionMessage.Content = SectionMessageContent;
|
|
|
3562
3734
|
|
|
3563
3735
|
// src/Multiselect/Multiselect.tsx
|
|
3564
3736
|
import {
|
|
3565
|
-
Button as
|
|
3737
|
+
Button as Button11,
|
|
3566
3738
|
ButtonContext,
|
|
3567
3739
|
FieldErrorContext as FieldErrorContext2,
|
|
3568
3740
|
InputContext,
|
|
@@ -3767,7 +3939,7 @@ function _extends() {
|
|
|
3767
3939
|
|
|
3768
3940
|
// ../../node_modules/.pnpm/react-select@5.10.1_@types+react@19.1.5_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-select/dist/react-select.esm.js
|
|
3769
3941
|
import * as React11 from "react";
|
|
3770
|
-
import { forwardRef as
|
|
3942
|
+
import { forwardRef as forwardRef24, useMemo as useMemo5 } from "react";
|
|
3771
3943
|
|
|
3772
3944
|
// ../../node_modules/.pnpm/@babel+runtime@7.27.1/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
3773
3945
|
function _classCallCheck(a, n) {
|
|
@@ -3879,7 +4051,7 @@ import { useMemo as useMemo4, Fragment as Fragment8, useRef as useRef6, useCallb
|
|
|
3879
4051
|
|
|
3880
4052
|
// ../../node_modules/.pnpm/@emotion+react@11.14.0_@types+react@19.1.5_react@19.1.0/node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
|
|
3881
4053
|
import * as React8 from "react";
|
|
3882
|
-
import { useContext as useContext20, forwardRef as
|
|
4054
|
+
import { useContext as useContext20, forwardRef as forwardRef23 } from "react";
|
|
3883
4055
|
|
|
3884
4056
|
// ../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
|
|
3885
4057
|
var isDevelopment = false;
|
|
@@ -5067,7 +5239,7 @@ var EmotionCacheContext = /* @__PURE__ */ React8.createContext(
|
|
|
5067
5239
|
);
|
|
5068
5240
|
var CacheProvider = EmotionCacheContext.Provider;
|
|
5069
5241
|
var withEmotionCache = function withEmotionCache2(func) {
|
|
5070
|
-
return /* @__PURE__ */
|
|
5242
|
+
return /* @__PURE__ */ forwardRef23(function(props, ref) {
|
|
5071
5243
|
var cache = useContext20(EmotionCacheContext);
|
|
5072
5244
|
return func(props, cache, ref);
|
|
5073
5245
|
});
|
|
@@ -5159,7 +5331,7 @@ var Emotion$1 = Emotion;
|
|
|
5159
5331
|
import * as React9 from "react";
|
|
5160
5332
|
var import_extends2 = __toESM(require_extends());
|
|
5161
5333
|
var import_hoist_non_react_statics = __toESM(require_hoist_non_react_statics_cjs());
|
|
5162
|
-
var
|
|
5334
|
+
var jsx87 = function jsx88(type, props) {
|
|
5163
5335
|
var args = arguments;
|
|
5164
5336
|
if (props == null || !hasOwn.call(props, "css")) {
|
|
5165
5337
|
return React9.createElement.apply(void 0, args);
|
|
@@ -5174,10 +5346,10 @@ var jsx84 = function jsx85(type, props) {
|
|
|
5174
5346
|
return React9.createElement.apply(null, createElementArgArray);
|
|
5175
5347
|
};
|
|
5176
5348
|
(function(_jsx) {
|
|
5177
|
-
var
|
|
5349
|
+
var JSX2;
|
|
5178
5350
|
/* @__PURE__ */ (function(_JSX) {
|
|
5179
|
-
})(
|
|
5180
|
-
})(
|
|
5351
|
+
})(JSX2 || (JSX2 = _jsx.JSX || (_jsx.JSX = {})));
|
|
5352
|
+
})(jsx87 || (jsx87 = {}));
|
|
5181
5353
|
function css() {
|
|
5182
5354
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5183
5355
|
args[_key] = arguments[_key];
|
|
@@ -5980,7 +6152,7 @@ var MenuPlacer = function MenuPlacer2(props) {
|
|
|
5980
6152
|
};
|
|
5981
6153
|
var Menu3 = function Menu4(props) {
|
|
5982
6154
|
var children = props.children, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
5983
|
-
return
|
|
6155
|
+
return jsx87("div", _extends({}, getStyleProps(props, "menu", {
|
|
5984
6156
|
menu: true
|
|
5985
6157
|
}), {
|
|
5986
6158
|
ref: innerRef
|
|
@@ -6002,7 +6174,7 @@ var menuListCSS = function menuListCSS2(_ref4, unstyled) {
|
|
|
6002
6174
|
};
|
|
6003
6175
|
var MenuList = function MenuList2(props) {
|
|
6004
6176
|
var children = props.children, innerProps = props.innerProps, innerRef = props.innerRef, isMulti = props.isMulti;
|
|
6005
|
-
return
|
|
6177
|
+
return jsx87("div", _extends({}, getStyleProps(props, "menuList", {
|
|
6006
6178
|
"menu-list": true,
|
|
6007
6179
|
"menu-list--is-multi": isMulti
|
|
6008
6180
|
}), {
|
|
@@ -6022,7 +6194,7 @@ var noOptionsMessageCSS = noticeCSS;
|
|
|
6022
6194
|
var loadingMessageCSS = noticeCSS;
|
|
6023
6195
|
var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
6024
6196
|
var _ref6$children = _ref6.children, children = _ref6$children === void 0 ? "No options" : _ref6$children, innerProps = _ref6.innerProps, restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
6025
|
-
return
|
|
6197
|
+
return jsx87("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
6026
6198
|
children,
|
|
6027
6199
|
innerProps
|
|
6028
6200
|
}), "noOptionsMessage", {
|
|
@@ -6032,7 +6204,7 @@ var NoOptionsMessage = function NoOptionsMessage2(_ref6) {
|
|
|
6032
6204
|
};
|
|
6033
6205
|
var LoadingMessage = function LoadingMessage2(_ref7) {
|
|
6034
6206
|
var _ref7$children = _ref7.children, children = _ref7$children === void 0 ? "Loading..." : _ref7$children, innerProps = _ref7.innerProps, restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
6035
|
-
return
|
|
6207
|
+
return jsx87("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
6036
6208
|
children,
|
|
6037
6209
|
innerProps
|
|
6038
6210
|
}), "loadingMessage", {
|
|
@@ -6095,7 +6267,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
6095
6267
|
runAutoUpdate();
|
|
6096
6268
|
}, [runAutoUpdate]);
|
|
6097
6269
|
if (!appendTo && menuPosition !== "fixed" || !computedPosition) return null;
|
|
6098
|
-
var menuWrapper =
|
|
6270
|
+
var menuWrapper = jsx87("div", _extends({
|
|
6099
6271
|
ref: setMenuPortalElement
|
|
6100
6272
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
6101
6273
|
offset: computedPosition.offset,
|
|
@@ -6104,7 +6276,7 @@ var MenuPortal = function MenuPortal2(props) {
|
|
|
6104
6276
|
}), "menuPortal", {
|
|
6105
6277
|
"menu-portal": true
|
|
6106
6278
|
}), innerProps), children);
|
|
6107
|
-
return
|
|
6279
|
+
return jsx87(PortalPlacementContext.Provider, {
|
|
6108
6280
|
value: portalPlacementContext
|
|
6109
6281
|
}, appendTo ? /* @__PURE__ */ createPortal(menuWrapper, appendTo) : menuWrapper);
|
|
6110
6282
|
};
|
|
@@ -6120,7 +6292,7 @@ var containerCSS = function containerCSS2(_ref3) {
|
|
|
6120
6292
|
};
|
|
6121
6293
|
var SelectContainer = function SelectContainer2(props) {
|
|
6122
6294
|
var children = props.children, innerProps = props.innerProps, isDisabled = props.isDisabled, isRtl = props.isRtl;
|
|
6123
|
-
return
|
|
6295
|
+
return jsx87("div", _extends({}, getStyleProps(props, "container", {
|
|
6124
6296
|
"--is-disabled": isDisabled,
|
|
6125
6297
|
"--is-rtl": isRtl
|
|
6126
6298
|
}), innerProps), children);
|
|
@@ -6141,7 +6313,7 @@ var valueContainerCSS = function valueContainerCSS2(_ref23, unstyled) {
|
|
|
6141
6313
|
};
|
|
6142
6314
|
var ValueContainer = function ValueContainer2(props) {
|
|
6143
6315
|
var children = props.children, innerProps = props.innerProps, isMulti = props.isMulti, hasValue = props.hasValue;
|
|
6144
|
-
return
|
|
6316
|
+
return jsx87("div", _extends({}, getStyleProps(props, "valueContainer", {
|
|
6145
6317
|
"value-container": true,
|
|
6146
6318
|
"value-container--is-multi": isMulti,
|
|
6147
6319
|
"value-container--has-value": hasValue
|
|
@@ -6157,7 +6329,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS2() {
|
|
|
6157
6329
|
};
|
|
6158
6330
|
var IndicatorsContainer = function IndicatorsContainer2(props) {
|
|
6159
6331
|
var children = props.children, innerProps = props.innerProps;
|
|
6160
|
-
return
|
|
6332
|
+
return jsx87("div", _extends({}, getStyleProps(props, "indicatorsContainer", {
|
|
6161
6333
|
indicators: true
|
|
6162
6334
|
}), innerProps), children);
|
|
6163
6335
|
};
|
|
@@ -6178,7 +6350,7 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
6178
6350
|
};
|
|
6179
6351
|
var Svg = function Svg2(_ref3) {
|
|
6180
6352
|
var size2 = _ref3.size, props = _objectWithoutProperties(_ref3, _excluded$2);
|
|
6181
|
-
return
|
|
6353
|
+
return jsx87("svg", _extends({
|
|
6182
6354
|
height: size2,
|
|
6183
6355
|
width: size2,
|
|
6184
6356
|
viewBox: "0 0 20 20",
|
|
@@ -6188,16 +6360,16 @@ var Svg = function Svg2(_ref3) {
|
|
|
6188
6360
|
}, props));
|
|
6189
6361
|
};
|
|
6190
6362
|
var CrossIcon = function CrossIcon2(props) {
|
|
6191
|
-
return
|
|
6363
|
+
return jsx87(Svg, _extends({
|
|
6192
6364
|
size: 20
|
|
6193
|
-
}, props),
|
|
6365
|
+
}, props), jsx87("path", {
|
|
6194
6366
|
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"
|
|
6195
6367
|
}));
|
|
6196
6368
|
};
|
|
6197
6369
|
var DownChevron = function DownChevron2(props) {
|
|
6198
|
-
return
|
|
6370
|
+
return jsx87(Svg, _extends({
|
|
6199
6371
|
size: 20
|
|
6200
|
-
}, props),
|
|
6372
|
+
}, props), jsx87("path", {
|
|
6201
6373
|
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"
|
|
6202
6374
|
}));
|
|
6203
6375
|
};
|
|
@@ -6218,18 +6390,18 @@ var baseCSS = function baseCSS2(_ref3, unstyled) {
|
|
|
6218
6390
|
var dropdownIndicatorCSS = baseCSS;
|
|
6219
6391
|
var DropdownIndicator = function DropdownIndicator2(props) {
|
|
6220
6392
|
var children = props.children, innerProps = props.innerProps;
|
|
6221
|
-
return
|
|
6393
|
+
return jsx87("div", _extends({}, getStyleProps(props, "dropdownIndicator", {
|
|
6222
6394
|
indicator: true,
|
|
6223
6395
|
"dropdown-indicator": true
|
|
6224
|
-
}), innerProps), children ||
|
|
6396
|
+
}), innerProps), children || jsx87(DownChevron, null));
|
|
6225
6397
|
};
|
|
6226
6398
|
var clearIndicatorCSS = baseCSS;
|
|
6227
6399
|
var ClearIndicator = function ClearIndicator2(props) {
|
|
6228
6400
|
var children = props.children, innerProps = props.innerProps;
|
|
6229
|
-
return
|
|
6401
|
+
return jsx87("div", _extends({}, getStyleProps(props, "clearIndicator", {
|
|
6230
6402
|
indicator: true,
|
|
6231
6403
|
"clear-indicator": true
|
|
6232
|
-
}), innerProps), children ||
|
|
6404
|
+
}), innerProps), children || jsx87(CrossIcon, null));
|
|
6233
6405
|
};
|
|
6234
6406
|
var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
6235
6407
|
var isDisabled = _ref4.isDisabled, _ref4$theme = _ref4.theme, baseUnit2 = _ref4$theme.spacing.baseUnit, colors2 = _ref4$theme.colors;
|
|
@@ -6245,7 +6417,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS2(_ref4, unstyled) {
|
|
|
6245
6417
|
};
|
|
6246
6418
|
var IndicatorSeparator = function IndicatorSeparator2(props) {
|
|
6247
6419
|
var innerProps = props.innerProps;
|
|
6248
|
-
return
|
|
6420
|
+
return jsx87("span", _extends({}, innerProps, getStyleProps(props, "indicatorSeparator", {
|
|
6249
6421
|
"indicator-separator": true
|
|
6250
6422
|
})));
|
|
6251
6423
|
};
|
|
@@ -6269,7 +6441,7 @@ var loadingIndicatorCSS = function loadingIndicatorCSS2(_ref5, unstyled) {
|
|
|
6269
6441
|
};
|
|
6270
6442
|
var LoadingDot = function LoadingDot2(_ref6) {
|
|
6271
6443
|
var delay = _ref6.delay, offset2 = _ref6.offset;
|
|
6272
|
-
return
|
|
6444
|
+
return jsx87("span", {
|
|
6273
6445
|
css: /* @__PURE__ */ css({
|
|
6274
6446
|
animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
|
|
6275
6447
|
backgroundColor: "currentColor",
|
|
@@ -6284,20 +6456,20 @@ var LoadingDot = function LoadingDot2(_ref6) {
|
|
|
6284
6456
|
};
|
|
6285
6457
|
var LoadingIndicator = function LoadingIndicator2(_ref7) {
|
|
6286
6458
|
var innerProps = _ref7.innerProps, isRtl = _ref7.isRtl, _ref7$size = _ref7.size, size2 = _ref7$size === void 0 ? 4 : _ref7$size, restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
6287
|
-
return
|
|
6459
|
+
return jsx87("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
6288
6460
|
innerProps,
|
|
6289
6461
|
isRtl,
|
|
6290
6462
|
size: size2
|
|
6291
6463
|
}), "loadingIndicator", {
|
|
6292
6464
|
indicator: true,
|
|
6293
6465
|
"loading-indicator": true
|
|
6294
|
-
}), innerProps),
|
|
6466
|
+
}), innerProps), jsx87(LoadingDot, {
|
|
6295
6467
|
delay: 0,
|
|
6296
6468
|
offset: isRtl
|
|
6297
|
-
}),
|
|
6469
|
+
}), jsx87(LoadingDot, {
|
|
6298
6470
|
delay: 160,
|
|
6299
6471
|
offset: true
|
|
6300
|
-
}),
|
|
6472
|
+
}), jsx87(LoadingDot, {
|
|
6301
6473
|
delay: 320,
|
|
6302
6474
|
offset: !isRtl
|
|
6303
6475
|
}));
|
|
@@ -6329,7 +6501,7 @@ var css$1 = function css2(_ref3, unstyled) {
|
|
|
6329
6501
|
};
|
|
6330
6502
|
var Control = function Control2(props) {
|
|
6331
6503
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, innerRef = props.innerRef, innerProps = props.innerProps, menuIsOpen = props.menuIsOpen;
|
|
6332
|
-
return
|
|
6504
|
+
return jsx87("div", _extends({
|
|
6333
6505
|
ref: innerRef
|
|
6334
6506
|
}, getStyleProps(props, "control", {
|
|
6335
6507
|
control: true,
|
|
@@ -6350,16 +6522,16 @@ var groupCSS = function groupCSS2(_ref3, unstyled) {
|
|
|
6350
6522
|
};
|
|
6351
6523
|
};
|
|
6352
6524
|
var Group2 = function Group3(props) {
|
|
6353
|
-
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames2 = props.getClassNames,
|
|
6354
|
-
return
|
|
6525
|
+
var children = props.children, cx = props.cx, getStyles = props.getStyles, getClassNames2 = props.getClassNames, Heading6 = props.Heading, headingProps = props.headingProps, innerProps = props.innerProps, label = props.label, theme = props.theme, selectProps = props.selectProps;
|
|
6526
|
+
return jsx87("div", _extends({}, getStyleProps(props, "group", {
|
|
6355
6527
|
group: true
|
|
6356
|
-
}), innerProps),
|
|
6528
|
+
}), innerProps), jsx87(Heading6, _extends({}, headingProps, {
|
|
6357
6529
|
selectProps,
|
|
6358
6530
|
theme,
|
|
6359
6531
|
getStyles,
|
|
6360
6532
|
getClassNames: getClassNames2,
|
|
6361
6533
|
cx
|
|
6362
|
-
}), label),
|
|
6534
|
+
}), label), jsx87("div", null, children));
|
|
6363
6535
|
};
|
|
6364
6536
|
var groupHeadingCSS = function groupHeadingCSS2(_ref23, unstyled) {
|
|
6365
6537
|
var _ref2$theme = _ref23.theme, colors2 = _ref2$theme.colors, spacing2 = _ref2$theme.spacing;
|
|
@@ -6381,7 +6553,7 @@ var GroupHeading = function GroupHeading2(props) {
|
|
|
6381
6553
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
6382
6554
|
_cleanCommonProps.data;
|
|
6383
6555
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
|
|
6384
|
-
return
|
|
6556
|
+
return jsx87("div", _extends({}, getStyleProps(props, "groupHeading", {
|
|
6385
6557
|
"group-heading": true
|
|
6386
6558
|
}), innerProps));
|
|
6387
6559
|
};
|
|
@@ -6433,11 +6605,11 @@ var inputStyle = function inputStyle2(isHidden) {
|
|
|
6433
6605
|
var Input2 = function Input3(props) {
|
|
6434
6606
|
var cx = props.cx, value = props.value;
|
|
6435
6607
|
var _cleanCommonProps = cleanCommonProps(props), innerRef = _cleanCommonProps.innerRef, isDisabled = _cleanCommonProps.isDisabled, isHidden = _cleanCommonProps.isHidden, inputClassName = _cleanCommonProps.inputClassName, innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded3);
|
|
6436
|
-
return
|
|
6608
|
+
return jsx87("div", _extends({}, getStyleProps(props, "input", {
|
|
6437
6609
|
"input-container": true
|
|
6438
6610
|
}), {
|
|
6439
6611
|
"data-value": value || ""
|
|
6440
|
-
}),
|
|
6612
|
+
}), jsx87("input", _extends({
|
|
6441
6613
|
className: cx({
|
|
6442
6614
|
input: true
|
|
6443
6615
|
}, inputClassName),
|
|
@@ -6491,35 +6663,35 @@ var multiValueRemoveCSS = function multiValueRemoveCSS2(_ref3, unstyled) {
|
|
|
6491
6663
|
};
|
|
6492
6664
|
var MultiValueGeneric = function MultiValueGeneric2(_ref4) {
|
|
6493
6665
|
var children = _ref4.children, innerProps = _ref4.innerProps;
|
|
6494
|
-
return
|
|
6666
|
+
return jsx87("div", innerProps, children);
|
|
6495
6667
|
};
|
|
6496
6668
|
var MultiValueContainer = MultiValueGeneric;
|
|
6497
6669
|
var MultiValueLabel = MultiValueGeneric;
|
|
6498
6670
|
function MultiValueRemove(_ref5) {
|
|
6499
6671
|
var children = _ref5.children, innerProps = _ref5.innerProps;
|
|
6500
|
-
return
|
|
6672
|
+
return jsx87("div", _extends({
|
|
6501
6673
|
role: "button"
|
|
6502
|
-
}, innerProps), children ||
|
|
6674
|
+
}, innerProps), children || jsx87(CrossIcon, {
|
|
6503
6675
|
size: 14
|
|
6504
6676
|
}));
|
|
6505
6677
|
}
|
|
6506
6678
|
var MultiValue = function MultiValue2(props) {
|
|
6507
6679
|
var children = props.children, components2 = props.components, data = props.data, innerProps = props.innerProps, isDisabled = props.isDisabled, removeProps3 = props.removeProps, selectProps = props.selectProps;
|
|
6508
6680
|
var Container2 = components2.Container, Label3 = components2.Label, Remove = components2.Remove;
|
|
6509
|
-
return
|
|
6681
|
+
return jsx87(Container2, {
|
|
6510
6682
|
data,
|
|
6511
6683
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValue", {
|
|
6512
6684
|
"multi-value": true,
|
|
6513
6685
|
"multi-value--is-disabled": isDisabled
|
|
6514
6686
|
})), innerProps),
|
|
6515
6687
|
selectProps
|
|
6516
|
-
},
|
|
6688
|
+
}, jsx87(Label3, {
|
|
6517
6689
|
data,
|
|
6518
6690
|
innerProps: _objectSpread2({}, getStyleProps(props, "multiValueLabel", {
|
|
6519
6691
|
"multi-value__label": true
|
|
6520
6692
|
})),
|
|
6521
6693
|
selectProps
|
|
6522
|
-
}, children),
|
|
6694
|
+
}, children), jsx87(Remove, {
|
|
6523
6695
|
data,
|
|
6524
6696
|
innerProps: _objectSpread2(_objectSpread2({}, getStyleProps(props, "multiValueRemove", {
|
|
6525
6697
|
"multi-value__remove": true
|
|
@@ -6552,7 +6724,7 @@ var optionCSS = function optionCSS2(_ref3, unstyled) {
|
|
|
6552
6724
|
};
|
|
6553
6725
|
var Option = function Option2(props) {
|
|
6554
6726
|
var children = props.children, isDisabled = props.isDisabled, isFocused = props.isFocused, isSelected = props.isSelected, innerRef = props.innerRef, innerProps = props.innerProps;
|
|
6555
|
-
return
|
|
6727
|
+
return jsx87("div", _extends({}, getStyleProps(props, "option", {
|
|
6556
6728
|
option: true,
|
|
6557
6729
|
"option--is-disabled": isDisabled,
|
|
6558
6730
|
"option--is-focused": isFocused,
|
|
@@ -6576,7 +6748,7 @@ var placeholderCSS = function placeholderCSS2(_ref3, unstyled) {
|
|
|
6576
6748
|
};
|
|
6577
6749
|
var Placeholder = function Placeholder2(props) {
|
|
6578
6750
|
var children = props.children, innerProps = props.innerProps;
|
|
6579
|
-
return
|
|
6751
|
+
return jsx87("div", _extends({}, getStyleProps(props, "placeholder", {
|
|
6580
6752
|
placeholder: true
|
|
6581
6753
|
}), innerProps), children);
|
|
6582
6754
|
};
|
|
@@ -6598,7 +6770,7 @@ var css3 = function css4(_ref3, unstyled) {
|
|
|
6598
6770
|
};
|
|
6599
6771
|
var SingleValue = function SingleValue2(props) {
|
|
6600
6772
|
var children = props.children, isDisabled = props.isDisabled, innerProps = props.innerProps;
|
|
6601
|
-
return
|
|
6773
|
+
return jsx87("div", _extends({}, getStyleProps(props, "singleValue", {
|
|
6602
6774
|
"single-value": true,
|
|
6603
6775
|
"single-value--is-disabled": isDisabled
|
|
6604
6776
|
}), innerProps), children);
|
|
@@ -6700,7 +6872,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
6700
6872
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
6701
6873
|
};
|
|
6702
6874
|
var A11yText = function A11yText2(props) {
|
|
6703
|
-
return
|
|
6875
|
+
return jsx87("span", _extends({
|
|
6704
6876
|
css: _ref
|
|
6705
6877
|
}, props));
|
|
6706
6878
|
};
|
|
@@ -6835,18 +7007,18 @@ var LiveRegion = function LiveRegion2(props) {
|
|
|
6835
7007
|
}
|
|
6836
7008
|
return guidanceMsg;
|
|
6837
7009
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
6838
|
-
var ScreenReaderText =
|
|
7010
|
+
var ScreenReaderText = jsx87(Fragment8, null, jsx87("span", {
|
|
6839
7011
|
id: "aria-selection"
|
|
6840
|
-
}, ariaSelected),
|
|
7012
|
+
}, ariaSelected), jsx87("span", {
|
|
6841
7013
|
id: "aria-focused"
|
|
6842
|
-
}, ariaFocused),
|
|
7014
|
+
}, ariaFocused), jsx87("span", {
|
|
6843
7015
|
id: "aria-results"
|
|
6844
|
-
}, ariaResults),
|
|
7016
|
+
}, ariaResults), jsx87("span", {
|
|
6845
7017
|
id: "aria-guidance"
|
|
6846
7018
|
}, ariaGuidance));
|
|
6847
|
-
return
|
|
7019
|
+
return jsx87(Fragment8, null, jsx87(A11yText$1, {
|
|
6848
7020
|
id
|
|
6849
|
-
}, isInitialFocus && ScreenReaderText),
|
|
7021
|
+
}, isInitialFocus && ScreenReaderText), jsx87(A11yText$1, {
|
|
6850
7022
|
"aria-live": ariaLive,
|
|
6851
7023
|
"aria-atomic": "false",
|
|
6852
7024
|
"aria-relevant": "additions text",
|
|
@@ -7159,7 +7331,7 @@ var _excluded4 = ["innerRef"];
|
|
|
7159
7331
|
function DummyInput(_ref3) {
|
|
7160
7332
|
var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded4);
|
|
7161
7333
|
var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
|
|
7162
|
-
return
|
|
7334
|
+
return jsx87("input", _extends({
|
|
7163
7335
|
ref: innerRef
|
|
7164
7336
|
}, filteredProps, {
|
|
7165
7337
|
css: /* @__PURE__ */ css({
|
|
@@ -7401,7 +7573,7 @@ function ScrollManager(_ref3) {
|
|
|
7401
7573
|
setScrollCaptureTarget(element);
|
|
7402
7574
|
setScrollLockTarget(element);
|
|
7403
7575
|
};
|
|
7404
|
-
return
|
|
7576
|
+
return jsx87(Fragment8, null, lockEnabled && jsx87("div", {
|
|
7405
7577
|
onClick: blurSelectInput,
|
|
7406
7578
|
css: _ref2$1
|
|
7407
7579
|
}), children(targetRef));
|
|
@@ -7420,7 +7592,7 @@ var _ref22 = process.env.NODE_ENV === "production" ? {
|
|
|
7420
7592
|
};
|
|
7421
7593
|
var RequiredInput = function RequiredInput2(_ref3) {
|
|
7422
7594
|
var name = _ref3.name, onFocus2 = _ref3.onFocus;
|
|
7423
|
-
return
|
|
7595
|
+
return jsx87("input", {
|
|
7424
7596
|
required: true,
|
|
7425
7597
|
name,
|
|
7426
7598
|
tabIndex: -1,
|
|
@@ -8995,7 +9167,7 @@ var import_typeof5 = __toESM(require_typeof());
|
|
|
8995
9167
|
var import_taggedTemplateLiteral2 = __toESM(require_taggedTemplateLiteral());
|
|
8996
9168
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
8997
9169
|
import "react-dom";
|
|
8998
|
-
var StateManagedSelect = /* @__PURE__ */
|
|
9170
|
+
var StateManagedSelect = /* @__PURE__ */ forwardRef24(function(props, ref) {
|
|
8999
9171
|
var baseSelectProps = useStateManager(props);
|
|
9000
9172
|
return /* @__PURE__ */ React11.createElement(Select, _extends({
|
|
9001
9173
|
ref
|
|
@@ -9067,8 +9239,8 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
|
9067
9239
|
|
|
9068
9240
|
// src/Multiselect/Multiselect.tsx
|
|
9069
9241
|
import { useId } from "@react-aria/utils";
|
|
9070
|
-
import { cn as cn49, useClassNames as
|
|
9071
|
-
import { jsx as
|
|
9242
|
+
import { cn as cn49, useClassNames as useClassNames51 } from "@marigold/system";
|
|
9243
|
+
import { jsx as jsx89, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9072
9244
|
var propsToBeRemoved = [
|
|
9073
9245
|
"clearValue",
|
|
9074
9246
|
"getStyles",
|
|
@@ -9094,7 +9266,7 @@ var Input4 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
|
9094
9266
|
},
|
|
9095
9267
|
{}
|
|
9096
9268
|
);
|
|
9097
|
-
return /* @__PURE__ */
|
|
9269
|
+
return /* @__PURE__ */ jsx89(
|
|
9098
9270
|
_Input2,
|
|
9099
9271
|
{
|
|
9100
9272
|
disabled: props.isDisabled,
|
|
@@ -9105,7 +9277,7 @@ var Input4 = ({ innerRef, placeholder, hasValue, ...props }) => {
|
|
|
9105
9277
|
);
|
|
9106
9278
|
};
|
|
9107
9279
|
var MultiValueRemove2 = ({ innerProps }) => {
|
|
9108
|
-
return /* @__PURE__ */
|
|
9280
|
+
return /* @__PURE__ */ jsx89(Button11, { slot: "remove", ...innerProps, children: /* @__PURE__ */ jsx89("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx89("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" }) }) });
|
|
9109
9281
|
};
|
|
9110
9282
|
var getClassNames = (classNames3) => ({
|
|
9111
9283
|
control: () => cn49(
|
|
@@ -9139,7 +9311,7 @@ var Multiselect = ({
|
|
|
9139
9311
|
onSelectionChange,
|
|
9140
9312
|
...rest
|
|
9141
9313
|
}) => {
|
|
9142
|
-
const classNames3 =
|
|
9314
|
+
const classNames3 = useClassNames51({
|
|
9143
9315
|
component: "MultiSelect",
|
|
9144
9316
|
size: size2,
|
|
9145
9317
|
variant
|
|
@@ -9157,7 +9329,7 @@ var Multiselect = ({
|
|
|
9157
9329
|
label: props.label,
|
|
9158
9330
|
errorMessage
|
|
9159
9331
|
});
|
|
9160
|
-
return /* @__PURE__ */
|
|
9332
|
+
return /* @__PURE__ */ jsx89(
|
|
9161
9333
|
Provider2,
|
|
9162
9334
|
{
|
|
9163
9335
|
values: [
|
|
@@ -9187,7 +9359,7 @@ var Multiselect = ({
|
|
|
9187
9359
|
}
|
|
9188
9360
|
]
|
|
9189
9361
|
],
|
|
9190
|
-
children: /* @__PURE__ */
|
|
9362
|
+
children: /* @__PURE__ */ jsxs31(
|
|
9191
9363
|
"div",
|
|
9192
9364
|
{
|
|
9193
9365
|
className: cn49(classNames3.field, "group/field"),
|
|
@@ -9195,8 +9367,8 @@ var Multiselect = ({
|
|
|
9195
9367
|
"data-invalid": error,
|
|
9196
9368
|
"data-readonly": readOnly,
|
|
9197
9369
|
children: [
|
|
9198
|
-
props.label && /* @__PURE__ */
|
|
9199
|
-
/* @__PURE__ */
|
|
9370
|
+
props.label && /* @__PURE__ */ jsx89(_Label, { ...labelProps, children: props.label }),
|
|
9371
|
+
/* @__PURE__ */ jsx89(
|
|
9200
9372
|
StateManagedSelect$1,
|
|
9201
9373
|
{
|
|
9202
9374
|
...props,
|
|
@@ -9232,19 +9404,19 @@ var Multiselect = ({
|
|
|
9232
9404
|
Input: Input4,
|
|
9233
9405
|
MultiValueRemove: MultiValueRemove2,
|
|
9234
9406
|
// eslint-disable-next-line react/prop-types
|
|
9235
|
-
DropdownIndicator: ({ innerProps, isDisabled }) => /* @__PURE__ */
|
|
9407
|
+
DropdownIndicator: ({ innerProps, isDisabled }) => /* @__PURE__ */ jsx89(
|
|
9236
9408
|
"button",
|
|
9237
9409
|
{
|
|
9238
9410
|
...innerProps,
|
|
9239
9411
|
disabled: isDisabled,
|
|
9240
9412
|
className: classNames3.icon,
|
|
9241
|
-
children: /* @__PURE__ */
|
|
9413
|
+
children: /* @__PURE__ */ jsx89(ChevronDown, { className: "size-4" })
|
|
9242
9414
|
}
|
|
9243
9415
|
)
|
|
9244
9416
|
}
|
|
9245
9417
|
}
|
|
9246
9418
|
),
|
|
9247
|
-
/* @__PURE__ */
|
|
9419
|
+
/* @__PURE__ */ jsx89(HelpText, { description, errorMessage })
|
|
9248
9420
|
]
|
|
9249
9421
|
}
|
|
9250
9422
|
)
|
|
@@ -9253,15 +9425,15 @@ var Multiselect = ({
|
|
|
9253
9425
|
};
|
|
9254
9426
|
|
|
9255
9427
|
// src/NumberField/NumberField.tsx
|
|
9256
|
-
import { forwardRef as
|
|
9428
|
+
import { forwardRef as forwardRef25 } from "react";
|
|
9257
9429
|
import { Group as Group4, Input as Input5, NumberField } from "react-aria-components";
|
|
9258
|
-
import { cn as cn51, useClassNames as
|
|
9430
|
+
import { cn as cn51, useClassNames as useClassNames52 } from "@marigold/system";
|
|
9259
9431
|
|
|
9260
9432
|
// src/NumberField/StepButton.tsx
|
|
9261
|
-
import { Button as
|
|
9433
|
+
import { Button as Button12 } from "react-aria-components";
|
|
9262
9434
|
import { cn as cn50 } from "@marigold/system";
|
|
9263
|
-
import { jsx as
|
|
9264
|
-
var Plus = () => /* @__PURE__ */
|
|
9435
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
9436
|
+
var Plus = () => /* @__PURE__ */ jsx90("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx90(
|
|
9265
9437
|
"path",
|
|
9266
9438
|
{
|
|
9267
9439
|
fillRule: "evenodd",
|
|
@@ -9269,7 +9441,7 @@ var Plus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox:
|
|
|
9269
9441
|
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"
|
|
9270
9442
|
}
|
|
9271
9443
|
) });
|
|
9272
|
-
var Minus = () => /* @__PURE__ */
|
|
9444
|
+
var Minus = () => /* @__PURE__ */ jsx90("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx90(
|
|
9273
9445
|
"path",
|
|
9274
9446
|
{
|
|
9275
9447
|
fillRule: "evenodd",
|
|
@@ -9279,8 +9451,8 @@ var Minus = () => /* @__PURE__ */ jsx87("svg", { width: 16, height: 16, viewBox:
|
|
|
9279
9451
|
) });
|
|
9280
9452
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
9281
9453
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
9282
|
-
return /* @__PURE__ */
|
|
9283
|
-
|
|
9454
|
+
return /* @__PURE__ */ jsx90(
|
|
9455
|
+
Button12,
|
|
9284
9456
|
{
|
|
9285
9457
|
className: cn50(
|
|
9286
9458
|
[
|
|
@@ -9290,14 +9462,14 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
9290
9462
|
className
|
|
9291
9463
|
),
|
|
9292
9464
|
...props,
|
|
9293
|
-
children: /* @__PURE__ */
|
|
9465
|
+
children: /* @__PURE__ */ jsx90(Icon4, {})
|
|
9294
9466
|
}
|
|
9295
9467
|
);
|
|
9296
9468
|
};
|
|
9297
9469
|
|
|
9298
9470
|
// src/NumberField/NumberField.tsx
|
|
9299
|
-
import { jsx as
|
|
9300
|
-
var _NumberField =
|
|
9471
|
+
import { jsx as jsx91, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
9472
|
+
var _NumberField = forwardRef25(
|
|
9301
9473
|
({
|
|
9302
9474
|
variant,
|
|
9303
9475
|
size: size2,
|
|
@@ -9308,7 +9480,7 @@ var _NumberField = forwardRef24(
|
|
|
9308
9480
|
hideStepper,
|
|
9309
9481
|
...rest
|
|
9310
9482
|
}, ref) => {
|
|
9311
|
-
const classNames3 =
|
|
9483
|
+
const classNames3 = useClassNames52({
|
|
9312
9484
|
component: "NumberField",
|
|
9313
9485
|
size: size2,
|
|
9314
9486
|
variant
|
|
@@ -9321,15 +9493,15 @@ var _NumberField = forwardRef24(
|
|
|
9321
9493
|
...rest
|
|
9322
9494
|
};
|
|
9323
9495
|
const showStepper = !hideStepper && !readOnly;
|
|
9324
|
-
return /* @__PURE__ */
|
|
9496
|
+
return /* @__PURE__ */ jsx91(
|
|
9325
9497
|
FieldBase,
|
|
9326
9498
|
{
|
|
9327
9499
|
as: NumberField,
|
|
9328
9500
|
...props,
|
|
9329
9501
|
"data-readonly": readOnly ? "true" : void 0,
|
|
9330
9502
|
"data-stepper": showStepper ? "true" : void 0,
|
|
9331
|
-
children: /* @__PURE__ */
|
|
9332
|
-
showStepper && /* @__PURE__ */
|
|
9503
|
+
children: /* @__PURE__ */ jsxs32(Group4, { className: cn51("flex items-stretch", classNames3.group), children: [
|
|
9504
|
+
showStepper && /* @__PURE__ */ jsx91(
|
|
9333
9505
|
_StepButton,
|
|
9334
9506
|
{
|
|
9335
9507
|
className: classNames3.stepper,
|
|
@@ -9337,14 +9509,14 @@ var _NumberField = forwardRef24(
|
|
|
9337
9509
|
slot: "decrement"
|
|
9338
9510
|
}
|
|
9339
9511
|
),
|
|
9340
|
-
/* @__PURE__ */
|
|
9512
|
+
/* @__PURE__ */ jsx91(
|
|
9341
9513
|
Input5,
|
|
9342
9514
|
{
|
|
9343
9515
|
ref,
|
|
9344
9516
|
className: cn51("h-full flex-1 outline-none", classNames3.input)
|
|
9345
9517
|
}
|
|
9346
9518
|
),
|
|
9347
|
-
showStepper && /* @__PURE__ */
|
|
9519
|
+
showStepper && /* @__PURE__ */ jsx91(
|
|
9348
9520
|
_StepButton,
|
|
9349
9521
|
{
|
|
9350
9522
|
className: classNames3.stepper,
|
|
@@ -9361,12 +9533,12 @@ var _NumberField = forwardRef24(
|
|
|
9361
9533
|
// src/Pagination/Pagination.tsx
|
|
9362
9534
|
import { useEffect as useEffect4, useRef as useRef9, useState as useState5 } from "react";
|
|
9363
9535
|
import { FocusScope as FocusScope2, useFocusManager } from "@react-aria/focus";
|
|
9364
|
-
import { useClassNames as
|
|
9536
|
+
import { useClassNames as useClassNames55 } from "@marigold/system";
|
|
9365
9537
|
|
|
9366
9538
|
// src/Pagination/Ellipsis.tsx
|
|
9367
|
-
import { jsx as
|
|
9539
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
9368
9540
|
var Ellipsis = () => {
|
|
9369
|
-
return /* @__PURE__ */
|
|
9541
|
+
return /* @__PURE__ */ jsx92(
|
|
9370
9542
|
"span",
|
|
9371
9543
|
{
|
|
9372
9544
|
className: "text-text-base flex h-8 w-8 items-center justify-center",
|
|
@@ -9379,11 +9551,11 @@ var Ellipsis = () => {
|
|
|
9379
9551
|
// src/Pagination/NavigationButton.tsx
|
|
9380
9552
|
import { useRef as useRef7 } from "react";
|
|
9381
9553
|
import { useButton as useButton2 } from "@react-aria/button";
|
|
9382
|
-
import { cn as cn52, useClassNames as
|
|
9383
|
-
import { jsxs as
|
|
9554
|
+
import { cn as cn52, useClassNames as useClassNames53 } from "@marigold/system";
|
|
9555
|
+
import { jsxs as jsxs33 } from "react/jsx-runtime";
|
|
9384
9556
|
var NavigationButton = (props) => {
|
|
9385
9557
|
const ref = useRef7(null);
|
|
9386
|
-
const classNames3 =
|
|
9558
|
+
const classNames3 = useClassNames53({
|
|
9387
9559
|
component: "Pagination"
|
|
9388
9560
|
});
|
|
9389
9561
|
let { buttonProps } = useButton2(props, ref);
|
|
@@ -9396,7 +9568,7 @@ var NavigationButton = (props) => {
|
|
|
9396
9568
|
position: position2,
|
|
9397
9569
|
...rest
|
|
9398
9570
|
} = props;
|
|
9399
|
-
return /* @__PURE__ */
|
|
9571
|
+
return /* @__PURE__ */ jsxs33(
|
|
9400
9572
|
"button",
|
|
9401
9573
|
{
|
|
9402
9574
|
ref,
|
|
@@ -9417,16 +9589,16 @@ var NavigationButton = (props) => {
|
|
|
9417
9589
|
// src/Pagination/PageButton.tsx
|
|
9418
9590
|
import { useRef as useRef8 } from "react";
|
|
9419
9591
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
9420
|
-
import { useClassNames as
|
|
9421
|
-
import { jsx as
|
|
9592
|
+
import { useClassNames as useClassNames54 } from "@marigold/system";
|
|
9593
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
9422
9594
|
var PageButton = (props) => {
|
|
9423
9595
|
const ref = useRef8(null);
|
|
9424
|
-
const classNames3 =
|
|
9596
|
+
const classNames3 = useClassNames54({
|
|
9425
9597
|
component: "Pagination"
|
|
9426
9598
|
});
|
|
9427
9599
|
let { buttonProps } = useButton3(props, ref);
|
|
9428
9600
|
let { page, selected, isDisabled } = props;
|
|
9429
|
-
return /* @__PURE__ */
|
|
9601
|
+
return /* @__PURE__ */ jsx93(
|
|
9430
9602
|
"button",
|
|
9431
9603
|
{
|
|
9432
9604
|
ref,
|
|
@@ -9473,7 +9645,7 @@ var usePageRange = ({ currentPage, totalPages }) => {
|
|
|
9473
9645
|
};
|
|
9474
9646
|
|
|
9475
9647
|
// src/Pagination/Pagination.tsx
|
|
9476
|
-
import { Fragment as Fragment9, jsx as
|
|
9648
|
+
import { Fragment as Fragment9, jsx as jsx94, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9477
9649
|
var InnerPagination = ({
|
|
9478
9650
|
currentPage,
|
|
9479
9651
|
pageSize,
|
|
@@ -9500,7 +9672,7 @@ var InnerPagination = ({
|
|
|
9500
9672
|
onChange2(newPage);
|
|
9501
9673
|
}
|
|
9502
9674
|
};
|
|
9503
|
-
const classNames3 =
|
|
9675
|
+
const classNames3 = useClassNames55({ component: "Pagination" });
|
|
9504
9676
|
const handleKeyDown = (onEnter) => (e) => {
|
|
9505
9677
|
if (e.key === "ArrowRight") {
|
|
9506
9678
|
e.preventDefault();
|
|
@@ -9513,8 +9685,8 @@ var InnerPagination = ({
|
|
|
9513
9685
|
onEnter();
|
|
9514
9686
|
}
|
|
9515
9687
|
};
|
|
9516
|
-
return /* @__PURE__ */
|
|
9517
|
-
/* @__PURE__ */
|
|
9688
|
+
return /* @__PURE__ */ jsxs34(Fragment9, { children: [
|
|
9689
|
+
/* @__PURE__ */ jsx94(
|
|
9518
9690
|
NavigationButton,
|
|
9519
9691
|
{
|
|
9520
9692
|
onClick: () => handlePageChange(Math.max(1, currentPage - 1)),
|
|
@@ -9523,11 +9695,11 @@ var InnerPagination = ({
|
|
|
9523
9695
|
controlLabel: controlLabels == null ? void 0 : controlLabels[0],
|
|
9524
9696
|
position: "left",
|
|
9525
9697
|
onKeyDown: handleKeyDown(() => handlePageChange(currentPage - 1)),
|
|
9526
|
-
children: /* @__PURE__ */
|
|
9698
|
+
children: /* @__PURE__ */ jsx94(ChevronLeft, { className: classNames3.icon })
|
|
9527
9699
|
}
|
|
9528
9700
|
),
|
|
9529
|
-
/* @__PURE__ */
|
|
9530
|
-
(pageNumber, index2) => pageNumber === "ellipsis" ? /* @__PURE__ */
|
|
9701
|
+
/* @__PURE__ */ jsx94("div", { className: "flex items-center space-x-2", children: totalPages > 0 ? pageRange.map(
|
|
9702
|
+
(pageNumber, index2) => pageNumber === "ellipsis" ? /* @__PURE__ */ jsx94(Ellipsis, {}, `ellipsis-${index2}`) : /* @__PURE__ */ jsx94(
|
|
9531
9703
|
PageButton,
|
|
9532
9704
|
{
|
|
9533
9705
|
page: pageNumber,
|
|
@@ -9537,8 +9709,8 @@ var InnerPagination = ({
|
|
|
9537
9709
|
},
|
|
9538
9710
|
pageNumber
|
|
9539
9711
|
)
|
|
9540
|
-
) : /* @__PURE__ */
|
|
9541
|
-
/* @__PURE__ */
|
|
9712
|
+
) : /* @__PURE__ */ jsx94(PageButton, { page: 1, isDisabled: true }, 1) }),
|
|
9713
|
+
/* @__PURE__ */ jsx94(
|
|
9542
9714
|
NavigationButton,
|
|
9543
9715
|
{
|
|
9544
9716
|
onClick: () => handlePageChange(Math.min(totalPages, currentPage + 1)),
|
|
@@ -9547,7 +9719,7 @@ var InnerPagination = ({
|
|
|
9547
9719
|
controlLabel: controlLabels == null ? void 0 : controlLabels[1],
|
|
9548
9720
|
position: "right",
|
|
9549
9721
|
onKeyDown: handleKeyDown(() => handlePageChange(currentPage + 1)),
|
|
9550
|
-
children: /* @__PURE__ */
|
|
9722
|
+
children: /* @__PURE__ */ jsx94(ChevronRight, { className: classNames3.icon })
|
|
9551
9723
|
}
|
|
9552
9724
|
)
|
|
9553
9725
|
] });
|
|
@@ -9562,12 +9734,12 @@ var _Pagination = ({
|
|
|
9562
9734
|
const [currentPage, setCurrentPage] = useState5(page != null ? page : defaultPage);
|
|
9563
9735
|
const totalPages = Math.ceil(totalItems / pageSize);
|
|
9564
9736
|
const pageRange = usePageRange({ currentPage, totalPages });
|
|
9565
|
-
return /* @__PURE__ */
|
|
9737
|
+
return /* @__PURE__ */ jsx94(
|
|
9566
9738
|
"nav",
|
|
9567
9739
|
{
|
|
9568
9740
|
className: "flex items-center justify-center space-x-2",
|
|
9569
9741
|
"aria-label": `Page ${currentPage} of ${totalPages}`,
|
|
9570
|
-
children: /* @__PURE__ */
|
|
9742
|
+
children: /* @__PURE__ */ jsx94(FocusScope2, { restoreFocus: true, children: /* @__PURE__ */ jsx94(
|
|
9571
9743
|
InnerPagination,
|
|
9572
9744
|
{
|
|
9573
9745
|
pageSize,
|
|
@@ -9584,10 +9756,10 @@ var _Pagination = ({
|
|
|
9584
9756
|
|
|
9585
9757
|
// src/Radio/Radio.tsx
|
|
9586
9758
|
import {
|
|
9587
|
-
forwardRef as
|
|
9759
|
+
forwardRef as forwardRef26
|
|
9588
9760
|
} from "react";
|
|
9589
9761
|
import { Radio } from "react-aria-components";
|
|
9590
|
-
import { cn as cn54, useClassNames as
|
|
9762
|
+
import { cn as cn54, useClassNames as useClassNames57 } from "@marigold/system";
|
|
9591
9763
|
|
|
9592
9764
|
// src/Radio/Context.ts
|
|
9593
9765
|
import { createContext as createContext13, useContext as useContext23 } from "react";
|
|
@@ -9598,8 +9770,8 @@ var useRadioGroupContext = () => useContext23(RadioGroupContext);
|
|
|
9598
9770
|
|
|
9599
9771
|
// src/Radio/RadioGroup.tsx
|
|
9600
9772
|
import { RadioGroup } from "react-aria-components";
|
|
9601
|
-
import { cn as cn53, useClassNames as
|
|
9602
|
-
import { jsx as
|
|
9773
|
+
import { cn as cn53, useClassNames as useClassNames56 } from "@marigold/system";
|
|
9774
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
9603
9775
|
var _RadioGroup = ({
|
|
9604
9776
|
variant,
|
|
9605
9777
|
size: size2,
|
|
@@ -9615,7 +9787,7 @@ var _RadioGroup = ({
|
|
|
9615
9787
|
width,
|
|
9616
9788
|
...rest
|
|
9617
9789
|
}) => {
|
|
9618
|
-
const classNames3 =
|
|
9790
|
+
const classNames3 = useClassNames56({ component: "Radio", variant, size: size2 });
|
|
9619
9791
|
const props = {
|
|
9620
9792
|
isDisabled: disabled,
|
|
9621
9793
|
isReadOnly: readOnly,
|
|
@@ -9623,7 +9795,7 @@ var _RadioGroup = ({
|
|
|
9623
9795
|
isInvalid: error,
|
|
9624
9796
|
...rest
|
|
9625
9797
|
};
|
|
9626
|
-
return /* @__PURE__ */
|
|
9798
|
+
return /* @__PURE__ */ jsx95(
|
|
9627
9799
|
FieldBase,
|
|
9628
9800
|
{
|
|
9629
9801
|
as: RadioGroup,
|
|
@@ -9634,7 +9806,7 @@ var _RadioGroup = ({
|
|
|
9634
9806
|
variant,
|
|
9635
9807
|
size: size2,
|
|
9636
9808
|
...props,
|
|
9637
|
-
children: /* @__PURE__ */
|
|
9809
|
+
children: /* @__PURE__ */ jsx95(
|
|
9638
9810
|
"div",
|
|
9639
9811
|
{
|
|
9640
9812
|
role: "presentation",
|
|
@@ -9645,7 +9817,7 @@ var _RadioGroup = ({
|
|
|
9645
9817
|
"flex items-start",
|
|
9646
9818
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
9647
9819
|
),
|
|
9648
|
-
children: /* @__PURE__ */
|
|
9820
|
+
children: /* @__PURE__ */ jsx95(RadioGroupContext.Provider, { value: { width, variant, size: size2 }, children })
|
|
9649
9821
|
}
|
|
9650
9822
|
)
|
|
9651
9823
|
}
|
|
@@ -9653,9 +9825,9 @@ var _RadioGroup = ({
|
|
|
9653
9825
|
};
|
|
9654
9826
|
|
|
9655
9827
|
// src/Radio/Radio.tsx
|
|
9656
|
-
import { Fragment as Fragment10, jsx as
|
|
9657
|
-
var Dot = () => /* @__PURE__ */
|
|
9658
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
9828
|
+
import { Fragment as Fragment10, jsx as jsx96, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9829
|
+
var Dot = () => /* @__PURE__ */ jsx96("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx96("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
9830
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx96(
|
|
9659
9831
|
"div",
|
|
9660
9832
|
{
|
|
9661
9833
|
className: cn54(
|
|
@@ -9664,18 +9836,18 @@ var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx93(
|
|
|
9664
9836
|
),
|
|
9665
9837
|
"aria-hidden": "true",
|
|
9666
9838
|
...props,
|
|
9667
|
-
children: checked ? /* @__PURE__ */
|
|
9839
|
+
children: checked ? /* @__PURE__ */ jsx96(Dot, {}) : null
|
|
9668
9840
|
}
|
|
9669
9841
|
);
|
|
9670
|
-
var _Radio =
|
|
9842
|
+
var _Radio = forwardRef26(
|
|
9671
9843
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
9672
9844
|
const { variant, size: size2, width: groupWidth } = useRadioGroupContext();
|
|
9673
|
-
const classNames3 =
|
|
9845
|
+
const classNames3 = useClassNames57({
|
|
9674
9846
|
component: "Radio",
|
|
9675
9847
|
variant: variant || props.variant,
|
|
9676
9848
|
size: size2 || props.size
|
|
9677
9849
|
});
|
|
9678
|
-
return /* @__PURE__ */
|
|
9850
|
+
return /* @__PURE__ */ jsx96(
|
|
9679
9851
|
Radio,
|
|
9680
9852
|
{
|
|
9681
9853
|
ref,
|
|
@@ -9688,8 +9860,8 @@ var _Radio = forwardRef25(
|
|
|
9688
9860
|
value,
|
|
9689
9861
|
isDisabled: disabled,
|
|
9690
9862
|
...props,
|
|
9691
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
9692
|
-
/* @__PURE__ */
|
|
9863
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
9864
|
+
/* @__PURE__ */ jsx96(
|
|
9693
9865
|
Icon3,
|
|
9694
9866
|
{
|
|
9695
9867
|
checked: isSelected,
|
|
@@ -9699,7 +9871,7 @@ var _Radio = forwardRef25(
|
|
|
9699
9871
|
)
|
|
9700
9872
|
}
|
|
9701
9873
|
),
|
|
9702
|
-
/* @__PURE__ */
|
|
9874
|
+
/* @__PURE__ */ jsx96("div", { className: classNames3.label, children })
|
|
9703
9875
|
] })
|
|
9704
9876
|
}
|
|
9705
9877
|
);
|
|
@@ -9708,10 +9880,10 @@ var _Radio = forwardRef25(
|
|
|
9708
9880
|
_Radio.Group = _RadioGroup;
|
|
9709
9881
|
|
|
9710
9882
|
// src/SearchField/SearchField.tsx
|
|
9711
|
-
import { forwardRef as
|
|
9883
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
9712
9884
|
import { SearchField } from "react-aria-components";
|
|
9713
|
-
import { jsx as
|
|
9714
|
-
var _SearchField =
|
|
9885
|
+
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
9886
|
+
var _SearchField = forwardRef27(
|
|
9715
9887
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
9716
9888
|
const props = {
|
|
9717
9889
|
...rest,
|
|
@@ -9720,7 +9892,7 @@ var _SearchField = forwardRef26(
|
|
|
9720
9892
|
isReadOnly: readOnly,
|
|
9721
9893
|
isInvalid: error
|
|
9722
9894
|
};
|
|
9723
|
-
return /* @__PURE__ */
|
|
9895
|
+
return /* @__PURE__ */ jsx97(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx97(
|
|
9724
9896
|
SearchInput,
|
|
9725
9897
|
{
|
|
9726
9898
|
ref,
|
|
@@ -9731,11 +9903,11 @@ var _SearchField = forwardRef26(
|
|
|
9731
9903
|
);
|
|
9732
9904
|
|
|
9733
9905
|
// src/Select/Select.tsx
|
|
9734
|
-
import { forwardRef as
|
|
9906
|
+
import { forwardRef as forwardRef28 } from "react";
|
|
9735
9907
|
import { Select as Select2, SelectValue } from "react-aria-components";
|
|
9736
|
-
import { cn as cn55, useClassNames as
|
|
9737
|
-
import { jsx as
|
|
9738
|
-
var _Select =
|
|
9908
|
+
import { cn as cn55, useClassNames as useClassNames58 } from "@marigold/system";
|
|
9909
|
+
import { jsx as jsx98, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
9910
|
+
var _Select = forwardRef28(
|
|
9739
9911
|
({
|
|
9740
9912
|
disabled,
|
|
9741
9913
|
required,
|
|
@@ -9755,9 +9927,9 @@ var _Select = forwardRef27(
|
|
|
9755
9927
|
onSelectionChange: onChange2,
|
|
9756
9928
|
...rest
|
|
9757
9929
|
};
|
|
9758
|
-
const classNames3 =
|
|
9759
|
-
return /* @__PURE__ */
|
|
9760
|
-
/* @__PURE__ */
|
|
9930
|
+
const classNames3 = useClassNames58({ component: "Select", variant, size: size2 });
|
|
9931
|
+
return /* @__PURE__ */ jsxs36(FieldBase, { as: Select2, ref, variant, size: size2, ...props, children: [
|
|
9932
|
+
/* @__PURE__ */ jsxs36(
|
|
9761
9933
|
IconButton,
|
|
9762
9934
|
{
|
|
9763
9935
|
className: cn55(
|
|
@@ -9765,12 +9937,12 @@ var _Select = forwardRef27(
|
|
|
9765
9937
|
classNames3.select
|
|
9766
9938
|
),
|
|
9767
9939
|
children: [
|
|
9768
|
-
/* @__PURE__ */
|
|
9769
|
-
/* @__PURE__ */
|
|
9940
|
+
/* @__PURE__ */ jsx98(SelectValue, { className: "[&>[slot=description]]:hidden" }),
|
|
9941
|
+
/* @__PURE__ */ jsx98(ChevronDown, { className: cn55("size-4", classNames3.icon) })
|
|
9770
9942
|
]
|
|
9771
9943
|
}
|
|
9772
9944
|
),
|
|
9773
|
-
/* @__PURE__ */
|
|
9945
|
+
/* @__PURE__ */ jsx98(_Popover, { children: /* @__PURE__ */ jsx98(_ListBox, { items, children: props.children }) })
|
|
9774
9946
|
] });
|
|
9775
9947
|
}
|
|
9776
9948
|
);
|
|
@@ -9779,10 +9951,10 @@ _Select.Section = _ListBox.Section;
|
|
|
9779
9951
|
|
|
9780
9952
|
// src/SelectList/SelectList.tsx
|
|
9781
9953
|
import {
|
|
9782
|
-
forwardRef as
|
|
9954
|
+
forwardRef as forwardRef30
|
|
9783
9955
|
} from "react";
|
|
9784
9956
|
import { GridList as SelectList } from "react-aria-components";
|
|
9785
|
-
import { cn as cn57, useClassNames as
|
|
9957
|
+
import { cn as cn57, useClassNames as useClassNames59 } from "@marigold/system";
|
|
9786
9958
|
|
|
9787
9959
|
// src/SelectList/Context.ts
|
|
9788
9960
|
import { createContext as createContext14, useContext as useContext24 } from "react";
|
|
@@ -9792,11 +9964,11 @@ var SelectListContext = createContext14(
|
|
|
9792
9964
|
var useSelectListContext = () => useContext24(SelectListContext);
|
|
9793
9965
|
|
|
9794
9966
|
// src/SelectList/SelectListItem.tsx
|
|
9795
|
-
import { forwardRef as
|
|
9967
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
9796
9968
|
import { GridListItem as SelectListItem } from "react-aria-components";
|
|
9797
9969
|
import { cn as cn56 } from "@marigold/system";
|
|
9798
|
-
import { Fragment as Fragment11, jsx as
|
|
9799
|
-
var CheckMark3 = ({ className }) => /* @__PURE__ */
|
|
9970
|
+
import { Fragment as Fragment11, jsx as jsx99, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
9971
|
+
var CheckMark3 = ({ className }) => /* @__PURE__ */ jsx99("svg", { width: "12px", height: "10px", viewBox: "0 0 12 10", className, children: /* @__PURE__ */ jsx99(
|
|
9800
9972
|
"path",
|
|
9801
9973
|
{
|
|
9802
9974
|
fill: "currentColor",
|
|
@@ -9807,26 +9979,26 @@ var CheckMark3 = ({ className }) => /* @__PURE__ */ jsx96("svg", { width: "12px"
|
|
|
9807
9979
|
var SelectionIndicator = ({ selectionMode }) => {
|
|
9808
9980
|
switch (selectionMode) {
|
|
9809
9981
|
case "multiple": {
|
|
9810
|
-
return /* @__PURE__ */
|
|
9982
|
+
return /* @__PURE__ */ jsx99(_Checkbox, { slot: "selection" });
|
|
9811
9983
|
}
|
|
9812
9984
|
case "single": {
|
|
9813
|
-
return /* @__PURE__ */
|
|
9985
|
+
return /* @__PURE__ */ jsx99(CheckMark3, { className: "invisible hidden" });
|
|
9814
9986
|
}
|
|
9815
9987
|
}
|
|
9816
9988
|
};
|
|
9817
|
-
var _SelectListItem =
|
|
9989
|
+
var _SelectListItem = forwardRef29(
|
|
9818
9990
|
({ children, ...props }, ref) => {
|
|
9819
9991
|
let textValue = typeof children === "string" ? children : void 0;
|
|
9820
9992
|
const { classNames: classNames3 } = useSelectListContext();
|
|
9821
|
-
return /* @__PURE__ */
|
|
9993
|
+
return /* @__PURE__ */ jsx99(
|
|
9822
9994
|
SelectListItem,
|
|
9823
9995
|
{
|
|
9824
9996
|
textValue,
|
|
9825
9997
|
...props,
|
|
9826
9998
|
className: cn56("group-[layout=grid]/list:flex-row", classNames3 == null ? void 0 : classNames3.item),
|
|
9827
9999
|
ref,
|
|
9828
|
-
children: ({ selectionMode }) => /* @__PURE__ */
|
|
9829
|
-
/* @__PURE__ */
|
|
10000
|
+
children: ({ selectionMode }) => /* @__PURE__ */ jsxs37(Fragment11, { children: [
|
|
10001
|
+
/* @__PURE__ */ jsx99(SelectionIndicator, { selectionMode }),
|
|
9830
10002
|
children
|
|
9831
10003
|
] })
|
|
9832
10004
|
}
|
|
@@ -9835,15 +10007,15 @@ var _SelectListItem = forwardRef28(
|
|
|
9835
10007
|
);
|
|
9836
10008
|
|
|
9837
10009
|
// src/SelectList/SelectList.tsx
|
|
9838
|
-
import { jsx as
|
|
9839
|
-
var _SelectList =
|
|
10010
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
10011
|
+
var _SelectList = forwardRef30(
|
|
9840
10012
|
({ onChange: onChange2, ...rest }, ref) => {
|
|
9841
|
-
const classNames3 =
|
|
10013
|
+
const classNames3 = useClassNames59({ component: "ListBox" });
|
|
9842
10014
|
const props = {
|
|
9843
10015
|
onSelectionChange: onChange2,
|
|
9844
10016
|
...rest
|
|
9845
10017
|
};
|
|
9846
|
-
return /* @__PURE__ */
|
|
10018
|
+
return /* @__PURE__ */ jsx100(SelectListContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsx100("div", { className: classNames3.container, children: /* @__PURE__ */ jsx100(
|
|
9847
10019
|
SelectList,
|
|
9848
10020
|
{
|
|
9849
10021
|
...props,
|
|
@@ -9862,13 +10034,13 @@ _SelectList.Item = _SelectListItem;
|
|
|
9862
10034
|
|
|
9863
10035
|
// src/Scrollable/Scrollable.tsx
|
|
9864
10036
|
import { cn as cn58, createVar as createVar8, width as twWidth2 } from "@marigold/system";
|
|
9865
|
-
import { jsx as
|
|
10037
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
9866
10038
|
var Scrollable = ({
|
|
9867
10039
|
children,
|
|
9868
10040
|
width = "full",
|
|
9869
10041
|
height,
|
|
9870
10042
|
...props
|
|
9871
|
-
}) => /* @__PURE__ */
|
|
10043
|
+
}) => /* @__PURE__ */ jsx101(
|
|
9872
10044
|
"div",
|
|
9873
10045
|
{
|
|
9874
10046
|
...props,
|
|
@@ -9879,7 +10051,7 @@ var Scrollable = ({
|
|
|
9879
10051
|
);
|
|
9880
10052
|
|
|
9881
10053
|
// src/Slider/Slider.tsx
|
|
9882
|
-
import { forwardRef as
|
|
10054
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
9883
10055
|
import {
|
|
9884
10056
|
Slider,
|
|
9885
10057
|
SliderOutput,
|
|
@@ -9889,10 +10061,10 @@ import {
|
|
|
9889
10061
|
import {
|
|
9890
10062
|
cn as cn59,
|
|
9891
10063
|
width as twWidth3,
|
|
9892
|
-
useClassNames as
|
|
10064
|
+
useClassNames as useClassNames60
|
|
9893
10065
|
} from "@marigold/system";
|
|
9894
|
-
import { Fragment as Fragment12, jsx as
|
|
9895
|
-
var _Slider =
|
|
10066
|
+
import { Fragment as Fragment12, jsx as jsx102, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10067
|
+
var _Slider = forwardRef31(
|
|
9896
10068
|
({
|
|
9897
10069
|
thumbLabels,
|
|
9898
10070
|
variant,
|
|
@@ -9902,7 +10074,7 @@ var _Slider = forwardRef30(
|
|
|
9902
10074
|
label,
|
|
9903
10075
|
...rest
|
|
9904
10076
|
}, ref) => {
|
|
9905
|
-
const classNames3 =
|
|
10077
|
+
const classNames3 = useClassNames60({
|
|
9906
10078
|
component: "Slider",
|
|
9907
10079
|
variant,
|
|
9908
10080
|
size: size2
|
|
@@ -9911,7 +10083,7 @@ var _Slider = forwardRef30(
|
|
|
9911
10083
|
isDisabled: disabled,
|
|
9912
10084
|
...rest
|
|
9913
10085
|
};
|
|
9914
|
-
return /* @__PURE__ */
|
|
10086
|
+
return /* @__PURE__ */ jsxs38(
|
|
9915
10087
|
FieldBase,
|
|
9916
10088
|
{
|
|
9917
10089
|
as: Slider,
|
|
@@ -9923,14 +10095,14 @@ var _Slider = forwardRef30(
|
|
|
9923
10095
|
ref,
|
|
9924
10096
|
...props,
|
|
9925
10097
|
children: [
|
|
9926
|
-
label && /* @__PURE__ */
|
|
9927
|
-
/* @__PURE__ */
|
|
9928
|
-
/* @__PURE__ */
|
|
10098
|
+
label && /* @__PURE__ */ jsx102(_Label, { children: label }),
|
|
10099
|
+
/* @__PURE__ */ jsx102(SliderOutput, { className: cn59("flex justify-end", classNames3.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
10100
|
+
/* @__PURE__ */ jsx102(
|
|
9929
10101
|
SliderTrack,
|
|
9930
10102
|
{
|
|
9931
10103
|
className: cn59("relative col-span-2 h-2 w-full", classNames3.track),
|
|
9932
|
-
children: ({ state }) => /* @__PURE__ */
|
|
9933
|
-
/* @__PURE__ */
|
|
10104
|
+
children: ({ state }) => /* @__PURE__ */ jsxs38(Fragment12, { children: [
|
|
10105
|
+
/* @__PURE__ */ jsx102(
|
|
9934
10106
|
"div",
|
|
9935
10107
|
{
|
|
9936
10108
|
className: cn59(
|
|
@@ -9939,7 +10111,7 @@ var _Slider = forwardRef30(
|
|
|
9939
10111
|
)
|
|
9940
10112
|
}
|
|
9941
10113
|
),
|
|
9942
|
-
/* @__PURE__ */
|
|
10114
|
+
/* @__PURE__ */ jsx102(
|
|
9943
10115
|
"div",
|
|
9944
10116
|
{
|
|
9945
10117
|
className: cn59(
|
|
@@ -9952,7 +10124,7 @@ var _Slider = forwardRef30(
|
|
|
9952
10124
|
}
|
|
9953
10125
|
}
|
|
9954
10126
|
),
|
|
9955
|
-
state.values.map((_, i) => /* @__PURE__ */
|
|
10127
|
+
state.values.map((_, i) => /* @__PURE__ */ jsx102(
|
|
9956
10128
|
SliderThumb,
|
|
9957
10129
|
{
|
|
9958
10130
|
className: cn59("top-1/2 cursor-pointer", classNames3.thumb),
|
|
@@ -9972,12 +10144,12 @@ var _Slider = forwardRef30(
|
|
|
9972
10144
|
);
|
|
9973
10145
|
|
|
9974
10146
|
// src/Split/Split.tsx
|
|
9975
|
-
import { jsx as
|
|
9976
|
-
var Split = () => /* @__PURE__ */
|
|
10147
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
10148
|
+
var Split = () => /* @__PURE__ */ jsx103("div", { role: "separator", className: "grow" });
|
|
9977
10149
|
|
|
9978
10150
|
// src/Stack/Stack.tsx
|
|
9979
|
-
import { alignment as
|
|
9980
|
-
import { jsx as
|
|
10151
|
+
import { alignment as alignment3, cn as cn60, gapSpace as gapSpace8 } from "@marigold/system";
|
|
10152
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
9981
10153
|
var Stack = ({
|
|
9982
10154
|
children,
|
|
9983
10155
|
space = 0,
|
|
@@ -9987,14 +10159,14 @@ var Stack = ({
|
|
|
9987
10159
|
...props
|
|
9988
10160
|
}) => {
|
|
9989
10161
|
var _a, _b, _c, _d;
|
|
9990
|
-
return /* @__PURE__ */
|
|
10162
|
+
return /* @__PURE__ */ jsx104(
|
|
9991
10163
|
"div",
|
|
9992
10164
|
{
|
|
9993
10165
|
className: cn60(
|
|
9994
10166
|
"flex flex-col",
|
|
9995
10167
|
gapSpace8[space],
|
|
9996
|
-
alignX && ((_b = (_a =
|
|
9997
|
-
alignY && ((_d = (_c =
|
|
10168
|
+
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
10169
|
+
alignY && ((_d = (_c = alignment3) == null ? void 0 : _c.vertical) == null ? void 0 : _d.alignmentY[alignY]),
|
|
9998
10170
|
stretch && "h-full w-full"
|
|
9999
10171
|
),
|
|
10000
10172
|
...props,
|
|
@@ -10004,15 +10176,15 @@ var Stack = ({
|
|
|
10004
10176
|
};
|
|
10005
10177
|
|
|
10006
10178
|
// src/Switch/Switch.tsx
|
|
10007
|
-
import { forwardRef as
|
|
10179
|
+
import { forwardRef as forwardRef32 } from "react";
|
|
10008
10180
|
import { Switch } from "react-aria-components";
|
|
10009
10181
|
import {
|
|
10010
10182
|
cn as cn61,
|
|
10011
10183
|
width as twWidth4,
|
|
10012
|
-
useClassNames as
|
|
10184
|
+
useClassNames as useClassNames61
|
|
10013
10185
|
} from "@marigold/system";
|
|
10014
|
-
import { jsx as
|
|
10015
|
-
var _Switch =
|
|
10186
|
+
import { jsx as jsx105, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
10187
|
+
var _Switch = forwardRef32(
|
|
10016
10188
|
({
|
|
10017
10189
|
variant,
|
|
10018
10190
|
size: size2,
|
|
@@ -10023,14 +10195,14 @@ var _Switch = forwardRef31(
|
|
|
10023
10195
|
readOnly,
|
|
10024
10196
|
...rest
|
|
10025
10197
|
}, ref) => {
|
|
10026
|
-
const classNames3 =
|
|
10198
|
+
const classNames3 = useClassNames61({ component: "Switch", size: size2, variant });
|
|
10027
10199
|
const props = {
|
|
10028
10200
|
isDisabled: disabled,
|
|
10029
10201
|
isReadOnly: readOnly,
|
|
10030
10202
|
isSelected: selected,
|
|
10031
10203
|
...rest
|
|
10032
10204
|
};
|
|
10033
|
-
return /* @__PURE__ */
|
|
10205
|
+
return /* @__PURE__ */ jsxs39(
|
|
10034
10206
|
Switch,
|
|
10035
10207
|
{
|
|
10036
10208
|
...props,
|
|
@@ -10042,8 +10214,8 @@ var _Switch = forwardRef31(
|
|
|
10042
10214
|
classNames3.container
|
|
10043
10215
|
),
|
|
10044
10216
|
children: [
|
|
10045
|
-
label && /* @__PURE__ */
|
|
10046
|
-
/* @__PURE__ */
|
|
10217
|
+
label && /* @__PURE__ */ jsx105(_Label, { elementType: "span", children: label }),
|
|
10218
|
+
/* @__PURE__ */ jsx105("div", { className: "relative", children: /* @__PURE__ */ jsx105("div", { className: classNames3.track, children: /* @__PURE__ */ jsx105("div", { className: classNames3.thumb }) }) })
|
|
10047
10219
|
]
|
|
10048
10220
|
}
|
|
10049
10221
|
);
|
|
@@ -10061,7 +10233,7 @@ import {
|
|
|
10061
10233
|
Row,
|
|
10062
10234
|
useTableState
|
|
10063
10235
|
} from "@react-stately/table";
|
|
10064
|
-
import { cn as
|
|
10236
|
+
import { cn as cn67, useClassNames as useClassNames63 } from "@marigold/system";
|
|
10065
10237
|
|
|
10066
10238
|
// src/Table/Context.tsx
|
|
10067
10239
|
import { createContext as createContext15, useContext as useContext25 } from "react";
|
|
@@ -10070,7 +10242,7 @@ var useTableContext = () => useContext25(TableContext);
|
|
|
10070
10242
|
|
|
10071
10243
|
// src/Table/TableBody.tsx
|
|
10072
10244
|
import { useTableRowGroup } from "@react-aria/table";
|
|
10073
|
-
import { jsx as
|
|
10245
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
10074
10246
|
var TableBody = ({
|
|
10075
10247
|
children,
|
|
10076
10248
|
className,
|
|
@@ -10079,7 +10251,7 @@ var TableBody = ({
|
|
|
10079
10251
|
const { rowGroupProps } = useTableRowGroup();
|
|
10080
10252
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10081
10253
|
if (state.collection.size === 0 && emptyState) {
|
|
10082
|
-
return /* @__PURE__ */
|
|
10254
|
+
return /* @__PURE__ */ jsx106("tbody", { className, children: /* @__PURE__ */ jsx106("tr", { className: classNames3 == null ? void 0 : classNames3.row, role: "row", children: /* @__PURE__ */ jsx106(
|
|
10083
10255
|
"td",
|
|
10084
10256
|
{
|
|
10085
10257
|
className: classNames3 == null ? void 0 : classNames3.cell,
|
|
@@ -10089,7 +10261,7 @@ var TableBody = ({
|
|
|
10089
10261
|
}
|
|
10090
10262
|
) }) });
|
|
10091
10263
|
}
|
|
10092
|
-
return /* @__PURE__ */
|
|
10264
|
+
return /* @__PURE__ */ jsx106("tbody", { ...rowGroupProps, className, children });
|
|
10093
10265
|
};
|
|
10094
10266
|
|
|
10095
10267
|
// src/Table/TableCell.tsx
|
|
@@ -10097,9 +10269,13 @@ import { useRef as useRef10 } from "react";
|
|
|
10097
10269
|
import { useFocusRing } from "@react-aria/focus";
|
|
10098
10270
|
import { useTableCell } from "@react-aria/table";
|
|
10099
10271
|
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
|
10100
|
-
import {
|
|
10101
|
-
import { jsx as
|
|
10102
|
-
var TableCell = ({
|
|
10272
|
+
import { useStateProps } from "@marigold/system";
|
|
10273
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
10274
|
+
var TableCell = ({
|
|
10275
|
+
cell,
|
|
10276
|
+
align = "left",
|
|
10277
|
+
alignY = "middle"
|
|
10278
|
+
}) => {
|
|
10103
10279
|
const ref = useRef10(null);
|
|
10104
10280
|
const { interactive, state, classNames: classNames3 } = useTableContext();
|
|
10105
10281
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
@@ -10121,14 +10297,15 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
10121
10297
|
};
|
|
10122
10298
|
const { focusProps, isFocusVisible } = useFocusRing();
|
|
10123
10299
|
const stateProps = useStateProps({ disabled, focusVisible: isFocusVisible });
|
|
10124
|
-
return /* @__PURE__ */
|
|
10300
|
+
return /* @__PURE__ */ jsx107(
|
|
10125
10301
|
"td",
|
|
10126
10302
|
{
|
|
10127
10303
|
ref,
|
|
10128
|
-
className:
|
|
10304
|
+
className: classNames3 == null ? void 0 : classNames3.cell,
|
|
10129
10305
|
...mergeProps2(cellProps, focusProps),
|
|
10130
10306
|
...stateProps,
|
|
10131
10307
|
align,
|
|
10308
|
+
valign: alignY,
|
|
10132
10309
|
children: cell.rendered
|
|
10133
10310
|
}
|
|
10134
10311
|
);
|
|
@@ -10139,7 +10316,7 @@ import { useRef as useRef11 } from "react";
|
|
|
10139
10316
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
10140
10317
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
10141
10318
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
10142
|
-
import { cn as
|
|
10319
|
+
import { cn as cn62, useStateProps as useStateProps2 } from "@marigold/system";
|
|
10143
10320
|
|
|
10144
10321
|
// src/Table/utils.ts
|
|
10145
10322
|
var mapCheckboxProps = ({
|
|
@@ -10162,8 +10339,11 @@ var mapCheckboxProps = ({
|
|
|
10162
10339
|
};
|
|
10163
10340
|
|
|
10164
10341
|
// src/Table/TableCheckboxCell.tsx
|
|
10165
|
-
import { jsx as
|
|
10166
|
-
var TableCheckboxCell = ({
|
|
10342
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
10343
|
+
var TableCheckboxCell = ({
|
|
10344
|
+
cell,
|
|
10345
|
+
alignY = "middle"
|
|
10346
|
+
}) => {
|
|
10167
10347
|
const ref = useRef11(null);
|
|
10168
10348
|
const { state, classNames: classNames3 } = useTableContext();
|
|
10169
10349
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
@@ -10179,14 +10359,15 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
10179
10359
|
);
|
|
10180
10360
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
10181
10361
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
10182
|
-
return /* @__PURE__ */
|
|
10362
|
+
return /* @__PURE__ */ jsx108(
|
|
10183
10363
|
"td",
|
|
10184
10364
|
{
|
|
10185
10365
|
ref,
|
|
10186
|
-
className:
|
|
10366
|
+
className: cn62("leading-none", classNames3 == null ? void 0 : classNames3.cell),
|
|
10187
10367
|
...mergeProps3(gridCellProps, focusProps),
|
|
10188
10368
|
...stateProps,
|
|
10189
|
-
|
|
10369
|
+
valign: alignY,
|
|
10370
|
+
children: /* @__PURE__ */ jsx108(_Checkbox, { ...checkboxProps })
|
|
10190
10371
|
}
|
|
10191
10372
|
);
|
|
10192
10373
|
};
|
|
@@ -10197,8 +10378,8 @@ import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
|
10197
10378
|
import { useHover } from "@react-aria/interactions";
|
|
10198
10379
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
10199
10380
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
10200
|
-
import { cn as
|
|
10201
|
-
import { jsx as
|
|
10381
|
+
import { cn as cn63, width as twWidth5, useStateProps as useStateProps3 } from "@marigold/system";
|
|
10382
|
+
import { jsx as jsx109, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
10202
10383
|
var TableColumnHeader = ({
|
|
10203
10384
|
column: column2,
|
|
10204
10385
|
width = "auto",
|
|
@@ -10220,18 +10401,18 @@ var TableColumnHeader = ({
|
|
|
10220
10401
|
hover: isHovered,
|
|
10221
10402
|
focusVisible: isFocusVisible
|
|
10222
10403
|
});
|
|
10223
|
-
return /* @__PURE__ */
|
|
10404
|
+
return /* @__PURE__ */ jsxs40(
|
|
10224
10405
|
"th",
|
|
10225
10406
|
{
|
|
10226
10407
|
colSpan: column2.colspan,
|
|
10227
10408
|
ref,
|
|
10228
|
-
className:
|
|
10409
|
+
className: cn63("cursor-default", twWidth5[width], classNames3 == null ? void 0 : classNames3.header),
|
|
10229
10410
|
...mergeProps4(columnHeaderProps, hoverProps, focusProps),
|
|
10230
10411
|
...stateProps,
|
|
10231
10412
|
align,
|
|
10232
10413
|
children: [
|
|
10233
10414
|
column2.rendered,
|
|
10234
|
-
column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
10415
|
+
column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx109(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx109(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx109("span", { className: "hidden", children: /* @__PURE__ */ jsx109(SortDown, { className: "inline-block" }) }))
|
|
10235
10416
|
]
|
|
10236
10417
|
}
|
|
10237
10418
|
);
|
|
@@ -10239,16 +10420,16 @@ var TableColumnHeader = ({
|
|
|
10239
10420
|
|
|
10240
10421
|
// src/Table/TableHeader.tsx
|
|
10241
10422
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
10242
|
-
import { cn as
|
|
10243
|
-
import { jsx as
|
|
10423
|
+
import { cn as cn64 } from "@marigold/system";
|
|
10424
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
10244
10425
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
10245
10426
|
const { rowGroupProps } = useTableRowGroup2();
|
|
10246
10427
|
const { classNames: classNames3 } = useTableContext();
|
|
10247
|
-
return /* @__PURE__ */
|
|
10428
|
+
return /* @__PURE__ */ jsx110(
|
|
10248
10429
|
"thead",
|
|
10249
10430
|
{
|
|
10250
10431
|
...rowGroupProps,
|
|
10251
|
-
className:
|
|
10432
|
+
className: cn64(
|
|
10252
10433
|
classNames3 == null ? void 0 : classNames3.thead,
|
|
10253
10434
|
// for sticky header &th needs to be sticky for b2b and core theme
|
|
10254
10435
|
// for rui sticky is applied to thead
|
|
@@ -10262,7 +10443,7 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
10262
10443
|
// src/Table/TableHeaderRow.tsx
|
|
10263
10444
|
import { useRef as useRef13 } from "react";
|
|
10264
10445
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
10265
|
-
import { jsx as
|
|
10446
|
+
import { jsx as jsx111 } from "react/jsx-runtime";
|
|
10266
10447
|
var TableHeaderRow = ({
|
|
10267
10448
|
item,
|
|
10268
10449
|
className,
|
|
@@ -10271,7 +10452,7 @@ var TableHeaderRow = ({
|
|
|
10271
10452
|
const { state } = useTableContext();
|
|
10272
10453
|
const ref = useRef13(null);
|
|
10273
10454
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
10274
|
-
return /* @__PURE__ */
|
|
10455
|
+
return /* @__PURE__ */ jsx111("tr", { ...rowProps, className, ref, children });
|
|
10275
10456
|
};
|
|
10276
10457
|
|
|
10277
10458
|
// src/Table/TableRow.tsx
|
|
@@ -10280,13 +10461,13 @@ import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
|
10280
10461
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
10281
10462
|
import { useTableRow } from "@react-aria/table";
|
|
10282
10463
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
10283
|
-
import { cn as
|
|
10284
|
-
import { jsx as
|
|
10464
|
+
import { cn as cn65, useClassNames as useClassNames62, useStateProps as useStateProps4 } from "@marigold/system";
|
|
10465
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
10285
10466
|
var TableRow = ({ children, row }) => {
|
|
10286
10467
|
const ref = useRef14(null);
|
|
10287
10468
|
const { interactive, state, ...ctx } = useTableContext();
|
|
10288
10469
|
const { variant, size: size2 } = row.props;
|
|
10289
|
-
const classNames3 =
|
|
10470
|
+
const classNames3 = useClassNames62({
|
|
10290
10471
|
component: "Table",
|
|
10291
10472
|
variant: variant || ctx.variant,
|
|
10292
10473
|
size: size2 || ctx.size
|
|
@@ -10311,11 +10492,11 @@ var TableRow = ({ children, row }) => {
|
|
|
10311
10492
|
focusVisible: isFocusVisible,
|
|
10312
10493
|
active: isPressed
|
|
10313
10494
|
});
|
|
10314
|
-
return /* @__PURE__ */
|
|
10495
|
+
return /* @__PURE__ */ jsx112(
|
|
10315
10496
|
"tr",
|
|
10316
10497
|
{
|
|
10317
10498
|
ref,
|
|
10318
|
-
className:
|
|
10499
|
+
className: cn65(
|
|
10319
10500
|
[
|
|
10320
10501
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
10321
10502
|
],
|
|
@@ -10338,11 +10519,11 @@ import {
|
|
|
10338
10519
|
} from "@react-aria/table";
|
|
10339
10520
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
10340
10521
|
import {
|
|
10341
|
-
cn as
|
|
10522
|
+
cn as cn66,
|
|
10342
10523
|
width as twWidth6,
|
|
10343
10524
|
useStateProps as useStateProps5
|
|
10344
10525
|
} from "@marigold/system";
|
|
10345
|
-
import { jsx as
|
|
10526
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
10346
10527
|
var TableSelectAllCell = ({
|
|
10347
10528
|
column: column2,
|
|
10348
10529
|
width = "auto",
|
|
@@ -10364,21 +10545,21 @@ var TableSelectAllCell = ({
|
|
|
10364
10545
|
hover: isHovered,
|
|
10365
10546
|
focusVisible: isFocusVisible
|
|
10366
10547
|
});
|
|
10367
|
-
return /* @__PURE__ */
|
|
10548
|
+
return /* @__PURE__ */ jsx113(
|
|
10368
10549
|
"th",
|
|
10369
10550
|
{
|
|
10370
10551
|
ref,
|
|
10371
|
-
className:
|
|
10552
|
+
className: cn66(twWidth6[width], ["leading-none"], classNames3 == null ? void 0 : classNames3.header),
|
|
10372
10553
|
...mergeProps6(columnHeaderProps, hoverProps, focusProps),
|
|
10373
10554
|
...stateProps,
|
|
10374
10555
|
align,
|
|
10375
|
-
children: /* @__PURE__ */
|
|
10556
|
+
children: /* @__PURE__ */ jsx113(_Checkbox, { ...checkboxProps })
|
|
10376
10557
|
}
|
|
10377
10558
|
);
|
|
10378
10559
|
};
|
|
10379
10560
|
|
|
10380
10561
|
// src/Table/Table.tsx
|
|
10381
|
-
import { jsx as
|
|
10562
|
+
import { jsx as jsx114, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
10382
10563
|
var Table = ({
|
|
10383
10564
|
variant,
|
|
10384
10565
|
size: size2,
|
|
@@ -10387,6 +10568,7 @@ var Table = ({
|
|
|
10387
10568
|
disableKeyboardNavigation = false,
|
|
10388
10569
|
stickyHeader,
|
|
10389
10570
|
emptyState,
|
|
10571
|
+
alignY = "middle",
|
|
10390
10572
|
...props
|
|
10391
10573
|
}) => {
|
|
10392
10574
|
const interactive = selectionMode !== "none";
|
|
@@ -10401,21 +10583,21 @@ var Table = ({
|
|
|
10401
10583
|
state.isKeyboardNavigationDisabled = disableKeyboardNavigation;
|
|
10402
10584
|
}
|
|
10403
10585
|
const { gridProps } = useTable(props, state, tableRef);
|
|
10404
|
-
const classNames3 =
|
|
10586
|
+
const classNames3 = useClassNames63({
|
|
10405
10587
|
component: "Table",
|
|
10406
10588
|
variant,
|
|
10407
10589
|
size: size2
|
|
10408
10590
|
});
|
|
10409
10591
|
const { collection } = state;
|
|
10410
|
-
return /* @__PURE__ */
|
|
10592
|
+
return /* @__PURE__ */ jsx114(
|
|
10411
10593
|
TableContext.Provider,
|
|
10412
10594
|
{
|
|
10413
10595
|
value: { state, interactive, classNames: classNames3, variant, size: size2 },
|
|
10414
|
-
children: /* @__PURE__ */
|
|
10596
|
+
children: /* @__PURE__ */ jsxs41(
|
|
10415
10597
|
"table",
|
|
10416
10598
|
{
|
|
10417
10599
|
ref: tableRef,
|
|
10418
|
-
className:
|
|
10600
|
+
className: cn67(
|
|
10419
10601
|
"group/table",
|
|
10420
10602
|
"border-collapse",
|
|
10421
10603
|
stretch ? "table w-full" : "block",
|
|
@@ -10423,7 +10605,7 @@ var Table = ({
|
|
|
10423
10605
|
),
|
|
10424
10606
|
...gridProps,
|
|
10425
10607
|
children: [
|
|
10426
|
-
/* @__PURE__ */
|
|
10608
|
+
/* @__PURE__ */ jsx114(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx114(
|
|
10427
10609
|
TableHeaderRow,
|
|
10428
10610
|
{
|
|
10429
10611
|
item: headerRow,
|
|
@@ -10431,7 +10613,7 @@ var Table = ({
|
|
|
10431
10613
|
children: [...collection.getChildren(headerRow.key)].map(
|
|
10432
10614
|
(column2) => {
|
|
10433
10615
|
var _a, _b, _c, _d, _e;
|
|
10434
|
-
return ((_a = column2.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
10616
|
+
return ((_a = column2.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx114(
|
|
10435
10617
|
TableSelectAllCell,
|
|
10436
10618
|
{
|
|
10437
10619
|
width: (_b = column2.props) == null ? void 0 : _b.width,
|
|
@@ -10439,7 +10621,7 @@ var Table = ({
|
|
|
10439
10621
|
align: (_c = column2.props) == null ? void 0 : _c.align
|
|
10440
10622
|
},
|
|
10441
10623
|
column2.key
|
|
10442
|
-
) : /* @__PURE__ */
|
|
10624
|
+
) : /* @__PURE__ */ jsx114(
|
|
10443
10625
|
TableColumnHeader,
|
|
10444
10626
|
{
|
|
10445
10627
|
width: (_d = column2.props) == null ? void 0 : _d.width,
|
|
@@ -10453,15 +10635,23 @@ var Table = ({
|
|
|
10453
10635
|
},
|
|
10454
10636
|
headerRow.key
|
|
10455
10637
|
)) }),
|
|
10456
|
-
/* @__PURE__ */
|
|
10638
|
+
/* @__PURE__ */ jsxs41(TableBody, { className: classNames3.body, emptyState, children: [
|
|
10457
10639
|
...collection.rows.map(
|
|
10458
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
10640
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx114(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index2) => {
|
|
10459
10641
|
var _a, _b;
|
|
10460
10642
|
const currentColumn = collection.columns[index2];
|
|
10461
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
10643
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx114(
|
|
10644
|
+
TableCheckboxCell,
|
|
10645
|
+
{
|
|
10646
|
+
cell,
|
|
10647
|
+
alignY
|
|
10648
|
+
},
|
|
10649
|
+
cell.key
|
|
10650
|
+
) : /* @__PURE__ */ jsx114(
|
|
10462
10651
|
TableCell,
|
|
10463
10652
|
{
|
|
10464
10653
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
10654
|
+
alignY,
|
|
10465
10655
|
cell
|
|
10466
10656
|
},
|
|
10467
10657
|
cell.key
|
|
@@ -10484,16 +10674,16 @@ Table.Row = Row;
|
|
|
10484
10674
|
// src/Text/Text.tsx
|
|
10485
10675
|
import { Text as Text2 } from "react-aria-components";
|
|
10486
10676
|
import {
|
|
10487
|
-
cn as
|
|
10677
|
+
cn as cn68,
|
|
10488
10678
|
cursorStyle,
|
|
10489
10679
|
ensureCssVar as ensureCssVar2,
|
|
10490
10680
|
fontWeight,
|
|
10491
10681
|
textAlign as textAlign2,
|
|
10492
10682
|
textSize,
|
|
10493
10683
|
textStyle,
|
|
10494
|
-
useClassNames as
|
|
10684
|
+
useClassNames as useClassNames64
|
|
10495
10685
|
} from "@marigold/system";
|
|
10496
|
-
import { jsx as
|
|
10686
|
+
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
10497
10687
|
var _Text = ({
|
|
10498
10688
|
variant,
|
|
10499
10689
|
size: size2,
|
|
@@ -10507,19 +10697,19 @@ var _Text = ({
|
|
|
10507
10697
|
as = "div",
|
|
10508
10698
|
...props
|
|
10509
10699
|
}) => {
|
|
10510
|
-
const classNames3 =
|
|
10700
|
+
const classNames3 = useClassNames64({
|
|
10511
10701
|
component: "Text",
|
|
10512
10702
|
variant,
|
|
10513
10703
|
size: size2
|
|
10514
10704
|
});
|
|
10515
10705
|
const Component2 = props.slot ? Text2 : as;
|
|
10516
10706
|
const elementType = props.slot ? { elementType: as } : {};
|
|
10517
|
-
return /* @__PURE__ */
|
|
10707
|
+
return /* @__PURE__ */ jsx115(
|
|
10518
10708
|
Component2,
|
|
10519
10709
|
{
|
|
10520
10710
|
...props,
|
|
10521
10711
|
...elementType,
|
|
10522
|
-
className:
|
|
10712
|
+
className: cn68(
|
|
10523
10713
|
"max-w-(--maxTextWidth)",
|
|
10524
10714
|
// possibly set by a <Container>
|
|
10525
10715
|
classNames3,
|
|
@@ -10536,11 +10726,11 @@ var _Text = ({
|
|
|
10536
10726
|
};
|
|
10537
10727
|
|
|
10538
10728
|
// src/TextArea/TextArea.tsx
|
|
10539
|
-
import { forwardRef as
|
|
10729
|
+
import { forwardRef as forwardRef33 } from "react";
|
|
10540
10730
|
import { TextArea, TextField } from "react-aria-components";
|
|
10541
|
-
import { useClassNames as
|
|
10542
|
-
import { jsx as
|
|
10543
|
-
var _TextArea =
|
|
10731
|
+
import { useClassNames as useClassNames65 } from "@marigold/system";
|
|
10732
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
10733
|
+
var _TextArea = forwardRef33(
|
|
10544
10734
|
({
|
|
10545
10735
|
variant,
|
|
10546
10736
|
size: size2,
|
|
@@ -10551,7 +10741,7 @@ var _TextArea = forwardRef32(
|
|
|
10551
10741
|
rows,
|
|
10552
10742
|
...rest
|
|
10553
10743
|
}, ref) => {
|
|
10554
|
-
const classNames3 =
|
|
10744
|
+
const classNames3 = useClassNames65({ component: "TextArea", variant, size: size2 });
|
|
10555
10745
|
const props = {
|
|
10556
10746
|
isDisabled: disabled,
|
|
10557
10747
|
isReadOnly: readOnly,
|
|
@@ -10559,15 +10749,15 @@ var _TextArea = forwardRef32(
|
|
|
10559
10749
|
isRequired: required,
|
|
10560
10750
|
...rest
|
|
10561
10751
|
};
|
|
10562
|
-
return /* @__PURE__ */
|
|
10752
|
+
return /* @__PURE__ */ jsx116(FieldBase, { as: TextField, ...props, variant, size: size2, children: /* @__PURE__ */ jsx116(TextArea, { className: classNames3, ref, rows }) });
|
|
10563
10753
|
}
|
|
10564
10754
|
);
|
|
10565
10755
|
|
|
10566
10756
|
// src/TextField/TextField.tsx
|
|
10567
|
-
import { forwardRef as
|
|
10757
|
+
import { forwardRef as forwardRef34 } from "react";
|
|
10568
10758
|
import { TextField as TextField2 } from "react-aria-components";
|
|
10569
|
-
import { jsx as
|
|
10570
|
-
var _TextField =
|
|
10759
|
+
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
10760
|
+
var _TextField = forwardRef34(
|
|
10571
10761
|
({ required, disabled, readOnly, error, ...rest }, ref) => {
|
|
10572
10762
|
const props = {
|
|
10573
10763
|
isDisabled: disabled,
|
|
@@ -10576,13 +10766,13 @@ var _TextField = forwardRef33(
|
|
|
10576
10766
|
isRequired: required,
|
|
10577
10767
|
...rest
|
|
10578
10768
|
};
|
|
10579
|
-
return /* @__PURE__ */
|
|
10769
|
+
return /* @__PURE__ */ jsx117(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx117(_Input, { ref }) });
|
|
10580
10770
|
}
|
|
10581
10771
|
);
|
|
10582
10772
|
|
|
10583
10773
|
// src/Tiles/Tiles.tsx
|
|
10584
|
-
import { cn as
|
|
10585
|
-
import { jsx as
|
|
10774
|
+
import { cn as cn69, createVar as createVar9, gapSpace as gapSpace9 } from "@marigold/system";
|
|
10775
|
+
import { jsx as jsx118 } from "react/jsx-runtime";
|
|
10586
10776
|
var Tiles = ({
|
|
10587
10777
|
space = 0,
|
|
10588
10778
|
stretch = false,
|
|
@@ -10595,11 +10785,11 @@ var Tiles = ({
|
|
|
10595
10785
|
if (stretch) {
|
|
10596
10786
|
column2 = `minmax(${column2}, 1fr)`;
|
|
10597
10787
|
}
|
|
10598
|
-
return /* @__PURE__ */
|
|
10788
|
+
return /* @__PURE__ */ jsx118(
|
|
10599
10789
|
"div",
|
|
10600
10790
|
{
|
|
10601
10791
|
...props,
|
|
10602
|
-
className:
|
|
10792
|
+
className: cn69(
|
|
10603
10793
|
"grid",
|
|
10604
10794
|
gapSpace9[space],
|
|
10605
10795
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -10613,11 +10803,11 @@ var Tiles = ({
|
|
|
10613
10803
|
|
|
10614
10804
|
// src/Tooltip/Tooltip.tsx
|
|
10615
10805
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
10616
|
-
import { cn as
|
|
10806
|
+
import { cn as cn70, useClassNames as useClassNames66 } from "@marigold/system";
|
|
10617
10807
|
|
|
10618
10808
|
// src/Tooltip/TooltipTrigger.tsx
|
|
10619
10809
|
import { TooltipTrigger } from "react-aria-components";
|
|
10620
|
-
import { jsx as
|
|
10810
|
+
import { jsx as jsx119 } from "react/jsx-runtime";
|
|
10621
10811
|
var _TooltipTrigger = ({
|
|
10622
10812
|
delay = 1e3,
|
|
10623
10813
|
children,
|
|
@@ -10631,26 +10821,26 @@ var _TooltipTrigger = ({
|
|
|
10631
10821
|
isOpen: open,
|
|
10632
10822
|
delay
|
|
10633
10823
|
};
|
|
10634
|
-
return /* @__PURE__ */
|
|
10824
|
+
return /* @__PURE__ */ jsx119(TooltipTrigger, { ...props, children });
|
|
10635
10825
|
};
|
|
10636
10826
|
|
|
10637
10827
|
// src/Tooltip/Tooltip.tsx
|
|
10638
|
-
import { jsx as
|
|
10828
|
+
import { jsx as jsx120, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
10639
10829
|
var _Tooltip = ({ children, variant, size: size2, open, ...rest }) => {
|
|
10640
10830
|
const props = {
|
|
10641
10831
|
...rest,
|
|
10642
10832
|
isOpen: open
|
|
10643
10833
|
};
|
|
10644
|
-
const classNames3 =
|
|
10834
|
+
const classNames3 = useClassNames66({ component: "Tooltip", variant, size: size2 });
|
|
10645
10835
|
const portal = usePortalContainer();
|
|
10646
|
-
return /* @__PURE__ */
|
|
10836
|
+
return /* @__PURE__ */ jsxs42(
|
|
10647
10837
|
Tooltip,
|
|
10648
10838
|
{
|
|
10649
10839
|
...props,
|
|
10650
|
-
className:
|
|
10840
|
+
className: cn70("group/tooltip", classNames3.container),
|
|
10651
10841
|
UNSTABLE_portalContainer: portal,
|
|
10652
10842
|
children: [
|
|
10653
|
-
/* @__PURE__ */
|
|
10843
|
+
/* @__PURE__ */ jsx120(OverlayArrow, { className: classNames3.arrow, children: /* @__PURE__ */ jsx120("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx120("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
10654
10844
|
children
|
|
10655
10845
|
]
|
|
10656
10846
|
}
|
|
@@ -10660,22 +10850,22 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
10660
10850
|
|
|
10661
10851
|
// src/TagGroup/Tag.tsx
|
|
10662
10852
|
import { Tag } from "react-aria-components";
|
|
10663
|
-
import { cn as
|
|
10853
|
+
import { cn as cn71, useClassNames as useClassNames68 } from "@marigold/system";
|
|
10664
10854
|
|
|
10665
10855
|
// src/TagGroup/TagGroup.tsx
|
|
10666
10856
|
import { TagGroup, TagList } from "react-aria-components";
|
|
10667
|
-
import { useClassNames as
|
|
10857
|
+
import { useClassNames as useClassNames67 } from "@marigold/system";
|
|
10668
10858
|
|
|
10669
10859
|
// src/TagGroup/TagGroupHiddenInput.tsx
|
|
10670
10860
|
import { useContext as useContext26 } from "react";
|
|
10671
10861
|
import { ListStateContext } from "react-aria-components";
|
|
10672
|
-
import { jsx as
|
|
10862
|
+
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
10673
10863
|
var TagGroupHiddenInput = ({ name }) => {
|
|
10674
10864
|
var _a;
|
|
10675
10865
|
const state = useContext26(ListStateContext);
|
|
10676
10866
|
const selectedKeys = Array.from((_a = state == null ? void 0 : state.selectionManager.selectedKeys) != null ? _a : []);
|
|
10677
10867
|
if (!selectedKeys.length) return null;
|
|
10678
|
-
return /* @__PURE__ */
|
|
10868
|
+
return /* @__PURE__ */ jsx121("div", { hidden: true, "aria-hidden": "true", children: selectedKeys.map((key) => /* @__PURE__ */ jsx121(
|
|
10679
10869
|
"input",
|
|
10680
10870
|
{
|
|
10681
10871
|
type: "checkbox",
|
|
@@ -10689,7 +10879,7 @@ var TagGroupHiddenInput = ({ name }) => {
|
|
|
10689
10879
|
};
|
|
10690
10880
|
|
|
10691
10881
|
// src/TagGroup/TagGroup.tsx
|
|
10692
|
-
import { jsx as
|
|
10882
|
+
import { jsx as jsx122, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
10693
10883
|
var _TagGroup = ({
|
|
10694
10884
|
width,
|
|
10695
10885
|
items,
|
|
@@ -10700,9 +10890,9 @@ var _TagGroup = ({
|
|
|
10700
10890
|
name,
|
|
10701
10891
|
...rest
|
|
10702
10892
|
}) => {
|
|
10703
|
-
const classNames3 =
|
|
10704
|
-
return /* @__PURE__ */
|
|
10705
|
-
/* @__PURE__ */
|
|
10893
|
+
const classNames3 = useClassNames67({ component: "Tag", variant, size: size2 });
|
|
10894
|
+
return /* @__PURE__ */ jsxs43(FieldBase, { as: TagGroup, ...rest, children: [
|
|
10895
|
+
/* @__PURE__ */ jsx122(
|
|
10706
10896
|
TagList,
|
|
10707
10897
|
{
|
|
10708
10898
|
items,
|
|
@@ -10711,28 +10901,28 @@ var _TagGroup = ({
|
|
|
10711
10901
|
children
|
|
10712
10902
|
}
|
|
10713
10903
|
),
|
|
10714
|
-
name ? /* @__PURE__ */
|
|
10904
|
+
name ? /* @__PURE__ */ jsx122(TagGroupHiddenInput, { name }) : null
|
|
10715
10905
|
] });
|
|
10716
10906
|
};
|
|
10717
10907
|
|
|
10718
10908
|
// src/TagGroup/Tag.tsx
|
|
10719
|
-
import { Fragment as Fragment13, jsx as
|
|
10909
|
+
import { Fragment as Fragment13, jsx as jsx123, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
10720
10910
|
var _Tag = ({ variant, size: size2, children, disabled, ...rest }) => {
|
|
10721
10911
|
let textValue = typeof children === "string" ? children : void 0;
|
|
10722
|
-
const classNames3 =
|
|
10912
|
+
const classNames3 = useClassNames68({ component: "Tag", variant, size: size2 });
|
|
10723
10913
|
const props = {
|
|
10724
10914
|
isDisabled: disabled,
|
|
10725
10915
|
...rest
|
|
10726
10916
|
};
|
|
10727
|
-
return /* @__PURE__ */
|
|
10917
|
+
return /* @__PURE__ */ jsx123(
|
|
10728
10918
|
Tag,
|
|
10729
10919
|
{
|
|
10730
10920
|
textValue,
|
|
10731
10921
|
...props,
|
|
10732
|
-
className:
|
|
10733
|
-
children: ({ allowsRemoving }) => /* @__PURE__ */
|
|
10922
|
+
className: cn71("data-selection-mode:cursor-pointer", classNames3.tag),
|
|
10923
|
+
children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs44(Fragment13, { children: [
|
|
10734
10924
|
children,
|
|
10735
|
-
allowsRemoving && /* @__PURE__ */
|
|
10925
|
+
allowsRemoving && /* @__PURE__ */ jsx123(CloseButton, { className: classNames3.closeButton, slot: "remove" })
|
|
10736
10926
|
] })
|
|
10737
10927
|
}
|
|
10738
10928
|
);
|
|
@@ -10743,14 +10933,14 @@ _Tag.Group = _TagGroup;
|
|
|
10743
10933
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
10744
10934
|
|
|
10745
10935
|
// src/XLoader/XLoader.tsx
|
|
10746
|
-
import { Dialog as
|
|
10936
|
+
import { Dialog as Dialog5, Modal as Modal2 } from "react-aria-components";
|
|
10747
10937
|
import { useId as useId2 } from "@react-aria/utils";
|
|
10748
|
-
import { useClassNames as
|
|
10938
|
+
import { useClassNames as useClassNames70 } from "@marigold/system";
|
|
10749
10939
|
|
|
10750
10940
|
// src/XLoader/BaseLoader.tsx
|
|
10751
10941
|
import { Label as Label2, ProgressBar as ProgressBar2 } from "react-aria-components";
|
|
10752
10942
|
import { useLocalizedStringFormatter as useLocalizedStringFormatter2 } from "@react-aria/i18n";
|
|
10753
|
-
import { useClassNames as
|
|
10943
|
+
import { useClassNames as useClassNames69 } from "@marigold/system";
|
|
10754
10944
|
|
|
10755
10945
|
// src/intl/messages.ts
|
|
10756
10946
|
var intlMessages2 = {
|
|
@@ -10763,7 +10953,7 @@ var intlMessages2 = {
|
|
|
10763
10953
|
};
|
|
10764
10954
|
|
|
10765
10955
|
// src/XLoader/BaseLoader.tsx
|
|
10766
|
-
import { jsx as
|
|
10956
|
+
import { jsx as jsx124, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
10767
10957
|
var BaseLoader = ({
|
|
10768
10958
|
variant,
|
|
10769
10959
|
size: size2,
|
|
@@ -10772,8 +10962,8 @@ var BaseLoader = ({
|
|
|
10772
10962
|
...props
|
|
10773
10963
|
}) => {
|
|
10774
10964
|
const stringFormatter = useLocalizedStringFormatter2(intlMessages2, "marigold");
|
|
10775
|
-
const className =
|
|
10776
|
-
return /* @__PURE__ */
|
|
10965
|
+
const className = useClassNames69({ component: "XLoader", variant, size: size2 });
|
|
10966
|
+
return /* @__PURE__ */ jsxs45(
|
|
10777
10967
|
ProgressBar2,
|
|
10778
10968
|
{
|
|
10779
10969
|
className: className.container,
|
|
@@ -10781,7 +10971,7 @@ var BaseLoader = ({
|
|
|
10781
10971
|
"aria-label": ariaLabel || children ? ariaLabel : stringFormatter.format("loadingMessage"),
|
|
10782
10972
|
...props,
|
|
10783
10973
|
children: [
|
|
10784
|
-
/* @__PURE__ */
|
|
10974
|
+
/* @__PURE__ */ jsxs45(
|
|
10785
10975
|
"svg",
|
|
10786
10976
|
{
|
|
10787
10977
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10789,13 +10979,13 @@ var BaseLoader = ({
|
|
|
10789
10979
|
fill: "currentColor",
|
|
10790
10980
|
className: className.loader,
|
|
10791
10981
|
children: [
|
|
10792
|
-
/* @__PURE__ */
|
|
10793
|
-
/* @__PURE__ */
|
|
10982
|
+
/* @__PURE__ */ jsx124("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
10983
|
+
/* @__PURE__ */ jsx124(
|
|
10794
10984
|
"path",
|
|
10795
10985
|
{
|
|
10796
10986
|
id: "XMLID_5_",
|
|
10797
10987
|
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",
|
|
10798
|
-
children: /* @__PURE__ */
|
|
10988
|
+
children: /* @__PURE__ */ jsx124(
|
|
10799
10989
|
"animate",
|
|
10800
10990
|
{
|
|
10801
10991
|
attributeName: "opacity",
|
|
@@ -10808,12 +10998,12 @@ var BaseLoader = ({
|
|
|
10808
10998
|
)
|
|
10809
10999
|
}
|
|
10810
11000
|
),
|
|
10811
|
-
/* @__PURE__ */
|
|
11001
|
+
/* @__PURE__ */ jsx124(
|
|
10812
11002
|
"path",
|
|
10813
11003
|
{
|
|
10814
11004
|
id: "XMLID_18_",
|
|
10815
11005
|
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",
|
|
10816
|
-
children: /* @__PURE__ */
|
|
11006
|
+
children: /* @__PURE__ */ jsx124(
|
|
10817
11007
|
"animate",
|
|
10818
11008
|
{
|
|
10819
11009
|
attributeName: "opacity",
|
|
@@ -10826,12 +11016,12 @@ var BaseLoader = ({
|
|
|
10826
11016
|
)
|
|
10827
11017
|
}
|
|
10828
11018
|
),
|
|
10829
|
-
/* @__PURE__ */
|
|
11019
|
+
/* @__PURE__ */ jsx124(
|
|
10830
11020
|
"path",
|
|
10831
11021
|
{
|
|
10832
11022
|
id: "XMLID_19_",
|
|
10833
11023
|
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",
|
|
10834
|
-
children: /* @__PURE__ */
|
|
11024
|
+
children: /* @__PURE__ */ jsx124(
|
|
10835
11025
|
"animate",
|
|
10836
11026
|
{
|
|
10837
11027
|
attributeName: "opacity",
|
|
@@ -10844,12 +11034,12 @@ var BaseLoader = ({
|
|
|
10844
11034
|
)
|
|
10845
11035
|
}
|
|
10846
11036
|
),
|
|
10847
|
-
/* @__PURE__ */
|
|
11037
|
+
/* @__PURE__ */ jsx124(
|
|
10848
11038
|
"path",
|
|
10849
11039
|
{
|
|
10850
11040
|
id: "XMLID_20_",
|
|
10851
11041
|
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",
|
|
10852
|
-
children: /* @__PURE__ */
|
|
11042
|
+
children: /* @__PURE__ */ jsx124(
|
|
10853
11043
|
"animate",
|
|
10854
11044
|
{
|
|
10855
11045
|
attributeName: "opacity",
|
|
@@ -10862,12 +11052,12 @@ var BaseLoader = ({
|
|
|
10862
11052
|
)
|
|
10863
11053
|
}
|
|
10864
11054
|
),
|
|
10865
|
-
/* @__PURE__ */
|
|
11055
|
+
/* @__PURE__ */ jsx124(
|
|
10866
11056
|
"path",
|
|
10867
11057
|
{
|
|
10868
11058
|
id: "XMLID_21_",
|
|
10869
11059
|
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",
|
|
10870
|
-
children: /* @__PURE__ */
|
|
11060
|
+
children: /* @__PURE__ */ jsx124(
|
|
10871
11061
|
"animate",
|
|
10872
11062
|
{
|
|
10873
11063
|
attributeName: "opacity",
|
|
@@ -10880,12 +11070,12 @@ var BaseLoader = ({
|
|
|
10880
11070
|
)
|
|
10881
11071
|
}
|
|
10882
11072
|
),
|
|
10883
|
-
/* @__PURE__ */
|
|
11073
|
+
/* @__PURE__ */ jsx124(
|
|
10884
11074
|
"path",
|
|
10885
11075
|
{
|
|
10886
11076
|
id: "XMLID_22_",
|
|
10887
11077
|
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",
|
|
10888
|
-
children: /* @__PURE__ */
|
|
11078
|
+
children: /* @__PURE__ */ jsx124(
|
|
10889
11079
|
"animate",
|
|
10890
11080
|
{
|
|
10891
11081
|
attributeName: "opacity",
|
|
@@ -10898,12 +11088,12 @@ var BaseLoader = ({
|
|
|
10898
11088
|
)
|
|
10899
11089
|
}
|
|
10900
11090
|
),
|
|
10901
|
-
/* @__PURE__ */
|
|
11091
|
+
/* @__PURE__ */ jsx124(
|
|
10902
11092
|
"path",
|
|
10903
11093
|
{
|
|
10904
11094
|
id: "XMLID_23_",
|
|
10905
11095
|
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",
|
|
10906
|
-
children: /* @__PURE__ */
|
|
11096
|
+
children: /* @__PURE__ */ jsx124(
|
|
10907
11097
|
"animate",
|
|
10908
11098
|
{
|
|
10909
11099
|
attributeName: "opacity",
|
|
@@ -10916,12 +11106,12 @@ var BaseLoader = ({
|
|
|
10916
11106
|
)
|
|
10917
11107
|
}
|
|
10918
11108
|
),
|
|
10919
|
-
/* @__PURE__ */
|
|
11109
|
+
/* @__PURE__ */ jsx124(
|
|
10920
11110
|
"path",
|
|
10921
11111
|
{
|
|
10922
11112
|
id: "XMLID_24_",
|
|
10923
11113
|
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",
|
|
10924
|
-
children: /* @__PURE__ */
|
|
11114
|
+
children: /* @__PURE__ */ jsx124(
|
|
10925
11115
|
"animate",
|
|
10926
11116
|
{
|
|
10927
11117
|
attributeName: "opacity",
|
|
@@ -10934,12 +11124,12 @@ var BaseLoader = ({
|
|
|
10934
11124
|
)
|
|
10935
11125
|
}
|
|
10936
11126
|
),
|
|
10937
|
-
/* @__PURE__ */
|
|
11127
|
+
/* @__PURE__ */ jsx124(
|
|
10938
11128
|
"path",
|
|
10939
11129
|
{
|
|
10940
11130
|
id: "XMLID_25_",
|
|
10941
11131
|
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",
|
|
10942
|
-
children: /* @__PURE__ */
|
|
11132
|
+
children: /* @__PURE__ */ jsx124(
|
|
10943
11133
|
"animate",
|
|
10944
11134
|
{
|
|
10945
11135
|
attributeName: "opacity",
|
|
@@ -10952,12 +11142,12 @@ var BaseLoader = ({
|
|
|
10952
11142
|
)
|
|
10953
11143
|
}
|
|
10954
11144
|
),
|
|
10955
|
-
/* @__PURE__ */
|
|
11145
|
+
/* @__PURE__ */ jsx124(
|
|
10956
11146
|
"path",
|
|
10957
11147
|
{
|
|
10958
11148
|
id: "XMLID_26_",
|
|
10959
11149
|
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",
|
|
10960
|
-
children: /* @__PURE__ */
|
|
11150
|
+
children: /* @__PURE__ */ jsx124(
|
|
10961
11151
|
"animate",
|
|
10962
11152
|
{
|
|
10963
11153
|
attributeName: "opacity",
|
|
@@ -10970,12 +11160,12 @@ var BaseLoader = ({
|
|
|
10970
11160
|
)
|
|
10971
11161
|
}
|
|
10972
11162
|
),
|
|
10973
|
-
/* @__PURE__ */
|
|
11163
|
+
/* @__PURE__ */ jsx124(
|
|
10974
11164
|
"path",
|
|
10975
11165
|
{
|
|
10976
11166
|
id: "XMLID_27_",
|
|
10977
11167
|
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",
|
|
10978
|
-
children: /* @__PURE__ */
|
|
11168
|
+
children: /* @__PURE__ */ jsx124(
|
|
10979
11169
|
"animate",
|
|
10980
11170
|
{
|
|
10981
11171
|
attributeName: "opacity",
|
|
@@ -10991,31 +11181,31 @@ var BaseLoader = ({
|
|
|
10991
11181
|
]
|
|
10992
11182
|
}
|
|
10993
11183
|
),
|
|
10994
|
-
children ? /* @__PURE__ */
|
|
11184
|
+
children ? /* @__PURE__ */ jsx124(Label2, { className: className.label, children }) : null
|
|
10995
11185
|
]
|
|
10996
11186
|
}
|
|
10997
11187
|
);
|
|
10998
11188
|
};
|
|
10999
11189
|
|
|
11000
11190
|
// src/XLoader/XLoader.tsx
|
|
11001
|
-
import { jsx as
|
|
11191
|
+
import { jsx as jsx125 } from "react/jsx-runtime";
|
|
11002
11192
|
var LoaderFullScreen = (props) => {
|
|
11003
11193
|
const id = useId2();
|
|
11004
|
-
return /* @__PURE__ */
|
|
11194
|
+
return /* @__PURE__ */ jsx125(Underlay, { defaultOpen: true, keyboardDismissable: true, variant: "modal", children: /* @__PURE__ */ jsx125(Modal2, { className: "grid h-(--visual-viewport-height) cursor-progress place-items-center", children: /* @__PURE__ */ jsx125(Dialog5, { className: "outline-0", "aria-labelledby": id, children: /* @__PURE__ */ jsx125(BaseLoader, { id, ...props }) }) }) });
|
|
11005
11195
|
};
|
|
11006
11196
|
var LoaderSection = (props) => {
|
|
11007
|
-
const className =
|
|
11197
|
+
const className = useClassNames70({
|
|
11008
11198
|
component: "Underlay",
|
|
11009
11199
|
variant: "modal",
|
|
11010
11200
|
className: "flex size-full items-center justify-center"
|
|
11011
11201
|
});
|
|
11012
|
-
return /* @__PURE__ */
|
|
11202
|
+
return /* @__PURE__ */ jsx125("div", { className, children: /* @__PURE__ */ jsx125(BaseLoader, { ...props }) });
|
|
11013
11203
|
};
|
|
11014
|
-
var XLoader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PURE__ */
|
|
11204
|
+
var XLoader = ({ mode, variant, ...props }) => mode === "fullscreen" ? /* @__PURE__ */ jsx125(LoaderFullScreen, { variant: variant != null ? variant : "inverted", ...props }) : mode === "section" ? /* @__PURE__ */ jsx125(LoaderSection, { variant: variant != null ? variant : "inverted", ...props }) : /* @__PURE__ */ jsx125(BaseLoader, { variant, ...props });
|
|
11015
11205
|
|
|
11016
11206
|
// src/Tabs/Tabs.tsx
|
|
11017
11207
|
import { Tabs } from "react-aria-components";
|
|
11018
|
-
import { useClassNames as
|
|
11208
|
+
import { useClassNames as useClassNames71 } from "@marigold/system";
|
|
11019
11209
|
|
|
11020
11210
|
// src/Tabs/Context.ts
|
|
11021
11211
|
import { createContext as createContext16, useContext as useContext27 } from "react";
|
|
@@ -11024,15 +11214,15 @@ var useTabContext = () => useContext27(TabContext);
|
|
|
11024
11214
|
|
|
11025
11215
|
// src/Tabs/Tab.tsx
|
|
11026
11216
|
import { Tab } from "react-aria-components";
|
|
11027
|
-
import { cn as
|
|
11028
|
-
import { jsx as
|
|
11217
|
+
import { cn as cn72 } from "@marigold/system";
|
|
11218
|
+
import { jsx as jsx126 } from "react/jsx-runtime";
|
|
11029
11219
|
var _Tab = (props) => {
|
|
11030
11220
|
const { classNames: classNames3 } = useTabContext();
|
|
11031
|
-
return /* @__PURE__ */
|
|
11221
|
+
return /* @__PURE__ */ jsx126(
|
|
11032
11222
|
Tab,
|
|
11033
11223
|
{
|
|
11034
11224
|
...props,
|
|
11035
|
-
className:
|
|
11225
|
+
className: cn72(
|
|
11036
11226
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
11037
11227
|
classNames3.tab
|
|
11038
11228
|
),
|
|
@@ -11043,15 +11233,15 @@ var _Tab = (props) => {
|
|
|
11043
11233
|
|
|
11044
11234
|
// src/Tabs/TabList.tsx
|
|
11045
11235
|
import { TabList } from "react-aria-components";
|
|
11046
|
-
import { cn as
|
|
11047
|
-
import { jsx as
|
|
11236
|
+
import { cn as cn73, gapSpace as gapSpace10 } from "@marigold/system";
|
|
11237
|
+
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
11048
11238
|
var _TabList = ({ space = 2, ...props }) => {
|
|
11049
11239
|
const { classNames: classNames3 } = useTabContext();
|
|
11050
|
-
return /* @__PURE__ */
|
|
11240
|
+
return /* @__PURE__ */ jsx127(
|
|
11051
11241
|
TabList,
|
|
11052
11242
|
{
|
|
11053
11243
|
...props,
|
|
11054
|
-
className:
|
|
11244
|
+
className: cn73("flex", gapSpace10[space], classNames3.tabsList),
|
|
11055
11245
|
children: props.children
|
|
11056
11246
|
}
|
|
11057
11247
|
);
|
|
@@ -11059,25 +11249,25 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
11059
11249
|
|
|
11060
11250
|
// src/Tabs/TabPanel.tsx
|
|
11061
11251
|
import { TabPanel } from "react-aria-components";
|
|
11062
|
-
import { jsx as
|
|
11252
|
+
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
11063
11253
|
var _TabPanel = (props) => {
|
|
11064
11254
|
const { classNames: classNames3 } = useTabContext();
|
|
11065
|
-
return /* @__PURE__ */
|
|
11255
|
+
return /* @__PURE__ */ jsx128(TabPanel, { ...props, className: classNames3.tabpanel, children: props.children });
|
|
11066
11256
|
};
|
|
11067
11257
|
|
|
11068
11258
|
// src/Tabs/Tabs.tsx
|
|
11069
|
-
import { jsx as
|
|
11259
|
+
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
11070
11260
|
var _Tabs = ({ disabled, variant, size: size2 = "medium", ...rest }) => {
|
|
11071
11261
|
const props = {
|
|
11072
11262
|
isDisabled: disabled,
|
|
11073
11263
|
...rest
|
|
11074
11264
|
};
|
|
11075
|
-
const classNames3 =
|
|
11265
|
+
const classNames3 = useClassNames71({
|
|
11076
11266
|
component: "Tabs",
|
|
11077
11267
|
size: size2,
|
|
11078
11268
|
variant
|
|
11079
11269
|
});
|
|
11080
|
-
return /* @__PURE__ */
|
|
11270
|
+
return /* @__PURE__ */ jsx129(TabContext.Provider, { value: { classNames: classNames3 }, children: /* @__PURE__ */ jsx129(Tabs, { ...props, className: classNames3.container, children: props.children }) });
|
|
11081
11271
|
};
|
|
11082
11272
|
_Tabs.List = _TabList;
|
|
11083
11273
|
_Tabs.TabPanel = _TabPanel;
|
|
@@ -11085,6 +11275,45 @@ _Tabs.Item = _Tab;
|
|
|
11085
11275
|
|
|
11086
11276
|
// src/RouterProvider/RouterProvider.tsx
|
|
11087
11277
|
import { RouterProvider } from "react-aria-components";
|
|
11278
|
+
|
|
11279
|
+
// src/TimeField/TimeField.tsx
|
|
11280
|
+
import { forwardRef as forwardRef35 } from "react";
|
|
11281
|
+
import { DateInput as DateInput2, DateSegment as DateSegment2, TimeField } from "react-aria-components";
|
|
11282
|
+
import { useClassNames as useClassNames72 } from "@marigold/system";
|
|
11283
|
+
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
11284
|
+
var _TimeField = forwardRef35(
|
|
11285
|
+
({
|
|
11286
|
+
required,
|
|
11287
|
+
disabled,
|
|
11288
|
+
readOnly,
|
|
11289
|
+
error,
|
|
11290
|
+
variant,
|
|
11291
|
+
size: size2,
|
|
11292
|
+
width = "full",
|
|
11293
|
+
...rest
|
|
11294
|
+
}, ref) => {
|
|
11295
|
+
const classNames3 = useClassNames72({ component: "DateField", variant, size: size2 });
|
|
11296
|
+
const props = {
|
|
11297
|
+
isDisabled: disabled,
|
|
11298
|
+
isReadOnly: readOnly,
|
|
11299
|
+
isInvalid: error,
|
|
11300
|
+
isRequired: required,
|
|
11301
|
+
...rest
|
|
11302
|
+
};
|
|
11303
|
+
return /* @__PURE__ */ jsx130(
|
|
11304
|
+
FieldBase,
|
|
11305
|
+
{
|
|
11306
|
+
as: TimeField,
|
|
11307
|
+
variant,
|
|
11308
|
+
size: size2,
|
|
11309
|
+
width,
|
|
11310
|
+
...props,
|
|
11311
|
+
ref,
|
|
11312
|
+
children: /* @__PURE__ */ jsx130(DateInput2, { className: classNames3.field, children: (segment) => /* @__PURE__ */ jsx130(DateSegment2, { className: classNames3.segment, segment }) })
|
|
11313
|
+
}
|
|
11314
|
+
);
|
|
11315
|
+
}
|
|
11316
|
+
);
|
|
11088
11317
|
export {
|
|
11089
11318
|
Accordion,
|
|
11090
11319
|
AccordionItem,
|
|
@@ -11104,6 +11333,7 @@ export {
|
|
|
11104
11333
|
Columns,
|
|
11105
11334
|
_ComboBox as ComboBox,
|
|
11106
11335
|
Container,
|
|
11336
|
+
_ContextualHelp as ContextualHelp,
|
|
11107
11337
|
_DateField as DateField,
|
|
11108
11338
|
DateFormat,
|
|
11109
11339
|
_DatePicker as DatePicker,
|
|
@@ -11156,10 +11386,12 @@ export {
|
|
|
11156
11386
|
_TextField as TextField,
|
|
11157
11387
|
ThemeProvider2 as ThemeProvider,
|
|
11158
11388
|
Tiles,
|
|
11389
|
+
_TimeField as TimeField,
|
|
11159
11390
|
_Tooltip as Tooltip,
|
|
11160
11391
|
Underlay,
|
|
11161
11392
|
VisuallyHidden,
|
|
11162
11393
|
XLoader,
|
|
11394
|
+
_ContextualHelp,
|
|
11163
11395
|
gridColsAlign,
|
|
11164
11396
|
gridColumn,
|
|
11165
11397
|
useAsyncList,
|