@marigold/components 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -2
- package/dist/index.js +275 -239
- package/dist/index.mjs +488 -444
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { useAsyncList, useListData } from "@react-stately/data";
|
|
3
3
|
|
|
4
4
|
// src/Accordion/Accordion.tsx
|
|
5
|
-
import
|
|
5
|
+
import React6, { Children, useRef as useRef2 } from "react";
|
|
6
6
|
import { useAccordion } from "@react-aria/accordion";
|
|
7
7
|
import { Item } from "@react-stately/collections";
|
|
8
8
|
|
|
9
9
|
// src/Accordion/AccordionItem.tsx
|
|
10
|
-
import
|
|
10
|
+
import React5, { useRef } from "react";
|
|
11
11
|
import { FocusRing, useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
12
12
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
13
13
|
import { useClassNames as useClassNames2, useStateProps as useStateProps2 } from "@marigold/system";
|
|
@@ -108,7 +108,7 @@ function useAccordionItem(props, state, ref) {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// src/Button/Button.tsx
|
|
111
|
-
import
|
|
111
|
+
import React2, { forwardRef } from "react";
|
|
112
112
|
import { useButton as useButton2 } from "@react-aria/button";
|
|
113
113
|
import { useFocusRing } from "@react-aria/focus";
|
|
114
114
|
import { useHover } from "@react-aria/interactions";
|
|
@@ -168,7 +168,7 @@ var Button = forwardRef(
|
|
|
168
168
|
focusVisible: isFocusVisible,
|
|
169
169
|
hover: isHovered
|
|
170
170
|
});
|
|
171
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ React2.createElement(
|
|
172
172
|
Component,
|
|
173
173
|
{
|
|
174
174
|
...mergeProps2(buttonProps, focusProps, hoverProps, props),
|
|
@@ -186,17 +186,17 @@ var Button = forwardRef(
|
|
|
186
186
|
);
|
|
187
187
|
|
|
188
188
|
// src/Chevron/ChevronUp.tsx
|
|
189
|
-
import
|
|
189
|
+
import React3, { forwardRef as forwardRef2 } from "react";
|
|
190
190
|
import { SVG } from "@marigold/system";
|
|
191
191
|
var ChevronUp = forwardRef2(
|
|
192
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
192
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(SVG, { className, ...props, viewBox: "0 0 24 24", ref }, /* @__PURE__ */ React3.createElement("path", { d: "M5.97563 16.8506L12 10.8394L18.0244 16.8506L19.875 15L12 7.125L4.125 15L5.97563 16.8506Z" }))
|
|
193
193
|
);
|
|
194
194
|
|
|
195
195
|
// src/Chevron/ChevronDown.tsx
|
|
196
|
-
import
|
|
196
|
+
import React4, { forwardRef as forwardRef3 } from "react";
|
|
197
197
|
import { SVG as SVG2 } from "@marigold/system";
|
|
198
198
|
var ChevronDown = forwardRef3(
|
|
199
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
199
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React4.createElement(SVG2, { className, ...props, viewBox: "0 0 24 24", ref }, /* @__PURE__ */ React4.createElement("path", { d: "M5.97563 7.125L12 13.1363L18.0244 7.125L19.875 8.97563L12 16.8506L4.125 8.97563L5.97563 7.125Z" }))
|
|
200
200
|
);
|
|
201
201
|
|
|
202
202
|
// src/Accordion/AccordionItem.tsx
|
|
@@ -213,7 +213,7 @@ var AccordionItem = ({
|
|
|
213
213
|
item.key.toString().replace(".$", "")
|
|
214
214
|
);
|
|
215
215
|
const expanded = state.selectionManager.isSelected(item.key);
|
|
216
|
-
|
|
216
|
+
React5.useEffect(() => {
|
|
217
217
|
if (defaultExpanded) {
|
|
218
218
|
if (state.selectionManager.selectionMode === "multiple") {
|
|
219
219
|
state.expandedKeys.forEach((key) => {
|
|
@@ -232,7 +232,7 @@ var AccordionItem = ({
|
|
|
232
232
|
expanded: defaultExpanded || expanded
|
|
233
233
|
});
|
|
234
234
|
const classNames2 = useClassNames2({ component: "Accordion", variant, size });
|
|
235
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col", ...props }, /* @__PURE__ */ React5.createElement(FocusRing, { within: true }, /* @__PURE__ */ React5.createElement(
|
|
236
236
|
Button,
|
|
237
237
|
{
|
|
238
238
|
className: classNames2.button,
|
|
@@ -241,8 +241,8 @@ var AccordionItem = ({
|
|
|
241
241
|
"aria-label": item.textValue
|
|
242
242
|
},
|
|
243
243
|
title,
|
|
244
|
-
!expanded ? /* @__PURE__ */
|
|
245
|
-
)), expanded || defaultExpanded ? /* @__PURE__ */
|
|
244
|
+
!expanded ? /* @__PURE__ */ React5.createElement(ChevronUp, { className: "h3 w-6" }) : /* @__PURE__ */ React5.createElement(ChevronDown, { className: "h3 w-6" })
|
|
245
|
+
)), expanded || defaultExpanded ? /* @__PURE__ */ React5.createElement(
|
|
246
246
|
"div",
|
|
247
247
|
{
|
|
248
248
|
...mergeProps3(regionProps, focusProps, stateProps),
|
|
@@ -259,10 +259,10 @@ var Accordion = ({ children, ...props }) => {
|
|
|
259
259
|
...props,
|
|
260
260
|
// we have to do this because JSX childs are not supported
|
|
261
261
|
children: Children.toArray(children).map((child) => {
|
|
262
|
-
if (!
|
|
262
|
+
if (!React6.isValidElement(child)) {
|
|
263
263
|
return child;
|
|
264
264
|
}
|
|
265
|
-
return
|
|
265
|
+
return React6.cloneElement(child, {
|
|
266
266
|
hasChildItems: false,
|
|
267
267
|
...child.props
|
|
268
268
|
});
|
|
@@ -278,7 +278,7 @@ var Accordion = ({ children, ...props }) => {
|
|
|
278
278
|
state,
|
|
279
279
|
ref
|
|
280
280
|
);
|
|
281
|
-
return /* @__PURE__ */
|
|
281
|
+
return /* @__PURE__ */ React6.createElement("div", { ...accordionProps, ref }, [...state.collection].map((item) => /* @__PURE__ */ React6.createElement(
|
|
282
282
|
AccordionItem,
|
|
283
283
|
{
|
|
284
284
|
key: item.key,
|
|
@@ -293,7 +293,7 @@ var Accordion = ({ children, ...props }) => {
|
|
|
293
293
|
Accordion.Item = Item;
|
|
294
294
|
|
|
295
295
|
// src/Aside/Aside.tsx
|
|
296
|
-
import
|
|
296
|
+
import React7 from "react";
|
|
297
297
|
import { cn as cn2, createVar, gapSpace } from "@marigold/system";
|
|
298
298
|
var classNames = {
|
|
299
299
|
aside: "grow basis-[--sideWidth]",
|
|
@@ -307,12 +307,12 @@ var Aside = ({
|
|
|
307
307
|
stretch = true,
|
|
308
308
|
wrap = "50%"
|
|
309
309
|
}) => {
|
|
310
|
-
const [left, right] =
|
|
310
|
+
const [left, right] = React7.Children.toArray(children);
|
|
311
311
|
const vars = {
|
|
312
312
|
aside: createVar({ sideWidth }),
|
|
313
313
|
content: createVar({ wrap })
|
|
314
314
|
};
|
|
315
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ React7.createElement(
|
|
316
316
|
"div",
|
|
317
317
|
{
|
|
318
318
|
className: cn2(
|
|
@@ -321,7 +321,7 @@ var Aside = ({
|
|
|
321
321
|
!stretch && "items-start"
|
|
322
322
|
)
|
|
323
323
|
},
|
|
324
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ React7.createElement(
|
|
325
325
|
"div",
|
|
326
326
|
{
|
|
327
327
|
className: classNames[side === "left" ? "aside" : "content"],
|
|
@@ -329,7 +329,7 @@ var Aside = ({
|
|
|
329
329
|
},
|
|
330
330
|
left
|
|
331
331
|
),
|
|
332
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ React7.createElement(
|
|
333
333
|
"div",
|
|
334
334
|
{
|
|
335
335
|
className: classNames[side === "right" ? "aside" : "content"],
|
|
@@ -341,13 +341,13 @@ var Aside = ({
|
|
|
341
341
|
};
|
|
342
342
|
|
|
343
343
|
// src/Aspect/Aspect.tsx
|
|
344
|
-
import
|
|
344
|
+
import React8 from "react";
|
|
345
345
|
import { cn as cn3, createVar as createVar2, aspect } from "@marigold/system";
|
|
346
346
|
var Aspect = ({
|
|
347
347
|
ratio = "square",
|
|
348
348
|
maxWidth,
|
|
349
349
|
children
|
|
350
|
-
}) => /* @__PURE__ */
|
|
350
|
+
}) => /* @__PURE__ */ React8.createElement(
|
|
351
351
|
"div",
|
|
352
352
|
{
|
|
353
353
|
className: cn3("overflow-hidden", aspect[ratio], "max-w-[var(--maxWidth)]"),
|
|
@@ -357,14 +357,14 @@ var Aspect = ({
|
|
|
357
357
|
);
|
|
358
358
|
|
|
359
359
|
// src/Autocomplete/Autocomplete.tsx
|
|
360
|
-
import
|
|
360
|
+
import React23, { useRef as useRef7 } from "react";
|
|
361
361
|
import { useSearchAutocomplete } from "@react-aria/autocomplete";
|
|
362
362
|
import { useFilter } from "@react-aria/i18n";
|
|
363
363
|
import { useComboBoxState } from "@react-stately/combobox";
|
|
364
364
|
import { Item as Item2 } from "@react-stately/collections";
|
|
365
365
|
|
|
366
366
|
// src/FieldBase/FieldBase.tsx
|
|
367
|
-
import
|
|
367
|
+
import React12 from "react";
|
|
368
368
|
import {
|
|
369
369
|
cn as cn6,
|
|
370
370
|
useClassNames as useClassNames5,
|
|
@@ -372,7 +372,7 @@ import {
|
|
|
372
372
|
} from "@marigold/system";
|
|
373
373
|
|
|
374
374
|
// src/Label/Label.tsx
|
|
375
|
-
import
|
|
375
|
+
import React9 from "react";
|
|
376
376
|
import { SVG as SVG3, cn as cn4, createVar as createVar3, useClassNames as useClassNames3 } from "@marigold/system";
|
|
377
377
|
var Label = ({
|
|
378
378
|
as = "label",
|
|
@@ -384,7 +384,7 @@ var Label = ({
|
|
|
384
384
|
}) => {
|
|
385
385
|
const Component = as;
|
|
386
386
|
const classNames2 = useClassNames3({ component: "Label", size, variant });
|
|
387
|
-
return /* @__PURE__ */
|
|
387
|
+
return /* @__PURE__ */ React9.createElement(
|
|
388
388
|
Component,
|
|
389
389
|
{
|
|
390
390
|
...props,
|
|
@@ -392,7 +392,7 @@ var Label = ({
|
|
|
392
392
|
style: createVar3({ labelWidth })
|
|
393
393
|
},
|
|
394
394
|
children,
|
|
395
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ React9.createElement(
|
|
396
396
|
SVG3,
|
|
397
397
|
{
|
|
398
398
|
viewBox: "0 0 24 24",
|
|
@@ -400,13 +400,13 @@ var Label = ({
|
|
|
400
400
|
size: 16,
|
|
401
401
|
className: cn4("hidden", classNames2.indicator)
|
|
402
402
|
},
|
|
403
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ React9.createElement("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" })
|
|
404
404
|
)
|
|
405
405
|
);
|
|
406
406
|
};
|
|
407
407
|
|
|
408
408
|
// src/HelpText/HelpText.tsx
|
|
409
|
-
import
|
|
409
|
+
import React10 from "react";
|
|
410
410
|
import { SVG as SVG4, cn as cn5, useClassNames as useClassNames4 } from "@marigold/system";
|
|
411
411
|
var HelpText = ({
|
|
412
412
|
variant,
|
|
@@ -427,32 +427,32 @@ var HelpText = ({
|
|
|
427
427
|
size,
|
|
428
428
|
className
|
|
429
429
|
});
|
|
430
|
-
return /* @__PURE__ */
|
|
430
|
+
return /* @__PURE__ */ React10.createElement(
|
|
431
431
|
"div",
|
|
432
432
|
{
|
|
433
433
|
...props,
|
|
434
434
|
...hasErrorMessage ? errorMessageProps : descriptionProps,
|
|
435
435
|
className: cn5("flex items-center gap-1", classNames2.container)
|
|
436
436
|
},
|
|
437
|
-
hasErrorMessage ? /* @__PURE__ */
|
|
437
|
+
hasErrorMessage ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
438
438
|
SVG4,
|
|
439
439
|
{
|
|
440
440
|
className: cn5("h-4 w-4", classNames2.icon),
|
|
441
441
|
viewBox: "0 0 24 24",
|
|
442
442
|
role: "presentation"
|
|
443
443
|
},
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
), errorMessage) : /* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ React10.createElement("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" })
|
|
445
|
+
), errorMessage) : /* @__PURE__ */ React10.createElement(React10.Fragment, null, description)
|
|
446
446
|
);
|
|
447
447
|
};
|
|
448
448
|
|
|
449
449
|
// src/FieldBase/FieldGroup.tsx
|
|
450
|
-
import
|
|
450
|
+
import React11 from "react";
|
|
451
451
|
import { createContext, useContext } from "react";
|
|
452
452
|
var FieldGroupContext = createContext({});
|
|
453
453
|
var useFieldGroupContext = () => useContext(FieldGroupContext);
|
|
454
454
|
var FieldGroup = ({ labelWidth, children }) => {
|
|
455
|
-
return /* @__PURE__ */
|
|
455
|
+
return /* @__PURE__ */ React11.createElement(FieldGroupContext.Provider, { value: { labelWidth } }, children);
|
|
456
456
|
};
|
|
457
457
|
|
|
458
458
|
// src/FieldBase/FieldBase.tsx
|
|
@@ -479,14 +479,14 @@ var FieldBase = ({
|
|
|
479
479
|
variant,
|
|
480
480
|
size
|
|
481
481
|
});
|
|
482
|
-
return /* @__PURE__ */
|
|
482
|
+
return /* @__PURE__ */ React12.createElement(
|
|
483
483
|
"div",
|
|
484
484
|
{
|
|
485
485
|
...props,
|
|
486
486
|
...stateProps,
|
|
487
487
|
className: cn6("group/field", twWidth[width], classNames2)
|
|
488
488
|
},
|
|
489
|
-
label && /* @__PURE__ */
|
|
489
|
+
label && /* @__PURE__ */ React12.createElement(
|
|
490
490
|
Label,
|
|
491
491
|
{
|
|
492
492
|
variant,
|
|
@@ -497,7 +497,7 @@ var FieldBase = ({
|
|
|
497
497
|
label
|
|
498
498
|
),
|
|
499
499
|
children,
|
|
500
|
-
hasHelpText && /* @__PURE__ */
|
|
500
|
+
hasHelpText && /* @__PURE__ */ React12.createElement(
|
|
501
501
|
HelpText,
|
|
502
502
|
{
|
|
503
503
|
variant,
|
|
@@ -514,7 +514,7 @@ var FieldBase = ({
|
|
|
514
514
|
};
|
|
515
515
|
|
|
516
516
|
// src/Input/Input.tsx
|
|
517
|
-
import
|
|
517
|
+
import React13, { cloneElement, forwardRef as forwardRef4 } from "react";
|
|
518
518
|
import { cn as cn7, useClassNames as useClassNames6 } from "@marigold/system";
|
|
519
519
|
var Input = forwardRef4(
|
|
520
520
|
({
|
|
@@ -548,7 +548,7 @@ var Input = forwardRef4(
|
|
|
548
548
|
),
|
|
549
549
|
...action.props
|
|
550
550
|
}) : null;
|
|
551
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ React13.createElement(
|
|
552
552
|
"div",
|
|
553
553
|
{
|
|
554
554
|
className: "group/input relative flex items-center",
|
|
@@ -556,7 +556,7 @@ var Input = forwardRef4(
|
|
|
556
556
|
"data-action": action && ""
|
|
557
557
|
},
|
|
558
558
|
inputIcon,
|
|
559
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ React13.createElement(
|
|
560
560
|
"input",
|
|
561
561
|
{
|
|
562
562
|
...props,
|
|
@@ -578,7 +578,7 @@ var Input = forwardRef4(
|
|
|
578
578
|
);
|
|
579
579
|
|
|
580
580
|
// src/ListBox/ListBox.tsx
|
|
581
|
-
import
|
|
581
|
+
import React16, { forwardRef as forwardRef5 } from "react";
|
|
582
582
|
import { useObjectRef as useObjectRef2 } from "@react-aria/utils";
|
|
583
583
|
import { cn as cn8, useClassNames as useClassNames7 } from "@marigold/system";
|
|
584
584
|
import { useListBox } from "@react-aria/listbox";
|
|
@@ -589,11 +589,11 @@ var ListBoxContext = createContext2({});
|
|
|
589
589
|
var useListBoxContext = () => useContext2(ListBoxContext);
|
|
590
590
|
|
|
591
591
|
// src/ListBox/ListBoxSection.tsx
|
|
592
|
-
import
|
|
592
|
+
import React15 from "react";
|
|
593
593
|
import { useListBoxSection } from "@react-aria/listbox";
|
|
594
594
|
|
|
595
595
|
// src/ListBox/ListBoxOption.tsx
|
|
596
|
-
import
|
|
596
|
+
import React14, { useRef as useRef3 } from "react";
|
|
597
597
|
import { useOption } from "@react-aria/listbox";
|
|
598
598
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
599
599
|
import { useStateProps as useStateProps3 } from "@marigold/system";
|
|
@@ -613,7 +613,7 @@ var ListBoxOption = ({ item, state }) => {
|
|
|
613
613
|
disabled: isDisabled,
|
|
614
614
|
focusVisible: isFocused
|
|
615
615
|
});
|
|
616
|
-
return /* @__PURE__ */
|
|
616
|
+
return /* @__PURE__ */ React14.createElement(
|
|
617
617
|
"li",
|
|
618
618
|
{
|
|
619
619
|
ref,
|
|
@@ -631,7 +631,7 @@ var ListBoxSection = ({ section, state }) => {
|
|
|
631
631
|
heading: section.rendered,
|
|
632
632
|
"aria-label": section["aria-label"]
|
|
633
633
|
});
|
|
634
|
-
return /* @__PURE__ */
|
|
634
|
+
return /* @__PURE__ */ React15.createElement("li", { className: classNames2.section, ...itemProps }, section.rendered && /* @__PURE__ */ React15.createElement("div", { className: classNames2.sectionTitle, ...headingProps }, section.rendered), /* @__PURE__ */ React15.createElement("ul", { className: classNames2.list, ...groupProps }, [...section.props.children].map((node) => /* @__PURE__ */ React15.createElement(ListBoxOption, { key: node.key, item: node, state }))));
|
|
635
635
|
};
|
|
636
636
|
|
|
637
637
|
// src/ListBox/ListBox.tsx
|
|
@@ -640,7 +640,7 @@ var ListBox = forwardRef5(
|
|
|
640
640
|
const innerRef = useObjectRef2(ref);
|
|
641
641
|
const { listBoxProps } = useListBox(props, state, innerRef);
|
|
642
642
|
const classNames2 = useClassNames7({ component: "ListBox", variant, size });
|
|
643
|
-
return /* @__PURE__ */
|
|
643
|
+
return /* @__PURE__ */ React16.createElement(ListBoxContext.Provider, { value: { classNames: classNames2 } }, /* @__PURE__ */ React16.createElement("div", { className: classNames2.container }, /* @__PURE__ */ React16.createElement(
|
|
644
644
|
"ul",
|
|
645
645
|
{
|
|
646
646
|
className: cn8(
|
|
@@ -651,24 +651,24 @@ var ListBox = forwardRef5(
|
|
|
651
651
|
...listBoxProps
|
|
652
652
|
},
|
|
653
653
|
[...state.collection].map(
|
|
654
|
-
(item) => item.type === "section" ? /* @__PURE__ */
|
|
654
|
+
(item) => item.type === "section" ? /* @__PURE__ */ React16.createElement(ListBoxSection, { key: item.key, section: item, state }) : /* @__PURE__ */ React16.createElement(ListBoxOption, { key: item.key, item, state })
|
|
655
655
|
)
|
|
656
656
|
)));
|
|
657
657
|
}
|
|
658
658
|
);
|
|
659
659
|
|
|
660
660
|
// src/Overlay/Modal.tsx
|
|
661
|
-
import
|
|
661
|
+
import React18, { forwardRef as forwardRef6 } from "react";
|
|
662
662
|
import { FocusScope } from "@react-aria/focus";
|
|
663
663
|
import { useModal, useOverlay, usePreventScroll } from "@react-aria/overlays";
|
|
664
664
|
import { mergeProps as mergeProps5, useObjectRef as useObjectRef3 } from "@react-aria/utils";
|
|
665
665
|
|
|
666
666
|
// src/Overlay/Underlay.tsx
|
|
667
|
-
import
|
|
667
|
+
import React17 from "react";
|
|
668
668
|
import { cn as cn9, useClassNames as useClassNames8 } from "@marigold/system";
|
|
669
669
|
var Underlay = ({ size, variant, ...props }) => {
|
|
670
670
|
const classNames2 = useClassNames8({ component: "Underlay", size, variant });
|
|
671
|
-
return /* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ React17.createElement("div", { className: cn9("fixed inset-0 z-40", classNames2), ...props });
|
|
672
672
|
};
|
|
673
673
|
|
|
674
674
|
// src/Overlay/Modal.tsx
|
|
@@ -686,20 +686,20 @@ var Modal = forwardRef6(
|
|
|
686
686
|
);
|
|
687
687
|
usePreventScroll();
|
|
688
688
|
const { modalProps } = useModal({});
|
|
689
|
-
return /* @__PURE__ */
|
|
689
|
+
return /* @__PURE__ */ React18.createElement(FocusScope, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React18.createElement(Underlay, { ...underlayProps, variant: "modal" }), /* @__PURE__ */ React18.createElement(
|
|
690
690
|
"div",
|
|
691
691
|
{
|
|
692
692
|
className: "pointer-none fixed inset-0 z-50 flex items-center justify-center",
|
|
693
693
|
ref: modalRef,
|
|
694
694
|
...mergeProps5(props, overlayProps, modalProps)
|
|
695
695
|
},
|
|
696
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ React18.createElement("div", { style: { pointerEvents: "auto" } }, children)
|
|
697
697
|
));
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
700
|
|
|
701
701
|
// src/Overlay/Overlay.tsx
|
|
702
|
-
import
|
|
702
|
+
import React19, { useRef as useRef4 } from "react";
|
|
703
703
|
import {
|
|
704
704
|
Overlay as ReactAriaOverlay
|
|
705
705
|
} from "@react-aria/overlays";
|
|
@@ -711,7 +711,7 @@ var Overlay = ({ children, container, open }) => {
|
|
|
711
711
|
if (!mountOverlay) {
|
|
712
712
|
return null;
|
|
713
713
|
}
|
|
714
|
-
return /* @__PURE__ */
|
|
714
|
+
return /* @__PURE__ */ React19.createElement(ReactAriaOverlay, { portalContainer: container }, /* @__PURE__ */ React19.createElement(
|
|
715
715
|
"div",
|
|
716
716
|
{
|
|
717
717
|
ref: nodeRef,
|
|
@@ -724,18 +724,19 @@ var Overlay = ({ children, container, open }) => {
|
|
|
724
724
|
};
|
|
725
725
|
|
|
726
726
|
// src/Overlay/Popover.tsx
|
|
727
|
-
import
|
|
727
|
+
import React20, { forwardRef as forwardRef7, useRef as useRef5 } from "react";
|
|
728
728
|
import {
|
|
729
729
|
DismissButton,
|
|
730
730
|
usePopover
|
|
731
731
|
} from "@react-aria/overlays";
|
|
732
732
|
import { FocusScope as FocusScope2 } from "@react-aria/focus";
|
|
733
|
+
import { useClassNames as useClassNames9 } from "@marigold/system";
|
|
733
734
|
var Popover = forwardRef7(
|
|
734
735
|
(props, ref) => {
|
|
735
736
|
const fallbackRef = useRef5(null);
|
|
736
737
|
const popoverRef = ref || fallbackRef;
|
|
737
738
|
let { children, state, ...otherProps } = props;
|
|
738
|
-
return /* @__PURE__ */
|
|
739
|
+
return /* @__PURE__ */ React20.createElement(Overlay, { open: state.isOpen, ...otherProps }, /* @__PURE__ */ React20.createElement(PopoverWrapper, { ref: popoverRef, ...props }, children));
|
|
739
740
|
}
|
|
740
741
|
);
|
|
741
742
|
var PopoverWrapper = forwardRef7(
|
|
@@ -756,11 +757,15 @@ var PopoverWrapper = forwardRef7(
|
|
|
756
757
|
},
|
|
757
758
|
state
|
|
758
759
|
);
|
|
759
|
-
|
|
760
|
+
const classNames2 = useClassNames9({
|
|
761
|
+
component: "Popover",
|
|
762
|
+
variant: placement
|
|
763
|
+
});
|
|
764
|
+
return /* @__PURE__ */ React20.createElement(FocusScope2, { restoreFocus: true }, !isNonModal && /* @__PURE__ */ React20.createElement(Underlay, { ...underlayProps }), /* @__PURE__ */ React20.createElement(
|
|
760
765
|
"div",
|
|
761
766
|
{
|
|
762
767
|
...popoverProps,
|
|
763
|
-
className:
|
|
768
|
+
className: classNames2,
|
|
764
769
|
style: {
|
|
765
770
|
...popoverProps.style,
|
|
766
771
|
minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
|
|
@@ -768,15 +773,15 @@ var PopoverWrapper = forwardRef7(
|
|
|
768
773
|
ref,
|
|
769
774
|
role: "presentation"
|
|
770
775
|
},
|
|
771
|
-
!isNonModal && /* @__PURE__ */
|
|
776
|
+
!isNonModal && /* @__PURE__ */ React20.createElement(DismissButton, { onDismiss: state.close }),
|
|
772
777
|
children,
|
|
773
|
-
/* @__PURE__ */
|
|
778
|
+
/* @__PURE__ */ React20.createElement(DismissButton, { onDismiss: state.close })
|
|
774
779
|
));
|
|
775
780
|
}
|
|
776
781
|
);
|
|
777
782
|
|
|
778
783
|
// src/Overlay/Tray.tsx
|
|
779
|
-
import
|
|
784
|
+
import React21 from "react";
|
|
780
785
|
import { FocusScope as FocusScope3 } from "@react-aria/focus";
|
|
781
786
|
import {
|
|
782
787
|
DismissButton as DismissButton2,
|
|
@@ -787,7 +792,7 @@ import { forwardRef as forwardRef8 } from "react";
|
|
|
787
792
|
var Tray = forwardRef8(
|
|
788
793
|
({ state, children, ...props }, ref) => {
|
|
789
794
|
const trayRef = useObjectRef4(ref);
|
|
790
|
-
return /* @__PURE__ */
|
|
795
|
+
return /* @__PURE__ */ React21.createElement(Overlay, { open: state.isOpen }, /* @__PURE__ */ React21.createElement(TrayWrapper, { state, ...props, ref: trayRef }, children));
|
|
791
796
|
}
|
|
792
797
|
);
|
|
793
798
|
var TrayWrapper = forwardRef8(
|
|
@@ -800,7 +805,7 @@ var TrayWrapper = forwardRef8(
|
|
|
800
805
|
state,
|
|
801
806
|
ref
|
|
802
807
|
);
|
|
803
|
-
return /* @__PURE__ */
|
|
808
|
+
return /* @__PURE__ */ React21.createElement(FocusScope3, { contain: true, restoreFocus: true, autoFocus: true }, /* @__PURE__ */ React21.createElement(Underlay, { ...underlayProps, variant: "modal" }, /* @__PURE__ */ React21.createElement(
|
|
804
809
|
"div",
|
|
805
810
|
{
|
|
806
811
|
...modalProps,
|
|
@@ -808,15 +813,15 @@ var TrayWrapper = forwardRef8(
|
|
|
808
813
|
className: "absolute bottom-0 w-full",
|
|
809
814
|
"data-testid": "tray"
|
|
810
815
|
},
|
|
811
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ React21.createElement(DismissButton2, { onDismiss: state.close }),
|
|
812
817
|
children,
|
|
813
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ React21.createElement(DismissButton2, { onDismiss: state.close })
|
|
814
819
|
)));
|
|
815
820
|
}
|
|
816
821
|
);
|
|
817
822
|
|
|
818
823
|
// src/Autocomplete/ClearButton.tsx
|
|
819
|
-
import
|
|
824
|
+
import React22, { useRef as useRef6 } from "react";
|
|
820
825
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
821
826
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
822
827
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
@@ -864,7 +869,7 @@ var ClearButton = ({
|
|
|
864
869
|
focusVisible: isFocusVisible,
|
|
865
870
|
hover: isHovered
|
|
866
871
|
});
|
|
867
|
-
return /* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ React22.createElement(
|
|
868
873
|
"button",
|
|
869
874
|
{
|
|
870
875
|
...mergeProps6(buttonProps, focusProps, hoverProps, props),
|
|
@@ -875,7 +880,7 @@ var ClearButton = ({
|
|
|
875
880
|
className
|
|
876
881
|
)
|
|
877
882
|
},
|
|
878
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ React22.createElement(
|
|
879
884
|
"svg",
|
|
880
885
|
{
|
|
881
886
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -884,13 +889,13 @@ var ClearButton = ({
|
|
|
884
889
|
width: 20,
|
|
885
890
|
height: 20
|
|
886
891
|
},
|
|
887
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ React22.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" })
|
|
888
893
|
)
|
|
889
894
|
);
|
|
890
895
|
};
|
|
891
896
|
|
|
892
897
|
// src/Autocomplete/Autocomplete.tsx
|
|
893
|
-
var SearchIcon = (props) => /* @__PURE__ */
|
|
898
|
+
var SearchIcon = (props) => /* @__PURE__ */ React23.createElement(
|
|
894
899
|
"svg",
|
|
895
900
|
{
|
|
896
901
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -900,7 +905,7 @@ var SearchIcon = (props) => /* @__PURE__ */ React22.createElement(
|
|
|
900
905
|
height: 24,
|
|
901
906
|
...props
|
|
902
907
|
},
|
|
903
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ React23.createElement("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" })
|
|
904
909
|
);
|
|
905
910
|
var Autocomplete = ({
|
|
906
911
|
disabled,
|
|
@@ -954,7 +959,7 @@ var Autocomplete = ({
|
|
|
954
959
|
state
|
|
955
960
|
);
|
|
956
961
|
const { isDisabled, ...restClearButtonProps } = clearButtonProps;
|
|
957
|
-
return /* @__PURE__ */
|
|
962
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
|
|
958
963
|
FieldBase,
|
|
959
964
|
{
|
|
960
965
|
label: props.label,
|
|
@@ -965,13 +970,13 @@ var Autocomplete = ({
|
|
|
965
970
|
disabled,
|
|
966
971
|
width
|
|
967
972
|
},
|
|
968
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ React23.createElement(
|
|
969
974
|
Input,
|
|
970
975
|
{
|
|
971
976
|
...inputProps,
|
|
972
977
|
ref: inputRef,
|
|
973
|
-
icon: /* @__PURE__ */
|
|
974
|
-
action: state.inputValue !== "" ? /* @__PURE__ */
|
|
978
|
+
icon: /* @__PURE__ */ React23.createElement(SearchIcon, null),
|
|
979
|
+
action: state.inputValue !== "" ? /* @__PURE__ */ React23.createElement(
|
|
975
980
|
ClearButton,
|
|
976
981
|
{
|
|
977
982
|
preventFocus: true,
|
|
@@ -981,7 +986,7 @@ var Autocomplete = ({
|
|
|
981
986
|
) : null
|
|
982
987
|
}
|
|
983
988
|
)
|
|
984
|
-
), /* @__PURE__ */
|
|
989
|
+
), /* @__PURE__ */ React23.createElement(
|
|
985
990
|
Popover,
|
|
986
991
|
{
|
|
987
992
|
state,
|
|
@@ -990,13 +995,13 @@ var Autocomplete = ({
|
|
|
990
995
|
scrollRef: listBoxRef,
|
|
991
996
|
isNonModal: true
|
|
992
997
|
},
|
|
993
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ React23.createElement(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
994
999
|
));
|
|
995
1000
|
};
|
|
996
1001
|
Autocomplete.Item = Item2;
|
|
997
1002
|
|
|
998
1003
|
// src/ComboBox/ComboBox.tsx
|
|
999
|
-
import
|
|
1004
|
+
import React24 from "react";
|
|
1000
1005
|
import { useComboBoxState as useComboBoxState2 } from "@react-stately/combobox";
|
|
1001
1006
|
import { useComboBox } from "@react-aria/combobox";
|
|
1002
1007
|
import { useFilter as useFilter2 } from "@react-aria/i18n";
|
|
@@ -1026,10 +1031,10 @@ var ComboBox = ({
|
|
|
1026
1031
|
};
|
|
1027
1032
|
const { contains } = useFilter2({ sensitivity: "base" });
|
|
1028
1033
|
const state = useComboBoxState2({ ...props, defaultFilter: contains });
|
|
1029
|
-
const buttonRef =
|
|
1030
|
-
const inputRef =
|
|
1031
|
-
const listBoxRef =
|
|
1032
|
-
const popoverRef =
|
|
1034
|
+
const buttonRef = React24.useRef(null);
|
|
1035
|
+
const inputRef = React24.useRef(null);
|
|
1036
|
+
const listBoxRef = React24.useRef(null);
|
|
1037
|
+
const popoverRef = React24.useRef(null);
|
|
1033
1038
|
const {
|
|
1034
1039
|
buttonProps: triggerProps,
|
|
1035
1040
|
inputProps,
|
|
@@ -1042,7 +1047,7 @@ var ComboBox = ({
|
|
|
1042
1047
|
const errorMessageProps = { "aria-invalid": error };
|
|
1043
1048
|
const { buttonProps } = useButton4(triggerProps, buttonRef);
|
|
1044
1049
|
const { label, description, errorMessage } = props;
|
|
1045
|
-
return /* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
|
|
1046
1051
|
FieldBase,
|
|
1047
1052
|
{
|
|
1048
1053
|
label,
|
|
@@ -1053,23 +1058,23 @@ var ComboBox = ({
|
|
|
1053
1058
|
errorMessageProps,
|
|
1054
1059
|
width
|
|
1055
1060
|
},
|
|
1056
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ React24.createElement(
|
|
1057
1062
|
Input,
|
|
1058
1063
|
{
|
|
1059
1064
|
...inputProps,
|
|
1060
1065
|
ref: inputRef,
|
|
1061
|
-
action: /* @__PURE__ */
|
|
1066
|
+
action: /* @__PURE__ */ React24.createElement(
|
|
1062
1067
|
Button,
|
|
1063
1068
|
{
|
|
1064
1069
|
className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0",
|
|
1065
1070
|
ref: buttonRef,
|
|
1066
1071
|
...buttonProps
|
|
1067
1072
|
},
|
|
1068
|
-
/* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ React24.createElement(ChevronDown, { className: "h-4 w-4" })
|
|
1069
1074
|
)
|
|
1070
1075
|
}
|
|
1071
1076
|
)
|
|
1072
|
-
), /* @__PURE__ */
|
|
1077
|
+
), /* @__PURE__ */ React24.createElement(
|
|
1073
1078
|
Popover,
|
|
1074
1079
|
{
|
|
1075
1080
|
state,
|
|
@@ -1078,21 +1083,21 @@ var ComboBox = ({
|
|
|
1078
1083
|
scrollRef: listBoxRef,
|
|
1079
1084
|
isNonModal: true
|
|
1080
1085
|
},
|
|
1081
|
-
/* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ React24.createElement(ListBox, { ref: listBoxRef, state, ...listBoxProps })
|
|
1082
1087
|
));
|
|
1083
1088
|
};
|
|
1084
1089
|
ComboBox.Item = Item3;
|
|
1085
1090
|
|
|
1086
1091
|
// src/Badge/Badge.tsx
|
|
1087
|
-
import
|
|
1088
|
-
import { useClassNames as
|
|
1092
|
+
import React25 from "react";
|
|
1093
|
+
import { useClassNames as useClassNames10 } from "@marigold/system";
|
|
1089
1094
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
1090
|
-
const classNames2 =
|
|
1091
|
-
return /* @__PURE__ */
|
|
1095
|
+
const classNames2 = useClassNames10({ component: "Badge", variant, size });
|
|
1096
|
+
return /* @__PURE__ */ React25.createElement("div", { ...props, className: classNames2 }, children);
|
|
1092
1097
|
};
|
|
1093
1098
|
|
|
1094
1099
|
// src/Breakout/Breakout.tsx
|
|
1095
|
-
import
|
|
1100
|
+
import React26 from "react";
|
|
1096
1101
|
import { cn as cn11, createVar as createVar4, alignment } from "@marigold/system";
|
|
1097
1102
|
var Breakout = ({
|
|
1098
1103
|
height,
|
|
@@ -1103,7 +1108,7 @@ var Breakout = ({
|
|
|
1103
1108
|
...props
|
|
1104
1109
|
}) => {
|
|
1105
1110
|
var _a, _b, _c, _d;
|
|
1106
|
-
return /* @__PURE__ */
|
|
1111
|
+
return /* @__PURE__ */ React26.createElement(
|
|
1107
1112
|
"div",
|
|
1108
1113
|
{
|
|
1109
1114
|
className: cn11(
|
|
@@ -1121,15 +1126,15 @@ var Breakout = ({
|
|
|
1121
1126
|
};
|
|
1122
1127
|
|
|
1123
1128
|
// src/Body/Body.tsx
|
|
1124
|
-
import
|
|
1125
|
-
import { useClassNames as
|
|
1129
|
+
import React27 from "react";
|
|
1130
|
+
import { useClassNames as useClassNames11 } from "@marigold/system";
|
|
1126
1131
|
var Body = ({ children, variant, size, ...props }) => {
|
|
1127
|
-
const classNames2 =
|
|
1128
|
-
return /* @__PURE__ */
|
|
1132
|
+
const classNames2 = useClassNames11({ component: "Body", variant, size });
|
|
1133
|
+
return /* @__PURE__ */ React27.createElement("section", { ...props, className: classNames2 }, children);
|
|
1129
1134
|
};
|
|
1130
1135
|
|
|
1131
1136
|
// src/Card/Card.tsx
|
|
1132
|
-
import
|
|
1137
|
+
import React28 from "react";
|
|
1133
1138
|
import {
|
|
1134
1139
|
cn as cn12,
|
|
1135
1140
|
gapSpace as gapSpace2,
|
|
@@ -1140,7 +1145,7 @@ import {
|
|
|
1140
1145
|
paddingSpaceX,
|
|
1141
1146
|
paddingSpaceY,
|
|
1142
1147
|
paddingTop,
|
|
1143
|
-
useClassNames as
|
|
1148
|
+
useClassNames as useClassNames12
|
|
1144
1149
|
} from "@marigold/system";
|
|
1145
1150
|
var Card = ({
|
|
1146
1151
|
children,
|
|
@@ -1156,8 +1161,8 @@ var Card = ({
|
|
|
1156
1161
|
pr,
|
|
1157
1162
|
...props
|
|
1158
1163
|
}) => {
|
|
1159
|
-
const classNames2 =
|
|
1160
|
-
return /* @__PURE__ */
|
|
1164
|
+
const classNames2 = useClassNames12({ component: "Card", variant, size });
|
|
1165
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1161
1166
|
"div",
|
|
1162
1167
|
{
|
|
1163
1168
|
...props,
|
|
@@ -1179,7 +1184,7 @@ var Card = ({
|
|
|
1179
1184
|
};
|
|
1180
1185
|
|
|
1181
1186
|
// src/Center/Center.tsx
|
|
1182
|
-
import
|
|
1187
|
+
import React29 from "react";
|
|
1183
1188
|
import { cn as cn13, createVar as createVar5, gapSpace as gapSpace3 } from "@marigold/system";
|
|
1184
1189
|
var Center = ({
|
|
1185
1190
|
maxWidth = "100%",
|
|
@@ -1187,7 +1192,7 @@ var Center = ({
|
|
|
1187
1192
|
children,
|
|
1188
1193
|
...props
|
|
1189
1194
|
}) => {
|
|
1190
|
-
return /* @__PURE__ */
|
|
1195
|
+
return /* @__PURE__ */ React29.createElement(
|
|
1191
1196
|
"div",
|
|
1192
1197
|
{
|
|
1193
1198
|
className: cn13(
|
|
@@ -1203,16 +1208,27 @@ var Center = ({
|
|
|
1203
1208
|
};
|
|
1204
1209
|
|
|
1205
1210
|
// src/Checkbox/Checkbox.tsx
|
|
1206
|
-
import
|
|
1211
|
+
import React31, { forwardRef as forwardRef9 } from "react";
|
|
1207
1212
|
import { useCheckbox, useCheckboxGroupItem } from "@react-aria/checkbox";
|
|
1208
1213
|
import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
1209
1214
|
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
1210
1215
|
import { useObjectRef as useObjectRef5 } from "@react-aria/utils";
|
|
1211
1216
|
import { useToggleState } from "@react-stately/toggle";
|
|
1212
|
-
import {
|
|
1217
|
+
import {
|
|
1218
|
+
cn as cn14,
|
|
1219
|
+
useClassNames as useClassNames14,
|
|
1220
|
+
useStateProps as useStateProps6
|
|
1221
|
+
} from "@marigold/system";
|
|
1222
|
+
|
|
1223
|
+
// src/Checkbox/CheckboxField.tsx
|
|
1224
|
+
import { createVar as createVar6, useClassNames as useClassNames13 } from "@marigold/system";
|
|
1225
|
+
var CheckboxField = ({ children, labelWidth }) => {
|
|
1226
|
+
const classNames2 = useClassNames13({ component: "Field" });
|
|
1227
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames2 }, /* @__PURE__ */ React.createElement("div", { className: "w-[--labelWidth]", style: createVar6({ labelWidth }) }), children);
|
|
1228
|
+
};
|
|
1213
1229
|
|
|
1214
1230
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1215
|
-
import
|
|
1231
|
+
import React30, { createContext as createContext3, useContext as useContext3 } from "react";
|
|
1216
1232
|
import { useCheckboxGroup } from "@react-aria/checkbox";
|
|
1217
1233
|
import {
|
|
1218
1234
|
useCheckboxGroupState
|
|
@@ -1245,7 +1261,7 @@ var CheckboxGroup = ({
|
|
|
1245
1261
|
readOnly,
|
|
1246
1262
|
error
|
|
1247
1263
|
});
|
|
1248
|
-
return /* @__PURE__ */
|
|
1264
|
+
return /* @__PURE__ */ React30.createElement(
|
|
1249
1265
|
FieldBase,
|
|
1250
1266
|
{
|
|
1251
1267
|
label: props.label,
|
|
@@ -1260,13 +1276,12 @@ var CheckboxGroup = ({
|
|
|
1260
1276
|
width,
|
|
1261
1277
|
...groupProps
|
|
1262
1278
|
},
|
|
1263
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ React30.createElement("div", { role: "presentation", className: "flex flex-col items-start" }, /* @__PURE__ */ React30.createElement(CheckboxGroupContext.Provider, { value: { error, ...state } }, children))
|
|
1264
1280
|
);
|
|
1265
1281
|
};
|
|
1266
1282
|
|
|
1267
1283
|
// src/Checkbox/Checkbox.tsx
|
|
1268
|
-
|
|
1269
|
-
var CheckMark = () => /* @__PURE__ */ React30.createElement("svg", { viewBox: "0 0 12 10" }, /* @__PURE__ */ React30.createElement(
|
|
1284
|
+
var CheckMark = () => /* @__PURE__ */ React31.createElement("svg", { viewBox: "0 0 12 10" }, /* @__PURE__ */ React31.createElement(
|
|
1270
1285
|
"path",
|
|
1271
1286
|
{
|
|
1272
1287
|
fill: "currentColor",
|
|
@@ -1274,7 +1289,7 @@ var CheckMark = () => /* @__PURE__ */ React30.createElement("svg", { viewBox: "0
|
|
|
1274
1289
|
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"
|
|
1275
1290
|
}
|
|
1276
1291
|
));
|
|
1277
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
1292
|
+
var IndeterminateMark = () => /* @__PURE__ */ React31.createElement("svg", { width: "12", height: "3", viewBox: "0 0 12 3" }, /* @__PURE__ */ React31.createElement(
|
|
1278
1293
|
"path",
|
|
1279
1294
|
{
|
|
1280
1295
|
fill: "currentColor",
|
|
@@ -1283,7 +1298,7 @@ var IndeterminateMark = () => /* @__PURE__ */ React30.createElement("svg", { wid
|
|
|
1283
1298
|
}
|
|
1284
1299
|
));
|
|
1285
1300
|
var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
1286
|
-
return /* @__PURE__ */
|
|
1301
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1287
1302
|
"div",
|
|
1288
1303
|
{
|
|
1289
1304
|
"aria-hidden": "true",
|
|
@@ -1296,7 +1311,7 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1296
1311
|
),
|
|
1297
1312
|
...props
|
|
1298
1313
|
},
|
|
1299
|
-
indeterminate ? /* @__PURE__ */
|
|
1314
|
+
indeterminate ? /* @__PURE__ */ React31.createElement(IndeterminateMark, null) : checked ? /* @__PURE__ */ React31.createElement(CheckMark, null) : null
|
|
1300
1315
|
);
|
|
1301
1316
|
};
|
|
1302
1317
|
var Checkbox = forwardRef9(
|
|
@@ -1348,10 +1363,11 @@ var Checkbox = forwardRef9(
|
|
|
1348
1363
|
}),
|
|
1349
1364
|
inputRef
|
|
1350
1365
|
);
|
|
1351
|
-
const classNames2 =
|
|
1366
|
+
const classNames2 = useClassNames14({ component: "Checkbox", variant, size });
|
|
1352
1367
|
const { hoverProps, isHovered } = useHover3({
|
|
1353
1368
|
isDisabled: inputProps.disabled
|
|
1354
1369
|
});
|
|
1370
|
+
const { labelWidth } = useFieldGroupContext();
|
|
1355
1371
|
const { isFocusVisible, focusProps } = useFocusRing4();
|
|
1356
1372
|
const stateProps = useStateProps6({
|
|
1357
1373
|
hover: isHovered,
|
|
@@ -1362,7 +1378,7 @@ var Checkbox = forwardRef9(
|
|
|
1362
1378
|
readOnly,
|
|
1363
1379
|
indeterminate
|
|
1364
1380
|
});
|
|
1365
|
-
|
|
1381
|
+
const component = /* @__PURE__ */ React31.createElement(
|
|
1366
1382
|
"label",
|
|
1367
1383
|
{
|
|
1368
1384
|
className: cn14(
|
|
@@ -1372,7 +1388,7 @@ var Checkbox = forwardRef9(
|
|
|
1372
1388
|
...hoverProps,
|
|
1373
1389
|
...stateProps
|
|
1374
1390
|
},
|
|
1375
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ React31.createElement(
|
|
1376
1392
|
"input",
|
|
1377
1393
|
{
|
|
1378
1394
|
ref: inputRef,
|
|
@@ -1381,7 +1397,7 @@ var Checkbox = forwardRef9(
|
|
|
1381
1397
|
...focusProps
|
|
1382
1398
|
}
|
|
1383
1399
|
),
|
|
1384
|
-
/* @__PURE__ */
|
|
1400
|
+
/* @__PURE__ */ React31.createElement(
|
|
1385
1401
|
Icon,
|
|
1386
1402
|
{
|
|
1387
1403
|
checked: inputProps.checked,
|
|
@@ -1389,18 +1405,19 @@ var Checkbox = forwardRef9(
|
|
|
1389
1405
|
className: classNames2.checkbox
|
|
1390
1406
|
}
|
|
1391
1407
|
),
|
|
1392
|
-
props.children && /* @__PURE__ */
|
|
1408
|
+
props.children && /* @__PURE__ */ React31.createElement("div", { className: classNames2.label }, props.children)
|
|
1393
1409
|
);
|
|
1410
|
+
return !groupState && labelWidth ? /* @__PURE__ */ React31.createElement(CheckboxField, { labelWidth }, component) : component;
|
|
1394
1411
|
}
|
|
1395
1412
|
);
|
|
1396
1413
|
|
|
1397
1414
|
// src/Columns/Columns.tsx
|
|
1398
|
-
import
|
|
1415
|
+
import React32, {
|
|
1399
1416
|
Children as Children2,
|
|
1400
1417
|
cloneElement as cloneElement2,
|
|
1401
1418
|
isValidElement
|
|
1402
1419
|
} from "react";
|
|
1403
|
-
import { cn as cn15, createVar as
|
|
1420
|
+
import { cn as cn15, createVar as createVar7, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1404
1421
|
var Columns = ({
|
|
1405
1422
|
space = 0,
|
|
1406
1423
|
columns,
|
|
@@ -1416,7 +1433,7 @@ var Columns = ({
|
|
|
1416
1433
|
)}`
|
|
1417
1434
|
);
|
|
1418
1435
|
}
|
|
1419
|
-
return /* @__PURE__ */
|
|
1436
|
+
return /* @__PURE__ */ React32.createElement(
|
|
1420
1437
|
"div",
|
|
1421
1438
|
{
|
|
1422
1439
|
className: cn15(
|
|
@@ -1426,13 +1443,13 @@ var Columns = ({
|
|
|
1426
1443
|
),
|
|
1427
1444
|
...props
|
|
1428
1445
|
},
|
|
1429
|
-
Children2.map(children, (child, idx) => /* @__PURE__ */
|
|
1446
|
+
Children2.map(children, (child, idx) => /* @__PURE__ */ React32.createElement(
|
|
1430
1447
|
"div",
|
|
1431
1448
|
{
|
|
1432
1449
|
className: cn15(
|
|
1433
1450
|
"grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1434
1451
|
),
|
|
1435
|
-
style:
|
|
1452
|
+
style: createVar7({ collapseAt, columnSize: columns[idx] })
|
|
1436
1453
|
},
|
|
1437
1454
|
isValidElement(child) ? cloneElement2(child) : child
|
|
1438
1455
|
))
|
|
@@ -1440,10 +1457,10 @@ var Columns = ({
|
|
|
1440
1457
|
};
|
|
1441
1458
|
|
|
1442
1459
|
// src/Container/Container.tsx
|
|
1443
|
-
import
|
|
1460
|
+
import React33 from "react";
|
|
1444
1461
|
import {
|
|
1445
1462
|
cn as cn16,
|
|
1446
|
-
createVar as
|
|
1463
|
+
createVar as createVar8,
|
|
1447
1464
|
placeItems,
|
|
1448
1465
|
gridColsAlign,
|
|
1449
1466
|
gridColumn
|
|
@@ -1467,7 +1484,7 @@ var Container = ({
|
|
|
1467
1484
|
...props
|
|
1468
1485
|
}) => {
|
|
1469
1486
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1470
|
-
return /* @__PURE__ */
|
|
1487
|
+
return /* @__PURE__ */ React33.createElement(
|
|
1471
1488
|
"div",
|
|
1472
1489
|
{
|
|
1473
1490
|
className: cn16(
|
|
@@ -1476,7 +1493,7 @@ var Container = ({
|
|
|
1476
1493
|
gridColsAlign[align],
|
|
1477
1494
|
gridColumn[align]
|
|
1478
1495
|
),
|
|
1479
|
-
style:
|
|
1496
|
+
style: createVar8({ maxWidth }),
|
|
1480
1497
|
...props
|
|
1481
1498
|
},
|
|
1482
1499
|
children
|
|
@@ -1484,14 +1501,14 @@ var Container = ({
|
|
|
1484
1501
|
};
|
|
1485
1502
|
|
|
1486
1503
|
// src/Dialog/Dialog.tsx
|
|
1487
|
-
import
|
|
1504
|
+
import React38, { useRef as useRef9 } from "react";
|
|
1488
1505
|
import { useButton as useButton5 } from "@react-aria/button";
|
|
1489
1506
|
import { useDialog } from "@react-aria/dialog";
|
|
1490
|
-
import { cn as cn19, useClassNames as
|
|
1507
|
+
import { cn as cn19, useClassNames as useClassNames17 } from "@marigold/system";
|
|
1491
1508
|
|
|
1492
1509
|
// src/Header/Header.tsx
|
|
1493
|
-
import
|
|
1494
|
-
import { cn as cn17, useClassNames as
|
|
1510
|
+
import React34 from "react";
|
|
1511
|
+
import { cn as cn17, useClassNames as useClassNames15 } from "@marigold/system";
|
|
1495
1512
|
var Header = ({
|
|
1496
1513
|
children,
|
|
1497
1514
|
variant,
|
|
@@ -1499,21 +1516,21 @@ var Header = ({
|
|
|
1499
1516
|
className,
|
|
1500
1517
|
...props
|
|
1501
1518
|
}) => {
|
|
1502
|
-
const classNames2 =
|
|
1519
|
+
const classNames2 = useClassNames15({
|
|
1503
1520
|
component: "Header",
|
|
1504
1521
|
variant,
|
|
1505
1522
|
size,
|
|
1506
1523
|
className
|
|
1507
1524
|
});
|
|
1508
|
-
return /* @__PURE__ */
|
|
1525
|
+
return /* @__PURE__ */ React34.createElement("header", { ...props, className: cn17(classNames2) }, children);
|
|
1509
1526
|
};
|
|
1510
1527
|
|
|
1511
1528
|
// src/Headline/Headline.tsx
|
|
1512
|
-
import
|
|
1529
|
+
import React35 from "react";
|
|
1513
1530
|
import {
|
|
1514
|
-
useClassNames as
|
|
1531
|
+
useClassNames as useClassNames16,
|
|
1515
1532
|
cn as cn18,
|
|
1516
|
-
createVar as
|
|
1533
|
+
createVar as createVar9,
|
|
1517
1534
|
textAlign,
|
|
1518
1535
|
useTheme as useTheme2,
|
|
1519
1536
|
get
|
|
@@ -1529,18 +1546,18 @@ var Headline = ({
|
|
|
1529
1546
|
...props
|
|
1530
1547
|
}) => {
|
|
1531
1548
|
const theme = useTheme2();
|
|
1532
|
-
const classNames2 =
|
|
1549
|
+
const classNames2 = useClassNames16({
|
|
1533
1550
|
component: "Headline",
|
|
1534
1551
|
variant,
|
|
1535
1552
|
size: size != null ? size : `level-${level}`
|
|
1536
1553
|
});
|
|
1537
1554
|
const Component = as;
|
|
1538
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ React35.createElement(
|
|
1539
1556
|
Component,
|
|
1540
1557
|
{
|
|
1541
1558
|
...props,
|
|
1542
1559
|
className: cn18(classNames2, "text-[--color]", textAlign[align]),
|
|
1543
|
-
style:
|
|
1560
|
+
style: createVar9({
|
|
1544
1561
|
color: color && theme.colors && get(
|
|
1545
1562
|
theme.colors,
|
|
1546
1563
|
color.replace("-", "."),
|
|
@@ -1559,7 +1576,7 @@ var DialogContext = createContext4({});
|
|
|
1559
1576
|
var useDialogContext = () => useContext4(DialogContext);
|
|
1560
1577
|
|
|
1561
1578
|
// src/Dialog/DialogTrigger.tsx
|
|
1562
|
-
import
|
|
1579
|
+
import React36, { useRef as useRef8 } from "react";
|
|
1563
1580
|
import { PressResponder } from "@react-aria/interactions";
|
|
1564
1581
|
import { useOverlayTriggerState } from "@react-stately/overlays";
|
|
1565
1582
|
var DialogTrigger = ({
|
|
@@ -1567,11 +1584,11 @@ var DialogTrigger = ({
|
|
|
1567
1584
|
dismissable = true,
|
|
1568
1585
|
keyboardDismissable = true
|
|
1569
1586
|
}) => {
|
|
1570
|
-
const [dialogTrigger, dialog] =
|
|
1587
|
+
const [dialogTrigger, dialog] = React36.Children.toArray(children);
|
|
1571
1588
|
const dialogTriggerRef = useRef8(null);
|
|
1572
1589
|
const state = useOverlayTriggerState({});
|
|
1573
1590
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1574
|
-
return /* @__PURE__ */
|
|
1591
|
+
return /* @__PURE__ */ React36.createElement(DialogContext.Provider, { value: ctx }, /* @__PURE__ */ React36.createElement(
|
|
1575
1592
|
PressResponder,
|
|
1576
1593
|
{
|
|
1577
1594
|
ref: dialogTriggerRef,
|
|
@@ -1579,7 +1596,7 @@ var DialogTrigger = ({
|
|
|
1579
1596
|
onPress: state.toggle
|
|
1580
1597
|
},
|
|
1581
1598
|
dialogTrigger
|
|
1582
|
-
), /* @__PURE__ */
|
|
1599
|
+
), /* @__PURE__ */ React36.createElement(Overlay, { open: state.isOpen }, /* @__PURE__ */ React36.createElement(
|
|
1583
1600
|
Modal,
|
|
1584
1601
|
{
|
|
1585
1602
|
open: state.isOpen,
|
|
@@ -1593,7 +1610,7 @@ var DialogTrigger = ({
|
|
|
1593
1610
|
|
|
1594
1611
|
// src/Dialog/DialogController.tsx
|
|
1595
1612
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
|
1596
|
-
import
|
|
1613
|
+
import React37 from "react";
|
|
1597
1614
|
var DialogController = ({
|
|
1598
1615
|
children,
|
|
1599
1616
|
dismissable = true,
|
|
@@ -1606,7 +1623,7 @@ var DialogController = ({
|
|
|
1606
1623
|
onOpenChange
|
|
1607
1624
|
});
|
|
1608
1625
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1609
|
-
return /* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ React37.createElement(DialogContext.Provider, { value: ctx }, /* @__PURE__ */ React37.createElement(Overlay, { open: state.isOpen }, /* @__PURE__ */ React37.createElement(
|
|
1610
1627
|
Modal,
|
|
1611
1628
|
{
|
|
1612
1629
|
open: state.isOpen,
|
|
@@ -1628,7 +1645,7 @@ var CloseButton = ({ className }) => {
|
|
|
1628
1645
|
},
|
|
1629
1646
|
ref
|
|
1630
1647
|
);
|
|
1631
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ React38.createElement("div", { className: "flex justify-end" }, /* @__PURE__ */ React38.createElement(
|
|
1632
1649
|
"button",
|
|
1633
1650
|
{
|
|
1634
1651
|
className: cn19(
|
|
@@ -1638,7 +1655,7 @@ var CloseButton = ({ className }) => {
|
|
|
1638
1655
|
ref,
|
|
1639
1656
|
...buttonProps
|
|
1640
1657
|
},
|
|
1641
|
-
/* @__PURE__ */
|
|
1658
|
+
/* @__PURE__ */ React38.createElement("svg", { viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React38.createElement(
|
|
1642
1659
|
"path",
|
|
1643
1660
|
{
|
|
1644
1661
|
fillRule: "evenodd",
|
|
@@ -1649,9 +1666,9 @@ var CloseButton = ({ className }) => {
|
|
|
1649
1666
|
));
|
|
1650
1667
|
};
|
|
1651
1668
|
var addTitleProps = (children, titleProps) => {
|
|
1652
|
-
const childs =
|
|
1669
|
+
const childs = React38.Children.toArray(children);
|
|
1653
1670
|
const titleIndex = childs.findIndex(
|
|
1654
|
-
(child) =>
|
|
1671
|
+
(child) => React38.isValidElement(child) && (child.type === Header || child.type === Headline)
|
|
1655
1672
|
);
|
|
1656
1673
|
if (titleIndex < 0) {
|
|
1657
1674
|
console.warn(
|
|
@@ -1659,7 +1676,7 @@ var addTitleProps = (children, titleProps) => {
|
|
|
1659
1676
|
);
|
|
1660
1677
|
return children;
|
|
1661
1678
|
}
|
|
1662
|
-
const titleChild =
|
|
1679
|
+
const titleChild = React38.cloneElement(
|
|
1663
1680
|
childs[titleIndex],
|
|
1664
1681
|
titleProps
|
|
1665
1682
|
);
|
|
@@ -1676,35 +1693,35 @@ var Dialog = ({
|
|
|
1676
1693
|
const ref = useRef9(null);
|
|
1677
1694
|
const { close } = useDialogContext();
|
|
1678
1695
|
const { dialogProps, titleProps } = useDialog(props, ref);
|
|
1679
|
-
const classNames2 =
|
|
1680
|
-
return /* @__PURE__ */
|
|
1696
|
+
const classNames2 = useClassNames17({ component: "Dialog", variant, size });
|
|
1697
|
+
return /* @__PURE__ */ React38.createElement("div", { className: classNames2.container, ...dialogProps }, closeButton && /* @__PURE__ */ React38.createElement(CloseButton, { className: classNames2.closeButton }), typeof children === "function" ? children({ close, titleProps }) : props["aria-labelledby"] ? children : addTitleProps(children, titleProps));
|
|
1681
1698
|
};
|
|
1682
1699
|
Dialog.Trigger = DialogTrigger;
|
|
1683
1700
|
Dialog.Controller = DialogController;
|
|
1684
1701
|
|
|
1685
1702
|
// src/Divider/Divider.tsx
|
|
1686
|
-
import
|
|
1703
|
+
import React39 from "react";
|
|
1687
1704
|
import { useSeparator } from "@react-aria/separator";
|
|
1688
|
-
import { useClassNames as
|
|
1705
|
+
import { useClassNames as useClassNames18 } from "@marigold/system";
|
|
1689
1706
|
var Divider = ({ variant, ...props }) => {
|
|
1690
1707
|
const { separatorProps } = useSeparator(props);
|
|
1691
|
-
const classNames2 =
|
|
1692
|
-
return /* @__PURE__ */
|
|
1708
|
+
const classNames2 = useClassNames18({ component: "Divider", variant });
|
|
1709
|
+
return /* @__PURE__ */ React39.createElement("div", { className: classNames2, ...props, ...separatorProps });
|
|
1693
1710
|
};
|
|
1694
1711
|
|
|
1695
1712
|
// src/Footer/Footer.tsx
|
|
1696
|
-
import
|
|
1697
|
-
import { useClassNames as
|
|
1713
|
+
import React40 from "react";
|
|
1714
|
+
import { useClassNames as useClassNames19 } from "@marigold/system";
|
|
1698
1715
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1699
|
-
const classNames2 =
|
|
1700
|
-
return /* @__PURE__ */
|
|
1716
|
+
const classNames2 = useClassNames19({ component: "Footer", variant, size });
|
|
1717
|
+
return /* @__PURE__ */ React40.createElement("footer", { ...props, className: classNames2 }, children);
|
|
1701
1718
|
};
|
|
1702
1719
|
|
|
1703
1720
|
// src/Image/Image.tsx
|
|
1704
|
-
import
|
|
1721
|
+
import React41 from "react";
|
|
1705
1722
|
import {
|
|
1706
1723
|
cn as cn20,
|
|
1707
|
-
useClassNames as
|
|
1724
|
+
useClassNames as useClassNames20,
|
|
1708
1725
|
objectFit,
|
|
1709
1726
|
objectPosition
|
|
1710
1727
|
} from "@marigold/system";
|
|
@@ -1715,8 +1732,8 @@ var Image = ({
|
|
|
1715
1732
|
position = "none",
|
|
1716
1733
|
...props
|
|
1717
1734
|
}) => {
|
|
1718
|
-
const classNames2 =
|
|
1719
|
-
return /* @__PURE__ */
|
|
1735
|
+
const classNames2 = useClassNames20({ component: "Image", variant, size });
|
|
1736
|
+
return /* @__PURE__ */ React41.createElement(
|
|
1720
1737
|
"img",
|
|
1721
1738
|
{
|
|
1722
1739
|
...props,
|
|
@@ -1732,7 +1749,7 @@ var Image = ({
|
|
|
1732
1749
|
};
|
|
1733
1750
|
|
|
1734
1751
|
// src/Inline/Inline.tsx
|
|
1735
|
-
import
|
|
1752
|
+
import React42 from "react";
|
|
1736
1753
|
import {
|
|
1737
1754
|
gapSpace as gapSpace5,
|
|
1738
1755
|
alignment as alignment2,
|
|
@@ -1747,7 +1764,7 @@ var Inline = ({
|
|
|
1747
1764
|
...props
|
|
1748
1765
|
}) => {
|
|
1749
1766
|
var _a2, _b2, _c, _d;
|
|
1750
|
-
return /* @__PURE__ */
|
|
1767
|
+
return /* @__PURE__ */ React42.createElement(
|
|
1751
1768
|
"div",
|
|
1752
1769
|
{
|
|
1753
1770
|
className: cn21(
|
|
@@ -1763,15 +1780,15 @@ var Inline = ({
|
|
|
1763
1780
|
};
|
|
1764
1781
|
|
|
1765
1782
|
// src/DateField/DateField.tsx
|
|
1766
|
-
import
|
|
1783
|
+
import React44, { useRef as useRef11 } from "react";
|
|
1767
1784
|
import { useLocale } from "@react-aria/i18n";
|
|
1768
1785
|
import { useDateFieldState } from "@react-stately/datepicker";
|
|
1769
1786
|
import { useDateField } from "@react-aria/datepicker";
|
|
1770
1787
|
import { createCalendar } from "@internationalized/date";
|
|
1771
|
-
import { cn as cn23, useClassNames as
|
|
1788
|
+
import { cn as cn23, useClassNames as useClassNames21, useStateProps as useStateProps8 } from "@marigold/system";
|
|
1772
1789
|
|
|
1773
1790
|
// src/DateField/DateSegment.tsx
|
|
1774
|
-
import
|
|
1791
|
+
import React43, { useRef as useRef10 } from "react";
|
|
1775
1792
|
import { cn as cn22, useStateProps as useStateProps7 } from "@marigold/system";
|
|
1776
1793
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
1777
1794
|
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
@@ -1793,7 +1810,7 @@ var DateSegment = ({
|
|
|
1793
1810
|
focusVisible: isFocused
|
|
1794
1811
|
});
|
|
1795
1812
|
const { isPlaceholder, placeholder, text, type, maxValue } = segment;
|
|
1796
|
-
return /* @__PURE__ */
|
|
1813
|
+
return /* @__PURE__ */ React43.createElement(
|
|
1797
1814
|
"div",
|
|
1798
1815
|
{
|
|
1799
1816
|
...mergeProps7(segmentProps, stateProps, focusProps),
|
|
@@ -1809,7 +1826,7 @@ var DateSegment = ({
|
|
|
1809
1826
|
minWidth: maxValue != null ? String(maxValue).length + "ch" : void 0
|
|
1810
1827
|
}
|
|
1811
1828
|
},
|
|
1812
|
-
/* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ React43.createElement(
|
|
1813
1830
|
"span",
|
|
1814
1831
|
{
|
|
1815
1832
|
"aria-hidden": "true",
|
|
@@ -1820,7 +1837,7 @@ var DateSegment = ({
|
|
|
1820
1837
|
},
|
|
1821
1838
|
isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1822
1839
|
),
|
|
1823
|
-
/* @__PURE__ */
|
|
1840
|
+
/* @__PURE__ */ React43.createElement("span", null, isPlaceholder ? "" : type === "month" || type === "day" ? Number(text) < 10 ? "0" + text : text : text)
|
|
1824
1841
|
);
|
|
1825
1842
|
};
|
|
1826
1843
|
|
|
@@ -1862,7 +1879,7 @@ var DateField = ({
|
|
|
1862
1879
|
state,
|
|
1863
1880
|
ref
|
|
1864
1881
|
);
|
|
1865
|
-
const classNames2 =
|
|
1882
|
+
const classNames2 = useClassNames21({ component: "DateField", variant, size });
|
|
1866
1883
|
const { focusProps, isFocused } = useFocusRing6({
|
|
1867
1884
|
within: true,
|
|
1868
1885
|
isTextInput: true,
|
|
@@ -1877,7 +1894,7 @@ var DateField = ({
|
|
|
1877
1894
|
required,
|
|
1878
1895
|
focus: isFocused || isPressed
|
|
1879
1896
|
});
|
|
1880
|
-
return /* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1881
1898
|
FieldBase,
|
|
1882
1899
|
{
|
|
1883
1900
|
error,
|
|
@@ -1893,7 +1910,7 @@ var DateField = ({
|
|
|
1893
1910
|
size,
|
|
1894
1911
|
width
|
|
1895
1912
|
},
|
|
1896
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ React44.createElement(
|
|
1897
1914
|
"div",
|
|
1898
1915
|
{
|
|
1899
1916
|
...mergeProps8(fieldProps, focusProps, stateProps, hoverProps),
|
|
@@ -1905,9 +1922,9 @@ var DateField = ({
|
|
|
1905
1922
|
"data-testid": "date-field",
|
|
1906
1923
|
ref: triggerRef
|
|
1907
1924
|
},
|
|
1908
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ React44.createElement("div", { ref, className: "flex basis-full items-center" }, state.segments.map((segment, i) => {
|
|
1909
1926
|
var _a;
|
|
1910
|
-
return /* @__PURE__ */
|
|
1927
|
+
return /* @__PURE__ */ React44.createElement(
|
|
1911
1928
|
DateSegment,
|
|
1912
1929
|
{
|
|
1913
1930
|
className: classNames2.segment,
|
|
@@ -1918,7 +1935,7 @@ var DateField = ({
|
|
|
1918
1935
|
}
|
|
1919
1936
|
);
|
|
1920
1937
|
})),
|
|
1921
|
-
action ? action : /* @__PURE__ */
|
|
1938
|
+
action ? action : /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-center" }, /* @__PURE__ */ React44.createElement(
|
|
1922
1939
|
"svg",
|
|
1923
1940
|
{
|
|
1924
1941
|
"data-testid": "action",
|
|
@@ -1927,14 +1944,14 @@ var DateField = ({
|
|
|
1927
1944
|
width: 24,
|
|
1928
1945
|
height: 24
|
|
1929
1946
|
},
|
|
1930
|
-
/* @__PURE__ */
|
|
1947
|
+
/* @__PURE__ */ React44.createElement("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" })
|
|
1931
1948
|
))
|
|
1932
1949
|
)
|
|
1933
1950
|
);
|
|
1934
1951
|
};
|
|
1935
1952
|
|
|
1936
1953
|
// src/Calendar/Calendar.tsx
|
|
1937
|
-
import
|
|
1954
|
+
import React50, { useRef as useRef14 } from "react";
|
|
1938
1955
|
import { useCalendarState } from "@react-stately/calendar";
|
|
1939
1956
|
import {
|
|
1940
1957
|
useCalendar
|
|
@@ -1943,23 +1960,23 @@ import { useLocale as useLocale3 } from "@react-aria/i18n";
|
|
|
1943
1960
|
import { createCalendar as createCalendar2 } from "@internationalized/date";
|
|
1944
1961
|
|
|
1945
1962
|
// src/Calendar/CalendarGrid.tsx
|
|
1946
|
-
import
|
|
1963
|
+
import React46 from "react";
|
|
1947
1964
|
import { useMemo } from "react";
|
|
1948
1965
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1949
1966
|
import { useLocale as useLocale2 } from "@react-aria/i18n";
|
|
1950
1967
|
import { getWeeksInMonth, startOfWeek, today } from "@internationalized/date";
|
|
1951
1968
|
|
|
1952
1969
|
// src/Calendar/CalendarCell.tsx
|
|
1953
|
-
import
|
|
1970
|
+
import React45, { useRef as useRef12 } from "react";
|
|
1954
1971
|
import { useCalendarCell } from "@react-aria/calendar";
|
|
1955
1972
|
import { mergeProps as mergeProps9 } from "@react-aria/utils";
|
|
1956
|
-
import { cn as cn24, useClassNames as
|
|
1973
|
+
import { cn as cn24, useClassNames as useClassNames22, useStateProps as useStateProps9 } from "@marigold/system";
|
|
1957
1974
|
import { useHover as useHover5 } from "@react-aria/interactions";
|
|
1958
1975
|
var CalendarCell = (props) => {
|
|
1959
1976
|
const ref = useRef12(null);
|
|
1960
1977
|
const { state } = props;
|
|
1961
1978
|
let { cellProps, buttonProps, formattedDate, isOutsideVisibleRange } = useCalendarCell(props, state, ref);
|
|
1962
|
-
const classNames2 =
|
|
1979
|
+
const classNames2 = useClassNames22({
|
|
1963
1980
|
component: "Calendar"
|
|
1964
1981
|
});
|
|
1965
1982
|
const isDisabled = cellProps["aria-disabled"];
|
|
@@ -1971,7 +1988,7 @@ var CalendarCell = (props) => {
|
|
|
1971
1988
|
hover: isHovered,
|
|
1972
1989
|
selected: cellProps["aria-selected"]
|
|
1973
1990
|
});
|
|
1974
|
-
return /* @__PURE__ */
|
|
1991
|
+
return /* @__PURE__ */ React45.createElement("td", { className: "group/cell", ...cellProps }, /* @__PURE__ */ React45.createElement(
|
|
1975
1992
|
"div",
|
|
1976
1993
|
{
|
|
1977
1994
|
className: cn24(
|
|
@@ -2007,37 +2024,37 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
2007
2024
|
return dayFormatter.format(dateDay);
|
|
2008
2025
|
});
|
|
2009
2026
|
}, [locale, state.timeZone, dayFormatter]);
|
|
2010
|
-
return /* @__PURE__ */
|
|
2027
|
+
return /* @__PURE__ */ React46.createElement(
|
|
2011
2028
|
"table",
|
|
2012
2029
|
{
|
|
2013
2030
|
className: "w-full border-spacing-[6px]",
|
|
2014
2031
|
...gridProps,
|
|
2015
2032
|
cellPadding: "8"
|
|
2016
2033
|
},
|
|
2017
|
-
/* @__PURE__ */
|
|
2018
|
-
/* @__PURE__ */
|
|
2019
|
-
(date, i) => date ? /* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ React46.createElement("thead", { ...headerProps }, /* @__PURE__ */ React46.createElement("tr", null, weekDays.map((day, index) => /* @__PURE__ */ React46.createElement("th", { style: { fontWeight: "bolder" }, key: index }, day.substring(0, 2))))),
|
|
2035
|
+
/* @__PURE__ */ React46.createElement("tbody", null, [...new Array(numberOfWeeksInMonth).keys()].map((weekIndex) => /* @__PURE__ */ React46.createElement("tr", { key: weekIndex }, state.getDatesInWeek(weekIndex).map(
|
|
2036
|
+
(date, i) => date ? /* @__PURE__ */ React46.createElement(
|
|
2020
2037
|
CalendarCell,
|
|
2021
2038
|
{
|
|
2022
2039
|
key: i,
|
|
2023
2040
|
date,
|
|
2024
2041
|
state
|
|
2025
2042
|
}
|
|
2026
|
-
) : /* @__PURE__ */
|
|
2043
|
+
) : /* @__PURE__ */ React46.createElement("td", { key: i })
|
|
2027
2044
|
))))
|
|
2028
2045
|
);
|
|
2029
2046
|
};
|
|
2030
2047
|
|
|
2031
2048
|
// src/Calendar/Calendar.tsx
|
|
2032
2049
|
import { ChevronRight, ChevronLeft } from "@marigold/icons";
|
|
2033
|
-
import { cn as cn26, useClassNames as
|
|
2050
|
+
import { cn as cn26, useClassNames as useClassNames24, useStateProps as useStateProps11 } from "@marigold/system";
|
|
2034
2051
|
|
|
2035
2052
|
// src/Calendar/MonthDropdown.tsx
|
|
2036
|
-
import
|
|
2053
|
+
import React48 from "react";
|
|
2037
2054
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
2038
2055
|
|
|
2039
2056
|
// src/Select/Select.tsx
|
|
2040
|
-
import
|
|
2057
|
+
import React47, {
|
|
2041
2058
|
forwardRef as forwardRef10,
|
|
2042
2059
|
useRef as useRef13
|
|
2043
2060
|
} from "react";
|
|
@@ -2050,7 +2067,7 @@ import { Item as Item4, Section } from "@react-stately/collections";
|
|
|
2050
2067
|
import { mergeProps as mergeProps10, useObjectRef as useObjectRef6 } from "@react-aria/utils";
|
|
2051
2068
|
import {
|
|
2052
2069
|
cn as cn25,
|
|
2053
|
-
useClassNames as
|
|
2070
|
+
useClassNames as useClassNames23,
|
|
2054
2071
|
useSmallScreen,
|
|
2055
2072
|
useStateProps as useStateProps10
|
|
2056
2073
|
} from "@marigold/system";
|
|
@@ -2104,7 +2121,7 @@ var Select = forwardRef10(
|
|
|
2104
2121
|
buttonRef
|
|
2105
2122
|
);
|
|
2106
2123
|
const { focusProps, isFocusVisible } = useFocusRing7();
|
|
2107
|
-
const classNames2 =
|
|
2124
|
+
const classNames2 = useClassNames23({ component: "Select", variant, size });
|
|
2108
2125
|
const isSmallScreen = useSmallScreen();
|
|
2109
2126
|
const stateProps = useStateProps10({
|
|
2110
2127
|
disabled,
|
|
@@ -2113,7 +2130,7 @@ var Select = forwardRef10(
|
|
|
2113
2130
|
expanded: state.isOpen,
|
|
2114
2131
|
required
|
|
2115
2132
|
});
|
|
2116
|
-
return /* @__PURE__ */
|
|
2133
|
+
return /* @__PURE__ */ React47.createElement(
|
|
2117
2134
|
FieldBase,
|
|
2118
2135
|
{
|
|
2119
2136
|
variant,
|
|
@@ -2129,7 +2146,7 @@ var Select = forwardRef10(
|
|
|
2129
2146
|
stateProps,
|
|
2130
2147
|
disabled
|
|
2131
2148
|
},
|
|
2132
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ React47.createElement(
|
|
2133
2150
|
HiddenSelect,
|
|
2134
2151
|
{
|
|
2135
2152
|
state,
|
|
@@ -2139,7 +2156,7 @@ var Select = forwardRef10(
|
|
|
2139
2156
|
isDisabled: disabled
|
|
2140
2157
|
}
|
|
2141
2158
|
),
|
|
2142
|
-
/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ React47.createElement(
|
|
2143
2160
|
"button",
|
|
2144
2161
|
{
|
|
2145
2162
|
className: cn25(
|
|
@@ -2150,10 +2167,10 @@ var Select = forwardRef10(
|
|
|
2150
2167
|
...mergeProps10(buttonProps, focusProps),
|
|
2151
2168
|
...stateProps
|
|
2152
2169
|
},
|
|
2153
|
-
/* @__PURE__ */
|
|
2154
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ React47.createElement("div", { className: "overflow-hidden whitespace-nowrap", ...valueProps }, state.selectedItem ? state.selectedItem.rendered : props.placeholder),
|
|
2171
|
+
/* @__PURE__ */ React47.createElement(ChevronDown, { className: "h-4 w-4" })
|
|
2155
2172
|
),
|
|
2156
|
-
isSmallScreen ? /* @__PURE__ */
|
|
2173
|
+
isSmallScreen ? /* @__PURE__ */ React47.createElement(Tray, { state }, /* @__PURE__ */ React47.createElement(
|
|
2157
2174
|
ListBox,
|
|
2158
2175
|
{
|
|
2159
2176
|
ref: listboxRef,
|
|
@@ -2162,7 +2179,7 @@ var Select = forwardRef10(
|
|
|
2162
2179
|
size,
|
|
2163
2180
|
...menuProps
|
|
2164
2181
|
}
|
|
2165
|
-
)) : /* @__PURE__ */
|
|
2182
|
+
)) : /* @__PURE__ */ React47.createElement(Popover, { state, triggerRef: buttonRef, scrollRef: listboxRef }, /* @__PURE__ */ React47.createElement(
|
|
2166
2183
|
ListBox,
|
|
2167
2184
|
{
|
|
2168
2185
|
ref: listboxRef,
|
|
@@ -2195,7 +2212,7 @@ var MonthDropdown = ({ state }) => {
|
|
|
2195
2212
|
let date = state.focusedDate.set({ month: value });
|
|
2196
2213
|
state.setFocusedDate(date);
|
|
2197
2214
|
};
|
|
2198
|
-
return /* @__PURE__ */
|
|
2215
|
+
return /* @__PURE__ */ React48.createElement(
|
|
2199
2216
|
Select,
|
|
2200
2217
|
{
|
|
2201
2218
|
"aria-label": "Month",
|
|
@@ -2204,13 +2221,13 @@ var MonthDropdown = ({ state }) => {
|
|
|
2204
2221
|
"data-testid": "month",
|
|
2205
2222
|
disabled: state.isDisabled
|
|
2206
2223
|
},
|
|
2207
|
-
months.map((month, i) => /* @__PURE__ */
|
|
2224
|
+
months.map((month, i) => /* @__PURE__ */ React48.createElement(Select.Option, { key: i + 1 }, month.substring(0, 3)))
|
|
2208
2225
|
);
|
|
2209
2226
|
};
|
|
2210
2227
|
var MonthDropdown_default = MonthDropdown;
|
|
2211
2228
|
|
|
2212
2229
|
// src/Calendar/YearDropdown.tsx
|
|
2213
|
-
import
|
|
2230
|
+
import React49 from "react";
|
|
2214
2231
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
2215
2232
|
var YearDropdown = ({ state }) => {
|
|
2216
2233
|
const years = [];
|
|
@@ -2230,7 +2247,7 @@ var YearDropdown = ({ state }) => {
|
|
|
2230
2247
|
let date = years[index].value;
|
|
2231
2248
|
state.setFocusedDate(date);
|
|
2232
2249
|
};
|
|
2233
|
-
return /* @__PURE__ */
|
|
2250
|
+
return /* @__PURE__ */ React49.createElement(
|
|
2234
2251
|
Select,
|
|
2235
2252
|
{
|
|
2236
2253
|
"aria-label": "Year",
|
|
@@ -2239,7 +2256,7 @@ var YearDropdown = ({ state }) => {
|
|
|
2239
2256
|
"data-testid": "year",
|
|
2240
2257
|
disabled: state.isDisabled
|
|
2241
2258
|
},
|
|
2242
|
-
years.map((year, i) => /* @__PURE__ */
|
|
2259
|
+
years.map((year, i) => /* @__PURE__ */ React49.createElement(Select.Option, { key: i }, year.formatted))
|
|
2243
2260
|
);
|
|
2244
2261
|
};
|
|
2245
2262
|
var YearDropdown_default = YearDropdown;
|
|
@@ -2273,8 +2290,8 @@ var Calendar = ({
|
|
|
2273
2290
|
const calendarState = useStateProps11({
|
|
2274
2291
|
disabled: state.isDisabled
|
|
2275
2292
|
});
|
|
2276
|
-
const classNames2 =
|
|
2277
|
-
return /* @__PURE__ */
|
|
2293
|
+
const classNames2 = useClassNames24({ component: "Calendar" });
|
|
2294
|
+
return /* @__PURE__ */ React50.createElement(
|
|
2278
2295
|
"div",
|
|
2279
2296
|
{
|
|
2280
2297
|
tabIndex: -1,
|
|
@@ -2286,32 +2303,32 @@ var Calendar = ({
|
|
|
2286
2303
|
...calendarState,
|
|
2287
2304
|
ref
|
|
2288
2305
|
},
|
|
2289
|
-
/* @__PURE__ */
|
|
2306
|
+
/* @__PURE__ */ React50.createElement("div", { className: "mb-4 flex items-center gap-[60px]" }, /* @__PURE__ */ React50.createElement("div", { className: "flex min-w-[170px] gap-[9px] [&_div]:flex" }, /* @__PURE__ */ React50.createElement(MonthDropdown_default, { state }), /* @__PURE__ */ React50.createElement(YearDropdown_default, { state })), /* @__PURE__ */ React50.createElement("div", { className: "flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1" }, /* @__PURE__ */ React50.createElement(
|
|
2290
2307
|
Button,
|
|
2291
2308
|
{
|
|
2292
2309
|
className: classNames2.calendarControllers,
|
|
2293
2310
|
...prevPropsRest,
|
|
2294
2311
|
disabled: prevIsDisabled
|
|
2295
2312
|
},
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
), /* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ React50.createElement(ChevronLeft, null)
|
|
2314
|
+
), /* @__PURE__ */ React50.createElement(
|
|
2298
2315
|
Button,
|
|
2299
2316
|
{
|
|
2300
2317
|
className: classNames2.calendarControllers,
|
|
2301
2318
|
...nextPropsRest,
|
|
2302
2319
|
disabled: nextIsDisabled
|
|
2303
2320
|
},
|
|
2304
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ React50.createElement(ChevronRight, null)
|
|
2305
2322
|
))),
|
|
2306
|
-
/* @__PURE__ */
|
|
2323
|
+
/* @__PURE__ */ React50.createElement(CalendarGrid, { state })
|
|
2307
2324
|
);
|
|
2308
2325
|
};
|
|
2309
2326
|
|
|
2310
2327
|
// src/DatePicker/DatePicker.tsx
|
|
2311
|
-
import
|
|
2328
|
+
import React51, { useRef as useRef15 } from "react";
|
|
2312
2329
|
import { useDatePickerState } from "@react-stately/datepicker";
|
|
2313
2330
|
import { useDatePicker } from "@react-aria/datepicker";
|
|
2314
|
-
import { cn as cn27, useClassNames as
|
|
2331
|
+
import { cn as cn27, useClassNames as useClassNames25, useStateProps as useStateProps12 } from "@marigold/system";
|
|
2315
2332
|
import { mergeProps as mergeProps11 } from "@react-aria/utils";
|
|
2316
2333
|
var DatePicker = ({
|
|
2317
2334
|
disabled,
|
|
@@ -2345,12 +2362,12 @@ var DatePicker = ({
|
|
|
2345
2362
|
ref
|
|
2346
2363
|
);
|
|
2347
2364
|
const { isDisabled, errorMessage, description, label } = props;
|
|
2348
|
-
const classNames2 =
|
|
2365
|
+
const classNames2 = useClassNames25({
|
|
2349
2366
|
component: "DatePicker",
|
|
2350
2367
|
size,
|
|
2351
2368
|
variant
|
|
2352
2369
|
});
|
|
2353
|
-
return /* @__PURE__ */
|
|
2370
|
+
return /* @__PURE__ */ React51.createElement(React51.Fragment, null, /* @__PURE__ */ React51.createElement("div", { className: "flex w-full min-w-[300px]", ...groupProps }, /* @__PURE__ */ React51.createElement(
|
|
2354
2371
|
DateField,
|
|
2355
2372
|
{
|
|
2356
2373
|
...fieldProps,
|
|
@@ -2362,14 +2379,14 @@ var DatePicker = ({
|
|
|
2362
2379
|
error,
|
|
2363
2380
|
description: !state.isOpen && description,
|
|
2364
2381
|
triggerRef: ref,
|
|
2365
|
-
action: /* @__PURE__ */
|
|
2382
|
+
action: /* @__PURE__ */ React51.createElement("div", { className: classNames2.container }, /* @__PURE__ */ React51.createElement(
|
|
2366
2383
|
Button,
|
|
2367
2384
|
{
|
|
2368
2385
|
...mergeProps11(buttonProps, stateProps),
|
|
2369
2386
|
className: cn27("absolute right-0 top-0", classNames2.button),
|
|
2370
2387
|
disabled: isDisabled
|
|
2371
2388
|
},
|
|
2372
|
-
/* @__PURE__ */
|
|
2389
|
+
/* @__PURE__ */ React51.createElement(
|
|
2373
2390
|
"svg",
|
|
2374
2391
|
{
|
|
2375
2392
|
width: "24",
|
|
@@ -2377,15 +2394,15 @@ var DatePicker = ({
|
|
|
2377
2394
|
viewBox: "0 0 24 24",
|
|
2378
2395
|
fill: "currentColor"
|
|
2379
2396
|
},
|
|
2380
|
-
/* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ React51.createElement("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" })
|
|
2381
2398
|
)
|
|
2382
2399
|
))
|
|
2383
2400
|
}
|
|
2384
|
-
)), state.isOpen && /* @__PURE__ */
|
|
2401
|
+
)), state.isOpen && /* @__PURE__ */ React51.createElement(Popover, { triggerRef: ref, state }, /* @__PURE__ */ React51.createElement(Calendar, { disabled, ...calendarProps })));
|
|
2385
2402
|
};
|
|
2386
2403
|
|
|
2387
2404
|
// src/Inset/Inset.tsx
|
|
2388
|
-
import
|
|
2405
|
+
import React52 from "react";
|
|
2389
2406
|
import {
|
|
2390
2407
|
paddingSpace as paddingSpace2,
|
|
2391
2408
|
paddingSpaceX as paddingSpaceX2,
|
|
@@ -2397,7 +2414,7 @@ var Inset = ({
|
|
|
2397
2414
|
spaceX = 0,
|
|
2398
2415
|
spaceY = 0,
|
|
2399
2416
|
children
|
|
2400
|
-
}) => /* @__PURE__ */
|
|
2417
|
+
}) => /* @__PURE__ */ React52.createElement(
|
|
2401
2418
|
"div",
|
|
2402
2419
|
{
|
|
2403
2420
|
className: cn28(
|
|
@@ -2409,9 +2426,9 @@ var Inset = ({
|
|
|
2409
2426
|
);
|
|
2410
2427
|
|
|
2411
2428
|
// src/Link/Link.tsx
|
|
2412
|
-
import
|
|
2429
|
+
import React53, { forwardRef as forwardRef11 } from "react";
|
|
2413
2430
|
import { useLink } from "@react-aria/link";
|
|
2414
|
-
import { useClassNames as
|
|
2431
|
+
import { useClassNames as useClassNames26 } from "@marigold/system";
|
|
2415
2432
|
import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
|
|
2416
2433
|
var Link = forwardRef11(
|
|
2417
2434
|
({
|
|
@@ -2435,13 +2452,13 @@ var Link = forwardRef11(
|
|
|
2435
2452
|
linkRef
|
|
2436
2453
|
);
|
|
2437
2454
|
const Component = as;
|
|
2438
|
-
const classNames2 =
|
|
2455
|
+
const classNames2 = useClassNames26({
|
|
2439
2456
|
component: "Link",
|
|
2440
2457
|
variant,
|
|
2441
2458
|
size,
|
|
2442
2459
|
className
|
|
2443
2460
|
});
|
|
2444
|
-
return /* @__PURE__ */
|
|
2461
|
+
return /* @__PURE__ */ React53.createElement(
|
|
2445
2462
|
Component,
|
|
2446
2463
|
{
|
|
2447
2464
|
...props,
|
|
@@ -2456,8 +2473,8 @@ var Link = forwardRef11(
|
|
|
2456
2473
|
);
|
|
2457
2474
|
|
|
2458
2475
|
// src/List/List.tsx
|
|
2459
|
-
import
|
|
2460
|
-
import { useClassNames as
|
|
2476
|
+
import React55 from "react";
|
|
2477
|
+
import { useClassNames as useClassNames27 } from "@marigold/system";
|
|
2461
2478
|
|
|
2462
2479
|
// src/List/Context.ts
|
|
2463
2480
|
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
@@ -2465,10 +2482,10 @@ var ListContext = createContext5({});
|
|
|
2465
2482
|
var useListContext = () => useContext5(ListContext);
|
|
2466
2483
|
|
|
2467
2484
|
// src/List/ListItem.tsx
|
|
2468
|
-
import
|
|
2485
|
+
import React54 from "react";
|
|
2469
2486
|
var ListItem = ({ children, ...props }) => {
|
|
2470
2487
|
const { classNames: classNames2 } = useListContext();
|
|
2471
|
-
return /* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ React54.createElement("li", { ...props, className: classNames2 }, children);
|
|
2472
2489
|
};
|
|
2473
2490
|
|
|
2474
2491
|
// src/List/List.tsx
|
|
@@ -2480,18 +2497,18 @@ var List = ({
|
|
|
2480
2497
|
...props
|
|
2481
2498
|
}) => {
|
|
2482
2499
|
const Component = as;
|
|
2483
|
-
const classNames2 =
|
|
2484
|
-
return /* @__PURE__ */
|
|
2500
|
+
const classNames2 = useClassNames27({ component: "List", variant, size });
|
|
2501
|
+
return /* @__PURE__ */ React55.createElement(Component, { ...props, className: classNames2[as] }, /* @__PURE__ */ React55.createElement(ListContext.Provider, { value: { classNames: classNames2.item } }, children));
|
|
2485
2502
|
};
|
|
2486
2503
|
List.Item = ListItem;
|
|
2487
2504
|
|
|
2488
2505
|
// src/Menu/Menu.tsx
|
|
2489
|
-
import
|
|
2506
|
+
import React59, { useRef as useRef18 } from "react";
|
|
2490
2507
|
import { useMenu } from "@react-aria/menu";
|
|
2491
2508
|
import { Item as Item5, Section as Section2 } from "@react-stately/collections";
|
|
2492
2509
|
import { useTreeState as useTreeState2 } from "@react-stately/tree";
|
|
2493
2510
|
import { useSyncRef } from "@react-aria/utils";
|
|
2494
|
-
import { useClassNames as
|
|
2511
|
+
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
2495
2512
|
|
|
2496
2513
|
// src/Menu/Context.ts
|
|
2497
2514
|
import {
|
|
@@ -2502,7 +2519,7 @@ var MenuContext = createContext6({});
|
|
|
2502
2519
|
var useMenuContext = () => useContext6(MenuContext);
|
|
2503
2520
|
|
|
2504
2521
|
// src/Menu/MenuTrigger.tsx
|
|
2505
|
-
import
|
|
2522
|
+
import React56, { useRef as useRef16 } from "react";
|
|
2506
2523
|
import { useMenuTriggerState } from "@react-stately/menu";
|
|
2507
2524
|
import { PressResponder as PressResponder2 } from "@react-aria/interactions";
|
|
2508
2525
|
import { useMenuTrigger } from "@react-aria/menu";
|
|
@@ -2514,7 +2531,7 @@ var MenuTrigger = ({
|
|
|
2514
2531
|
onOpenChange,
|
|
2515
2532
|
children
|
|
2516
2533
|
}) => {
|
|
2517
|
-
const [menuTrigger, menu] =
|
|
2534
|
+
const [menuTrigger, menu] = React56.Children.toArray(children);
|
|
2518
2535
|
const menuTriggerRef = useRef16(null);
|
|
2519
2536
|
const menuRef = useObjectRef8();
|
|
2520
2537
|
const state = useMenuTriggerState({
|
|
@@ -2534,7 +2551,7 @@ var MenuTrigger = ({
|
|
|
2534
2551
|
autoFocus: state.focusStrategy
|
|
2535
2552
|
};
|
|
2536
2553
|
const isSmallScreen = useSmallScreen2();
|
|
2537
|
-
return /* @__PURE__ */
|
|
2554
|
+
return /* @__PURE__ */ React56.createElement(MenuContext.Provider, { value: menuContext }, /* @__PURE__ */ React56.createElement(
|
|
2538
2555
|
PressResponder2,
|
|
2539
2556
|
{
|
|
2540
2557
|
...menuTriggerProps,
|
|
@@ -2542,11 +2559,11 @@ var MenuTrigger = ({
|
|
|
2542
2559
|
isPressed: state.isOpen
|
|
2543
2560
|
},
|
|
2544
2561
|
menuTrigger
|
|
2545
|
-
), isSmallScreen ? /* @__PURE__ */
|
|
2562
|
+
), isSmallScreen ? /* @__PURE__ */ React56.createElement(Tray, { state }, menu) : /* @__PURE__ */ React56.createElement(Popover, { triggerRef: menuTriggerRef, scrollRef: menuRef, state }, menu));
|
|
2546
2563
|
};
|
|
2547
2564
|
|
|
2548
2565
|
// src/Menu/MenuItem.tsx
|
|
2549
|
-
import
|
|
2566
|
+
import React57, { useRef as useRef17 } from "react";
|
|
2550
2567
|
import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
|
|
2551
2568
|
import { useMenuItem } from "@react-aria/menu";
|
|
2552
2569
|
import { mergeProps as mergeProps12 } from "@react-aria/utils";
|
|
@@ -2573,7 +2590,7 @@ var MenuItem = ({
|
|
|
2573
2590
|
focus: isFocusVisible
|
|
2574
2591
|
});
|
|
2575
2592
|
const { onPointerUp, ...props } = menuItemProps;
|
|
2576
|
-
return /* @__PURE__ */
|
|
2593
|
+
return /* @__PURE__ */ React57.createElement(
|
|
2577
2594
|
"li",
|
|
2578
2595
|
{
|
|
2579
2596
|
ref,
|
|
@@ -2590,16 +2607,16 @@ var MenuItem = ({
|
|
|
2590
2607
|
};
|
|
2591
2608
|
|
|
2592
2609
|
// src/Menu/MenuSection.tsx
|
|
2593
|
-
import
|
|
2610
|
+
import React58 from "react";
|
|
2594
2611
|
import { useMenuSection } from "@react-aria/menu";
|
|
2595
|
-
import { useClassNames as
|
|
2612
|
+
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
2596
2613
|
var MenuSection = ({ onAction, item, state }) => {
|
|
2597
2614
|
let { itemProps, headingProps, groupProps } = useMenuSection({
|
|
2598
2615
|
heading: item.rendered,
|
|
2599
2616
|
"aria-label": item["aria-label"]
|
|
2600
2617
|
});
|
|
2601
|
-
const className =
|
|
2602
|
-
return /* @__PURE__ */
|
|
2618
|
+
const className = useClassNames28({ component: "Menu" });
|
|
2619
|
+
return /* @__PURE__ */ React58.createElement(React58.Fragment, null, item.key !== state.collection.getFirstKey() && /* @__PURE__ */ React58.createElement("li", null, /* @__PURE__ */ React58.createElement(Divider, { variant: "section" })), /* @__PURE__ */ React58.createElement("ul", { ...itemProps }, item.rendered && /* @__PURE__ */ React58.createElement("span", { ...headingProps, className: className.section }, item.rendered), /* @__PURE__ */ React58.createElement("li", { ...groupProps, className: "pb-1" }, [...item.props.children].map((node) => /* @__PURE__ */ React58.createElement(
|
|
2603
2620
|
MenuItem,
|
|
2604
2621
|
{
|
|
2605
2622
|
key: node.key,
|
|
@@ -2620,10 +2637,10 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
2620
2637
|
const state = useTreeState2({ ...ownProps, selectionMode: "none" });
|
|
2621
2638
|
const { menuProps } = useMenu(ownProps, state, ref);
|
|
2622
2639
|
useSyncRef({ ref: scrollRef }, ref);
|
|
2623
|
-
const classNames2 =
|
|
2624
|
-
return /* @__PURE__ */
|
|
2640
|
+
const classNames2 = useClassNames29({ component: "Menu", variant, size });
|
|
2641
|
+
return /* @__PURE__ */ React59.createElement("ul", { ref, className: classNames2.container, ...menuProps }, [...state.collection].map((item) => {
|
|
2625
2642
|
if (item.type === "section") {
|
|
2626
|
-
return /* @__PURE__ */
|
|
2643
|
+
return /* @__PURE__ */ React59.createElement(
|
|
2627
2644
|
MenuSection_default,
|
|
2628
2645
|
{
|
|
2629
2646
|
key: item.key,
|
|
@@ -2633,7 +2650,7 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
2633
2650
|
}
|
|
2634
2651
|
);
|
|
2635
2652
|
}
|
|
2636
|
-
return /* @__PURE__ */
|
|
2653
|
+
return /* @__PURE__ */ React59.createElement(
|
|
2637
2654
|
MenuItem,
|
|
2638
2655
|
{
|
|
2639
2656
|
key: item.key,
|
|
@@ -2650,24 +2667,24 @@ Menu.Item = Item5;
|
|
|
2650
2667
|
Menu.Section = Section2;
|
|
2651
2668
|
|
|
2652
2669
|
// src/Menu/ActionMenu.tsx
|
|
2653
|
-
import
|
|
2670
|
+
import React60 from "react";
|
|
2654
2671
|
import { SVG as SVG5 } from "@marigold/system";
|
|
2655
2672
|
var ActionMenu = (props) => {
|
|
2656
|
-
return /* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ React60.createElement(Menu.Trigger, null, /* @__PURE__ */ React60.createElement(Button, { variant: "menu", size: "small" }, /* @__PURE__ */ React60.createElement(SVG5, { viewBox: "0 0 24 24" }, /* @__PURE__ */ React60.createElement("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" }))), /* @__PURE__ */ React60.createElement(Menu, { ...props }));
|
|
2657
2674
|
};
|
|
2658
2675
|
|
|
2659
2676
|
// src/Message/Message.tsx
|
|
2660
|
-
import
|
|
2661
|
-
import { cn as cn29, useClassNames as
|
|
2677
|
+
import React61 from "react";
|
|
2678
|
+
import { cn as cn29, useClassNames as useClassNames30 } from "@marigold/system";
|
|
2662
2679
|
var icons = {
|
|
2663
|
-
info: () => /* @__PURE__ */
|
|
2680
|
+
info: () => /* @__PURE__ */ React61.createElement(
|
|
2664
2681
|
"svg",
|
|
2665
2682
|
{
|
|
2666
2683
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2667
2684
|
viewBox: "0 0 24 24",
|
|
2668
2685
|
fill: "currentColor"
|
|
2669
2686
|
},
|
|
2670
|
-
/* @__PURE__ */
|
|
2687
|
+
/* @__PURE__ */ React61.createElement(
|
|
2671
2688
|
"path",
|
|
2672
2689
|
{
|
|
2673
2690
|
fillRule: "evenodd",
|
|
@@ -2676,14 +2693,14 @@ var icons = {
|
|
|
2676
2693
|
}
|
|
2677
2694
|
)
|
|
2678
2695
|
),
|
|
2679
|
-
warning: () => /* @__PURE__ */
|
|
2696
|
+
warning: () => /* @__PURE__ */ React61.createElement(
|
|
2680
2697
|
"svg",
|
|
2681
2698
|
{
|
|
2682
2699
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2683
2700
|
viewBox: "0 0 24 24",
|
|
2684
2701
|
fill: "currentColor"
|
|
2685
2702
|
},
|
|
2686
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ React61.createElement(
|
|
2687
2704
|
"path",
|
|
2688
2705
|
{
|
|
2689
2706
|
fillRule: "evenodd",
|
|
@@ -2692,14 +2709,14 @@ var icons = {
|
|
|
2692
2709
|
}
|
|
2693
2710
|
)
|
|
2694
2711
|
),
|
|
2695
|
-
error: () => /* @__PURE__ */
|
|
2712
|
+
error: () => /* @__PURE__ */ React61.createElement(
|
|
2696
2713
|
"svg",
|
|
2697
2714
|
{
|
|
2698
2715
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2699
2716
|
viewBox: "0 0 24 24",
|
|
2700
2717
|
fill: "currentColor"
|
|
2701
2718
|
},
|
|
2702
|
-
/* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ React61.createElement(
|
|
2703
2720
|
"path",
|
|
2704
2721
|
{
|
|
2705
2722
|
fillRule: "evenodd",
|
|
@@ -2716,9 +2733,9 @@ var Message = ({
|
|
|
2716
2733
|
children,
|
|
2717
2734
|
...props
|
|
2718
2735
|
}) => {
|
|
2719
|
-
const classNames2 =
|
|
2736
|
+
const classNames2 = useClassNames30({ component: "Message", variant, size });
|
|
2720
2737
|
const Icon3 = icons[variant];
|
|
2721
|
-
return /* @__PURE__ */
|
|
2738
|
+
return /* @__PURE__ */ React61.createElement(
|
|
2722
2739
|
"div",
|
|
2723
2740
|
{
|
|
2724
2741
|
className: cn29(
|
|
@@ -2727,35 +2744,35 @@ var Message = ({
|
|
|
2727
2744
|
),
|
|
2728
2745
|
...props
|
|
2729
2746
|
},
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ React61.createElement("div", { className: cn29("col-span-1 h-5 w-5 self-center", classNames2.icon) }, /* @__PURE__ */ React61.createElement(Icon3, null)),
|
|
2748
|
+
/* @__PURE__ */ React61.createElement(
|
|
2732
2749
|
"div",
|
|
2733
2750
|
{
|
|
2734
2751
|
className: cn29("col-start-2 row-start-1 self-center", classNames2.title)
|
|
2735
2752
|
},
|
|
2736
2753
|
messageTitle
|
|
2737
2754
|
),
|
|
2738
|
-
/* @__PURE__ */
|
|
2755
|
+
/* @__PURE__ */ React61.createElement("div", { className: cn29("col-start-2", classNames2.content) }, children)
|
|
2739
2756
|
);
|
|
2740
2757
|
};
|
|
2741
2758
|
|
|
2742
2759
|
// src/NumberField/NumberField.tsx
|
|
2743
|
-
import
|
|
2760
|
+
import React63, { forwardRef as forwardRef12 } from "react";
|
|
2744
2761
|
import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
|
|
2745
2762
|
import { useHover as useHover7 } from "@react-aria/interactions";
|
|
2746
2763
|
import { useLocale as useLocale4 } from "@react-aria/i18n";
|
|
2747
2764
|
import { useNumberField } from "@react-aria/numberfield";
|
|
2748
2765
|
import { mergeProps as mergeProps14, useObjectRef as useObjectRef9 } from "@react-aria/utils";
|
|
2749
2766
|
import { useNumberFieldState } from "@react-stately/numberfield";
|
|
2750
|
-
import { cn as cn31, useClassNames as
|
|
2767
|
+
import { cn as cn31, useClassNames as useClassNames31, useStateProps as useStateProps15 } from "@marigold/system";
|
|
2751
2768
|
|
|
2752
2769
|
// src/NumberField/StepButton.tsx
|
|
2753
|
-
import
|
|
2770
|
+
import React62, { useRef as useRef19 } from "react";
|
|
2754
2771
|
import { useButton as useButton7 } from "@react-aria/button";
|
|
2755
2772
|
import { useHover as useHover6 } from "@react-aria/interactions";
|
|
2756
2773
|
import { mergeProps as mergeProps13 } from "@react-aria/utils";
|
|
2757
2774
|
import { cn as cn30, useStateProps as useStateProps14 } from "@marigold/system";
|
|
2758
|
-
var Plus = () => /* @__PURE__ */
|
|
2775
|
+
var Plus = () => /* @__PURE__ */ React62.createElement("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React62.createElement(
|
|
2759
2776
|
"path",
|
|
2760
2777
|
{
|
|
2761
2778
|
fillRule: "evenodd",
|
|
@@ -2763,7 +2780,7 @@ var Plus = () => /* @__PURE__ */ React61.createElement("svg", { width: 16, heigh
|
|
|
2763
2780
|
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"
|
|
2764
2781
|
}
|
|
2765
2782
|
));
|
|
2766
|
-
var Minus = () => /* @__PURE__ */
|
|
2783
|
+
var Minus = () => /* @__PURE__ */ React62.createElement("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React62.createElement(
|
|
2767
2784
|
"path",
|
|
2768
2785
|
{
|
|
2769
2786
|
fillRule: "evenodd",
|
|
@@ -2788,7 +2805,7 @@ var StepButton = ({
|
|
|
2788
2805
|
disabled: props.isDisabled
|
|
2789
2806
|
});
|
|
2790
2807
|
const Icon3 = direction === "up" ? Plus : Minus;
|
|
2791
|
-
return /* @__PURE__ */
|
|
2808
|
+
return /* @__PURE__ */ React62.createElement(
|
|
2792
2809
|
"div",
|
|
2793
2810
|
{
|
|
2794
2811
|
className: cn30(
|
|
@@ -2801,7 +2818,7 @@ var StepButton = ({
|
|
|
2801
2818
|
...mergeProps13(buttonProps, hoverProps),
|
|
2802
2819
|
...stateProps
|
|
2803
2820
|
},
|
|
2804
|
-
/* @__PURE__ */
|
|
2821
|
+
/* @__PURE__ */ React62.createElement(Icon3, null)
|
|
2805
2822
|
);
|
|
2806
2823
|
};
|
|
2807
2824
|
|
|
@@ -2852,12 +2869,12 @@ var NumberField = forwardRef12(
|
|
|
2852
2869
|
readOnly,
|
|
2853
2870
|
required
|
|
2854
2871
|
});
|
|
2855
|
-
const classNames2 =
|
|
2872
|
+
const classNames2 = useClassNames31({
|
|
2856
2873
|
component: "NumberField",
|
|
2857
2874
|
size,
|
|
2858
2875
|
variant
|
|
2859
2876
|
});
|
|
2860
|
-
return /* @__PURE__ */
|
|
2877
|
+
return /* @__PURE__ */ React63.createElement(
|
|
2861
2878
|
FieldBase,
|
|
2862
2879
|
{
|
|
2863
2880
|
label: props.label,
|
|
@@ -2872,7 +2889,7 @@ var NumberField = forwardRef12(
|
|
|
2872
2889
|
size,
|
|
2873
2890
|
width
|
|
2874
2891
|
},
|
|
2875
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ React63.createElement(
|
|
2876
2893
|
"div",
|
|
2877
2894
|
{
|
|
2878
2895
|
"data-group": true,
|
|
@@ -2881,7 +2898,7 @@ var NumberField = forwardRef12(
|
|
|
2881
2898
|
...mergeProps14(groupProps, focusProps, hoverProps),
|
|
2882
2899
|
...stateProps
|
|
2883
2900
|
},
|
|
2884
|
-
showStepper && /* @__PURE__ */
|
|
2901
|
+
showStepper && /* @__PURE__ */ React63.createElement(
|
|
2885
2902
|
StepButton,
|
|
2886
2903
|
{
|
|
2887
2904
|
className: classNames2.stepper,
|
|
@@ -2889,7 +2906,7 @@ var NumberField = forwardRef12(
|
|
|
2889
2906
|
...decrementButtonProps
|
|
2890
2907
|
}
|
|
2891
2908
|
),
|
|
2892
|
-
/* @__PURE__ */
|
|
2909
|
+
/* @__PURE__ */ React63.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React63.createElement(
|
|
2893
2910
|
Input,
|
|
2894
2911
|
{
|
|
2895
2912
|
ref: inputRef,
|
|
@@ -2902,7 +2919,7 @@ var NumberField = forwardRef12(
|
|
|
2902
2919
|
...stateProps
|
|
2903
2920
|
}
|
|
2904
2921
|
)),
|
|
2905
|
-
showStepper && /* @__PURE__ */
|
|
2922
|
+
showStepper && /* @__PURE__ */ React63.createElement(
|
|
2906
2923
|
StepButton,
|
|
2907
2924
|
{
|
|
2908
2925
|
className: classNames2.stepper,
|
|
@@ -2919,7 +2936,7 @@ var NumberField = forwardRef12(
|
|
|
2919
2936
|
import { useTheme as useTheme4, ThemeProvider as ThemeProvider2 } from "@marigold/system";
|
|
2920
2937
|
|
|
2921
2938
|
// src/Provider/MarigoldProvider.tsx
|
|
2922
|
-
import
|
|
2939
|
+
import React64 from "react";
|
|
2923
2940
|
import { OverlayProvider } from "@react-aria/overlays";
|
|
2924
2941
|
import {
|
|
2925
2942
|
ThemeProvider,
|
|
@@ -2932,11 +2949,11 @@ function MarigoldProvider({
|
|
|
2932
2949
|
}) {
|
|
2933
2950
|
const outerTheme = useTheme3();
|
|
2934
2951
|
const isTopLevel = outerTheme === defaultTheme;
|
|
2935
|
-
return /* @__PURE__ */
|
|
2952
|
+
return /* @__PURE__ */ React64.createElement(ThemeProvider, { theme }, isTopLevel ? /* @__PURE__ */ React64.createElement(OverlayProvider, null, children) : children);
|
|
2936
2953
|
}
|
|
2937
2954
|
|
|
2938
2955
|
// src/Radio/Radio.tsx
|
|
2939
|
-
import
|
|
2956
|
+
import React66, {
|
|
2940
2957
|
forwardRef as forwardRef13
|
|
2941
2958
|
} from "react";
|
|
2942
2959
|
import { useHover as useHover8 } from "@react-aria/interactions";
|
|
@@ -2945,7 +2962,7 @@ import { useRadio } from "@react-aria/radio";
|
|
|
2945
2962
|
import { mergeProps as mergeProps15, useObjectRef as useObjectRef10 } from "@react-aria/utils";
|
|
2946
2963
|
import {
|
|
2947
2964
|
cn as cn33,
|
|
2948
|
-
useClassNames as
|
|
2965
|
+
useClassNames as useClassNames32,
|
|
2949
2966
|
useStateProps as useStateProps17
|
|
2950
2967
|
} from "@marigold/system";
|
|
2951
2968
|
|
|
@@ -2957,7 +2974,7 @@ var RadioGroupContext = createContext7(
|
|
|
2957
2974
|
var useRadioGroupContext = () => useContext7(RadioGroupContext);
|
|
2958
2975
|
|
|
2959
2976
|
// src/Radio/RadioGroup.tsx
|
|
2960
|
-
import
|
|
2977
|
+
import React65 from "react";
|
|
2961
2978
|
import { useRadioGroup } from "@react-aria/radio";
|
|
2962
2979
|
import { useRadioGroupState } from "@react-stately/radio";
|
|
2963
2980
|
import { cn as cn32, useStateProps as useStateProps16 } from "@marigold/system";
|
|
@@ -2986,7 +3003,7 @@ var RadioGroup = ({
|
|
|
2986
3003
|
error,
|
|
2987
3004
|
required
|
|
2988
3005
|
});
|
|
2989
|
-
return /* @__PURE__ */
|
|
3006
|
+
return /* @__PURE__ */ React65.createElement(
|
|
2990
3007
|
FieldBase,
|
|
2991
3008
|
{
|
|
2992
3009
|
width,
|
|
@@ -3001,7 +3018,7 @@ var RadioGroup = ({
|
|
|
3001
3018
|
stateProps,
|
|
3002
3019
|
...radioGroupProps
|
|
3003
3020
|
},
|
|
3004
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ React65.createElement(
|
|
3005
3022
|
"div",
|
|
3006
3023
|
{
|
|
3007
3024
|
role: "presentation",
|
|
@@ -3011,14 +3028,14 @@ var RadioGroup = ({
|
|
|
3011
3028
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
3012
3029
|
)
|
|
3013
3030
|
},
|
|
3014
|
-
/* @__PURE__ */
|
|
3031
|
+
/* @__PURE__ */ React65.createElement(RadioGroupContext.Provider, { value: { width, error, state } }, children)
|
|
3015
3032
|
)
|
|
3016
3033
|
);
|
|
3017
3034
|
};
|
|
3018
3035
|
|
|
3019
3036
|
// src/Radio/Radio.tsx
|
|
3020
|
-
var Dot = () => /* @__PURE__ */
|
|
3021
|
-
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
3037
|
+
var Dot = () => /* @__PURE__ */ React66.createElement("svg", { viewBox: "0 0 6 6" }, /* @__PURE__ */ React66.createElement("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }));
|
|
3038
|
+
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ React66.createElement(
|
|
3022
3039
|
"div",
|
|
3023
3040
|
{
|
|
3024
3041
|
className: cn33(
|
|
@@ -3028,7 +3045,7 @@ var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ React65.create
|
|
|
3028
3045
|
"aria-hidden": "true",
|
|
3029
3046
|
...props
|
|
3030
3047
|
},
|
|
3031
|
-
checked ? /* @__PURE__ */
|
|
3048
|
+
checked ? /* @__PURE__ */ React66.createElement(Dot, null) : null
|
|
3032
3049
|
);
|
|
3033
3050
|
var Radio = forwardRef13(
|
|
3034
3051
|
({ width, disabled, ...props }, ref) => {
|
|
@@ -3045,7 +3062,7 @@ var Radio = forwardRef13(
|
|
|
3045
3062
|
state,
|
|
3046
3063
|
inputRef
|
|
3047
3064
|
);
|
|
3048
|
-
const classNames2 =
|
|
3065
|
+
const classNames2 = useClassNames32({
|
|
3049
3066
|
component: "Radio",
|
|
3050
3067
|
variant: variant || props.variant,
|
|
3051
3068
|
size: size || props.size
|
|
@@ -3060,7 +3077,7 @@ var Radio = forwardRef13(
|
|
|
3060
3077
|
readOnly: props.readOnly,
|
|
3061
3078
|
error
|
|
3062
3079
|
});
|
|
3063
|
-
return /* @__PURE__ */
|
|
3080
|
+
return /* @__PURE__ */ React66.createElement(
|
|
3064
3081
|
"label",
|
|
3065
3082
|
{
|
|
3066
3083
|
className: cn33(
|
|
@@ -3071,7 +3088,7 @@ var Radio = forwardRef13(
|
|
|
3071
3088
|
),
|
|
3072
3089
|
...mergeProps15(hoverProps, stateProps)
|
|
3073
3090
|
},
|
|
3074
|
-
/* @__PURE__ */
|
|
3091
|
+
/* @__PURE__ */ React66.createElement(
|
|
3075
3092
|
"input",
|
|
3076
3093
|
{
|
|
3077
3094
|
ref: inputRef,
|
|
@@ -3082,23 +3099,23 @@ var Radio = forwardRef13(
|
|
|
3082
3099
|
...mergeProps15(inputProps, focusProps)
|
|
3083
3100
|
}
|
|
3084
3101
|
),
|
|
3085
|
-
/* @__PURE__ */
|
|
3086
|
-
/* @__PURE__ */
|
|
3102
|
+
/* @__PURE__ */ React66.createElement(Icon2, { checked: inputProps.checked, className: classNames2.radio }),
|
|
3103
|
+
/* @__PURE__ */ React66.createElement("div", { className: classNames2.label }, props.children)
|
|
3087
3104
|
);
|
|
3088
3105
|
}
|
|
3089
3106
|
);
|
|
3090
3107
|
Radio.Group = RadioGroup;
|
|
3091
3108
|
|
|
3092
3109
|
// src/Slider/Slider.tsx
|
|
3093
|
-
import
|
|
3110
|
+
import React68, { forwardRef as forwardRef14 } from "react";
|
|
3094
3111
|
import { useSlider } from "@react-aria/slider";
|
|
3095
3112
|
import { useSliderState } from "@react-stately/slider";
|
|
3096
3113
|
import { useNumberFormatter } from "@react-aria/i18n";
|
|
3097
3114
|
import { useObjectRef as useObjectRef11 } from "@react-aria/utils";
|
|
3098
|
-
import { cn as cn35, createVar as
|
|
3115
|
+
import { cn as cn35, createVar as createVar10, useClassNames as useClassNames33, useStateProps as useStateProps19 } from "@marigold/system";
|
|
3099
3116
|
|
|
3100
3117
|
// src/Slider/Thumb.tsx
|
|
3101
|
-
import
|
|
3118
|
+
import React67, { useEffect } from "react";
|
|
3102
3119
|
import { useSliderThumb } from "@react-aria/slider";
|
|
3103
3120
|
import { mergeProps as mergeProps16 } from "@react-aria/utils";
|
|
3104
3121
|
import { cn as cn34, useStateProps as useStateProps18 } from "@marigold/system";
|
|
@@ -3110,7 +3127,7 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
|
3110
3127
|
import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
|
|
3111
3128
|
var Thumb = ({ state, trackRef, className, ...props }) => {
|
|
3112
3129
|
const { disabled } = props;
|
|
3113
|
-
const inputRef =
|
|
3130
|
+
const inputRef = React67.useRef(null);
|
|
3114
3131
|
const { isFocusVisible, focusProps, isFocused } = useFocusRing11();
|
|
3115
3132
|
const focused = isFocused || isFocusVisible || state.isThumbDragging(0);
|
|
3116
3133
|
const stateProps = useStateProps18({
|
|
@@ -3129,7 +3146,7 @@ var Thumb = ({ state, trackRef, className, ...props }) => {
|
|
|
3129
3146
|
useEffect(() => {
|
|
3130
3147
|
state.setThumbEditable(0, !disabled);
|
|
3131
3148
|
}, [disabled, state]);
|
|
3132
|
-
return /* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ React67.createElement("div", { className: cn34("top-1/2", className), ...thumbProps, ...stateProps }, /* @__PURE__ */ React67.createElement(VisuallyHidden, null, /* @__PURE__ */ React67.createElement(
|
|
3133
3150
|
"input",
|
|
3134
3151
|
{
|
|
3135
3152
|
type: "range",
|
|
@@ -3154,7 +3171,7 @@ var Slider = forwardRef14(
|
|
|
3154
3171
|
state,
|
|
3155
3172
|
trackRef
|
|
3156
3173
|
);
|
|
3157
|
-
const classNames2 =
|
|
3174
|
+
const classNames2 = useClassNames33({
|
|
3158
3175
|
component: "Slider",
|
|
3159
3176
|
variant,
|
|
3160
3177
|
size
|
|
@@ -3162,14 +3179,14 @@ var Slider = forwardRef14(
|
|
|
3162
3179
|
const sliderState = useStateProps19({
|
|
3163
3180
|
disabled: props.disabled
|
|
3164
3181
|
});
|
|
3165
|
-
return /* @__PURE__ */
|
|
3182
|
+
return /* @__PURE__ */ React68.createElement(
|
|
3166
3183
|
"div",
|
|
3167
3184
|
{
|
|
3168
3185
|
className: "flex w-[var(--slideWidth)] touch-none flex-col",
|
|
3169
|
-
style:
|
|
3186
|
+
style: createVar10({ slideWidth: width }),
|
|
3170
3187
|
...groupProps
|
|
3171
3188
|
},
|
|
3172
|
-
/* @__PURE__ */
|
|
3189
|
+
/* @__PURE__ */ React68.createElement("div", { className: "flex self-stretch" }, props.children && /* @__PURE__ */ React68.createElement("label", { className: classNames2.label, ...labelProps }, props.children), /* @__PURE__ */ React68.createElement(
|
|
3173
3190
|
"output",
|
|
3174
3191
|
{
|
|
3175
3192
|
className: cn35(
|
|
@@ -3180,7 +3197,7 @@ var Slider = forwardRef14(
|
|
|
3180
3197
|
},
|
|
3181
3198
|
state.getThumbValueLabel(0)
|
|
3182
3199
|
)),
|
|
3183
|
-
/* @__PURE__ */
|
|
3200
|
+
/* @__PURE__ */ React68.createElement(
|
|
3184
3201
|
"div",
|
|
3185
3202
|
{
|
|
3186
3203
|
className: "h-8 w-full cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
@@ -3188,7 +3205,7 @@ var Slider = forwardRef14(
|
|
|
3188
3205
|
...sliderState,
|
|
3189
3206
|
ref: trackRef
|
|
3190
3207
|
},
|
|
3191
|
-
/* @__PURE__ */
|
|
3208
|
+
/* @__PURE__ */ React68.createElement(
|
|
3192
3209
|
"div",
|
|
3193
3210
|
{
|
|
3194
3211
|
className: cn35(
|
|
@@ -3197,7 +3214,7 @@ var Slider = forwardRef14(
|
|
|
3197
3214
|
)
|
|
3198
3215
|
}
|
|
3199
3216
|
),
|
|
3200
|
-
/* @__PURE__ */
|
|
3217
|
+
/* @__PURE__ */ React68.createElement(
|
|
3201
3218
|
Thumb,
|
|
3202
3219
|
{
|
|
3203
3220
|
state,
|
|
@@ -3212,11 +3229,11 @@ var Slider = forwardRef14(
|
|
|
3212
3229
|
);
|
|
3213
3230
|
|
|
3214
3231
|
// src/Split/Split.tsx
|
|
3215
|
-
import
|
|
3216
|
-
var Split = (props) => /* @__PURE__ */
|
|
3232
|
+
import React69 from "react";
|
|
3233
|
+
var Split = (props) => /* @__PURE__ */ React69.createElement("div", { ...props, role: "separator", className: "grow" });
|
|
3217
3234
|
|
|
3218
3235
|
// src/Stack/Stack.tsx
|
|
3219
|
-
import
|
|
3236
|
+
import React70 from "react";
|
|
3220
3237
|
import {
|
|
3221
3238
|
cn as cn36,
|
|
3222
3239
|
gapSpace as gapSpace6,
|
|
@@ -3232,7 +3249,7 @@ var Stack = ({
|
|
|
3232
3249
|
...props
|
|
3233
3250
|
}) => {
|
|
3234
3251
|
var _a, _b, _c, _d;
|
|
3235
|
-
return /* @__PURE__ */
|
|
3252
|
+
return /* @__PURE__ */ React70.createElement(
|
|
3236
3253
|
"div",
|
|
3237
3254
|
{
|
|
3238
3255
|
className: cn36(
|
|
@@ -3249,12 +3266,12 @@ var Stack = ({
|
|
|
3249
3266
|
};
|
|
3250
3267
|
|
|
3251
3268
|
// src/Switch/Switch.tsx
|
|
3252
|
-
import
|
|
3269
|
+
import React71, { forwardRef as forwardRef15 } from "react";
|
|
3253
3270
|
import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
|
|
3254
3271
|
import { useSwitch } from "@react-aria/switch";
|
|
3255
3272
|
import { useObjectRef as useObjectRef12 } from "@react-aria/utils";
|
|
3256
3273
|
import { useToggleState as useToggleState2 } from "@react-stately/toggle";
|
|
3257
|
-
import { cn as cn37, createVar as
|
|
3274
|
+
import { cn as cn37, createVar as createVar11, useStateProps as useStateProps20, useClassNames as useClassNames34 } from "@marigold/system";
|
|
3258
3275
|
var Switch = forwardRef15(
|
|
3259
3276
|
({
|
|
3260
3277
|
variant,
|
|
@@ -3283,8 +3300,8 @@ var Switch = forwardRef15(
|
|
|
3283
3300
|
readOnly,
|
|
3284
3301
|
focus: isFocusVisible
|
|
3285
3302
|
});
|
|
3286
|
-
const classNames2 =
|
|
3287
|
-
return /* @__PURE__ */
|
|
3303
|
+
const classNames2 = useClassNames34({ component: "Switch", size, variant });
|
|
3304
|
+
return /* @__PURE__ */ React71.createElement(
|
|
3288
3305
|
"label",
|
|
3289
3306
|
{
|
|
3290
3307
|
className: cn37(
|
|
@@ -3292,10 +3309,10 @@ var Switch = forwardRef15(
|
|
|
3292
3309
|
"w-[var(--switchWidth)]",
|
|
3293
3310
|
"relative flex items-center justify-between gap-[1ch]"
|
|
3294
3311
|
),
|
|
3295
|
-
style:
|
|
3312
|
+
style: createVar11({ switchWidth: width }),
|
|
3296
3313
|
...stateProps
|
|
3297
3314
|
},
|
|
3298
|
-
/* @__PURE__ */
|
|
3315
|
+
/* @__PURE__ */ React71.createElement(
|
|
3299
3316
|
"input",
|
|
3300
3317
|
{
|
|
3301
3318
|
ref: inputRef,
|
|
@@ -3304,8 +3321,8 @@ var Switch = forwardRef15(
|
|
|
3304
3321
|
...focusProps
|
|
3305
3322
|
}
|
|
3306
3323
|
),
|
|
3307
|
-
props.children && /* @__PURE__ */
|
|
3308
|
-
/* @__PURE__ */
|
|
3324
|
+
props.children && /* @__PURE__ */ React71.createElement(React71.Fragment, null, props.children),
|
|
3325
|
+
/* @__PURE__ */ React71.createElement(
|
|
3309
3326
|
"div",
|
|
3310
3327
|
{
|
|
3311
3328
|
className: cn37(
|
|
@@ -3313,7 +3330,7 @@ var Switch = forwardRef15(
|
|
|
3313
3330
|
classNames2.track
|
|
3314
3331
|
)
|
|
3315
3332
|
},
|
|
3316
|
-
/* @__PURE__ */
|
|
3333
|
+
/* @__PURE__ */ React71.createElement(
|
|
3317
3334
|
"div",
|
|
3318
3335
|
{
|
|
3319
3336
|
className: cn37(
|
|
@@ -3332,17 +3349,17 @@ var Switch = forwardRef15(
|
|
|
3332
3349
|
);
|
|
3333
3350
|
|
|
3334
3351
|
// src/Table/Table.tsx
|
|
3335
|
-
import
|
|
3352
|
+
import React80, { useRef as useRef26 } from "react";
|
|
3336
3353
|
import { useTable } from "@react-aria/table";
|
|
3337
3354
|
import {
|
|
3355
|
+
TableBody as Body2,
|
|
3338
3356
|
Cell,
|
|
3339
3357
|
Column,
|
|
3340
|
-
Row,
|
|
3341
|
-
TableBody as Body2,
|
|
3342
3358
|
TableHeader as Header2,
|
|
3359
|
+
Row,
|
|
3343
3360
|
useTableState
|
|
3344
3361
|
} from "@react-stately/table";
|
|
3345
|
-
import { cn as cn42, useClassNames as
|
|
3362
|
+
import { cn as cn42, useClassNames as useClassNames36 } from "@marigold/system";
|
|
3346
3363
|
|
|
3347
3364
|
// src/Table/Context.tsx
|
|
3348
3365
|
import { createContext as createContext8, useContext as useContext8 } from "react";
|
|
@@ -3350,15 +3367,15 @@ var TableContext = createContext8({});
|
|
|
3350
3367
|
var useTableContext = () => useContext8(TableContext);
|
|
3351
3368
|
|
|
3352
3369
|
// src/Table/TableBody.tsx
|
|
3353
|
-
import
|
|
3370
|
+
import React72 from "react";
|
|
3354
3371
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3355
3372
|
var TableBody = ({ children }) => {
|
|
3356
3373
|
const { rowGroupProps } = useTableRowGroup();
|
|
3357
|
-
return /* @__PURE__ */
|
|
3374
|
+
return /* @__PURE__ */ React72.createElement("tbody", { ...rowGroupProps }, children);
|
|
3358
3375
|
};
|
|
3359
3376
|
|
|
3360
3377
|
// src/Table/TableCell.tsx
|
|
3361
|
-
import
|
|
3378
|
+
import React73, { useRef as useRef20 } from "react";
|
|
3362
3379
|
import { useTableCell } from "@react-aria/table";
|
|
3363
3380
|
import { useFocusRing as useFocusRing13 } from "@react-aria/focus";
|
|
3364
3381
|
import { mergeProps as mergeProps17 } from "@react-aria/utils";
|
|
@@ -3385,7 +3402,7 @@ var TableCell = ({ cell }) => {
|
|
|
3385
3402
|
};
|
|
3386
3403
|
const { focusProps, isFocusVisible } = useFocusRing13();
|
|
3387
3404
|
const stateProps = useStateProps21({ disabled, focusVisible: isFocusVisible });
|
|
3388
|
-
return /* @__PURE__ */
|
|
3405
|
+
return /* @__PURE__ */ React73.createElement(
|
|
3389
3406
|
"td",
|
|
3390
3407
|
{
|
|
3391
3408
|
ref,
|
|
@@ -3398,7 +3415,7 @@ var TableCell = ({ cell }) => {
|
|
|
3398
3415
|
};
|
|
3399
3416
|
|
|
3400
3417
|
// src/Table/TableCheckboxCell.tsx
|
|
3401
|
-
import
|
|
3418
|
+
import React74, { useRef as useRef21 } from "react";
|
|
3402
3419
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
3403
3420
|
import { useFocusRing as useFocusRing14 } from "@react-aria/focus";
|
|
3404
3421
|
import { mergeProps as mergeProps18 } from "@react-aria/utils";
|
|
@@ -3441,7 +3458,7 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3441
3458
|
);
|
|
3442
3459
|
const { focusProps, isFocusVisible } = useFocusRing14();
|
|
3443
3460
|
const stateProps = useStateProps22({ disabled, focusVisible: isFocusVisible });
|
|
3444
|
-
return /* @__PURE__ */
|
|
3461
|
+
return /* @__PURE__ */ React74.createElement(
|
|
3445
3462
|
"td",
|
|
3446
3463
|
{
|
|
3447
3464
|
ref,
|
|
@@ -3449,22 +3466,23 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3449
3466
|
...mergeProps18(gridCellProps, focusProps),
|
|
3450
3467
|
...stateProps
|
|
3451
3468
|
},
|
|
3452
|
-
/* @__PURE__ */
|
|
3469
|
+
/* @__PURE__ */ React74.createElement(Checkbox, { ...checkboxProps })
|
|
3453
3470
|
);
|
|
3454
3471
|
};
|
|
3455
3472
|
|
|
3456
3473
|
// src/Table/TableColumnHeader.tsx
|
|
3457
|
-
import
|
|
3474
|
+
import React75, { useRef as useRef22 } from "react";
|
|
3458
3475
|
import { useFocusRing as useFocusRing15 } from "@react-aria/focus";
|
|
3459
3476
|
import { useHover as useHover9 } from "@react-aria/interactions";
|
|
3460
3477
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3461
3478
|
import { mergeProps as mergeProps19 } from "@react-aria/utils";
|
|
3462
3479
|
import { cn as cn39, useStateProps as useStateProps23 } from "@marigold/system";
|
|
3480
|
+
import { width as twWidth2 } from "@marigold/system";
|
|
3463
3481
|
var SortIndicator = ({
|
|
3464
3482
|
direction = "ascending",
|
|
3465
3483
|
visible
|
|
3466
3484
|
}) => {
|
|
3467
|
-
return /* @__PURE__ */
|
|
3485
|
+
return /* @__PURE__ */ React75.createElement(
|
|
3468
3486
|
"span",
|
|
3469
3487
|
{
|
|
3470
3488
|
role: "presentation",
|
|
@@ -3477,7 +3495,10 @@ var SortIndicator = ({
|
|
|
3477
3495
|
direction === "ascending" ? "\u25B2" : "\u25BC"
|
|
3478
3496
|
);
|
|
3479
3497
|
};
|
|
3480
|
-
var TableColumnHeader = ({
|
|
3498
|
+
var TableColumnHeader = ({
|
|
3499
|
+
column,
|
|
3500
|
+
width = "auto"
|
|
3501
|
+
}) => {
|
|
3481
3502
|
var _a, _b;
|
|
3482
3503
|
const ref = useRef22(null);
|
|
3483
3504
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -3494,17 +3515,17 @@ var TableColumnHeader = ({ column }) => {
|
|
|
3494
3515
|
hover: isHovered,
|
|
3495
3516
|
focusVisible: isFocusVisible
|
|
3496
3517
|
});
|
|
3497
|
-
return /* @__PURE__ */
|
|
3518
|
+
return /* @__PURE__ */ React75.createElement(
|
|
3498
3519
|
"th",
|
|
3499
3520
|
{
|
|
3500
3521
|
colSpan: column.colspan,
|
|
3501
3522
|
ref,
|
|
3502
|
-
className: cn39("cursor-default", classNames2 == null ? void 0 : classNames2.header),
|
|
3523
|
+
className: cn39("cursor-default", twWidth2[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3503
3524
|
...mergeProps19(columnHeaderProps, hoverProps, focusProps),
|
|
3504
3525
|
...stateProps
|
|
3505
3526
|
},
|
|
3506
3527
|
column.rendered,
|
|
3507
|
-
column.props.allowsSorting && /* @__PURE__ */
|
|
3528
|
+
column.props.allowsSorting && /* @__PURE__ */ React75.createElement(
|
|
3508
3529
|
SortIndicator,
|
|
3509
3530
|
{
|
|
3510
3531
|
direction: (_a = state.sortDescriptor) == null ? void 0 : _a.direction,
|
|
@@ -3515,35 +3536,35 @@ var TableColumnHeader = ({ column }) => {
|
|
|
3515
3536
|
};
|
|
3516
3537
|
|
|
3517
3538
|
// src/Table/TableHeader.tsx
|
|
3518
|
-
import
|
|
3539
|
+
import React76 from "react";
|
|
3519
3540
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
3520
3541
|
var TableHeader = ({ children }) => {
|
|
3521
3542
|
const { rowGroupProps } = useTableRowGroup2();
|
|
3522
|
-
return /* @__PURE__ */
|
|
3543
|
+
return /* @__PURE__ */ React76.createElement("thead", { ...rowGroupProps }, children);
|
|
3523
3544
|
};
|
|
3524
3545
|
|
|
3525
3546
|
// src/Table/TableHeaderRow.tsx
|
|
3526
|
-
import
|
|
3547
|
+
import React77, { useRef as useRef23 } from "react";
|
|
3527
3548
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3528
3549
|
var TableHeaderRow = ({ item, children }) => {
|
|
3529
3550
|
const { state } = useTableContext();
|
|
3530
3551
|
const ref = useRef23(null);
|
|
3531
3552
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3532
|
-
return /* @__PURE__ */
|
|
3553
|
+
return /* @__PURE__ */ React77.createElement("tr", { ...rowProps, ref }, children);
|
|
3533
3554
|
};
|
|
3534
3555
|
|
|
3535
3556
|
// src/Table/TableRow.tsx
|
|
3536
|
-
import
|
|
3557
|
+
import React78, { useRef as useRef24 } from "react";
|
|
3537
3558
|
import { useFocusRing as useFocusRing16 } from "@react-aria/focus";
|
|
3538
3559
|
import { useHover as useHover10 } from "@react-aria/interactions";
|
|
3539
3560
|
import { useTableRow } from "@react-aria/table";
|
|
3540
3561
|
import { mergeProps as mergeProps20 } from "@react-aria/utils";
|
|
3541
|
-
import { cn as cn40, useClassNames as
|
|
3562
|
+
import { cn as cn40, useClassNames as useClassNames35, useStateProps as useStateProps24 } from "@marigold/system";
|
|
3542
3563
|
var TableRow = ({ children, row }) => {
|
|
3543
3564
|
const ref = useRef24(null);
|
|
3544
3565
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3545
3566
|
const { variant, size } = row.props;
|
|
3546
|
-
const classNames2 =
|
|
3567
|
+
const classNames2 = useClassNames35({
|
|
3547
3568
|
component: "Table",
|
|
3548
3569
|
variant: variant || ctx.variant,
|
|
3549
3570
|
size: size || ctx.size
|
|
@@ -3568,7 +3589,7 @@ var TableRow = ({ children, row }) => {
|
|
|
3568
3589
|
focusVisible: isFocusVisible,
|
|
3569
3590
|
active: isPressed
|
|
3570
3591
|
});
|
|
3571
|
-
return /* @__PURE__ */
|
|
3592
|
+
return /* @__PURE__ */ React78.createElement(
|
|
3572
3593
|
"tr",
|
|
3573
3594
|
{
|
|
3574
3595
|
ref,
|
|
@@ -3586,7 +3607,7 @@ var TableRow = ({ children, row }) => {
|
|
|
3586
3607
|
};
|
|
3587
3608
|
|
|
3588
3609
|
// src/Table/TableSelectAllCell.tsx
|
|
3589
|
-
import
|
|
3610
|
+
import React79, { useRef as useRef25 } from "react";
|
|
3590
3611
|
import { useFocusRing as useFocusRing17 } from "@react-aria/focus";
|
|
3591
3612
|
import { useHover as useHover11 } from "@react-aria/interactions";
|
|
3592
3613
|
import {
|
|
@@ -3594,8 +3615,15 @@ import {
|
|
|
3594
3615
|
useTableSelectAllCheckbox
|
|
3595
3616
|
} from "@react-aria/table";
|
|
3596
3617
|
import { mergeProps as mergeProps21 } from "@react-aria/utils";
|
|
3597
|
-
import {
|
|
3598
|
-
|
|
3618
|
+
import {
|
|
3619
|
+
cn as cn41,
|
|
3620
|
+
width as twWidth3,
|
|
3621
|
+
useStateProps as useStateProps25
|
|
3622
|
+
} from "@marigold/system";
|
|
3623
|
+
var TableSelectAllCell = ({
|
|
3624
|
+
column,
|
|
3625
|
+
width = "auto"
|
|
3626
|
+
}) => {
|
|
3599
3627
|
const ref = useRef25(null);
|
|
3600
3628
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3601
3629
|
const { columnHeaderProps } = useTableColumnHeader2(
|
|
@@ -3612,18 +3640,19 @@ var TableSelectAllCell = ({ column }) => {
|
|
|
3612
3640
|
hover: isHovered,
|
|
3613
3641
|
focusVisible: isFocusVisible
|
|
3614
3642
|
});
|
|
3615
|
-
return /* @__PURE__ */
|
|
3643
|
+
return /* @__PURE__ */ React79.createElement(
|
|
3616
3644
|
"th",
|
|
3617
3645
|
{
|
|
3618
3646
|
ref,
|
|
3619
3647
|
className: cn41(
|
|
3648
|
+
twWidth3[width],
|
|
3620
3649
|
["text-center align-middle leading-none"],
|
|
3621
3650
|
classNames2 == null ? void 0 : classNames2.header
|
|
3622
3651
|
),
|
|
3623
3652
|
...mergeProps21(columnHeaderProps, hoverProps, focusProps),
|
|
3624
3653
|
...stateProps
|
|
3625
3654
|
},
|
|
3626
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ React79.createElement(Checkbox, { ...checkboxProps })
|
|
3627
3656
|
);
|
|
3628
3657
|
};
|
|
3629
3658
|
|
|
@@ -3644,18 +3673,18 @@ var Table = ({
|
|
|
3644
3673
|
props.selectionBehavior !== "replace"
|
|
3645
3674
|
});
|
|
3646
3675
|
const { gridProps } = useTable(props, state, tableRef);
|
|
3647
|
-
const classNames2 =
|
|
3676
|
+
const classNames2 = useClassNames36({
|
|
3648
3677
|
component: "Table",
|
|
3649
3678
|
variant,
|
|
3650
3679
|
size
|
|
3651
3680
|
});
|
|
3652
3681
|
const { collection } = state;
|
|
3653
|
-
return /* @__PURE__ */
|
|
3682
|
+
return /* @__PURE__ */ React80.createElement(
|
|
3654
3683
|
TableContext.Provider,
|
|
3655
3684
|
{
|
|
3656
3685
|
value: { state, interactive, classNames: classNames2, variant, size }
|
|
3657
3686
|
},
|
|
3658
|
-
/* @__PURE__ */
|
|
3687
|
+
/* @__PURE__ */ React80.createElement(
|
|
3659
3688
|
"table",
|
|
3660
3689
|
{
|
|
3661
3690
|
ref: tableRef,
|
|
@@ -3666,17 +3695,31 @@ var Table = ({
|
|
|
3666
3695
|
),
|
|
3667
3696
|
...gridProps
|
|
3668
3697
|
},
|
|
3669
|
-
/* @__PURE__ */
|
|
3698
|
+
/* @__PURE__ */ React80.createElement(TableHeader, null, collection.headerRows.map((headerRow) => /* @__PURE__ */ React80.createElement(TableHeaderRow, { key: headerRow.key, item: headerRow }, [...collection.getChildren(headerRow.key)].map(
|
|
3670
3699
|
(column) => {
|
|
3671
|
-
var _a;
|
|
3672
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3700
|
+
var _a, _b, _c;
|
|
3701
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React80.createElement(
|
|
3702
|
+
TableSelectAllCell,
|
|
3703
|
+
{
|
|
3704
|
+
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3705
|
+
key: column.key,
|
|
3706
|
+
column
|
|
3707
|
+
}
|
|
3708
|
+
) : /* @__PURE__ */ React80.createElement(
|
|
3709
|
+
TableColumnHeader,
|
|
3710
|
+
{
|
|
3711
|
+
width: (_c = column.props) == null ? void 0 : _c.width,
|
|
3712
|
+
key: column.key,
|
|
3713
|
+
column
|
|
3714
|
+
}
|
|
3715
|
+
);
|
|
3673
3716
|
}
|
|
3674
3717
|
)))),
|
|
3675
|
-
/* @__PURE__ */
|
|
3676
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3718
|
+
/* @__PURE__ */ React80.createElement(TableBody, null, ...collection.rows.map(
|
|
3719
|
+
(row) => row.type === "item" && /* @__PURE__ */ React80.createElement(TableRow, { key: row.key, row }, [...collection.getChildren(row.key)].map(
|
|
3677
3720
|
(cell) => {
|
|
3678
3721
|
var _a;
|
|
3679
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3722
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React80.createElement(TableCheckboxCell, { key: cell.key, cell }) : /* @__PURE__ */ React80.createElement(TableCell, { key: cell.key, cell });
|
|
3680
3723
|
}
|
|
3681
3724
|
))
|
|
3682
3725
|
))
|
|
@@ -3690,15 +3733,15 @@ Table.Header = Header2;
|
|
|
3690
3733
|
Table.Row = Row;
|
|
3691
3734
|
|
|
3692
3735
|
// src/Text/Text.tsx
|
|
3693
|
-
import
|
|
3736
|
+
import React81 from "react";
|
|
3694
3737
|
import {
|
|
3695
3738
|
cn as cn43,
|
|
3696
|
-
createVar as
|
|
3739
|
+
createVar as createVar12,
|
|
3697
3740
|
cursorStyle,
|
|
3698
3741
|
fontWeight,
|
|
3699
3742
|
get as get2,
|
|
3700
3743
|
textAlign as textAlign2,
|
|
3701
|
-
useClassNames as
|
|
3744
|
+
useClassNames as useClassNames37,
|
|
3702
3745
|
useTheme as useTheme5,
|
|
3703
3746
|
textSize,
|
|
3704
3747
|
textStyle
|
|
@@ -3716,12 +3759,12 @@ var Text = ({
|
|
|
3716
3759
|
...props
|
|
3717
3760
|
}) => {
|
|
3718
3761
|
const theme = useTheme5();
|
|
3719
|
-
const classNames2 =
|
|
3762
|
+
const classNames2 = useClassNames37({
|
|
3720
3763
|
component: "Text",
|
|
3721
3764
|
variant,
|
|
3722
3765
|
size
|
|
3723
3766
|
});
|
|
3724
|
-
return /* @__PURE__ */
|
|
3767
|
+
return /* @__PURE__ */ React81.createElement(
|
|
3725
3768
|
"p",
|
|
3726
3769
|
{
|
|
3727
3770
|
...props,
|
|
@@ -3734,7 +3777,7 @@ var Text = ({
|
|
|
3734
3777
|
weight && fontWeight[weight],
|
|
3735
3778
|
fontSize && textSize[fontSize]
|
|
3736
3779
|
),
|
|
3737
|
-
style:
|
|
3780
|
+
style: createVar12({
|
|
3738
3781
|
color: color && theme.colors && get2(
|
|
3739
3782
|
theme.colors,
|
|
3740
3783
|
color.replace("-", "."),
|
|
@@ -3748,12 +3791,12 @@ var Text = ({
|
|
|
3748
3791
|
};
|
|
3749
3792
|
|
|
3750
3793
|
// src/TextArea/TextArea.tsx
|
|
3751
|
-
import
|
|
3794
|
+
import React82, { forwardRef as forwardRef16 } from "react";
|
|
3752
3795
|
import { useHover as useHover12 } from "@react-aria/interactions";
|
|
3753
3796
|
import { useFocusRing as useFocusRing18 } from "@react-aria/focus";
|
|
3754
3797
|
import { useTextField } from "@react-aria/textfield";
|
|
3755
3798
|
import { useObjectRef as useObjectRef13 } from "@react-aria/utils";
|
|
3756
|
-
import { useClassNames as
|
|
3799
|
+
import { useClassNames as useClassNames38, useStateProps as useStateProps26 } from "@marigold/system";
|
|
3757
3800
|
var TextArea = forwardRef16(
|
|
3758
3801
|
({
|
|
3759
3802
|
variant,
|
|
@@ -3789,8 +3832,8 @@ var TextArea = forwardRef16(
|
|
|
3789
3832
|
required,
|
|
3790
3833
|
error
|
|
3791
3834
|
});
|
|
3792
|
-
const classNames2 =
|
|
3793
|
-
return /* @__PURE__ */
|
|
3835
|
+
const classNames2 = useClassNames38({ component: "TextArea", variant, size });
|
|
3836
|
+
return /* @__PURE__ */ React82.createElement(
|
|
3794
3837
|
FieldBase,
|
|
3795
3838
|
{
|
|
3796
3839
|
label,
|
|
@@ -3805,7 +3848,7 @@ var TextArea = forwardRef16(
|
|
|
3805
3848
|
size,
|
|
3806
3849
|
width
|
|
3807
3850
|
},
|
|
3808
|
-
/* @__PURE__ */
|
|
3851
|
+
/* @__PURE__ */ React82.createElement(
|
|
3809
3852
|
"textarea",
|
|
3810
3853
|
{
|
|
3811
3854
|
className: classNames2,
|
|
@@ -3821,7 +3864,7 @@ var TextArea = forwardRef16(
|
|
|
3821
3864
|
);
|
|
3822
3865
|
|
|
3823
3866
|
// src/TextField/TextField.tsx
|
|
3824
|
-
import
|
|
3867
|
+
import React83, { forwardRef as forwardRef17 } from "react";
|
|
3825
3868
|
import { useHover as useHover13 } from "@react-aria/interactions";
|
|
3826
3869
|
import { useFocusRing as useFocusRing19 } from "@react-aria/focus";
|
|
3827
3870
|
import { useTextField as useTextField2 } from "@react-aria/textfield";
|
|
@@ -3854,7 +3897,7 @@ var TextField = forwardRef17(
|
|
|
3854
3897
|
readOnly,
|
|
3855
3898
|
required
|
|
3856
3899
|
});
|
|
3857
|
-
return /* @__PURE__ */
|
|
3900
|
+
return /* @__PURE__ */ React83.createElement(
|
|
3858
3901
|
FieldBase,
|
|
3859
3902
|
{
|
|
3860
3903
|
label,
|
|
@@ -3869,7 +3912,7 @@ var TextField = forwardRef17(
|
|
|
3869
3912
|
size,
|
|
3870
3913
|
width
|
|
3871
3914
|
},
|
|
3872
|
-
/* @__PURE__ */
|
|
3915
|
+
/* @__PURE__ */ React83.createElement(
|
|
3873
3916
|
Input,
|
|
3874
3917
|
{
|
|
3875
3918
|
ref: inputRef,
|
|
@@ -3883,8 +3926,8 @@ var TextField = forwardRef17(
|
|
|
3883
3926
|
);
|
|
3884
3927
|
|
|
3885
3928
|
// src/Tiles/Tiles.tsx
|
|
3886
|
-
import
|
|
3887
|
-
import { gapSpace as gapSpace7, cn as cn44, createVar as
|
|
3929
|
+
import React84 from "react";
|
|
3930
|
+
import { gapSpace as gapSpace7, cn as cn44, createVar as createVar13 } from "@marigold/system";
|
|
3888
3931
|
var Tiles = ({
|
|
3889
3932
|
space = 0,
|
|
3890
3933
|
stretch = false,
|
|
@@ -3897,7 +3940,7 @@ var Tiles = ({
|
|
|
3897
3940
|
if (stretch) {
|
|
3898
3941
|
column = `minmax(${column}, 1fr)`;
|
|
3899
3942
|
}
|
|
3900
|
-
return /* @__PURE__ */
|
|
3943
|
+
return /* @__PURE__ */ React84.createElement(
|
|
3901
3944
|
"div",
|
|
3902
3945
|
{
|
|
3903
3946
|
...props,
|
|
@@ -3907,16 +3950,16 @@ var Tiles = ({
|
|
|
3907
3950
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3908
3951
|
equalHeight && "auto-rows-[1fr]"
|
|
3909
3952
|
),
|
|
3910
|
-
style:
|
|
3953
|
+
style: createVar13({ column, tilesWidth })
|
|
3911
3954
|
},
|
|
3912
3955
|
children
|
|
3913
3956
|
);
|
|
3914
3957
|
};
|
|
3915
3958
|
|
|
3916
3959
|
// src/Tooltip/Tooltip.tsx
|
|
3917
|
-
import
|
|
3960
|
+
import React86 from "react";
|
|
3918
3961
|
import { useTooltip } from "@react-aria/tooltip";
|
|
3919
|
-
import { cn as cn45, useClassNames as
|
|
3962
|
+
import { cn as cn45, useClassNames as useClassNames39 } from "@marigold/system";
|
|
3920
3963
|
|
|
3921
3964
|
// src/Tooltip/Context.ts
|
|
3922
3965
|
import { createContext as createContext9, useContext as useContext9 } from "react";
|
|
@@ -3924,7 +3967,7 @@ var TooltipContext = createContext9({});
|
|
|
3924
3967
|
var useTooltipContext = () => useContext9(TooltipContext);
|
|
3925
3968
|
|
|
3926
3969
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3927
|
-
import
|
|
3970
|
+
import React85, { useRef as useRef27 } from "react";
|
|
3928
3971
|
import { FocusableProvider } from "@react-aria/focus";
|
|
3929
3972
|
import { useOverlayPosition } from "@react-aria/overlays";
|
|
3930
3973
|
import { useTooltipTrigger } from "@react-aria/tooltip";
|
|
@@ -3937,7 +3980,7 @@ var TooltipTrigger = ({
|
|
|
3937
3980
|
children,
|
|
3938
3981
|
...rest
|
|
3939
3982
|
}) => {
|
|
3940
|
-
const [tooltipTrigger, tooltip] =
|
|
3983
|
+
const [tooltipTrigger, tooltip] = React85.Children.toArray(children);
|
|
3941
3984
|
const props = {
|
|
3942
3985
|
...rest,
|
|
3943
3986
|
isDisabled: disabled,
|
|
@@ -3965,7 +4008,7 @@ var TooltipTrigger = ({
|
|
|
3965
4008
|
isOpen: state.isOpen,
|
|
3966
4009
|
overlayRef
|
|
3967
4010
|
});
|
|
3968
|
-
return /* @__PURE__ */
|
|
4011
|
+
return /* @__PURE__ */ React85.createElement(FocusableProvider, { ref: tooltipTriggerRef, ...triggerProps }, tooltipTrigger, /* @__PURE__ */ React85.createElement(
|
|
3969
4012
|
TooltipContext.Provider,
|
|
3970
4013
|
{
|
|
3971
4014
|
value: {
|
|
@@ -3977,7 +4020,7 @@ var TooltipTrigger = ({
|
|
|
3977
4020
|
...positionProps
|
|
3978
4021
|
}
|
|
3979
4022
|
},
|
|
3980
|
-
/* @__PURE__ */
|
|
4023
|
+
/* @__PURE__ */ React85.createElement(Overlay, { open: state.isOpen }, tooltip)
|
|
3981
4024
|
));
|
|
3982
4025
|
};
|
|
3983
4026
|
|
|
@@ -3985,8 +4028,8 @@ var TooltipTrigger = ({
|
|
|
3985
4028
|
var Tooltip = ({ children, variant, size }) => {
|
|
3986
4029
|
const { arrowProps, state, overlayRef, placement, ...rest } = useTooltipContext();
|
|
3987
4030
|
const { tooltipProps } = useTooltip({}, state);
|
|
3988
|
-
const classNames2 =
|
|
3989
|
-
return /* @__PURE__ */
|
|
4031
|
+
const classNames2 = useClassNames39({ component: "Tooltip", variant, size });
|
|
4032
|
+
return /* @__PURE__ */ React86.createElement(
|
|
3990
4033
|
"div",
|
|
3991
4034
|
{
|
|
3992
4035
|
...tooltipProps,
|
|
@@ -3995,8 +4038,8 @@ var Tooltip = ({ children, variant, size }) => {
|
|
|
3995
4038
|
className: cn45("group/tooltip", classNames2.container),
|
|
3996
4039
|
"data-placement": placement
|
|
3997
4040
|
},
|
|
3998
|
-
/* @__PURE__ */
|
|
3999
|
-
/* @__PURE__ */
|
|
4041
|
+
/* @__PURE__ */ React86.createElement("div", null, children),
|
|
4042
|
+
/* @__PURE__ */ React86.createElement(
|
|
4000
4043
|
"div",
|
|
4001
4044
|
{
|
|
4002
4045
|
...arrowProps,
|
|
@@ -4011,23 +4054,23 @@ Tooltip.Trigger = TooltipTrigger;
|
|
|
4011
4054
|
import { Item as Item6 } from "@react-stately/collections";
|
|
4012
4055
|
|
|
4013
4056
|
// src/TagGroup/TagGroup.tsx
|
|
4014
|
-
import
|
|
4057
|
+
import React88, { useRef as useRef28 } from "react";
|
|
4015
4058
|
import { useTagGroup } from "@react-aria/tag";
|
|
4016
4059
|
import { useListState } from "@react-stately/list";
|
|
4017
4060
|
import { useStateProps as useStateProps28 } from "@marigold/system";
|
|
4018
4061
|
|
|
4019
4062
|
// src/TagGroup/Tag.tsx
|
|
4020
|
-
import
|
|
4063
|
+
import React87 from "react";
|
|
4021
4064
|
import { useTag } from "@react-aria/tag";
|
|
4022
4065
|
import { useFocusRing as useFocusRing20 } from "@react-aria/focus";
|
|
4023
|
-
import { cn as cn46, useClassNames as
|
|
4066
|
+
import { cn as cn46, useClassNames as useClassNames40 } from "@marigold/system";
|
|
4024
4067
|
import { mergeProps as mergeProps23 } from "@react-aria/utils";
|
|
4025
4068
|
var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
4026
4069
|
const props = {
|
|
4027
4070
|
item,
|
|
4028
4071
|
...rest
|
|
4029
4072
|
};
|
|
4030
|
-
let ref =
|
|
4073
|
+
let ref = React87.useRef(null);
|
|
4031
4074
|
let { focusProps } = useFocusRing20({ within: true });
|
|
4032
4075
|
const { rowProps, gridCellProps, allowsRemoving, removeButtonProps } = useTag(
|
|
4033
4076
|
{
|
|
@@ -4037,22 +4080,22 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
4037
4080
|
state,
|
|
4038
4081
|
ref
|
|
4039
4082
|
);
|
|
4040
|
-
const classNames2 =
|
|
4041
|
-
return /* @__PURE__ */
|
|
4083
|
+
const classNames2 = useClassNames40({ component: "Tag", variant, size });
|
|
4084
|
+
return /* @__PURE__ */ React87.createElement(
|
|
4042
4085
|
"span",
|
|
4043
4086
|
{
|
|
4044
4087
|
ref,
|
|
4045
4088
|
...mergeProps23(rowProps, focusProps),
|
|
4046
4089
|
className: classNames2.tag
|
|
4047
4090
|
},
|
|
4048
|
-
/* @__PURE__ */
|
|
4091
|
+
/* @__PURE__ */ React87.createElement("div", { ...gridCellProps, className: classNames2.gridCell }, /* @__PURE__ */ React87.createElement("span", null, item.rendered), allowsRemoving && /* @__PURE__ */ React87.createElement(
|
|
4049
4092
|
Button,
|
|
4050
4093
|
{
|
|
4051
4094
|
...removeButtonProps,
|
|
4052
4095
|
className: cn46("flex items-center", classNames2.closeButton),
|
|
4053
4096
|
role: "button"
|
|
4054
4097
|
},
|
|
4055
|
-
/* @__PURE__ */
|
|
4098
|
+
/* @__PURE__ */ React87.createElement("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20 }, /* @__PURE__ */ React87.createElement("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" }))
|
|
4056
4099
|
))
|
|
4057
4100
|
);
|
|
4058
4101
|
};
|
|
@@ -4077,7 +4120,7 @@ var TagGroup = ({
|
|
|
4077
4120
|
error,
|
|
4078
4121
|
required
|
|
4079
4122
|
});
|
|
4080
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ React88.createElement(
|
|
4081
4124
|
FieldBase,
|
|
4082
4125
|
{
|
|
4083
4126
|
width,
|
|
@@ -4091,14 +4134,14 @@ var TagGroup = ({
|
|
|
4091
4134
|
stateProps,
|
|
4092
4135
|
...gridProps
|
|
4093
4136
|
},
|
|
4094
|
-
/* @__PURE__ */
|
|
4137
|
+
/* @__PURE__ */ React88.createElement(
|
|
4095
4138
|
"div",
|
|
4096
4139
|
{
|
|
4097
4140
|
role: "presentation",
|
|
4098
4141
|
ref: inputRef,
|
|
4099
4142
|
className: "flex flex-wrap items-start gap-1"
|
|
4100
4143
|
},
|
|
4101
|
-
[...state.collection].map((item) => /* @__PURE__ */
|
|
4144
|
+
[...state.collection].map((item) => /* @__PURE__ */ React88.createElement(
|
|
4102
4145
|
Tag,
|
|
4103
4146
|
{
|
|
4104
4147
|
...item.props,
|
|
@@ -4120,8 +4163,8 @@ Tag2.Group = TagGroup;
|
|
|
4120
4163
|
|
|
4121
4164
|
// src/XLoader/XLoader.tsx
|
|
4122
4165
|
import { SVG as SVG6 } from "@marigold/system";
|
|
4123
|
-
import
|
|
4124
|
-
var XLoader = forwardRef18((props, ref) => /* @__PURE__ */
|
|
4166
|
+
import React89, { forwardRef as forwardRef18 } from "react";
|
|
4167
|
+
var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React89.createElement(
|
|
4125
4168
|
SVG6,
|
|
4126
4169
|
{
|
|
4127
4170
|
id: "XLoader",
|
|
@@ -4131,14 +4174,14 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4131
4174
|
...props,
|
|
4132
4175
|
...ref
|
|
4133
4176
|
},
|
|
4134
|
-
/* @__PURE__ */
|
|
4135
|
-
/* @__PURE__ */
|
|
4177
|
+
/* @__PURE__ */ React89.createElement("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
4178
|
+
/* @__PURE__ */ React89.createElement(
|
|
4136
4179
|
"path",
|
|
4137
4180
|
{
|
|
4138
4181
|
id: "XMLID_5_",
|
|
4139
4182
|
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"
|
|
4140
4183
|
},
|
|
4141
|
-
/* @__PURE__ */
|
|
4184
|
+
/* @__PURE__ */ React89.createElement(
|
|
4142
4185
|
"animate",
|
|
4143
4186
|
{
|
|
4144
4187
|
attributeName: "opacity",
|
|
@@ -4150,13 +4193,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4150
4193
|
}
|
|
4151
4194
|
)
|
|
4152
4195
|
),
|
|
4153
|
-
/* @__PURE__ */
|
|
4196
|
+
/* @__PURE__ */ React89.createElement(
|
|
4154
4197
|
"path",
|
|
4155
4198
|
{
|
|
4156
4199
|
id: "XMLID_18_",
|
|
4157
4200
|
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"
|
|
4158
4201
|
},
|
|
4159
|
-
/* @__PURE__ */
|
|
4202
|
+
/* @__PURE__ */ React89.createElement(
|
|
4160
4203
|
"animate",
|
|
4161
4204
|
{
|
|
4162
4205
|
attributeName: "opacity",
|
|
@@ -4168,13 +4211,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4168
4211
|
}
|
|
4169
4212
|
)
|
|
4170
4213
|
),
|
|
4171
|
-
/* @__PURE__ */
|
|
4214
|
+
/* @__PURE__ */ React89.createElement(
|
|
4172
4215
|
"path",
|
|
4173
4216
|
{
|
|
4174
4217
|
id: "XMLID_19_",
|
|
4175
4218
|
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"
|
|
4176
4219
|
},
|
|
4177
|
-
/* @__PURE__ */
|
|
4220
|
+
/* @__PURE__ */ React89.createElement(
|
|
4178
4221
|
"animate",
|
|
4179
4222
|
{
|
|
4180
4223
|
attributeName: "opacity",
|
|
@@ -4186,13 +4229,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4186
4229
|
}
|
|
4187
4230
|
)
|
|
4188
4231
|
),
|
|
4189
|
-
/* @__PURE__ */
|
|
4232
|
+
/* @__PURE__ */ React89.createElement(
|
|
4190
4233
|
"path",
|
|
4191
4234
|
{
|
|
4192
4235
|
id: "XMLID_20_",
|
|
4193
4236
|
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"
|
|
4194
4237
|
},
|
|
4195
|
-
/* @__PURE__ */
|
|
4238
|
+
/* @__PURE__ */ React89.createElement(
|
|
4196
4239
|
"animate",
|
|
4197
4240
|
{
|
|
4198
4241
|
attributeName: "opacity",
|
|
@@ -4204,13 +4247,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4204
4247
|
}
|
|
4205
4248
|
)
|
|
4206
4249
|
),
|
|
4207
|
-
/* @__PURE__ */
|
|
4250
|
+
/* @__PURE__ */ React89.createElement(
|
|
4208
4251
|
"path",
|
|
4209
4252
|
{
|
|
4210
4253
|
id: "XMLID_21_",
|
|
4211
4254
|
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"
|
|
4212
4255
|
},
|
|
4213
|
-
/* @__PURE__ */
|
|
4256
|
+
/* @__PURE__ */ React89.createElement(
|
|
4214
4257
|
"animate",
|
|
4215
4258
|
{
|
|
4216
4259
|
attributeName: "opacity",
|
|
@@ -4222,13 +4265,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4222
4265
|
}
|
|
4223
4266
|
)
|
|
4224
4267
|
),
|
|
4225
|
-
/* @__PURE__ */
|
|
4268
|
+
/* @__PURE__ */ React89.createElement(
|
|
4226
4269
|
"path",
|
|
4227
4270
|
{
|
|
4228
4271
|
id: "XMLID_22_",
|
|
4229
4272
|
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"
|
|
4230
4273
|
},
|
|
4231
|
-
/* @__PURE__ */
|
|
4274
|
+
/* @__PURE__ */ React89.createElement(
|
|
4232
4275
|
"animate",
|
|
4233
4276
|
{
|
|
4234
4277
|
attributeName: "opacity",
|
|
@@ -4240,13 +4283,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4240
4283
|
}
|
|
4241
4284
|
)
|
|
4242
4285
|
),
|
|
4243
|
-
/* @__PURE__ */
|
|
4286
|
+
/* @__PURE__ */ React89.createElement(
|
|
4244
4287
|
"path",
|
|
4245
4288
|
{
|
|
4246
4289
|
id: "XMLID_23_",
|
|
4247
4290
|
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"
|
|
4248
4291
|
},
|
|
4249
|
-
/* @__PURE__ */
|
|
4292
|
+
/* @__PURE__ */ React89.createElement(
|
|
4250
4293
|
"animate",
|
|
4251
4294
|
{
|
|
4252
4295
|
attributeName: "opacity",
|
|
@@ -4258,13 +4301,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4258
4301
|
}
|
|
4259
4302
|
)
|
|
4260
4303
|
),
|
|
4261
|
-
/* @__PURE__ */
|
|
4304
|
+
/* @__PURE__ */ React89.createElement(
|
|
4262
4305
|
"path",
|
|
4263
4306
|
{
|
|
4264
4307
|
id: "XMLID_24_",
|
|
4265
4308
|
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"
|
|
4266
4309
|
},
|
|
4267
|
-
/* @__PURE__ */
|
|
4310
|
+
/* @__PURE__ */ React89.createElement(
|
|
4268
4311
|
"animate",
|
|
4269
4312
|
{
|
|
4270
4313
|
attributeName: "opacity",
|
|
@@ -4276,13 +4319,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4276
4319
|
}
|
|
4277
4320
|
)
|
|
4278
4321
|
),
|
|
4279
|
-
/* @__PURE__ */
|
|
4322
|
+
/* @__PURE__ */ React89.createElement(
|
|
4280
4323
|
"path",
|
|
4281
4324
|
{
|
|
4282
4325
|
id: "XMLID_25_",
|
|
4283
4326
|
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"
|
|
4284
4327
|
},
|
|
4285
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ React89.createElement(
|
|
4286
4329
|
"animate",
|
|
4287
4330
|
{
|
|
4288
4331
|
attributeName: "opacity",
|
|
@@ -4294,13 +4337,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4294
4337
|
}
|
|
4295
4338
|
)
|
|
4296
4339
|
),
|
|
4297
|
-
/* @__PURE__ */
|
|
4340
|
+
/* @__PURE__ */ React89.createElement(
|
|
4298
4341
|
"path",
|
|
4299
4342
|
{
|
|
4300
4343
|
id: "XMLID_26_",
|
|
4301
4344
|
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"
|
|
4302
4345
|
},
|
|
4303
|
-
/* @__PURE__ */
|
|
4346
|
+
/* @__PURE__ */ React89.createElement(
|
|
4304
4347
|
"animate",
|
|
4305
4348
|
{
|
|
4306
4349
|
attributeName: "opacity",
|
|
@@ -4312,13 +4355,13 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4312
4355
|
}
|
|
4313
4356
|
)
|
|
4314
4357
|
),
|
|
4315
|
-
/* @__PURE__ */
|
|
4358
|
+
/* @__PURE__ */ React89.createElement(
|
|
4316
4359
|
"path",
|
|
4317
4360
|
{
|
|
4318
4361
|
id: "XMLID_27_",
|
|
4319
4362
|
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"
|
|
4320
4363
|
},
|
|
4321
|
-
/* @__PURE__ */
|
|
4364
|
+
/* @__PURE__ */ React89.createElement(
|
|
4322
4365
|
"animate",
|
|
4323
4366
|
{
|
|
4324
4367
|
attributeName: "opacity",
|
|
@@ -4333,19 +4376,12 @@ var XLoader = forwardRef18((props, ref) => /* @__PURE__ */ React88.createElement
|
|
|
4333
4376
|
));
|
|
4334
4377
|
|
|
4335
4378
|
// src/Tabs/Tabs.tsx
|
|
4336
|
-
import
|
|
4379
|
+
import React92 from "react";
|
|
4380
|
+
import { useRef as useRef31 } from "react";
|
|
4337
4381
|
import { useTabList } from "@react-aria/tabs";
|
|
4338
|
-
import {
|
|
4382
|
+
import { Item as Item7 } from "@react-stately/collections";
|
|
4339
4383
|
import { useTabListState } from "@react-stately/tabs";
|
|
4340
|
-
import {
|
|
4341
|
-
|
|
4342
|
-
// src/Tabs/Tab.tsx
|
|
4343
|
-
import React89 from "react";
|
|
4344
|
-
import { useRef as useRef29 } from "react";
|
|
4345
|
-
import { cn as cn47, useStateProps as useStateProps29 } from "@marigold/system";
|
|
4346
|
-
import { useTab } from "@react-aria/tabs";
|
|
4347
|
-
import { useFocus, useHover as useHover14 } from "@react-aria/interactions";
|
|
4348
|
-
import { mergeProps as mergeProps24 } from "@react-aria/utils";
|
|
4384
|
+
import { cn as cn49, gapSpace as gapSpace8, useClassNames as useClassNames41 } from "@marigold/system";
|
|
4349
4385
|
|
|
4350
4386
|
// src/Tabs/Context.ts
|
|
4351
4387
|
import { createContext as createContext10, useContext as useContext10 } from "react";
|
|
@@ -4353,6 +4389,12 @@ var TabContext = createContext10({});
|
|
|
4353
4389
|
var useTabContext = () => useContext10(TabContext);
|
|
4354
4390
|
|
|
4355
4391
|
// src/Tabs/Tab.tsx
|
|
4392
|
+
import React90 from "react";
|
|
4393
|
+
import { useRef as useRef29 } from "react";
|
|
4394
|
+
import { cn as cn47, useStateProps as useStateProps29 } from "@marigold/system";
|
|
4395
|
+
import { useTab } from "@react-aria/tabs";
|
|
4396
|
+
import { useFocus, useHover as useHover14 } from "@react-aria/interactions";
|
|
4397
|
+
import { mergeProps as mergeProps24 } from "@react-aria/utils";
|
|
4356
4398
|
var Tab = ({ item, state }) => {
|
|
4357
4399
|
const { key, rendered } = item;
|
|
4358
4400
|
const ref = useRef29(null);
|
|
@@ -4364,7 +4406,7 @@ var Tab = ({ item, state }) => {
|
|
|
4364
4406
|
const { focusProps } = useFocus({});
|
|
4365
4407
|
const stateProps = useStateProps29({ active: isSelected, hover: isHovered });
|
|
4366
4408
|
const { classNames: classNames2 } = useTabContext();
|
|
4367
|
-
return /* @__PURE__ */
|
|
4409
|
+
return /* @__PURE__ */ React90.createElement(
|
|
4368
4410
|
"div",
|
|
4369
4411
|
{
|
|
4370
4412
|
className: cn47(
|
|
@@ -4379,18 +4421,20 @@ var Tab = ({ item, state }) => {
|
|
|
4379
4421
|
};
|
|
4380
4422
|
|
|
4381
4423
|
// src/Tabs/TabPanel.tsx
|
|
4382
|
-
import
|
|
4424
|
+
import React91 from "react";
|
|
4383
4425
|
import { useRef as useRef30 } from "react";
|
|
4384
4426
|
import { useTabPanel } from "@react-aria/tabs";
|
|
4427
|
+
import { cn as cn48 } from "@marigold/system";
|
|
4385
4428
|
var TabPanel = ({ state, ...props }) => {
|
|
4386
4429
|
var _a;
|
|
4387
4430
|
const ref = useRef30(null);
|
|
4388
4431
|
const { tabPanelProps } = useTabPanel(props, state, ref);
|
|
4389
|
-
|
|
4432
|
+
const selectedItemProps = (_a = state.selectedItem) == null ? void 0 : _a.props;
|
|
4433
|
+
const { classNames: classNames2 } = useTabContext();
|
|
4434
|
+
return /* @__PURE__ */ React91.createElement("div", { className: cn48(classNames2.tabpanel), ref, ...tabPanelProps }, selectedItemProps == null ? void 0 : selectedItemProps.children);
|
|
4390
4435
|
};
|
|
4391
4436
|
|
|
4392
4437
|
// src/Tabs/Tabs.tsx
|
|
4393
|
-
import { Item as Item7 } from "@react-stately/collections";
|
|
4394
4438
|
var Tabs = ({
|
|
4395
4439
|
space = 2,
|
|
4396
4440
|
size = "medium",
|
|
@@ -4406,22 +4450,22 @@ var Tabs = ({
|
|
|
4406
4450
|
};
|
|
4407
4451
|
const state = useTabListState(props);
|
|
4408
4452
|
const { tabListProps } = useTabList(props, state, ref);
|
|
4409
|
-
const classNames2 =
|
|
4453
|
+
const classNames2 = useClassNames41({
|
|
4410
4454
|
component: "Tabs",
|
|
4411
4455
|
size,
|
|
4412
4456
|
variant
|
|
4413
4457
|
});
|
|
4414
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ React92.createElement(TabContext.Provider, { value: { classNames: classNames2 } }, /* @__PURE__ */ React92.createElement("div", { className: cn49(classNames2.container) }, /* @__PURE__ */ React92.createElement(
|
|
4415
4459
|
"div",
|
|
4416
4460
|
{
|
|
4417
|
-
className:
|
|
4461
|
+
className: cn49("flex", gapSpace8[space], classNames2.tabs),
|
|
4418
4462
|
...tabListProps,
|
|
4419
4463
|
ref
|
|
4420
4464
|
},
|
|
4421
4465
|
[...state.collection].map((item) => {
|
|
4422
|
-
return /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ React92.createElement(Tab, { key: item.key, item, state });
|
|
4423
4467
|
})
|
|
4424
|
-
), /* @__PURE__ */
|
|
4468
|
+
), /* @__PURE__ */ React92.createElement(TabPanel, { key: (_a = state.selectedItem) == null ? void 0 : _a.key, state })));
|
|
4425
4469
|
};
|
|
4426
4470
|
Tabs.Item = Item7;
|
|
4427
4471
|
export {
|