@marigold/components 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +91 -116
- package/dist/index.d.ts +91 -116
- package/dist/index.js +863 -1154
- package/dist/index.mjs +720 -1024
- package/package.json +25 -68
package/dist/index.mjs
CHANGED
|
@@ -37,9 +37,7 @@ var ChevronDown = forwardRef2(
|
|
|
37
37
|
// src/Accordion/useAccordionItem.ts
|
|
38
38
|
import { useButton } from "@react-aria/button";
|
|
39
39
|
import { useSelectableItem } from "@react-aria/selection";
|
|
40
|
-
import { mergeProps, useId } from "@react-aria/utils";
|
|
41
|
-
import { isAppleDevice } from "@react-aria/utils";
|
|
42
|
-
import { isMac } from "@react-aria/utils";
|
|
40
|
+
import { isAppleDevice, isMac, mergeProps, useId } from "@react-aria/utils";
|
|
43
41
|
function isNonContiguousSelectionModifier(e) {
|
|
44
42
|
return isAppleDevice() ? e.altKey : e.ctrlKey;
|
|
45
43
|
}
|
|
@@ -61,9 +59,7 @@ function useAccordionItem(props, state, ref) {
|
|
|
61
59
|
key,
|
|
62
60
|
ref
|
|
63
61
|
});
|
|
64
|
-
const isDefaultExpanded = state.expandedKeys.has(
|
|
65
|
-
item.key.toString().replace(".$", "")
|
|
66
|
-
);
|
|
62
|
+
const isDefaultExpanded = state.expandedKeys.has(item.key);
|
|
67
63
|
let onSelect = (e) => {
|
|
68
64
|
if (e.pointerType === "keyboard" && isNonContiguousSelectionModifier(e)) {
|
|
69
65
|
if (isDefaultExpanded) {
|
|
@@ -141,16 +137,17 @@ var AccordionItem = ({
|
|
|
141
137
|
...props
|
|
142
138
|
}) => {
|
|
143
139
|
const ref = useRef(null);
|
|
144
|
-
const defaultExpanded = state.expandedKeys.
|
|
145
|
-
item.key.toString().replace(".$", "")
|
|
146
|
-
);
|
|
140
|
+
const defaultExpanded = Array.from(state.expandedKeys).some((key) => {
|
|
141
|
+
return key.toString() === item.key.toString().replace(".$", "");
|
|
142
|
+
});
|
|
147
143
|
const expanded = state.selectionManager.isSelected(item.key);
|
|
148
144
|
useEffect(() => {
|
|
149
145
|
if (defaultExpanded) {
|
|
150
146
|
if (state.selectionManager.selectionMode === "multiple") {
|
|
151
|
-
state.
|
|
152
|
-
state.selectionManager.
|
|
153
|
-
|
|
147
|
+
state.selectionManager.setSelectedKeys([
|
|
148
|
+
...state.selectionManager.selectedKeys,
|
|
149
|
+
item.key
|
|
150
|
+
]);
|
|
154
151
|
} else {
|
|
155
152
|
state.expandedKeys.clear();
|
|
156
153
|
state.selectionManager.toggleSelection(item.key);
|
|
@@ -187,14 +184,14 @@ var AccordionItem = ({
|
|
|
187
184
|
]
|
|
188
185
|
}
|
|
189
186
|
) }),
|
|
190
|
-
|
|
187
|
+
/* @__PURE__ */ jsx3(
|
|
191
188
|
"div",
|
|
192
189
|
{
|
|
193
190
|
...mergeProps2(regionProps, focusProps, stateProps),
|
|
194
|
-
className: classNames2.item,
|
|
191
|
+
className: expanded || defaultExpanded ? classNames2.item : cn(classNames2.item, "hidden"),
|
|
195
192
|
children: item.props.children
|
|
196
193
|
}
|
|
197
|
-
)
|
|
194
|
+
)
|
|
198
195
|
] });
|
|
199
196
|
};
|
|
200
197
|
|
|
@@ -204,26 +201,25 @@ var Accordion = ({ children, ...props }) => {
|
|
|
204
201
|
const ownProps = {
|
|
205
202
|
...props,
|
|
206
203
|
// we have to do this because JSX childs are not supported
|
|
207
|
-
children:
|
|
208
|
-
if (!isValidElement(child)) {
|
|
209
|
-
return child;
|
|
210
|
-
}
|
|
211
|
-
return cloneElement(child, {
|
|
212
|
-
hasChildItems: false,
|
|
213
|
-
...child.props
|
|
214
|
-
});
|
|
215
|
-
})
|
|
204
|
+
children: []
|
|
216
205
|
};
|
|
206
|
+
Children.forEach(children, (child) => {
|
|
207
|
+
var _a;
|
|
208
|
+
if (isValidElement(child) && typeof ((_a = child.props) == null ? void 0 : _a.children) !== "string") {
|
|
209
|
+
const clone = cloneElement(child, {
|
|
210
|
+
hasChildItems: false
|
|
211
|
+
});
|
|
212
|
+
ownProps.children.push(clone);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
ownProps.children.push(child);
|
|
216
|
+
});
|
|
217
217
|
const ref = useRef2(null);
|
|
218
218
|
const state = useTreeState({
|
|
219
219
|
selectionMode: "single",
|
|
220
220
|
...ownProps
|
|
221
221
|
});
|
|
222
|
-
const { accordionProps } = useAccordion(
|
|
223
|
-
{ ...ownProps, children },
|
|
224
|
-
state,
|
|
225
|
-
ref
|
|
226
|
-
);
|
|
222
|
+
const { accordionProps } = useAccordion({ ...ownProps }, state, ref);
|
|
227
223
|
delete accordionProps.onKeyDownCapture;
|
|
228
224
|
return /* @__PURE__ */ jsx4("div", { ...accordionProps, ref, children: [...state.collection].map((item) => /* @__PURE__ */ jsx4(
|
|
229
225
|
AccordionItem,
|
|
@@ -308,53 +304,48 @@ import {
|
|
|
308
304
|
import React2 from "react";
|
|
309
305
|
import { ComboBox, ComboBoxStateContext as ComboBoxStateContext2 } from "react-aria-components";
|
|
310
306
|
|
|
311
|
-
// src/FieldBase/
|
|
307
|
+
// src/FieldBase/FieldBase.tsx
|
|
312
308
|
import { forwardRef as forwardRef3 } from "react";
|
|
313
309
|
import { cn as cn6, width as twWidth, useClassNames as useClassNames4 } from "@marigold/system";
|
|
314
310
|
|
|
315
|
-
// src/HelpText/
|
|
311
|
+
// src/HelpText/HelpText.tsx
|
|
316
312
|
import { FieldError, Text } from "react-aria-components";
|
|
317
313
|
import { cn as cn4, useClassNames as useClassNames2 } from "@marigold/system";
|
|
318
314
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
315
|
+
var Icon = ({ className }) => /* @__PURE__ */ jsx7(
|
|
316
|
+
"svg",
|
|
317
|
+
{
|
|
318
|
+
className: cn4("h-4 w-4 shrink-0", className),
|
|
319
|
+
viewBox: "0 0 24 24",
|
|
320
|
+
role: "presentation",
|
|
321
|
+
fill: "currentColor",
|
|
322
|
+
children: /* @__PURE__ */ jsx7("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" })
|
|
323
|
+
}
|
|
324
|
+
);
|
|
319
325
|
var HelpText = ({
|
|
320
326
|
variant,
|
|
321
327
|
size,
|
|
322
328
|
description,
|
|
323
|
-
error,
|
|
324
329
|
errorMessage,
|
|
325
330
|
...props
|
|
326
331
|
}) => {
|
|
327
|
-
const hasErrorMessage = errorMessage && error;
|
|
328
332
|
const classNames2 = useClassNames2({
|
|
329
333
|
component: "HelpText",
|
|
330
334
|
variant,
|
|
331
335
|
size
|
|
332
336
|
});
|
|
333
|
-
if (!description && !errorMessage) {
|
|
334
|
-
return null;
|
|
335
|
-
}
|
|
336
337
|
return /* @__PURE__ */ jsxs3("div", { className: cn4(classNames2.container), children: [
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
|
|
339
|
-
{
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
role: "presentation",
|
|
349
|
-
fill: "currentColor",
|
|
350
|
-
children: /* @__PURE__ */ jsx7("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" })
|
|
351
|
-
}
|
|
352
|
-
),
|
|
353
|
-
errorMessage
|
|
354
|
-
]
|
|
355
|
-
}
|
|
356
|
-
),
|
|
357
|
-
!hasErrorMessage && /* @__PURE__ */ jsx7(Text, { slot: "description", children: description })
|
|
338
|
+
/* @__PURE__ */ jsx7(FieldError, { ...props, className: "peer/error flex flex-col", children: (validation) => {
|
|
339
|
+
const messages = (typeof errorMessage === "function" ? errorMessage(validation) : errorMessage) || validation.validationErrors;
|
|
340
|
+
return Array.isArray(messages) ? messages.map((msg) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
341
|
+
/* @__PURE__ */ jsx7(Icon, { className: classNames2.icon }),
|
|
342
|
+
msg
|
|
343
|
+
] })) : /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-start gap-1", children: [
|
|
344
|
+
/* @__PURE__ */ jsx7(Icon, { className: classNames2.icon }),
|
|
345
|
+
messages
|
|
346
|
+
] });
|
|
347
|
+
} }),
|
|
348
|
+
/* @__PURE__ */ jsx7(Text, { slot: "description", className: "peer-first/error:hidden", children: description })
|
|
358
349
|
] });
|
|
359
350
|
};
|
|
360
351
|
|
|
@@ -399,7 +390,7 @@ var _Label = ({ size, variant, children, ...props }) => {
|
|
|
399
390
|
);
|
|
400
391
|
};
|
|
401
392
|
|
|
402
|
-
// src/FieldBase/
|
|
393
|
+
// src/FieldBase/FieldBase.tsx
|
|
403
394
|
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
404
395
|
var fixedForwardRef = forwardRef3;
|
|
405
396
|
var _FieldBase = (props, ref) => {
|
|
@@ -438,8 +429,7 @@ var _FieldBase = (props, ref) => {
|
|
|
438
429
|
variant,
|
|
439
430
|
size,
|
|
440
431
|
description,
|
|
441
|
-
errorMessage
|
|
442
|
-
error: props.isInvalid
|
|
432
|
+
errorMessage
|
|
443
433
|
}
|
|
444
434
|
)
|
|
445
435
|
]
|
|
@@ -567,12 +557,47 @@ _ListBox.Section = _Section;
|
|
|
567
557
|
// src/Overlay/Popover.tsx
|
|
568
558
|
import { forwardRef as forwardRef6 } from "react";
|
|
569
559
|
import { Popover } from "react-aria-components";
|
|
570
|
-
import { cn as cn11, useClassNames as useClassNames8, useSmallScreen
|
|
560
|
+
import { cn as cn11, useClassNames as useClassNames8, useSmallScreen } from "@marigold/system";
|
|
561
|
+
|
|
562
|
+
// src/Provider/OverlayContainerProvider.tsx
|
|
563
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
564
|
+
import { useIsSSR } from "@react-aria/ssr";
|
|
565
|
+
var OverlayContainerContext = createContext3(void 0);
|
|
566
|
+
var OverlayContainerProvider = OverlayContainerContext.Provider;
|
|
567
|
+
var usePortalContainer = () => {
|
|
568
|
+
const portalContainer = useContext3(OverlayContainerContext);
|
|
569
|
+
const isSSR = useIsSSR();
|
|
570
|
+
const portal = isSSR ? null : portalContainer ? document.getElementById(portalContainer) : document.body;
|
|
571
|
+
return portal;
|
|
572
|
+
};
|
|
571
573
|
|
|
572
574
|
// src/Overlay/Underlay.tsx
|
|
573
575
|
import { ModalOverlay } from "react-aria-components";
|
|
574
576
|
import { cn as cn10, useClassNames as useClassNames7 } from "@marigold/system";
|
|
577
|
+
|
|
578
|
+
// src/Provider/index.ts
|
|
579
|
+
import { useTheme as useTheme2, ThemeProvider as ThemeProvider2 } from "@marigold/system";
|
|
580
|
+
|
|
581
|
+
// src/Provider/MarigoldProvider.tsx
|
|
582
|
+
import { OverlayProvider } from "@react-aria/overlays";
|
|
583
|
+
import {
|
|
584
|
+
ThemeProvider,
|
|
585
|
+
defaultTheme,
|
|
586
|
+
useTheme
|
|
587
|
+
} from "@marigold/system";
|
|
575
588
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
589
|
+
function MarigoldProvider({
|
|
590
|
+
children,
|
|
591
|
+
theme,
|
|
592
|
+
portalContainer
|
|
593
|
+
}) {
|
|
594
|
+
const outerTheme = useTheme();
|
|
595
|
+
const isTopLevel = outerTheme === defaultTheme;
|
|
596
|
+
return /* @__PURE__ */ jsx15(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx15(OverlayContainerProvider, { value: portalContainer, children: /* @__PURE__ */ jsx15(OverlayProvider, { children }) }) : children });
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
// src/Overlay/Underlay.tsx
|
|
600
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
576
601
|
var Underlay = ({
|
|
577
602
|
size,
|
|
578
603
|
variant,
|
|
@@ -588,7 +613,8 @@ var Underlay = ({
|
|
|
588
613
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
589
614
|
...rest
|
|
590
615
|
};
|
|
591
|
-
|
|
616
|
+
const portal = usePortalContainer();
|
|
617
|
+
return /* @__PURE__ */ jsx16(
|
|
592
618
|
ModalOverlay,
|
|
593
619
|
{
|
|
594
620
|
className: ({ isEntering, isExiting }) => cn10(
|
|
@@ -599,15 +625,16 @@ var Underlay = ({
|
|
|
599
625
|
),
|
|
600
626
|
...props,
|
|
601
627
|
"data-testid": "underlay-id",
|
|
628
|
+
UNSTABLE_portalContainer: portal,
|
|
602
629
|
children: props.children
|
|
603
630
|
}
|
|
604
631
|
);
|
|
605
632
|
};
|
|
606
633
|
|
|
607
634
|
// src/Overlay/Popover.tsx
|
|
608
|
-
import { Fragment, jsx as
|
|
635
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
609
636
|
var _Popover = forwardRef6(
|
|
610
|
-
({ keyboardDismissDisabled, placement, open, children, ...rest }, ref) => {
|
|
637
|
+
({ keyboardDismissDisabled, placement, open, children, container, ...rest }, ref) => {
|
|
611
638
|
const props = {
|
|
612
639
|
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
613
640
|
isOpen: open,
|
|
@@ -621,10 +648,10 @@ var _Popover = forwardRef6(
|
|
|
621
648
|
className: "w-[--trigger-width]"
|
|
622
649
|
});
|
|
623
650
|
const isSmallScreen = useSmallScreen();
|
|
624
|
-
const
|
|
625
|
-
return /* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
651
|
+
const portal = usePortalContainer();
|
|
652
|
+
return /* @__PURE__ */ jsx17(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsxs7(Fragment, { children: [
|
|
653
|
+
/* @__PURE__ */ jsx17(Underlay, { open, variant: "modal" }),
|
|
654
|
+
/* @__PURE__ */ jsx17(
|
|
628
655
|
Popover,
|
|
629
656
|
{
|
|
630
657
|
ref,
|
|
@@ -632,18 +659,18 @@ var _Popover = forwardRef6(
|
|
|
632
659
|
className: cn11(
|
|
633
660
|
"!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col"
|
|
634
661
|
),
|
|
635
|
-
|
|
662
|
+
UNSTABLE_portalContainer: portal,
|
|
636
663
|
children
|
|
637
664
|
}
|
|
638
665
|
)
|
|
639
|
-
] }) : /* @__PURE__ */
|
|
666
|
+
] }) : /* @__PURE__ */ jsx17(
|
|
640
667
|
Popover,
|
|
641
668
|
{
|
|
642
669
|
ref,
|
|
643
670
|
...props,
|
|
644
671
|
className: classNames2,
|
|
645
672
|
offset: 0,
|
|
646
|
-
|
|
673
|
+
UNSTABLE_portalContainer: portal,
|
|
647
674
|
children
|
|
648
675
|
}
|
|
649
676
|
) });
|
|
@@ -659,7 +686,7 @@ import { cn as cn13 } from "@marigold/system";
|
|
|
659
686
|
import { forwardRef as forwardRef7 } from "react";
|
|
660
687
|
import { Button } from "react-aria-components";
|
|
661
688
|
import { cn as cn12, useClassNames as useClassNames9 } from "@marigold/system";
|
|
662
|
-
import { jsx as
|
|
689
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
663
690
|
var _Button = forwardRef7(
|
|
664
691
|
({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
|
|
665
692
|
const classNames2 = useClassNames9({
|
|
@@ -668,7 +695,7 @@ var _Button = forwardRef7(
|
|
|
668
695
|
size,
|
|
669
696
|
className
|
|
670
697
|
});
|
|
671
|
-
return /* @__PURE__ */
|
|
698
|
+
return /* @__PURE__ */ jsx18(
|
|
672
699
|
Button,
|
|
673
700
|
{
|
|
674
701
|
...props,
|
|
@@ -686,10 +713,10 @@ var _Button = forwardRef7(
|
|
|
686
713
|
);
|
|
687
714
|
|
|
688
715
|
// src/Autocomplete/ClearButton.tsx
|
|
689
|
-
import { jsx as
|
|
716
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
690
717
|
var AutocompleteClearButton = ({ className }) => {
|
|
691
718
|
let state = React.useContext(ComboBoxStateContext);
|
|
692
|
-
return /* @__PURE__ */
|
|
719
|
+
return /* @__PURE__ */ jsx19(
|
|
693
720
|
_Button,
|
|
694
721
|
{
|
|
695
722
|
"aria-label": "Clear",
|
|
@@ -699,7 +726,7 @@ var AutocompleteClearButton = ({ className }) => {
|
|
|
699
726
|
"cursor-pointer appearance-none border-none p-0 pr-1",
|
|
700
727
|
className
|
|
701
728
|
),
|
|
702
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ jsx19(
|
|
703
730
|
"svg",
|
|
704
731
|
{
|
|
705
732
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -707,7 +734,7 @@ var AutocompleteClearButton = ({ className }) => {
|
|
|
707
734
|
fill: "currentColor",
|
|
708
735
|
width: 20,
|
|
709
736
|
height: 20,
|
|
710
|
-
children: /* @__PURE__ */
|
|
737
|
+
children: /* @__PURE__ */ jsx19("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" })
|
|
711
738
|
}
|
|
712
739
|
)
|
|
713
740
|
}
|
|
@@ -715,15 +742,15 @@ var AutocompleteClearButton = ({ className }) => {
|
|
|
715
742
|
};
|
|
716
743
|
|
|
717
744
|
// src/Autocomplete/Autocomplete.tsx
|
|
718
|
-
import { Fragment as Fragment2, jsx as
|
|
745
|
+
import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
719
746
|
var SearchInput = ({ onSubmit, ref }) => {
|
|
720
747
|
const state = React2.useContext(ComboBoxStateContext2);
|
|
721
|
-
return /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ jsx20(
|
|
722
749
|
_Input,
|
|
723
750
|
{
|
|
724
751
|
ref,
|
|
725
|
-
icon: /* @__PURE__ */
|
|
726
|
-
action: (state == null ? void 0 : state.inputValue) !== "" ? /* @__PURE__ */
|
|
752
|
+
icon: /* @__PURE__ */ jsx20(SearchIcon, {}),
|
|
753
|
+
action: (state == null ? void 0 : state.inputValue) !== "" ? /* @__PURE__ */ jsx20(AutocompleteClearButton, {}) : void 0,
|
|
727
754
|
onKeyDown: (e) => {
|
|
728
755
|
if (e.key === "Enter" || e.key === "Escape") {
|
|
729
756
|
e.preventDefault();
|
|
@@ -737,7 +764,7 @@ var SearchInput = ({ onSubmit, ref }) => {
|
|
|
737
764
|
}
|
|
738
765
|
);
|
|
739
766
|
};
|
|
740
|
-
var SearchIcon = (props) => /* @__PURE__ */
|
|
767
|
+
var SearchIcon = (props) => /* @__PURE__ */ jsx20(
|
|
741
768
|
"svg",
|
|
742
769
|
{
|
|
743
770
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -746,7 +773,7 @@ var SearchIcon = (props) => /* @__PURE__ */ jsx19(
|
|
|
746
773
|
width: 24,
|
|
747
774
|
height: 24,
|
|
748
775
|
...props,
|
|
749
|
-
children: /* @__PURE__ */
|
|
776
|
+
children: /* @__PURE__ */ jsx20("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" })
|
|
750
777
|
}
|
|
751
778
|
);
|
|
752
779
|
var _Autocomplete = forwardRef8(
|
|
@@ -774,9 +801,9 @@ var _Autocomplete = forwardRef8(
|
|
|
774
801
|
isRequired: required,
|
|
775
802
|
...rest
|
|
776
803
|
};
|
|
777
|
-
return /* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
804
|
+
return /* @__PURE__ */ jsx20(Fragment2, { children: /* @__PURE__ */ jsxs8(FieldBase, { as: ComboBox, ...props, children: [
|
|
805
|
+
/* @__PURE__ */ jsx20(SearchInput, { onSubmit, ref }),
|
|
806
|
+
/* @__PURE__ */ jsx20(_Popover, { children: /* @__PURE__ */ jsx20(_ListBox, { children }) })
|
|
780
807
|
] }) });
|
|
781
808
|
}
|
|
782
809
|
);
|
|
@@ -785,7 +812,7 @@ _Autocomplete.Item = _ListBox.Item;
|
|
|
785
812
|
// src/ComboBox/ComboBox.tsx
|
|
786
813
|
import { forwardRef as forwardRef9 } from "react";
|
|
787
814
|
import { ComboBox as ComboBox2 } from "react-aria-components";
|
|
788
|
-
import { jsx as
|
|
815
|
+
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
789
816
|
var _ComboBox = forwardRef9(
|
|
790
817
|
({
|
|
791
818
|
variant,
|
|
@@ -811,13 +838,13 @@ var _ComboBox = forwardRef9(
|
|
|
811
838
|
...rest
|
|
812
839
|
};
|
|
813
840
|
return /* @__PURE__ */ jsxs9(FieldBase, { as: ComboBox2, ref, ...props, children: [
|
|
814
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ jsx21(
|
|
815
842
|
_Input,
|
|
816
843
|
{
|
|
817
|
-
action: /* @__PURE__ */
|
|
844
|
+
action: /* @__PURE__ */ jsx21(_Button, { className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0", children: /* @__PURE__ */ jsx21(ChevronDown, { className: "h-4 w-4" }) })
|
|
818
845
|
}
|
|
819
846
|
),
|
|
820
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ jsx21(_Popover, { children: /* @__PURE__ */ jsx21(_ListBox, { children }) })
|
|
821
848
|
] });
|
|
822
849
|
}
|
|
823
850
|
);
|
|
@@ -825,15 +852,15 @@ _ComboBox.Item = _ListBox.Item;
|
|
|
825
852
|
|
|
826
853
|
// src/Badge/Badge.tsx
|
|
827
854
|
import { useClassNames as useClassNames10 } from "@marigold/system";
|
|
828
|
-
import { jsx as
|
|
855
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
829
856
|
var Badge = ({ variant, size, children, ...props }) => {
|
|
830
857
|
const classNames2 = useClassNames10({ component: "Badge", variant, size });
|
|
831
|
-
return /* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ jsx22("div", { ...props, className: classNames2, children });
|
|
832
859
|
};
|
|
833
860
|
|
|
834
861
|
// src/Breakout/Breakout.tsx
|
|
835
862
|
import { alignment, cn as cn14, createVar as createVar4 } from "@marigold/system";
|
|
836
|
-
import { jsx as
|
|
863
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
837
864
|
var Breakout = ({
|
|
838
865
|
height,
|
|
839
866
|
children,
|
|
@@ -843,7 +870,7 @@ var Breakout = ({
|
|
|
843
870
|
...props
|
|
844
871
|
}) => {
|
|
845
872
|
var _a, _b, _c, _d;
|
|
846
|
-
return /* @__PURE__ */
|
|
873
|
+
return /* @__PURE__ */ jsx23(
|
|
847
874
|
"div",
|
|
848
875
|
{
|
|
849
876
|
className: cn14(
|
|
@@ -862,10 +889,10 @@ var Breakout = ({
|
|
|
862
889
|
|
|
863
890
|
// src/Body/Body.tsx
|
|
864
891
|
import { useClassNames as useClassNames11 } from "@marigold/system";
|
|
865
|
-
import { jsx as
|
|
892
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
866
893
|
var Body = ({ children, variant, size, ...props }) => {
|
|
867
894
|
const classNames2 = useClassNames11({ component: "Body", variant, size });
|
|
868
|
-
return /* @__PURE__ */
|
|
895
|
+
return /* @__PURE__ */ jsx24("section", { ...props, className: classNames2, children });
|
|
869
896
|
};
|
|
870
897
|
|
|
871
898
|
// src/Card/Card.tsx
|
|
@@ -881,7 +908,7 @@ import {
|
|
|
881
908
|
paddingTop,
|
|
882
909
|
useClassNames as useClassNames12
|
|
883
910
|
} from "@marigold/system";
|
|
884
|
-
import { jsx as
|
|
911
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
885
912
|
var Card = ({
|
|
886
913
|
children,
|
|
887
914
|
variant,
|
|
@@ -897,7 +924,7 @@ var Card = ({
|
|
|
897
924
|
...props
|
|
898
925
|
}) => {
|
|
899
926
|
const classNames2 = useClassNames12({ component: "Card", variant, size });
|
|
900
|
-
return /* @__PURE__ */
|
|
927
|
+
return /* @__PURE__ */ jsx25(
|
|
901
928
|
"div",
|
|
902
929
|
{
|
|
903
930
|
...props,
|
|
@@ -920,14 +947,14 @@ var Card = ({
|
|
|
920
947
|
|
|
921
948
|
// src/Center/Center.tsx
|
|
922
949
|
import { cn as cn16, createVar as createVar5, gapSpace as gapSpace3 } from "@marigold/system";
|
|
923
|
-
import { jsx as
|
|
950
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
924
951
|
var Center = ({
|
|
925
952
|
maxWidth = "100%",
|
|
926
953
|
space = 0,
|
|
927
954
|
children,
|
|
928
955
|
...props
|
|
929
956
|
}) => {
|
|
930
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ jsx26(
|
|
931
958
|
"div",
|
|
932
959
|
{
|
|
933
960
|
...props,
|
|
@@ -946,8 +973,8 @@ var Center = ({
|
|
|
946
973
|
import { forwardRef as forwardRef10 } from "react";
|
|
947
974
|
import { Checkbox } from "react-aria-components";
|
|
948
975
|
import { cn as cn17, useClassNames as useClassNames13 } from "@marigold/system";
|
|
949
|
-
import { Fragment as Fragment3, jsx as
|
|
950
|
-
var CheckMark = () => /* @__PURE__ */
|
|
976
|
+
import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
977
|
+
var CheckMark = () => /* @__PURE__ */ jsx27("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx27(
|
|
951
978
|
"path",
|
|
952
979
|
{
|
|
953
980
|
fill: "currentColor",
|
|
@@ -955,7 +982,7 @@ var CheckMark = () => /* @__PURE__ */ jsx26("svg", { viewBox: "0 0 12 10", child
|
|
|
955
982
|
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"
|
|
956
983
|
}
|
|
957
984
|
) });
|
|
958
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
985
|
+
var IndeterminateMark = () => /* @__PURE__ */ jsx27("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ jsx27(
|
|
959
986
|
"path",
|
|
960
987
|
{
|
|
961
988
|
fill: "currentColor",
|
|
@@ -963,8 +990,8 @@ var IndeterminateMark = () => /* @__PURE__ */ jsx26("svg", { width: "12", height
|
|
|
963
990
|
d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
|
|
964
991
|
}
|
|
965
992
|
) });
|
|
966
|
-
var
|
|
967
|
-
return /* @__PURE__ */
|
|
993
|
+
var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
994
|
+
return /* @__PURE__ */ jsx27(
|
|
968
995
|
"div",
|
|
969
996
|
{
|
|
970
997
|
"aria-hidden": "true",
|
|
@@ -976,7 +1003,7 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
|
976
1003
|
className
|
|
977
1004
|
),
|
|
978
1005
|
...props,
|
|
979
|
-
children: indeterminate ? /* @__PURE__ */
|
|
1006
|
+
children: indeterminate ? /* @__PURE__ */ jsx27(IndeterminateMark, {}) : checked ? /* @__PURE__ */ jsx27(CheckMark, {}) : null
|
|
980
1007
|
}
|
|
981
1008
|
);
|
|
982
1009
|
};
|
|
@@ -1006,7 +1033,7 @@ var _Checkbox = forwardRef10(
|
|
|
1006
1033
|
...rest
|
|
1007
1034
|
};
|
|
1008
1035
|
const classNames2 = useClassNames13({ component: "Checkbox", variant, size });
|
|
1009
|
-
return /* @__PURE__ */
|
|
1036
|
+
return /* @__PURE__ */ jsx27(
|
|
1010
1037
|
Checkbox,
|
|
1011
1038
|
{
|
|
1012
1039
|
ref,
|
|
@@ -1017,15 +1044,15 @@ var _Checkbox = forwardRef10(
|
|
|
1017
1044
|
),
|
|
1018
1045
|
...props,
|
|
1019
1046
|
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
1020
|
-
/* @__PURE__ */
|
|
1021
|
-
|
|
1047
|
+
/* @__PURE__ */ jsx27(
|
|
1048
|
+
Icon2,
|
|
1022
1049
|
{
|
|
1023
1050
|
checked: isSelected,
|
|
1024
1051
|
indeterminate: isIndeterminate,
|
|
1025
1052
|
className: classNames2.checkbox
|
|
1026
1053
|
}
|
|
1027
1054
|
),
|
|
1028
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ jsx27("div", { className: classNames2.label, children })
|
|
1029
1056
|
] })
|
|
1030
1057
|
}
|
|
1031
1058
|
);
|
|
@@ -1035,7 +1062,7 @@ var _Checkbox = forwardRef10(
|
|
|
1035
1062
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1036
1063
|
import { CheckboxGroup } from "react-aria-components";
|
|
1037
1064
|
import { useClassNames as useClassNames14 } from "@marigold/system";
|
|
1038
|
-
import { jsx as
|
|
1065
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1039
1066
|
var _CheckboxGroup = ({
|
|
1040
1067
|
children,
|
|
1041
1068
|
variant,
|
|
@@ -1060,13 +1087,13 @@ var _CheckboxGroup = ({
|
|
|
1060
1087
|
isInvalid: error,
|
|
1061
1088
|
...rest
|
|
1062
1089
|
};
|
|
1063
|
-
return /* @__PURE__ */
|
|
1090
|
+
return /* @__PURE__ */ jsx28(FieldBase, { as: CheckboxGroup, ...props, children });
|
|
1064
1091
|
};
|
|
1065
1092
|
|
|
1066
1093
|
// src/Columns/Columns.tsx
|
|
1067
|
-
import { Children as Children3
|
|
1094
|
+
import { Children as Children3 } from "react";
|
|
1068
1095
|
import { cn as cn18, createVar as createVar6, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1069
|
-
import { jsx as
|
|
1096
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1070
1097
|
var Columns = ({
|
|
1071
1098
|
space = 0,
|
|
1072
1099
|
columns,
|
|
@@ -1082,7 +1109,7 @@ var Columns = ({
|
|
|
1082
1109
|
)}`
|
|
1083
1110
|
);
|
|
1084
1111
|
}
|
|
1085
|
-
return /* @__PURE__ */
|
|
1112
|
+
return /* @__PURE__ */ jsx29(
|
|
1086
1113
|
"div",
|
|
1087
1114
|
{
|
|
1088
1115
|
className: cn18(
|
|
@@ -1091,14 +1118,14 @@ var Columns = ({
|
|
|
1091
1118
|
gapSpace4[space]
|
|
1092
1119
|
),
|
|
1093
1120
|
...props,
|
|
1094
|
-
children: Children3.map(children, (child, idx) => /* @__PURE__ */
|
|
1121
|
+
children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx29(
|
|
1095
1122
|
"div",
|
|
1096
1123
|
{
|
|
1097
1124
|
className: cn18(
|
|
1098
1125
|
"grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1099
1126
|
),
|
|
1100
1127
|
style: createVar6({ collapseAt, columnSize: columns[idx] }),
|
|
1101
|
-
children:
|
|
1128
|
+
children: child
|
|
1102
1129
|
}
|
|
1103
1130
|
))
|
|
1104
1131
|
}
|
|
@@ -1113,7 +1140,7 @@ import {
|
|
|
1113
1140
|
gridColumn,
|
|
1114
1141
|
placeItems
|
|
1115
1142
|
} from "@marigold/system";
|
|
1116
|
-
import { jsx as
|
|
1143
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1117
1144
|
var content = {
|
|
1118
1145
|
small: "20ch",
|
|
1119
1146
|
medium: "45ch",
|
|
@@ -1133,7 +1160,7 @@ var Container = ({
|
|
|
1133
1160
|
...props
|
|
1134
1161
|
}) => {
|
|
1135
1162
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1136
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ jsx30(
|
|
1137
1164
|
"div",
|
|
1138
1165
|
{
|
|
1139
1166
|
...props,
|
|
@@ -1150,7 +1177,7 @@ var Container = ({
|
|
|
1150
1177
|
};
|
|
1151
1178
|
|
|
1152
1179
|
// src/Dialog/Dialog.tsx
|
|
1153
|
-
import { useContext as
|
|
1180
|
+
import { useContext as useContext4 } from "react";
|
|
1154
1181
|
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
1155
1182
|
import { cn as cn21, useClassNames as useClassNames16 } from "@marigold/system";
|
|
1156
1183
|
|
|
@@ -1162,9 +1189,9 @@ import {
|
|
|
1162
1189
|
get,
|
|
1163
1190
|
textAlign,
|
|
1164
1191
|
useClassNames as useClassNames15,
|
|
1165
|
-
useTheme as
|
|
1192
|
+
useTheme as useTheme3
|
|
1166
1193
|
} from "@marigold/system";
|
|
1167
|
-
import { jsx as
|
|
1194
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1168
1195
|
var _Headline = ({
|
|
1169
1196
|
variant,
|
|
1170
1197
|
size,
|
|
@@ -1174,13 +1201,13 @@ var _Headline = ({
|
|
|
1174
1201
|
level = 1,
|
|
1175
1202
|
...props
|
|
1176
1203
|
}) => {
|
|
1177
|
-
const theme =
|
|
1204
|
+
const theme = useTheme3();
|
|
1178
1205
|
const classNames2 = useClassNames15({
|
|
1179
1206
|
component: "Headline",
|
|
1180
1207
|
variant,
|
|
1181
1208
|
size: size != null ? size : `level-${level}`
|
|
1182
1209
|
});
|
|
1183
|
-
return /* @__PURE__ */
|
|
1210
|
+
return /* @__PURE__ */ jsx31(
|
|
1184
1211
|
Heading,
|
|
1185
1212
|
{
|
|
1186
1213
|
level: Number(level),
|
|
@@ -1206,30 +1233,28 @@ import { DialogTrigger } from "react-aria-components";
|
|
|
1206
1233
|
// src/Overlay/Modal.tsx
|
|
1207
1234
|
import { forwardRef as forwardRef11 } from "react";
|
|
1208
1235
|
import { Modal } from "react-aria-components";
|
|
1209
|
-
import {
|
|
1210
|
-
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1236
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1211
1237
|
var _Modal = forwardRef11(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
1212
|
-
const theme = useTheme3();
|
|
1213
1238
|
const props = {
|
|
1214
1239
|
isOpen: open,
|
|
1215
1240
|
isDismissable: dismissable,
|
|
1216
1241
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
1217
1242
|
...rest
|
|
1218
1243
|
};
|
|
1219
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ jsx32(
|
|
1220
1245
|
Underlay,
|
|
1221
1246
|
{
|
|
1222
1247
|
dismissable,
|
|
1223
1248
|
keyboardDismissable,
|
|
1224
1249
|
open,
|
|
1225
1250
|
variant: "modal",
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1251
|
+
children: /* @__PURE__ */ jsx32(Modal, { ref, ...props, children: props.children })
|
|
1227
1252
|
}
|
|
1228
1253
|
);
|
|
1229
1254
|
});
|
|
1230
1255
|
|
|
1231
1256
|
// src/Dialog/DialogTrigger.tsx
|
|
1232
|
-
import { jsx as
|
|
1257
|
+
import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1233
1258
|
var _DialogTrigger = ({
|
|
1234
1259
|
open,
|
|
1235
1260
|
dismissable,
|
|
@@ -1246,10 +1271,10 @@ var _DialogTrigger = ({
|
|
|
1246
1271
|
const hasDialogTrigger = dialogTrigger.type !== _Dialog;
|
|
1247
1272
|
const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
|
|
1248
1273
|
if (isNonModal)
|
|
1249
|
-
return /* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ jsx33(DialogTrigger, { ...props, children: props.children });
|
|
1250
1275
|
return /* @__PURE__ */ jsxs11(DialogTrigger, { ...props, children: [
|
|
1251
1276
|
hasDialogTrigger && dialogTrigger,
|
|
1252
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsx33(
|
|
1253
1278
|
_Modal,
|
|
1254
1279
|
{
|
|
1255
1280
|
dismissable,
|
|
@@ -1261,10 +1286,10 @@ var _DialogTrigger = ({
|
|
|
1261
1286
|
};
|
|
1262
1287
|
|
|
1263
1288
|
// src/Dialog/Dialog.tsx
|
|
1264
|
-
import { Fragment as Fragment4, jsx as
|
|
1289
|
+
import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1265
1290
|
var CloseButton = ({ className }) => {
|
|
1266
|
-
const { close } =
|
|
1267
|
-
return /* @__PURE__ */
|
|
1291
|
+
const { close } = useContext4(OverlayTriggerStateContext);
|
|
1292
|
+
return /* @__PURE__ */ jsx34("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx34(
|
|
1268
1293
|
"button",
|
|
1269
1294
|
{
|
|
1270
1295
|
className: cn21(
|
|
@@ -1272,7 +1297,7 @@ var CloseButton = ({ className }) => {
|
|
|
1272
1297
|
className
|
|
1273
1298
|
),
|
|
1274
1299
|
onClick: close,
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1300
|
+
children: /* @__PURE__ */ jsx34("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx34(
|
|
1276
1301
|
"path",
|
|
1277
1302
|
{
|
|
1278
1303
|
fillRule: "evenodd",
|
|
@@ -1283,7 +1308,7 @@ var CloseButton = ({ className }) => {
|
|
|
1283
1308
|
}
|
|
1284
1309
|
) });
|
|
1285
1310
|
};
|
|
1286
|
-
var DialogHeadline = ({ children }) => /* @__PURE__ */
|
|
1311
|
+
var DialogHeadline = ({ children }) => /* @__PURE__ */ jsx34(_Headline, { slot: "title", children });
|
|
1287
1312
|
var _Dialog = ({
|
|
1288
1313
|
variant,
|
|
1289
1314
|
size,
|
|
@@ -1292,7 +1317,7 @@ var _Dialog = ({
|
|
|
1292
1317
|
...props
|
|
1293
1318
|
}) => {
|
|
1294
1319
|
const classNames2 = useClassNames16({ component: "Dialog", variant, size });
|
|
1295
|
-
let state =
|
|
1320
|
+
let state = useContext4(OverlayTriggerStateContext);
|
|
1296
1321
|
let children = props.children;
|
|
1297
1322
|
if (typeof children === "function") {
|
|
1298
1323
|
children = children({
|
|
@@ -1300,13 +1325,13 @@ var _Dialog = ({
|
|
|
1300
1325
|
})
|
|
1301
1326
|
});
|
|
1302
1327
|
}
|
|
1303
|
-
return /* @__PURE__ */
|
|
1328
|
+
return /* @__PURE__ */ jsx34(
|
|
1304
1329
|
Dialog,
|
|
1305
1330
|
{
|
|
1306
1331
|
...props,
|
|
1307
1332
|
className: cn21("relative outline-none", classNames2.container),
|
|
1308
1333
|
children: /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
1309
|
-
closeButton && /* @__PURE__ */
|
|
1334
|
+
closeButton && /* @__PURE__ */ jsx34(CloseButton, { className: classNames2.closeButton }),
|
|
1310
1335
|
children
|
|
1311
1336
|
] })
|
|
1312
1337
|
}
|
|
@@ -1318,141 +1343,44 @@ _Dialog.Headline = DialogHeadline;
|
|
|
1318
1343
|
// src/Divider/Divider.tsx
|
|
1319
1344
|
import { Separator } from "react-aria-components";
|
|
1320
1345
|
import { useClassNames as useClassNames17 } from "@marigold/system";
|
|
1321
|
-
import { jsx as
|
|
1346
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1322
1347
|
var _Divider = ({ variant, ...props }) => {
|
|
1323
1348
|
const classNames2 = useClassNames17({ component: "Divider", variant });
|
|
1324
|
-
return /* @__PURE__ */
|
|
1325
|
-
};
|
|
1326
|
-
|
|
1327
|
-
// src/FieldBase/FieldBase.tsx
|
|
1328
|
-
import {
|
|
1329
|
-
cn as cn23,
|
|
1330
|
-
width as twWidth2,
|
|
1331
|
-
useClassNames as useClassNames19
|
|
1332
|
-
} from "@marigold/system";
|
|
1333
|
-
|
|
1334
|
-
// src/HelpText/HelpText.tsx
|
|
1335
|
-
import { SVG as SVG4, cn as cn22, useClassNames as useClassNames18 } from "@marigold/system";
|
|
1336
|
-
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1337
|
-
var HelpText2 = ({
|
|
1338
|
-
variant,
|
|
1339
|
-
size,
|
|
1340
|
-
disabled,
|
|
1341
|
-
description,
|
|
1342
|
-
descriptionProps,
|
|
1343
|
-
error,
|
|
1344
|
-
errorMessage,
|
|
1345
|
-
errorMessageProps,
|
|
1346
|
-
...props
|
|
1347
|
-
}) => {
|
|
1348
|
-
const hasErrorMessage = errorMessage && error;
|
|
1349
|
-
const classNames2 = useClassNames18({
|
|
1350
|
-
component: "HelpText",
|
|
1351
|
-
variant,
|
|
1352
|
-
size
|
|
1353
|
-
});
|
|
1354
|
-
return /* @__PURE__ */ jsx35(
|
|
1355
|
-
"div",
|
|
1356
|
-
{
|
|
1357
|
-
...props,
|
|
1358
|
-
...hasErrorMessage ? errorMessageProps : descriptionProps,
|
|
1359
|
-
className: cn22("flex items-center gap-1", classNames2.container),
|
|
1360
|
-
children: hasErrorMessage ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1361
|
-
/* @__PURE__ */ jsx35(
|
|
1362
|
-
SVG4,
|
|
1363
|
-
{
|
|
1364
|
-
className: cn22("h-4 w-4", classNames2.icon),
|
|
1365
|
-
viewBox: "0 0 24 24",
|
|
1366
|
-
role: "presentation",
|
|
1367
|
-
children: /* @__PURE__ */ jsx35("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" })
|
|
1368
|
-
}
|
|
1369
|
-
),
|
|
1370
|
-
errorMessage
|
|
1371
|
-
] }) : /* @__PURE__ */ jsx35(Fragment5, { children: description })
|
|
1372
|
-
}
|
|
1373
|
-
);
|
|
1374
|
-
};
|
|
1375
|
-
|
|
1376
|
-
// src/FieldBase/FieldBase.tsx
|
|
1377
|
-
import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1378
|
-
var FieldBase2 = ({
|
|
1379
|
-
children,
|
|
1380
|
-
variant,
|
|
1381
|
-
size,
|
|
1382
|
-
width = "full",
|
|
1383
|
-
disabled,
|
|
1384
|
-
label,
|
|
1385
|
-
labelProps,
|
|
1386
|
-
description,
|
|
1387
|
-
descriptionProps,
|
|
1388
|
-
error,
|
|
1389
|
-
errorMessage,
|
|
1390
|
-
errorMessageProps,
|
|
1391
|
-
stateProps,
|
|
1392
|
-
...props
|
|
1393
|
-
}) => {
|
|
1394
|
-
const hasHelpText = !!description || errorMessage && error;
|
|
1395
|
-
const classNames2 = useClassNames19({
|
|
1396
|
-
component: "Field",
|
|
1397
|
-
variant,
|
|
1398
|
-
size
|
|
1399
|
-
});
|
|
1400
|
-
return /* @__PURE__ */ jsxs14(
|
|
1401
|
-
"div",
|
|
1402
|
-
{
|
|
1403
|
-
...props,
|
|
1404
|
-
...stateProps,
|
|
1405
|
-
className: cn23("group/field", twWidth2[width], classNames2),
|
|
1406
|
-
children: [
|
|
1407
|
-
label ? /* @__PURE__ */ jsx36(_Label, { variant, size, ...labelProps, children: label }) : /* @__PURE__ */ jsx36("span", { "aria-hidden": "true" }),
|
|
1408
|
-
children,
|
|
1409
|
-
hasHelpText && /* @__PURE__ */ jsx36(
|
|
1410
|
-
HelpText2,
|
|
1411
|
-
{
|
|
1412
|
-
variant,
|
|
1413
|
-
size,
|
|
1414
|
-
disabled,
|
|
1415
|
-
description,
|
|
1416
|
-
descriptionProps,
|
|
1417
|
-
error,
|
|
1418
|
-
errorMessage,
|
|
1419
|
-
errorMessageProps
|
|
1420
|
-
}
|
|
1421
|
-
)
|
|
1422
|
-
]
|
|
1423
|
-
}
|
|
1424
|
-
);
|
|
1349
|
+
return /* @__PURE__ */ jsx35(Separator, { className: classNames2, ...props });
|
|
1425
1350
|
};
|
|
1426
1351
|
|
|
1427
1352
|
// src/Footer/Footer.tsx
|
|
1428
|
-
import { useClassNames as
|
|
1429
|
-
import { jsx as
|
|
1353
|
+
import { useClassNames as useClassNames18 } from "@marigold/system";
|
|
1354
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1430
1355
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1431
|
-
const classNames2 =
|
|
1432
|
-
return /* @__PURE__ */
|
|
1356
|
+
const classNames2 = useClassNames18({ component: "Footer", variant, size });
|
|
1357
|
+
return /* @__PURE__ */ jsx36("footer", { ...props, className: classNames2, children });
|
|
1433
1358
|
};
|
|
1434
1359
|
|
|
1360
|
+
// src/Form/Form.tsx
|
|
1361
|
+
import { Form } from "react-aria-components";
|
|
1362
|
+
|
|
1435
1363
|
// src/Header/Header.tsx
|
|
1436
1364
|
import { Header } from "react-aria-components";
|
|
1437
|
-
import { useClassNames as
|
|
1438
|
-
import { jsx as
|
|
1365
|
+
import { useClassNames as useClassNames19 } from "@marigold/system";
|
|
1366
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1439
1367
|
var _Header = ({ variant, size, ...props }) => {
|
|
1440
|
-
const classNames2 =
|
|
1368
|
+
const classNames2 = useClassNames19({
|
|
1441
1369
|
component: "Header",
|
|
1442
1370
|
variant,
|
|
1443
1371
|
size
|
|
1444
1372
|
});
|
|
1445
|
-
return /* @__PURE__ */
|
|
1373
|
+
return /* @__PURE__ */ jsx37(Header, { className: classNames2, ...props, children: props.children });
|
|
1446
1374
|
};
|
|
1447
1375
|
|
|
1448
1376
|
// src/Image/Image.tsx
|
|
1449
1377
|
import {
|
|
1450
|
-
cn as
|
|
1378
|
+
cn as cn22,
|
|
1451
1379
|
objectFit,
|
|
1452
1380
|
objectPosition,
|
|
1453
|
-
useClassNames as
|
|
1381
|
+
useClassNames as useClassNames20
|
|
1454
1382
|
} from "@marigold/system";
|
|
1455
|
-
import { jsx as
|
|
1383
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1456
1384
|
var Image = ({
|
|
1457
1385
|
variant,
|
|
1458
1386
|
size,
|
|
@@ -1460,13 +1388,13 @@ var Image = ({
|
|
|
1460
1388
|
position = "none",
|
|
1461
1389
|
...props
|
|
1462
1390
|
}) => {
|
|
1463
|
-
const classNames2 =
|
|
1464
|
-
return /* @__PURE__ */
|
|
1391
|
+
const classNames2 = useClassNames20({ component: "Image", variant, size });
|
|
1392
|
+
return /* @__PURE__ */ jsx38(
|
|
1465
1393
|
"img",
|
|
1466
1394
|
{
|
|
1467
1395
|
...props,
|
|
1468
1396
|
alt: props.alt,
|
|
1469
|
-
className:
|
|
1397
|
+
className: cn22(
|
|
1470
1398
|
fit !== "none" && "h-full w-full",
|
|
1471
1399
|
classNames2,
|
|
1472
1400
|
objectFit[fit],
|
|
@@ -1479,10 +1407,10 @@ var Image = ({
|
|
|
1479
1407
|
// src/Inline/Inline.tsx
|
|
1480
1408
|
import {
|
|
1481
1409
|
alignment as alignment2,
|
|
1482
|
-
cn as
|
|
1410
|
+
cn as cn23,
|
|
1483
1411
|
gapSpace as gapSpace5
|
|
1484
1412
|
} from "@marigold/system";
|
|
1485
|
-
import { jsx as
|
|
1413
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1486
1414
|
var Inline = ({
|
|
1487
1415
|
space = 0,
|
|
1488
1416
|
orientation,
|
|
@@ -1492,11 +1420,11 @@ var Inline = ({
|
|
|
1492
1420
|
...props
|
|
1493
1421
|
}) => {
|
|
1494
1422
|
var _a2, _b2, _c, _d;
|
|
1495
|
-
return /* @__PURE__ */
|
|
1423
|
+
return /* @__PURE__ */ jsx39(
|
|
1496
1424
|
"div",
|
|
1497
1425
|
{
|
|
1498
1426
|
...props,
|
|
1499
|
-
className:
|
|
1427
|
+
className: cn23(
|
|
1500
1428
|
"flex flex-wrap",
|
|
1501
1429
|
gapSpace5[space],
|
|
1502
1430
|
alignX && ((_b2 = (_a2 = alignment2) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
@@ -1508,186 +1436,102 @@ var Inline = ({
|
|
|
1508
1436
|
};
|
|
1509
1437
|
|
|
1510
1438
|
// src/DateField/DateField.tsx
|
|
1511
|
-
import {
|
|
1512
|
-
import {
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
import {
|
|
1516
|
-
import {
|
|
1517
|
-
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
1518
|
-
import { useDateFieldState } from "@react-stately/datepicker";
|
|
1519
|
-
import { cn as cn27, useClassNames as useClassNames23, useStateProps as useStateProps3 } from "@marigold/system";
|
|
1439
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
1440
|
+
import { DateField } from "react-aria-components";
|
|
1441
|
+
|
|
1442
|
+
// src/DateField/DateInput.tsx
|
|
1443
|
+
import { DateInput, Group } from "react-aria-components";
|
|
1444
|
+
import { useClassNames as useClassNames21 } from "@marigold/system";
|
|
1520
1445
|
|
|
1521
1446
|
// src/DateField/DateSegment.tsx
|
|
1522
|
-
import {
|
|
1523
|
-
import {
|
|
1524
|
-
import {
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
var DateSegment = ({
|
|
1529
|
-
className,
|
|
1530
|
-
segment,
|
|
1531
|
-
state,
|
|
1532
|
-
isPrevPlaceholder
|
|
1533
|
-
}) => {
|
|
1534
|
-
const ref = useRef3(null);
|
|
1535
|
-
const { segmentProps } = useDateSegment(segment, state, ref);
|
|
1536
|
-
const { focusProps, isFocused } = useFocusRing2({
|
|
1537
|
-
within: true,
|
|
1538
|
-
isTextInput: true
|
|
1539
|
-
});
|
|
1540
|
-
const stateProps = useStateProps2({
|
|
1541
|
-
disabled: state.isDisabled,
|
|
1542
|
-
focusVisible: isFocused
|
|
1543
|
-
});
|
|
1544
|
-
const { isPlaceholder, placeholder, text, type, maxValue } = segment;
|
|
1545
|
-
return /* @__PURE__ */ jsxs15(
|
|
1546
|
-
"div",
|
|
1447
|
+
import { DateSegment } from "react-aria-components";
|
|
1448
|
+
import { cn as cn24 } from "@marigold/system";
|
|
1449
|
+
import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1450
|
+
var _DateSegment = ({ segment, ...props }) => {
|
|
1451
|
+
return /* @__PURE__ */ jsx40(
|
|
1452
|
+
DateSegment,
|
|
1547
1453
|
{
|
|
1548
|
-
...
|
|
1549
|
-
|
|
1550
|
-
className: cn26(
|
|
1551
|
-
"group/segment",
|
|
1552
|
-
"text-center leading-none outline-0",
|
|
1553
|
-
type !== "literal" && "p-0.5",
|
|
1554
|
-
className
|
|
1555
|
-
),
|
|
1454
|
+
...props,
|
|
1455
|
+
segment,
|
|
1556
1456
|
style: {
|
|
1557
|
-
|
|
1558
|
-
minWidth: maxValue != null ? String(maxValue).length + "ch" : void 0
|
|
1457
|
+
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
1559
1458
|
},
|
|
1560
|
-
children: [
|
|
1561
|
-
/* @__PURE__ */
|
|
1459
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1460
|
+
/* @__PURE__ */ jsx40(
|
|
1562
1461
|
"span",
|
|
1563
1462
|
{
|
|
1564
1463
|
"aria-hidden": "true",
|
|
1565
|
-
className:
|
|
1464
|
+
className: cn24(
|
|
1566
1465
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1567
1466
|
"pointer-events-none w-full text-center"
|
|
1568
1467
|
),
|
|
1569
1468
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1570
1469
|
}
|
|
1571
1470
|
),
|
|
1572
|
-
/* @__PURE__ */
|
|
1573
|
-
]
|
|
1471
|
+
/* @__PURE__ */ jsx40("span", { children: isPlaceholder ? "" : (segment.type === "month" || segment.type === "day") && Number(segment.text) < 10 ? "0" + segment.text : text })
|
|
1472
|
+
] })
|
|
1574
1473
|
}
|
|
1575
1474
|
);
|
|
1576
1475
|
};
|
|
1577
1476
|
|
|
1477
|
+
// src/DateField/DateInput.tsx
|
|
1478
|
+
import { jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1479
|
+
var _DateInput = ({ variant, size, action, ...props }) => {
|
|
1480
|
+
const classNames2 = useClassNames21({ component: "DateField", variant, size });
|
|
1481
|
+
return /* @__PURE__ */ jsxs14(Group, { className: classNames2.field, children: [
|
|
1482
|
+
/* @__PURE__ */ jsx41(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx41(_DateSegment, { className: classNames2.segment, segment }) }),
|
|
1483
|
+
action ? action : /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx41(
|
|
1484
|
+
"svg",
|
|
1485
|
+
{
|
|
1486
|
+
"data-testid": "action",
|
|
1487
|
+
className: classNames2.action,
|
|
1488
|
+
viewBox: "0 0 24 24",
|
|
1489
|
+
width: 24,
|
|
1490
|
+
height: 24,
|
|
1491
|
+
children: /* @__PURE__ */ jsx41("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" })
|
|
1492
|
+
}
|
|
1493
|
+
) })
|
|
1494
|
+
] });
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1578
1497
|
// src/DateField/DateField.tsx
|
|
1579
|
-
import { jsx as jsx42
|
|
1580
|
-
var
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
errorMessage,
|
|
1586
|
-
errorMessageProps,
|
|
1587
|
-
variant,
|
|
1588
|
-
size,
|
|
1589
|
-
action,
|
|
1590
|
-
isPressed,
|
|
1591
|
-
triggerRef,
|
|
1592
|
-
width,
|
|
1593
|
-
...res
|
|
1594
|
-
}) => {
|
|
1595
|
-
const { locale } = useLocale();
|
|
1596
|
-
const props = {
|
|
1597
|
-
isDisabled: disabled,
|
|
1598
|
-
isReadOnly: readOnly,
|
|
1599
|
-
isRequired: required,
|
|
1600
|
-
...res
|
|
1601
|
-
};
|
|
1602
|
-
const { label, description } = props;
|
|
1603
|
-
const state = useDateFieldState({
|
|
1604
|
-
...props,
|
|
1605
|
-
locale,
|
|
1606
|
-
createCalendar
|
|
1607
|
-
});
|
|
1608
|
-
const ref = useRef4(null);
|
|
1609
|
-
const { fieldProps, labelProps, descriptionProps } = useDateField(
|
|
1610
|
-
props,
|
|
1611
|
-
state,
|
|
1612
|
-
ref
|
|
1613
|
-
);
|
|
1614
|
-
const classNames2 = useClassNames23({ component: "DateField", variant, size });
|
|
1615
|
-
const { focusProps, isFocused } = useFocusRing3({
|
|
1616
|
-
within: true,
|
|
1617
|
-
isTextInput: true,
|
|
1618
|
-
autoFocus: props.autoFocus
|
|
1619
|
-
});
|
|
1620
|
-
const { hoverProps, isHovered } = useHover({ isDisabled: disabled });
|
|
1621
|
-
const stateProps = useStateProps3({
|
|
1622
|
-
hover: isHovered,
|
|
1623
|
-
error,
|
|
1624
|
-
readOnly,
|
|
1498
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1499
|
+
var _DateField = forwardRef12(
|
|
1500
|
+
({
|
|
1501
|
+
variant,
|
|
1502
|
+
size,
|
|
1503
|
+
action,
|
|
1625
1504
|
disabled,
|
|
1626
1505
|
required,
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
{
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
{
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
classNames2.field
|
|
1652
|
-
),
|
|
1653
|
-
"data-testid": "date-field",
|
|
1654
|
-
ref: triggerRef,
|
|
1655
|
-
children: [
|
|
1656
|
-
/* @__PURE__ */ jsx42("div", { ref, className: "flex basis-full items-center", children: state.segments.map((segment, i) => {
|
|
1657
|
-
var _a;
|
|
1658
|
-
return /* @__PURE__ */ jsx42(
|
|
1659
|
-
DateSegment,
|
|
1660
|
-
{
|
|
1661
|
-
className: classNames2.segment,
|
|
1662
|
-
isPrevPlaceholder: (_a = state.segments[i - 1]) == null ? void 0 : _a.isPlaceholder,
|
|
1663
|
-
segment,
|
|
1664
|
-
state
|
|
1665
|
-
},
|
|
1666
|
-
i
|
|
1667
|
-
);
|
|
1668
|
-
}) }),
|
|
1669
|
-
action ? action : /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx42(
|
|
1670
|
-
"svg",
|
|
1671
|
-
{
|
|
1672
|
-
"data-testid": "action",
|
|
1673
|
-
className: cn27(classNames2.action),
|
|
1674
|
-
viewBox: "0 0 24 24",
|
|
1675
|
-
width: 24,
|
|
1676
|
-
height: 24,
|
|
1677
|
-
children: /* @__PURE__ */ jsx42("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" })
|
|
1678
|
-
}
|
|
1679
|
-
) })
|
|
1680
|
-
]
|
|
1681
|
-
}
|
|
1682
|
-
)
|
|
1683
|
-
}
|
|
1684
|
-
);
|
|
1685
|
-
};
|
|
1506
|
+
error,
|
|
1507
|
+
readOnly,
|
|
1508
|
+
...rest
|
|
1509
|
+
}, ref) => {
|
|
1510
|
+
const props = {
|
|
1511
|
+
isDisabled: disabled,
|
|
1512
|
+
isReadOnly: readOnly,
|
|
1513
|
+
isInvalid: error,
|
|
1514
|
+
isRequired: required,
|
|
1515
|
+
...rest
|
|
1516
|
+
};
|
|
1517
|
+
return /* @__PURE__ */ jsx42(
|
|
1518
|
+
FieldBase,
|
|
1519
|
+
{
|
|
1520
|
+
as: DateField,
|
|
1521
|
+
variant,
|
|
1522
|
+
size,
|
|
1523
|
+
ref,
|
|
1524
|
+
...props,
|
|
1525
|
+
children: /* @__PURE__ */ jsx42(_DateInput, { action })
|
|
1526
|
+
}
|
|
1527
|
+
);
|
|
1528
|
+
}
|
|
1529
|
+
);
|
|
1686
1530
|
|
|
1687
1531
|
// src/Calendar/Calendar.tsx
|
|
1688
1532
|
import { useState } from "react";
|
|
1689
1533
|
import { Calendar } from "react-aria-components";
|
|
1690
|
-
import { cn as
|
|
1534
|
+
import { cn as cn28, useClassNames as useClassNames26 } from "@marigold/system";
|
|
1691
1535
|
|
|
1692
1536
|
// src/Calendar/CalendarGrid.tsx
|
|
1693
1537
|
import {
|
|
@@ -1695,20 +1539,20 @@ import {
|
|
|
1695
1539
|
CalendarGrid,
|
|
1696
1540
|
CalendarGridBody
|
|
1697
1541
|
} from "react-aria-components";
|
|
1698
|
-
import { cn as
|
|
1542
|
+
import { cn as cn25, useClassNames as useClassNames23 } from "@marigold/system";
|
|
1699
1543
|
|
|
1700
1544
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1701
1545
|
import { startOfWeek, today } from "@internationalized/date";
|
|
1702
|
-
import { useContext as
|
|
1546
|
+
import { useContext as useContext5, useMemo } from "react";
|
|
1703
1547
|
import { CalendarStateContext } from "react-aria-components";
|
|
1704
1548
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1705
|
-
import { useDateFormatter, useLocale
|
|
1706
|
-
import { useClassNames as
|
|
1549
|
+
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
1550
|
+
import { useClassNames as useClassNames22 } from "@marigold/system";
|
|
1707
1551
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1708
1552
|
function CalendarGridHeader(props) {
|
|
1709
|
-
const state =
|
|
1553
|
+
const state = useContext5(CalendarStateContext);
|
|
1710
1554
|
const { headerProps } = useCalendarGrid(props, state);
|
|
1711
|
-
const { locale } =
|
|
1555
|
+
const { locale } = useLocale();
|
|
1712
1556
|
const dayFormatter = useDateFormatter({
|
|
1713
1557
|
weekday: "short",
|
|
1714
1558
|
timeZone: state.timeZone
|
|
@@ -1721,21 +1565,21 @@ function CalendarGridHeader(props) {
|
|
|
1721
1565
|
return dayFormatter.format(dateDay);
|
|
1722
1566
|
});
|
|
1723
1567
|
}, [locale, state.timeZone, dayFormatter]);
|
|
1724
|
-
const classNames2 =
|
|
1568
|
+
const classNames2 = useClassNames22({ component: "Calendar" });
|
|
1725
1569
|
return /* @__PURE__ */ jsx43("thead", { ...headerProps, children: /* @__PURE__ */ jsx43("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx43("th", { className: classNames2.calendarHeader, children: day.substring(0, 2) }, index)) }) });
|
|
1726
1570
|
}
|
|
1727
1571
|
|
|
1728
1572
|
// src/Calendar/CalendarGrid.tsx
|
|
1729
|
-
import { jsx as jsx44, jsxs as
|
|
1573
|
+
import { jsx as jsx44, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1730
1574
|
var _CalendarGrid = () => {
|
|
1731
|
-
const classNames2 =
|
|
1732
|
-
return /* @__PURE__ */
|
|
1575
|
+
const classNames2 = useClassNames23({ component: "Calendar" });
|
|
1576
|
+
return /* @__PURE__ */ jsxs15(CalendarGrid, { className: classNames2.calendarGrid, children: [
|
|
1733
1577
|
/* @__PURE__ */ jsx44(CalendarGridHeader, {}),
|
|
1734
1578
|
/* @__PURE__ */ jsx44(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx44(
|
|
1735
1579
|
CalendarCell,
|
|
1736
1580
|
{
|
|
1737
1581
|
date,
|
|
1738
|
-
className:
|
|
1582
|
+
className: cn25(
|
|
1739
1583
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
1740
1584
|
classNames2.calendarCell
|
|
1741
1585
|
)
|
|
@@ -1745,10 +1589,10 @@ var _CalendarGrid = () => {
|
|
|
1745
1589
|
};
|
|
1746
1590
|
|
|
1747
1591
|
// src/Calendar/CalendarListBox.tsx
|
|
1748
|
-
import { useContext as
|
|
1592
|
+
import { useContext as useContext6 } from "react";
|
|
1749
1593
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1750
1594
|
import { ChevronDown as ChevronDown2 } from "@marigold/icons";
|
|
1751
|
-
import { cn as
|
|
1595
|
+
import { cn as cn26, useClassNames as useClassNames24 } from "@marigold/system";
|
|
1752
1596
|
|
|
1753
1597
|
// src/Calendar/useFormattedMonths.tsx
|
|
1754
1598
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -1767,22 +1611,22 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
1767
1611
|
}
|
|
1768
1612
|
|
|
1769
1613
|
// src/Calendar/CalendarListBox.tsx
|
|
1770
|
-
import { jsx as jsx45, jsxs as
|
|
1614
|
+
import { jsx as jsx45, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1771
1615
|
function CalendarListBox({
|
|
1772
1616
|
type,
|
|
1773
1617
|
isDisabled,
|
|
1774
1618
|
setSelectedDropdown
|
|
1775
1619
|
}) {
|
|
1776
|
-
const state =
|
|
1620
|
+
const state = useContext6(CalendarStateContext2);
|
|
1777
1621
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1778
1622
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1779
|
-
const { select: selectClassNames } =
|
|
1780
|
-
return /* @__PURE__ */
|
|
1623
|
+
const { select: selectClassNames } = useClassNames24({ component: "Select" });
|
|
1624
|
+
return /* @__PURE__ */ jsxs16(
|
|
1781
1625
|
"button",
|
|
1782
1626
|
{
|
|
1783
1627
|
disabled: isDisabled,
|
|
1784
1628
|
onClick: () => setSelectedDropdown(type),
|
|
1785
|
-
className:
|
|
1629
|
+
className: cn26(buttonStyles, selectClassNames),
|
|
1786
1630
|
"data-testid": type,
|
|
1787
1631
|
children: [
|
|
1788
1632
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
@@ -1793,18 +1637,17 @@ function CalendarListBox({
|
|
|
1793
1637
|
}
|
|
1794
1638
|
|
|
1795
1639
|
// src/Calendar/MonthControls.tsx
|
|
1796
|
-
import React4 from "react";
|
|
1797
1640
|
import { Button as Button2 } from "react-aria-components";
|
|
1798
1641
|
import { ChevronLeft, ChevronRight } from "@marigold/icons";
|
|
1799
|
-
import { cn as
|
|
1800
|
-
import { jsx as jsx46, jsxs as
|
|
1642
|
+
import { cn as cn27, useClassNames as useClassNames25 } from "@marigold/system";
|
|
1643
|
+
import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1801
1644
|
function MonthControls() {
|
|
1802
|
-
const classNames2 =
|
|
1803
|
-
const buttonClassNames =
|
|
1804
|
-
return /* @__PURE__ */
|
|
1645
|
+
const classNames2 = useClassNames25({ component: "Calendar" });
|
|
1646
|
+
const buttonClassNames = useClassNames25({ component: "Button" });
|
|
1647
|
+
return /* @__PURE__ */ jsxs17(
|
|
1805
1648
|
"div",
|
|
1806
1649
|
{
|
|
1807
|
-
className:
|
|
1650
|
+
className: cn27(
|
|
1808
1651
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
1809
1652
|
classNames2.calendarControllers
|
|
1810
1653
|
),
|
|
@@ -1812,7 +1655,7 @@ function MonthControls() {
|
|
|
1812
1655
|
/* @__PURE__ */ jsx46(
|
|
1813
1656
|
Button2,
|
|
1814
1657
|
{
|
|
1815
|
-
className:
|
|
1658
|
+
className: cn27(
|
|
1816
1659
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1817
1660
|
buttonClassNames
|
|
1818
1661
|
),
|
|
@@ -1823,7 +1666,7 @@ function MonthControls() {
|
|
|
1823
1666
|
/* @__PURE__ */ jsx46(
|
|
1824
1667
|
Button2,
|
|
1825
1668
|
{
|
|
1826
|
-
className:
|
|
1669
|
+
className: cn27(
|
|
1827
1670
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1828
1671
|
buttonClassNames
|
|
1829
1672
|
),
|
|
@@ -1835,14 +1678,14 @@ function MonthControls() {
|
|
|
1835
1678
|
}
|
|
1836
1679
|
);
|
|
1837
1680
|
}
|
|
1838
|
-
var MonthControls_default =
|
|
1681
|
+
var MonthControls_default = MonthControls;
|
|
1839
1682
|
|
|
1840
1683
|
// src/Calendar/MonthListBox.tsx
|
|
1841
|
-
import { useContext as
|
|
1684
|
+
import { useContext as useContext7 } from "react";
|
|
1842
1685
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
1843
1686
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1844
1687
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
1845
|
-
const state =
|
|
1688
|
+
const state = useContext7(CalendarStateContext3);
|
|
1846
1689
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1847
1690
|
let onChange = (index) => {
|
|
1848
1691
|
let value = Number(index) + 1;
|
|
@@ -1877,15 +1720,15 @@ var MonthListBox_default = MonthListBox;
|
|
|
1877
1720
|
|
|
1878
1721
|
// src/Calendar/YearListBox.tsx
|
|
1879
1722
|
import {
|
|
1880
|
-
useContext as
|
|
1723
|
+
useContext as useContext8,
|
|
1881
1724
|
useEffect as useEffect2,
|
|
1882
|
-
useRef as
|
|
1725
|
+
useRef as useRef3
|
|
1883
1726
|
} from "react";
|
|
1884
1727
|
import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
1885
1728
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
1886
1729
|
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1887
1730
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
1888
|
-
const state =
|
|
1731
|
+
const state = useContext8(CalendarStateContext4);
|
|
1889
1732
|
const years = [];
|
|
1890
1733
|
let formatter = useDateFormatter3({
|
|
1891
1734
|
year: "numeric",
|
|
@@ -1898,7 +1741,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1898
1741
|
formatted: formatter.format(date.toDate(state.timeZone))
|
|
1899
1742
|
});
|
|
1900
1743
|
}
|
|
1901
|
-
const activeButtonRef =
|
|
1744
|
+
const activeButtonRef = useRef3(null);
|
|
1902
1745
|
useEffect2(() => {
|
|
1903
1746
|
if (activeButtonRef.current) {
|
|
1904
1747
|
const activeButton = activeButtonRef.current;
|
|
@@ -1950,7 +1793,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1950
1793
|
var YearListBox_default = YearListBox;
|
|
1951
1794
|
|
|
1952
1795
|
// src/Calendar/Calendar.tsx
|
|
1953
|
-
import { Fragment as Fragment6, jsx as jsx49, jsxs as
|
|
1796
|
+
import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1954
1797
|
var _Calendar = ({
|
|
1955
1798
|
disabled,
|
|
1956
1799
|
readOnly,
|
|
@@ -1963,7 +1806,7 @@ var _Calendar = ({
|
|
|
1963
1806
|
isReadOnly: readOnly,
|
|
1964
1807
|
...rest
|
|
1965
1808
|
};
|
|
1966
|
-
const classNames2 =
|
|
1809
|
+
const classNames2 = useClassNames26({ component: "Calendar" });
|
|
1967
1810
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
1968
1811
|
const ViewMap = {
|
|
1969
1812
|
month: /* @__PURE__ */ jsx49(MonthListBox_default, { setSelectedDropdown }),
|
|
@@ -1972,14 +1815,14 @@ var _Calendar = ({
|
|
|
1972
1815
|
return /* @__PURE__ */ jsx49(
|
|
1973
1816
|
Calendar,
|
|
1974
1817
|
{
|
|
1975
|
-
className:
|
|
1818
|
+
className: cn28(
|
|
1976
1819
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4 shadow-[0_4px_4px_rgba(165,165,165,0.25)]",
|
|
1977
1820
|
classNames2.calendar
|
|
1978
1821
|
),
|
|
1979
1822
|
...props,
|
|
1980
|
-
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */
|
|
1981
|
-
/* @__PURE__ */
|
|
1982
|
-
/* @__PURE__ */
|
|
1823
|
+
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
1824
|
+
/* @__PURE__ */ jsxs18("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
1825
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex w-full gap-4", children: [
|
|
1983
1826
|
/* @__PURE__ */ jsx49(
|
|
1984
1827
|
CalendarListBox,
|
|
1985
1828
|
{
|
|
@@ -2006,242 +1849,73 @@ var _Calendar = ({
|
|
|
2006
1849
|
};
|
|
2007
1850
|
|
|
2008
1851
|
// src/DatePicker/DatePicker.tsx
|
|
2009
|
-
import {
|
|
2010
|
-
import {
|
|
2011
|
-
import {
|
|
2012
|
-
|
|
2013
|
-
import { useClassNames as useClassNames31, useStateProps as useStateProps4 } from "@marigold/system";
|
|
2014
|
-
|
|
2015
|
-
// src/Overlay/Overlay.tsx
|
|
2016
|
-
import { useRef as useRef6 } from "react";
|
|
2017
|
-
import {
|
|
2018
|
-
Overlay as ReactAriaOverlay
|
|
2019
|
-
} from "@react-aria/overlays";
|
|
2020
|
-
import { useTheme as useTheme4 } from "@marigold/system";
|
|
2021
|
-
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2022
|
-
var Overlay = ({ children, container, open }) => {
|
|
2023
|
-
const nodeRef = useRef6(null);
|
|
2024
|
-
const theme = useTheme4();
|
|
2025
|
-
let mountOverlay = open;
|
|
2026
|
-
if (!mountOverlay) {
|
|
2027
|
-
return null;
|
|
2028
|
-
}
|
|
2029
|
-
return /* @__PURE__ */ jsx50(ReactAriaOverlay, { portalContainer: container, children: /* @__PURE__ */ jsx50(
|
|
2030
|
-
"div",
|
|
2031
|
-
{
|
|
2032
|
-
ref: nodeRef,
|
|
2033
|
-
"data-testid": "overlay",
|
|
2034
|
-
"data-theme": theme.name,
|
|
2035
|
-
className: "opacity-100",
|
|
2036
|
-
children
|
|
2037
|
-
}
|
|
2038
|
-
) });
|
|
2039
|
-
};
|
|
2040
|
-
|
|
2041
|
-
// src/Overlay/_Popover.tsx
|
|
2042
|
-
import { forwardRef as forwardRef12, useRef as useRef7 } from "react";
|
|
2043
|
-
import { FocusScope } from "@react-aria/focus";
|
|
2044
|
-
import {
|
|
2045
|
-
DismissButton,
|
|
2046
|
-
usePopover
|
|
2047
|
-
} from "@react-aria/overlays";
|
|
2048
|
-
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
2049
|
-
import { jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2050
|
-
var Popover2 = forwardRef12(
|
|
2051
|
-
(props, ref) => {
|
|
2052
|
-
const fallbackRef = useRef7(null);
|
|
2053
|
-
const popoverRef = ref || fallbackRef;
|
|
2054
|
-
let { children, state, ...otherProps } = props;
|
|
2055
|
-
return /* @__PURE__ */ jsx51(Overlay, { open: state.isOpen, ...otherProps, children: /* @__PURE__ */ jsx51(PopoverWrapper, { ref: popoverRef, ...props, children }) });
|
|
2056
|
-
}
|
|
2057
|
-
);
|
|
2058
|
-
var PopoverWrapper = forwardRef12(
|
|
2059
|
-
({
|
|
2060
|
-
children,
|
|
2061
|
-
isNonModal,
|
|
2062
|
-
state,
|
|
2063
|
-
keyboardDismissDisabled,
|
|
2064
|
-
...props
|
|
2065
|
-
}, ref) => {
|
|
2066
|
-
const { popoverProps, underlayProps, placement } = usePopover(
|
|
2067
|
-
{
|
|
2068
|
-
...props,
|
|
2069
|
-
isNonModal,
|
|
2070
|
-
isKeyboardDismissDisabled: keyboardDismissDisabled,
|
|
2071
|
-
popoverRef: ref,
|
|
2072
|
-
placement: "bottom left"
|
|
2073
|
-
},
|
|
2074
|
-
state
|
|
2075
|
-
);
|
|
2076
|
-
const classNames2 = useClassNames29({
|
|
2077
|
-
component: "Popover",
|
|
2078
|
-
variant: placement
|
|
2079
|
-
});
|
|
2080
|
-
return /* @__PURE__ */ jsxs21(FocusScope, { restoreFocus: true, children: [
|
|
2081
|
-
!isNonModal && /* @__PURE__ */ jsx51(Underlay, { ...underlayProps }),
|
|
2082
|
-
/* @__PURE__ */ jsxs21(
|
|
2083
|
-
"div",
|
|
2084
|
-
{
|
|
2085
|
-
...popoverProps,
|
|
2086
|
-
className: classNames2,
|
|
2087
|
-
style: {
|
|
2088
|
-
...popoverProps.style,
|
|
2089
|
-
minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
|
|
2090
|
-
},
|
|
2091
|
-
ref,
|
|
2092
|
-
role: "presentation",
|
|
2093
|
-
children: [
|
|
2094
|
-
!isNonModal && /* @__PURE__ */ jsx51(DismissButton, { onDismiss: state.close }),
|
|
2095
|
-
children,
|
|
2096
|
-
/* @__PURE__ */ jsx51(DismissButton, { onDismiss: state.close })
|
|
2097
|
-
]
|
|
2098
|
-
}
|
|
2099
|
-
)
|
|
2100
|
-
] });
|
|
2101
|
-
}
|
|
2102
|
-
);
|
|
2103
|
-
|
|
2104
|
-
// src/Overlay/Tray.tsx
|
|
2105
|
-
import { forwardRef as forwardRef13 } from "react";
|
|
2106
|
-
import { FocusScope as FocusScope2 } from "@react-aria/focus";
|
|
2107
|
-
import {
|
|
2108
|
-
DismissButton as DismissButton2,
|
|
2109
|
-
useModalOverlay
|
|
2110
|
-
} from "@react-aria/overlays";
|
|
2111
|
-
import { useObjectRef } from "@react-aria/utils";
|
|
2112
|
-
|
|
2113
|
-
// src/Overlay/_Underlay.tsx
|
|
2114
|
-
import { cn as cn32, useClassNames as useClassNames30 } from "@marigold/system";
|
|
2115
|
-
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2116
|
-
var Underlay2 = ({ size, variant, ...props }) => {
|
|
2117
|
-
const classNames2 = useClassNames30({ component: "Underlay", size, variant });
|
|
2118
|
-
return /* @__PURE__ */ jsx52("div", { className: cn32("fixed inset-0 z-40", classNames2), ...props });
|
|
2119
|
-
};
|
|
2120
|
-
|
|
2121
|
-
// src/Overlay/Tray.tsx
|
|
2122
|
-
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2123
|
-
var Tray = forwardRef13(
|
|
2124
|
-
({ state, children, ...props }, ref) => {
|
|
2125
|
-
const trayRef = useObjectRef(ref);
|
|
2126
|
-
return /* @__PURE__ */ jsx53(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx53(TrayWrapper, { state, ...props, ref: trayRef, children }) });
|
|
2127
|
-
}
|
|
2128
|
-
);
|
|
2129
|
-
var TrayWrapper = forwardRef13(
|
|
2130
|
-
({ children, state, ...props }, ref) => {
|
|
2131
|
-
let { modalProps, underlayProps } = useModalOverlay(
|
|
2132
|
-
{
|
|
2133
|
-
...props,
|
|
2134
|
-
isDismissable: true
|
|
2135
|
-
},
|
|
2136
|
-
state,
|
|
2137
|
-
ref
|
|
2138
|
-
);
|
|
2139
|
-
return /* @__PURE__ */ jsx53(FocusScope2, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsx53(Underlay2, { ...underlayProps, variant: "modal", children: /* @__PURE__ */ jsxs22(
|
|
2140
|
-
"div",
|
|
2141
|
-
{
|
|
2142
|
-
...modalProps,
|
|
2143
|
-
ref,
|
|
2144
|
-
className: "absolute bottom-0 w-full",
|
|
2145
|
-
"data-testid": "tray",
|
|
2146
|
-
children: [
|
|
2147
|
-
/* @__PURE__ */ jsx53(DismissButton2, { onDismiss: state.close }),
|
|
2148
|
-
children,
|
|
2149
|
-
/* @__PURE__ */ jsx53(DismissButton2, { onDismiss: state.close })
|
|
2150
|
-
]
|
|
2151
|
-
}
|
|
2152
|
-
) }) });
|
|
2153
|
-
}
|
|
2154
|
-
);
|
|
2155
|
-
|
|
2156
|
-
// src/DatePicker/DatePicker.tsx
|
|
2157
|
-
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2158
|
-
var DatePicker = ({
|
|
1852
|
+
import { DatePicker } from "react-aria-components";
|
|
1853
|
+
import { useClassNames as useClassNames27 } from "@marigold/system";
|
|
1854
|
+
import { jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1855
|
+
var _DatePicker = ({
|
|
2159
1856
|
disabled,
|
|
2160
1857
|
required,
|
|
2161
|
-
|
|
2162
|
-
open,
|
|
1858
|
+
readOnly,
|
|
2163
1859
|
error,
|
|
2164
|
-
shouldCloseOnSelect,
|
|
2165
1860
|
variant,
|
|
2166
1861
|
size,
|
|
2167
|
-
|
|
1862
|
+
open,
|
|
2168
1863
|
...rest
|
|
2169
1864
|
}) => {
|
|
2170
1865
|
const props = {
|
|
2171
1866
|
isDisabled: disabled,
|
|
2172
|
-
isReadOnly:
|
|
1867
|
+
isReadOnly: readOnly,
|
|
2173
1868
|
isRequired: required,
|
|
1869
|
+
isInvalid: error,
|
|
2174
1870
|
isOpen: open,
|
|
2175
1871
|
...rest
|
|
2176
1872
|
};
|
|
2177
|
-
const
|
|
2178
|
-
shouldCloseOnSelect,
|
|
2179
|
-
...props
|
|
2180
|
-
});
|
|
2181
|
-
const ref = useRef8(null);
|
|
2182
|
-
const stateProps = useStateProps4({
|
|
2183
|
-
focus: state.isOpen
|
|
2184
|
-
});
|
|
2185
|
-
const { groupProps, fieldProps, buttonProps, calendarProps } = useDatePicker(
|
|
2186
|
-
props,
|
|
2187
|
-
state,
|
|
2188
|
-
ref
|
|
2189
|
-
);
|
|
2190
|
-
const { isDisabled, errorMessage, description, label } = props;
|
|
2191
|
-
const classNames2 = useClassNames31({
|
|
1873
|
+
const classNames2 = useClassNames27({
|
|
2192
1874
|
component: "DatePicker",
|
|
2193
1875
|
size,
|
|
2194
1876
|
variant
|
|
2195
1877
|
});
|
|
2196
|
-
return /* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
|
|
1878
|
+
return /* @__PURE__ */ jsxs19(FieldBase, { as: DatePicker, variant, size, ...props, children: [
|
|
1879
|
+
/* @__PURE__ */ jsx50(
|
|
1880
|
+
_DateInput,
|
|
2199
1881
|
{
|
|
2200
|
-
|
|
2201
|
-
label,
|
|
2202
|
-
isPressed: state.isOpen,
|
|
2203
|
-
disabled,
|
|
2204
|
-
required,
|
|
2205
|
-
errorMessage,
|
|
2206
|
-
error,
|
|
2207
|
-
description: !state.isOpen && description,
|
|
2208
|
-
triggerRef: ref,
|
|
2209
|
-
width,
|
|
2210
|
-
action: /* @__PURE__ */ jsx54("div", { className: classNames2.container, children: /* @__PURE__ */ jsx54(
|
|
1882
|
+
action: /* @__PURE__ */ jsx50("div", { className: classNames2.container, children: /* @__PURE__ */ jsx50(
|
|
2211
1883
|
_Button,
|
|
2212
1884
|
{
|
|
2213
|
-
|
|
2214
|
-
disabled
|
|
2215
|
-
|
|
1885
|
+
size: "small",
|
|
1886
|
+
disabled,
|
|
1887
|
+
className: classNames2.button,
|
|
1888
|
+
children: /* @__PURE__ */ jsx50(
|
|
2216
1889
|
"svg",
|
|
2217
1890
|
{
|
|
2218
|
-
|
|
2219
|
-
height: "24",
|
|
1891
|
+
"data-testid": "action",
|
|
2220
1892
|
viewBox: "0 0 24 24",
|
|
1893
|
+
width: 24,
|
|
1894
|
+
height: 24,
|
|
2221
1895
|
fill: "currentColor",
|
|
2222
|
-
children: /* @__PURE__ */
|
|
1896
|
+
children: /* @__PURE__ */ jsx50("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" })
|
|
2223
1897
|
}
|
|
2224
1898
|
)
|
|
2225
1899
|
}
|
|
2226
1900
|
) })
|
|
2227
1901
|
}
|
|
2228
|
-
)
|
|
2229
|
-
|
|
1902
|
+
),
|
|
1903
|
+
/* @__PURE__ */ jsx50(_Popover, { children: /* @__PURE__ */ jsx50(_Calendar, { disabled }) })
|
|
2230
1904
|
] });
|
|
2231
1905
|
};
|
|
2232
1906
|
|
|
2233
1907
|
// src/Inset/Inset.tsx
|
|
2234
1908
|
import {
|
|
2235
|
-
cn as
|
|
1909
|
+
cn as cn29,
|
|
2236
1910
|
paddingSpace as paddingSpace2,
|
|
2237
1911
|
paddingSpaceX as paddingSpaceX2,
|
|
2238
1912
|
paddingSpaceY as paddingSpaceY2
|
|
2239
1913
|
} from "@marigold/system";
|
|
2240
|
-
import { jsx as
|
|
2241
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
1914
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
1915
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx51(
|
|
2242
1916
|
"div",
|
|
2243
1917
|
{
|
|
2244
|
-
className:
|
|
1918
|
+
className: cn29(
|
|
2245
1919
|
space && paddingSpace2[space],
|
|
2246
1920
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
2247
1921
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -2251,38 +1925,38 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx55(
|
|
|
2251
1925
|
);
|
|
2252
1926
|
|
|
2253
1927
|
// src/Link/Link.tsx
|
|
2254
|
-
import { forwardRef as
|
|
1928
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
2255
1929
|
import { Link } from "react-aria-components";
|
|
2256
|
-
import { useClassNames as
|
|
2257
|
-
import { jsx as
|
|
2258
|
-
var _Link =
|
|
1930
|
+
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
1931
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1932
|
+
var _Link = forwardRef13(
|
|
2259
1933
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
2260
|
-
const classNames2 =
|
|
1934
|
+
const classNames2 = useClassNames28({
|
|
2261
1935
|
component: "Link",
|
|
2262
1936
|
variant,
|
|
2263
1937
|
size
|
|
2264
1938
|
});
|
|
2265
|
-
return /* @__PURE__ */
|
|
1939
|
+
return /* @__PURE__ */ jsx52(Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
|
|
2266
1940
|
}
|
|
2267
1941
|
);
|
|
2268
1942
|
|
|
2269
1943
|
// src/List/List.tsx
|
|
2270
|
-
import { useClassNames as
|
|
1944
|
+
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
2271
1945
|
|
|
2272
1946
|
// src/List/Context.ts
|
|
2273
|
-
import { createContext as
|
|
2274
|
-
var ListContext =
|
|
2275
|
-
var useListContext = () =>
|
|
1947
|
+
import { createContext as createContext4, useContext as useContext9 } from "react";
|
|
1948
|
+
var ListContext = createContext4({});
|
|
1949
|
+
var useListContext = () => useContext9(ListContext);
|
|
2276
1950
|
|
|
2277
1951
|
// src/List/ListItem.tsx
|
|
2278
|
-
import { jsx as
|
|
1952
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2279
1953
|
var ListItem = ({ children, ...props }) => {
|
|
2280
1954
|
const { classNames: classNames2 } = useListContext();
|
|
2281
|
-
return /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ jsx53("li", { ...props, className: classNames2, children });
|
|
2282
1956
|
};
|
|
2283
1957
|
|
|
2284
1958
|
// src/List/List.tsx
|
|
2285
|
-
import { jsx as
|
|
1959
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2286
1960
|
var List = ({
|
|
2287
1961
|
as = "ul",
|
|
2288
1962
|
children,
|
|
@@ -2291,50 +1965,51 @@ var List = ({
|
|
|
2291
1965
|
...props
|
|
2292
1966
|
}) => {
|
|
2293
1967
|
const Component = as;
|
|
2294
|
-
const classNames2 =
|
|
2295
|
-
return /* @__PURE__ */
|
|
1968
|
+
const classNames2 = useClassNames29({ component: "List", variant, size });
|
|
1969
|
+
return /* @__PURE__ */ jsx54(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx54(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2296
1970
|
};
|
|
2297
1971
|
List.Item = ListItem;
|
|
2298
1972
|
|
|
2299
1973
|
// src/Menu/Menu.tsx
|
|
2300
1974
|
import { Menu, MenuTrigger } from "react-aria-components";
|
|
2301
|
-
import { useClassNames as
|
|
1975
|
+
import { useClassNames as useClassNames32 } from "@marigold/system";
|
|
2302
1976
|
|
|
2303
1977
|
// src/Menu/MenuItem.tsx
|
|
2304
1978
|
import { MenuItem } from "react-aria-components";
|
|
2305
|
-
import { useClassNames as
|
|
2306
|
-
import { jsx as
|
|
1979
|
+
import { useClassNames as useClassNames30 } from "@marigold/system";
|
|
1980
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2307
1981
|
var _MenuItem = ({ children, ...props }) => {
|
|
2308
|
-
const classNames2 =
|
|
2309
|
-
return /* @__PURE__ */
|
|
1982
|
+
const classNames2 = useClassNames30({ component: "Menu" });
|
|
1983
|
+
return /* @__PURE__ */ jsx55(MenuItem, { ...props, className: classNames2.item, children });
|
|
2310
1984
|
};
|
|
2311
1985
|
|
|
2312
1986
|
// src/Menu/MenuSection.tsx
|
|
2313
1987
|
import { Section as Section2 } from "react-aria-components";
|
|
2314
|
-
import { useClassNames as
|
|
2315
|
-
import { jsx as
|
|
1988
|
+
import { useClassNames as useClassNames31 } from "@marigold/system";
|
|
1989
|
+
import { jsx as jsx56, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2316
1990
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
2317
|
-
const className =
|
|
2318
|
-
return /* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
1991
|
+
const className = useClassNames31({ component: "Menu" });
|
|
1992
|
+
return /* @__PURE__ */ jsxs20(Section2, { ...props, children: [
|
|
1993
|
+
/* @__PURE__ */ jsx56(_Header, { className: className.section, children: title }),
|
|
2320
1994
|
children
|
|
2321
1995
|
] });
|
|
2322
1996
|
};
|
|
2323
1997
|
|
|
2324
1998
|
// src/Menu/Menu.tsx
|
|
2325
|
-
import { jsx as
|
|
1999
|
+
import { jsx as jsx57, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2326
2000
|
var _Menu = ({
|
|
2327
2001
|
children,
|
|
2328
2002
|
label,
|
|
2329
2003
|
variant,
|
|
2330
2004
|
size,
|
|
2005
|
+
disabled,
|
|
2331
2006
|
open,
|
|
2332
2007
|
...props
|
|
2333
2008
|
}) => {
|
|
2334
|
-
const classNames2 =
|
|
2335
|
-
return /* @__PURE__ */
|
|
2336
|
-
/* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2009
|
+
const classNames2 = useClassNames32({ component: "Menu", variant, size });
|
|
2010
|
+
return /* @__PURE__ */ jsxs21(MenuTrigger, { ...props, children: [
|
|
2011
|
+
/* @__PURE__ */ jsx57(_Button, { variant: "menu", disabled, children: label }),
|
|
2012
|
+
/* @__PURE__ */ jsx57(_Popover, { open, children: /* @__PURE__ */ jsx57(Menu, { ...props, className: classNames2.container, children }) })
|
|
2338
2013
|
] });
|
|
2339
2014
|
};
|
|
2340
2015
|
_Menu.Item = _MenuItem;
|
|
@@ -2342,27 +2017,32 @@ _Menu.Section = _MenuSection;
|
|
|
2342
2017
|
|
|
2343
2018
|
// src/Menu/ActionMenu.tsx
|
|
2344
2019
|
import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
2345
|
-
import { SVG as
|
|
2346
|
-
import { jsx as
|
|
2347
|
-
var ActionMenu = ({
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2020
|
+
import { SVG as SVG4, useClassNames as useClassNames33 } from "@marigold/system";
|
|
2021
|
+
import { jsx as jsx58, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2022
|
+
var ActionMenu = ({
|
|
2023
|
+
variant,
|
|
2024
|
+
size,
|
|
2025
|
+
disabled,
|
|
2026
|
+
...props
|
|
2027
|
+
}) => {
|
|
2028
|
+
const classNames2 = useClassNames33({ component: "Menu", variant, size });
|
|
2029
|
+
return /* @__PURE__ */ jsxs22(MenuTrigger2, { children: [
|
|
2030
|
+
/* @__PURE__ */ jsx58(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ jsx58(SVG4, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx58("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" }) }) }),
|
|
2031
|
+
/* @__PURE__ */ jsx58(_Popover, { children: /* @__PURE__ */ jsx58(Menu2, { ...props, className: classNames2.container, children: props.children }) })
|
|
2352
2032
|
] });
|
|
2353
2033
|
};
|
|
2354
2034
|
|
|
2355
2035
|
// src/Message/Message.tsx
|
|
2356
|
-
import { cn as
|
|
2357
|
-
import { jsx as
|
|
2036
|
+
import { cn as cn30, useClassNames as useClassNames34 } from "@marigold/system";
|
|
2037
|
+
import { jsx as jsx59, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2358
2038
|
var icons = {
|
|
2359
|
-
success: () => /* @__PURE__ */
|
|
2039
|
+
success: () => /* @__PURE__ */ jsx59(
|
|
2360
2040
|
"svg",
|
|
2361
2041
|
{
|
|
2362
2042
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2363
2043
|
viewBox: "0 0 24 24",
|
|
2364
2044
|
fill: "currentColor",
|
|
2365
|
-
children: /* @__PURE__ */
|
|
2045
|
+
children: /* @__PURE__ */ jsx59(
|
|
2366
2046
|
"path",
|
|
2367
2047
|
{
|
|
2368
2048
|
fillRule: "evenodd",
|
|
@@ -2372,13 +2052,13 @@ var icons = {
|
|
|
2372
2052
|
)
|
|
2373
2053
|
}
|
|
2374
2054
|
),
|
|
2375
|
-
info: () => /* @__PURE__ */
|
|
2055
|
+
info: () => /* @__PURE__ */ jsx59(
|
|
2376
2056
|
"svg",
|
|
2377
2057
|
{
|
|
2378
2058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2379
2059
|
viewBox: "0 0 24 24",
|
|
2380
2060
|
fill: "currentColor",
|
|
2381
|
-
children: /* @__PURE__ */
|
|
2061
|
+
children: /* @__PURE__ */ jsx59(
|
|
2382
2062
|
"path",
|
|
2383
2063
|
{
|
|
2384
2064
|
fillRule: "evenodd",
|
|
@@ -2388,13 +2068,13 @@ var icons = {
|
|
|
2388
2068
|
)
|
|
2389
2069
|
}
|
|
2390
2070
|
),
|
|
2391
|
-
warning: () => /* @__PURE__ */
|
|
2071
|
+
warning: () => /* @__PURE__ */ jsx59(
|
|
2392
2072
|
"svg",
|
|
2393
2073
|
{
|
|
2394
2074
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2395
2075
|
viewBox: "0 0 24 24",
|
|
2396
2076
|
fill: "currentColor",
|
|
2397
|
-
children: /* @__PURE__ */
|
|
2077
|
+
children: /* @__PURE__ */ jsx59(
|
|
2398
2078
|
"path",
|
|
2399
2079
|
{
|
|
2400
2080
|
fillRule: "evenodd",
|
|
@@ -2404,13 +2084,13 @@ var icons = {
|
|
|
2404
2084
|
)
|
|
2405
2085
|
}
|
|
2406
2086
|
),
|
|
2407
|
-
error: () => /* @__PURE__ */
|
|
2087
|
+
error: () => /* @__PURE__ */ jsx59(
|
|
2408
2088
|
"svg",
|
|
2409
2089
|
{
|
|
2410
2090
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2411
2091
|
viewBox: "0 0 24 24",
|
|
2412
2092
|
fill: "currentColor",
|
|
2413
|
-
children: /* @__PURE__ */
|
|
2093
|
+
children: /* @__PURE__ */ jsx59(
|
|
2414
2094
|
"path",
|
|
2415
2095
|
{
|
|
2416
2096
|
fillRule: "evenodd",
|
|
@@ -2428,41 +2108,41 @@ var Message = ({
|
|
|
2428
2108
|
children,
|
|
2429
2109
|
...props
|
|
2430
2110
|
}) => {
|
|
2431
|
-
const classNames2 =
|
|
2432
|
-
const
|
|
2433
|
-
return /* @__PURE__ */
|
|
2111
|
+
const classNames2 = useClassNames34({ component: "Message", variant, size });
|
|
2112
|
+
const Icon4 = icons[variant];
|
|
2113
|
+
return /* @__PURE__ */ jsxs23(
|
|
2434
2114
|
"div",
|
|
2435
2115
|
{
|
|
2436
|
-
className:
|
|
2116
|
+
className: cn30(
|
|
2437
2117
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2438
2118
|
classNames2.container
|
|
2439
2119
|
),
|
|
2440
2120
|
...props,
|
|
2441
2121
|
children: [
|
|
2442
|
-
/* @__PURE__ */
|
|
2443
|
-
/* @__PURE__ */
|
|
2122
|
+
/* @__PURE__ */ jsx59("div", { className: cn30("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx59(Icon4, {}) }),
|
|
2123
|
+
/* @__PURE__ */ jsx59(
|
|
2444
2124
|
"div",
|
|
2445
2125
|
{
|
|
2446
|
-
className:
|
|
2126
|
+
className: cn30("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2447
2127
|
children: messageTitle
|
|
2448
2128
|
}
|
|
2449
2129
|
),
|
|
2450
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ jsx59("div", { className: cn30("col-start-2", classNames2.content), children })
|
|
2451
2131
|
]
|
|
2452
2132
|
}
|
|
2453
2133
|
);
|
|
2454
2134
|
};
|
|
2455
2135
|
|
|
2456
2136
|
// src/NumberField/NumberField.tsx
|
|
2457
|
-
import { forwardRef as
|
|
2458
|
-
import { Group, NumberField } from "react-aria-components";
|
|
2459
|
-
import { cn as
|
|
2137
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
2138
|
+
import { Group as Group2, NumberField } from "react-aria-components";
|
|
2139
|
+
import { cn as cn32, useClassNames as useClassNames35 } from "@marigold/system";
|
|
2460
2140
|
|
|
2461
2141
|
// src/NumberField/StepButton.tsx
|
|
2462
2142
|
import { Button as Button3 } from "react-aria-components";
|
|
2463
|
-
import { cn as
|
|
2464
|
-
import { jsx as
|
|
2465
|
-
var Plus = () => /* @__PURE__ */
|
|
2143
|
+
import { cn as cn31 } from "@marigold/system";
|
|
2144
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
2145
|
+
var Plus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx60(
|
|
2466
2146
|
"path",
|
|
2467
2147
|
{
|
|
2468
2148
|
fillRule: "evenodd",
|
|
@@ -2470,7 +2150,7 @@ var Plus = () => /* @__PURE__ */ jsx64("svg", { width: 16, height: 16, viewBox:
|
|
|
2470
2150
|
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"
|
|
2471
2151
|
}
|
|
2472
2152
|
) });
|
|
2473
|
-
var Minus = () => /* @__PURE__ */
|
|
2153
|
+
var Minus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx60(
|
|
2474
2154
|
"path",
|
|
2475
2155
|
{
|
|
2476
2156
|
fillRule: "evenodd",
|
|
@@ -2479,11 +2159,11 @@ var Minus = () => /* @__PURE__ */ jsx64("svg", { width: 16, height: 16, viewBox:
|
|
|
2479
2159
|
}
|
|
2480
2160
|
) });
|
|
2481
2161
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2482
|
-
const
|
|
2483
|
-
return /* @__PURE__ */
|
|
2162
|
+
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2163
|
+
return /* @__PURE__ */ jsx60(
|
|
2484
2164
|
Button3,
|
|
2485
2165
|
{
|
|
2486
|
-
className:
|
|
2166
|
+
className: cn31(
|
|
2487
2167
|
[
|
|
2488
2168
|
"flex items-center justify-center",
|
|
2489
2169
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
@@ -2491,14 +2171,14 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2491
2171
|
className
|
|
2492
2172
|
),
|
|
2493
2173
|
...props,
|
|
2494
|
-
children: /* @__PURE__ */
|
|
2174
|
+
children: /* @__PURE__ */ jsx60(Icon4, {})
|
|
2495
2175
|
}
|
|
2496
2176
|
);
|
|
2497
2177
|
};
|
|
2498
2178
|
|
|
2499
2179
|
// src/NumberField/NumberField.tsx
|
|
2500
|
-
import { jsx as
|
|
2501
|
-
var _NumberField =
|
|
2180
|
+
import { jsx as jsx61, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2181
|
+
var _NumberField = forwardRef14(
|
|
2502
2182
|
({
|
|
2503
2183
|
variant,
|
|
2504
2184
|
size,
|
|
@@ -2509,7 +2189,7 @@ var _NumberField = forwardRef15(
|
|
|
2509
2189
|
hideStepper,
|
|
2510
2190
|
...rest
|
|
2511
2191
|
}, ref) => {
|
|
2512
|
-
const classNames2 =
|
|
2192
|
+
const classNames2 = useClassNames35({
|
|
2513
2193
|
component: "NumberField",
|
|
2514
2194
|
size,
|
|
2515
2195
|
variant
|
|
@@ -2522,8 +2202,8 @@ var _NumberField = forwardRef15(
|
|
|
2522
2202
|
...rest
|
|
2523
2203
|
};
|
|
2524
2204
|
const showStepper = !hideStepper;
|
|
2525
|
-
return /* @__PURE__ */
|
|
2526
|
-
showStepper && /* @__PURE__ */
|
|
2205
|
+
return /* @__PURE__ */ jsx61(FieldBase, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs24(Group2, { className: cn32("flex items-stretch", classNames2.group), children: [
|
|
2206
|
+
showStepper && /* @__PURE__ */ jsx61(
|
|
2527
2207
|
_StepButton,
|
|
2528
2208
|
{
|
|
2529
2209
|
className: classNames2.stepper,
|
|
@@ -2531,7 +2211,7 @@ var _NumberField = forwardRef15(
|
|
|
2531
2211
|
slot: "decrement"
|
|
2532
2212
|
}
|
|
2533
2213
|
),
|
|
2534
|
-
/* @__PURE__ */
|
|
2214
|
+
/* @__PURE__ */ jsx61("div", { className: "flex-1", children: /* @__PURE__ */ jsx61(
|
|
2535
2215
|
_Input,
|
|
2536
2216
|
{
|
|
2537
2217
|
ref,
|
|
@@ -2540,7 +2220,7 @@ var _NumberField = forwardRef15(
|
|
|
2540
2220
|
className: classNames2.input
|
|
2541
2221
|
}
|
|
2542
2222
|
) }),
|
|
2543
|
-
showStepper && /* @__PURE__ */
|
|
2223
|
+
showStepper && /* @__PURE__ */ jsx61(
|
|
2544
2224
|
_StepButton,
|
|
2545
2225
|
{
|
|
2546
2226
|
className: classNames2.stepper,
|
|
@@ -2552,44 +2232,24 @@ var _NumberField = forwardRef15(
|
|
|
2552
2232
|
}
|
|
2553
2233
|
);
|
|
2554
2234
|
|
|
2555
|
-
// src/Provider/index.ts
|
|
2556
|
-
import { useTheme as useTheme6, ThemeProvider as ThemeProvider2 } from "@marigold/system";
|
|
2557
|
-
|
|
2558
|
-
// src/Provider/MarigoldProvider.tsx
|
|
2559
|
-
import { OverlayProvider } from "@react-aria/overlays";
|
|
2560
|
-
import {
|
|
2561
|
-
ThemeProvider,
|
|
2562
|
-
defaultTheme,
|
|
2563
|
-
useTheme as useTheme5
|
|
2564
|
-
} from "@marigold/system";
|
|
2565
|
-
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2566
|
-
function MarigoldProvider({
|
|
2567
|
-
children,
|
|
2568
|
-
theme
|
|
2569
|
-
}) {
|
|
2570
|
-
const outerTheme = useTheme5();
|
|
2571
|
-
const isTopLevel = outerTheme === defaultTheme;
|
|
2572
|
-
return /* @__PURE__ */ jsx66(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx66(OverlayProvider, { children }) : children });
|
|
2573
|
-
}
|
|
2574
|
-
|
|
2575
2235
|
// src/Radio/Radio.tsx
|
|
2576
2236
|
import {
|
|
2577
|
-
forwardRef as
|
|
2237
|
+
forwardRef as forwardRef15
|
|
2578
2238
|
} from "react";
|
|
2579
2239
|
import { Radio } from "react-aria-components";
|
|
2580
|
-
import { cn as
|
|
2240
|
+
import { cn as cn34, useClassNames as useClassNames37 } from "@marigold/system";
|
|
2581
2241
|
|
|
2582
2242
|
// src/Radio/Context.ts
|
|
2583
|
-
import { createContext as
|
|
2584
|
-
var RadioGroupContext =
|
|
2243
|
+
import { createContext as createContext5, useContext as useContext10 } from "react";
|
|
2244
|
+
var RadioGroupContext = createContext5(
|
|
2585
2245
|
null
|
|
2586
2246
|
);
|
|
2587
|
-
var useRadioGroupContext = () =>
|
|
2247
|
+
var useRadioGroupContext = () => useContext10(RadioGroupContext);
|
|
2588
2248
|
|
|
2589
2249
|
// src/Radio/RadioGroup.tsx
|
|
2590
2250
|
import { RadioGroup } from "react-aria-components";
|
|
2591
|
-
import { cn as
|
|
2592
|
-
import { jsx as
|
|
2251
|
+
import { cn as cn33, useClassNames as useClassNames36 } from "@marigold/system";
|
|
2252
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2593
2253
|
var _RadioGroup = ({
|
|
2594
2254
|
variant,
|
|
2595
2255
|
size,
|
|
@@ -2605,7 +2265,7 @@ var _RadioGroup = ({
|
|
|
2605
2265
|
width,
|
|
2606
2266
|
...rest
|
|
2607
2267
|
}) => {
|
|
2608
|
-
const classNames2 =
|
|
2268
|
+
const classNames2 = useClassNames36({ component: "Radio", variant, size });
|
|
2609
2269
|
const props = {
|
|
2610
2270
|
isDisabled: disabled,
|
|
2611
2271
|
isReadOnly: readOnly,
|
|
@@ -2613,7 +2273,7 @@ var _RadioGroup = ({
|
|
|
2613
2273
|
isInvalid: error,
|
|
2614
2274
|
...rest
|
|
2615
2275
|
};
|
|
2616
|
-
return /* @__PURE__ */
|
|
2276
|
+
return /* @__PURE__ */ jsx62(
|
|
2617
2277
|
FieldBase,
|
|
2618
2278
|
{
|
|
2619
2279
|
as: RadioGroup,
|
|
@@ -2624,18 +2284,18 @@ var _RadioGroup = ({
|
|
|
2624
2284
|
variant,
|
|
2625
2285
|
size,
|
|
2626
2286
|
...props,
|
|
2627
|
-
children: /* @__PURE__ */
|
|
2287
|
+
children: /* @__PURE__ */ jsx62(
|
|
2628
2288
|
"div",
|
|
2629
2289
|
{
|
|
2630
2290
|
role: "presentation",
|
|
2631
2291
|
"data-testid": "group",
|
|
2632
2292
|
"data-orientation": orientation,
|
|
2633
|
-
className:
|
|
2293
|
+
className: cn33(
|
|
2634
2294
|
classNames2.group,
|
|
2635
2295
|
"flex items-start",
|
|
2636
2296
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
2637
2297
|
),
|
|
2638
|
-
children: /* @__PURE__ */
|
|
2298
|
+
children: /* @__PURE__ */ jsx62(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
2639
2299
|
}
|
|
2640
2300
|
)
|
|
2641
2301
|
}
|
|
@@ -2643,33 +2303,33 @@ var _RadioGroup = ({
|
|
|
2643
2303
|
};
|
|
2644
2304
|
|
|
2645
2305
|
// src/Radio/Radio.tsx
|
|
2646
|
-
import { Fragment as
|
|
2647
|
-
var Dot = () => /* @__PURE__ */
|
|
2648
|
-
var
|
|
2306
|
+
import { Fragment as Fragment7, jsx as jsx63, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2307
|
+
var Dot = () => /* @__PURE__ */ jsx63("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx63("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2308
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx63(
|
|
2649
2309
|
"div",
|
|
2650
2310
|
{
|
|
2651
|
-
className:
|
|
2311
|
+
className: cn34(
|
|
2652
2312
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
2653
2313
|
className
|
|
2654
2314
|
),
|
|
2655
2315
|
"aria-hidden": "true",
|
|
2656
2316
|
...props,
|
|
2657
|
-
children: checked ? /* @__PURE__ */
|
|
2317
|
+
children: checked ? /* @__PURE__ */ jsx63(Dot, {}) : null
|
|
2658
2318
|
}
|
|
2659
2319
|
);
|
|
2660
|
-
var _Radio =
|
|
2320
|
+
var _Radio = forwardRef15(
|
|
2661
2321
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
2662
2322
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
2663
|
-
const classNames2 =
|
|
2323
|
+
const classNames2 = useClassNames37({
|
|
2664
2324
|
component: "Radio",
|
|
2665
2325
|
variant: variant || props.variant,
|
|
2666
2326
|
size: size || props.size
|
|
2667
2327
|
});
|
|
2668
|
-
return /* @__PURE__ */
|
|
2328
|
+
return /* @__PURE__ */ jsx63(
|
|
2669
2329
|
Radio,
|
|
2670
2330
|
{
|
|
2671
2331
|
ref,
|
|
2672
|
-
className:
|
|
2332
|
+
className: cn34(
|
|
2673
2333
|
"group/radio",
|
|
2674
2334
|
"relative flex items-center gap-[1ch]",
|
|
2675
2335
|
width || groupWidth || "w-full",
|
|
@@ -2678,18 +2338,18 @@ var _Radio = forwardRef16(
|
|
|
2678
2338
|
value,
|
|
2679
2339
|
isDisabled: disabled,
|
|
2680
2340
|
...props,
|
|
2681
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
2682
|
-
/* @__PURE__ */
|
|
2683
|
-
|
|
2341
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
2342
|
+
/* @__PURE__ */ jsx63(
|
|
2343
|
+
Icon3,
|
|
2684
2344
|
{
|
|
2685
2345
|
checked: isSelected,
|
|
2686
|
-
className:
|
|
2346
|
+
className: cn34(
|
|
2687
2347
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2688
2348
|
classNames2.radio
|
|
2689
2349
|
)
|
|
2690
2350
|
}
|
|
2691
2351
|
),
|
|
2692
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ jsx63("div", { className: classNames2.label, children })
|
|
2693
2353
|
] })
|
|
2694
2354
|
}
|
|
2695
2355
|
);
|
|
@@ -2698,10 +2358,10 @@ var _Radio = forwardRef16(
|
|
|
2698
2358
|
_Radio.Group = _RadioGroup;
|
|
2699
2359
|
|
|
2700
2360
|
// src/SearchField/SearchField.tsx
|
|
2701
|
-
import { forwardRef as
|
|
2361
|
+
import { forwardRef as forwardRef16 } from "react";
|
|
2702
2362
|
import { SearchField } from "react-aria-components";
|
|
2703
|
-
import { jsx as
|
|
2704
|
-
var SearchIcon2 = (props) => /* @__PURE__ */
|
|
2363
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2364
|
+
var SearchIcon2 = (props) => /* @__PURE__ */ jsx64(
|
|
2705
2365
|
"svg",
|
|
2706
2366
|
{
|
|
2707
2367
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2710,10 +2370,10 @@ var SearchIcon2 = (props) => /* @__PURE__ */ jsx69(
|
|
|
2710
2370
|
width: 24,
|
|
2711
2371
|
height: 24,
|
|
2712
2372
|
...props,
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2373
|
+
children: /* @__PURE__ */ jsx64("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" })
|
|
2714
2374
|
}
|
|
2715
2375
|
);
|
|
2716
|
-
var _SearchField =
|
|
2376
|
+
var _SearchField = forwardRef16(
|
|
2717
2377
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
2718
2378
|
const props = {
|
|
2719
2379
|
...rest,
|
|
@@ -2722,20 +2382,20 @@ var _SearchField = forwardRef17(
|
|
|
2722
2382
|
isReadOnly: readOnly,
|
|
2723
2383
|
isInvalid: error
|
|
2724
2384
|
};
|
|
2725
|
-
return /* @__PURE__ */
|
|
2385
|
+
return /* @__PURE__ */ jsx64(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx64(_Input, { ref, icon: /* @__PURE__ */ jsx64(SearchIcon2, {}) }) });
|
|
2726
2386
|
}
|
|
2727
2387
|
);
|
|
2728
2388
|
|
|
2729
2389
|
// src/Select/Select.tsx
|
|
2730
|
-
import { forwardRef as
|
|
2390
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
2731
2391
|
import {
|
|
2732
2392
|
Button as Button4,
|
|
2733
2393
|
Select,
|
|
2734
2394
|
SelectValue
|
|
2735
2395
|
} from "react-aria-components";
|
|
2736
|
-
import { cn as
|
|
2737
|
-
import { jsx as
|
|
2738
|
-
var _Select =
|
|
2396
|
+
import { cn as cn35, useClassNames as useClassNames38 } from "@marigold/system";
|
|
2397
|
+
import { jsx as jsx65, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2398
|
+
var _Select = forwardRef17(
|
|
2739
2399
|
({
|
|
2740
2400
|
width,
|
|
2741
2401
|
disabled,
|
|
@@ -2756,30 +2416,48 @@ var _Select = forwardRef18(
|
|
|
2756
2416
|
onSelectionChange: onChange,
|
|
2757
2417
|
...rest
|
|
2758
2418
|
};
|
|
2759
|
-
const classNames2 =
|
|
2760
|
-
return /* @__PURE__ */
|
|
2761
|
-
/* @__PURE__ */
|
|
2419
|
+
const classNames2 = useClassNames38({ component: "Select", variant, size });
|
|
2420
|
+
return /* @__PURE__ */ jsxs26(FieldBase, { isOpen: true, as: Select, ref, ...props, children: [
|
|
2421
|
+
/* @__PURE__ */ jsxs26(
|
|
2762
2422
|
Button4,
|
|
2763
2423
|
{
|
|
2764
|
-
className:
|
|
2424
|
+
className: cn35(
|
|
2765
2425
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
2766
2426
|
classNames2.select
|
|
2767
2427
|
),
|
|
2768
2428
|
children: [
|
|
2769
|
-
/* @__PURE__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
2429
|
+
/* @__PURE__ */ jsx65(SelectValue, {}),
|
|
2430
|
+
/* @__PURE__ */ jsx65(ChevronDown, { className: "h-4 w-4" })
|
|
2771
2431
|
]
|
|
2772
2432
|
}
|
|
2773
2433
|
),
|
|
2774
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ jsx65(_Popover, { children: /* @__PURE__ */ jsx65(_ListBox, { items, children: props.children }) })
|
|
2775
2435
|
] });
|
|
2776
2436
|
}
|
|
2777
2437
|
);
|
|
2778
2438
|
_Select.Option = _ListBox.Item;
|
|
2779
2439
|
_Select.Section = _ListBox.Section;
|
|
2780
2440
|
|
|
2441
|
+
// src/Scrollable/Scrollable.tsx
|
|
2442
|
+
import { cn as cn36, createVar as createVar9, width as twWidth2 } from "@marigold/system";
|
|
2443
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2444
|
+
var Scrollable = ({
|
|
2445
|
+
children,
|
|
2446
|
+
width = "full",
|
|
2447
|
+
height,
|
|
2448
|
+
...props
|
|
2449
|
+
}) => /* @__PURE__ */ jsx66(
|
|
2450
|
+
"div",
|
|
2451
|
+
{
|
|
2452
|
+
...props,
|
|
2453
|
+
className: cn36(["sticky h-[--height] overflow-auto", twWidth2[width]]),
|
|
2454
|
+
style: createVar9({ height }),
|
|
2455
|
+
children
|
|
2456
|
+
}
|
|
2457
|
+
);
|
|
2458
|
+
|
|
2781
2459
|
// src/Slider/Slider.tsx
|
|
2782
|
-
import { forwardRef as
|
|
2460
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
2783
2461
|
import {
|
|
2784
2462
|
Slider,
|
|
2785
2463
|
SliderOutput,
|
|
@@ -2787,12 +2465,12 @@ import {
|
|
|
2787
2465
|
SliderTrack
|
|
2788
2466
|
} from "react-aria-components";
|
|
2789
2467
|
import {
|
|
2790
|
-
cn as
|
|
2468
|
+
cn as cn37,
|
|
2791
2469
|
width as twWidth3,
|
|
2792
|
-
useClassNames as
|
|
2470
|
+
useClassNames as useClassNames39
|
|
2793
2471
|
} from "@marigold/system";
|
|
2794
|
-
import { jsx as
|
|
2795
|
-
var _Slider =
|
|
2472
|
+
import { jsx as jsx67, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2473
|
+
var _Slider = forwardRef18(
|
|
2796
2474
|
({
|
|
2797
2475
|
thumbLabels,
|
|
2798
2476
|
variant,
|
|
@@ -2801,7 +2479,7 @@ var _Slider = forwardRef19(
|
|
|
2801
2479
|
disabled,
|
|
2802
2480
|
...rest
|
|
2803
2481
|
}, ref) => {
|
|
2804
|
-
const classNames2 =
|
|
2482
|
+
const classNames2 = useClassNames39({
|
|
2805
2483
|
component: "Slider",
|
|
2806
2484
|
variant,
|
|
2807
2485
|
size
|
|
@@ -2810,10 +2488,10 @@ var _Slider = forwardRef19(
|
|
|
2810
2488
|
isDisabled: disabled,
|
|
2811
2489
|
...rest
|
|
2812
2490
|
};
|
|
2813
|
-
return /* @__PURE__ */
|
|
2491
|
+
return /* @__PURE__ */ jsxs27(
|
|
2814
2492
|
Slider,
|
|
2815
2493
|
{
|
|
2816
|
-
className:
|
|
2494
|
+
className: cn37(
|
|
2817
2495
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
2818
2496
|
classNames2.container,
|
|
2819
2497
|
twWidth3[width]
|
|
@@ -2821,16 +2499,16 @@ var _Slider = forwardRef19(
|
|
|
2821
2499
|
ref,
|
|
2822
2500
|
...props,
|
|
2823
2501
|
children: [
|
|
2824
|
-
/* @__PURE__ */
|
|
2825
|
-
/* @__PURE__ */
|
|
2826
|
-
/* @__PURE__ */
|
|
2502
|
+
/* @__PURE__ */ jsx67(_Label, { children: props.children }),
|
|
2503
|
+
/* @__PURE__ */ jsx67(SliderOutput, { className: cn37("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
2504
|
+
/* @__PURE__ */ jsx67(
|
|
2827
2505
|
SliderTrack,
|
|
2828
2506
|
{
|
|
2829
|
-
className:
|
|
2830
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */
|
|
2507
|
+
className: cn37("relative col-span-2 h-2 w-full", classNames2.track),
|
|
2508
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx67(
|
|
2831
2509
|
SliderThumb,
|
|
2832
2510
|
{
|
|
2833
|
-
className:
|
|
2511
|
+
className: cn37("top-1/2 cursor-pointer", classNames2.thumb),
|
|
2834
2512
|
index: i,
|
|
2835
2513
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
2836
2514
|
},
|
|
@@ -2845,16 +2523,16 @@ var _Slider = forwardRef19(
|
|
|
2845
2523
|
);
|
|
2846
2524
|
|
|
2847
2525
|
// src/Split/Split.tsx
|
|
2848
|
-
import { jsx as
|
|
2849
|
-
var Split = (props) => /* @__PURE__ */
|
|
2526
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
2527
|
+
var Split = (props) => /* @__PURE__ */ jsx68("div", { ...props, role: "separator", className: "grow" });
|
|
2850
2528
|
|
|
2851
2529
|
// src/Stack/Stack.tsx
|
|
2852
2530
|
import {
|
|
2853
2531
|
alignment as alignment3,
|
|
2854
|
-
cn as
|
|
2532
|
+
cn as cn38,
|
|
2855
2533
|
gapSpace as gapSpace6
|
|
2856
2534
|
} from "@marigold/system";
|
|
2857
|
-
import { jsx as
|
|
2535
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2858
2536
|
var Stack = ({
|
|
2859
2537
|
children,
|
|
2860
2538
|
space = 0,
|
|
@@ -2865,10 +2543,10 @@ var Stack = ({
|
|
|
2865
2543
|
...props
|
|
2866
2544
|
}) => {
|
|
2867
2545
|
var _a, _b, _c, _d;
|
|
2868
|
-
return /* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ jsx69(
|
|
2869
2547
|
"div",
|
|
2870
2548
|
{
|
|
2871
|
-
className:
|
|
2549
|
+
className: cn38(
|
|
2872
2550
|
"flex flex-col",
|
|
2873
2551
|
gapSpace6[space],
|
|
2874
2552
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -2882,15 +2560,15 @@ var Stack = ({
|
|
|
2882
2560
|
};
|
|
2883
2561
|
|
|
2884
2562
|
// src/Switch/Switch.tsx
|
|
2885
|
-
import { forwardRef as
|
|
2563
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
2886
2564
|
import { Switch } from "react-aria-components";
|
|
2887
2565
|
import {
|
|
2888
|
-
cn as
|
|
2566
|
+
cn as cn39,
|
|
2889
2567
|
width as twWidth4,
|
|
2890
|
-
useClassNames as
|
|
2568
|
+
useClassNames as useClassNames40
|
|
2891
2569
|
} from "@marigold/system";
|
|
2892
|
-
import { jsx as
|
|
2893
|
-
var _Switch =
|
|
2570
|
+
import { jsx as jsx70, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2571
|
+
var _Switch = forwardRef19(
|
|
2894
2572
|
({
|
|
2895
2573
|
variant,
|
|
2896
2574
|
size,
|
|
@@ -2901,37 +2579,37 @@ var _Switch = forwardRef20(
|
|
|
2901
2579
|
readOnly,
|
|
2902
2580
|
...rest
|
|
2903
2581
|
}, ref) => {
|
|
2904
|
-
const classNames2 =
|
|
2582
|
+
const classNames2 = useClassNames40({ component: "Switch", size, variant });
|
|
2905
2583
|
const props = {
|
|
2906
2584
|
isDisabled: disabled,
|
|
2907
2585
|
isReadOnly: readOnly,
|
|
2908
2586
|
isSelected: selected,
|
|
2909
2587
|
...rest
|
|
2910
2588
|
};
|
|
2911
|
-
return /* @__PURE__ */
|
|
2589
|
+
return /* @__PURE__ */ jsxs28(
|
|
2912
2590
|
Switch,
|
|
2913
2591
|
{
|
|
2914
2592
|
...props,
|
|
2915
2593
|
ref,
|
|
2916
|
-
className:
|
|
2594
|
+
className: cn39(
|
|
2917
2595
|
twWidth4[width],
|
|
2918
2596
|
"group/switch",
|
|
2919
2597
|
"flex items-center justify-between gap-[1ch]",
|
|
2920
2598
|
classNames2.container
|
|
2921
2599
|
),
|
|
2922
2600
|
children: [
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ jsx70(_Label, { elementType: "span", children }),
|
|
2602
|
+
/* @__PURE__ */ jsx70("div", { className: "relative", children: /* @__PURE__ */ jsx70(
|
|
2925
2603
|
"div",
|
|
2926
2604
|
{
|
|
2927
|
-
className:
|
|
2605
|
+
className: cn39(
|
|
2928
2606
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
|
|
2929
2607
|
classNames2.track
|
|
2930
2608
|
),
|
|
2931
|
-
children: /* @__PURE__ */
|
|
2609
|
+
children: /* @__PURE__ */ jsx70(
|
|
2932
2610
|
"div",
|
|
2933
2611
|
{
|
|
2934
|
-
className:
|
|
2612
|
+
className: cn39(
|
|
2935
2613
|
"h-[22px] w-[22px]",
|
|
2936
2614
|
"cubic-bezier(.7,0,.3,1)",
|
|
2937
2615
|
"absolute left-0 top-px",
|
|
@@ -2950,7 +2628,7 @@ var _Switch = forwardRef20(
|
|
|
2950
2628
|
);
|
|
2951
2629
|
|
|
2952
2630
|
// src/Table/Table.tsx
|
|
2953
|
-
import { useRef as
|
|
2631
|
+
import { useRef as useRef10 } from "react";
|
|
2954
2632
|
import { useTable } from "@react-aria/table";
|
|
2955
2633
|
import {
|
|
2956
2634
|
TableBody as Body2,
|
|
@@ -2960,30 +2638,30 @@ import {
|
|
|
2960
2638
|
Row,
|
|
2961
2639
|
useTableState
|
|
2962
2640
|
} from "@react-stately/table";
|
|
2963
|
-
import { cn as
|
|
2641
|
+
import { cn as cn45, useClassNames as useClassNames42 } from "@marigold/system";
|
|
2964
2642
|
|
|
2965
2643
|
// src/Table/Context.tsx
|
|
2966
|
-
import { createContext as
|
|
2967
|
-
var TableContext =
|
|
2968
|
-
var useTableContext = () =>
|
|
2644
|
+
import { createContext as createContext6, useContext as useContext11 } from "react";
|
|
2645
|
+
var TableContext = createContext6({});
|
|
2646
|
+
var useTableContext = () => useContext11(TableContext);
|
|
2969
2647
|
|
|
2970
2648
|
// src/Table/TableBody.tsx
|
|
2971
2649
|
import { useTableRowGroup } from "@react-aria/table";
|
|
2972
|
-
import { jsx as
|
|
2650
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
2973
2651
|
var TableBody = ({ children }) => {
|
|
2974
2652
|
const { rowGroupProps } = useTableRowGroup();
|
|
2975
|
-
return /* @__PURE__ */
|
|
2653
|
+
return /* @__PURE__ */ jsx71("tbody", { ...rowGroupProps, children });
|
|
2976
2654
|
};
|
|
2977
2655
|
|
|
2978
2656
|
// src/Table/TableCell.tsx
|
|
2979
|
-
import { useRef as
|
|
2980
|
-
import { useFocusRing as
|
|
2657
|
+
import { useRef as useRef4 } from "react";
|
|
2658
|
+
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
2981
2659
|
import { useTableCell } from "@react-aria/table";
|
|
2982
|
-
import { mergeProps as
|
|
2983
|
-
import { useStateProps as
|
|
2984
|
-
import { jsx as
|
|
2985
|
-
var TableCell = ({ cell }) => {
|
|
2986
|
-
const ref =
|
|
2660
|
+
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
2661
|
+
import { cn as cn40, useStateProps as useStateProps2 } from "@marigold/system";
|
|
2662
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2663
|
+
var TableCell = ({ cell, align = "left" }) => {
|
|
2664
|
+
const ref = useRef4(null);
|
|
2987
2665
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
2988
2666
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
2989
2667
|
const { gridCellProps } = useTableCell(
|
|
@@ -3002,26 +2680,27 @@ var TableCell = ({ cell }) => {
|
|
|
3002
2680
|
onMouseDown: (e) => e.stopPropagation(),
|
|
3003
2681
|
onPointerDown: (e) => e.stopPropagation()
|
|
3004
2682
|
};
|
|
3005
|
-
const { focusProps, isFocusVisible } =
|
|
3006
|
-
const stateProps =
|
|
3007
|
-
return /* @__PURE__ */
|
|
2683
|
+
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
2684
|
+
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
2685
|
+
return /* @__PURE__ */ jsx72(
|
|
3008
2686
|
"td",
|
|
3009
2687
|
{
|
|
3010
2688
|
ref,
|
|
3011
|
-
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
3012
|
-
...
|
|
2689
|
+
className: cn40(classNames2 == null ? void 0 : classNames2.cell),
|
|
2690
|
+
...mergeProps3(cellProps, focusProps),
|
|
3013
2691
|
...stateProps,
|
|
2692
|
+
align,
|
|
3014
2693
|
children: cell.rendered
|
|
3015
2694
|
}
|
|
3016
2695
|
);
|
|
3017
2696
|
};
|
|
3018
2697
|
|
|
3019
2698
|
// src/Table/TableCheckboxCell.tsx
|
|
3020
|
-
import { useRef as
|
|
3021
|
-
import { useFocusRing as
|
|
2699
|
+
import { useRef as useRef5 } from "react";
|
|
2700
|
+
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
3022
2701
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
3023
|
-
import { mergeProps as
|
|
3024
|
-
import { cn as
|
|
2702
|
+
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
2703
|
+
import { cn as cn41, useStateProps as useStateProps3 } from "@marigold/system";
|
|
3025
2704
|
|
|
3026
2705
|
// src/Table/utils.ts
|
|
3027
2706
|
var mapCheckboxProps = ({
|
|
@@ -3044,9 +2723,9 @@ var mapCheckboxProps = ({
|
|
|
3044
2723
|
};
|
|
3045
2724
|
|
|
3046
2725
|
// src/Table/TableCheckboxCell.tsx
|
|
3047
|
-
import { jsx as
|
|
2726
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3048
2727
|
var TableCheckboxCell = ({ cell }) => {
|
|
3049
|
-
const ref =
|
|
2728
|
+
const ref = useRef5(null);
|
|
3050
2729
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3051
2730
|
const disabled = state.disabledKeys.has(cell.parentKey);
|
|
3052
2731
|
const { gridCellProps } = useTableCell2(
|
|
@@ -3059,36 +2738,37 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3059
2738
|
const { checkboxProps } = mapCheckboxProps(
|
|
3060
2739
|
useTableSelectionCheckbox({ key: cell.parentKey }, state)
|
|
3061
2740
|
);
|
|
3062
|
-
const { focusProps, isFocusVisible } =
|
|
3063
|
-
const stateProps =
|
|
3064
|
-
return /* @__PURE__ */
|
|
2741
|
+
const { focusProps, isFocusVisible } = useFocusRing3();
|
|
2742
|
+
const stateProps = useStateProps3({ disabled, focusVisible: isFocusVisible });
|
|
2743
|
+
return /* @__PURE__ */ jsx73(
|
|
3065
2744
|
"td",
|
|
3066
2745
|
{
|
|
3067
2746
|
ref,
|
|
3068
|
-
className:
|
|
3069
|
-
...
|
|
2747
|
+
className: cn41("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
2748
|
+
...mergeProps4(gridCellProps, focusProps),
|
|
3070
2749
|
...stateProps,
|
|
3071
|
-
children: /* @__PURE__ */
|
|
2750
|
+
children: /* @__PURE__ */ jsx73(_Checkbox, { ...checkboxProps })
|
|
3072
2751
|
}
|
|
3073
2752
|
);
|
|
3074
2753
|
};
|
|
3075
2754
|
|
|
3076
2755
|
// src/Table/TableColumnHeader.tsx
|
|
3077
|
-
import { useRef as
|
|
3078
|
-
import { useFocusRing as
|
|
3079
|
-
import { useHover
|
|
2756
|
+
import { useRef as useRef6 } from "react";
|
|
2757
|
+
import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
|
|
2758
|
+
import { useHover } from "@react-aria/interactions";
|
|
3080
2759
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3081
|
-
import { mergeProps as
|
|
2760
|
+
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
3082
2761
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
3083
|
-
import { cn as
|
|
2762
|
+
import { cn as cn42, useStateProps as useStateProps4 } from "@marigold/system";
|
|
3084
2763
|
import { width as twWidth5 } from "@marigold/system";
|
|
3085
|
-
import { jsx as
|
|
2764
|
+
import { jsx as jsx74, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3086
2765
|
var TableColumnHeader = ({
|
|
3087
2766
|
column,
|
|
3088
|
-
width = "auto"
|
|
2767
|
+
width = "auto",
|
|
2768
|
+
align = "left"
|
|
3089
2769
|
}) => {
|
|
3090
2770
|
var _a, _b;
|
|
3091
|
-
const ref =
|
|
2771
|
+
const ref = useRef6(null);
|
|
3092
2772
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3093
2773
|
const { columnHeaderProps } = useTableColumnHeader(
|
|
3094
2774
|
{
|
|
@@ -3097,23 +2777,24 @@ var TableColumnHeader = ({
|
|
|
3097
2777
|
state,
|
|
3098
2778
|
ref
|
|
3099
2779
|
);
|
|
3100
|
-
const { hoverProps, isHovered } =
|
|
3101
|
-
const { focusProps, isFocusVisible } =
|
|
3102
|
-
const stateProps =
|
|
2780
|
+
const { hoverProps, isHovered } = useHover({});
|
|
2781
|
+
const { focusProps, isFocusVisible } = useFocusRing4();
|
|
2782
|
+
const stateProps = useStateProps4({
|
|
3103
2783
|
hover: isHovered,
|
|
3104
2784
|
focusVisible: isFocusVisible
|
|
3105
2785
|
});
|
|
3106
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsxs29(
|
|
3107
2787
|
"th",
|
|
3108
2788
|
{
|
|
3109
2789
|
colSpan: column.colspan,
|
|
3110
2790
|
ref,
|
|
3111
|
-
className:
|
|
3112
|
-
...
|
|
2791
|
+
className: cn42("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
2792
|
+
...mergeProps5(columnHeaderProps, hoverProps, focusProps),
|
|
3113
2793
|
...stateProps,
|
|
2794
|
+
align,
|
|
3114
2795
|
children: [
|
|
3115
2796
|
column.rendered,
|
|
3116
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
2797
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx74(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx74(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx74(SortDown, { className: "inline-block" }))
|
|
3117
2798
|
]
|
|
3118
2799
|
}
|
|
3119
2800
|
);
|
|
@@ -3121,36 +2802,43 @@ var TableColumnHeader = ({
|
|
|
3121
2802
|
|
|
3122
2803
|
// src/Table/TableHeader.tsx
|
|
3123
2804
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
3124
|
-
import { jsx as
|
|
3125
|
-
var TableHeader = ({ children }) => {
|
|
2805
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2806
|
+
var TableHeader = ({ stickyHeader, children }) => {
|
|
3126
2807
|
const { rowGroupProps } = useTableRowGroup2();
|
|
3127
|
-
return /* @__PURE__ */
|
|
2808
|
+
return /* @__PURE__ */ jsx75(
|
|
2809
|
+
"thead",
|
|
2810
|
+
{
|
|
2811
|
+
...rowGroupProps,
|
|
2812
|
+
className: stickyHeader ? "[&_th]:sticky [&_th]:top-0" : "",
|
|
2813
|
+
children
|
|
2814
|
+
}
|
|
2815
|
+
);
|
|
3128
2816
|
};
|
|
3129
2817
|
|
|
3130
2818
|
// src/Table/TableHeaderRow.tsx
|
|
3131
|
-
import { useRef as
|
|
2819
|
+
import { useRef as useRef7 } from "react";
|
|
3132
2820
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3133
|
-
import { jsx as
|
|
2821
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
3134
2822
|
var TableHeaderRow = ({ item, children }) => {
|
|
3135
2823
|
const { state } = useTableContext();
|
|
3136
|
-
const ref =
|
|
2824
|
+
const ref = useRef7(null);
|
|
3137
2825
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3138
|
-
return /* @__PURE__ */
|
|
2826
|
+
return /* @__PURE__ */ jsx76("tr", { ...rowProps, ref, children });
|
|
3139
2827
|
};
|
|
3140
2828
|
|
|
3141
2829
|
// src/Table/TableRow.tsx
|
|
3142
|
-
import { useRef as
|
|
3143
|
-
import { useFocusRing as
|
|
3144
|
-
import { useHover as
|
|
2830
|
+
import { useRef as useRef8 } from "react";
|
|
2831
|
+
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
2832
|
+
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
3145
2833
|
import { useTableRow } from "@react-aria/table";
|
|
3146
|
-
import { mergeProps as
|
|
3147
|
-
import { cn as
|
|
3148
|
-
import { jsx as
|
|
2834
|
+
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
2835
|
+
import { cn as cn43, useClassNames as useClassNames41, useStateProps as useStateProps5 } from "@marigold/system";
|
|
2836
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
3149
2837
|
var TableRow = ({ children, row }) => {
|
|
3150
|
-
const ref =
|
|
2838
|
+
const ref = useRef8(null);
|
|
3151
2839
|
const { interactive, state, ...ctx } = useTableContext();
|
|
3152
2840
|
const { variant, size } = row.props;
|
|
3153
|
-
const classNames2 =
|
|
2841
|
+
const classNames2 = useClassNames41({
|
|
3154
2842
|
component: "Table",
|
|
3155
2843
|
variant: variant || ctx.variant,
|
|
3156
2844
|
size: size || ctx.size
|
|
@@ -3164,28 +2852,28 @@ var TableRow = ({ children, row }) => {
|
|
|
3164
2852
|
);
|
|
3165
2853
|
const disabled = state.disabledKeys.has(row.key);
|
|
3166
2854
|
const selected = state.selectionManager.isSelected(row.key);
|
|
3167
|
-
const { focusProps, isFocusVisible } =
|
|
3168
|
-
const { hoverProps, isHovered } =
|
|
2855
|
+
const { focusProps, isFocusVisible } = useFocusRing5({ within: true });
|
|
2856
|
+
const { hoverProps, isHovered } = useHover2({
|
|
3169
2857
|
isDisabled: disabled || !interactive
|
|
3170
2858
|
});
|
|
3171
|
-
const stateProps =
|
|
2859
|
+
const stateProps = useStateProps5({
|
|
3172
2860
|
disabled,
|
|
3173
2861
|
selected,
|
|
3174
2862
|
hover: isHovered,
|
|
3175
2863
|
focusVisible: isFocusVisible,
|
|
3176
2864
|
active: isPressed
|
|
3177
2865
|
});
|
|
3178
|
-
return /* @__PURE__ */
|
|
2866
|
+
return /* @__PURE__ */ jsx77(
|
|
3179
2867
|
"tr",
|
|
3180
2868
|
{
|
|
3181
2869
|
ref,
|
|
3182
|
-
className:
|
|
2870
|
+
className: cn43(
|
|
3183
2871
|
[
|
|
3184
2872
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
3185
2873
|
],
|
|
3186
2874
|
classNames2 == null ? void 0 : classNames2.row
|
|
3187
2875
|
),
|
|
3188
|
-
...
|
|
2876
|
+
...mergeProps6(rowProps, focusProps, hoverProps),
|
|
3189
2877
|
...stateProps,
|
|
3190
2878
|
children
|
|
3191
2879
|
}
|
|
@@ -3193,25 +2881,26 @@ var TableRow = ({ children, row }) => {
|
|
|
3193
2881
|
};
|
|
3194
2882
|
|
|
3195
2883
|
// src/Table/TableSelectAllCell.tsx
|
|
3196
|
-
import { useRef as
|
|
3197
|
-
import { useFocusRing as
|
|
3198
|
-
import { useHover as
|
|
2884
|
+
import { useRef as useRef9 } from "react";
|
|
2885
|
+
import { useFocusRing as useFocusRing6 } from "@react-aria/focus";
|
|
2886
|
+
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
3199
2887
|
import {
|
|
3200
2888
|
useTableColumnHeader as useTableColumnHeader2,
|
|
3201
2889
|
useTableSelectAllCheckbox
|
|
3202
2890
|
} from "@react-aria/table";
|
|
3203
|
-
import { mergeProps as
|
|
2891
|
+
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
3204
2892
|
import {
|
|
3205
|
-
cn as
|
|
2893
|
+
cn as cn44,
|
|
3206
2894
|
width as twWidth6,
|
|
3207
|
-
useStateProps as
|
|
2895
|
+
useStateProps as useStateProps6
|
|
3208
2896
|
} from "@marigold/system";
|
|
3209
|
-
import { jsx as
|
|
2897
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
3210
2898
|
var TableSelectAllCell = ({
|
|
3211
2899
|
column,
|
|
3212
|
-
width = "auto"
|
|
2900
|
+
width = "auto",
|
|
2901
|
+
align = "left"
|
|
3213
2902
|
}) => {
|
|
3214
|
-
const ref =
|
|
2903
|
+
const ref = useRef9(null);
|
|
3215
2904
|
const { state, classNames: classNames2 } = useTableContext();
|
|
3216
2905
|
const { columnHeaderProps } = useTableColumnHeader2(
|
|
3217
2906
|
{
|
|
@@ -3221,39 +2910,37 @@ var TableSelectAllCell = ({
|
|
|
3221
2910
|
ref
|
|
3222
2911
|
);
|
|
3223
2912
|
const { checkboxProps } = mapCheckboxProps(useTableSelectAllCheckbox(state));
|
|
3224
|
-
const { hoverProps, isHovered } =
|
|
3225
|
-
const { focusProps, isFocusVisible } =
|
|
3226
|
-
const stateProps =
|
|
2913
|
+
const { hoverProps, isHovered } = useHover3({});
|
|
2914
|
+
const { focusProps, isFocusVisible } = useFocusRing6();
|
|
2915
|
+
const stateProps = useStateProps6({
|
|
3227
2916
|
hover: isHovered,
|
|
3228
2917
|
focusVisible: isFocusVisible
|
|
3229
2918
|
});
|
|
3230
|
-
return /* @__PURE__ */
|
|
2919
|
+
return /* @__PURE__ */ jsx78(
|
|
3231
2920
|
"th",
|
|
3232
2921
|
{
|
|
3233
2922
|
ref,
|
|
3234
|
-
className:
|
|
3235
|
-
|
|
3236
|
-
["text-center align-middle leading-none"],
|
|
3237
|
-
classNames2 == null ? void 0 : classNames2.header
|
|
3238
|
-
),
|
|
3239
|
-
...mergeProps10(columnHeaderProps, hoverProps, focusProps),
|
|
2923
|
+
className: cn44(twWidth6[width], [" leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
2924
|
+
...mergeProps7(columnHeaderProps, hoverProps, focusProps),
|
|
3240
2925
|
...stateProps,
|
|
3241
|
-
|
|
2926
|
+
align,
|
|
2927
|
+
children: /* @__PURE__ */ jsx78(_Checkbox, { ...checkboxProps })
|
|
3242
2928
|
}
|
|
3243
2929
|
);
|
|
3244
2930
|
};
|
|
3245
2931
|
|
|
3246
2932
|
// src/Table/Table.tsx
|
|
3247
|
-
import { jsx as
|
|
2933
|
+
import { jsx as jsx79, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3248
2934
|
var Table = ({
|
|
3249
2935
|
variant,
|
|
3250
2936
|
size,
|
|
3251
2937
|
stretch,
|
|
3252
2938
|
selectionMode = "none",
|
|
2939
|
+
stickyHeader,
|
|
3253
2940
|
...props
|
|
3254
2941
|
}) => {
|
|
3255
2942
|
const interactive = selectionMode !== "none";
|
|
3256
|
-
const tableRef =
|
|
2943
|
+
const tableRef = useRef10(null);
|
|
3257
2944
|
const state = useTableState({
|
|
3258
2945
|
...props,
|
|
3259
2946
|
selectionMode,
|
|
@@ -3261,56 +2948,64 @@ var Table = ({
|
|
|
3261
2948
|
props.selectionBehavior !== "replace"
|
|
3262
2949
|
});
|
|
3263
2950
|
const { gridProps } = useTable(props, state, tableRef);
|
|
3264
|
-
const classNames2 =
|
|
2951
|
+
const classNames2 = useClassNames42({
|
|
3265
2952
|
component: "Table",
|
|
3266
2953
|
variant,
|
|
3267
2954
|
size
|
|
3268
2955
|
});
|
|
3269
2956
|
const { collection } = state;
|
|
3270
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx79(
|
|
3271
2958
|
TableContext.Provider,
|
|
3272
2959
|
{
|
|
3273
2960
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
3274
|
-
children: /* @__PURE__ */
|
|
2961
|
+
children: /* @__PURE__ */ jsxs30(
|
|
3275
2962
|
"table",
|
|
3276
2963
|
{
|
|
3277
2964
|
ref: tableRef,
|
|
3278
|
-
className:
|
|
2965
|
+
className: cn45(
|
|
3279
2966
|
"group/table",
|
|
3280
|
-
"border-collapse
|
|
2967
|
+
"border-collapse whitespace-nowrap",
|
|
3281
2968
|
stretch ? "table w-full" : "block",
|
|
3282
2969
|
classNames2.table
|
|
3283
2970
|
),
|
|
3284
2971
|
...gridProps,
|
|
3285
2972
|
children: [
|
|
3286
|
-
/* @__PURE__ */
|
|
2973
|
+
/* @__PURE__ */ jsx79(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx79(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3287
2974
|
(column) => {
|
|
3288
|
-
var _a, _b, _c;
|
|
3289
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
2975
|
+
var _a, _b, _c, _d, _e;
|
|
2976
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx79(
|
|
3290
2977
|
TableSelectAllCell,
|
|
3291
2978
|
{
|
|
3292
2979
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3293
|
-
column
|
|
2980
|
+
column,
|
|
2981
|
+
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3294
2982
|
},
|
|
3295
2983
|
column.key
|
|
3296
|
-
) : /* @__PURE__ */
|
|
2984
|
+
) : /* @__PURE__ */ jsx79(
|
|
3297
2985
|
TableColumnHeader,
|
|
3298
2986
|
{
|
|
3299
|
-
width: (
|
|
3300
|
-
column
|
|
2987
|
+
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
2988
|
+
column,
|
|
2989
|
+
align: (_e = column.props) == null ? void 0 : _e.align
|
|
3301
2990
|
},
|
|
3302
2991
|
column.key
|
|
3303
2992
|
);
|
|
3304
2993
|
}
|
|
3305
2994
|
) }, headerRow.key)) }),
|
|
3306
|
-
/* @__PURE__ */
|
|
2995
|
+
/* @__PURE__ */ jsxs30(TableBody, { children: [
|
|
3307
2996
|
...collection.rows.map(
|
|
3308
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
2997
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx79(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
2998
|
+
var _a, _b;
|
|
2999
|
+
const currentColumn = collection.columns[index];
|
|
3000
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx79(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx79(
|
|
3001
|
+
TableCell,
|
|
3002
|
+
{
|
|
3003
|
+
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
3004
|
+
cell
|
|
3005
|
+
},
|
|
3006
|
+
cell.key
|
|
3007
|
+
);
|
|
3008
|
+
}) }, row.key)
|
|
3314
3009
|
)
|
|
3315
3010
|
] })
|
|
3316
3011
|
]
|
|
@@ -3327,18 +3022,18 @@ Table.Row = Row;
|
|
|
3327
3022
|
|
|
3328
3023
|
// src/Text/Text.tsx
|
|
3329
3024
|
import {
|
|
3330
|
-
cn as
|
|
3331
|
-
createVar as
|
|
3025
|
+
cn as cn46,
|
|
3026
|
+
createVar as createVar10,
|
|
3332
3027
|
cursorStyle,
|
|
3333
3028
|
fontWeight,
|
|
3334
3029
|
get as get2,
|
|
3335
3030
|
textAlign as textAlign2,
|
|
3336
3031
|
textSize,
|
|
3337
3032
|
textStyle,
|
|
3338
|
-
useClassNames as
|
|
3339
|
-
useTheme as
|
|
3033
|
+
useClassNames as useClassNames43,
|
|
3034
|
+
useTheme as useTheme4
|
|
3340
3035
|
} from "@marigold/system";
|
|
3341
|
-
import { jsx as
|
|
3036
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
3342
3037
|
var Text2 = ({
|
|
3343
3038
|
variant,
|
|
3344
3039
|
size,
|
|
@@ -3351,17 +3046,17 @@ var Text2 = ({
|
|
|
3351
3046
|
children,
|
|
3352
3047
|
...props
|
|
3353
3048
|
}) => {
|
|
3354
|
-
const theme =
|
|
3355
|
-
const classNames2 =
|
|
3049
|
+
const theme = useTheme4();
|
|
3050
|
+
const classNames2 = useClassNames43({
|
|
3356
3051
|
component: "Text",
|
|
3357
3052
|
variant,
|
|
3358
3053
|
size
|
|
3359
3054
|
});
|
|
3360
|
-
return /* @__PURE__ */
|
|
3055
|
+
return /* @__PURE__ */ jsx80(
|
|
3361
3056
|
"p",
|
|
3362
3057
|
{
|
|
3363
3058
|
...props,
|
|
3364
|
-
className:
|
|
3059
|
+
className: cn46(
|
|
3365
3060
|
classNames2,
|
|
3366
3061
|
"text-[--color] outline-[--outline]",
|
|
3367
3062
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3370,7 +3065,7 @@ var Text2 = ({
|
|
|
3370
3065
|
weight && fontWeight[weight],
|
|
3371
3066
|
fontSize && textSize[fontSize]
|
|
3372
3067
|
),
|
|
3373
|
-
style:
|
|
3068
|
+
style: createVar10({
|
|
3374
3069
|
color: color && theme.colors && get2(
|
|
3375
3070
|
theme.colors,
|
|
3376
3071
|
color.replace("-", "."),
|
|
@@ -3384,11 +3079,11 @@ var Text2 = ({
|
|
|
3384
3079
|
};
|
|
3385
3080
|
|
|
3386
3081
|
// src/TextArea/TextArea.tsx
|
|
3387
|
-
import { forwardRef as
|
|
3082
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
3388
3083
|
import { TextArea, TextField } from "react-aria-components";
|
|
3389
|
-
import { useClassNames as
|
|
3390
|
-
import { jsx as
|
|
3391
|
-
var _TextArea =
|
|
3084
|
+
import { useClassNames as useClassNames44 } from "@marigold/system";
|
|
3085
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3086
|
+
var _TextArea = forwardRef20(
|
|
3392
3087
|
({
|
|
3393
3088
|
variant,
|
|
3394
3089
|
size,
|
|
@@ -3399,7 +3094,7 @@ var _TextArea = forwardRef21(
|
|
|
3399
3094
|
rows,
|
|
3400
3095
|
...rest
|
|
3401
3096
|
}, ref) => {
|
|
3402
|
-
const classNames2 =
|
|
3097
|
+
const classNames2 = useClassNames44({ component: "TextArea", variant, size });
|
|
3403
3098
|
const props = {
|
|
3404
3099
|
isDisabled: disabled,
|
|
3405
3100
|
isReadOnly: readOnly,
|
|
@@ -3407,15 +3102,15 @@ var _TextArea = forwardRef21(
|
|
|
3407
3102
|
isRequired: required,
|
|
3408
3103
|
...rest
|
|
3409
3104
|
};
|
|
3410
|
-
return /* @__PURE__ */
|
|
3105
|
+
return /* @__PURE__ */ jsx81(FieldBase, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx81(TextArea, { className: classNames2, ref, rows }) });
|
|
3411
3106
|
}
|
|
3412
3107
|
);
|
|
3413
3108
|
|
|
3414
3109
|
// src/TextField/TextField.tsx
|
|
3415
|
-
import { forwardRef as
|
|
3110
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
3416
3111
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3417
|
-
import { jsx as
|
|
3418
|
-
var _TextField =
|
|
3112
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3113
|
+
var _TextField = forwardRef21(
|
|
3419
3114
|
({
|
|
3420
3115
|
variant,
|
|
3421
3116
|
size,
|
|
@@ -3432,13 +3127,13 @@ var _TextField = forwardRef22(
|
|
|
3432
3127
|
isRequired: required,
|
|
3433
3128
|
...rest
|
|
3434
3129
|
};
|
|
3435
|
-
return /* @__PURE__ */
|
|
3130
|
+
return /* @__PURE__ */ jsx82(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx82(_Input, { ref }) });
|
|
3436
3131
|
}
|
|
3437
3132
|
);
|
|
3438
3133
|
|
|
3439
3134
|
// src/Tiles/Tiles.tsx
|
|
3440
|
-
import { cn as
|
|
3441
|
-
import { jsx as
|
|
3135
|
+
import { cn as cn47, createVar as createVar11, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3136
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
3442
3137
|
var Tiles = ({
|
|
3443
3138
|
space = 0,
|
|
3444
3139
|
stretch = false,
|
|
@@ -3451,17 +3146,17 @@ var Tiles = ({
|
|
|
3451
3146
|
if (stretch) {
|
|
3452
3147
|
column = `minmax(${column}, 1fr)`;
|
|
3453
3148
|
}
|
|
3454
|
-
return /* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ jsx83(
|
|
3455
3150
|
"div",
|
|
3456
3151
|
{
|
|
3457
3152
|
...props,
|
|
3458
|
-
className:
|
|
3153
|
+
className: cn47(
|
|
3459
3154
|
"grid",
|
|
3460
3155
|
gapSpace7[space],
|
|
3461
3156
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3462
3157
|
equalHeight && "auto-rows-[1fr]"
|
|
3463
3158
|
),
|
|
3464
|
-
style:
|
|
3159
|
+
style: createVar11({ column, tilesWidth }),
|
|
3465
3160
|
children
|
|
3466
3161
|
}
|
|
3467
3162
|
);
|
|
@@ -3469,11 +3164,11 @@ var Tiles = ({
|
|
|
3469
3164
|
|
|
3470
3165
|
// src/Tooltip/Tooltip.tsx
|
|
3471
3166
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3472
|
-
import { cn as
|
|
3167
|
+
import { cn as cn48, useClassNames as useClassNames45 } from "@marigold/system";
|
|
3473
3168
|
|
|
3474
3169
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3475
3170
|
import { TooltipTrigger } from "react-aria-components";
|
|
3476
|
-
import { jsx as
|
|
3171
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3477
3172
|
var _TooltipTrigger = ({
|
|
3478
3173
|
delay = 1e3,
|
|
3479
3174
|
children,
|
|
@@ -3487,19 +3182,19 @@ var _TooltipTrigger = ({
|
|
|
3487
3182
|
isOpen: open,
|
|
3488
3183
|
delay
|
|
3489
3184
|
};
|
|
3490
|
-
return /* @__PURE__ */
|
|
3185
|
+
return /* @__PURE__ */ jsx84(TooltipTrigger, { ...props, children });
|
|
3491
3186
|
};
|
|
3492
3187
|
|
|
3493
3188
|
// src/Tooltip/Tooltip.tsx
|
|
3494
|
-
import { jsx as
|
|
3189
|
+
import { jsx as jsx85, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3495
3190
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3496
3191
|
const props = {
|
|
3497
3192
|
...rest,
|
|
3498
3193
|
isOpen: open
|
|
3499
3194
|
};
|
|
3500
|
-
const classNames2 =
|
|
3501
|
-
return /* @__PURE__ */
|
|
3502
|
-
/* @__PURE__ */
|
|
3195
|
+
const classNames2 = useClassNames45({ component: "Tooltip", variant, size });
|
|
3196
|
+
return /* @__PURE__ */ jsxs31(Tooltip, { ...props, className: cn48("group/tooltip", classNames2.container), children: [
|
|
3197
|
+
/* @__PURE__ */ jsx85(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx85("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx85("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3503
3198
|
children
|
|
3504
3199
|
] });
|
|
3505
3200
|
};
|
|
@@ -3507,12 +3202,12 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
3507
3202
|
|
|
3508
3203
|
// src/TagGroup/Tag.tsx
|
|
3509
3204
|
import { Button as Button5, Tag } from "react-aria-components";
|
|
3510
|
-
import { cn as
|
|
3205
|
+
import { cn as cn49, useClassNames as useClassNames47 } from "@marigold/system";
|
|
3511
3206
|
|
|
3512
3207
|
// src/TagGroup/TagGroup.tsx
|
|
3513
3208
|
import { TagGroup, TagList } from "react-aria-components";
|
|
3514
|
-
import { useClassNames as
|
|
3515
|
-
import { jsx as
|
|
3209
|
+
import { useClassNames as useClassNames46 } from "@marigold/system";
|
|
3210
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
3516
3211
|
var _TagGroup = ({
|
|
3517
3212
|
width,
|
|
3518
3213
|
items,
|
|
@@ -3521,24 +3216,24 @@ var _TagGroup = ({
|
|
|
3521
3216
|
size,
|
|
3522
3217
|
...rest
|
|
3523
3218
|
}) => {
|
|
3524
|
-
const classNames2 =
|
|
3525
|
-
return /* @__PURE__ */
|
|
3219
|
+
const classNames2 = useClassNames46({ component: "Tag", variant, size });
|
|
3220
|
+
return /* @__PURE__ */ jsx86(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx86(TagList, { items, className: classNames2.listItems, children }) });
|
|
3526
3221
|
};
|
|
3527
3222
|
|
|
3528
3223
|
// src/TagGroup/Tag.tsx
|
|
3529
|
-
import { Fragment as
|
|
3224
|
+
import { Fragment as Fragment8, jsx as jsx87, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3530
3225
|
var CloseButton2 = ({ className }) => {
|
|
3531
|
-
return /* @__PURE__ */
|
|
3226
|
+
return /* @__PURE__ */ jsx87(Button5, { slot: "remove", className, children: /* @__PURE__ */ jsx87("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx87("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
3532
3227
|
};
|
|
3533
3228
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
3534
3229
|
let textValue = typeof children === "string" ? children : void 0;
|
|
3535
|
-
const classNames2 =
|
|
3536
|
-
return /* @__PURE__ */
|
|
3230
|
+
const classNames2 = useClassNames47({ component: "Tag", variant, size });
|
|
3231
|
+
return /* @__PURE__ */ jsx87(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
3537
3232
|
children,
|
|
3538
|
-
allowsRemoving && /* @__PURE__ */
|
|
3233
|
+
allowsRemoving && /* @__PURE__ */ jsx87(
|
|
3539
3234
|
CloseButton2,
|
|
3540
3235
|
{
|
|
3541
|
-
className:
|
|
3236
|
+
className: cn49("flex items-center", classNames2.closeButton)
|
|
3542
3237
|
}
|
|
3543
3238
|
)
|
|
3544
3239
|
] }) });
|
|
@@ -3549,11 +3244,11 @@ _Tag.Group = _TagGroup;
|
|
|
3549
3244
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
3550
3245
|
|
|
3551
3246
|
// src/XLoader/XLoader.tsx
|
|
3552
|
-
import { forwardRef as
|
|
3553
|
-
import { SVG as
|
|
3554
|
-
import { jsx as
|
|
3555
|
-
var XLoader =
|
|
3556
|
-
|
|
3247
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
3248
|
+
import { SVG as SVG5 } from "@marigold/system";
|
|
3249
|
+
import { jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3250
|
+
var XLoader = forwardRef22((props, ref) => /* @__PURE__ */ jsxs33(
|
|
3251
|
+
SVG5,
|
|
3557
3252
|
{
|
|
3558
3253
|
id: "XLoader",
|
|
3559
3254
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3562,13 +3257,13 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3562
3257
|
...props,
|
|
3563
3258
|
...ref,
|
|
3564
3259
|
children: [
|
|
3565
|
-
/* @__PURE__ */
|
|
3566
|
-
/* @__PURE__ */
|
|
3260
|
+
/* @__PURE__ */ jsx88("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
3261
|
+
/* @__PURE__ */ jsx88(
|
|
3567
3262
|
"path",
|
|
3568
3263
|
{
|
|
3569
3264
|
id: "XMLID_5_",
|
|
3570
3265
|
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",
|
|
3571
|
-
children: /* @__PURE__ */
|
|
3266
|
+
children: /* @__PURE__ */ jsx88(
|
|
3572
3267
|
"animate",
|
|
3573
3268
|
{
|
|
3574
3269
|
attributeName: "opacity",
|
|
@@ -3581,12 +3276,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3581
3276
|
)
|
|
3582
3277
|
}
|
|
3583
3278
|
),
|
|
3584
|
-
/* @__PURE__ */
|
|
3279
|
+
/* @__PURE__ */ jsx88(
|
|
3585
3280
|
"path",
|
|
3586
3281
|
{
|
|
3587
3282
|
id: "XMLID_18_",
|
|
3588
3283
|
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",
|
|
3589
|
-
children: /* @__PURE__ */
|
|
3284
|
+
children: /* @__PURE__ */ jsx88(
|
|
3590
3285
|
"animate",
|
|
3591
3286
|
{
|
|
3592
3287
|
attributeName: "opacity",
|
|
@@ -3599,12 +3294,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3599
3294
|
)
|
|
3600
3295
|
}
|
|
3601
3296
|
),
|
|
3602
|
-
/* @__PURE__ */
|
|
3297
|
+
/* @__PURE__ */ jsx88(
|
|
3603
3298
|
"path",
|
|
3604
3299
|
{
|
|
3605
3300
|
id: "XMLID_19_",
|
|
3606
3301
|
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",
|
|
3607
|
-
children: /* @__PURE__ */
|
|
3302
|
+
children: /* @__PURE__ */ jsx88(
|
|
3608
3303
|
"animate",
|
|
3609
3304
|
{
|
|
3610
3305
|
attributeName: "opacity",
|
|
@@ -3617,12 +3312,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3617
3312
|
)
|
|
3618
3313
|
}
|
|
3619
3314
|
),
|
|
3620
|
-
/* @__PURE__ */
|
|
3315
|
+
/* @__PURE__ */ jsx88(
|
|
3621
3316
|
"path",
|
|
3622
3317
|
{
|
|
3623
3318
|
id: "XMLID_20_",
|
|
3624
3319
|
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",
|
|
3625
|
-
children: /* @__PURE__ */
|
|
3320
|
+
children: /* @__PURE__ */ jsx88(
|
|
3626
3321
|
"animate",
|
|
3627
3322
|
{
|
|
3628
3323
|
attributeName: "opacity",
|
|
@@ -3635,12 +3330,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3635
3330
|
)
|
|
3636
3331
|
}
|
|
3637
3332
|
),
|
|
3638
|
-
/* @__PURE__ */
|
|
3333
|
+
/* @__PURE__ */ jsx88(
|
|
3639
3334
|
"path",
|
|
3640
3335
|
{
|
|
3641
3336
|
id: "XMLID_21_",
|
|
3642
3337
|
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",
|
|
3643
|
-
children: /* @__PURE__ */
|
|
3338
|
+
children: /* @__PURE__ */ jsx88(
|
|
3644
3339
|
"animate",
|
|
3645
3340
|
{
|
|
3646
3341
|
attributeName: "opacity",
|
|
@@ -3653,12 +3348,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3653
3348
|
)
|
|
3654
3349
|
}
|
|
3655
3350
|
),
|
|
3656
|
-
/* @__PURE__ */
|
|
3351
|
+
/* @__PURE__ */ jsx88(
|
|
3657
3352
|
"path",
|
|
3658
3353
|
{
|
|
3659
3354
|
id: "XMLID_22_",
|
|
3660
3355
|
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",
|
|
3661
|
-
children: /* @__PURE__ */
|
|
3356
|
+
children: /* @__PURE__ */ jsx88(
|
|
3662
3357
|
"animate",
|
|
3663
3358
|
{
|
|
3664
3359
|
attributeName: "opacity",
|
|
@@ -3671,12 +3366,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3671
3366
|
)
|
|
3672
3367
|
}
|
|
3673
3368
|
),
|
|
3674
|
-
/* @__PURE__ */
|
|
3369
|
+
/* @__PURE__ */ jsx88(
|
|
3675
3370
|
"path",
|
|
3676
3371
|
{
|
|
3677
3372
|
id: "XMLID_23_",
|
|
3678
3373
|
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",
|
|
3679
|
-
children: /* @__PURE__ */
|
|
3374
|
+
children: /* @__PURE__ */ jsx88(
|
|
3680
3375
|
"animate",
|
|
3681
3376
|
{
|
|
3682
3377
|
attributeName: "opacity",
|
|
@@ -3689,12 +3384,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3689
3384
|
)
|
|
3690
3385
|
}
|
|
3691
3386
|
),
|
|
3692
|
-
/* @__PURE__ */
|
|
3387
|
+
/* @__PURE__ */ jsx88(
|
|
3693
3388
|
"path",
|
|
3694
3389
|
{
|
|
3695
3390
|
id: "XMLID_24_",
|
|
3696
3391
|
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",
|
|
3697
|
-
children: /* @__PURE__ */
|
|
3392
|
+
children: /* @__PURE__ */ jsx88(
|
|
3698
3393
|
"animate",
|
|
3699
3394
|
{
|
|
3700
3395
|
attributeName: "opacity",
|
|
@@ -3707,12 +3402,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3707
3402
|
)
|
|
3708
3403
|
}
|
|
3709
3404
|
),
|
|
3710
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ jsx88(
|
|
3711
3406
|
"path",
|
|
3712
3407
|
{
|
|
3713
3408
|
id: "XMLID_25_",
|
|
3714
3409
|
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",
|
|
3715
|
-
children: /* @__PURE__ */
|
|
3410
|
+
children: /* @__PURE__ */ jsx88(
|
|
3716
3411
|
"animate",
|
|
3717
3412
|
{
|
|
3718
3413
|
attributeName: "opacity",
|
|
@@ -3725,12 +3420,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3725
3420
|
)
|
|
3726
3421
|
}
|
|
3727
3422
|
),
|
|
3728
|
-
/* @__PURE__ */
|
|
3423
|
+
/* @__PURE__ */ jsx88(
|
|
3729
3424
|
"path",
|
|
3730
3425
|
{
|
|
3731
3426
|
id: "XMLID_26_",
|
|
3732
3427
|
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",
|
|
3733
|
-
children: /* @__PURE__ */
|
|
3428
|
+
children: /* @__PURE__ */ jsx88(
|
|
3734
3429
|
"animate",
|
|
3735
3430
|
{
|
|
3736
3431
|
attributeName: "opacity",
|
|
@@ -3743,12 +3438,12 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3743
3438
|
)
|
|
3744
3439
|
}
|
|
3745
3440
|
),
|
|
3746
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ jsx88(
|
|
3747
3442
|
"path",
|
|
3748
3443
|
{
|
|
3749
3444
|
id: "XMLID_27_",
|
|
3750
3445
|
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",
|
|
3751
|
-
children: /* @__PURE__ */
|
|
3446
|
+
children: /* @__PURE__ */ jsx88(
|
|
3752
3447
|
"animate",
|
|
3753
3448
|
{
|
|
3754
3449
|
attributeName: "opacity",
|
|
@@ -3767,24 +3462,24 @@ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
|
|
|
3767
3462
|
|
|
3768
3463
|
// src/Tabs/Tabs.tsx
|
|
3769
3464
|
import { Tabs } from "react-aria-components";
|
|
3770
|
-
import { useClassNames as
|
|
3465
|
+
import { useClassNames as useClassNames48 } from "@marigold/system";
|
|
3771
3466
|
|
|
3772
3467
|
// src/Tabs/Context.ts
|
|
3773
|
-
import { createContext as
|
|
3774
|
-
var TabContext =
|
|
3775
|
-
var useTabContext = () =>
|
|
3468
|
+
import { createContext as createContext7, useContext as useContext12 } from "react";
|
|
3469
|
+
var TabContext = createContext7({});
|
|
3470
|
+
var useTabContext = () => useContext12(TabContext);
|
|
3776
3471
|
|
|
3777
3472
|
// src/Tabs/Tab.tsx
|
|
3778
3473
|
import { Tab } from "react-aria-components";
|
|
3779
|
-
import { cn as
|
|
3780
|
-
import { jsx as
|
|
3474
|
+
import { cn as cn50 } from "@marigold/system";
|
|
3475
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
3781
3476
|
var _Tab = (props) => {
|
|
3782
3477
|
const { classNames: classNames2 } = useTabContext();
|
|
3783
|
-
return /* @__PURE__ */
|
|
3478
|
+
return /* @__PURE__ */ jsx89(
|
|
3784
3479
|
Tab,
|
|
3785
3480
|
{
|
|
3786
3481
|
...props,
|
|
3787
|
-
className:
|
|
3482
|
+
className: cn50(
|
|
3788
3483
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
3789
3484
|
classNames2.tab
|
|
3790
3485
|
),
|
|
@@ -3795,15 +3490,15 @@ var _Tab = (props) => {
|
|
|
3795
3490
|
|
|
3796
3491
|
// src/Tabs/TabList.tsx
|
|
3797
3492
|
import { TabList } from "react-aria-components";
|
|
3798
|
-
import { cn as
|
|
3799
|
-
import { jsx as
|
|
3493
|
+
import { cn as cn51, gapSpace as gapSpace8 } from "@marigold/system";
|
|
3494
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
3800
3495
|
var _TabList = ({ space = 2, ...props }) => {
|
|
3801
3496
|
const { classNames: classNames2 } = useTabContext();
|
|
3802
|
-
return /* @__PURE__ */
|
|
3497
|
+
return /* @__PURE__ */ jsx90(
|
|
3803
3498
|
TabList,
|
|
3804
3499
|
{
|
|
3805
3500
|
...props,
|
|
3806
|
-
className:
|
|
3501
|
+
className: cn51("flex", gapSpace8[space], classNames2.tabsList),
|
|
3807
3502
|
children: props.children
|
|
3808
3503
|
}
|
|
3809
3504
|
);
|
|
@@ -3811,25 +3506,25 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
3811
3506
|
|
|
3812
3507
|
// src/Tabs/TabPanel.tsx
|
|
3813
3508
|
import { TabPanel } from "react-aria-components";
|
|
3814
|
-
import { jsx as
|
|
3509
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
3815
3510
|
var _TabPanel = (props) => {
|
|
3816
3511
|
const { classNames: classNames2 } = useTabContext();
|
|
3817
|
-
return /* @__PURE__ */
|
|
3512
|
+
return /* @__PURE__ */ jsx91(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
3818
3513
|
};
|
|
3819
3514
|
|
|
3820
3515
|
// src/Tabs/Tabs.tsx
|
|
3821
|
-
import { jsx as
|
|
3516
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
3822
3517
|
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
3823
3518
|
const props = {
|
|
3824
3519
|
isDisabled: disabled,
|
|
3825
3520
|
...rest
|
|
3826
3521
|
};
|
|
3827
|
-
const classNames2 =
|
|
3522
|
+
const classNames2 = useClassNames48({
|
|
3828
3523
|
component: "Tabs",
|
|
3829
3524
|
size,
|
|
3830
3525
|
variant
|
|
3831
3526
|
});
|
|
3832
|
-
return /* @__PURE__ */
|
|
3527
|
+
return /* @__PURE__ */ jsx92(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx92(Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
3833
3528
|
};
|
|
3834
3529
|
_Tabs.List = _TabList;
|
|
3835
3530
|
_Tabs.TabPanel = _TabPanel;
|
|
@@ -3854,14 +3549,15 @@ export {
|
|
|
3854
3549
|
Columns,
|
|
3855
3550
|
_ComboBox as ComboBox,
|
|
3856
3551
|
Container,
|
|
3857
|
-
DateField,
|
|
3858
|
-
DatePicker,
|
|
3552
|
+
_DateField as DateField,
|
|
3553
|
+
_DatePicker as DatePicker,
|
|
3859
3554
|
_Dialog as Dialog,
|
|
3860
3555
|
_Divider as Divider,
|
|
3861
|
-
|
|
3556
|
+
FieldBase,
|
|
3862
3557
|
FieldGroup,
|
|
3863
3558
|
FieldGroupContext,
|
|
3864
3559
|
Footer,
|
|
3560
|
+
Form,
|
|
3865
3561
|
_Header as Header,
|
|
3866
3562
|
_Headline as Headline,
|
|
3867
3563
|
Image,
|
|
@@ -3876,10 +3572,11 @@ export {
|
|
|
3876
3572
|
Message,
|
|
3877
3573
|
_Modal as Modal,
|
|
3878
3574
|
_NumberField as NumberField,
|
|
3879
|
-
|
|
3880
|
-
|
|
3575
|
+
OverlayContainerProvider,
|
|
3576
|
+
_Popover as Popover,
|
|
3881
3577
|
_Radio as Radio,
|
|
3882
3578
|
_RadioGroup as RadioGroup,
|
|
3579
|
+
Scrollable,
|
|
3883
3580
|
_SearchField as SearchField,
|
|
3884
3581
|
_Select as Select,
|
|
3885
3582
|
_Slider as Slider,
|
|
@@ -3895,8 +3592,6 @@ export {
|
|
|
3895
3592
|
ThemeProvider2 as ThemeProvider,
|
|
3896
3593
|
Tiles,
|
|
3897
3594
|
_Tooltip as Tooltip,
|
|
3898
|
-
Tray,
|
|
3899
|
-
TrayWrapper,
|
|
3900
3595
|
Underlay,
|
|
3901
3596
|
VisuallyHidden,
|
|
3902
3597
|
XLoader,
|
|
@@ -3904,5 +3599,6 @@ export {
|
|
|
3904
3599
|
useAsyncList,
|
|
3905
3600
|
useFieldGroupContext,
|
|
3906
3601
|
useListData,
|
|
3907
|
-
|
|
3602
|
+
usePortalContainer,
|
|
3603
|
+
useTheme2 as useTheme
|
|
3908
3604
|
};
|