@marigold/components 6.9.0 → 6.10.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 +49 -23
- package/dist/index.d.ts +49 -23
- package/dist/index.js +224 -223
- package/dist/index.mjs +278 -276
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -586,20 +586,18 @@ var ListBox = forwardRef4(
|
|
|
586
586
|
const innerRef = useObjectRef(ref);
|
|
587
587
|
const { listBoxProps } = useListBox(props, state, innerRef);
|
|
588
588
|
const classNames2 = useClassNames6({ component: "ListBox", variant, size });
|
|
589
|
-
return /* @__PURE__ */ jsx14(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx14(
|
|
590
|
-
"
|
|
589
|
+
return /* @__PURE__ */ jsx14(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx14(
|
|
590
|
+
"div",
|
|
591
591
|
{
|
|
592
592
|
className: cn8(
|
|
593
|
-
"overflow-y-auto
|
|
594
|
-
classNames2.
|
|
593
|
+
"overflow-y-auto overflow-x-hidden",
|
|
594
|
+
classNames2.container
|
|
595
595
|
),
|
|
596
|
-
ref: innerRef,
|
|
597
|
-
...listBoxProps,
|
|
598
|
-
children: [...state.collection].map(
|
|
596
|
+
children: /* @__PURE__ */ jsx14("ul", { className: classNames2.list, ref: innerRef, ...listBoxProps, children: [...state.collection].map(
|
|
599
597
|
(item) => item.type === "section" ? /* @__PURE__ */ jsx14(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ jsx14(ListBoxOption, { item, state }, item.key)
|
|
600
|
-
)
|
|
598
|
+
) })
|
|
601
599
|
}
|
|
602
|
-
) })
|
|
600
|
+
) });
|
|
603
601
|
}
|
|
604
602
|
);
|
|
605
603
|
|
|
@@ -697,7 +695,7 @@ import {
|
|
|
697
695
|
DismissButton,
|
|
698
696
|
usePopover
|
|
699
697
|
} from "@react-aria/overlays";
|
|
700
|
-
import { useClassNames as useClassNames8 } from "@marigold/system";
|
|
698
|
+
import { cn as cn10, useClassNames as useClassNames8 } from "@marigold/system";
|
|
701
699
|
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
702
700
|
var Popover = forwardRef6(
|
|
703
701
|
(props, ref) => {
|
|
@@ -735,7 +733,10 @@ var PopoverWrapper = forwardRef6(
|
|
|
735
733
|
"div",
|
|
736
734
|
{
|
|
737
735
|
...popoverProps,
|
|
738
|
-
className:
|
|
736
|
+
className: cn10(
|
|
737
|
+
"flex flex-col sm:max-h-[75vh] lg:max-h-[45vh]",
|
|
738
|
+
classNames2
|
|
739
|
+
),
|
|
739
740
|
style: {
|
|
740
741
|
...popoverProps.style,
|
|
741
742
|
minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
|
|
@@ -763,11 +764,11 @@ import {
|
|
|
763
764
|
import { useObjectRef as useObjectRef2 } from "@react-aria/utils";
|
|
764
765
|
|
|
765
766
|
// src/Overlay/_Underlay.tsx
|
|
766
|
-
import { cn as
|
|
767
|
+
import { cn as cn11, useClassNames as useClassNames9 } from "@marigold/system";
|
|
767
768
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
768
769
|
var Underlay2 = ({ size, variant, ...props }) => {
|
|
769
770
|
const classNames2 = useClassNames9({ component: "Underlay", size, variant });
|
|
770
|
-
return /* @__PURE__ */ jsx19("div", { className:
|
|
771
|
+
return /* @__PURE__ */ jsx19("div", { className: cn11("fixed inset-0 z-40", classNames2), ...props });
|
|
771
772
|
};
|
|
772
773
|
|
|
773
774
|
// src/Overlay/Tray.tsx
|
|
@@ -811,7 +812,7 @@ import { useButton as useButton2 } from "@react-aria/button";
|
|
|
811
812
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
812
813
|
import { useHover } from "@react-aria/interactions";
|
|
813
814
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
814
|
-
import { cn as
|
|
815
|
+
import { cn as cn12, useStateProps as useStateProps3 } from "@marigold/system";
|
|
815
816
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
816
817
|
var ClearButton = ({
|
|
817
818
|
preventFocus,
|
|
@@ -861,7 +862,7 @@ var ClearButton = ({
|
|
|
861
862
|
...mergeProps4(buttonProps, focusProps, hoverProps, props),
|
|
862
863
|
...stateProps,
|
|
863
864
|
ref: buttonRef,
|
|
864
|
-
className:
|
|
865
|
+
className: cn12(
|
|
865
866
|
"cursor-pointer appearance-none border-none p-0 pr-1",
|
|
866
867
|
className
|
|
867
868
|
),
|
|
@@ -1000,7 +1001,7 @@ import { useComboBoxState as useComboBoxState2 } from "@react-stately/combobox";
|
|
|
1000
1001
|
// src/Button/Button.tsx
|
|
1001
1002
|
import { forwardRef as forwardRef8 } from "react";
|
|
1002
1003
|
import { Button } from "react-aria-components";
|
|
1003
|
-
import { cn as
|
|
1004
|
+
import { cn as cn13, useClassNames as useClassNames10 } from "@marigold/system";
|
|
1004
1005
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1005
1006
|
var _Button = forwardRef8(
|
|
1006
1007
|
({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
|
|
@@ -1015,7 +1016,7 @@ var _Button = forwardRef8(
|
|
|
1015
1016
|
{
|
|
1016
1017
|
...props,
|
|
1017
1018
|
ref,
|
|
1018
|
-
className:
|
|
1019
|
+
className: cn13(
|
|
1019
1020
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1020
1021
|
classNames2,
|
|
1021
1022
|
fullWidth ? "w-full" : void 0
|
|
@@ -1121,7 +1122,7 @@ var Badge = ({ variant, size, children, ...props }) => {
|
|
|
1121
1122
|
};
|
|
1122
1123
|
|
|
1123
1124
|
// src/Breakout/Breakout.tsx
|
|
1124
|
-
import { alignment, cn as
|
|
1125
|
+
import { alignment, cn as cn14, createVar as createVar4 } from "@marigold/system";
|
|
1125
1126
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1126
1127
|
var Breakout = ({
|
|
1127
1128
|
height,
|
|
@@ -1135,7 +1136,7 @@ var Breakout = ({
|
|
|
1135
1136
|
return /* @__PURE__ */ jsx26(
|
|
1136
1137
|
"div",
|
|
1137
1138
|
{
|
|
1138
|
-
className:
|
|
1139
|
+
className: cn14(
|
|
1139
1140
|
"col-start-[1_!important] col-end-[-1_!important] w-full",
|
|
1140
1141
|
alignX && ((_b = (_a = alignment) == null ? void 0 : _a.horizontal) == null ? void 0 : _b.alignmentX[alignX]),
|
|
1141
1142
|
alignY && ((_d = (_c = alignment) == null ? void 0 : _c.horizontal) == null ? void 0 : _d.alignmentY[alignY]),
|
|
@@ -1159,7 +1160,7 @@ var Body = ({ children, variant, size, ...props }) => {
|
|
|
1159
1160
|
|
|
1160
1161
|
// src/Card/Card.tsx
|
|
1161
1162
|
import {
|
|
1162
|
-
cn as
|
|
1163
|
+
cn as cn15,
|
|
1163
1164
|
gapSpace as gapSpace2,
|
|
1164
1165
|
paddingBottom,
|
|
1165
1166
|
paddingLeft,
|
|
@@ -1190,7 +1191,7 @@ var Card = ({
|
|
|
1190
1191
|
"div",
|
|
1191
1192
|
{
|
|
1192
1193
|
...props,
|
|
1193
|
-
className:
|
|
1194
|
+
className: cn15(
|
|
1194
1195
|
"flex flex-col",
|
|
1195
1196
|
classNames2,
|
|
1196
1197
|
gapSpace2[space],
|
|
@@ -1208,7 +1209,7 @@ var Card = ({
|
|
|
1208
1209
|
};
|
|
1209
1210
|
|
|
1210
1211
|
// src/Center/Center.tsx
|
|
1211
|
-
import { cn as
|
|
1212
|
+
import { cn as cn16, createVar as createVar5, gapSpace as gapSpace3 } from "@marigold/system";
|
|
1212
1213
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1213
1214
|
var Center = ({
|
|
1214
1215
|
maxWidth = "100%",
|
|
@@ -1220,7 +1221,7 @@ var Center = ({
|
|
|
1220
1221
|
"div",
|
|
1221
1222
|
{
|
|
1222
1223
|
...props,
|
|
1223
|
-
className:
|
|
1224
|
+
className: cn16(
|
|
1224
1225
|
"me-[auto] ms-[auto] box-content flex flex-col items-center justify-center",
|
|
1225
1226
|
gapSpace3[space],
|
|
1226
1227
|
"max-w-[--maxWidth]"
|
|
@@ -1234,7 +1235,7 @@ var Center = ({
|
|
|
1234
1235
|
// src/Checkbox/Checkbox.tsx
|
|
1235
1236
|
import { forwardRef as forwardRef9 } from "react";
|
|
1236
1237
|
import { Checkbox } from "react-aria-components";
|
|
1237
|
-
import { cn as
|
|
1238
|
+
import { cn as cn17, useClassNames as useClassNames14 } from "@marigold/system";
|
|
1238
1239
|
import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1239
1240
|
var CheckMark = () => /* @__PURE__ */ jsx30("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx30(
|
|
1240
1241
|
"path",
|
|
@@ -1257,7 +1258,7 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1257
1258
|
"div",
|
|
1258
1259
|
{
|
|
1259
1260
|
"aria-hidden": "true",
|
|
1260
|
-
className:
|
|
1261
|
+
className: cn17(
|
|
1261
1262
|
"flex shrink-0 grow-0 basis-4 items-center justify-center",
|
|
1262
1263
|
"h-4 w-4 p-px",
|
|
1263
1264
|
"bg-white",
|
|
@@ -1299,7 +1300,7 @@ var _Checkbox = forwardRef9(
|
|
|
1299
1300
|
Checkbox,
|
|
1300
1301
|
{
|
|
1301
1302
|
ref,
|
|
1302
|
-
className:
|
|
1303
|
+
className: cn17(
|
|
1303
1304
|
"group/checkbox flex items-center gap-[0.5rem]",
|
|
1304
1305
|
"cursor-pointer data-[disabled]:cursor-not-allowed",
|
|
1305
1306
|
classNames2.container
|
|
@@ -1327,11 +1328,11 @@ import { useClassNames as useClassNames17 } from "@marigold/system";
|
|
|
1327
1328
|
|
|
1328
1329
|
// src/FieldBase/_FieldBase.tsx
|
|
1329
1330
|
import { forwardRef as forwardRef10 } from "react";
|
|
1330
|
-
import { cn as
|
|
1331
|
+
import { cn as cn19, width as twWidth2, useClassNames as useClassNames16 } from "@marigold/system";
|
|
1331
1332
|
|
|
1332
1333
|
// src/HelpText/_HelpText.tsx
|
|
1333
1334
|
import { FieldError, Text } from "react-aria-components";
|
|
1334
|
-
import { cn as
|
|
1335
|
+
import { cn as cn18, useClassNames as useClassNames15 } from "@marigold/system";
|
|
1335
1336
|
import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1336
1337
|
var HelpText2 = ({
|
|
1337
1338
|
variant,
|
|
@@ -1351,7 +1352,7 @@ var HelpText2 = ({
|
|
|
1351
1352
|
if (!description && !errorMessage) {
|
|
1352
1353
|
return null;
|
|
1353
1354
|
}
|
|
1354
|
-
return /* @__PURE__ */ jsxs13("div", { className:
|
|
1355
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn18(classNames2.container), children: [
|
|
1355
1356
|
/* @__PURE__ */ jsxs13(
|
|
1356
1357
|
FieldError,
|
|
1357
1358
|
{
|
|
@@ -1361,7 +1362,7 @@ var HelpText2 = ({
|
|
|
1361
1362
|
/* @__PURE__ */ jsx31(
|
|
1362
1363
|
"svg",
|
|
1363
1364
|
{
|
|
1364
|
-
className:
|
|
1365
|
+
className: cn18("h-4 w-4", classNames2.icon),
|
|
1365
1366
|
viewBox: "0 0 24 24",
|
|
1366
1367
|
role: "presentation",
|
|
1367
1368
|
fill: "currentColor",
|
|
@@ -1402,7 +1403,7 @@ var _FieldBase = (props, ref) => {
|
|
|
1402
1403
|
Component,
|
|
1403
1404
|
{
|
|
1404
1405
|
ref,
|
|
1405
|
-
className:
|
|
1406
|
+
className: cn19("group/field", twWidth2[width], classNames2, className),
|
|
1406
1407
|
"data-required": props.isRequired ? true : void 0,
|
|
1407
1408
|
"data-error": props.isInvalid ? true : void 0,
|
|
1408
1409
|
...rest,
|
|
@@ -1456,7 +1457,7 @@ var _CheckboxGroup = ({
|
|
|
1456
1457
|
|
|
1457
1458
|
// src/Columns/Columns.tsx
|
|
1458
1459
|
import { Children as Children3, cloneElement as cloneElement3, isValidElement as isValidElement2 } from "react";
|
|
1459
|
-
import { cn as
|
|
1460
|
+
import { cn as cn20, createVar as createVar6, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1460
1461
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1461
1462
|
var Columns = ({
|
|
1462
1463
|
space = 0,
|
|
@@ -1476,7 +1477,7 @@ var Columns = ({
|
|
|
1476
1477
|
return /* @__PURE__ */ jsx34(
|
|
1477
1478
|
"div",
|
|
1478
1479
|
{
|
|
1479
|
-
className:
|
|
1480
|
+
className: cn20(
|
|
1480
1481
|
"flex flex-wrap items-stretch",
|
|
1481
1482
|
stretch && "h-full",
|
|
1482
1483
|
gapSpace4[space]
|
|
@@ -1485,7 +1486,7 @@ var Columns = ({
|
|
|
1485
1486
|
children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx34(
|
|
1486
1487
|
"div",
|
|
1487
1488
|
{
|
|
1488
|
-
className:
|
|
1489
|
+
className: cn20(
|
|
1489
1490
|
"grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1490
1491
|
),
|
|
1491
1492
|
style: createVar6({ collapseAt, columnSize: columns[idx] }),
|
|
@@ -1498,7 +1499,7 @@ var Columns = ({
|
|
|
1498
1499
|
|
|
1499
1500
|
// src/Container/Container.tsx
|
|
1500
1501
|
import {
|
|
1501
|
-
cn as
|
|
1502
|
+
cn as cn21,
|
|
1502
1503
|
createVar as createVar7,
|
|
1503
1504
|
gridColsAlign,
|
|
1504
1505
|
gridColumn,
|
|
@@ -1528,7 +1529,7 @@ var Container = ({
|
|
|
1528
1529
|
"div",
|
|
1529
1530
|
{
|
|
1530
1531
|
...props,
|
|
1531
|
-
className:
|
|
1532
|
+
className: cn21(
|
|
1532
1533
|
"grid",
|
|
1533
1534
|
placeItems[alignItems],
|
|
1534
1535
|
gridColsAlign[align],
|
|
@@ -1543,12 +1544,12 @@ var Container = ({
|
|
|
1543
1544
|
// src/Dialog/Dialog.tsx
|
|
1544
1545
|
import { useContext as useContext3 } from "react";
|
|
1545
1546
|
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
1546
|
-
import { cn as
|
|
1547
|
+
import { cn as cn23, useClassNames as useClassNames19 } from "@marigold/system";
|
|
1547
1548
|
|
|
1548
1549
|
// src/Headline/Headline.tsx
|
|
1549
1550
|
import { Heading } from "react-aria-components";
|
|
1550
1551
|
import {
|
|
1551
|
-
cn as
|
|
1552
|
+
cn as cn22,
|
|
1552
1553
|
createVar as createVar8,
|
|
1553
1554
|
get,
|
|
1554
1555
|
textAlign,
|
|
@@ -1576,7 +1577,7 @@ var _Headline = ({
|
|
|
1576
1577
|
{
|
|
1577
1578
|
level: Number(level),
|
|
1578
1579
|
...props,
|
|
1579
|
-
className:
|
|
1580
|
+
className: cn22(classNames2, "text-[--color]", textAlign[align]),
|
|
1580
1581
|
style: createVar8({
|
|
1581
1582
|
color: color && theme.colors && get(
|
|
1582
1583
|
theme.colors,
|
|
@@ -1628,7 +1629,7 @@ var CloseButton = ({ className }) => {
|
|
|
1628
1629
|
return /* @__PURE__ */ jsx38("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx38(
|
|
1629
1630
|
"button",
|
|
1630
1631
|
{
|
|
1631
|
-
className:
|
|
1632
|
+
className: cn23(
|
|
1632
1633
|
"h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
|
|
1633
1634
|
className
|
|
1634
1635
|
),
|
|
@@ -1665,7 +1666,7 @@ var _Dialog = ({
|
|
|
1665
1666
|
Dialog,
|
|
1666
1667
|
{
|
|
1667
1668
|
...props,
|
|
1668
|
-
className:
|
|
1669
|
+
className: cn23("relative outline-none", classNames2.container),
|
|
1669
1670
|
children: /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
1670
1671
|
closeButton && /* @__PURE__ */ jsx38(CloseButton, { className: classNames2.closeButton }),
|
|
1671
1672
|
children
|
|
@@ -1708,7 +1709,7 @@ var _Header = ({ variant, size, ...props }) => {
|
|
|
1708
1709
|
|
|
1709
1710
|
// src/Image/Image.tsx
|
|
1710
1711
|
import {
|
|
1711
|
-
cn as
|
|
1712
|
+
cn as cn24,
|
|
1712
1713
|
objectFit,
|
|
1713
1714
|
objectPosition,
|
|
1714
1715
|
useClassNames as useClassNames23
|
|
@@ -1727,7 +1728,7 @@ var Image = ({
|
|
|
1727
1728
|
{
|
|
1728
1729
|
...props,
|
|
1729
1730
|
alt: props.alt,
|
|
1730
|
-
className:
|
|
1731
|
+
className: cn24(
|
|
1731
1732
|
fit !== "none" && "h-full w-full",
|
|
1732
1733
|
classNames2,
|
|
1733
1734
|
objectFit[fit],
|
|
@@ -1740,7 +1741,7 @@ var Image = ({
|
|
|
1740
1741
|
// src/Inline/Inline.tsx
|
|
1741
1742
|
import {
|
|
1742
1743
|
alignment as alignment2,
|
|
1743
|
-
cn as
|
|
1744
|
+
cn as cn25,
|
|
1744
1745
|
gapSpace as gapSpace5
|
|
1745
1746
|
} from "@marigold/system";
|
|
1746
1747
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
@@ -1757,7 +1758,7 @@ var Inline = ({
|
|
|
1757
1758
|
"div",
|
|
1758
1759
|
{
|
|
1759
1760
|
...props,
|
|
1760
|
-
className:
|
|
1761
|
+
className: cn25(
|
|
1761
1762
|
"flex flex-wrap",
|
|
1762
1763
|
gapSpace5[space],
|
|
1763
1764
|
alignX && ((_b2 = (_a2 = alignment2) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
@@ -1777,14 +1778,14 @@ import { useLocale } from "@react-aria/i18n";
|
|
|
1777
1778
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
1778
1779
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
1779
1780
|
import { useDateFieldState } from "@react-stately/datepicker";
|
|
1780
|
-
import { cn as
|
|
1781
|
+
import { cn as cn27, useClassNames as useClassNames24, useStateProps as useStateProps5 } from "@marigold/system";
|
|
1781
1782
|
|
|
1782
1783
|
// src/DateField/DateSegment.tsx
|
|
1783
1784
|
import { useRef as useRef8 } from "react";
|
|
1784
1785
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
1785
1786
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
1786
1787
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
1787
|
-
import { cn as
|
|
1788
|
+
import { cn as cn26, useStateProps as useStateProps4 } from "@marigold/system";
|
|
1788
1789
|
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1789
1790
|
var DateSegment = ({
|
|
1790
1791
|
className,
|
|
@@ -1808,7 +1809,7 @@ var DateSegment = ({
|
|
|
1808
1809
|
{
|
|
1809
1810
|
...mergeProps5(segmentProps, stateProps, focusProps),
|
|
1810
1811
|
ref,
|
|
1811
|
-
className:
|
|
1812
|
+
className: cn26(
|
|
1812
1813
|
"group/segment",
|
|
1813
1814
|
"text-center leading-none outline-0",
|
|
1814
1815
|
type !== "literal" && "p-0.5",
|
|
@@ -1823,7 +1824,7 @@ var DateSegment = ({
|
|
|
1823
1824
|
"span",
|
|
1824
1825
|
{
|
|
1825
1826
|
"aria-hidden": "true",
|
|
1826
|
-
className:
|
|
1827
|
+
className: cn26(
|
|
1827
1828
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1828
1829
|
"pointer-events-none w-full text-center"
|
|
1829
1830
|
),
|
|
@@ -1906,7 +1907,7 @@ var DateField = ({
|
|
|
1906
1907
|
"div",
|
|
1907
1908
|
{
|
|
1908
1909
|
...mergeProps6(fieldProps, focusProps, stateProps, hoverProps),
|
|
1909
|
-
className:
|
|
1910
|
+
className: cn27(
|
|
1910
1911
|
"relative flex flex-row flex-nowrap",
|
|
1911
1912
|
"cursor-text aria-disabled:cursor-not-allowed",
|
|
1912
1913
|
classNames2.field
|
|
@@ -1931,7 +1932,7 @@ var DateField = ({
|
|
|
1931
1932
|
"svg",
|
|
1932
1933
|
{
|
|
1933
1934
|
"data-testid": "action",
|
|
1934
|
-
className:
|
|
1935
|
+
className: cn27(classNames2.action),
|
|
1935
1936
|
viewBox: "0 0 24 24",
|
|
1936
1937
|
width: 24,
|
|
1937
1938
|
height: 24,
|
|
@@ -1954,7 +1955,7 @@ import {
|
|
|
1954
1955
|
import { useDateFormatter as useDateFormatter3, useLocale as useLocale3 } from "@react-aria/i18n";
|
|
1955
1956
|
import { useCalendarState } from "@react-stately/calendar";
|
|
1956
1957
|
import { ChevronDown as ChevronDown2, ChevronLeft, ChevronRight } from "@marigold/icons";
|
|
1957
|
-
import { cn as
|
|
1958
|
+
import { cn as cn29, useClassNames as useClassNames26, useStateProps as useStateProps7 } from "@marigold/system";
|
|
1958
1959
|
|
|
1959
1960
|
// src/Calendar/CalendarGrid.tsx
|
|
1960
1961
|
import { getWeeksInMonth, startOfWeek, today } from "@internationalized/date";
|
|
@@ -1968,7 +1969,7 @@ import { useRef as useRef10 } from "react";
|
|
|
1968
1969
|
import { useCalendarCell } from "@react-aria/calendar";
|
|
1969
1970
|
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
1970
1971
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
1971
|
-
import { cn as
|
|
1972
|
+
import { cn as cn28, useClassNames as useClassNames25, useStateProps as useStateProps6 } from "@marigold/system";
|
|
1972
1973
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1973
1974
|
var CalendarCell = (props) => {
|
|
1974
1975
|
const ref = useRef10(null);
|
|
@@ -1989,7 +1990,7 @@ var CalendarCell = (props) => {
|
|
|
1989
1990
|
return /* @__PURE__ */ jsx46("td", { className: "group/cell", ...cellProps, children: /* @__PURE__ */ jsx46(
|
|
1990
1991
|
"div",
|
|
1991
1992
|
{
|
|
1992
|
-
className:
|
|
1993
|
+
className: cn28(
|
|
1993
1994
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
1994
1995
|
classNames2.calendarCell
|
|
1995
1996
|
),
|
|
@@ -2210,7 +2211,7 @@ var Calendar = ({
|
|
|
2210
2211
|
"div",
|
|
2211
2212
|
{
|
|
2212
2213
|
tabIndex: -1,
|
|
2213
|
-
className:
|
|
2214
|
+
className: cn29(
|
|
2214
2215
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4 shadow-[0_4px_4px_rgba(165,165,165,0.25)]",
|
|
2215
2216
|
classNames2.calendar
|
|
2216
2217
|
),
|
|
@@ -2238,7 +2239,7 @@ var Calendar = ({
|
|
|
2238
2239
|
{
|
|
2239
2240
|
disabled: state.isDisabled,
|
|
2240
2241
|
onClick: () => setSelectedDropdown("month"),
|
|
2241
|
-
className:
|
|
2242
|
+
className: cn29(buttonStyles, selectClassNames),
|
|
2242
2243
|
"data-testid": "month",
|
|
2243
2244
|
children: [
|
|
2244
2245
|
selectedValue.month,
|
|
@@ -2251,7 +2252,7 @@ var Calendar = ({
|
|
|
2251
2252
|
{
|
|
2252
2253
|
disabled: state.isDisabled,
|
|
2253
2254
|
onClick: () => setSelectedDropdown("year"),
|
|
2254
|
-
className:
|
|
2255
|
+
className: cn29(buttonStyles, selectClassNames),
|
|
2255
2256
|
"data-testid": "year",
|
|
2256
2257
|
children: [
|
|
2257
2258
|
selectedValue.year,
|
|
@@ -2263,7 +2264,7 @@ var Calendar = ({
|
|
|
2263
2264
|
/* @__PURE__ */ jsxs20(
|
|
2264
2265
|
"div",
|
|
2265
2266
|
{
|
|
2266
|
-
className:
|
|
2267
|
+
className: cn29(
|
|
2267
2268
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
2268
2269
|
classNames2.calendarControllers
|
|
2269
2270
|
),
|
|
@@ -2364,7 +2365,7 @@ var DatePicker = ({
|
|
|
2364
2365
|
|
|
2365
2366
|
// src/Inset/Inset.tsx
|
|
2366
2367
|
import {
|
|
2367
|
-
cn as
|
|
2368
|
+
cn as cn30,
|
|
2368
2369
|
paddingSpace as paddingSpace2,
|
|
2369
2370
|
paddingSpaceX as paddingSpaceX2,
|
|
2370
2371
|
paddingSpaceY as paddingSpaceY2
|
|
@@ -2373,7 +2374,7 @@ import { jsx as jsx52 } from "react/jsx-runtime";
|
|
|
2373
2374
|
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx52(
|
|
2374
2375
|
"div",
|
|
2375
2376
|
{
|
|
2376
|
-
className:
|
|
2377
|
+
className: cn30(
|
|
2377
2378
|
space && paddingSpace2[space],
|
|
2378
2379
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
2379
2380
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -2615,7 +2616,7 @@ var ActionMenu = (props) => {
|
|
|
2615
2616
|
};
|
|
2616
2617
|
|
|
2617
2618
|
// src/Message/Message.tsx
|
|
2618
|
-
import { cn as
|
|
2619
|
+
import { cn as cn31, useClassNames as useClassNames32 } from "@marigold/system";
|
|
2619
2620
|
import { jsx as jsx61, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2620
2621
|
var icons = {
|
|
2621
2622
|
success: () => /* @__PURE__ */ jsx61(
|
|
@@ -2695,21 +2696,21 @@ var Message = ({
|
|
|
2695
2696
|
return /* @__PURE__ */ jsxs25(
|
|
2696
2697
|
"div",
|
|
2697
2698
|
{
|
|
2698
|
-
className:
|
|
2699
|
+
className: cn31(
|
|
2699
2700
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2700
2701
|
classNames2.container
|
|
2701
2702
|
),
|
|
2702
2703
|
...props,
|
|
2703
2704
|
children: [
|
|
2704
|
-
/* @__PURE__ */ jsx61("div", { className:
|
|
2705
|
+
/* @__PURE__ */ jsx61("div", { className: cn31("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx61(Icon3, {}) }),
|
|
2705
2706
|
/* @__PURE__ */ jsx61(
|
|
2706
2707
|
"div",
|
|
2707
2708
|
{
|
|
2708
|
-
className:
|
|
2709
|
+
className: cn31("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2709
2710
|
children: messageTitle
|
|
2710
2711
|
}
|
|
2711
2712
|
),
|
|
2712
|
-
/* @__PURE__ */ jsx61("div", { className:
|
|
2713
|
+
/* @__PURE__ */ jsx61("div", { className: cn31("col-start-2", classNames2.content), children })
|
|
2713
2714
|
]
|
|
2714
2715
|
}
|
|
2715
2716
|
);
|
|
@@ -2718,12 +2719,12 @@ var Message = ({
|
|
|
2718
2719
|
// src/NumberField/NumberField.tsx
|
|
2719
2720
|
import { forwardRef as forwardRef13 } from "react";
|
|
2720
2721
|
import { Group, NumberField } from "react-aria-components";
|
|
2721
|
-
import { cn as
|
|
2722
|
+
import { cn as cn34, useClassNames as useClassNames34 } from "@marigold/system";
|
|
2722
2723
|
|
|
2723
2724
|
// src/Input/_Input.tsx
|
|
2724
2725
|
import { cloneElement as cloneElement4, forwardRef as forwardRef12 } from "react";
|
|
2725
2726
|
import { Input as Input2 } from "react-aria-components";
|
|
2726
|
-
import { cn as
|
|
2727
|
+
import { cn as cn32, useClassNames as useClassNames33 } from "@marigold/system";
|
|
2727
2728
|
import { jsx as jsx62, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2728
2729
|
var _Input = forwardRef12(
|
|
2729
2730
|
({ type, icon, action, variant, size, className, ...props }, ref) => {
|
|
@@ -2733,7 +2734,7 @@ var _Input = forwardRef12(
|
|
|
2733
2734
|
size
|
|
2734
2735
|
});
|
|
2735
2736
|
const inputIcon = icon ? cloneElement4(icon, {
|
|
2736
|
-
className:
|
|
2737
|
+
className: cn32(
|
|
2737
2738
|
"pointer-events-none absolute",
|
|
2738
2739
|
classNames2.icon,
|
|
2739
2740
|
icon.props.className
|
|
@@ -2741,7 +2742,7 @@ var _Input = forwardRef12(
|
|
|
2741
2742
|
...icon.props
|
|
2742
2743
|
}) : null;
|
|
2743
2744
|
const inputAction = action && !props.readOnly ? cloneElement4(action, {
|
|
2744
|
-
className:
|
|
2745
|
+
className: cn32(
|
|
2745
2746
|
"absolute",
|
|
2746
2747
|
classNames2.action,
|
|
2747
2748
|
action.props.className
|
|
@@ -2760,7 +2761,7 @@ var _Input = forwardRef12(
|
|
|
2760
2761
|
Input2,
|
|
2761
2762
|
{
|
|
2762
2763
|
...props,
|
|
2763
|
-
className:
|
|
2764
|
+
className: cn32(
|
|
2764
2765
|
"w-full flex-1",
|
|
2765
2766
|
"disabled:cursor-not-allowed",
|
|
2766
2767
|
"[&[type=file]]:border-none [&[type=file]]:p-0",
|
|
@@ -2781,7 +2782,7 @@ var _Input = forwardRef12(
|
|
|
2781
2782
|
|
|
2782
2783
|
// src/NumberField/StepButton.tsx
|
|
2783
2784
|
import { Button as Button2 } from "react-aria-components";
|
|
2784
|
-
import { cn as
|
|
2785
|
+
import { cn as cn33 } from "@marigold/system";
|
|
2785
2786
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2786
2787
|
var Plus = () => /* @__PURE__ */ jsx63("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx63(
|
|
2787
2788
|
"path",
|
|
@@ -2804,7 +2805,7 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2804
2805
|
return /* @__PURE__ */ jsx63(
|
|
2805
2806
|
Button2,
|
|
2806
2807
|
{
|
|
2807
|
-
className:
|
|
2808
|
+
className: cn33(
|
|
2808
2809
|
[
|
|
2809
2810
|
"flex items-center justify-center",
|
|
2810
2811
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
@@ -2843,7 +2844,7 @@ var _NumberField = forwardRef13(
|
|
|
2843
2844
|
...rest
|
|
2844
2845
|
};
|
|
2845
2846
|
const showStepper = !hideStepper;
|
|
2846
|
-
return /* @__PURE__ */ jsx64(FieldBase2, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs27(Group, { className:
|
|
2847
|
+
return /* @__PURE__ */ jsx64(FieldBase2, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs27(Group, { className: cn34("flex items-stretch", classNames2.group), children: [
|
|
2847
2848
|
showStepper && /* @__PURE__ */ jsx64(
|
|
2848
2849
|
_StepButton,
|
|
2849
2850
|
{
|
|
@@ -2898,7 +2899,7 @@ import {
|
|
|
2898
2899
|
forwardRef as forwardRef14
|
|
2899
2900
|
} from "react";
|
|
2900
2901
|
import { Radio } from "react-aria-components";
|
|
2901
|
-
import { cn as
|
|
2902
|
+
import { cn as cn36, useClassNames as useClassNames36 } from "@marigold/system";
|
|
2902
2903
|
|
|
2903
2904
|
// src/Radio/Context.ts
|
|
2904
2905
|
import { createContext as createContext5, useContext as useContext6 } from "react";
|
|
@@ -2909,7 +2910,7 @@ var useRadioGroupContext = () => useContext6(RadioGroupContext);
|
|
|
2909
2910
|
|
|
2910
2911
|
// src/Radio/RadioGroup.tsx
|
|
2911
2912
|
import { RadioGroup } from "react-aria-components";
|
|
2912
|
-
import { cn as
|
|
2913
|
+
import { cn as cn35, useClassNames as useClassNames35 } from "@marigold/system";
|
|
2913
2914
|
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
2914
2915
|
var _RadioGroup = ({
|
|
2915
2916
|
variant,
|
|
@@ -2951,7 +2952,7 @@ var _RadioGroup = ({
|
|
|
2951
2952
|
role: "presentation",
|
|
2952
2953
|
"data-testid": "group",
|
|
2953
2954
|
"data-orientation": orientation,
|
|
2954
|
-
className:
|
|
2955
|
+
className: cn35(
|
|
2955
2956
|
classNames2.group,
|
|
2956
2957
|
"flex items-start",
|
|
2957
2958
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
@@ -2969,7 +2970,7 @@ var Dot = () => /* @__PURE__ */ jsx67("svg", { viewBox: "0 0 6 6", children: /*
|
|
|
2969
2970
|
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx67(
|
|
2970
2971
|
"div",
|
|
2971
2972
|
{
|
|
2972
|
-
className:
|
|
2973
|
+
className: cn36(
|
|
2973
2974
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
2974
2975
|
className
|
|
2975
2976
|
),
|
|
@@ -2990,7 +2991,7 @@ var _Radio = forwardRef14(
|
|
|
2990
2991
|
Radio,
|
|
2991
2992
|
{
|
|
2992
2993
|
ref,
|
|
2993
|
-
className:
|
|
2994
|
+
className: cn36(
|
|
2994
2995
|
"group/radio",
|
|
2995
2996
|
"relative flex items-center gap-[1ch]",
|
|
2996
2997
|
width || groupWidth || "w-full",
|
|
@@ -3004,7 +3005,7 @@ var _Radio = forwardRef14(
|
|
|
3004
3005
|
Icon2,
|
|
3005
3006
|
{
|
|
3006
3007
|
checked: isSelected,
|
|
3007
|
-
className:
|
|
3008
|
+
className: cn36(
|
|
3008
3009
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
3009
3010
|
classNames2.radio
|
|
3010
3011
|
)
|
|
@@ -3018,9 +3019,38 @@ var _Radio = forwardRef14(
|
|
|
3018
3019
|
);
|
|
3019
3020
|
_Radio.Group = _RadioGroup;
|
|
3020
3021
|
|
|
3022
|
+
// src/SearchField/SearchField.tsx
|
|
3023
|
+
import { forwardRef as forwardRef15 } from "react";
|
|
3024
|
+
import { SearchField } from "react-aria-components";
|
|
3025
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
3026
|
+
var SearchIcon2 = (props) => /* @__PURE__ */ jsx68(
|
|
3027
|
+
"svg",
|
|
3028
|
+
{
|
|
3029
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3030
|
+
viewBox: "0 0 24 24",
|
|
3031
|
+
fill: "currentColor",
|
|
3032
|
+
width: 24,
|
|
3033
|
+
height: 24,
|
|
3034
|
+
...props,
|
|
3035
|
+
children: /* @__PURE__ */ jsx68("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" })
|
|
3036
|
+
}
|
|
3037
|
+
);
|
|
3038
|
+
var _SearchField = forwardRef15(
|
|
3039
|
+
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
3040
|
+
const props = {
|
|
3041
|
+
...rest,
|
|
3042
|
+
isDisabled: disabled,
|
|
3043
|
+
isRequired: required,
|
|
3044
|
+
isReadOnly: readOnly,
|
|
3045
|
+
isInvalid: error
|
|
3046
|
+
};
|
|
3047
|
+
return /* @__PURE__ */ jsx68(FieldBase2, { as: SearchField, ...props, children: /* @__PURE__ */ jsx68(_Input, { ref, icon: /* @__PURE__ */ jsx68(SearchIcon2, {}) }) });
|
|
3048
|
+
}
|
|
3049
|
+
);
|
|
3050
|
+
|
|
3021
3051
|
// src/Select/Select.tsx
|
|
3022
3052
|
import {
|
|
3023
|
-
forwardRef as
|
|
3053
|
+
forwardRef as forwardRef16,
|
|
3024
3054
|
useRef as useRef17
|
|
3025
3055
|
} from "react";
|
|
3026
3056
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
@@ -3031,7 +3061,7 @@ import { mergeProps as mergeProps10, useObjectRef as useObjectRef4 } from "@reac
|
|
|
3031
3061
|
import { Item as Item5, Section as Section2 } from "@react-stately/collections";
|
|
3032
3062
|
import { useSelectState } from "@react-stately/select";
|
|
3033
3063
|
import {
|
|
3034
|
-
cn as
|
|
3064
|
+
cn as cn37,
|
|
3035
3065
|
useClassNames as useClassNames37,
|
|
3036
3066
|
useSmallScreen as useSmallScreen2,
|
|
3037
3067
|
useStateProps as useStateProps10
|
|
@@ -3048,8 +3078,8 @@ var messages = {
|
|
|
3048
3078
|
};
|
|
3049
3079
|
|
|
3050
3080
|
// src/Select/Select.tsx
|
|
3051
|
-
import { jsx as
|
|
3052
|
-
var Select =
|
|
3081
|
+
import { jsx as jsx69, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3082
|
+
var Select = forwardRef16(
|
|
3053
3083
|
({
|
|
3054
3084
|
variant,
|
|
3055
3085
|
size,
|
|
@@ -3112,7 +3142,7 @@ var Select = forwardRef15(
|
|
|
3112
3142
|
stateProps,
|
|
3113
3143
|
disabled,
|
|
3114
3144
|
children: [
|
|
3115
|
-
/* @__PURE__ */
|
|
3145
|
+
/* @__PURE__ */ jsx69(
|
|
3116
3146
|
HiddenSelect,
|
|
3117
3147
|
{
|
|
3118
3148
|
state,
|
|
@@ -3125,7 +3155,7 @@ var Select = forwardRef15(
|
|
|
3125
3155
|
/* @__PURE__ */ jsxs29(
|
|
3126
3156
|
"button",
|
|
3127
3157
|
{
|
|
3128
|
-
className:
|
|
3158
|
+
className: cn37(
|
|
3129
3159
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
3130
3160
|
classNames2.select
|
|
3131
3161
|
),
|
|
@@ -3133,12 +3163,12 @@ var Select = forwardRef15(
|
|
|
3133
3163
|
...mergeProps10(buttonProps, focusProps),
|
|
3134
3164
|
...stateProps,
|
|
3135
3165
|
children: [
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
/* @__PURE__ */
|
|
3166
|
+
/* @__PURE__ */ jsx69("div", { className: "overflow-hidden whitespace-nowrap", ...valueProps, children: state.selectedItem ? state.selectedItem.rendered : props.placeholder }),
|
|
3167
|
+
/* @__PURE__ */ jsx69(ChevronDown, { className: "h-4 w-4" })
|
|
3138
3168
|
]
|
|
3139
3169
|
}
|
|
3140
3170
|
),
|
|
3141
|
-
isSmallScreen ? /* @__PURE__ */
|
|
3171
|
+
isSmallScreen ? /* @__PURE__ */ jsx69(Tray, { state, children: /* @__PURE__ */ jsx69(
|
|
3142
3172
|
ListBox,
|
|
3143
3173
|
{
|
|
3144
3174
|
ref: listboxRef,
|
|
@@ -3147,7 +3177,7 @@ var Select = forwardRef15(
|
|
|
3147
3177
|
size,
|
|
3148
3178
|
...menuProps
|
|
3149
3179
|
}
|
|
3150
|
-
) }) : /* @__PURE__ */
|
|
3180
|
+
) }) : /* @__PURE__ */ jsx69(Popover, { state, triggerRef: buttonRef, scrollRef: listboxRef, children: /* @__PURE__ */ jsx69(
|
|
3151
3181
|
ListBox,
|
|
3152
3182
|
{
|
|
3153
3183
|
ref: listboxRef,
|
|
@@ -3166,7 +3196,7 @@ Select.Option = Item5;
|
|
|
3166
3196
|
Select.Section = Section2;
|
|
3167
3197
|
|
|
3168
3198
|
// src/Slider/Slider.tsx
|
|
3169
|
-
import { forwardRef as
|
|
3199
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
3170
3200
|
import {
|
|
3171
3201
|
Slider,
|
|
3172
3202
|
SliderOutput,
|
|
@@ -3174,12 +3204,12 @@ import {
|
|
|
3174
3204
|
SliderTrack
|
|
3175
3205
|
} from "react-aria-components";
|
|
3176
3206
|
import {
|
|
3177
|
-
cn as
|
|
3207
|
+
cn as cn38,
|
|
3178
3208
|
width as twWidth3,
|
|
3179
3209
|
useClassNames as useClassNames38
|
|
3180
3210
|
} from "@marigold/system";
|
|
3181
|
-
import { jsx as
|
|
3182
|
-
var _Slider =
|
|
3211
|
+
import { jsx as jsx70, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3212
|
+
var _Slider = forwardRef17(
|
|
3183
3213
|
({
|
|
3184
3214
|
thumbLabels,
|
|
3185
3215
|
variant,
|
|
@@ -3200,7 +3230,7 @@ var _Slider = forwardRef16(
|
|
|
3200
3230
|
return /* @__PURE__ */ jsxs30(
|
|
3201
3231
|
Slider,
|
|
3202
3232
|
{
|
|
3203
|
-
className:
|
|
3233
|
+
className: cn38(
|
|
3204
3234
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
3205
3235
|
classNames2.container,
|
|
3206
3236
|
twWidth3[width]
|
|
@@ -3208,16 +3238,16 @@ var _Slider = forwardRef16(
|
|
|
3208
3238
|
ref,
|
|
3209
3239
|
...props,
|
|
3210
3240
|
children: [
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
/* @__PURE__ */
|
|
3241
|
+
/* @__PURE__ */ jsx70(_Label, { children: props.children }),
|
|
3242
|
+
/* @__PURE__ */ jsx70(SliderOutput, { className: cn38("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
3243
|
+
/* @__PURE__ */ jsx70(
|
|
3214
3244
|
SliderTrack,
|
|
3215
3245
|
{
|
|
3216
|
-
className:
|
|
3217
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */
|
|
3246
|
+
className: cn38("relative col-span-2 h-2 w-full", classNames2.track),
|
|
3247
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx70(
|
|
3218
3248
|
SliderThumb,
|
|
3219
3249
|
{
|
|
3220
|
-
className:
|
|
3250
|
+
className: cn38("top-1/2 cursor-pointer", classNames2.thumb),
|
|
3221
3251
|
index: i,
|
|
3222
3252
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
3223
3253
|
},
|
|
@@ -3232,16 +3262,16 @@ var _Slider = forwardRef16(
|
|
|
3232
3262
|
);
|
|
3233
3263
|
|
|
3234
3264
|
// src/Split/Split.tsx
|
|
3235
|
-
import { jsx as
|
|
3236
|
-
var Split = (props) => /* @__PURE__ */
|
|
3265
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
3266
|
+
var Split = (props) => /* @__PURE__ */ jsx71("div", { ...props, role: "separator", className: "grow" });
|
|
3237
3267
|
|
|
3238
3268
|
// src/Stack/Stack.tsx
|
|
3239
3269
|
import {
|
|
3240
3270
|
alignment as alignment3,
|
|
3241
|
-
cn as
|
|
3271
|
+
cn as cn39,
|
|
3242
3272
|
gapSpace as gapSpace6
|
|
3243
3273
|
} from "@marigold/system";
|
|
3244
|
-
import { jsx as
|
|
3274
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
3245
3275
|
var Stack = ({
|
|
3246
3276
|
children,
|
|
3247
3277
|
space = 0,
|
|
@@ -3252,10 +3282,10 @@ var Stack = ({
|
|
|
3252
3282
|
...props
|
|
3253
3283
|
}) => {
|
|
3254
3284
|
var _a, _b, _c, _d;
|
|
3255
|
-
return /* @__PURE__ */
|
|
3285
|
+
return /* @__PURE__ */ jsx72(
|
|
3256
3286
|
"div",
|
|
3257
3287
|
{
|
|
3258
|
-
className:
|
|
3288
|
+
className: cn39(
|
|
3259
3289
|
"flex flex-col",
|
|
3260
3290
|
gapSpace6[space],
|
|
3261
3291
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -3269,15 +3299,15 @@ var Stack = ({
|
|
|
3269
3299
|
};
|
|
3270
3300
|
|
|
3271
3301
|
// src/Switch/Switch.tsx
|
|
3272
|
-
import { forwardRef as
|
|
3302
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
3273
3303
|
import { Switch } from "react-aria-components";
|
|
3274
3304
|
import {
|
|
3275
|
-
cn as
|
|
3305
|
+
cn as cn40,
|
|
3276
3306
|
width as twWidth4,
|
|
3277
3307
|
useClassNames as useClassNames39
|
|
3278
3308
|
} from "@marigold/system";
|
|
3279
|
-
import { jsx as
|
|
3280
|
-
var _Switch =
|
|
3309
|
+
import { jsx as jsx73, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3310
|
+
var _Switch = forwardRef18(
|
|
3281
3311
|
({
|
|
3282
3312
|
variant,
|
|
3283
3313
|
size,
|
|
@@ -3300,25 +3330,25 @@ var _Switch = forwardRef17(
|
|
|
3300
3330
|
{
|
|
3301
3331
|
...props,
|
|
3302
3332
|
ref,
|
|
3303
|
-
className:
|
|
3333
|
+
className: cn40(
|
|
3304
3334
|
twWidth4[width],
|
|
3305
3335
|
"group/switch",
|
|
3306
3336
|
"flex items-center justify-between gap-[1ch]",
|
|
3307
3337
|
classNames2.container
|
|
3308
3338
|
),
|
|
3309
3339
|
children: [
|
|
3310
|
-
/* @__PURE__ */
|
|
3311
|
-
/* @__PURE__ */
|
|
3340
|
+
/* @__PURE__ */ jsx73(_Label, { elementType: "span", children }),
|
|
3341
|
+
/* @__PURE__ */ jsx73("div", { className: "relative", children: /* @__PURE__ */ jsx73(
|
|
3312
3342
|
"div",
|
|
3313
3343
|
{
|
|
3314
|
-
className:
|
|
3344
|
+
className: cn40(
|
|
3315
3345
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
|
|
3316
3346
|
classNames2.track
|
|
3317
3347
|
),
|
|
3318
|
-
children: /* @__PURE__ */
|
|
3348
|
+
children: /* @__PURE__ */ jsx73(
|
|
3319
3349
|
"div",
|
|
3320
3350
|
{
|
|
3321
|
-
className:
|
|
3351
|
+
className: cn40(
|
|
3322
3352
|
"h-[22px] w-[22px]",
|
|
3323
3353
|
"cubic-bezier(.7,0,.3,1)",
|
|
3324
3354
|
"absolute left-0 top-px",
|
|
@@ -3347,7 +3377,7 @@ import {
|
|
|
3347
3377
|
Row,
|
|
3348
3378
|
useTableState
|
|
3349
3379
|
} from "@react-stately/table";
|
|
3350
|
-
import { cn as
|
|
3380
|
+
import { cn as cn45, useClassNames as useClassNames41 } from "@marigold/system";
|
|
3351
3381
|
|
|
3352
3382
|
// src/Table/Context.tsx
|
|
3353
3383
|
import { createContext as createContext6, useContext as useContext7 } from "react";
|
|
@@ -3356,10 +3386,10 @@ var useTableContext = () => useContext7(TableContext);
|
|
|
3356
3386
|
|
|
3357
3387
|
// src/Table/TableBody.tsx
|
|
3358
3388
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3359
|
-
import { jsx as
|
|
3389
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
3360
3390
|
var TableBody = ({ children }) => {
|
|
3361
3391
|
const { rowGroupProps } = useTableRowGroup();
|
|
3362
|
-
return /* @__PURE__ */
|
|
3392
|
+
return /* @__PURE__ */ jsx74("tbody", { ...rowGroupProps, children });
|
|
3363
3393
|
};
|
|
3364
3394
|
|
|
3365
3395
|
// src/Table/TableCell.tsx
|
|
@@ -3368,7 +3398,7 @@ import { useFocusRing as useFocusRing7 } from "@react-aria/focus";
|
|
|
3368
3398
|
import { useTableCell } from "@react-aria/table";
|
|
3369
3399
|
import { mergeProps as mergeProps11 } from "@react-aria/utils";
|
|
3370
3400
|
import { useStateProps as useStateProps11 } from "@marigold/system";
|
|
3371
|
-
import { jsx as
|
|
3401
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
3372
3402
|
var TableCell = ({ cell }) => {
|
|
3373
3403
|
const ref = useRef18(null);
|
|
3374
3404
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
@@ -3391,7 +3421,7 @@ var TableCell = ({ cell }) => {
|
|
|
3391
3421
|
};
|
|
3392
3422
|
const { focusProps, isFocusVisible } = useFocusRing7();
|
|
3393
3423
|
const stateProps = useStateProps11({ disabled, focusVisible: isFocusVisible });
|
|
3394
|
-
return /* @__PURE__ */
|
|
3424
|
+
return /* @__PURE__ */ jsx75(
|
|
3395
3425
|
"td",
|
|
3396
3426
|
{
|
|
3397
3427
|
ref,
|
|
@@ -3408,7 +3438,7 @@ import { useRef as useRef19 } from "react";
|
|
|
3408
3438
|
import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
|
|
3409
3439
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
3410
3440
|
import { mergeProps as mergeProps12 } from "@react-aria/utils";
|
|
3411
|
-
import { cn as
|
|
3441
|
+
import { cn as cn41, useStateProps as useStateProps12 } from "@marigold/system";
|
|
3412
3442
|
|
|
3413
3443
|
// src/Table/utils.ts
|
|
3414
3444
|
var mapCheckboxProps = ({
|
|
@@ -3431,7 +3461,7 @@ var mapCheckboxProps = ({
|
|
|
3431
3461
|
};
|
|
3432
3462
|
|
|
3433
3463
|
// src/Table/TableCheckboxCell.tsx
|
|
3434
|
-
import { jsx as
|
|
3464
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
3435
3465
|
var TableCheckboxCell = ({ cell }) => {
|
|
3436
3466
|
const ref = useRef19(null);
|
|
3437
3467
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -3448,14 +3478,14 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3448
3478
|
);
|
|
3449
3479
|
const { focusProps, isFocusVisible } = useFocusRing8();
|
|
3450
3480
|
const stateProps = useStateProps12({ disabled, focusVisible: isFocusVisible });
|
|
3451
|
-
return /* @__PURE__ */
|
|
3481
|
+
return /* @__PURE__ */ jsx76(
|
|
3452
3482
|
"td",
|
|
3453
3483
|
{
|
|
3454
3484
|
ref,
|
|
3455
|
-
className:
|
|
3485
|
+
className: cn41("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
3456
3486
|
...mergeProps12(gridCellProps, focusProps),
|
|
3457
3487
|
...stateProps,
|
|
3458
|
-
children: /* @__PURE__ */
|
|
3488
|
+
children: /* @__PURE__ */ jsx76(_Checkbox, { ...checkboxProps })
|
|
3459
3489
|
}
|
|
3460
3490
|
);
|
|
3461
3491
|
};
|
|
@@ -3467,9 +3497,9 @@ import { useHover as useHover4 } from "@react-aria/interactions";
|
|
|
3467
3497
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3468
3498
|
import { mergeProps as mergeProps13 } from "@react-aria/utils";
|
|
3469
3499
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
3470
|
-
import { cn as
|
|
3500
|
+
import { cn as cn42, useStateProps as useStateProps13 } from "@marigold/system";
|
|
3471
3501
|
import { width as twWidth5 } from "@marigold/system";
|
|
3472
|
-
import { jsx as
|
|
3502
|
+
import { jsx as jsx77, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3473
3503
|
var TableColumnHeader = ({
|
|
3474
3504
|
column,
|
|
3475
3505
|
width = "auto"
|
|
@@ -3495,12 +3525,12 @@ var TableColumnHeader = ({
|
|
|
3495
3525
|
{
|
|
3496
3526
|
colSpan: column.colspan,
|
|
3497
3527
|
ref,
|
|
3498
|
-
className:
|
|
3528
|
+
className: cn42("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
3499
3529
|
...mergeProps13(columnHeaderProps, hoverProps, focusProps),
|
|
3500
3530
|
...stateProps,
|
|
3501
3531
|
children: [
|
|
3502
3532
|
column.rendered,
|
|
3503
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
3533
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx77(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx77(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx77(SortDown, { className: "inline-block" }))
|
|
3504
3534
|
]
|
|
3505
3535
|
}
|
|
3506
3536
|
);
|
|
@@ -3508,21 +3538,21 @@ var TableColumnHeader = ({
|
|
|
3508
3538
|
|
|
3509
3539
|
// src/Table/TableHeader.tsx
|
|
3510
3540
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
3511
|
-
import { jsx as
|
|
3541
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
3512
3542
|
var TableHeader = ({ children }) => {
|
|
3513
3543
|
const { rowGroupProps } = useTableRowGroup2();
|
|
3514
|
-
return /* @__PURE__ */
|
|
3544
|
+
return /* @__PURE__ */ jsx78("thead", { ...rowGroupProps, children });
|
|
3515
3545
|
};
|
|
3516
3546
|
|
|
3517
3547
|
// src/Table/TableHeaderRow.tsx
|
|
3518
3548
|
import { useRef as useRef21 } from "react";
|
|
3519
3549
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
3520
|
-
import { jsx as
|
|
3550
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
3521
3551
|
var TableHeaderRow = ({ item, children }) => {
|
|
3522
3552
|
const { state } = useTableContext();
|
|
3523
3553
|
const ref = useRef21(null);
|
|
3524
3554
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
3525
|
-
return /* @__PURE__ */
|
|
3555
|
+
return /* @__PURE__ */ jsx79("tr", { ...rowProps, ref, children });
|
|
3526
3556
|
};
|
|
3527
3557
|
|
|
3528
3558
|
// src/Table/TableRow.tsx
|
|
@@ -3531,8 +3561,8 @@ import { useFocusRing as useFocusRing10 } from "@react-aria/focus";
|
|
|
3531
3561
|
import { useHover as useHover5 } from "@react-aria/interactions";
|
|
3532
3562
|
import { useTableRow } from "@react-aria/table";
|
|
3533
3563
|
import { mergeProps as mergeProps14 } from "@react-aria/utils";
|
|
3534
|
-
import { cn as
|
|
3535
|
-
import { jsx as
|
|
3564
|
+
import { cn as cn43, useClassNames as useClassNames40, useStateProps as useStateProps14 } from "@marigold/system";
|
|
3565
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
3536
3566
|
var TableRow = ({ children, row }) => {
|
|
3537
3567
|
const ref = useRef22(null);
|
|
3538
3568
|
const { interactive, state, ...ctx } = useTableContext();
|
|
@@ -3562,11 +3592,11 @@ var TableRow = ({ children, row }) => {
|
|
|
3562
3592
|
focusVisible: isFocusVisible,
|
|
3563
3593
|
active: isPressed
|
|
3564
3594
|
});
|
|
3565
|
-
return /* @__PURE__ */
|
|
3595
|
+
return /* @__PURE__ */ jsx80(
|
|
3566
3596
|
"tr",
|
|
3567
3597
|
{
|
|
3568
3598
|
ref,
|
|
3569
|
-
className:
|
|
3599
|
+
className: cn43(
|
|
3570
3600
|
[
|
|
3571
3601
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
3572
3602
|
],
|
|
@@ -3589,11 +3619,11 @@ import {
|
|
|
3589
3619
|
} from "@react-aria/table";
|
|
3590
3620
|
import { mergeProps as mergeProps15 } from "@react-aria/utils";
|
|
3591
3621
|
import {
|
|
3592
|
-
cn as
|
|
3622
|
+
cn as cn44,
|
|
3593
3623
|
width as twWidth6,
|
|
3594
3624
|
useStateProps as useStateProps15
|
|
3595
3625
|
} from "@marigold/system";
|
|
3596
|
-
import { jsx as
|
|
3626
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3597
3627
|
var TableSelectAllCell = ({
|
|
3598
3628
|
column,
|
|
3599
3629
|
width = "auto"
|
|
@@ -3614,24 +3644,24 @@ var TableSelectAllCell = ({
|
|
|
3614
3644
|
hover: isHovered,
|
|
3615
3645
|
focusVisible: isFocusVisible
|
|
3616
3646
|
});
|
|
3617
|
-
return /* @__PURE__ */
|
|
3647
|
+
return /* @__PURE__ */ jsx81(
|
|
3618
3648
|
"th",
|
|
3619
3649
|
{
|
|
3620
3650
|
ref,
|
|
3621
|
-
className:
|
|
3651
|
+
className: cn44(
|
|
3622
3652
|
twWidth6[width],
|
|
3623
3653
|
["text-center align-middle leading-none"],
|
|
3624
3654
|
classNames2 == null ? void 0 : classNames2.header
|
|
3625
3655
|
),
|
|
3626
3656
|
...mergeProps15(columnHeaderProps, hoverProps, focusProps),
|
|
3627
3657
|
...stateProps,
|
|
3628
|
-
children: /* @__PURE__ */
|
|
3658
|
+
children: /* @__PURE__ */ jsx81(_Checkbox, { ...checkboxProps })
|
|
3629
3659
|
}
|
|
3630
3660
|
);
|
|
3631
3661
|
};
|
|
3632
3662
|
|
|
3633
3663
|
// src/Table/Table.tsx
|
|
3634
|
-
import { jsx as
|
|
3664
|
+
import { jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3635
3665
|
var Table = ({
|
|
3636
3666
|
variant,
|
|
3637
3667
|
size,
|
|
@@ -3654,7 +3684,7 @@ var Table = ({
|
|
|
3654
3684
|
size
|
|
3655
3685
|
});
|
|
3656
3686
|
const { collection } = state;
|
|
3657
|
-
return /* @__PURE__ */
|
|
3687
|
+
return /* @__PURE__ */ jsx82(
|
|
3658
3688
|
TableContext.Provider,
|
|
3659
3689
|
{
|
|
3660
3690
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
@@ -3662,7 +3692,7 @@ var Table = ({
|
|
|
3662
3692
|
"table",
|
|
3663
3693
|
{
|
|
3664
3694
|
ref: tableRef,
|
|
3665
|
-
className:
|
|
3695
|
+
className: cn45(
|
|
3666
3696
|
"group/table",
|
|
3667
3697
|
"border-collapse overflow-auto whitespace-nowrap",
|
|
3668
3698
|
stretch ? "table w-full" : "block",
|
|
@@ -3670,17 +3700,17 @@ var Table = ({
|
|
|
3670
3700
|
),
|
|
3671
3701
|
...gridProps,
|
|
3672
3702
|
children: [
|
|
3673
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ jsx82(TableHeader, { children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx82(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3674
3704
|
(column) => {
|
|
3675
3705
|
var _a, _b, _c;
|
|
3676
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3706
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx82(
|
|
3677
3707
|
TableSelectAllCell,
|
|
3678
3708
|
{
|
|
3679
3709
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
3680
3710
|
column
|
|
3681
3711
|
},
|
|
3682
3712
|
column.key
|
|
3683
|
-
) : /* @__PURE__ */
|
|
3713
|
+
) : /* @__PURE__ */ jsx82(
|
|
3684
3714
|
TableColumnHeader,
|
|
3685
3715
|
{
|
|
3686
3716
|
width: (_c = column.props) == null ? void 0 : _c.width,
|
|
@@ -3692,10 +3722,10 @@ var Table = ({
|
|
|
3692
3722
|
) }, headerRow.key)) }),
|
|
3693
3723
|
/* @__PURE__ */ jsxs33(TableBody, { children: [
|
|
3694
3724
|
...collection.rows.map(
|
|
3695
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3725
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx82(TableRow, { row, children: [...collection.getChildren(row.key)].map(
|
|
3696
3726
|
(cell) => {
|
|
3697
3727
|
var _a;
|
|
3698
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3728
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx82(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx82(TableCell, { cell }, cell.key);
|
|
3699
3729
|
}
|
|
3700
3730
|
) }, row.key)
|
|
3701
3731
|
)
|
|
@@ -3714,7 +3744,7 @@ Table.Row = Row;
|
|
|
3714
3744
|
|
|
3715
3745
|
// src/Text/Text.tsx
|
|
3716
3746
|
import {
|
|
3717
|
-
cn as
|
|
3747
|
+
cn as cn46,
|
|
3718
3748
|
createVar as createVar9,
|
|
3719
3749
|
cursorStyle,
|
|
3720
3750
|
fontWeight,
|
|
@@ -3725,7 +3755,7 @@ import {
|
|
|
3725
3755
|
useClassNames as useClassNames42,
|
|
3726
3756
|
useTheme as useTheme6
|
|
3727
3757
|
} from "@marigold/system";
|
|
3728
|
-
import { jsx as
|
|
3758
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
3729
3759
|
var Text2 = ({
|
|
3730
3760
|
variant,
|
|
3731
3761
|
size,
|
|
@@ -3744,11 +3774,11 @@ var Text2 = ({
|
|
|
3744
3774
|
variant,
|
|
3745
3775
|
size
|
|
3746
3776
|
});
|
|
3747
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ jsx83(
|
|
3748
3778
|
"p",
|
|
3749
3779
|
{
|
|
3750
3780
|
...props,
|
|
3751
|
-
className:
|
|
3781
|
+
className: cn46(
|
|
3752
3782
|
classNames2,
|
|
3753
3783
|
"text-[--color] outline-[--outline]",
|
|
3754
3784
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3771,11 +3801,11 @@ var Text2 = ({
|
|
|
3771
3801
|
};
|
|
3772
3802
|
|
|
3773
3803
|
// src/TextArea/TextArea.tsx
|
|
3774
|
-
import { forwardRef as
|
|
3804
|
+
import { forwardRef as forwardRef19 } from "react";
|
|
3775
3805
|
import { TextArea, TextField } from "react-aria-components";
|
|
3776
3806
|
import { useClassNames as useClassNames43 } from "@marigold/system";
|
|
3777
|
-
import { jsx as
|
|
3778
|
-
var _TextArea =
|
|
3807
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3808
|
+
var _TextArea = forwardRef19(
|
|
3779
3809
|
({
|
|
3780
3810
|
variant,
|
|
3781
3811
|
size,
|
|
@@ -3794,15 +3824,15 @@ var _TextArea = forwardRef18(
|
|
|
3794
3824
|
isRequired: required,
|
|
3795
3825
|
...rest
|
|
3796
3826
|
};
|
|
3797
|
-
return /* @__PURE__ */
|
|
3827
|
+
return /* @__PURE__ */ jsx84(FieldBase2, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx84(TextArea, { className: classNames2, ref, rows }) });
|
|
3798
3828
|
}
|
|
3799
3829
|
);
|
|
3800
3830
|
|
|
3801
3831
|
// src/TextField/TextField.tsx
|
|
3802
|
-
import { forwardRef as
|
|
3832
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
3803
3833
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3804
|
-
import { jsx as
|
|
3805
|
-
var _TextField =
|
|
3834
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
3835
|
+
var _TextField = forwardRef20(
|
|
3806
3836
|
({
|
|
3807
3837
|
variant,
|
|
3808
3838
|
size,
|
|
@@ -3819,13 +3849,13 @@ var _TextField = forwardRef19(
|
|
|
3819
3849
|
isRequired: required,
|
|
3820
3850
|
...rest
|
|
3821
3851
|
};
|
|
3822
|
-
return /* @__PURE__ */
|
|
3852
|
+
return /* @__PURE__ */ jsx85(FieldBase2, { as: TextField2, ...props, children: /* @__PURE__ */ jsx85(_Input, { ref }) });
|
|
3823
3853
|
}
|
|
3824
3854
|
);
|
|
3825
3855
|
|
|
3826
3856
|
// src/Tiles/Tiles.tsx
|
|
3827
|
-
import { cn as
|
|
3828
|
-
import { jsx as
|
|
3857
|
+
import { cn as cn47, createVar as createVar10, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3858
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
3829
3859
|
var Tiles = ({
|
|
3830
3860
|
space = 0,
|
|
3831
3861
|
stretch = false,
|
|
@@ -3838,11 +3868,11 @@ var Tiles = ({
|
|
|
3838
3868
|
if (stretch) {
|
|
3839
3869
|
column = `minmax(${column}, 1fr)`;
|
|
3840
3870
|
}
|
|
3841
|
-
return /* @__PURE__ */
|
|
3871
|
+
return /* @__PURE__ */ jsx86(
|
|
3842
3872
|
"div",
|
|
3843
3873
|
{
|
|
3844
3874
|
...props,
|
|
3845
|
-
className:
|
|
3875
|
+
className: cn47(
|
|
3846
3876
|
"grid",
|
|
3847
3877
|
gapSpace7[space],
|
|
3848
3878
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
@@ -3856,11 +3886,11 @@ var Tiles = ({
|
|
|
3856
3886
|
|
|
3857
3887
|
// src/Tooltip/Tooltip.tsx
|
|
3858
3888
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3859
|
-
import { cn as
|
|
3889
|
+
import { cn as cn48, useClassNames as useClassNames44 } from "@marigold/system";
|
|
3860
3890
|
|
|
3861
3891
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3862
3892
|
import { TooltipTrigger } from "react-aria-components";
|
|
3863
|
-
import { jsx as
|
|
3893
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
3864
3894
|
var _TooltipTrigger = ({
|
|
3865
3895
|
delay = 1e3,
|
|
3866
3896
|
children,
|
|
@@ -3874,19 +3904,19 @@ var _TooltipTrigger = ({
|
|
|
3874
3904
|
isOpen: open,
|
|
3875
3905
|
delay
|
|
3876
3906
|
};
|
|
3877
|
-
return /* @__PURE__ */
|
|
3907
|
+
return /* @__PURE__ */ jsx87(TooltipTrigger, { ...props, children });
|
|
3878
3908
|
};
|
|
3879
3909
|
|
|
3880
3910
|
// src/Tooltip/Tooltip.tsx
|
|
3881
|
-
import { jsx as
|
|
3911
|
+
import { jsx as jsx88, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3882
3912
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3883
3913
|
const props = {
|
|
3884
3914
|
...rest,
|
|
3885
3915
|
isOpen: open
|
|
3886
3916
|
};
|
|
3887
3917
|
const classNames2 = useClassNames44({ component: "Tooltip", variant, size });
|
|
3888
|
-
return /* @__PURE__ */ jsxs34(Tooltip, { ...props, className:
|
|
3889
|
-
/* @__PURE__ */
|
|
3918
|
+
return /* @__PURE__ */ jsxs34(Tooltip, { ...props, className: cn48("group/tooltip", classNames2.container), children: [
|
|
3919
|
+
/* @__PURE__ */ jsx88(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx88("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx88("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3890
3920
|
children
|
|
3891
3921
|
] });
|
|
3892
3922
|
};
|
|
@@ -3907,12 +3937,12 @@ import { useButton as useButton4 } from "@react-aria/button";
|
|
|
3907
3937
|
import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
|
|
3908
3938
|
import { useTag } from "@react-aria/tag";
|
|
3909
3939
|
import { mergeProps as mergeProps16 } from "@react-aria/utils";
|
|
3910
|
-
import { cn as
|
|
3911
|
-
import { jsx as
|
|
3940
|
+
import { cn as cn49, useClassNames as useClassNames45 } from "@marigold/system";
|
|
3941
|
+
import { jsx as jsx89, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3912
3942
|
var CloseButton2 = ({ className, ...props }) => {
|
|
3913
3943
|
const ref = useRef25(null);
|
|
3914
3944
|
const { buttonProps } = useButton4({ ...props }, ref);
|
|
3915
|
-
return /* @__PURE__ */
|
|
3945
|
+
return /* @__PURE__ */ jsx89("button", { className, ...buttonProps, children: /* @__PURE__ */ jsx89("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx89("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
3916
3946
|
};
|
|
3917
3947
|
var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
3918
3948
|
const props = {
|
|
@@ -3930,19 +3960,19 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
3930
3960
|
ref
|
|
3931
3961
|
);
|
|
3932
3962
|
const classNames2 = useClassNames45({ component: "Tag", variant, size });
|
|
3933
|
-
return /* @__PURE__ */
|
|
3963
|
+
return /* @__PURE__ */ jsx89(
|
|
3934
3964
|
"span",
|
|
3935
3965
|
{
|
|
3936
3966
|
ref,
|
|
3937
3967
|
...mergeProps16(rowProps, focusProps),
|
|
3938
3968
|
className: classNames2.tag,
|
|
3939
3969
|
children: /* @__PURE__ */ jsxs35("div", { ...gridCellProps, className: classNames2.gridCell, children: [
|
|
3940
|
-
/* @__PURE__ */
|
|
3941
|
-
allowsRemoving && /* @__PURE__ */
|
|
3970
|
+
/* @__PURE__ */ jsx89("span", { children: item.rendered }),
|
|
3971
|
+
allowsRemoving && /* @__PURE__ */ jsx89(
|
|
3942
3972
|
CloseButton2,
|
|
3943
3973
|
{
|
|
3944
3974
|
...removeButtonProps,
|
|
3945
|
-
className:
|
|
3975
|
+
className: cn49("flex items-center", classNames2.closeButton)
|
|
3946
3976
|
}
|
|
3947
3977
|
)
|
|
3948
3978
|
] })
|
|
@@ -3951,7 +3981,7 @@ var Tag = ({ variant, size, item, state, ...rest }) => {
|
|
|
3951
3981
|
};
|
|
3952
3982
|
|
|
3953
3983
|
// src/TagGroup/TagGroup.tsx
|
|
3954
|
-
import { jsx as
|
|
3984
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
3955
3985
|
import { createElement } from "react";
|
|
3956
3986
|
var TagGroup = ({
|
|
3957
3987
|
width,
|
|
@@ -3972,7 +4002,7 @@ var TagGroup = ({
|
|
|
3972
4002
|
error,
|
|
3973
4003
|
required
|
|
3974
4004
|
});
|
|
3975
|
-
return /* @__PURE__ */
|
|
4005
|
+
return /* @__PURE__ */ jsx90(
|
|
3976
4006
|
FieldBase,
|
|
3977
4007
|
{
|
|
3978
4008
|
width,
|
|
@@ -3985,7 +4015,7 @@ var TagGroup = ({
|
|
|
3985
4015
|
errorMessageProps,
|
|
3986
4016
|
stateProps,
|
|
3987
4017
|
...gridProps,
|
|
3988
|
-
children: /* @__PURE__ */
|
|
4018
|
+
children: /* @__PURE__ */ jsx90(
|
|
3989
4019
|
"div",
|
|
3990
4020
|
{
|
|
3991
4021
|
role: "presentation",
|
|
@@ -4017,10 +4047,10 @@ Tag2.Group = TagGroup;
|
|
|
4017
4047
|
import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
4018
4048
|
|
|
4019
4049
|
// src/XLoader/XLoader.tsx
|
|
4020
|
-
import { forwardRef as
|
|
4050
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
4021
4051
|
import { SVG as SVG6 } from "@marigold/system";
|
|
4022
|
-
import { jsx as
|
|
4023
|
-
var XLoader =
|
|
4052
|
+
import { jsx as jsx91, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4053
|
+
var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
|
|
4024
4054
|
SVG6,
|
|
4025
4055
|
{
|
|
4026
4056
|
id: "XLoader",
|
|
@@ -4030,13 +4060,13 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4030
4060
|
...props,
|
|
4031
4061
|
...ref,
|
|
4032
4062
|
children: [
|
|
4033
|
-
/* @__PURE__ */
|
|
4034
|
-
/* @__PURE__ */
|
|
4063
|
+
/* @__PURE__ */ jsx91("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
4064
|
+
/* @__PURE__ */ jsx91(
|
|
4035
4065
|
"path",
|
|
4036
4066
|
{
|
|
4037
4067
|
id: "XMLID_5_",
|
|
4038
4068
|
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",
|
|
4039
|
-
children: /* @__PURE__ */
|
|
4069
|
+
children: /* @__PURE__ */ jsx91(
|
|
4040
4070
|
"animate",
|
|
4041
4071
|
{
|
|
4042
4072
|
attributeName: "opacity",
|
|
@@ -4049,12 +4079,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4049
4079
|
)
|
|
4050
4080
|
}
|
|
4051
4081
|
),
|
|
4052
|
-
/* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ jsx91(
|
|
4053
4083
|
"path",
|
|
4054
4084
|
{
|
|
4055
4085
|
id: "XMLID_18_",
|
|
4056
4086
|
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",
|
|
4057
|
-
children: /* @__PURE__ */
|
|
4087
|
+
children: /* @__PURE__ */ jsx91(
|
|
4058
4088
|
"animate",
|
|
4059
4089
|
{
|
|
4060
4090
|
attributeName: "opacity",
|
|
@@ -4067,12 +4097,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4067
4097
|
)
|
|
4068
4098
|
}
|
|
4069
4099
|
),
|
|
4070
|
-
/* @__PURE__ */
|
|
4100
|
+
/* @__PURE__ */ jsx91(
|
|
4071
4101
|
"path",
|
|
4072
4102
|
{
|
|
4073
4103
|
id: "XMLID_19_",
|
|
4074
4104
|
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",
|
|
4075
|
-
children: /* @__PURE__ */
|
|
4105
|
+
children: /* @__PURE__ */ jsx91(
|
|
4076
4106
|
"animate",
|
|
4077
4107
|
{
|
|
4078
4108
|
attributeName: "opacity",
|
|
@@ -4085,12 +4115,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4085
4115
|
)
|
|
4086
4116
|
}
|
|
4087
4117
|
),
|
|
4088
|
-
/* @__PURE__ */
|
|
4118
|
+
/* @__PURE__ */ jsx91(
|
|
4089
4119
|
"path",
|
|
4090
4120
|
{
|
|
4091
4121
|
id: "XMLID_20_",
|
|
4092
4122
|
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",
|
|
4093
|
-
children: /* @__PURE__ */
|
|
4123
|
+
children: /* @__PURE__ */ jsx91(
|
|
4094
4124
|
"animate",
|
|
4095
4125
|
{
|
|
4096
4126
|
attributeName: "opacity",
|
|
@@ -4103,12 +4133,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4103
4133
|
)
|
|
4104
4134
|
}
|
|
4105
4135
|
),
|
|
4106
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ jsx91(
|
|
4107
4137
|
"path",
|
|
4108
4138
|
{
|
|
4109
4139
|
id: "XMLID_21_",
|
|
4110
4140
|
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",
|
|
4111
|
-
children: /* @__PURE__ */
|
|
4141
|
+
children: /* @__PURE__ */ jsx91(
|
|
4112
4142
|
"animate",
|
|
4113
4143
|
{
|
|
4114
4144
|
attributeName: "opacity",
|
|
@@ -4121,12 +4151,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4121
4151
|
)
|
|
4122
4152
|
}
|
|
4123
4153
|
),
|
|
4124
|
-
/* @__PURE__ */
|
|
4154
|
+
/* @__PURE__ */ jsx91(
|
|
4125
4155
|
"path",
|
|
4126
4156
|
{
|
|
4127
4157
|
id: "XMLID_22_",
|
|
4128
4158
|
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",
|
|
4129
|
-
children: /* @__PURE__ */
|
|
4159
|
+
children: /* @__PURE__ */ jsx91(
|
|
4130
4160
|
"animate",
|
|
4131
4161
|
{
|
|
4132
4162
|
attributeName: "opacity",
|
|
@@ -4139,12 +4169,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4139
4169
|
)
|
|
4140
4170
|
}
|
|
4141
4171
|
),
|
|
4142
|
-
/* @__PURE__ */
|
|
4172
|
+
/* @__PURE__ */ jsx91(
|
|
4143
4173
|
"path",
|
|
4144
4174
|
{
|
|
4145
4175
|
id: "XMLID_23_",
|
|
4146
4176
|
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",
|
|
4147
|
-
children: /* @__PURE__ */
|
|
4177
|
+
children: /* @__PURE__ */ jsx91(
|
|
4148
4178
|
"animate",
|
|
4149
4179
|
{
|
|
4150
4180
|
attributeName: "opacity",
|
|
@@ -4157,12 +4187,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4157
4187
|
)
|
|
4158
4188
|
}
|
|
4159
4189
|
),
|
|
4160
|
-
/* @__PURE__ */
|
|
4190
|
+
/* @__PURE__ */ jsx91(
|
|
4161
4191
|
"path",
|
|
4162
4192
|
{
|
|
4163
4193
|
id: "XMLID_24_",
|
|
4164
4194
|
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",
|
|
4165
|
-
children: /* @__PURE__ */
|
|
4195
|
+
children: /* @__PURE__ */ jsx91(
|
|
4166
4196
|
"animate",
|
|
4167
4197
|
{
|
|
4168
4198
|
attributeName: "opacity",
|
|
@@ -4175,12 +4205,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4175
4205
|
)
|
|
4176
4206
|
}
|
|
4177
4207
|
),
|
|
4178
|
-
/* @__PURE__ */
|
|
4208
|
+
/* @__PURE__ */ jsx91(
|
|
4179
4209
|
"path",
|
|
4180
4210
|
{
|
|
4181
4211
|
id: "XMLID_25_",
|
|
4182
4212
|
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",
|
|
4183
|
-
children: /* @__PURE__ */
|
|
4213
|
+
children: /* @__PURE__ */ jsx91(
|
|
4184
4214
|
"animate",
|
|
4185
4215
|
{
|
|
4186
4216
|
attributeName: "opacity",
|
|
@@ -4193,12 +4223,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4193
4223
|
)
|
|
4194
4224
|
}
|
|
4195
4225
|
),
|
|
4196
|
-
/* @__PURE__ */
|
|
4226
|
+
/* @__PURE__ */ jsx91(
|
|
4197
4227
|
"path",
|
|
4198
4228
|
{
|
|
4199
4229
|
id: "XMLID_26_",
|
|
4200
4230
|
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",
|
|
4201
|
-
children: /* @__PURE__ */
|
|
4231
|
+
children: /* @__PURE__ */ jsx91(
|
|
4202
4232
|
"animate",
|
|
4203
4233
|
{
|
|
4204
4234
|
attributeName: "opacity",
|
|
@@ -4211,12 +4241,12 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4211
4241
|
)
|
|
4212
4242
|
}
|
|
4213
4243
|
),
|
|
4214
|
-
/* @__PURE__ */
|
|
4244
|
+
/* @__PURE__ */ jsx91(
|
|
4215
4245
|
"path",
|
|
4216
4246
|
{
|
|
4217
4247
|
id: "XMLID_27_",
|
|
4218
4248
|
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",
|
|
4219
|
-
children: /* @__PURE__ */
|
|
4249
|
+
children: /* @__PURE__ */ jsx91(
|
|
4220
4250
|
"animate",
|
|
4221
4251
|
{
|
|
4222
4252
|
attributeName: "opacity",
|
|
@@ -4234,11 +4264,8 @@ var XLoader = forwardRef20((props, ref) => /* @__PURE__ */ jsxs36(
|
|
|
4234
4264
|
));
|
|
4235
4265
|
|
|
4236
4266
|
// src/Tabs/Tabs.tsx
|
|
4237
|
-
import {
|
|
4238
|
-
import {
|
|
4239
|
-
import { Item as Item7 } from "@react-stately/collections";
|
|
4240
|
-
import { useTabListState } from "@react-stately/tabs";
|
|
4241
|
-
import { cn as cn51, gapSpace as gapSpace8, useClassNames as useClassNames46 } from "@marigold/system";
|
|
4267
|
+
import { Tabs } from "react-aria-components";
|
|
4268
|
+
import { useClassNames as useClassNames46 } from "@marigold/system";
|
|
4242
4269
|
|
|
4243
4270
|
// src/Tabs/Context.ts
|
|
4244
4271
|
import { createContext as createContext7, useContext as useContext8 } from "react";
|
|
@@ -4246,89 +4273,65 @@ var TabContext = createContext7({});
|
|
|
4246
4273
|
var useTabContext = () => useContext8(TabContext);
|
|
4247
4274
|
|
|
4248
4275
|
// src/Tabs/Tab.tsx
|
|
4249
|
-
import {
|
|
4250
|
-
import {
|
|
4251
|
-
import {
|
|
4252
|
-
|
|
4253
|
-
import { cn as cn49, useStateProps as useStateProps17 } from "@marigold/system";
|
|
4254
|
-
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
4255
|
-
var Tab = ({ item, state }) => {
|
|
4256
|
-
const { key, rendered } = item;
|
|
4257
|
-
const ref = useRef27(null);
|
|
4258
|
-
const { tabProps, isSelected } = useTab({ key }, state, ref);
|
|
4259
|
-
const disabled = tabProps["aria-disabled"];
|
|
4260
|
-
const { hoverProps, isHovered } = useHover7({
|
|
4261
|
-
isDisabled: disabled || isSelected
|
|
4262
|
-
});
|
|
4263
|
-
const { focusProps } = useFocus({});
|
|
4264
|
-
const stateProps = useStateProps17({ active: isSelected, hover: isHovered });
|
|
4276
|
+
import { Tab } from "react-aria-components";
|
|
4277
|
+
import { cn as cn50 } from "@marigold/system";
|
|
4278
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
4279
|
+
var _Tab = (props) => {
|
|
4265
4280
|
const { classNames: classNames2 } = useTabContext();
|
|
4266
|
-
return /* @__PURE__ */
|
|
4267
|
-
|
|
4281
|
+
return /* @__PURE__ */ jsx92(
|
|
4282
|
+
Tab,
|
|
4268
4283
|
{
|
|
4269
|
-
|
|
4284
|
+
...props,
|
|
4285
|
+
className: cn50(
|
|
4270
4286
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
4271
4287
|
classNames2.tab
|
|
4272
4288
|
),
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4289
|
+
children: props.children
|
|
4290
|
+
}
|
|
4291
|
+
);
|
|
4292
|
+
};
|
|
4293
|
+
|
|
4294
|
+
// src/Tabs/TabList.tsx
|
|
4295
|
+
import { TabList } from "react-aria-components";
|
|
4296
|
+
import { cn as cn51, gapSpace as gapSpace8 } from "@marigold/system";
|
|
4297
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
4298
|
+
var _TabList = ({ space = 2, ...props }) => {
|
|
4299
|
+
const { classNames: classNames2 } = useTabContext();
|
|
4300
|
+
return /* @__PURE__ */ jsx93(
|
|
4301
|
+
TabList,
|
|
4302
|
+
{
|
|
4303
|
+
...props,
|
|
4304
|
+
className: cn51("flex", gapSpace8[space], classNames2.tabsList),
|
|
4305
|
+
children: props.children
|
|
4276
4306
|
}
|
|
4277
4307
|
);
|
|
4278
4308
|
};
|
|
4279
4309
|
|
|
4280
4310
|
// src/Tabs/TabPanel.tsx
|
|
4281
|
-
import {
|
|
4282
|
-
import {
|
|
4283
|
-
|
|
4284
|
-
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
4285
|
-
var TabPanel = ({ state, ...props }) => {
|
|
4286
|
-
var _a;
|
|
4287
|
-
const ref = useRef28(null);
|
|
4288
|
-
const { tabPanelProps } = useTabPanel(props, state, ref);
|
|
4289
|
-
const selectedItemProps = (_a = state.selectedItem) == null ? void 0 : _a.props;
|
|
4311
|
+
import { TabPanel } from "react-aria-components";
|
|
4312
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
4313
|
+
var _TabPanel = (props) => {
|
|
4290
4314
|
const { classNames: classNames2 } = useTabContext();
|
|
4291
|
-
return /* @__PURE__ */
|
|
4315
|
+
return /* @__PURE__ */ jsx94(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
4292
4316
|
};
|
|
4293
4317
|
|
|
4294
4318
|
// src/Tabs/Tabs.tsx
|
|
4295
|
-
import { jsx as
|
|
4296
|
-
var
|
|
4297
|
-
space = 2,
|
|
4298
|
-
size = "medium",
|
|
4299
|
-
disabled,
|
|
4300
|
-
variant,
|
|
4301
|
-
...rest
|
|
4302
|
-
}) => {
|
|
4303
|
-
var _a;
|
|
4304
|
-
const ref = useRef29(null);
|
|
4319
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
4320
|
+
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
4305
4321
|
const props = {
|
|
4306
4322
|
isDisabled: disabled,
|
|
4307
4323
|
...rest
|
|
4308
4324
|
};
|
|
4309
|
-
const state = useTabListState(props);
|
|
4310
|
-
const { tabListProps } = useTabList(props, state, ref);
|
|
4311
4325
|
const classNames2 = useClassNames46({
|
|
4312
4326
|
component: "Tabs",
|
|
4313
4327
|
size,
|
|
4314
4328
|
variant
|
|
4315
4329
|
});
|
|
4316
|
-
return /* @__PURE__ */
|
|
4317
|
-
/* @__PURE__ */ jsx93(
|
|
4318
|
-
"div",
|
|
4319
|
-
{
|
|
4320
|
-
className: cn51("flex", gapSpace8[space], classNames2.tabs),
|
|
4321
|
-
...tabListProps,
|
|
4322
|
-
ref,
|
|
4323
|
-
children: [...state.collection].map((item) => {
|
|
4324
|
-
return /* @__PURE__ */ jsx93(Tab, { item, state }, item.key);
|
|
4325
|
-
})
|
|
4326
|
-
}
|
|
4327
|
-
),
|
|
4328
|
-
/* @__PURE__ */ jsx93(TabPanel, { state }, (_a = state.selectedItem) == null ? void 0 : _a.key)
|
|
4329
|
-
] }) });
|
|
4330
|
+
return /* @__PURE__ */ jsx95(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx95(Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
4330
4331
|
};
|
|
4331
|
-
|
|
4332
|
+
_Tabs.List = _TabList;
|
|
4333
|
+
_Tabs.TabPanel = _TabPanel;
|
|
4334
|
+
_Tabs.Item = _Tab;
|
|
4332
4335
|
export {
|
|
4333
4336
|
Accordion,
|
|
4334
4337
|
AccordionItem,
|
|
@@ -4376,13 +4379,14 @@ export {
|
|
|
4376
4379
|
Popover,
|
|
4377
4380
|
_Radio as Radio,
|
|
4378
4381
|
_RadioGroup as RadioGroup,
|
|
4382
|
+
_SearchField as SearchField,
|
|
4379
4383
|
Select,
|
|
4380
4384
|
_Slider as Slider,
|
|
4381
4385
|
Split,
|
|
4382
4386
|
Stack,
|
|
4383
4387
|
_Switch as Switch,
|
|
4384
4388
|
Table,
|
|
4385
|
-
Tabs,
|
|
4389
|
+
_Tabs as Tabs,
|
|
4386
4390
|
Tag2 as Tag,
|
|
4387
4391
|
Text2 as Text,
|
|
4388
4392
|
_TextArea as TextArea,
|
|
@@ -4395,8 +4399,6 @@ export {
|
|
|
4395
4399
|
Underlay,
|
|
4396
4400
|
VisuallyHidden,
|
|
4397
4401
|
XLoader,
|
|
4398
|
-
_Slider,
|
|
4399
|
-
_TextArea,
|
|
4400
4402
|
useAsyncList,
|
|
4401
4403
|
useFieldGroupContext,
|
|
4402
4404
|
useListData,
|