@marigold/components 6.2.0 → 6.2.3
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.ts +56 -55
- package/dist/index.js +1481 -1273
- package/dist/index.mjs +1400 -1192
- package/package.json +59 -58
package/dist/index.mjs
CHANGED
|
@@ -25,6 +25,7 @@ import { useFocusRing } from "@react-aria/focus";
|
|
|
25
25
|
import { useHover } from "@react-aria/interactions";
|
|
26
26
|
import { mergeProps, useObjectRef } from "@react-aria/utils";
|
|
27
27
|
import { cn, useClassNames, useStateProps } from "@marigold/system";
|
|
28
|
+
import { jsx } from "react/jsx-runtime";
|
|
28
29
|
var Button = forwardRef(
|
|
29
30
|
({
|
|
30
31
|
as = "button",
|
|
@@ -77,7 +78,7 @@ var Button = forwardRef(
|
|
|
77
78
|
focusVisible: isFocusVisible,
|
|
78
79
|
hover: isHovered
|
|
79
80
|
});
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
81
82
|
Component,
|
|
82
83
|
{
|
|
83
84
|
...mergeProps(buttonProps, focusProps, hoverProps, props),
|
|
@@ -87,9 +88,9 @@ var Button = forwardRef(
|
|
|
87
88
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
88
89
|
classNames2,
|
|
89
90
|
fullWidth ? "w-full" : void 0
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
),
|
|
92
|
+
children
|
|
93
|
+
}
|
|
93
94
|
);
|
|
94
95
|
}
|
|
95
96
|
);
|
|
@@ -97,15 +98,17 @@ var Button = forwardRef(
|
|
|
97
98
|
// src/Chevron/ChevronUp.tsx
|
|
98
99
|
import { forwardRef as forwardRef2 } from "react";
|
|
99
100
|
import { SVG } from "@marigold/system";
|
|
101
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
100
102
|
var ChevronUp = forwardRef2(
|
|
101
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
103
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2(SVG, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx2("path", { d: "M5.97563 16.8506L12 10.8394L18.0244 16.8506L19.875 15L12 7.125L4.125 15L5.97563 16.8506Z" }) })
|
|
102
104
|
);
|
|
103
105
|
|
|
104
106
|
// src/Chevron/ChevronDown.tsx
|
|
105
107
|
import { forwardRef as forwardRef3 } from "react";
|
|
106
108
|
import { SVG as SVG2 } from "@marigold/system";
|
|
109
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
107
110
|
var ChevronDown = forwardRef3(
|
|
108
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
111
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(SVG2, { className, ...props, viewBox: "0 0 24 24", ref, children: /* @__PURE__ */ jsx3("path", { d: "M5.97563 7.125L12 13.1363L18.0244 7.125L19.875 8.97563L12 16.8506L4.125 8.97563L5.97563 7.125Z" }) })
|
|
109
112
|
);
|
|
110
113
|
|
|
111
114
|
// src/Accordion/useAccordionItem.ts
|
|
@@ -205,6 +208,7 @@ function useAccordionItem(props, state, ref) {
|
|
|
205
208
|
}
|
|
206
209
|
|
|
207
210
|
// src/Accordion/AccordionItem.tsx
|
|
211
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
208
212
|
var AccordionItem = ({
|
|
209
213
|
item,
|
|
210
214
|
state,
|
|
@@ -243,27 +247,33 @@ var AccordionItem = ({
|
|
|
243
247
|
expanded: defaultExpanded || expanded
|
|
244
248
|
});
|
|
245
249
|
const classNames2 = useClassNames2({ component: "Accordion", variant, size });
|
|
246
|
-
return /* @__PURE__ */
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
250
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", ...props, children: [
|
|
251
|
+
/* @__PURE__ */ jsx4(FocusRing, { within: true, children: /* @__PURE__ */ jsxs(
|
|
252
|
+
Button,
|
|
253
|
+
{
|
|
254
|
+
className: classNames2.button,
|
|
255
|
+
...mergeProps3(buttonProps, stateProps, props),
|
|
256
|
+
ref,
|
|
257
|
+
"aria-label": item.textValue,
|
|
258
|
+
children: [
|
|
259
|
+
title,
|
|
260
|
+
!expanded ? /* @__PURE__ */ jsx4(ChevronUp, { className: "h3 w-6" }) : /* @__PURE__ */ jsx4(ChevronDown, { className: "h3 w-6" })
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
) }),
|
|
264
|
+
expanded || defaultExpanded ? /* @__PURE__ */ jsx4(
|
|
265
|
+
"div",
|
|
266
|
+
{
|
|
267
|
+
...mergeProps3(regionProps, focusProps, stateProps),
|
|
268
|
+
className: classNames2.item,
|
|
269
|
+
children: item.props.children
|
|
270
|
+
}
|
|
271
|
+
) : null
|
|
272
|
+
] });
|
|
264
273
|
};
|
|
265
274
|
|
|
266
275
|
// src/Accordion/Accordion.tsx
|
|
276
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
267
277
|
var Accordion = ({ children, ...props }) => {
|
|
268
278
|
const ownProps = {
|
|
269
279
|
...props,
|
|
@@ -288,23 +298,24 @@ var Accordion = ({ children, ...props }) => {
|
|
|
288
298
|
state,
|
|
289
299
|
ref
|
|
290
300
|
);
|
|
291
|
-
return /* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ jsx5("div", { ...accordionProps, ref, children: [...state.collection].map((item) => /* @__PURE__ */ jsx5(
|
|
292
302
|
AccordionItem,
|
|
293
303
|
{
|
|
294
|
-
key: item.key,
|
|
295
304
|
title: item.props.title,
|
|
296
305
|
item,
|
|
297
306
|
state,
|
|
298
307
|
variant: item.props.variant,
|
|
299
308
|
size: item.props.size
|
|
300
|
-
}
|
|
301
|
-
|
|
309
|
+
},
|
|
310
|
+
item.key
|
|
311
|
+
)) });
|
|
302
312
|
};
|
|
303
313
|
Accordion.Item = Item;
|
|
304
314
|
|
|
305
315
|
// src/Aside/Aside.tsx
|
|
306
316
|
import { Children as Children2 } from "react";
|
|
307
317
|
import { cn as cn2, createVar, gapSpace } from "@marigold/system";
|
|
318
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
308
319
|
var classNames = {
|
|
309
320
|
aside: "grow basis-[--sideWidth]",
|
|
310
321
|
content: "basis-0 grow-[999] [min-inline-size:--wrap]"
|
|
@@ -322,47 +333,50 @@ var Aside = ({
|
|
|
322
333
|
aside: createVar({ sideWidth }),
|
|
323
334
|
content: createVar({ wrap })
|
|
324
335
|
};
|
|
325
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ jsxs2(
|
|
326
337
|
"div",
|
|
327
338
|
{
|
|
328
339
|
className: cn2(
|
|
329
340
|
"flex flex-wrap",
|
|
330
341
|
gapSpace[space],
|
|
331
342
|
!stretch && "items-start"
|
|
332
|
-
)
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
343
|
+
),
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ jsx6(
|
|
346
|
+
"div",
|
|
347
|
+
{
|
|
348
|
+
className: classNames[side === "left" ? "aside" : "content"],
|
|
349
|
+
style: vars[side === "left" ? "aside" : "content"],
|
|
350
|
+
children: left
|
|
351
|
+
}
|
|
352
|
+
),
|
|
353
|
+
/* @__PURE__ */ jsx6(
|
|
354
|
+
"div",
|
|
355
|
+
{
|
|
356
|
+
className: classNames[side === "right" ? "aside" : "content"],
|
|
357
|
+
style: vars[side === "right" ? "aside" : "content"],
|
|
358
|
+
children: right
|
|
359
|
+
}
|
|
360
|
+
)
|
|
361
|
+
]
|
|
362
|
+
}
|
|
350
363
|
);
|
|
351
364
|
};
|
|
352
365
|
|
|
353
366
|
// src/Aspect/Aspect.tsx
|
|
354
367
|
import { aspect, cn as cn3, createVar as createVar2 } from "@marigold/system";
|
|
368
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
355
369
|
var Aspect = ({
|
|
356
370
|
ratio = "square",
|
|
357
371
|
maxWidth,
|
|
358
372
|
children
|
|
359
|
-
}) => /* @__PURE__ */
|
|
373
|
+
}) => /* @__PURE__ */ jsx7(
|
|
360
374
|
"div",
|
|
361
375
|
{
|
|
362
376
|
className: cn3("overflow-hidden", aspect[ratio], "max-w-[var(--maxWidth)]"),
|
|
363
|
-
style: createVar2({ maxWidth })
|
|
364
|
-
|
|
365
|
-
|
|
377
|
+
style: createVar2({ maxWidth }),
|
|
378
|
+
children
|
|
379
|
+
}
|
|
366
380
|
);
|
|
367
381
|
|
|
368
382
|
// src/Autocomplete/Autocomplete.tsx
|
|
@@ -381,6 +395,7 @@ import {
|
|
|
381
395
|
|
|
382
396
|
// src/HelpText/HelpText.tsx
|
|
383
397
|
import { SVG as SVG3, cn as cn4, useClassNames as useClassNames3 } from "@marigold/system";
|
|
398
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
384
399
|
var HelpText = ({
|
|
385
400
|
variant,
|
|
386
401
|
size,
|
|
@@ -400,27 +415,31 @@ var HelpText = ({
|
|
|
400
415
|
size,
|
|
401
416
|
className
|
|
402
417
|
});
|
|
403
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ jsx8(
|
|
404
419
|
"div",
|
|
405
420
|
{
|
|
406
421
|
...props,
|
|
407
422
|
...hasErrorMessage ? errorMessageProps : descriptionProps,
|
|
408
|
-
className: cn4("flex items-center gap-1", classNames2.container)
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
423
|
+
className: cn4("flex items-center gap-1", classNames2.container),
|
|
424
|
+
children: hasErrorMessage ? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
425
|
+
/* @__PURE__ */ jsx8(
|
|
426
|
+
SVG3,
|
|
427
|
+
{
|
|
428
|
+
className: cn4("h-4 w-4", classNames2.icon),
|
|
429
|
+
viewBox: "0 0 24 24",
|
|
430
|
+
role: "presentation",
|
|
431
|
+
children: /* @__PURE__ */ jsx8("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
errorMessage
|
|
435
|
+
] }) : /* @__PURE__ */ jsx8(Fragment, { children: description })
|
|
436
|
+
}
|
|
419
437
|
);
|
|
420
438
|
};
|
|
421
439
|
|
|
422
440
|
// src/Label/Label.tsx
|
|
423
441
|
import { SVG as SVG4, cn as cn5, createVar as createVar3, useClassNames as useClassNames4 } from "@marigold/system";
|
|
442
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
424
443
|
var Label = ({
|
|
425
444
|
as = "label",
|
|
426
445
|
children,
|
|
@@ -431,36 +450,40 @@ var Label = ({
|
|
|
431
450
|
}) => {
|
|
432
451
|
const Component = as;
|
|
433
452
|
const classNames2 = useClassNames4({ component: "Label", size, variant });
|
|
434
|
-
return /* @__PURE__ */
|
|
453
|
+
return /* @__PURE__ */ jsxs4(
|
|
435
454
|
Component,
|
|
436
455
|
{
|
|
437
456
|
...props,
|
|
438
457
|
className: cn5(classNames2.container, "flex w-[var(--labelWidth)]"),
|
|
439
|
-
style: createVar3({ labelWidth })
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
458
|
+
style: createVar3({ labelWidth }),
|
|
459
|
+
children: [
|
|
460
|
+
children,
|
|
461
|
+
/* @__PURE__ */ jsx9(
|
|
462
|
+
SVG4,
|
|
463
|
+
{
|
|
464
|
+
viewBox: "0 0 24 24",
|
|
465
|
+
role: "presentation",
|
|
466
|
+
size: 16,
|
|
467
|
+
className: cn5("hidden", classNames2.indicator),
|
|
468
|
+
children: /* @__PURE__ */ jsx9("path", { d: "M10.8 3.84003H13.2V9.85259L18.1543 7.01815L19.3461 9.10132L14.3584 11.9549L19.3371 14.7999L18.1463 16.8836L13.2 14.0572V20.16H10.8V13.9907L5.76116 16.8735L4.56935 14.7903L9.5232 11.9561L4.56 9.12003L5.75073 7.03624L10.8 9.92154V3.84003Z" })
|
|
469
|
+
}
|
|
470
|
+
)
|
|
471
|
+
]
|
|
472
|
+
}
|
|
452
473
|
);
|
|
453
474
|
};
|
|
454
475
|
|
|
455
476
|
// src/FieldBase/FieldGroup.tsx
|
|
456
477
|
import { createContext, useContext } from "react";
|
|
478
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
457
479
|
var FieldGroupContext = createContext({});
|
|
458
480
|
var useFieldGroupContext = () => useContext(FieldGroupContext);
|
|
459
481
|
var FieldGroup = ({ labelWidth, children }) => {
|
|
460
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ jsx10(FieldGroupContext.Provider, { value: { labelWidth }, children });
|
|
461
483
|
};
|
|
462
484
|
|
|
463
485
|
// src/FieldBase/FieldBase.tsx
|
|
486
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
464
487
|
var FieldBase = ({
|
|
465
488
|
children,
|
|
466
489
|
variant,
|
|
@@ -484,37 +507,39 @@ var FieldBase = ({
|
|
|
484
507
|
variant,
|
|
485
508
|
size
|
|
486
509
|
});
|
|
487
|
-
return /* @__PURE__ */
|
|
510
|
+
return /* @__PURE__ */ jsxs5(
|
|
488
511
|
"div",
|
|
489
512
|
{
|
|
490
513
|
...props,
|
|
491
514
|
...stateProps,
|
|
492
|
-
className: cn6("group/field", twWidth[width], classNames2)
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
515
|
+
className: cn6("group/field", twWidth[width], classNames2),
|
|
516
|
+
children: [
|
|
517
|
+
label && /* @__PURE__ */ jsx11(
|
|
518
|
+
Label,
|
|
519
|
+
{
|
|
520
|
+
variant,
|
|
521
|
+
size,
|
|
522
|
+
labelWidth,
|
|
523
|
+
...labelProps,
|
|
524
|
+
children: label
|
|
525
|
+
}
|
|
526
|
+
),
|
|
527
|
+
children,
|
|
528
|
+
hasHelpText && /* @__PURE__ */ jsx11(
|
|
529
|
+
HelpText,
|
|
530
|
+
{
|
|
531
|
+
variant,
|
|
532
|
+
size,
|
|
533
|
+
disabled,
|
|
534
|
+
description,
|
|
535
|
+
descriptionProps,
|
|
536
|
+
error,
|
|
537
|
+
errorMessage,
|
|
538
|
+
errorMessageProps
|
|
539
|
+
}
|
|
540
|
+
)
|
|
541
|
+
]
|
|
542
|
+
}
|
|
518
543
|
);
|
|
519
544
|
};
|
|
520
545
|
|
|
@@ -524,6 +549,7 @@ import {
|
|
|
524
549
|
forwardRef as forwardRef4
|
|
525
550
|
} from "react";
|
|
526
551
|
import { cn as cn7, useClassNames as useClassNames6 } from "@marigold/system";
|
|
552
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
527
553
|
var Input = forwardRef4(
|
|
528
554
|
({
|
|
529
555
|
type = "text",
|
|
@@ -556,31 +582,33 @@ var Input = forwardRef4(
|
|
|
556
582
|
),
|
|
557
583
|
...action.props
|
|
558
584
|
}) : null;
|
|
559
|
-
return /* @__PURE__ */
|
|
585
|
+
return /* @__PURE__ */ jsxs6(
|
|
560
586
|
"div",
|
|
561
587
|
{
|
|
562
588
|
className: "group/input relative flex items-center",
|
|
563
589
|
"data-icon": icon && "",
|
|
564
|
-
"data-action": action && ""
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
590
|
+
"data-action": action && "",
|
|
591
|
+
children: [
|
|
592
|
+
inputIcon,
|
|
593
|
+
/* @__PURE__ */ jsx12(
|
|
594
|
+
"input",
|
|
595
|
+
{
|
|
596
|
+
...props,
|
|
597
|
+
className: cn7(
|
|
598
|
+
"flex-1",
|
|
599
|
+
"disabled:cursor-not-allowed",
|
|
600
|
+
"[&[type=file]]:border-none [&[type=file]]:p-0",
|
|
601
|
+
"[&[type=color]]:ml-0 [&[type=color]]:border-none [&[type=color]]:bg-transparent [&[type=color]]:p-0",
|
|
602
|
+
classNames2.input,
|
|
603
|
+
className
|
|
604
|
+
),
|
|
605
|
+
ref,
|
|
606
|
+
type
|
|
607
|
+
}
|
|
578
608
|
),
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
),
|
|
583
|
-
inputAction
|
|
609
|
+
inputAction
|
|
610
|
+
]
|
|
611
|
+
}
|
|
584
612
|
);
|
|
585
613
|
}
|
|
586
614
|
);
|
|
@@ -601,6 +629,7 @@ import { useRef as useRef3 } from "react";
|
|
|
601
629
|
import { useOption } from "@react-aria/listbox";
|
|
602
630
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
603
631
|
import { useStateProps as useStateProps3 } from "@marigold/system";
|
|
632
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
604
633
|
var ListBoxOption = ({ item, state }) => {
|
|
605
634
|
const ref = useRef3(null);
|
|
606
635
|
const { optionProps, isSelected, isDisabled, isFocused } = useOption(
|
|
@@ -617,35 +646,40 @@ var ListBoxOption = ({ item, state }) => {
|
|
|
617
646
|
disabled: isDisabled,
|
|
618
647
|
focusVisible: isFocused
|
|
619
648
|
});
|
|
620
|
-
return /* @__PURE__ */
|
|
649
|
+
return /* @__PURE__ */ jsx13(
|
|
621
650
|
"li",
|
|
622
651
|
{
|
|
623
652
|
ref,
|
|
624
653
|
className: classNames2.option,
|
|
625
|
-
...mergeProps4(props, { onPointerDown: onPointerUp }, { ...stateProps })
|
|
626
|
-
|
|
627
|
-
|
|
654
|
+
...mergeProps4(props, { onPointerDown: onPointerUp }, { ...stateProps }),
|
|
655
|
+
children: item.props.children
|
|
656
|
+
}
|
|
628
657
|
);
|
|
629
658
|
};
|
|
630
659
|
|
|
631
660
|
// src/ListBox/ListBoxSection.tsx
|
|
632
661
|
import { useListBoxSection } from "@react-aria/listbox";
|
|
662
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
633
663
|
var ListBoxSection = ({ section, state }) => {
|
|
634
664
|
const { classNames: classNames2 } = useListBoxContext();
|
|
635
665
|
const { itemProps, headingProps, groupProps } = useListBoxSection({
|
|
636
666
|
heading: section.rendered,
|
|
637
667
|
"aria-label": section["aria-label"]
|
|
638
668
|
});
|
|
639
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */ jsxs7("li", { className: classNames2.section, ...itemProps, children: [
|
|
670
|
+
section.rendered && /* @__PURE__ */ jsx14("div", { className: classNames2.sectionTitle, ...headingProps, children: section.rendered }),
|
|
671
|
+
/* @__PURE__ */ jsx14("ul", { className: classNames2.list, ...groupProps, children: [...section.props.children].map((node) => /* @__PURE__ */ jsx14(ListBoxOption, { item: node, state }, node.key)) })
|
|
672
|
+
] });
|
|
640
673
|
};
|
|
641
674
|
|
|
642
675
|
// src/ListBox/ListBox.tsx
|
|
676
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
643
677
|
var ListBox = forwardRef5(
|
|
644
678
|
({ state, variant, size, ...props }, ref) => {
|
|
645
679
|
const innerRef = useObjectRef2(ref);
|
|
646
680
|
const { listBoxProps } = useListBox(props, state, innerRef);
|
|
647
681
|
const classNames2 = useClassNames7({ component: "ListBox", variant, size });
|
|
648
|
-
return /* @__PURE__ */
|
|
682
|
+
return /* @__PURE__ */ jsx15(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx15("div", { className: classNames2.container, children: /* @__PURE__ */ jsx15(
|
|
649
683
|
"ul",
|
|
650
684
|
{
|
|
651
685
|
className: cn8(
|
|
@@ -653,12 +687,12 @@ var ListBox = forwardRef5(
|
|
|
653
687
|
classNames2.list
|
|
654
688
|
),
|
|
655
689
|
ref: innerRef,
|
|
656
|
-
...listBoxProps
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
)));
|
|
690
|
+
...listBoxProps,
|
|
691
|
+
children: [...state.collection].map(
|
|
692
|
+
(item) => item.type === "section" ? /* @__PURE__ */ jsx15(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ jsx15(ListBoxOption, { item, state }, item.key)
|
|
693
|
+
)
|
|
694
|
+
}
|
|
695
|
+
) }) });
|
|
662
696
|
}
|
|
663
697
|
);
|
|
664
698
|
|
|
@@ -670,12 +704,14 @@ import { mergeProps as mergeProps5, useObjectRef as useObjectRef3 } from "@react
|
|
|
670
704
|
|
|
671
705
|
// src/Overlay/Underlay.tsx
|
|
672
706
|
import { cn as cn9, useClassNames as useClassNames8 } from "@marigold/system";
|
|
707
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
673
708
|
var Underlay = ({ size, variant, ...props }) => {
|
|
674
709
|
const classNames2 = useClassNames8({ component: "Underlay", size, variant });
|
|
675
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ jsx16("div", { className: cn9("fixed inset-0 z-40", classNames2), ...props });
|
|
676
711
|
};
|
|
677
712
|
|
|
678
713
|
// src/Overlay/Modal.tsx
|
|
714
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
679
715
|
var Modal = forwardRef6(
|
|
680
716
|
({ children, open, dismissable, keyboardDismissable, onClose, ...props }, ref) => {
|
|
681
717
|
const modalRef = useObjectRef3(ref);
|
|
@@ -690,15 +726,18 @@ var Modal = forwardRef6(
|
|
|
690
726
|
);
|
|
691
727
|
usePreventScroll();
|
|
692
728
|
const { modalProps } = useModal({});
|
|
693
|
-
return /* @__PURE__ */
|
|
694
|
-
"
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
729
|
+
return /* @__PURE__ */ jsxs8(FocusScope, { contain: true, restoreFocus: true, autoFocus: true, children: [
|
|
730
|
+
/* @__PURE__ */ jsx17(Underlay, { ...underlayProps, variant: "modal" }),
|
|
731
|
+
/* @__PURE__ */ jsx17(
|
|
732
|
+
"div",
|
|
733
|
+
{
|
|
734
|
+
className: "pointer-none fixed inset-0 z-50 flex items-center justify-center",
|
|
735
|
+
ref: modalRef,
|
|
736
|
+
...mergeProps5(props, overlayProps, modalProps),
|
|
737
|
+
children: /* @__PURE__ */ jsx17("div", { style: { pointerEvents: "auto" }, children })
|
|
738
|
+
}
|
|
739
|
+
)
|
|
740
|
+
] });
|
|
702
741
|
}
|
|
703
742
|
);
|
|
704
743
|
|
|
@@ -708,6 +747,7 @@ import {
|
|
|
708
747
|
Overlay as ReactAriaOverlay
|
|
709
748
|
} from "@react-aria/overlays";
|
|
710
749
|
import { useTheme } from "@marigold/system";
|
|
750
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
711
751
|
var Overlay = ({ children, container, open }) => {
|
|
712
752
|
const nodeRef = useRef4(null);
|
|
713
753
|
const theme = useTheme();
|
|
@@ -715,16 +755,16 @@ var Overlay = ({ children, container, open }) => {
|
|
|
715
755
|
if (!mountOverlay) {
|
|
716
756
|
return null;
|
|
717
757
|
}
|
|
718
|
-
return /* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ jsx18(ReactAriaOverlay, { portalContainer: container, children: /* @__PURE__ */ jsx18(
|
|
719
759
|
"div",
|
|
720
760
|
{
|
|
721
761
|
ref: nodeRef,
|
|
722
762
|
"data-testid": "overlay",
|
|
723
763
|
"data-theme": theme.name,
|
|
724
|
-
className: "opacity-100"
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
));
|
|
764
|
+
className: "opacity-100",
|
|
765
|
+
children
|
|
766
|
+
}
|
|
767
|
+
) });
|
|
728
768
|
};
|
|
729
769
|
|
|
730
770
|
// src/Overlay/Popover.tsx
|
|
@@ -735,12 +775,13 @@ import {
|
|
|
735
775
|
usePopover
|
|
736
776
|
} from "@react-aria/overlays";
|
|
737
777
|
import { useClassNames as useClassNames9 } from "@marigold/system";
|
|
778
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
738
779
|
var Popover = forwardRef7(
|
|
739
780
|
(props, ref) => {
|
|
740
781
|
const fallbackRef = useRef5(null);
|
|
741
782
|
const popoverRef = ref || fallbackRef;
|
|
742
783
|
let { children, state, ...otherProps } = props;
|
|
743
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ jsx19(Overlay, { open: state.isOpen, ...otherProps, children: /* @__PURE__ */ jsx19(PopoverWrapper, { ref: popoverRef, ...props, children }) });
|
|
744
785
|
}
|
|
745
786
|
);
|
|
746
787
|
var PopoverWrapper = forwardRef7(
|
|
@@ -765,22 +806,27 @@ var PopoverWrapper = forwardRef7(
|
|
|
765
806
|
component: "Popover",
|
|
766
807
|
variant: placement
|
|
767
808
|
});
|
|
768
|
-
return /* @__PURE__ */
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
809
|
+
return /* @__PURE__ */ jsxs9(FocusScope2, { restoreFocus: true, children: [
|
|
810
|
+
!isNonModal && /* @__PURE__ */ jsx19(Underlay, { ...underlayProps }),
|
|
811
|
+
/* @__PURE__ */ jsxs9(
|
|
812
|
+
"div",
|
|
813
|
+
{
|
|
814
|
+
...popoverProps,
|
|
815
|
+
className: classNames2,
|
|
816
|
+
style: {
|
|
817
|
+
...popoverProps.style,
|
|
818
|
+
minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
|
|
819
|
+
},
|
|
820
|
+
ref,
|
|
821
|
+
role: "presentation",
|
|
822
|
+
children: [
|
|
823
|
+
!isNonModal && /* @__PURE__ */ jsx19(DismissButton, { onDismiss: state.close }),
|
|
824
|
+
children,
|
|
825
|
+
/* @__PURE__ */ jsx19(DismissButton, { onDismiss: state.close })
|
|
826
|
+
]
|
|
827
|
+
}
|
|
828
|
+
)
|
|
829
|
+
] });
|
|
784
830
|
}
|
|
785
831
|
);
|
|
786
832
|
|
|
@@ -792,10 +838,11 @@ import {
|
|
|
792
838
|
useModalOverlay
|
|
793
839
|
} from "@react-aria/overlays";
|
|
794
840
|
import { useObjectRef as useObjectRef4 } from "@react-aria/utils";
|
|
841
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
795
842
|
var Tray = forwardRef8(
|
|
796
843
|
({ state, children, ...props }, ref) => {
|
|
797
844
|
const trayRef = useObjectRef4(ref);
|
|
798
|
-
return /* @__PURE__ */
|
|
845
|
+
return /* @__PURE__ */ jsx20(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx20(TrayWrapper, { state, ...props, ref: trayRef, children }) });
|
|
799
846
|
}
|
|
800
847
|
);
|
|
801
848
|
var TrayWrapper = forwardRef8(
|
|
@@ -808,18 +855,20 @@ var TrayWrapper = forwardRef8(
|
|
|
808
855
|
state,
|
|
809
856
|
ref
|
|
810
857
|
);
|
|
811
|
-
return /* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ jsx20(FocusScope3, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsx20(Underlay, { ...underlayProps, variant: "modal", children: /* @__PURE__ */ jsxs10(
|
|
812
859
|
"div",
|
|
813
860
|
{
|
|
814
861
|
...modalProps,
|
|
815
862
|
ref,
|
|
816
863
|
className: "absolute bottom-0 w-full",
|
|
817
|
-
"data-testid": "tray"
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
864
|
+
"data-testid": "tray",
|
|
865
|
+
children: [
|
|
866
|
+
/* @__PURE__ */ jsx20(DismissButton2, { onDismiss: state.close }),
|
|
867
|
+
children,
|
|
868
|
+
/* @__PURE__ */ jsx20(DismissButton2, { onDismiss: state.close })
|
|
869
|
+
]
|
|
870
|
+
}
|
|
871
|
+
) }) });
|
|
823
872
|
}
|
|
824
873
|
);
|
|
825
874
|
|
|
@@ -830,6 +879,7 @@ import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
|
830
879
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
831
880
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
832
881
|
import { cn as cn10, useStateProps as useStateProps4 } from "@marigold/system";
|
|
882
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
833
883
|
var ClearButton = ({
|
|
834
884
|
preventFocus,
|
|
835
885
|
disabled,
|
|
@@ -872,7 +922,7 @@ var ClearButton = ({
|
|
|
872
922
|
focusVisible: isFocusVisible,
|
|
873
923
|
hover: isHovered
|
|
874
924
|
});
|
|
875
|
-
return /* @__PURE__ */
|
|
925
|
+
return /* @__PURE__ */ jsx21(
|
|
876
926
|
"button",
|
|
877
927
|
{
|
|
878
928
|
...mergeProps6(buttonProps, focusProps, hoverProps, props),
|
|
@@ -881,24 +931,25 @@ var ClearButton = ({
|
|
|
881
931
|
className: cn10(
|
|
882
932
|
"cursor-pointer appearance-none border-none p-0 pr-1",
|
|
883
933
|
className
|
|
934
|
+
),
|
|
935
|
+
children: /* @__PURE__ */ jsx21(
|
|
936
|
+
"svg",
|
|
937
|
+
{
|
|
938
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
939
|
+
viewBox: "0 0 20 20",
|
|
940
|
+
fill: "currentColor",
|
|
941
|
+
width: 20,
|
|
942
|
+
height: 20,
|
|
943
|
+
children: /* @__PURE__ */ jsx21("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
|
|
944
|
+
}
|
|
884
945
|
)
|
|
885
|
-
}
|
|
886
|
-
/* @__PURE__ */ React.createElement(
|
|
887
|
-
"svg",
|
|
888
|
-
{
|
|
889
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
890
|
-
viewBox: "0 0 20 20",
|
|
891
|
-
fill: "currentColor",
|
|
892
|
-
width: 20,
|
|
893
|
-
height: 20
|
|
894
|
-
},
|
|
895
|
-
/* @__PURE__ */ React.createElement("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
|
|
896
|
-
)
|
|
946
|
+
}
|
|
897
947
|
);
|
|
898
948
|
};
|
|
899
949
|
|
|
900
950
|
// src/Autocomplete/Autocomplete.tsx
|
|
901
|
-
|
|
951
|
+
import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
952
|
+
var SearchIcon = (props) => /* @__PURE__ */ jsx22(
|
|
902
953
|
"svg",
|
|
903
954
|
{
|
|
904
955
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -906,9 +957,9 @@ var SearchIcon = (props) => /* @__PURE__ */ React.createElement(
|
|
|
906
957
|
fill: "currentColor",
|
|
907
958
|
width: 24,
|
|
908
959
|
height: 24,
|
|
909
|
-
...props
|
|
910
|
-
|
|
911
|
-
|
|
960
|
+
...props,
|
|
961
|
+
children: /* @__PURE__ */ jsx22("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
|
|
962
|
+
}
|
|
912
963
|
);
|
|
913
964
|
var Autocomplete = ({
|
|
914
965
|
disabled,
|
|
@@ -962,54 +1013,58 @@ var Autocomplete = ({
|
|
|
962
1013
|
state
|
|
963
1014
|
);
|
|
964
1015
|
const { isDisabled, ...restClearButtonProps } = clearButtonProps;
|
|
965
|
-
return /* @__PURE__ */
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
label: props.label,
|
|
969
|
-
labelProps,
|
|
970
|
-
description: props.description,
|
|
971
|
-
error,
|
|
972
|
-
errorMessage: props.errorMessage,
|
|
973
|
-
disabled,
|
|
974
|
-
width
|
|
975
|
-
},
|
|
976
|
-
/* @__PURE__ */ React.createElement(
|
|
977
|
-
Input,
|
|
1016
|
+
return /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1017
|
+
/* @__PURE__ */ jsx22(
|
|
1018
|
+
FieldBase,
|
|
978
1019
|
{
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1020
|
+
label: props.label,
|
|
1021
|
+
labelProps,
|
|
1022
|
+
description: props.description,
|
|
1023
|
+
error,
|
|
1024
|
+
errorMessage: props.errorMessage,
|
|
1025
|
+
disabled,
|
|
1026
|
+
width,
|
|
1027
|
+
children: /* @__PURE__ */ jsx22(
|
|
1028
|
+
Input,
|
|
984
1029
|
{
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1030
|
+
...inputProps,
|
|
1031
|
+
ref: inputRef,
|
|
1032
|
+
icon: /* @__PURE__ */ jsx22(SearchIcon, {}),
|
|
1033
|
+
action: state.inputValue !== "" ? /* @__PURE__ */ jsx22(
|
|
1034
|
+
ClearButton,
|
|
1035
|
+
{
|
|
1036
|
+
preventFocus: true,
|
|
1037
|
+
disabled: isDisabled,
|
|
1038
|
+
...restClearButtonProps
|
|
1039
|
+
}
|
|
1040
|
+
) : null
|
|
988
1041
|
}
|
|
989
|
-
)
|
|
1042
|
+
)
|
|
1043
|
+
}
|
|
1044
|
+
),
|
|
1045
|
+
/* @__PURE__ */ jsx22(
|
|
1046
|
+
Popover,
|
|
1047
|
+
{
|
|
1048
|
+
state,
|
|
1049
|
+
ref: popoverRef,
|
|
1050
|
+
triggerRef: inputRef,
|
|
1051
|
+
scrollRef: listBoxRef,
|
|
1052
|
+
isNonModal: true,
|
|
1053
|
+
children: /* @__PURE__ */ jsx22(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
990
1054
|
}
|
|
991
1055
|
)
|
|
992
|
-
)
|
|
993
|
-
Popover,
|
|
994
|
-
{
|
|
995
|
-
state,
|
|
996
|
-
ref: popoverRef,
|
|
997
|
-
triggerRef: inputRef,
|
|
998
|
-
scrollRef: listBoxRef,
|
|
999
|
-
isNonModal: true
|
|
1000
|
-
},
|
|
1001
|
-
/* @__PURE__ */ React.createElement(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1002
|
-
));
|
|
1056
|
+
] });
|
|
1003
1057
|
};
|
|
1004
1058
|
Autocomplete.Item = Item2;
|
|
1005
1059
|
|
|
1006
1060
|
// src/ComboBox/ComboBox.tsx
|
|
1007
|
-
import
|
|
1061
|
+
import React from "react";
|
|
1008
1062
|
import { useButton as useButton4 } from "@react-aria/button";
|
|
1009
1063
|
import { useComboBox } from "@react-aria/combobox";
|
|
1010
1064
|
import { useFilter as useFilter2 } from "@react-aria/i18n";
|
|
1011
1065
|
import { Item as Item3 } from "@react-stately/collections";
|
|
1012
1066
|
import { useComboBoxState as useComboBoxState2 } from "@react-stately/combobox";
|
|
1067
|
+
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1013
1068
|
var ComboBox = ({
|
|
1014
1069
|
error,
|
|
1015
1070
|
width,
|
|
@@ -1034,10 +1089,10 @@ var ComboBox = ({
|
|
|
1034
1089
|
};
|
|
1035
1090
|
const { contains } = useFilter2({ sensitivity: "base" });
|
|
1036
1091
|
const state = useComboBoxState2({ ...props, defaultFilter: contains });
|
|
1037
|
-
const buttonRef =
|
|
1038
|
-
const inputRef =
|
|
1039
|
-
const listBoxRef =
|
|
1040
|
-
const popoverRef =
|
|
1092
|
+
const buttonRef = React.useRef(null);
|
|
1093
|
+
const inputRef = React.useRef(null);
|
|
1094
|
+
const listBoxRef = React.useRef(null);
|
|
1095
|
+
const popoverRef = React.useRef(null);
|
|
1041
1096
|
const {
|
|
1042
1097
|
buttonProps: triggerProps,
|
|
1043
1098
|
inputProps,
|
|
@@ -1050,56 +1105,61 @@ var ComboBox = ({
|
|
|
1050
1105
|
const errorMessageProps = { "aria-invalid": error };
|
|
1051
1106
|
const { buttonProps } = useButton4(triggerProps, buttonRef);
|
|
1052
1107
|
const { label, description, errorMessage } = props;
|
|
1053
|
-
return /* @__PURE__ */
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
label,
|
|
1057
|
-
labelProps,
|
|
1058
|
-
description,
|
|
1059
|
-
error,
|
|
1060
|
-
errorMessage,
|
|
1061
|
-
errorMessageProps,
|
|
1062
|
-
width
|
|
1063
|
-
},
|
|
1064
|
-
/* @__PURE__ */ React2.createElement(
|
|
1065
|
-
Input,
|
|
1108
|
+
return /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
1109
|
+
/* @__PURE__ */ jsx23(
|
|
1110
|
+
FieldBase,
|
|
1066
1111
|
{
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1112
|
+
label,
|
|
1113
|
+
labelProps,
|
|
1114
|
+
description,
|
|
1115
|
+
error,
|
|
1116
|
+
errorMessage,
|
|
1117
|
+
errorMessageProps,
|
|
1118
|
+
width,
|
|
1119
|
+
children: /* @__PURE__ */ jsx23(
|
|
1120
|
+
Input,
|
|
1071
1121
|
{
|
|
1072
|
-
|
|
1073
|
-
ref:
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1122
|
+
...inputProps,
|
|
1123
|
+
ref: inputRef,
|
|
1124
|
+
action: /* @__PURE__ */ jsx23(
|
|
1125
|
+
Button,
|
|
1126
|
+
{
|
|
1127
|
+
className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0",
|
|
1128
|
+
ref: buttonRef,
|
|
1129
|
+
...buttonProps,
|
|
1130
|
+
children: /* @__PURE__ */ jsx23(ChevronDown, { className: "h-4 w-4" })
|
|
1131
|
+
}
|
|
1132
|
+
)
|
|
1133
|
+
}
|
|
1077
1134
|
)
|
|
1078
1135
|
}
|
|
1136
|
+
),
|
|
1137
|
+
/* @__PURE__ */ jsx23(
|
|
1138
|
+
Popover,
|
|
1139
|
+
{
|
|
1140
|
+
state,
|
|
1141
|
+
ref: popoverRef,
|
|
1142
|
+
triggerRef: inputRef,
|
|
1143
|
+
scrollRef: listBoxRef,
|
|
1144
|
+
isNonModal: true,
|
|
1145
|
+
children: /* @__PURE__ */ jsx23(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1146
|
+
}
|
|
1079
1147
|
)
|
|
1080
|
-
)
|
|
1081
|
-
Popover,
|
|
1082
|
-
{
|
|
1083
|
-
state,
|
|
1084
|
-
ref: popoverRef,
|
|
1085
|
-
triggerRef: inputRef,
|
|
1086
|
-
scrollRef: listBoxRef,
|
|
1087
|
-
isNonModal: true
|
|
1088
|
-
},
|
|
1089
|
-
/* @__PURE__ */ React2.createElement(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1090
|
-
));
|
|
1148
|
+
] });
|
|
1091
1149
|
};
|
|
1092
1150
|
ComboBox.Item = Item3;
|
|
1093
1151
|
|
|
1094
1152
|
// src/Badge/Badge.tsx
|
|
1095
1153
|
import { useClassNames as useClassNames10 } from "@marigold/system";
|
|
1154
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1096
1155
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
1097
1156
|
const classNames2 = useClassNames10({ component: "Badge", variant, size });
|
|
1098
|
-
return /* @__PURE__ */
|
|
1157
|
+
return /* @__PURE__ */ jsx24("div", { ...props, className: classNames2, children });
|
|
1099
1158
|
};
|
|
1100
1159
|
|
|
1101
1160
|
// src/Breakout/Breakout.tsx
|
|
1102
1161
|
import { alignment, cn as cn11, createVar as createVar4 } from "@marigold/system";
|
|
1162
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1103
1163
|
var Breakout = ({
|
|
1104
1164
|
height,
|
|
1105
1165
|
children,
|
|
@@ -1109,7 +1169,7 @@ var Breakout = ({
|
|
|
1109
1169
|
...props
|
|
1110
1170
|
}) => {
|
|
1111
1171
|
var _a, _b, _c, _d;
|
|
1112
|
-
return /* @__PURE__ */
|
|
1172
|
+
return /* @__PURE__ */ jsx25(
|
|
1113
1173
|
"div",
|
|
1114
1174
|
{
|
|
1115
1175
|
className: cn11(
|
|
@@ -1120,17 +1180,18 @@ var Breakout = ({
|
|
|
1120
1180
|
"h-[--height]"
|
|
1121
1181
|
),
|
|
1122
1182
|
style: createVar4({ height }),
|
|
1123
|
-
...props
|
|
1124
|
-
|
|
1125
|
-
|
|
1183
|
+
...props,
|
|
1184
|
+
children
|
|
1185
|
+
}
|
|
1126
1186
|
);
|
|
1127
1187
|
};
|
|
1128
1188
|
|
|
1129
1189
|
// src/Body/Body.tsx
|
|
1130
1190
|
import { useClassNames as useClassNames11 } from "@marigold/system";
|
|
1191
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1131
1192
|
var Body = ({ children, variant, size, ...props }) => {
|
|
1132
1193
|
const classNames2 = useClassNames11({ component: "Body", variant, size });
|
|
1133
|
-
return /* @__PURE__ */
|
|
1194
|
+
return /* @__PURE__ */ jsx26("section", { ...props, className: classNames2, children });
|
|
1134
1195
|
};
|
|
1135
1196
|
|
|
1136
1197
|
// src/Card/Card.tsx
|
|
@@ -1146,6 +1207,7 @@ import {
|
|
|
1146
1207
|
paddingTop,
|
|
1147
1208
|
useClassNames as useClassNames12
|
|
1148
1209
|
} from "@marigold/system";
|
|
1210
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1149
1211
|
var Card = ({
|
|
1150
1212
|
children,
|
|
1151
1213
|
variant,
|
|
@@ -1161,7 +1223,7 @@ var Card = ({
|
|
|
1161
1223
|
...props
|
|
1162
1224
|
}) => {
|
|
1163
1225
|
const classNames2 = useClassNames12({ component: "Card", variant, size });
|
|
1164
|
-
return /* @__PURE__ */
|
|
1226
|
+
return /* @__PURE__ */ jsx27(
|
|
1165
1227
|
"div",
|
|
1166
1228
|
{
|
|
1167
1229
|
...props,
|
|
@@ -1176,21 +1238,22 @@ var Card = ({
|
|
|
1176
1238
|
paddingLeft !== void 0 && paddingLeft[pl],
|
|
1177
1239
|
paddingBottom !== void 0 && paddingBottom[pb],
|
|
1178
1240
|
paddingTop !== void 0 && paddingTop[pt]
|
|
1179
|
-
)
|
|
1180
|
-
|
|
1181
|
-
|
|
1241
|
+
),
|
|
1242
|
+
children
|
|
1243
|
+
}
|
|
1182
1244
|
);
|
|
1183
1245
|
};
|
|
1184
1246
|
|
|
1185
1247
|
// src/Center/Center.tsx
|
|
1186
1248
|
import { cn as cn13, createVar as createVar5, gapSpace as gapSpace3 } from "@marigold/system";
|
|
1249
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1187
1250
|
var Center = ({
|
|
1188
1251
|
maxWidth = "100%",
|
|
1189
1252
|
space = 0,
|
|
1190
1253
|
children,
|
|
1191
1254
|
...props
|
|
1192
1255
|
}) => {
|
|
1193
|
-
return /* @__PURE__ */
|
|
1256
|
+
return /* @__PURE__ */ jsx28(
|
|
1194
1257
|
"div",
|
|
1195
1258
|
{
|
|
1196
1259
|
className: cn13(
|
|
@@ -1199,9 +1262,9 @@ var Center = ({
|
|
|
1199
1262
|
"max-w-[--maxWidth]"
|
|
1200
1263
|
),
|
|
1201
1264
|
style: createVar5({ maxWidth }),
|
|
1202
|
-
...props
|
|
1203
|
-
|
|
1204
|
-
|
|
1265
|
+
...props,
|
|
1266
|
+
children
|
|
1267
|
+
}
|
|
1205
1268
|
);
|
|
1206
1269
|
};
|
|
1207
1270
|
|
|
@@ -1220,9 +1283,13 @@ import {
|
|
|
1220
1283
|
|
|
1221
1284
|
// src/Checkbox/CheckboxField.tsx
|
|
1222
1285
|
import { createVar as createVar6, useClassNames as useClassNames13 } from "@marigold/system";
|
|
1286
|
+
import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1223
1287
|
var CheckboxField = ({ children, labelWidth }) => {
|
|
1224
1288
|
const classNames2 = useClassNames13({ component: "Field" });
|
|
1225
|
-
return /* @__PURE__ */
|
|
1289
|
+
return /* @__PURE__ */ jsxs13("div", { className: classNames2, children: [
|
|
1290
|
+
/* @__PURE__ */ jsx29("div", { className: "w-[--labelWidth]", style: createVar6({ labelWidth }) }),
|
|
1291
|
+
children
|
|
1292
|
+
] });
|
|
1226
1293
|
};
|
|
1227
1294
|
|
|
1228
1295
|
// src/Checkbox/CheckboxGroup.tsx
|
|
@@ -1232,6 +1299,7 @@ import {
|
|
|
1232
1299
|
useCheckboxGroupState
|
|
1233
1300
|
} from "@react-stately/checkbox";
|
|
1234
1301
|
import { useStateProps as useStateProps5 } from "@marigold/system";
|
|
1302
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1235
1303
|
var CheckboxGroupContext = createContext3(
|
|
1236
1304
|
null
|
|
1237
1305
|
);
|
|
@@ -1259,7 +1327,7 @@ var CheckboxGroup = ({
|
|
|
1259
1327
|
readOnly,
|
|
1260
1328
|
error
|
|
1261
1329
|
});
|
|
1262
|
-
return /* @__PURE__ */
|
|
1330
|
+
return /* @__PURE__ */ jsx30(
|
|
1263
1331
|
FieldBase,
|
|
1264
1332
|
{
|
|
1265
1333
|
label: props.label,
|
|
@@ -1272,31 +1340,32 @@ var CheckboxGroup = ({
|
|
|
1272
1340
|
disabled,
|
|
1273
1341
|
stateProps,
|
|
1274
1342
|
width,
|
|
1275
|
-
...groupProps
|
|
1276
|
-
|
|
1277
|
-
|
|
1343
|
+
...groupProps,
|
|
1344
|
+
children: /* @__PURE__ */ jsx30("div", { role: "presentation", className: "flex flex-col items-start", children: /* @__PURE__ */ jsx30(CheckboxGroupContext.Provider, { value: { error, ...state }, children }) })
|
|
1345
|
+
}
|
|
1278
1346
|
);
|
|
1279
1347
|
};
|
|
1280
1348
|
|
|
1281
1349
|
// src/Checkbox/Checkbox.tsx
|
|
1282
|
-
|
|
1350
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1351
|
+
var CheckMark = () => /* @__PURE__ */ jsx31("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx31(
|
|
1283
1352
|
"path",
|
|
1284
1353
|
{
|
|
1285
1354
|
fill: "currentColor",
|
|
1286
1355
|
stroke: "none",
|
|
1287
1356
|
d: "M11.915 1.548 10.367 0 4.045 6.315 1.557 3.827 0 5.373l4.045 4.046 7.87-7.871Z"
|
|
1288
1357
|
}
|
|
1289
|
-
));
|
|
1290
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
1358
|
+
) });
|
|
1359
|
+
var IndeterminateMark = () => /* @__PURE__ */ jsx31("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ jsx31(
|
|
1291
1360
|
"path",
|
|
1292
1361
|
{
|
|
1293
1362
|
fill: "currentColor",
|
|
1294
1363
|
stroke: "none",
|
|
1295
1364
|
d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
|
|
1296
1365
|
}
|
|
1297
|
-
));
|
|
1366
|
+
) });
|
|
1298
1367
|
var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
1299
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ jsx31(
|
|
1300
1369
|
"div",
|
|
1301
1370
|
{
|
|
1302
1371
|
"aria-hidden": "true",
|
|
@@ -1307,9 +1376,9 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1307
1376
|
"rounded-[3px] border border-solid border-black",
|
|
1308
1377
|
className
|
|
1309
1378
|
),
|
|
1310
|
-
...props
|
|
1311
|
-
|
|
1312
|
-
|
|
1379
|
+
...props,
|
|
1380
|
+
children: indeterminate ? /* @__PURE__ */ jsx31(IndeterminateMark, {}) : checked ? /* @__PURE__ */ jsx31(CheckMark, {}) : null
|
|
1381
|
+
}
|
|
1313
1382
|
);
|
|
1314
1383
|
};
|
|
1315
1384
|
var Checkbox = forwardRef9(
|
|
@@ -1376,7 +1445,7 @@ var Checkbox = forwardRef9(
|
|
|
1376
1445
|
readOnly,
|
|
1377
1446
|
indeterminate
|
|
1378
1447
|
});
|
|
1379
|
-
const component = /* @__PURE__ */
|
|
1448
|
+
const component = /* @__PURE__ */ jsxs14(
|
|
1380
1449
|
"label",
|
|
1381
1450
|
{
|
|
1382
1451
|
className: cn14(
|
|
@@ -1384,34 +1453,37 @@ var Checkbox = forwardRef9(
|
|
|
1384
1453
|
classNames2.container
|
|
1385
1454
|
),
|
|
1386
1455
|
...hoverProps,
|
|
1387
|
-
...stateProps
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1456
|
+
...stateProps,
|
|
1457
|
+
children: [
|
|
1458
|
+
/* @__PURE__ */ jsx31(
|
|
1459
|
+
"input",
|
|
1460
|
+
{
|
|
1461
|
+
ref: inputRef,
|
|
1462
|
+
className: "z-1 absolute left-0 top-0 h-full w-full cursor-pointer opacity-[0.0001] group-disabled/checkbox:cursor-not-allowed",
|
|
1463
|
+
...inputProps,
|
|
1464
|
+
...focusProps
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1467
|
+
/* @__PURE__ */ jsx31(
|
|
1468
|
+
Icon,
|
|
1469
|
+
{
|
|
1470
|
+
checked: inputProps.checked,
|
|
1471
|
+
indeterminate,
|
|
1472
|
+
className: classNames2.checkbox
|
|
1473
|
+
}
|
|
1474
|
+
),
|
|
1475
|
+
props.children && /* @__PURE__ */ jsx31("div", { className: classNames2.label, children: props.children })
|
|
1476
|
+
]
|
|
1477
|
+
}
|
|
1407
1478
|
);
|
|
1408
|
-
return !groupState && labelWidth ? /* @__PURE__ */
|
|
1479
|
+
return !groupState && labelWidth ? /* @__PURE__ */ jsx31(CheckboxField, { labelWidth, children: component }) : component;
|
|
1409
1480
|
}
|
|
1410
1481
|
);
|
|
1411
1482
|
|
|
1412
1483
|
// src/Columns/Columns.tsx
|
|
1413
1484
|
import { Children as Children3, cloneElement as cloneElement3, isValidElement as isValidElement2 } from "react";
|
|
1414
1485
|
import { cn as cn15, createVar as createVar7, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1486
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1415
1487
|
var Columns = ({
|
|
1416
1488
|
space = 0,
|
|
1417
1489
|
columns,
|
|
@@ -1427,7 +1499,7 @@ var Columns = ({
|
|
|
1427
1499
|
)}`
|
|
1428
1500
|
);
|
|
1429
1501
|
}
|
|
1430
|
-
return /* @__PURE__ */
|
|
1502
|
+
return /* @__PURE__ */ jsx32(
|
|
1431
1503
|
"div",
|
|
1432
1504
|
{
|
|
1433
1505
|
className: cn15(
|
|
@@ -1435,29 +1507,30 @@ var Columns = ({
|
|
|
1435
1507
|
stretch && "h-full",
|
|
1436
1508
|
gapSpace4[space]
|
|
1437
1509
|
),
|
|
1438
|
-
...props
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
);
|
|
1451
|
-
};
|
|
1452
|
-
|
|
1453
|
-
// src/Container/Container.tsx
|
|
1454
|
-
import {
|
|
1510
|
+
...props,
|
|
1511
|
+
children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx32(
|
|
1512
|
+
"div",
|
|
1513
|
+
{
|
|
1514
|
+
className: cn15(
|
|
1515
|
+
"grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1516
|
+
),
|
|
1517
|
+
style: createVar7({ collapseAt, columnSize: columns[idx] }),
|
|
1518
|
+
children: isValidElement2(child) ? cloneElement3(child) : child
|
|
1519
|
+
}
|
|
1520
|
+
))
|
|
1521
|
+
}
|
|
1522
|
+
);
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
// src/Container/Container.tsx
|
|
1526
|
+
import {
|
|
1455
1527
|
cn as cn16,
|
|
1456
1528
|
createVar as createVar8,
|
|
1457
1529
|
gridColsAlign,
|
|
1458
1530
|
gridColumn,
|
|
1459
1531
|
placeItems
|
|
1460
1532
|
} from "@marigold/system";
|
|
1533
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1461
1534
|
var content = {
|
|
1462
1535
|
small: "20ch",
|
|
1463
1536
|
medium: "45ch",
|
|
@@ -1477,7 +1550,7 @@ var Container = ({
|
|
|
1477
1550
|
...props
|
|
1478
1551
|
}) => {
|
|
1479
1552
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1480
|
-
return /* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ jsx33(
|
|
1481
1554
|
"div",
|
|
1482
1555
|
{
|
|
1483
1556
|
className: cn16(
|
|
@@ -1487,9 +1560,9 @@ var Container = ({
|
|
|
1487
1560
|
gridColumn[align]
|
|
1488
1561
|
),
|
|
1489
1562
|
style: createVar8({ maxWidth }),
|
|
1490
|
-
...props
|
|
1491
|
-
|
|
1492
|
-
|
|
1563
|
+
...props,
|
|
1564
|
+
children
|
|
1565
|
+
}
|
|
1493
1566
|
);
|
|
1494
1567
|
};
|
|
1495
1568
|
|
|
@@ -1506,6 +1579,7 @@ import { cn as cn19, useClassNames as useClassNames17 } from "@marigold/system";
|
|
|
1506
1579
|
|
|
1507
1580
|
// src/Header/Header.tsx
|
|
1508
1581
|
import { cn as cn17, useClassNames as useClassNames15 } from "@marigold/system";
|
|
1582
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1509
1583
|
var Header = ({
|
|
1510
1584
|
children,
|
|
1511
1585
|
variant,
|
|
@@ -1519,7 +1593,7 @@ var Header = ({
|
|
|
1519
1593
|
size,
|
|
1520
1594
|
className
|
|
1521
1595
|
});
|
|
1522
|
-
return /* @__PURE__ */
|
|
1596
|
+
return /* @__PURE__ */ jsx34("header", { ...props, className: cn17(classNames2), children });
|
|
1523
1597
|
};
|
|
1524
1598
|
|
|
1525
1599
|
// src/Headline/Headline.tsx
|
|
@@ -1531,6 +1605,7 @@ import {
|
|
|
1531
1605
|
useClassNames as useClassNames16,
|
|
1532
1606
|
useTheme as useTheme2
|
|
1533
1607
|
} from "@marigold/system";
|
|
1608
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1534
1609
|
var Headline = ({
|
|
1535
1610
|
children,
|
|
1536
1611
|
variant,
|
|
@@ -1548,7 +1623,7 @@ var Headline = ({
|
|
|
1548
1623
|
size: size != null ? size : `level-${level}`
|
|
1549
1624
|
});
|
|
1550
1625
|
const Component = as;
|
|
1551
|
-
return /* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ jsx35(
|
|
1552
1627
|
Component,
|
|
1553
1628
|
{
|
|
1554
1629
|
...props,
|
|
@@ -1560,9 +1635,9 @@ var Headline = ({
|
|
|
1560
1635
|
color
|
|
1561
1636
|
/* fallback */
|
|
1562
1637
|
)
|
|
1563
|
-
})
|
|
1564
|
-
|
|
1565
|
-
|
|
1638
|
+
}),
|
|
1639
|
+
children
|
|
1640
|
+
}
|
|
1566
1641
|
);
|
|
1567
1642
|
};
|
|
1568
1643
|
|
|
@@ -1572,8 +1647,8 @@ var DialogContext = createContext4({});
|
|
|
1572
1647
|
var useDialogContext = () => useContext4(DialogContext);
|
|
1573
1648
|
|
|
1574
1649
|
// src/Dialog/DialogController.tsx
|
|
1575
|
-
import React3 from "react";
|
|
1576
1650
|
import { useOverlayTriggerState } from "@react-stately/overlays";
|
|
1651
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1577
1652
|
var DialogController = ({
|
|
1578
1653
|
children,
|
|
1579
1654
|
dismissable = true,
|
|
@@ -1586,22 +1661,23 @@ var DialogController = ({
|
|
|
1586
1661
|
onOpenChange
|
|
1587
1662
|
});
|
|
1588
1663
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1589
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ jsx36(DialogContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx36(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx36(
|
|
1590
1665
|
Modal,
|
|
1591
1666
|
{
|
|
1592
1667
|
open: state.isOpen,
|
|
1593
1668
|
onClose: state.close,
|
|
1594
1669
|
dismissable,
|
|
1595
|
-
keyboardDismissable
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
)));
|
|
1670
|
+
keyboardDismissable,
|
|
1671
|
+
children
|
|
1672
|
+
}
|
|
1673
|
+
) }) });
|
|
1599
1674
|
};
|
|
1600
1675
|
|
|
1601
1676
|
// src/Dialog/DialogTrigger.tsx
|
|
1602
1677
|
import { Children as Children4, useRef as useRef8 } from "react";
|
|
1603
1678
|
import { PressResponder } from "@react-aria/interactions";
|
|
1604
1679
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
|
1680
|
+
import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1605
1681
|
var DialogTrigger = ({
|
|
1606
1682
|
children,
|
|
1607
1683
|
dismissable = true,
|
|
@@ -1611,27 +1687,31 @@ var DialogTrigger = ({
|
|
|
1611
1687
|
const dialogTriggerRef = useRef8(null);
|
|
1612
1688
|
const state = useOverlayTriggerState2({});
|
|
1613
1689
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1614
|
-
return /* @__PURE__ */
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
{
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1690
|
+
return /* @__PURE__ */ jsxs15(DialogContext.Provider, { value: ctx, children: [
|
|
1691
|
+
/* @__PURE__ */ jsx37(
|
|
1692
|
+
PressResponder,
|
|
1693
|
+
{
|
|
1694
|
+
ref: dialogTriggerRef,
|
|
1695
|
+
isPressed: state.isOpen,
|
|
1696
|
+
onPress: state.toggle,
|
|
1697
|
+
children: dialogTrigger
|
|
1698
|
+
}
|
|
1699
|
+
),
|
|
1700
|
+
/* @__PURE__ */ jsx37(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx37(
|
|
1701
|
+
Modal,
|
|
1702
|
+
{
|
|
1703
|
+
open: state.isOpen,
|
|
1704
|
+
onClose: state.close,
|
|
1705
|
+
dismissable,
|
|
1706
|
+
keyboardDismissable,
|
|
1707
|
+
children: dialog
|
|
1708
|
+
}
|
|
1709
|
+
) })
|
|
1710
|
+
] });
|
|
1632
1711
|
};
|
|
1633
1712
|
|
|
1634
1713
|
// src/Dialog/Dialog.tsx
|
|
1714
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1635
1715
|
var CloseButton = ({ className }) => {
|
|
1636
1716
|
const ref = useRef9(null);
|
|
1637
1717
|
const { close } = useDialogContext();
|
|
@@ -1641,7 +1721,7 @@ var CloseButton = ({ className }) => {
|
|
|
1641
1721
|
},
|
|
1642
1722
|
ref
|
|
1643
1723
|
);
|
|
1644
|
-
return /* @__PURE__ */
|
|
1724
|
+
return /* @__PURE__ */ jsx38("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx38(
|
|
1645
1725
|
"button",
|
|
1646
1726
|
{
|
|
1647
1727
|
className: cn19(
|
|
@@ -1649,17 +1729,17 @@ var CloseButton = ({ className }) => {
|
|
|
1649
1729
|
className
|
|
1650
1730
|
),
|
|
1651
1731
|
ref,
|
|
1652
|
-
...buttonProps
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
));
|
|
1732
|
+
...buttonProps,
|
|
1733
|
+
children: /* @__PURE__ */ jsx38("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx38(
|
|
1734
|
+
"path",
|
|
1735
|
+
{
|
|
1736
|
+
fillRule: "evenodd",
|
|
1737
|
+
clipRule: "evenodd",
|
|
1738
|
+
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"
|
|
1739
|
+
}
|
|
1740
|
+
) })
|
|
1741
|
+
}
|
|
1742
|
+
) });
|
|
1663
1743
|
};
|
|
1664
1744
|
var addTitleProps = (children, titleProps) => {
|
|
1665
1745
|
const childs = Children5.toArray(children);
|
|
@@ -1690,7 +1770,10 @@ var Dialog = ({
|
|
|
1690
1770
|
const { close } = useDialogContext();
|
|
1691
1771
|
const { dialogProps, titleProps } = useDialog(props, ref);
|
|
1692
1772
|
const classNames2 = useClassNames17({ component: "Dialog", variant, size });
|
|
1693
|
-
return /* @__PURE__ */
|
|
1773
|
+
return /* @__PURE__ */ jsxs16("div", { className: classNames2.container, ...dialogProps, children: [
|
|
1774
|
+
closeButton && /* @__PURE__ */ jsx38(CloseButton, { className: classNames2.closeButton }),
|
|
1775
|
+
typeof children === "function" ? children({ close, titleProps }) : props["aria-labelledby"] ? children : addTitleProps(children, titleProps)
|
|
1776
|
+
] });
|
|
1694
1777
|
};
|
|
1695
1778
|
Dialog.Trigger = DialogTrigger;
|
|
1696
1779
|
Dialog.Controller = DialogController;
|
|
@@ -1698,17 +1781,19 @@ Dialog.Controller = DialogController;
|
|
|
1698
1781
|
// src/Divider/Divider.tsx
|
|
1699
1782
|
import { useSeparator } from "@react-aria/separator";
|
|
1700
1783
|
import { useClassNames as useClassNames18 } from "@marigold/system";
|
|
1784
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1701
1785
|
var Divider = ({ variant, ...props }) => {
|
|
1702
1786
|
const { separatorProps } = useSeparator(props);
|
|
1703
1787
|
const classNames2 = useClassNames18({ component: "Divider", variant });
|
|
1704
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ jsx39("div", { className: classNames2, ...props, ...separatorProps });
|
|
1705
1789
|
};
|
|
1706
1790
|
|
|
1707
1791
|
// src/Footer/Footer.tsx
|
|
1708
1792
|
import { useClassNames as useClassNames19 } from "@marigold/system";
|
|
1793
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1709
1794
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1710
1795
|
const classNames2 = useClassNames19({ component: "Footer", variant, size });
|
|
1711
|
-
return /* @__PURE__ */
|
|
1796
|
+
return /* @__PURE__ */ jsx40("footer", { ...props, className: classNames2, children });
|
|
1712
1797
|
};
|
|
1713
1798
|
|
|
1714
1799
|
// src/Image/Image.tsx
|
|
@@ -1718,6 +1803,7 @@ import {
|
|
|
1718
1803
|
objectPosition,
|
|
1719
1804
|
useClassNames as useClassNames20
|
|
1720
1805
|
} from "@marigold/system";
|
|
1806
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1721
1807
|
var Image = ({
|
|
1722
1808
|
variant,
|
|
1723
1809
|
size,
|
|
@@ -1726,7 +1812,7 @@ var Image = ({
|
|
|
1726
1812
|
...props
|
|
1727
1813
|
}) => {
|
|
1728
1814
|
const classNames2 = useClassNames20({ component: "Image", variant, size });
|
|
1729
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ jsx41(
|
|
1730
1816
|
"img",
|
|
1731
1817
|
{
|
|
1732
1818
|
...props,
|
|
@@ -1747,6 +1833,7 @@ import {
|
|
|
1747
1833
|
cn as cn21,
|
|
1748
1834
|
gapSpace as gapSpace5
|
|
1749
1835
|
} from "@marigold/system";
|
|
1836
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1750
1837
|
var Inline = ({
|
|
1751
1838
|
space = 0,
|
|
1752
1839
|
orientation,
|
|
@@ -1756,7 +1843,7 @@ var Inline = ({
|
|
|
1756
1843
|
...props
|
|
1757
1844
|
}) => {
|
|
1758
1845
|
var _a2, _b2, _c, _d;
|
|
1759
|
-
return /* @__PURE__ */
|
|
1846
|
+
return /* @__PURE__ */ jsx42(
|
|
1760
1847
|
"div",
|
|
1761
1848
|
{
|
|
1762
1849
|
className: cn21(
|
|
@@ -1765,9 +1852,9 @@ var Inline = ({
|
|
|
1765
1852
|
alignX && ((_b2 = (_a2 = alignment2) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
1766
1853
|
alignY && ((_d = (_c = alignment2) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY])
|
|
1767
1854
|
),
|
|
1768
|
-
...props
|
|
1769
|
-
|
|
1770
|
-
|
|
1855
|
+
...props,
|
|
1856
|
+
children
|
|
1857
|
+
}
|
|
1771
1858
|
);
|
|
1772
1859
|
};
|
|
1773
1860
|
|
|
@@ -1788,6 +1875,7 @@ import { useDateSegment } from "@react-aria/datepicker";
|
|
|
1788
1875
|
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
1789
1876
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
1790
1877
|
import { cn as cn22, useStateProps as useStateProps7 } from "@marigold/system";
|
|
1878
|
+
import { jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1791
1879
|
var DateSegment = ({
|
|
1792
1880
|
className,
|
|
1793
1881
|
segment,
|
|
@@ -1805,7 +1893,7 @@ var DateSegment = ({
|
|
|
1805
1893
|
focusVisible: isFocused
|
|
1806
1894
|
});
|
|
1807
1895
|
const { isPlaceholder, placeholder, text, type, maxValue } = segment;
|
|
1808
|
-
return /* @__PURE__ */
|
|
1896
|
+
return /* @__PURE__ */ jsxs17(
|
|
1809
1897
|
"div",
|
|
1810
1898
|
{
|
|
1811
1899
|
...mergeProps7(segmentProps, stateProps, focusProps),
|
|
@@ -1819,24 +1907,27 @@ var DateSegment = ({
|
|
|
1819
1907
|
style: {
|
|
1820
1908
|
...segmentProps.style,
|
|
1821
1909
|
minWidth: maxValue != null ? String(maxValue).length + "ch" : void 0
|
|
1822
|
-
}
|
|
1823
|
-
},
|
|
1824
|
-
/* @__PURE__ */ React.createElement(
|
|
1825
|
-
"span",
|
|
1826
|
-
{
|
|
1827
|
-
"aria-hidden": "true",
|
|
1828
|
-
className: cn22(
|
|
1829
|
-
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1830
|
-
"pointer-events-none w-full text-center"
|
|
1831
|
-
)
|
|
1832
1910
|
},
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1911
|
+
children: [
|
|
1912
|
+
/* @__PURE__ */ jsx43(
|
|
1913
|
+
"span",
|
|
1914
|
+
{
|
|
1915
|
+
"aria-hidden": "true",
|
|
1916
|
+
className: cn22(
|
|
1917
|
+
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1918
|
+
"pointer-events-none w-full text-center"
|
|
1919
|
+
),
|
|
1920
|
+
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1921
|
+
}
|
|
1922
|
+
),
|
|
1923
|
+
/* @__PURE__ */ jsx43("span", { children: isPlaceholder ? "" : type === "month" || type === "day" ? Number(text) < 10 ? "0" + text : text : text })
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1836
1926
|
);
|
|
1837
1927
|
};
|
|
1838
1928
|
|
|
1839
1929
|
// src/DateField/DateField.tsx
|
|
1930
|
+
import { jsx as jsx44, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1840
1931
|
var DateField = ({
|
|
1841
1932
|
disabled,
|
|
1842
1933
|
readOnly,
|
|
@@ -1886,7 +1977,7 @@ var DateField = ({
|
|
|
1886
1977
|
required,
|
|
1887
1978
|
focus: isFocused || isPressed
|
|
1888
1979
|
});
|
|
1889
|
-
return /* @__PURE__ */
|
|
1980
|
+
return /* @__PURE__ */ jsx44(
|
|
1890
1981
|
FieldBase,
|
|
1891
1982
|
{
|
|
1892
1983
|
error,
|
|
@@ -1900,45 +1991,47 @@ var DateField = ({
|
|
|
1900
1991
|
stateProps,
|
|
1901
1992
|
variant,
|
|
1902
1993
|
size,
|
|
1903
|
-
width
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
"div",
|
|
1907
|
-
{
|
|
1908
|
-
...mergeProps8(fieldProps, focusProps, stateProps, hoverProps),
|
|
1909
|
-
className: cn23(
|
|
1910
|
-
"relative flex flex-row flex-nowrap",
|
|
1911
|
-
"cursor-text aria-disabled:cursor-not-allowed",
|
|
1912
|
-
classNames2.field
|
|
1913
|
-
),
|
|
1914
|
-
"data-testid": "date-field",
|
|
1915
|
-
ref: triggerRef
|
|
1916
|
-
},
|
|
1917
|
-
/* @__PURE__ */ React.createElement("div", { ref, className: "flex basis-full items-center" }, state.segments.map((segment, i) => {
|
|
1918
|
-
var _a;
|
|
1919
|
-
return /* @__PURE__ */ React.createElement(
|
|
1920
|
-
DateSegment,
|
|
1921
|
-
{
|
|
1922
|
-
className: classNames2.segment,
|
|
1923
|
-
isPrevPlaceholder: (_a = state.segments[i - 1]) == null ? void 0 : _a.isPlaceholder,
|
|
1924
|
-
key: i,
|
|
1925
|
-
segment,
|
|
1926
|
-
state
|
|
1927
|
-
}
|
|
1928
|
-
);
|
|
1929
|
-
})),
|
|
1930
|
-
action ? action : /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center" }, /* @__PURE__ */ React.createElement(
|
|
1931
|
-
"svg",
|
|
1994
|
+
width,
|
|
1995
|
+
children: /* @__PURE__ */ jsxs18(
|
|
1996
|
+
"div",
|
|
1932
1997
|
{
|
|
1933
|
-
|
|
1934
|
-
className: cn23(
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1998
|
+
...mergeProps8(fieldProps, focusProps, stateProps, hoverProps),
|
|
1999
|
+
className: cn23(
|
|
2000
|
+
"relative flex flex-row flex-nowrap",
|
|
2001
|
+
"cursor-text aria-disabled:cursor-not-allowed",
|
|
2002
|
+
classNames2.field
|
|
2003
|
+
),
|
|
2004
|
+
"data-testid": "date-field",
|
|
2005
|
+
ref: triggerRef,
|
|
2006
|
+
children: [
|
|
2007
|
+
/* @__PURE__ */ jsx44("div", { ref, className: "flex basis-full items-center", children: state.segments.map((segment, i) => {
|
|
2008
|
+
var _a;
|
|
2009
|
+
return /* @__PURE__ */ jsx44(
|
|
2010
|
+
DateSegment,
|
|
2011
|
+
{
|
|
2012
|
+
className: classNames2.segment,
|
|
2013
|
+
isPrevPlaceholder: (_a = state.segments[i - 1]) == null ? void 0 : _a.isPlaceholder,
|
|
2014
|
+
segment,
|
|
2015
|
+
state
|
|
2016
|
+
},
|
|
2017
|
+
i
|
|
2018
|
+
);
|
|
2019
|
+
}) }),
|
|
2020
|
+
action ? action : /* @__PURE__ */ jsx44("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx44(
|
|
2021
|
+
"svg",
|
|
2022
|
+
{
|
|
2023
|
+
"data-testid": "action",
|
|
2024
|
+
className: cn23(classNames2.action),
|
|
2025
|
+
viewBox: "0 0 24 24",
|
|
2026
|
+
width: 24,
|
|
2027
|
+
height: 24,
|
|
2028
|
+
children: /* @__PURE__ */ jsx44("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" })
|
|
2029
|
+
}
|
|
2030
|
+
) })
|
|
2031
|
+
]
|
|
2032
|
+
}
|
|
2033
|
+
)
|
|
2034
|
+
}
|
|
1942
2035
|
);
|
|
1943
2036
|
};
|
|
1944
2037
|
|
|
@@ -1966,6 +2059,7 @@ import { useCalendarCell } from "@react-aria/calendar";
|
|
|
1966
2059
|
import { useHover as useHover5 } from "@react-aria/interactions";
|
|
1967
2060
|
import { mergeProps as mergeProps9 } from "@react-aria/utils";
|
|
1968
2061
|
import { cn as cn24, useClassNames as useClassNames22, useStateProps as useStateProps9 } from "@marigold/system";
|
|
2062
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
1969
2063
|
var CalendarCell = (props) => {
|
|
1970
2064
|
const ref = useRef12(null);
|
|
1971
2065
|
const { state } = props;
|
|
@@ -1982,7 +2076,7 @@ var CalendarCell = (props) => {
|
|
|
1982
2076
|
hover: isHovered,
|
|
1983
2077
|
selected: cellProps["aria-selected"]
|
|
1984
2078
|
});
|
|
1985
|
-
return /* @__PURE__ */
|
|
2079
|
+
return /* @__PURE__ */ jsx45("td", { className: "group/cell", ...cellProps, children: /* @__PURE__ */ jsx45(
|
|
1986
2080
|
"div",
|
|
1987
2081
|
{
|
|
1988
2082
|
className: cn24(
|
|
@@ -1991,13 +2085,14 @@ var CalendarCell = (props) => {
|
|
|
1991
2085
|
),
|
|
1992
2086
|
hidden: isOutsideVisibleRange,
|
|
1993
2087
|
ref,
|
|
1994
|
-
...mergeProps9(buttonProps, stateProps, hoverProps)
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
));
|
|
2088
|
+
...mergeProps9(buttonProps, stateProps, hoverProps),
|
|
2089
|
+
children: formattedDate
|
|
2090
|
+
}
|
|
2091
|
+
) });
|
|
1998
2092
|
};
|
|
1999
2093
|
|
|
2000
2094
|
// src/Calendar/CalendarGrid.tsx
|
|
2095
|
+
import { jsx as jsx46, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2001
2096
|
var CalendarGrid = ({ state, ...props }) => {
|
|
2002
2097
|
const { locale } = useLocale2();
|
|
2003
2098
|
const { gridProps, headerProps } = useCalendarGrid(props, state);
|
|
@@ -2017,24 +2112,26 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
2017
2112
|
return dayFormatter.format(dateDay);
|
|
2018
2113
|
});
|
|
2019
2114
|
}, [locale, state.timeZone, dayFormatter]);
|
|
2020
|
-
return /* @__PURE__ */
|
|
2115
|
+
return /* @__PURE__ */ jsxs19(
|
|
2021
2116
|
"table",
|
|
2022
2117
|
{
|
|
2023
2118
|
className: "w-full border-spacing-[6px]",
|
|
2024
2119
|
...gridProps,
|
|
2025
|
-
cellPadding: "8"
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2120
|
+
cellPadding: "8",
|
|
2121
|
+
children: [
|
|
2122
|
+
/* @__PURE__ */ jsx46("thead", { ...headerProps, children: /* @__PURE__ */ jsx46("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx46("th", { style: { fontWeight: "bolder" }, children: day.substring(0, 2) }, index)) }) }),
|
|
2123
|
+
/* @__PURE__ */ jsx46("tbody", { children: [...new Array(numberOfWeeksInMonth).keys()].map((weekIndex) => /* @__PURE__ */ jsx46("tr", { children: state.getDatesInWeek(weekIndex).map(
|
|
2124
|
+
(date, i) => date ? /* @__PURE__ */ jsx46(
|
|
2125
|
+
CalendarCell,
|
|
2126
|
+
{
|
|
2127
|
+
date,
|
|
2128
|
+
state
|
|
2129
|
+
},
|
|
2130
|
+
i
|
|
2131
|
+
) : /* @__PURE__ */ jsx46("td", {}, i)
|
|
2132
|
+
) }, weekIndex)) })
|
|
2133
|
+
]
|
|
2134
|
+
}
|
|
2038
2135
|
);
|
|
2039
2136
|
};
|
|
2040
2137
|
|
|
@@ -2071,6 +2168,7 @@ var messages = {
|
|
|
2071
2168
|
};
|
|
2072
2169
|
|
|
2073
2170
|
// src/Select/Select.tsx
|
|
2171
|
+
import { jsx as jsx47, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2074
2172
|
var Select = forwardRef10(
|
|
2075
2173
|
({
|
|
2076
2174
|
variant,
|
|
@@ -2118,7 +2216,7 @@ var Select = forwardRef10(
|
|
|
2118
2216
|
expanded: state.isOpen,
|
|
2119
2217
|
required
|
|
2120
2218
|
});
|
|
2121
|
-
return /* @__PURE__ */
|
|
2219
|
+
return /* @__PURE__ */ jsxs20(
|
|
2122
2220
|
FieldBase,
|
|
2123
2221
|
{
|
|
2124
2222
|
variant,
|
|
@@ -2132,51 +2230,55 @@ var Select = forwardRef10(
|
|
|
2132
2230
|
errorMessage: props.errorMessage,
|
|
2133
2231
|
errorMessageProps,
|
|
2134
2232
|
stateProps,
|
|
2135
|
-
disabled
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
),
|
|
2147
|
-
/* @__PURE__ */ React.createElement(
|
|
2148
|
-
"button",
|
|
2149
|
-
{
|
|
2150
|
-
className: cn25(
|
|
2151
|
-
"flex w-full items-center justify-between gap-1",
|
|
2152
|
-
classNames2.select
|
|
2233
|
+
disabled,
|
|
2234
|
+
children: [
|
|
2235
|
+
/* @__PURE__ */ jsx47(
|
|
2236
|
+
HiddenSelect,
|
|
2237
|
+
{
|
|
2238
|
+
state,
|
|
2239
|
+
triggerRef: buttonRef,
|
|
2240
|
+
label: props.label,
|
|
2241
|
+
name: props.name,
|
|
2242
|
+
isDisabled: disabled
|
|
2243
|
+
}
|
|
2153
2244
|
),
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2245
|
+
/* @__PURE__ */ jsxs20(
|
|
2246
|
+
"button",
|
|
2247
|
+
{
|
|
2248
|
+
className: cn25(
|
|
2249
|
+
"flex w-full items-center justify-between gap-1",
|
|
2250
|
+
classNames2.select
|
|
2251
|
+
),
|
|
2252
|
+
ref: buttonRef,
|
|
2253
|
+
...mergeProps10(buttonProps, focusProps),
|
|
2254
|
+
...stateProps,
|
|
2255
|
+
children: [
|
|
2256
|
+
/* @__PURE__ */ jsx47("div", { className: "overflow-hidden whitespace-nowrap", ...valueProps, children: state.selectedItem ? state.selectedItem.rendered : props.placeholder }),
|
|
2257
|
+
/* @__PURE__ */ jsx47(ChevronDown, { className: "h-4 w-4" })
|
|
2258
|
+
]
|
|
2259
|
+
}
|
|
2260
|
+
),
|
|
2261
|
+
isSmallScreen ? /* @__PURE__ */ jsx47(Tray, { state, children: /* @__PURE__ */ jsx47(
|
|
2262
|
+
ListBox,
|
|
2263
|
+
{
|
|
2264
|
+
ref: listboxRef,
|
|
2265
|
+
state,
|
|
2266
|
+
variant,
|
|
2267
|
+
size,
|
|
2268
|
+
...menuProps
|
|
2269
|
+
}
|
|
2270
|
+
) }) : /* @__PURE__ */ jsx47(Popover, { state, triggerRef: buttonRef, scrollRef: listboxRef, children: /* @__PURE__ */ jsx47(
|
|
2271
|
+
ListBox,
|
|
2272
|
+
{
|
|
2273
|
+
ref: listboxRef,
|
|
2274
|
+
state,
|
|
2275
|
+
variant,
|
|
2276
|
+
size,
|
|
2277
|
+
...menuProps
|
|
2278
|
+
}
|
|
2279
|
+
) })
|
|
2280
|
+
]
|
|
2281
|
+
}
|
|
2180
2282
|
);
|
|
2181
2283
|
}
|
|
2182
2284
|
);
|
|
@@ -2184,6 +2286,7 @@ Select.Option = Item4;
|
|
|
2184
2286
|
Select.Section = Section;
|
|
2185
2287
|
|
|
2186
2288
|
// src/Calendar/MonthDropdown.tsx
|
|
2289
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2187
2290
|
var MonthDropdown = ({ state }) => {
|
|
2188
2291
|
let months = [];
|
|
2189
2292
|
let formatter = useDateFormatter2({
|
|
@@ -2200,22 +2303,23 @@ var MonthDropdown = ({ state }) => {
|
|
|
2200
2303
|
let date = state.focusedDate.set({ month: value });
|
|
2201
2304
|
state.setFocusedDate(date);
|
|
2202
2305
|
};
|
|
2203
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ jsx48(
|
|
2204
2307
|
Select,
|
|
2205
2308
|
{
|
|
2206
2309
|
"aria-label": "Month",
|
|
2207
2310
|
onChange,
|
|
2208
2311
|
selectedKey: String(state.focusedDate.month),
|
|
2209
2312
|
"data-testid": "month",
|
|
2210
|
-
disabled: state.isDisabled
|
|
2211
|
-
|
|
2212
|
-
|
|
2313
|
+
disabled: state.isDisabled,
|
|
2314
|
+
children: months.map((month, i) => /* @__PURE__ */ jsx48(Select.Option, { children: month.substring(0, 3) }, i + 1))
|
|
2315
|
+
}
|
|
2213
2316
|
);
|
|
2214
2317
|
};
|
|
2215
2318
|
var MonthDropdown_default = MonthDropdown;
|
|
2216
2319
|
|
|
2217
2320
|
// src/Calendar/YearDropdown.tsx
|
|
2218
2321
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
2322
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2219
2323
|
var YearDropdown = ({ state }) => {
|
|
2220
2324
|
const years = [];
|
|
2221
2325
|
let formatter = useDateFormatter3({
|
|
@@ -2234,21 +2338,22 @@ var YearDropdown = ({ state }) => {
|
|
|
2234
2338
|
let date = years[index].value;
|
|
2235
2339
|
state.setFocusedDate(date);
|
|
2236
2340
|
};
|
|
2237
|
-
return /* @__PURE__ */
|
|
2341
|
+
return /* @__PURE__ */ jsx49(
|
|
2238
2342
|
Select,
|
|
2239
2343
|
{
|
|
2240
2344
|
"aria-label": "Year",
|
|
2241
2345
|
selectedKey: "20",
|
|
2242
2346
|
onChange,
|
|
2243
2347
|
"data-testid": "year",
|
|
2244
|
-
disabled: state.isDisabled
|
|
2245
|
-
|
|
2246
|
-
|
|
2348
|
+
disabled: state.isDisabled,
|
|
2349
|
+
children: years.map((year, i) => /* @__PURE__ */ jsx49(Select.Option, { children: year.formatted }, i))
|
|
2350
|
+
}
|
|
2247
2351
|
);
|
|
2248
2352
|
};
|
|
2249
2353
|
var YearDropdown_default = YearDropdown;
|
|
2250
2354
|
|
|
2251
2355
|
// src/Calendar/Calendar.tsx
|
|
2356
|
+
import { jsx as jsx50, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2252
2357
|
var Calendar = ({
|
|
2253
2358
|
disabled,
|
|
2254
2359
|
readOnly,
|
|
@@ -2287,7 +2392,7 @@ var Calendar = ({
|
|
|
2287
2392
|
focusVisible: state.isFocused
|
|
2288
2393
|
});
|
|
2289
2394
|
const classNames2 = useClassNames24({ component: "Calendar" });
|
|
2290
|
-
return /* @__PURE__ */
|
|
2395
|
+
return /* @__PURE__ */ jsxs21(
|
|
2291
2396
|
"div",
|
|
2292
2397
|
{
|
|
2293
2398
|
tabIndex: -1,
|
|
@@ -2297,26 +2402,37 @@ var Calendar = ({
|
|
|
2297
2402
|
),
|
|
2298
2403
|
...calendarProps,
|
|
2299
2404
|
...calendarState,
|
|
2300
|
-
ref
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2405
|
+
ref,
|
|
2406
|
+
children: [
|
|
2407
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-4 flex items-center gap-[60px]", children: [
|
|
2408
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex min-w-[170px] gap-[9px] [&_div]:flex", children: [
|
|
2409
|
+
/* @__PURE__ */ jsx50(MonthDropdown_default, { state }),
|
|
2410
|
+
/* @__PURE__ */ jsx50(YearDropdown_default, { state })
|
|
2411
|
+
] }),
|
|
2412
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1", children: [
|
|
2413
|
+
/* @__PURE__ */ jsx50(
|
|
2414
|
+
Button,
|
|
2415
|
+
{
|
|
2416
|
+
className: classNames2.calendarControllers,
|
|
2417
|
+
...prevPropsRest,
|
|
2418
|
+
disabled: prevIsDisabled,
|
|
2419
|
+
children: /* @__PURE__ */ jsx50(ChevronLeft, {})
|
|
2420
|
+
}
|
|
2421
|
+
),
|
|
2422
|
+
/* @__PURE__ */ jsx50(
|
|
2423
|
+
Button,
|
|
2424
|
+
{
|
|
2425
|
+
className: classNames2.calendarControllers,
|
|
2426
|
+
...nextPropsRest,
|
|
2427
|
+
disabled: nextIsDisabled,
|
|
2428
|
+
children: /* @__PURE__ */ jsx50(ChevronRight, {})
|
|
2429
|
+
}
|
|
2430
|
+
)
|
|
2431
|
+
] })
|
|
2432
|
+
] }),
|
|
2433
|
+
/* @__PURE__ */ jsx50(CalendarGrid, { state })
|
|
2434
|
+
]
|
|
2435
|
+
}
|
|
2320
2436
|
);
|
|
2321
2437
|
};
|
|
2322
2438
|
|
|
@@ -2326,6 +2442,7 @@ import { useDatePicker } from "@react-aria/datepicker";
|
|
|
2326
2442
|
import { mergeProps as mergeProps11 } from "@react-aria/utils";
|
|
2327
2443
|
import { useDatePickerState } from "@react-stately/datepicker";
|
|
2328
2444
|
import { cn as cn27, useClassNames as useClassNames25, useStateProps as useStateProps12 } from "@marigold/system";
|
|
2445
|
+
import { Fragment as Fragment4, jsx as jsx51, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2329
2446
|
var DatePicker = ({
|
|
2330
2447
|
disabled,
|
|
2331
2448
|
required,
|
|
@@ -2363,38 +2480,41 @@ var DatePicker = ({
|
|
|
2363
2480
|
size,
|
|
2364
2481
|
variant
|
|
2365
2482
|
});
|
|
2366
|
-
return /* @__PURE__ */
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
...mergeProps11(buttonProps, stateProps),
|
|
2382
|
-
className: cn27("absolute right-0 top-0", classNames2.button),
|
|
2383
|
-
disabled: isDisabled
|
|
2384
|
-
},
|
|
2385
|
-
/* @__PURE__ */ React.createElement(
|
|
2386
|
-
"svg",
|
|
2483
|
+
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
2484
|
+
/* @__PURE__ */ jsx51("div", { className: "flex w-full min-w-[300px]", ...groupProps, children: /* @__PURE__ */ jsx51(
|
|
2485
|
+
DateField,
|
|
2486
|
+
{
|
|
2487
|
+
...fieldProps,
|
|
2488
|
+
label,
|
|
2489
|
+
isPressed: state.isOpen,
|
|
2490
|
+
disabled,
|
|
2491
|
+
required,
|
|
2492
|
+
errorMessage,
|
|
2493
|
+
error,
|
|
2494
|
+
description: !state.isOpen && description,
|
|
2495
|
+
triggerRef: ref,
|
|
2496
|
+
action: /* @__PURE__ */ jsx51("div", { className: classNames2.container, children: /* @__PURE__ */ jsx51(
|
|
2497
|
+
Button,
|
|
2387
2498
|
{
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2499
|
+
...mergeProps11(buttonProps, stateProps),
|
|
2500
|
+
className: cn27("absolute right-0 top-0", classNames2.button),
|
|
2501
|
+
disabled: isDisabled,
|
|
2502
|
+
children: /* @__PURE__ */ jsx51(
|
|
2503
|
+
"svg",
|
|
2504
|
+
{
|
|
2505
|
+
width: "24",
|
|
2506
|
+
height: "24",
|
|
2507
|
+
viewBox: "0 0 24 24",
|
|
2508
|
+
fill: "currentColor",
|
|
2509
|
+
children: /* @__PURE__ */ jsx51("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" })
|
|
2510
|
+
}
|
|
2511
|
+
)
|
|
2512
|
+
}
|
|
2513
|
+
) })
|
|
2514
|
+
}
|
|
2515
|
+
) }),
|
|
2516
|
+
state.isOpen && /* @__PURE__ */ jsx51(Popover, { triggerRef: ref, state, children: /* @__PURE__ */ jsx51(Calendar, { disabled, ...calendarProps }) })
|
|
2517
|
+
] });
|
|
2398
2518
|
};
|
|
2399
2519
|
|
|
2400
2520
|
// src/Inset/Inset.tsx
|
|
@@ -2404,20 +2524,21 @@ import {
|
|
|
2404
2524
|
paddingSpaceX as paddingSpaceX2,
|
|
2405
2525
|
paddingSpaceY as paddingSpaceY2
|
|
2406
2526
|
} from "@marigold/system";
|
|
2527
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2407
2528
|
var Inset = ({
|
|
2408
2529
|
space = 0,
|
|
2409
2530
|
spaceX = 0,
|
|
2410
2531
|
spaceY = 0,
|
|
2411
2532
|
children
|
|
2412
|
-
}) => /* @__PURE__ */
|
|
2533
|
+
}) => /* @__PURE__ */ jsx52(
|
|
2413
2534
|
"div",
|
|
2414
2535
|
{
|
|
2415
2536
|
className: cn28(
|
|
2416
2537
|
space ? paddingSpace2[space] : paddingSpaceX2[spaceX],
|
|
2417
2538
|
paddingSpaceY2[spaceY]
|
|
2418
|
-
)
|
|
2419
|
-
|
|
2420
|
-
|
|
2539
|
+
),
|
|
2540
|
+
children
|
|
2541
|
+
}
|
|
2421
2542
|
);
|
|
2422
2543
|
|
|
2423
2544
|
// src/Link/Link.tsx
|
|
@@ -2425,6 +2546,7 @@ import { forwardRef as forwardRef11 } from "react";
|
|
|
2425
2546
|
import { useLink } from "@react-aria/link";
|
|
2426
2547
|
import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
|
|
2427
2548
|
import { useClassNames as useClassNames26 } from "@marigold/system";
|
|
2549
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2428
2550
|
var Link = forwardRef11(
|
|
2429
2551
|
({
|
|
2430
2552
|
as = "a",
|
|
@@ -2453,16 +2575,16 @@ var Link = forwardRef11(
|
|
|
2453
2575
|
size,
|
|
2454
2576
|
className
|
|
2455
2577
|
});
|
|
2456
|
-
return /* @__PURE__ */
|
|
2578
|
+
return /* @__PURE__ */ jsx53(
|
|
2457
2579
|
Component,
|
|
2458
2580
|
{
|
|
2459
2581
|
...props,
|
|
2460
2582
|
role: "link",
|
|
2461
2583
|
className: classNames2,
|
|
2462
2584
|
ref: linkRef,
|
|
2463
|
-
...linkProps
|
|
2464
|
-
|
|
2465
|
-
|
|
2585
|
+
...linkProps,
|
|
2586
|
+
children
|
|
2587
|
+
}
|
|
2466
2588
|
);
|
|
2467
2589
|
}
|
|
2468
2590
|
);
|
|
@@ -2476,12 +2598,14 @@ var ListContext = createContext5({});
|
|
|
2476
2598
|
var useListContext = () => useContext5(ListContext);
|
|
2477
2599
|
|
|
2478
2600
|
// src/List/ListItem.tsx
|
|
2601
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2479
2602
|
var ListItem = ({ children, ...props }) => {
|
|
2480
2603
|
const { classNames: classNames2 } = useListContext();
|
|
2481
|
-
return /* @__PURE__ */
|
|
2604
|
+
return /* @__PURE__ */ jsx54("li", { ...props, className: classNames2, children });
|
|
2482
2605
|
};
|
|
2483
2606
|
|
|
2484
2607
|
// src/List/List.tsx
|
|
2608
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2485
2609
|
var List = ({
|
|
2486
2610
|
as = "ul",
|
|
2487
2611
|
children,
|
|
@@ -2491,7 +2615,7 @@ var List = ({
|
|
|
2491
2615
|
}) => {
|
|
2492
2616
|
const Component = as;
|
|
2493
2617
|
const classNames2 = useClassNames27({ component: "List", variant, size });
|
|
2494
|
-
return /* @__PURE__ */
|
|
2618
|
+
return /* @__PURE__ */ jsx55(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx55(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2495
2619
|
};
|
|
2496
2620
|
List.Item = ListItem;
|
|
2497
2621
|
|
|
@@ -2517,6 +2641,7 @@ import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
|
|
|
2517
2641
|
import { useMenuItem } from "@react-aria/menu";
|
|
2518
2642
|
import { mergeProps as mergeProps12 } from "@react-aria/utils";
|
|
2519
2643
|
import { useStateProps as useStateProps13 } from "@marigold/system";
|
|
2644
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2520
2645
|
var MenuItem = ({
|
|
2521
2646
|
item,
|
|
2522
2647
|
state,
|
|
@@ -2539,7 +2664,7 @@ var MenuItem = ({
|
|
|
2539
2664
|
focus: isFocusVisible
|
|
2540
2665
|
});
|
|
2541
2666
|
const { onPointerUp, ...props } = menuItemProps;
|
|
2542
|
-
return /* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ jsx56(
|
|
2543
2668
|
"li",
|
|
2544
2669
|
{
|
|
2545
2670
|
ref,
|
|
@@ -2549,31 +2674,38 @@ var MenuItem = ({
|
|
|
2549
2674
|
{ onPointerDown: onPointerUp },
|
|
2550
2675
|
stateProps,
|
|
2551
2676
|
focusProps
|
|
2552
|
-
)
|
|
2553
|
-
|
|
2554
|
-
|
|
2677
|
+
),
|
|
2678
|
+
children: item.props.children
|
|
2679
|
+
}
|
|
2555
2680
|
);
|
|
2556
2681
|
};
|
|
2557
2682
|
|
|
2558
2683
|
// src/Menu/MenuSection.tsx
|
|
2559
2684
|
import { useMenuSection } from "@react-aria/menu";
|
|
2560
2685
|
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
2686
|
+
import { Fragment as Fragment5, jsx as jsx57, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2561
2687
|
var MenuSection = ({ onAction, item, state }) => {
|
|
2562
2688
|
let { itemProps, headingProps, groupProps } = useMenuSection({
|
|
2563
2689
|
heading: item.rendered,
|
|
2564
2690
|
"aria-label": item["aria-label"]
|
|
2565
2691
|
});
|
|
2566
2692
|
const className = useClassNames28({ component: "Menu" });
|
|
2567
|
-
return /* @__PURE__ */
|
|
2568
|
-
|
|
2569
|
-
{
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2693
|
+
return /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
2694
|
+
item.key !== state.collection.getFirstKey() && /* @__PURE__ */ jsx57("li", { children: /* @__PURE__ */ jsx57(Divider, { variant: "section" }) }),
|
|
2695
|
+
/* @__PURE__ */ jsxs23("li", { ...itemProps, children: [
|
|
2696
|
+
item.rendered && /* @__PURE__ */ jsx57("span", { ...headingProps, className: className.section, children: item.rendered }),
|
|
2697
|
+
/* @__PURE__ */ jsx57("ul", { ...groupProps, className: "pb-1", children: [...item.props.children].map((node) => /* @__PURE__ */ jsx57(
|
|
2698
|
+
MenuItem,
|
|
2699
|
+
{
|
|
2700
|
+
item: node,
|
|
2701
|
+
state,
|
|
2702
|
+
onAction,
|
|
2703
|
+
className: className.item
|
|
2704
|
+
},
|
|
2705
|
+
node.key
|
|
2706
|
+
)) })
|
|
2707
|
+
] })
|
|
2708
|
+
] });
|
|
2577
2709
|
};
|
|
2578
2710
|
var MenuSection_default = MenuSection;
|
|
2579
2711
|
|
|
@@ -2584,6 +2716,7 @@ import { useMenuTrigger } from "@react-aria/menu";
|
|
|
2584
2716
|
import { useObjectRef as useObjectRef8 } from "@react-aria/utils";
|
|
2585
2717
|
import { useMenuTriggerState } from "@react-stately/menu";
|
|
2586
2718
|
import { useSmallScreen as useSmallScreen2 } from "@marigold/system";
|
|
2719
|
+
import { jsx as jsx58, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2587
2720
|
var MenuTrigger = ({
|
|
2588
2721
|
disabled,
|
|
2589
2722
|
open,
|
|
@@ -2610,18 +2743,22 @@ var MenuTrigger = ({
|
|
|
2610
2743
|
autoFocus: state.focusStrategy
|
|
2611
2744
|
};
|
|
2612
2745
|
const isSmallScreen = useSmallScreen2();
|
|
2613
|
-
return /* @__PURE__ */
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2746
|
+
return /* @__PURE__ */ jsxs24(MenuContext.Provider, { value: menuContext, children: [
|
|
2747
|
+
/* @__PURE__ */ jsx58(
|
|
2748
|
+
PressResponder2,
|
|
2749
|
+
{
|
|
2750
|
+
...menuTriggerProps,
|
|
2751
|
+
ref: menuTriggerRef,
|
|
2752
|
+
isPressed: state.isOpen,
|
|
2753
|
+
children: menuTrigger
|
|
2754
|
+
}
|
|
2755
|
+
),
|
|
2756
|
+
isSmallScreen ? /* @__PURE__ */ jsx58(Tray, { state, children: menu }) : /* @__PURE__ */ jsx58(Popover, { triggerRef: menuTriggerRef, scrollRef: menuRef, state, children: menu })
|
|
2757
|
+
] });
|
|
2622
2758
|
};
|
|
2623
2759
|
|
|
2624
2760
|
// src/Menu/Menu.tsx
|
|
2761
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2625
2762
|
var Menu = ({ variant, size, ...props }) => {
|
|
2626
2763
|
const { ref: scrollRef, ...menuContext } = useMenuContext();
|
|
2627
2764
|
const ownProps = { ...props, ...menuContext };
|
|
@@ -2630,29 +2767,29 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
2630
2767
|
const { menuProps } = useMenu(ownProps, state, ref);
|
|
2631
2768
|
useSyncRef({ ref: scrollRef }, ref);
|
|
2632
2769
|
const classNames2 = useClassNames29({ component: "Menu", variant, size });
|
|
2633
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ jsx59("ul", { ref, className: classNames2.container, ...menuProps, children: [...state.collection].map((item) => {
|
|
2634
2771
|
if (item.type === "section") {
|
|
2635
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx59(
|
|
2636
2773
|
MenuSection_default,
|
|
2637
2774
|
{
|
|
2638
|
-
key: item.key,
|
|
2639
2775
|
item,
|
|
2640
2776
|
state,
|
|
2641
2777
|
onAction: props.onAction
|
|
2642
|
-
}
|
|
2778
|
+
},
|
|
2779
|
+
item.key
|
|
2643
2780
|
);
|
|
2644
2781
|
}
|
|
2645
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ jsx59(
|
|
2646
2783
|
MenuItem,
|
|
2647
2784
|
{
|
|
2648
|
-
key: item.key,
|
|
2649
2785
|
item,
|
|
2650
2786
|
state,
|
|
2651
2787
|
onAction: props.onAction,
|
|
2652
2788
|
className: classNames2.item
|
|
2653
|
-
}
|
|
2789
|
+
},
|
|
2790
|
+
item.key
|
|
2654
2791
|
);
|
|
2655
|
-
}));
|
|
2792
|
+
}) });
|
|
2656
2793
|
};
|
|
2657
2794
|
Menu.Trigger = MenuTrigger;
|
|
2658
2795
|
Menu.Item = Item5;
|
|
@@ -2660,60 +2797,65 @@ Menu.Section = Section2;
|
|
|
2660
2797
|
|
|
2661
2798
|
// src/Menu/ActionMenu.tsx
|
|
2662
2799
|
import { SVG as SVG5 } from "@marigold/system";
|
|
2800
|
+
import { jsx as jsx60, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2663
2801
|
var ActionMenu = (props) => {
|
|
2664
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ jsxs25(Menu.Trigger, { children: [
|
|
2803
|
+
/* @__PURE__ */ jsx60(Button, { variant: "menu", size: "small", children: /* @__PURE__ */ jsx60(SVG5, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx60("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
2804
|
+
/* @__PURE__ */ jsx60(Menu, { ...props })
|
|
2805
|
+
] });
|
|
2665
2806
|
};
|
|
2666
2807
|
|
|
2667
2808
|
// src/Message/Message.tsx
|
|
2668
2809
|
import { cn as cn29, useClassNames as useClassNames30 } from "@marigold/system";
|
|
2810
|
+
import { jsx as jsx61, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2669
2811
|
var icons = {
|
|
2670
|
-
info: () => /* @__PURE__ */
|
|
2812
|
+
info: () => /* @__PURE__ */ jsx61(
|
|
2671
2813
|
"svg",
|
|
2672
2814
|
{
|
|
2673
2815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2674
2816
|
viewBox: "0 0 24 24",
|
|
2675
|
-
fill: "currentColor"
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2817
|
+
fill: "currentColor",
|
|
2818
|
+
children: /* @__PURE__ */ jsx61(
|
|
2819
|
+
"path",
|
|
2820
|
+
{
|
|
2821
|
+
fillRule: "evenodd",
|
|
2822
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
2823
|
+
clipRule: "evenodd"
|
|
2824
|
+
}
|
|
2825
|
+
)
|
|
2826
|
+
}
|
|
2685
2827
|
),
|
|
2686
|
-
warning: () => /* @__PURE__ */
|
|
2828
|
+
warning: () => /* @__PURE__ */ jsx61(
|
|
2687
2829
|
"svg",
|
|
2688
2830
|
{
|
|
2689
2831
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2690
2832
|
viewBox: "0 0 24 24",
|
|
2691
|
-
fill: "currentColor"
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2833
|
+
fill: "currentColor",
|
|
2834
|
+
children: /* @__PURE__ */ jsx61(
|
|
2835
|
+
"path",
|
|
2836
|
+
{
|
|
2837
|
+
fillRule: "evenodd",
|
|
2838
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
2839
|
+
clipRule: "evenodd"
|
|
2840
|
+
}
|
|
2841
|
+
)
|
|
2842
|
+
}
|
|
2701
2843
|
),
|
|
2702
|
-
error: () => /* @__PURE__ */
|
|
2844
|
+
error: () => /* @__PURE__ */ jsx61(
|
|
2703
2845
|
"svg",
|
|
2704
2846
|
{
|
|
2705
2847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2706
2848
|
viewBox: "0 0 24 24",
|
|
2707
|
-
fill: "currentColor"
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2849
|
+
fill: "currentColor",
|
|
2850
|
+
children: /* @__PURE__ */ jsx61(
|
|
2851
|
+
"path",
|
|
2852
|
+
{
|
|
2853
|
+
fillRule: "evenodd",
|
|
2854
|
+
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
2855
|
+
clipRule: "evenodd"
|
|
2856
|
+
}
|
|
2857
|
+
)
|
|
2858
|
+
}
|
|
2717
2859
|
)
|
|
2718
2860
|
};
|
|
2719
2861
|
var Message = ({
|
|
@@ -2725,24 +2867,26 @@ var Message = ({
|
|
|
2725
2867
|
}) => {
|
|
2726
2868
|
const classNames2 = useClassNames30({ component: "Message", variant, size });
|
|
2727
2869
|
const Icon3 = icons[variant];
|
|
2728
|
-
return /* @__PURE__ */
|
|
2870
|
+
return /* @__PURE__ */ jsxs26(
|
|
2729
2871
|
"div",
|
|
2730
2872
|
{
|
|
2731
2873
|
className: cn29(
|
|
2732
2874
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2733
2875
|
classNames2.container
|
|
2734
2876
|
),
|
|
2735
|
-
...props
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2877
|
+
...props,
|
|
2878
|
+
children: [
|
|
2879
|
+
/* @__PURE__ */ jsx61("div", { className: cn29("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx61(Icon3, {}) }),
|
|
2880
|
+
/* @__PURE__ */ jsx61(
|
|
2881
|
+
"div",
|
|
2882
|
+
{
|
|
2883
|
+
className: cn29("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2884
|
+
children: messageTitle
|
|
2885
|
+
}
|
|
2886
|
+
),
|
|
2887
|
+
/* @__PURE__ */ jsx61("div", { className: cn29("col-start-2", classNames2.content), children })
|
|
2888
|
+
]
|
|
2889
|
+
}
|
|
2746
2890
|
);
|
|
2747
2891
|
};
|
|
2748
2892
|
|
|
@@ -2762,22 +2906,23 @@ import { useButton as useButton7 } from "@react-aria/button";
|
|
|
2762
2906
|
import { useHover as useHover6 } from "@react-aria/interactions";
|
|
2763
2907
|
import { mergeProps as mergeProps13 } from "@react-aria/utils";
|
|
2764
2908
|
import { cn as cn30, useStateProps as useStateProps14 } from "@marigold/system";
|
|
2765
|
-
|
|
2909
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2910
|
+
var Plus = () => /* @__PURE__ */ jsx62("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx62(
|
|
2766
2911
|
"path",
|
|
2767
2912
|
{
|
|
2768
2913
|
fillRule: "evenodd",
|
|
2769
2914
|
clipRule: "evenodd",
|
|
2770
2915
|
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"
|
|
2771
2916
|
}
|
|
2772
|
-
));
|
|
2773
|
-
var Minus = () => /* @__PURE__ */
|
|
2917
|
+
) });
|
|
2918
|
+
var Minus = () => /* @__PURE__ */ jsx62("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx62(
|
|
2774
2919
|
"path",
|
|
2775
2920
|
{
|
|
2776
2921
|
fillRule: "evenodd",
|
|
2777
2922
|
clipRule: "evenodd",
|
|
2778
2923
|
d: "M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
|
2779
2924
|
}
|
|
2780
|
-
));
|
|
2925
|
+
) });
|
|
2781
2926
|
var StepButton = ({
|
|
2782
2927
|
direction,
|
|
2783
2928
|
className,
|
|
@@ -2795,7 +2940,7 @@ var StepButton = ({
|
|
|
2795
2940
|
disabled: props.isDisabled
|
|
2796
2941
|
});
|
|
2797
2942
|
const Icon3 = direction === "up" ? Plus : Minus;
|
|
2798
|
-
return /* @__PURE__ */
|
|
2943
|
+
return /* @__PURE__ */ jsx62(
|
|
2799
2944
|
"div",
|
|
2800
2945
|
{
|
|
2801
2946
|
className: cn30(
|
|
@@ -2806,13 +2951,14 @@ var StepButton = ({
|
|
|
2806
2951
|
className
|
|
2807
2952
|
),
|
|
2808
2953
|
...mergeProps13(buttonProps, hoverProps),
|
|
2809
|
-
...stateProps
|
|
2810
|
-
|
|
2811
|
-
|
|
2954
|
+
...stateProps,
|
|
2955
|
+
children: /* @__PURE__ */ jsx62(Icon3, {})
|
|
2956
|
+
}
|
|
2812
2957
|
);
|
|
2813
2958
|
};
|
|
2814
2959
|
|
|
2815
2960
|
// src/NumberField/NumberField.tsx
|
|
2961
|
+
import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2816
2962
|
var NumberField = forwardRef12(
|
|
2817
2963
|
({
|
|
2818
2964
|
variant,
|
|
@@ -2864,7 +3010,7 @@ var NumberField = forwardRef12(
|
|
|
2864
3010
|
size,
|
|
2865
3011
|
variant
|
|
2866
3012
|
});
|
|
2867
|
-
return /* @__PURE__ */
|
|
3013
|
+
return /* @__PURE__ */ jsx63(
|
|
2868
3014
|
FieldBase,
|
|
2869
3015
|
{
|
|
2870
3016
|
label: props.label,
|
|
@@ -2877,47 +3023,49 @@ var NumberField = forwardRef12(
|
|
|
2877
3023
|
stateProps,
|
|
2878
3024
|
variant,
|
|
2879
3025
|
size,
|
|
2880
|
-
width
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
"div",
|
|
2884
|
-
{
|
|
2885
|
-
"data-group": true,
|
|
2886
|
-
className: cn31("flex items-stretch", classNames2.group),
|
|
2887
|
-
"data-testid": "number-field-container",
|
|
2888
|
-
...mergeProps14(groupProps, focusProps, hoverProps),
|
|
2889
|
-
...stateProps
|
|
2890
|
-
},
|
|
2891
|
-
showStepper && /* @__PURE__ */ React.createElement(
|
|
2892
|
-
StepButton,
|
|
2893
|
-
{
|
|
2894
|
-
className: classNames2.stepper,
|
|
2895
|
-
direction: "down",
|
|
2896
|
-
...decrementButtonProps
|
|
2897
|
-
}
|
|
2898
|
-
),
|
|
2899
|
-
/* @__PURE__ */ React.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React.createElement(
|
|
2900
|
-
Input,
|
|
2901
|
-
{
|
|
2902
|
-
ref: inputRef,
|
|
2903
|
-
variant,
|
|
2904
|
-
size,
|
|
2905
|
-
className: {
|
|
2906
|
-
input: "min-w-0 items-stretch border-none"
|
|
2907
|
-
},
|
|
2908
|
-
...inputProps,
|
|
2909
|
-
...stateProps
|
|
2910
|
-
}
|
|
2911
|
-
)),
|
|
2912
|
-
showStepper && /* @__PURE__ */ React.createElement(
|
|
2913
|
-
StepButton,
|
|
3026
|
+
width,
|
|
3027
|
+
children: /* @__PURE__ */ jsxs27(
|
|
3028
|
+
"div",
|
|
2914
3029
|
{
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
3030
|
+
"data-group": true,
|
|
3031
|
+
className: cn31("flex items-stretch", classNames2.group),
|
|
3032
|
+
"data-testid": "number-field-container",
|
|
3033
|
+
...mergeProps14(groupProps, focusProps, hoverProps),
|
|
3034
|
+
...stateProps,
|
|
3035
|
+
children: [
|
|
3036
|
+
showStepper && /* @__PURE__ */ jsx63(
|
|
3037
|
+
StepButton,
|
|
3038
|
+
{
|
|
3039
|
+
className: classNames2.stepper,
|
|
3040
|
+
direction: "down",
|
|
3041
|
+
...decrementButtonProps
|
|
3042
|
+
}
|
|
3043
|
+
),
|
|
3044
|
+
/* @__PURE__ */ jsx63("div", { className: "flex-1", children: /* @__PURE__ */ jsx63(
|
|
3045
|
+
Input,
|
|
3046
|
+
{
|
|
3047
|
+
ref: inputRef,
|
|
3048
|
+
variant,
|
|
3049
|
+
size,
|
|
3050
|
+
className: {
|
|
3051
|
+
input: "min-w-0 items-stretch border-none"
|
|
3052
|
+
},
|
|
3053
|
+
...inputProps,
|
|
3054
|
+
...stateProps
|
|
3055
|
+
}
|
|
3056
|
+
) }),
|
|
3057
|
+
showStepper && /* @__PURE__ */ jsx63(
|
|
3058
|
+
StepButton,
|
|
3059
|
+
{
|
|
3060
|
+
className: classNames2.stepper,
|
|
3061
|
+
direction: "up",
|
|
3062
|
+
...incrementButtonProps
|
|
3063
|
+
}
|
|
3064
|
+
)
|
|
3065
|
+
]
|
|
2918
3066
|
}
|
|
2919
3067
|
)
|
|
2920
|
-
|
|
3068
|
+
}
|
|
2921
3069
|
);
|
|
2922
3070
|
}
|
|
2923
3071
|
);
|
|
@@ -2932,13 +3080,14 @@ import {
|
|
|
2932
3080
|
defaultTheme,
|
|
2933
3081
|
useTheme as useTheme3
|
|
2934
3082
|
} from "@marigold/system";
|
|
3083
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2935
3084
|
function MarigoldProvider({
|
|
2936
3085
|
children,
|
|
2937
3086
|
theme
|
|
2938
3087
|
}) {
|
|
2939
3088
|
const outerTheme = useTheme3();
|
|
2940
3089
|
const isTopLevel = outerTheme === defaultTheme;
|
|
2941
|
-
return /* @__PURE__ */
|
|
3090
|
+
return /* @__PURE__ */ jsx64(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx64(OverlayProvider, { children }) : children });
|
|
2942
3091
|
}
|
|
2943
3092
|
|
|
2944
3093
|
// src/Radio/Radio.tsx
|
|
@@ -2966,6 +3115,7 @@ var useRadioGroupContext = () => useContext7(RadioGroupContext);
|
|
|
2966
3115
|
import { useRadioGroup } from "@react-aria/radio";
|
|
2967
3116
|
import { useRadioGroupState } from "@react-stately/radio";
|
|
2968
3117
|
import { cn as cn32, useStateProps as useStateProps16 } from "@marigold/system";
|
|
3118
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2969
3119
|
var RadioGroup = ({
|
|
2970
3120
|
children,
|
|
2971
3121
|
orientation = "vertical",
|
|
@@ -2991,7 +3141,7 @@ var RadioGroup = ({
|
|
|
2991
3141
|
error,
|
|
2992
3142
|
required
|
|
2993
3143
|
});
|
|
2994
|
-
return /* @__PURE__ */
|
|
3144
|
+
return /* @__PURE__ */ jsx65(
|
|
2995
3145
|
FieldBase,
|
|
2996
3146
|
{
|
|
2997
3147
|
width,
|
|
@@ -3004,26 +3154,27 @@ var RadioGroup = ({
|
|
|
3004
3154
|
errorMessageProps,
|
|
3005
3155
|
disabled,
|
|
3006
3156
|
stateProps,
|
|
3007
|
-
...radioGroupProps
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3157
|
+
...radioGroupProps,
|
|
3158
|
+
children: /* @__PURE__ */ jsx65(
|
|
3159
|
+
"div",
|
|
3160
|
+
{
|
|
3161
|
+
role: "presentation",
|
|
3162
|
+
"data-orientation": orientation,
|
|
3163
|
+
className: cn32(
|
|
3164
|
+
"flex items-start",
|
|
3165
|
+
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
3166
|
+
),
|
|
3167
|
+
children: /* @__PURE__ */ jsx65(RadioGroupContext.Provider, { value: { width, error, state }, children })
|
|
3168
|
+
}
|
|
3169
|
+
)
|
|
3170
|
+
}
|
|
3021
3171
|
);
|
|
3022
3172
|
};
|
|
3023
3173
|
|
|
3024
3174
|
// src/Radio/Radio.tsx
|
|
3025
|
-
|
|
3026
|
-
var
|
|
3175
|
+
import { jsx as jsx66, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3176
|
+
var Dot = () => /* @__PURE__ */ jsx66("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx66("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
3177
|
+
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx66(
|
|
3027
3178
|
"div",
|
|
3028
3179
|
{
|
|
3029
3180
|
className: cn33(
|
|
@@ -3031,9 +3182,9 @@ var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ React.createEl
|
|
|
3031
3182
|
className
|
|
3032
3183
|
),
|
|
3033
3184
|
"aria-hidden": "true",
|
|
3034
|
-
...props
|
|
3035
|
-
|
|
3036
|
-
|
|
3185
|
+
...props,
|
|
3186
|
+
children: checked ? /* @__PURE__ */ jsx66(Dot, {}) : null
|
|
3187
|
+
}
|
|
3037
3188
|
);
|
|
3038
3189
|
var Radio = forwardRef13(
|
|
3039
3190
|
({ width, disabled, ...props }, ref) => {
|
|
@@ -3065,7 +3216,7 @@ var Radio = forwardRef13(
|
|
|
3065
3216
|
readOnly: props.readOnly,
|
|
3066
3217
|
error
|
|
3067
3218
|
});
|
|
3068
|
-
return /* @__PURE__ */
|
|
3219
|
+
return /* @__PURE__ */ jsxs28(
|
|
3069
3220
|
"label",
|
|
3070
3221
|
{
|
|
3071
3222
|
className: cn33(
|
|
@@ -3074,21 +3225,23 @@ var Radio = forwardRef13(
|
|
|
3074
3225
|
width || groupWidth || "w-full",
|
|
3075
3226
|
classNames2.container
|
|
3076
3227
|
),
|
|
3077
|
-
...mergeProps15(hoverProps, stateProps)
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3228
|
+
...mergeProps15(hoverProps, stateProps),
|
|
3229
|
+
children: [
|
|
3230
|
+
/* @__PURE__ */ jsx66(
|
|
3231
|
+
"input",
|
|
3232
|
+
{
|
|
3233
|
+
ref: inputRef,
|
|
3234
|
+
className: cn33(
|
|
3235
|
+
"absolute left-0 top-0 z-[1] h-full w-full opacity-[0.0001]",
|
|
3236
|
+
inputProps.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
3237
|
+
),
|
|
3238
|
+
...mergeProps15(inputProps, focusProps)
|
|
3239
|
+
}
|
|
3086
3240
|
),
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
/* @__PURE__ */ React.createElement("div", { className: classNames2.label }, props.children)
|
|
3241
|
+
/* @__PURE__ */ jsx66(Icon2, { checked: inputProps.checked, className: classNames2.radio }),
|
|
3242
|
+
/* @__PURE__ */ jsx66("div", { className: classNames2.label, children: props.children })
|
|
3243
|
+
]
|
|
3244
|
+
}
|
|
3092
3245
|
);
|
|
3093
3246
|
}
|
|
3094
3247
|
);
|
|
@@ -3113,6 +3266,7 @@ import { cn as cn34, useStateProps as useStateProps18 } from "@marigold/system";
|
|
|
3113
3266
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
3114
3267
|
|
|
3115
3268
|
// src/Slider/Thumb.tsx
|
|
3269
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
3116
3270
|
var Thumb = ({ state, trackRef, className, ...props }) => {
|
|
3117
3271
|
const { disabled } = props;
|
|
3118
3272
|
const inputRef = useRef20(null);
|
|
@@ -3134,17 +3288,18 @@ var Thumb = ({ state, trackRef, className, ...props }) => {
|
|
|
3134
3288
|
useEffect2(() => {
|
|
3135
3289
|
state.setThumbEditable(0, !disabled);
|
|
3136
3290
|
}, [disabled, state]);
|
|
3137
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsx67("div", { className: cn34("top-1/2", className), ...thumbProps, ...stateProps, children: /* @__PURE__ */ jsx67(VisuallyHidden, { children: /* @__PURE__ */ jsx67(
|
|
3138
3292
|
"input",
|
|
3139
3293
|
{
|
|
3140
3294
|
type: "range",
|
|
3141
3295
|
ref: inputRef,
|
|
3142
3296
|
...mergeProps16(inputProps, focusProps)
|
|
3143
3297
|
}
|
|
3144
|
-
)));
|
|
3298
|
+
) }) });
|
|
3145
3299
|
};
|
|
3146
3300
|
|
|
3147
3301
|
// src/Slider/Slider.tsx
|
|
3302
|
+
import { jsx as jsx68, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3148
3303
|
var Slider = forwardRef14(
|
|
3149
3304
|
({ variant, size, width = "100%", ...props }, ref) => {
|
|
3150
3305
|
const { formatOptions } = props;
|
|
@@ -3167,57 +3322,65 @@ var Slider = forwardRef14(
|
|
|
3167
3322
|
const sliderState = useStateProps19({
|
|
3168
3323
|
disabled: props.disabled
|
|
3169
3324
|
});
|
|
3170
|
-
return /* @__PURE__ */
|
|
3325
|
+
return /* @__PURE__ */ jsxs29(
|
|
3171
3326
|
"div",
|
|
3172
3327
|
{
|
|
3173
3328
|
className: "flex w-[var(--slideWidth)] touch-none flex-col",
|
|
3174
3329
|
style: createVar10({ slideWidth: width }),
|
|
3175
|
-
...groupProps
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
"div",
|
|
3190
|
-
{
|
|
3191
|
-
className: "h-8 w-full cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
3192
|
-
...trackProps,
|
|
3193
|
-
...sliderState,
|
|
3194
|
-
ref: trackRef
|
|
3195
|
-
},
|
|
3196
|
-
/* @__PURE__ */ React.createElement(
|
|
3197
|
-
"div",
|
|
3198
|
-
{
|
|
3199
|
-
className: cn35(
|
|
3200
|
-
"absolute top-2/4 h-2 w-full -translate-y-1/2",
|
|
3201
|
-
classNames2.track
|
|
3330
|
+
...groupProps,
|
|
3331
|
+
children: [
|
|
3332
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex self-stretch", children: [
|
|
3333
|
+
props.children && /* @__PURE__ */ jsx68("label", { className: classNames2.label, ...labelProps, children: props.children }),
|
|
3334
|
+
/* @__PURE__ */ jsx68(
|
|
3335
|
+
"output",
|
|
3336
|
+
{
|
|
3337
|
+
className: cn35(
|
|
3338
|
+
"flex flex-shrink-0 flex-grow basis-auto",
|
|
3339
|
+
classNames2.output
|
|
3340
|
+
),
|
|
3341
|
+
...outputProps,
|
|
3342
|
+
children: state.getThumbValueLabel(0)
|
|
3343
|
+
}
|
|
3202
3344
|
)
|
|
3203
|
-
}
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3345
|
+
] }),
|
|
3346
|
+
/* @__PURE__ */ jsxs29(
|
|
3347
|
+
"div",
|
|
3348
|
+
{
|
|
3349
|
+
className: "h-8 w-full cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
3350
|
+
...trackProps,
|
|
3351
|
+
...sliderState,
|
|
3352
|
+
ref: trackRef,
|
|
3353
|
+
children: [
|
|
3354
|
+
/* @__PURE__ */ jsx68(
|
|
3355
|
+
"div",
|
|
3356
|
+
{
|
|
3357
|
+
className: cn35(
|
|
3358
|
+
"absolute top-2/4 h-2 w-full -translate-y-1/2",
|
|
3359
|
+
classNames2.track
|
|
3360
|
+
)
|
|
3361
|
+
}
|
|
3362
|
+
),
|
|
3363
|
+
/* @__PURE__ */ jsx68(
|
|
3364
|
+
Thumb,
|
|
3365
|
+
{
|
|
3366
|
+
state,
|
|
3367
|
+
trackRef,
|
|
3368
|
+
disabled: props.disabled,
|
|
3369
|
+
className: classNames2.thumb
|
|
3370
|
+
}
|
|
3371
|
+
)
|
|
3372
|
+
]
|
|
3373
|
+
}
|
|
3374
|
+
)
|
|
3375
|
+
]
|
|
3376
|
+
}
|
|
3215
3377
|
);
|
|
3216
3378
|
}
|
|
3217
3379
|
);
|
|
3218
3380
|
|
|
3219
3381
|
// src/Split/Split.tsx
|
|
3220
|
-
|
|
3382
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
3383
|
+
var Split = (props) => /* @__PURE__ */ jsx69("div", { ...props, role: "separator", className: "grow" });
|
|
3221
3384
|
|
|
3222
3385
|
// src/Stack/Stack.tsx
|
|
3223
3386
|
import {
|
|
@@ -3225,6 +3388,7 @@ import {
|
|
|
3225
3388
|
cn as cn36,
|
|
3226
3389
|
gapSpace as gapSpace6
|
|
3227
3390
|
} from "@marigold/system";
|
|
3391
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
3228
3392
|
var Stack = ({
|
|
3229
3393
|
children,
|
|
3230
3394
|
space = 0,
|
|
@@ -3235,7 +3399,7 @@ var Stack = ({
|
|
|
3235
3399
|
...props
|
|
3236
3400
|
}) => {
|
|
3237
3401
|
var _a, _b, _c, _d;
|
|
3238
|
-
return /* @__PURE__ */
|
|
3402
|
+
return /* @__PURE__ */ jsx70(
|
|
3239
3403
|
"div",
|
|
3240
3404
|
{
|
|
3241
3405
|
className: cn36(
|
|
@@ -3245,9 +3409,9 @@ var Stack = ({
|
|
|
3245
3409
|
alignY && ((_d = (_c = alignment3) == null ? void 0 : _c.vertical) == null ? void 0 : _d.alignmentY[alignY]),
|
|
3246
3410
|
stretch && "h-full w-full"
|
|
3247
3411
|
),
|
|
3248
|
-
...props
|
|
3249
|
-
|
|
3250
|
-
|
|
3412
|
+
...props,
|
|
3413
|
+
children
|
|
3414
|
+
}
|
|
3251
3415
|
);
|
|
3252
3416
|
};
|
|
3253
3417
|
|
|
@@ -3258,6 +3422,7 @@ import { useSwitch } from "@react-aria/switch";
|
|
|
3258
3422
|
import { useObjectRef as useObjectRef12 } from "@react-aria/utils";
|
|
3259
3423
|
import { useToggleState as useToggleState2 } from "@react-stately/toggle";
|
|
3260
3424
|
import { cn as cn37, createVar as createVar11, useClassNames as useClassNames34, useStateProps as useStateProps20 } from "@marigold/system";
|
|
3425
|
+
import { Fragment as Fragment6, jsx as jsx71, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3261
3426
|
var Switch = forwardRef15(
|
|
3262
3427
|
({
|
|
3263
3428
|
variant,
|
|
@@ -3287,7 +3452,7 @@ var Switch = forwardRef15(
|
|
|
3287
3452
|
focus: isFocusVisible
|
|
3288
3453
|
});
|
|
3289
3454
|
const classNames2 = useClassNames34({ component: "Switch", size, variant });
|
|
3290
|
-
return /* @__PURE__ */
|
|
3455
|
+
return /* @__PURE__ */ jsxs30(
|
|
3291
3456
|
"label",
|
|
3292
3457
|
{
|
|
3293
3458
|
className: cn37(
|
|
@@ -3296,40 +3461,42 @@ var Switch = forwardRef15(
|
|
|
3296
3461
|
"relative flex items-center justify-between gap-[1ch]"
|
|
3297
3462
|
),
|
|
3298
3463
|
style: createVar11({ switchWidth: width }),
|
|
3299
|
-
...stateProps
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3464
|
+
...stateProps,
|
|
3465
|
+
children: [
|
|
3466
|
+
/* @__PURE__ */ jsx71(
|
|
3467
|
+
"input",
|
|
3468
|
+
{
|
|
3469
|
+
ref: inputRef,
|
|
3470
|
+
className: "absolute left-0 top-0 z-[1] h-full w-full cursor-pointer opacity-[0.0001] disabled:cursor-not-allowed",
|
|
3471
|
+
...inputProps,
|
|
3472
|
+
...focusProps
|
|
3473
|
+
}
|
|
3474
|
+
),
|
|
3475
|
+
props.children && /* @__PURE__ */ jsx71(Fragment6, { children: props.children }),
|
|
3476
|
+
/* @__PURE__ */ jsx71(
|
|
3477
|
+
"div",
|
|
3478
|
+
{
|
|
3479
|
+
className: cn37(
|
|
3480
|
+
"relative h-6 flex-shrink-0 flex-grow-0 basis-12 rounded-3xl",
|
|
3481
|
+
classNames2.track
|
|
3482
|
+
),
|
|
3483
|
+
children: /* @__PURE__ */ jsx71(
|
|
3484
|
+
"div",
|
|
3485
|
+
{
|
|
3486
|
+
className: cn37(
|
|
3487
|
+
"h-[22px] w-[22px]",
|
|
3488
|
+
"cubic-bezier(.7,0,.3,1)",
|
|
3489
|
+
"absolute left-0 top-px",
|
|
3490
|
+
"block translate-x-[1px] rounded-full transition-all duration-100 ease-in-out will-change-transform",
|
|
3491
|
+
"group-selected/switch:translate-x-[calc(47px_-_100%)]",
|
|
3492
|
+
classNames2.thumb
|
|
3493
|
+
)
|
|
3494
|
+
}
|
|
3495
|
+
)
|
|
3496
|
+
}
|
|
3317
3497
|
)
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
"div",
|
|
3321
|
-
{
|
|
3322
|
-
className: cn37(
|
|
3323
|
-
"h-[22px] w-[22px]",
|
|
3324
|
-
"cubic-bezier(.7,0,.3,1)",
|
|
3325
|
-
"absolute left-0 top-px",
|
|
3326
|
-
"block translate-x-[1px] rounded-full transition-all duration-100 ease-in-out will-change-transform",
|
|
3327
|
-
"group-selected/switch:translate-x-[calc(47px_-_100%)]",
|
|
3328
|
-
classNames2.thumb
|
|
3329
|
-
)
|
|
3330
|
-
}
|
|
3331
|
-
)
|
|
3332
|
-
)
|
|
3498
|
+
]
|
|
3499
|
+
}
|
|
3333
3500
|
);
|
|
3334
3501
|
}
|
|
3335
3502
|
);
|
|
@@ -3354,9 +3521,10 @@ var useTableContext = () => useContext8(TableContext);
|
|
|
3354
3521
|
|
|
3355
3522
|
// src/Table/TableBody.tsx
|
|
3356
3523
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3524
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3357
3525
|
var TableBody = ({ children }) => {
|
|
3358
3526
|
const { rowGroupProps } = useTableRowGroup();
|
|
3359
|
-
return /* @__PURE__ */
|
|
3527
|
+
return /* @__PURE__ */ jsx72("tbody", { ...rowGroupProps, children });
|
|
3360
3528
|
};
|
|
3361
3529
|
|
|
3362
3530
|
// src/Table/TableCell.tsx
|
|
@@ -3365,6 +3533,7 @@ import { useFocusRing as useFocusRing13 } from "@react-aria/focus";
|
|
|
3365
3533
|
import { useTableCell } from "@react-aria/table";
|
|
3366
3534
|
import { mergeProps as mergeProps17 } from "@react-aria/utils";
|
|
3367
3535
|
import { useStateProps as useStateProps21 } from "@marigold/system";
|
|
3536
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3368
3537
|
var TableCell = ({ cell }) => {
|
|
3369
3538
|
const ref = useRef21(null);
|
|
3370
3539
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
@@ -3387,15 +3556,15 @@ var TableCell = ({ cell }) => {
|
|
|
3387
3556
|
};
|
|
3388
3557
|
const { focusProps, isFocusVisible } = useFocusRing13();
|
|
3389
3558
|
const stateProps = useStateProps21({ disabled, focusVisible: isFocusVisible });
|
|
3390
|
-
return /* @__PURE__ */
|
|
3559
|
+
return /* @__PURE__ */ jsx73(
|
|
3391
3560
|
"td",
|
|
3392
3561
|
{
|
|
3393
3562
|
ref,
|
|
3394
3563
|
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
3395
3564
|
...mergeProps17(cellProps, focusProps),
|
|
3396
|
-
...stateProps
|
|
3397
|
-
|
|
3398
|
-
|
|
3565
|
+
...stateProps,
|
|
3566
|
+
children: cell.rendered
|
|
3567
|
+
}
|
|
3399
3568
|
);
|
|
3400
3569
|
};
|
|
3401
3570
|
|
|
@@ -3427,6 +3596,7 @@ var mapCheckboxProps = ({
|
|
|
3427
3596
|
};
|
|
3428
3597
|
|
|
3429
3598
|
// src/Table/TableCheckboxCell.tsx
|
|
3599
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
3430
3600
|
var TableCheckboxCell = ({ cell }) => {
|
|
3431
3601
|
const ref = useRef22(null);
|
|
3432
3602
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -3443,15 +3613,15 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3443
3613
|
);
|
|
3444
3614
|
const { focusProps, isFocusVisible } = useFocusRing14();
|
|
3445
3615
|
const stateProps = useStateProps22({ disabled, focusVisible: isFocusVisible });
|
|
3446
|
-
return /* @__PURE__ */
|
|
3616
|
+
return /* @__PURE__ */ jsx74(
|
|
3447
3617
|
"td",
|
|
3448
3618
|
{
|
|
3449
3619
|
ref,
|
|
3450
3620
|
className: cn38("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3451
3621
|
...mergeProps18(gridCellProps, focusProps),
|
|
3452
|
-
...stateProps
|
|
3453
|
-
|
|
3454
|
-
|
|
3622
|
+
...stateProps,
|
|
3623
|
+
children: /* @__PURE__ */ jsx74(Checkbox, { ...checkboxProps })
|
|
3624
|
+
}
|
|
3455
3625
|
);
|
|
3456
3626
|
};
|
|
3457
3627
|
|
|
@@ -3464,6 +3634,7 @@ import { mergeProps as mergeProps19 } from "@react-aria/utils";
|
|
|
3464
3634
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
3465
3635
|
import { cn as cn39, useStateProps as useStateProps23 } from "@marigold/system";
|
|
3466
3636
|
import { width as twWidth2 } from "@marigold/system";
|
|
3637
|
+
import { jsx as jsx75, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3467
3638
|
var TableColumnHeader = ({
|
|
3468
3639
|
column,
|
|
3469
3640
|
width = "auto"
|
|
@@ -3484,35 +3655,39 @@ var TableColumnHeader = ({
|
|
|
3484
3655
|
hover: isHovered,
|
|
3485
3656
|
focusVisible: isFocusVisible
|
|
3486
3657
|
});
|
|
3487
|
-
return /* @__PURE__ */
|
|
3658
|
+
return /* @__PURE__ */ jsxs31(
|
|
3488
3659
|
"th",
|
|
3489
3660
|
{
|
|
3490
3661
|
colSpan: column.colspan,
|
|
3491
3662
|
ref,
|
|
3492
3663
|
className: cn39("cursor-default", twWidth2[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3493
3664
|
...mergeProps19(columnHeaderProps, hoverProps, focusProps),
|
|
3494
|
-
...stateProps
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3665
|
+
...stateProps,
|
|
3666
|
+
children: [
|
|
3667
|
+
column.rendered,
|
|
3668
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx75(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx75(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx75(SortDown, { className: "inline-block" }))
|
|
3669
|
+
]
|
|
3670
|
+
}
|
|
3498
3671
|
);
|
|
3499
3672
|
};
|
|
3500
3673
|
|
|
3501
3674
|
// src/Table/TableHeader.tsx
|
|
3502
3675
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
3676
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
3503
3677
|
var TableHeader = ({ children }) => {
|
|
3504
3678
|
const { rowGroupProps } = useTableRowGroup2();
|
|
3505
|
-
return /* @__PURE__ */
|
|
3679
|
+
return /* @__PURE__ */ jsx76("thead", { ...rowGroupProps, children });
|
|
3506
3680
|
};
|
|
3507
3681
|
|
|
3508
3682
|
// src/Table/TableHeaderRow.tsx
|
|
3509
3683
|
import { useRef as useRef24 } from "react";
|
|
3510
3684
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3685
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3511
3686
|
var TableHeaderRow = ({ item, children }) => {
|
|
3512
3687
|
const { state } = useTableContext();
|
|
3513
3688
|
const ref = useRef24(null);
|
|
3514
3689
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3515
|
-
return /* @__PURE__ */
|
|
3690
|
+
return /* @__PURE__ */ jsx77("tr", { ...rowProps, ref, children });
|
|
3516
3691
|
};
|
|
3517
3692
|
|
|
3518
3693
|
// src/Table/TableRow.tsx
|
|
@@ -3522,6 +3697,7 @@ import { useHover as useHover10 } from "@react-aria/interactions";
|
|
|
3522
3697
|
import { useTableRow } from "@react-aria/table";
|
|
3523
3698
|
import { mergeProps as mergeProps20 } from "@react-aria/utils";
|
|
3524
3699
|
import { cn as cn40, useClassNames as useClassNames35, useStateProps as useStateProps24 } from "@marigold/system";
|
|
3700
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
3525
3701
|
var TableRow = ({ children, row }) => {
|
|
3526
3702
|
const ref = useRef25(null);
|
|
3527
3703
|
const { interactive, state, ...ctx } = useTableContext();
|
|
@@ -3551,7 +3727,7 @@ var TableRow = ({ children, row }) => {
|
|
|
3551
3727
|
focusVisible: isFocusVisible,
|
|
3552
3728
|
active: isPressed
|
|
3553
3729
|
});
|
|
3554
|
-
return /* @__PURE__ */
|
|
3730
|
+
return /* @__PURE__ */ jsx78(
|
|
3555
3731
|
"tr",
|
|
3556
3732
|
{
|
|
3557
3733
|
ref,
|
|
@@ -3562,9 +3738,9 @@ var TableRow = ({ children, row }) => {
|
|
|
3562
3738
|
classNames2 == null ? void 0 : classNames2.row
|
|
3563
3739
|
),
|
|
3564
3740
|
...mergeProps20(rowProps, focusProps, hoverProps),
|
|
3565
|
-
...stateProps
|
|
3566
|
-
|
|
3567
|
-
|
|
3741
|
+
...stateProps,
|
|
3742
|
+
children
|
|
3743
|
+
}
|
|
3568
3744
|
);
|
|
3569
3745
|
};
|
|
3570
3746
|
|
|
@@ -3582,6 +3758,7 @@ import {
|
|
|
3582
3758
|
width as twWidth3,
|
|
3583
3759
|
useStateProps as useStateProps25
|
|
3584
3760
|
} from "@marigold/system";
|
|
3761
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
3585
3762
|
var TableSelectAllCell = ({
|
|
3586
3763
|
column,
|
|
3587
3764
|
width = "auto"
|
|
@@ -3602,7 +3779,7 @@ var TableSelectAllCell = ({
|
|
|
3602
3779
|
hover: isHovered,
|
|
3603
3780
|
focusVisible: isFocusVisible
|
|
3604
3781
|
});
|
|
3605
|
-
return /* @__PURE__ */
|
|
3782
|
+
return /* @__PURE__ */ jsx79(
|
|
3606
3783
|
"th",
|
|
3607
3784
|
{
|
|
3608
3785
|
ref,
|
|
@@ -3612,13 +3789,14 @@ var TableSelectAllCell = ({
|
|
|
3612
3789
|
classNames2 == null ? void 0 : classNames2.header
|
|
3613
3790
|
),
|
|
3614
3791
|
...mergeProps21(columnHeaderProps, hoverProps, focusProps),
|
|
3615
|
-
...stateProps
|
|
3616
|
-
|
|
3617
|
-
|
|
3792
|
+
...stateProps,
|
|
3793
|
+
children: /* @__PURE__ */ jsx79(Checkbox, { ...checkboxProps })
|
|
3794
|
+
}
|
|
3618
3795
|
);
|
|
3619
3796
|
};
|
|
3620
3797
|
|
|
3621
3798
|
// src/Table/Table.tsx
|
|
3799
|
+
import { jsx as jsx80, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3622
3800
|
var Table = ({
|
|
3623
3801
|
variant,
|
|
3624
3802
|
size,
|
|
@@ -3641,52 +3819,56 @@ var Table = ({
|
|
|
3641
3819
|
size
|
|
3642
3820
|
});
|
|
3643
3821
|
const { collection } = state;
|
|
3644
|
-
return /* @__PURE__ */
|
|
3822
|
+
return /* @__PURE__ */ jsx80(
|
|
3645
3823
|
TableContext.Provider,
|
|
3646
3824
|
{
|
|
3647
|
-
value: { state, interactive, classNames: classNames2, variant, size }
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3825
|
+
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3826
|
+
children: /* @__PURE__ */ jsxs32(
|
|
3827
|
+
"table",
|
|
3828
|
+
{
|
|
3829
|
+
ref: tableRef,
|
|
3830
|
+
className: cn42(
|
|
3831
|
+
"group/table",
|
|
3832
|
+
"border-collapse overflow-auto whitespace-nowrap",
|
|
3833
|
+
stretch ? "table w-full" : "block",
|
|
3834
|
+
classNames2.table
|
|
3835
|
+
),
|
|
3836
|
+
...gridProps,
|
|
3837
|
+
children: [
|
|
3838
|
+
/* @__PURE__ */ jsx80(TableHeader, { children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx80(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3839
|
+
(column) => {
|
|
3840
|
+
var _a, _b, _c;
|
|
3841
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx80(
|
|
3842
|
+
TableSelectAllCell,
|
|
3843
|
+
{
|
|
3844
|
+
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3845
|
+
column
|
|
3846
|
+
},
|
|
3847
|
+
column.key
|
|
3848
|
+
) : /* @__PURE__ */ jsx80(
|
|
3849
|
+
TableColumnHeader,
|
|
3850
|
+
{
|
|
3851
|
+
width: (_c = column.props) == null ? void 0 : _c.width,
|
|
3852
|
+
column
|
|
3853
|
+
},
|
|
3854
|
+
column.key
|
|
3855
|
+
);
|
|
3856
|
+
}
|
|
3857
|
+
) }, headerRow.key)) }),
|
|
3858
|
+
/* @__PURE__ */ jsxs32(TableBody, { children: [
|
|
3859
|
+
...collection.rows.map(
|
|
3860
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx80(TableRow, { row, children: [...collection.getChildren(row.key)].map(
|
|
3861
|
+
(cell) => {
|
|
3862
|
+
var _a;
|
|
3863
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx80(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx80(TableCell, { cell }, cell.key);
|
|
3864
|
+
}
|
|
3865
|
+
) }, row.key)
|
|
3866
|
+
)
|
|
3867
|
+
] })
|
|
3868
|
+
]
|
|
3679
3869
|
}
|
|
3680
|
-
)
|
|
3681
|
-
|
|
3682
|
-
(row) => row.type === "item" && /* @__PURE__ */ React.createElement(TableRow, { key: row.key, row }, [...collection.getChildren(row.key)].map(
|
|
3683
|
-
(cell) => {
|
|
3684
|
-
var _a;
|
|
3685
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React.createElement(TableCheckboxCell, { key: cell.key, cell }) : /* @__PURE__ */ React.createElement(TableCell, { key: cell.key, cell });
|
|
3686
|
-
}
|
|
3687
|
-
))
|
|
3688
|
-
))
|
|
3689
|
-
)
|
|
3870
|
+
)
|
|
3871
|
+
}
|
|
3690
3872
|
);
|
|
3691
3873
|
};
|
|
3692
3874
|
Table.Body = Body2;
|
|
@@ -3708,6 +3890,7 @@ import {
|
|
|
3708
3890
|
useClassNames as useClassNames37,
|
|
3709
3891
|
useTheme as useTheme5
|
|
3710
3892
|
} from "@marigold/system";
|
|
3893
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3711
3894
|
var Text = ({
|
|
3712
3895
|
variant,
|
|
3713
3896
|
size,
|
|
@@ -3726,7 +3909,7 @@ var Text = ({
|
|
|
3726
3909
|
variant,
|
|
3727
3910
|
size
|
|
3728
3911
|
});
|
|
3729
|
-
return /* @__PURE__ */
|
|
3912
|
+
return /* @__PURE__ */ jsx81(
|
|
3730
3913
|
"p",
|
|
3731
3914
|
{
|
|
3732
3915
|
...props,
|
|
@@ -3746,9 +3929,9 @@ var Text = ({
|
|
|
3746
3929
|
color
|
|
3747
3930
|
/* fallback */
|
|
3748
3931
|
)
|
|
3749
|
-
})
|
|
3750
|
-
|
|
3751
|
-
|
|
3932
|
+
}),
|
|
3933
|
+
children
|
|
3934
|
+
}
|
|
3752
3935
|
);
|
|
3753
3936
|
};
|
|
3754
3937
|
|
|
@@ -3759,6 +3942,7 @@ import { useHover as useHover12 } from "@react-aria/interactions";
|
|
|
3759
3942
|
import { useTextField } from "@react-aria/textfield";
|
|
3760
3943
|
import { useObjectRef as useObjectRef13 } from "@react-aria/utils";
|
|
3761
3944
|
import { useClassNames as useClassNames38, useStateProps as useStateProps26 } from "@marigold/system";
|
|
3945
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3762
3946
|
var TextArea = forwardRef16(
|
|
3763
3947
|
({
|
|
3764
3948
|
variant,
|
|
@@ -3795,7 +3979,7 @@ var TextArea = forwardRef16(
|
|
|
3795
3979
|
error
|
|
3796
3980
|
});
|
|
3797
3981
|
const classNames2 = useClassNames38({ component: "TextArea", variant, size });
|
|
3798
|
-
return /* @__PURE__ */
|
|
3982
|
+
return /* @__PURE__ */ jsx82(
|
|
3799
3983
|
FieldBase,
|
|
3800
3984
|
{
|
|
3801
3985
|
label,
|
|
@@ -3808,19 +3992,19 @@ var TextArea = forwardRef16(
|
|
|
3808
3992
|
stateProps,
|
|
3809
3993
|
variant,
|
|
3810
3994
|
size,
|
|
3811
|
-
width
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3995
|
+
width,
|
|
3996
|
+
children: /* @__PURE__ */ jsx82(
|
|
3997
|
+
"textarea",
|
|
3998
|
+
{
|
|
3999
|
+
className: classNames2,
|
|
4000
|
+
ref: textAreaRef,
|
|
4001
|
+
rows,
|
|
4002
|
+
...inputProps,
|
|
4003
|
+
...focusProps,
|
|
4004
|
+
...hoverProps
|
|
4005
|
+
}
|
|
4006
|
+
)
|
|
4007
|
+
}
|
|
3824
4008
|
);
|
|
3825
4009
|
}
|
|
3826
4010
|
);
|
|
@@ -3832,6 +4016,7 @@ import { useHover as useHover13 } from "@react-aria/interactions";
|
|
|
3832
4016
|
import { useTextField as useTextField2 } from "@react-aria/textfield";
|
|
3833
4017
|
import { mergeProps as mergeProps22, useObjectRef as useObjectRef14 } from "@react-aria/utils";
|
|
3834
4018
|
import { useStateProps as useStateProps27 } from "@marigold/system";
|
|
4019
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
3835
4020
|
var TextField = forwardRef17(
|
|
3836
4021
|
({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
|
|
3837
4022
|
const { label, description, errorMessage, autoFocus } = props;
|
|
@@ -3859,7 +4044,7 @@ var TextField = forwardRef17(
|
|
|
3859
4044
|
readOnly,
|
|
3860
4045
|
required
|
|
3861
4046
|
});
|
|
3862
|
-
return /* @__PURE__ */
|
|
4047
|
+
return /* @__PURE__ */ jsx83(
|
|
3863
4048
|
FieldBase,
|
|
3864
4049
|
{
|
|
3865
4050
|
label,
|
|
@@ -3872,23 +4057,24 @@ var TextField = forwardRef17(
|
|
|
3872
4057
|
stateProps,
|
|
3873
4058
|
variant,
|
|
3874
4059
|
size,
|
|
3875
|
-
width
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
4060
|
+
width,
|
|
4061
|
+
children: /* @__PURE__ */ jsx83(
|
|
4062
|
+
Input,
|
|
4063
|
+
{
|
|
4064
|
+
ref: inputRef,
|
|
4065
|
+
variant,
|
|
4066
|
+
size,
|
|
4067
|
+
...mergeProps22(focusProps, inputProps, hoverProps)
|
|
4068
|
+
}
|
|
4069
|
+
)
|
|
4070
|
+
}
|
|
3886
4071
|
);
|
|
3887
4072
|
}
|
|
3888
4073
|
);
|
|
3889
4074
|
|
|
3890
4075
|
// src/Tiles/Tiles.tsx
|
|
3891
4076
|
import { cn as cn44, createVar as createVar13, gapSpace as gapSpace7 } from "@marigold/system";
|
|
4077
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3892
4078
|
var Tiles = ({
|
|
3893
4079
|
space = 0,
|
|
3894
4080
|
stretch = false,
|
|
@@ -3901,7 +4087,7 @@ var Tiles = ({
|
|
|
3901
4087
|
if (stretch) {
|
|
3902
4088
|
column = `minmax(${column}, 1fr)`;
|
|
3903
4089
|
}
|
|
3904
|
-
return /* @__PURE__ */
|
|
4090
|
+
return /* @__PURE__ */ jsx84(
|
|
3905
4091
|
"div",
|
|
3906
4092
|
{
|
|
3907
4093
|
...props,
|
|
@@ -3911,9 +4097,9 @@ var Tiles = ({
|
|
|
3911
4097
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3912
4098
|
equalHeight && "auto-rows-[1fr]"
|
|
3913
4099
|
),
|
|
3914
|
-
style: createVar13({ column, tilesWidth })
|
|
3915
|
-
|
|
3916
|
-
|
|
4100
|
+
style: createVar13({ column, tilesWidth }),
|
|
4101
|
+
children
|
|
4102
|
+
}
|
|
3917
4103
|
);
|
|
3918
4104
|
};
|
|
3919
4105
|
|
|
@@ -3932,6 +4118,7 @@ import { FocusableProvider } from "@react-aria/focus";
|
|
|
3932
4118
|
import { useOverlayPosition } from "@react-aria/overlays";
|
|
3933
4119
|
import { useTooltipTrigger } from "@react-aria/tooltip";
|
|
3934
4120
|
import { useTooltipTriggerState } from "@react-stately/tooltip";
|
|
4121
|
+
import { jsx as jsx85, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3935
4122
|
var TooltipTrigger = ({
|
|
3936
4123
|
disabled,
|
|
3937
4124
|
open,
|
|
@@ -3968,44 +4155,50 @@ var TooltipTrigger = ({
|
|
|
3968
4155
|
isOpen: state.isOpen,
|
|
3969
4156
|
overlayRef
|
|
3970
4157
|
});
|
|
3971
|
-
return /* @__PURE__ */
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
4158
|
+
return /* @__PURE__ */ jsxs33(FocusableProvider, { ref: tooltipTriggerRef, ...triggerProps, children: [
|
|
4159
|
+
tooltipTrigger,
|
|
4160
|
+
/* @__PURE__ */ jsx85(
|
|
4161
|
+
TooltipContext.Provider,
|
|
4162
|
+
{
|
|
4163
|
+
value: {
|
|
4164
|
+
state,
|
|
4165
|
+
overlayRef,
|
|
4166
|
+
arrowProps,
|
|
4167
|
+
placement: overlayPlacement,
|
|
4168
|
+
...tooltipProps,
|
|
4169
|
+
...positionProps
|
|
4170
|
+
},
|
|
4171
|
+
children: /* @__PURE__ */ jsx85(Overlay, { open: state.isOpen, children: tooltip })
|
|
3981
4172
|
}
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
));
|
|
4173
|
+
)
|
|
4174
|
+
] });
|
|
3985
4175
|
};
|
|
3986
4176
|
|
|
3987
4177
|
// src/Tooltip/Tooltip.tsx
|
|
4178
|
+
import { jsx as jsx86, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3988
4179
|
var Tooltip = ({ children, variant, size }) => {
|
|
3989
4180
|
const { arrowProps, state, overlayRef, placement, ...rest } = useTooltipContext();
|
|
3990
4181
|
const { tooltipProps } = useTooltip({}, state);
|
|
3991
4182
|
const classNames2 = useClassNames39({ component: "Tooltip", variant, size });
|
|
3992
|
-
return /* @__PURE__ */
|
|
4183
|
+
return /* @__PURE__ */ jsxs34(
|
|
3993
4184
|
"div",
|
|
3994
4185
|
{
|
|
3995
4186
|
...tooltipProps,
|
|
3996
4187
|
...rest,
|
|
3997
4188
|
ref: overlayRef,
|
|
3998
4189
|
className: cn45("group/tooltip", classNames2.container),
|
|
3999
|
-
"data-placement": placement
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4190
|
+
"data-placement": placement,
|
|
4191
|
+
children: [
|
|
4192
|
+
/* @__PURE__ */ jsx86("div", { children }),
|
|
4193
|
+
/* @__PURE__ */ jsx86(
|
|
4194
|
+
"div",
|
|
4195
|
+
{
|
|
4196
|
+
...arrowProps,
|
|
4197
|
+
className: cn45("absolute h-0 w-0", classNames2.arrow)
|
|
4198
|
+
}
|
|
4199
|
+
)
|
|
4200
|
+
]
|
|
4201
|
+
}
|
|
4009
4202
|
);
|
|
4010
4203
|
};
|
|
4011
4204
|
Tooltip.Trigger = TooltipTrigger;
|
|
@@ -4020,17 +4213,18 @@ import { useListState } from "@react-stately/list";
|
|
|
4020
4213
|
import { useStateProps as useStateProps28 } from "@marigold/system";
|
|
4021
4214
|
|
|
4022
4215
|
// src/TagGroup/Tag.tsx
|
|
4023
|
-
import
|
|
4216
|
+
import React2 from "react";
|
|
4024
4217
|
import { useFocusRing as useFocusRing20 } from "@react-aria/focus";
|
|
4025
4218
|
import { useTag } from "@react-aria/tag";
|
|
4026
4219
|
import { mergeProps as mergeProps23 } from "@react-aria/utils";
|
|
4027
4220
|
import { cn as cn46, useClassNames as useClassNames40 } from "@marigold/system";
|
|
4221
|
+
import { jsx as jsx87, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4028
4222
|
var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
4029
4223
|
const props = {
|
|
4030
4224
|
item,
|
|
4031
4225
|
...rest
|
|
4032
4226
|
};
|
|
4033
|
-
let ref =
|
|
4227
|
+
let ref = React2.useRef(null);
|
|
4034
4228
|
let { focusProps } = useFocusRing20({ within: true });
|
|
4035
4229
|
const { rowProps, gridCellProps, allowsRemoving, removeButtonProps } = useTag(
|
|
4036
4230
|
{
|
|
@@ -4041,26 +4235,31 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
4041
4235
|
ref
|
|
4042
4236
|
);
|
|
4043
4237
|
const classNames2 = useClassNames40({ component: "Tag", variant, size });
|
|
4044
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ jsx87(
|
|
4045
4239
|
"span",
|
|
4046
4240
|
{
|
|
4047
4241
|
ref,
|
|
4048
4242
|
...mergeProps23(rowProps, focusProps),
|
|
4049
|
-
className: classNames2.tag
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4243
|
+
className: classNames2.tag,
|
|
4244
|
+
children: /* @__PURE__ */ jsxs35("div", { ...gridCellProps, className: classNames2.gridCell, children: [
|
|
4245
|
+
/* @__PURE__ */ jsx87("span", { children: item.rendered }),
|
|
4246
|
+
allowsRemoving && /* @__PURE__ */ jsx87(
|
|
4247
|
+
Button,
|
|
4248
|
+
{
|
|
4249
|
+
...removeButtonProps,
|
|
4250
|
+
className: cn46("flex items-center", classNames2.closeButton),
|
|
4251
|
+
role: "button",
|
|
4252
|
+
children: /* @__PURE__ */ jsx87("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx87("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" }) })
|
|
4253
|
+
}
|
|
4254
|
+
)
|
|
4255
|
+
] })
|
|
4256
|
+
}
|
|
4060
4257
|
);
|
|
4061
4258
|
};
|
|
4062
4259
|
|
|
4063
4260
|
// src/TagGroup/TagGroup.tsx
|
|
4261
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
4262
|
+
import { createElement } from "react";
|
|
4064
4263
|
var TagGroup = ({
|
|
4065
4264
|
width,
|
|
4066
4265
|
required,
|
|
@@ -4080,7 +4279,7 @@ var TagGroup = ({
|
|
|
4080
4279
|
error,
|
|
4081
4280
|
required
|
|
4082
4281
|
});
|
|
4083
|
-
return /* @__PURE__ */
|
|
4282
|
+
return /* @__PURE__ */ jsx88(
|
|
4084
4283
|
FieldBase,
|
|
4085
4284
|
{
|
|
4086
4285
|
width,
|
|
@@ -4092,28 +4291,28 @@ var TagGroup = ({
|
|
|
4092
4291
|
errorMessage: props.errorMessage,
|
|
4093
4292
|
errorMessageProps,
|
|
4094
4293
|
stateProps,
|
|
4095
|
-
...gridProps
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
"div",
|
|
4099
|
-
{
|
|
4100
|
-
role: "presentation",
|
|
4101
|
-
ref: inputRef,
|
|
4102
|
-
className: "flex flex-wrap items-start gap-1"
|
|
4103
|
-
},
|
|
4104
|
-
[...state.collection].map((item) => /* @__PURE__ */ React.createElement(
|
|
4105
|
-
Tag,
|
|
4294
|
+
...gridProps,
|
|
4295
|
+
children: /* @__PURE__ */ jsx88(
|
|
4296
|
+
"div",
|
|
4106
4297
|
{
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
state
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4298
|
+
role: "presentation",
|
|
4299
|
+
ref: inputRef,
|
|
4300
|
+
className: "flex flex-wrap items-start gap-1",
|
|
4301
|
+
children: [...state.collection].map((item) => /* @__PURE__ */ createElement(
|
|
4302
|
+
Tag,
|
|
4303
|
+
{
|
|
4304
|
+
...item.props,
|
|
4305
|
+
key: item.key,
|
|
4306
|
+
item,
|
|
4307
|
+
state,
|
|
4308
|
+
allowsRemoving,
|
|
4309
|
+
onRemove: props.onRemove
|
|
4310
|
+
},
|
|
4311
|
+
item.rendered
|
|
4312
|
+
))
|
|
4313
|
+
}
|
|
4314
|
+
)
|
|
4315
|
+
}
|
|
4117
4316
|
);
|
|
4118
4317
|
};
|
|
4119
4318
|
|
|
@@ -4124,7 +4323,8 @@ Tag2.Group = TagGroup;
|
|
|
4124
4323
|
// src/XLoader/XLoader.tsx
|
|
4125
4324
|
import { forwardRef as forwardRef18 } from "react";
|
|
4126
4325
|
import { SVG as SVG6 } from "@marigold/system";
|
|
4127
|
-
|
|
4326
|
+
import { jsx as jsx89, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4327
|
+
var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ jsxs36(
|
|
4128
4328
|
SVG6,
|
|
4129
4329
|
{
|
|
4130
4330
|
id: "XLoader",
|
|
@@ -4132,207 +4332,209 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React.createElement(
|
|
|
4132
4332
|
size: 150,
|
|
4133
4333
|
viewBox: "0 0 150 150",
|
|
4134
4334
|
...props,
|
|
4135
|
-
...ref
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4335
|
+
...ref,
|
|
4336
|
+
children: [
|
|
4337
|
+
/* @__PURE__ */ jsx89("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
4338
|
+
/* @__PURE__ */ jsx89(
|
|
4339
|
+
"path",
|
|
4340
|
+
{
|
|
4341
|
+
id: "XMLID_5_",
|
|
4342
|
+
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",
|
|
4343
|
+
children: /* @__PURE__ */ jsx89(
|
|
4344
|
+
"animate",
|
|
4345
|
+
{
|
|
4346
|
+
attributeName: "opacity",
|
|
4347
|
+
attributeType: "XML",
|
|
4348
|
+
values: "1; .01; 1; 1; 1;",
|
|
4349
|
+
begin: "1.0s",
|
|
4350
|
+
dur: "2.5s",
|
|
4351
|
+
repeatCount: "indefinite"
|
|
4352
|
+
}
|
|
4353
|
+
)
|
|
4354
|
+
}
|
|
4355
|
+
),
|
|
4356
|
+
/* @__PURE__ */ jsx89(
|
|
4357
|
+
"path",
|
|
4358
|
+
{
|
|
4359
|
+
id: "XMLID_18_",
|
|
4360
|
+
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",
|
|
4361
|
+
children: /* @__PURE__ */ jsx89(
|
|
4362
|
+
"animate",
|
|
4363
|
+
{
|
|
4364
|
+
attributeName: "opacity",
|
|
4365
|
+
attributeType: "XML",
|
|
4366
|
+
values: "1; .01; 1; 1; 1;",
|
|
4367
|
+
begin: "0.9s",
|
|
4368
|
+
dur: "2.5s",
|
|
4369
|
+
repeatCount: "indefinite"
|
|
4370
|
+
}
|
|
4371
|
+
)
|
|
4372
|
+
}
|
|
4373
|
+
),
|
|
4374
|
+
/* @__PURE__ */ jsx89(
|
|
4375
|
+
"path",
|
|
4376
|
+
{
|
|
4377
|
+
id: "XMLID_19_",
|
|
4378
|
+
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",
|
|
4379
|
+
children: /* @__PURE__ */ jsx89(
|
|
4380
|
+
"animate",
|
|
4381
|
+
{
|
|
4382
|
+
attributeName: "opacity",
|
|
4383
|
+
attributeType: "XML",
|
|
4384
|
+
values: "1; .01; 1; 1; 1;",
|
|
4385
|
+
begin: "0.8s",
|
|
4386
|
+
dur: "2.5s",
|
|
4387
|
+
repeatCount: "indefinite"
|
|
4388
|
+
}
|
|
4389
|
+
)
|
|
4390
|
+
}
|
|
4391
|
+
),
|
|
4392
|
+
/* @__PURE__ */ jsx89(
|
|
4393
|
+
"path",
|
|
4394
|
+
{
|
|
4395
|
+
id: "XMLID_20_",
|
|
4396
|
+
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",
|
|
4397
|
+
children: /* @__PURE__ */ jsx89(
|
|
4398
|
+
"animate",
|
|
4399
|
+
{
|
|
4400
|
+
attributeName: "opacity",
|
|
4401
|
+
attributeType: "XML",
|
|
4402
|
+
values: "1; .01; 1; 1; 1;",
|
|
4403
|
+
begin: "0.7s",
|
|
4404
|
+
dur: "2.5s",
|
|
4405
|
+
repeatCount: "indefinite"
|
|
4406
|
+
}
|
|
4407
|
+
)
|
|
4408
|
+
}
|
|
4409
|
+
),
|
|
4410
|
+
/* @__PURE__ */ jsx89(
|
|
4411
|
+
"path",
|
|
4412
|
+
{
|
|
4413
|
+
id: "XMLID_21_",
|
|
4414
|
+
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",
|
|
4415
|
+
children: /* @__PURE__ */ jsx89(
|
|
4416
|
+
"animate",
|
|
4417
|
+
{
|
|
4418
|
+
attributeName: "opacity",
|
|
4419
|
+
attributeType: "XML",
|
|
4420
|
+
values: "1; .01; 1; 1; 1;",
|
|
4421
|
+
begin: "0.6s",
|
|
4422
|
+
dur: "2.5s",
|
|
4423
|
+
repeatCount: "indefinite"
|
|
4424
|
+
}
|
|
4425
|
+
)
|
|
4426
|
+
}
|
|
4427
|
+
),
|
|
4428
|
+
/* @__PURE__ */ jsx89(
|
|
4429
|
+
"path",
|
|
4430
|
+
{
|
|
4431
|
+
id: "XMLID_22_",
|
|
4432
|
+
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",
|
|
4433
|
+
children: /* @__PURE__ */ jsx89(
|
|
4434
|
+
"animate",
|
|
4435
|
+
{
|
|
4436
|
+
attributeName: "opacity",
|
|
4437
|
+
attributeType: "XML",
|
|
4438
|
+
values: "1; .01; 1; 1; 1;",
|
|
4439
|
+
begin: "0.5s",
|
|
4440
|
+
dur: "2.5s",
|
|
4441
|
+
repeatCount: "indefinite"
|
|
4442
|
+
}
|
|
4443
|
+
)
|
|
4444
|
+
}
|
|
4445
|
+
),
|
|
4446
|
+
/* @__PURE__ */ jsx89(
|
|
4447
|
+
"path",
|
|
4448
|
+
{
|
|
4449
|
+
id: "XMLID_23_",
|
|
4450
|
+
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",
|
|
4451
|
+
children: /* @__PURE__ */ jsx89(
|
|
4452
|
+
"animate",
|
|
4453
|
+
{
|
|
4454
|
+
attributeName: "opacity",
|
|
4455
|
+
attributeType: "XML",
|
|
4456
|
+
values: "1; .01; 1; 1; 1;",
|
|
4457
|
+
begin: "0.4s",
|
|
4458
|
+
dur: "2.5s",
|
|
4459
|
+
repeatCount: "indefinite"
|
|
4460
|
+
}
|
|
4461
|
+
)
|
|
4462
|
+
}
|
|
4463
|
+
),
|
|
4464
|
+
/* @__PURE__ */ jsx89(
|
|
4465
|
+
"path",
|
|
4466
|
+
{
|
|
4467
|
+
id: "XMLID_24_",
|
|
4468
|
+
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",
|
|
4469
|
+
children: /* @__PURE__ */ jsx89(
|
|
4470
|
+
"animate",
|
|
4471
|
+
{
|
|
4472
|
+
attributeName: "opacity",
|
|
4473
|
+
attributeType: "XML",
|
|
4474
|
+
values: "1; .01; 1; 1; 1;",
|
|
4475
|
+
begin: "0.3s",
|
|
4476
|
+
dur: "2.5s",
|
|
4477
|
+
repeatCount: "indefinite"
|
|
4478
|
+
}
|
|
4479
|
+
)
|
|
4480
|
+
}
|
|
4481
|
+
),
|
|
4482
|
+
/* @__PURE__ */ jsx89(
|
|
4483
|
+
"path",
|
|
4484
|
+
{
|
|
4485
|
+
id: "XMLID_25_",
|
|
4486
|
+
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",
|
|
4487
|
+
children: /* @__PURE__ */ jsx89(
|
|
4488
|
+
"animate",
|
|
4489
|
+
{
|
|
4490
|
+
attributeName: "opacity",
|
|
4491
|
+
attributeType: "XML",
|
|
4492
|
+
values: "1; .01; 1; 1; 1;",
|
|
4493
|
+
begin: "0.2s",
|
|
4494
|
+
dur: "2.5s",
|
|
4495
|
+
repeatCount: "indefinite"
|
|
4496
|
+
}
|
|
4497
|
+
)
|
|
4498
|
+
}
|
|
4499
|
+
),
|
|
4500
|
+
/* @__PURE__ */ jsx89(
|
|
4501
|
+
"path",
|
|
4502
|
+
{
|
|
4503
|
+
id: "XMLID_26_",
|
|
4504
|
+
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",
|
|
4505
|
+
children: /* @__PURE__ */ jsx89(
|
|
4506
|
+
"animate",
|
|
4507
|
+
{
|
|
4508
|
+
attributeName: "opacity",
|
|
4509
|
+
attributeType: "XML",
|
|
4510
|
+
values: "1; .01; 1; 1; 1;",
|
|
4511
|
+
begin: "0.1s",
|
|
4512
|
+
dur: "2.5s",
|
|
4513
|
+
repeatCount: "indefinite"
|
|
4514
|
+
}
|
|
4515
|
+
)
|
|
4516
|
+
}
|
|
4517
|
+
),
|
|
4518
|
+
/* @__PURE__ */ jsx89(
|
|
4519
|
+
"path",
|
|
4520
|
+
{
|
|
4521
|
+
id: "XMLID_27_",
|
|
4522
|
+
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",
|
|
4523
|
+
children: /* @__PURE__ */ jsx89(
|
|
4524
|
+
"animate",
|
|
4525
|
+
{
|
|
4526
|
+
attributeName: "opacity",
|
|
4527
|
+
attributeType: "XML",
|
|
4528
|
+
values: "1; .01; 1; 1; 1;",
|
|
4529
|
+
begin: "0.0s",
|
|
4530
|
+
dur: "2.5s",
|
|
4531
|
+
repeatCount: "indefinite"
|
|
4532
|
+
}
|
|
4533
|
+
)
|
|
4534
|
+
}
|
|
4535
|
+
)
|
|
4536
|
+
]
|
|
4537
|
+
}
|
|
4336
4538
|
));
|
|
4337
4539
|
|
|
4338
4540
|
// src/Tabs/Tabs.tsx
|
|
@@ -4353,6 +4555,7 @@ import { useFocus, useHover as useHover14 } from "@react-aria/interactions";
|
|
|
4353
4555
|
import { useTab } from "@react-aria/tabs";
|
|
4354
4556
|
import { mergeProps as mergeProps24 } from "@react-aria/utils";
|
|
4355
4557
|
import { cn as cn47, useStateProps as useStateProps29 } from "@marigold/system";
|
|
4558
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
4356
4559
|
var Tab = ({ item, state }) => {
|
|
4357
4560
|
const { key, rendered } = item;
|
|
4358
4561
|
const ref = useRef30(null);
|
|
@@ -4364,7 +4567,7 @@ var Tab = ({ item, state }) => {
|
|
|
4364
4567
|
const { focusProps } = useFocus({});
|
|
4365
4568
|
const stateProps = useStateProps29({ active: isSelected, hover: isHovered });
|
|
4366
4569
|
const { classNames: classNames2 } = useTabContext();
|
|
4367
|
-
return /* @__PURE__ */
|
|
4570
|
+
return /* @__PURE__ */ jsx90(
|
|
4368
4571
|
"div",
|
|
4369
4572
|
{
|
|
4370
4573
|
className: cn47(
|
|
@@ -4372,9 +4575,9 @@ var Tab = ({ item, state }) => {
|
|
|
4372
4575
|
classNames2.tab
|
|
4373
4576
|
),
|
|
4374
4577
|
...mergeProps24(tabProps, stateProps, focusProps, hoverProps),
|
|
4375
|
-
ref
|
|
4376
|
-
|
|
4377
|
-
|
|
4578
|
+
ref,
|
|
4579
|
+
children: rendered
|
|
4580
|
+
}
|
|
4378
4581
|
);
|
|
4379
4582
|
};
|
|
4380
4583
|
|
|
@@ -4382,16 +4585,18 @@ var Tab = ({ item, state }) => {
|
|
|
4382
4585
|
import { useRef as useRef31 } from "react";
|
|
4383
4586
|
import { useTabPanel } from "@react-aria/tabs";
|
|
4384
4587
|
import { cn as cn48 } from "@marigold/system";
|
|
4588
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
4385
4589
|
var TabPanel = ({ state, ...props }) => {
|
|
4386
4590
|
var _a;
|
|
4387
4591
|
const ref = useRef31(null);
|
|
4388
4592
|
const { tabPanelProps } = useTabPanel(props, state, ref);
|
|
4389
4593
|
const selectedItemProps = (_a = state.selectedItem) == null ? void 0 : _a.props;
|
|
4390
4594
|
const { classNames: classNames2 } = useTabContext();
|
|
4391
|
-
return /* @__PURE__ */
|
|
4595
|
+
return /* @__PURE__ */ jsx91("div", { className: cn48(classNames2.tabpanel), ref, ...tabPanelProps, children: selectedItemProps == null ? void 0 : selectedItemProps.children });
|
|
4392
4596
|
};
|
|
4393
4597
|
|
|
4394
4598
|
// src/Tabs/Tabs.tsx
|
|
4599
|
+
import { jsx as jsx92, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4395
4600
|
var Tabs = ({
|
|
4396
4601
|
space = 2,
|
|
4397
4602
|
size = "medium",
|
|
@@ -4412,17 +4617,20 @@ var Tabs = ({
|
|
|
4412
4617
|
size,
|
|
4413
4618
|
variant
|
|
4414
4619
|
});
|
|
4415
|
-
return /* @__PURE__ */
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4620
|
+
return /* @__PURE__ */ jsx92(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsxs37("div", { className: cn49(classNames2.container), children: [
|
|
4621
|
+
/* @__PURE__ */ jsx92(
|
|
4622
|
+
"div",
|
|
4623
|
+
{
|
|
4624
|
+
className: cn49("flex", gapSpace8[space], classNames2.tabs),
|
|
4625
|
+
...tabListProps,
|
|
4626
|
+
ref,
|
|
4627
|
+
children: [...state.collection].map((item) => {
|
|
4628
|
+
return /* @__PURE__ */ jsx92(Tab, { item, state }, item.key);
|
|
4629
|
+
})
|
|
4630
|
+
}
|
|
4631
|
+
),
|
|
4632
|
+
/* @__PURE__ */ jsx92(TabPanel, { state }, (_a = state.selectedItem) == null ? void 0 : _a.key)
|
|
4633
|
+
] }) });
|
|
4426
4634
|
};
|
|
4427
4635
|
Tabs.Item = Item7;
|
|
4428
4636
|
export {
|