@marigold/components 6.6.4 → 6.8.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 +38 -35
- package/dist/index.d.ts +38 -35
- package/dist/index.js +405 -432
- package/dist/index.mjs +361 -388
- package/package.json +63 -63
package/dist/index.mjs
CHANGED
|
@@ -1296,71 +1296,140 @@ var _Checkbox = forwardRef9(
|
|
|
1296
1296
|
);
|
|
1297
1297
|
|
|
1298
1298
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1299
|
-
import {
|
|
1300
|
-
import {
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
} from "
|
|
1304
|
-
import {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
var
|
|
1299
|
+
import { CheckboxGroup } from "react-aria-components";
|
|
1300
|
+
import { useClassNames as useClassNames16 } from "@marigold/system";
|
|
1301
|
+
|
|
1302
|
+
// src/FieldBase/_FieldBase.tsx
|
|
1303
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
1304
|
+
import { cn as cn17, width as twWidth2, useClassNames as useClassNames15 } from "@marigold/system";
|
|
1305
|
+
|
|
1306
|
+
// src/HelpText/_HelpText.tsx
|
|
1307
|
+
import { FieldError, Text } from "react-aria-components";
|
|
1308
|
+
import { cn as cn16, useClassNames as useClassNames14 } from "@marigold/system";
|
|
1309
|
+
import { jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1310
|
+
var HelpText2 = ({
|
|
1311
1311
|
variant,
|
|
1312
1312
|
size,
|
|
1313
|
+
description,
|
|
1314
|
+
error,
|
|
1315
|
+
errorMessage,
|
|
1316
|
+
isInvalid,
|
|
1317
|
+
...props
|
|
1318
|
+
}) => {
|
|
1319
|
+
const hasErrorMessage = errorMessage && error;
|
|
1320
|
+
const classNames2 = useClassNames14({
|
|
1321
|
+
component: "HelpText",
|
|
1322
|
+
variant,
|
|
1323
|
+
size
|
|
1324
|
+
});
|
|
1325
|
+
if (!description && !errorMessage) {
|
|
1326
|
+
return null;
|
|
1327
|
+
}
|
|
1328
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn16(classNames2.container), children: [
|
|
1329
|
+
/* @__PURE__ */ jsxs14(
|
|
1330
|
+
FieldError,
|
|
1331
|
+
{
|
|
1332
|
+
...props,
|
|
1333
|
+
className: "grid grid-flow-col items-center justify-start gap-1",
|
|
1334
|
+
children: [
|
|
1335
|
+
/* @__PURE__ */ jsx30(
|
|
1336
|
+
"svg",
|
|
1337
|
+
{
|
|
1338
|
+
className: cn16("h-4 w-4", classNames2.icon),
|
|
1339
|
+
viewBox: "0 0 24 24",
|
|
1340
|
+
role: "presentation",
|
|
1341
|
+
fill: "currentColor",
|
|
1342
|
+
children: /* @__PURE__ */ jsx30("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" })
|
|
1343
|
+
}
|
|
1344
|
+
),
|
|
1345
|
+
errorMessage
|
|
1346
|
+
]
|
|
1347
|
+
}
|
|
1348
|
+
),
|
|
1349
|
+
!hasErrorMessage && /* @__PURE__ */ jsx30(Text, { slot: "description", children: description })
|
|
1350
|
+
] });
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
// src/FieldBase/_FieldBase.tsx
|
|
1354
|
+
import { jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1355
|
+
var fixedForwardRef = forwardRef10;
|
|
1356
|
+
var _FieldBase = (props, ref) => {
|
|
1357
|
+
const {
|
|
1358
|
+
as: Component = "div",
|
|
1359
|
+
children,
|
|
1360
|
+
label,
|
|
1361
|
+
size,
|
|
1362
|
+
variant,
|
|
1363
|
+
width = "full",
|
|
1364
|
+
description,
|
|
1365
|
+
errorMessage,
|
|
1366
|
+
className,
|
|
1367
|
+
...rest
|
|
1368
|
+
} = props;
|
|
1369
|
+
const classNames2 = useClassNames15({
|
|
1370
|
+
component: "Field",
|
|
1371
|
+
variant,
|
|
1372
|
+
size
|
|
1373
|
+
});
|
|
1374
|
+
return /* @__PURE__ */ jsxs15(
|
|
1375
|
+
Component,
|
|
1376
|
+
{
|
|
1377
|
+
ref,
|
|
1378
|
+
className: cn17("group/field", twWidth2[width], classNames2, className),
|
|
1379
|
+
"data-required": props.isRequired ? true : void 0,
|
|
1380
|
+
...rest,
|
|
1381
|
+
children: [
|
|
1382
|
+
label ? /* @__PURE__ */ jsx31(_Label, { variant, size, children: label }) : /* @__PURE__ */ jsx31("span", { "aria-hidden": "true" }),
|
|
1383
|
+
children,
|
|
1384
|
+
/* @__PURE__ */ jsx31(
|
|
1385
|
+
HelpText2,
|
|
1386
|
+
{
|
|
1387
|
+
variant,
|
|
1388
|
+
size,
|
|
1389
|
+
description,
|
|
1390
|
+
errorMessage,
|
|
1391
|
+
error: props.isInvalid
|
|
1392
|
+
}
|
|
1393
|
+
)
|
|
1394
|
+
]
|
|
1395
|
+
}
|
|
1396
|
+
);
|
|
1397
|
+
};
|
|
1398
|
+
var FieldBase2 = fixedForwardRef(_FieldBase);
|
|
1399
|
+
|
|
1400
|
+
// src/Checkbox/CheckboxGroup.tsx
|
|
1401
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1402
|
+
var _CheckboxGroup = ({
|
|
1313
1403
|
children,
|
|
1404
|
+
variant,
|
|
1405
|
+
size,
|
|
1314
1406
|
required,
|
|
1315
1407
|
disabled,
|
|
1316
1408
|
readOnly,
|
|
1317
1409
|
error,
|
|
1318
|
-
width,
|
|
1319
1410
|
...rest
|
|
1320
1411
|
}) => {
|
|
1412
|
+
const classNames2 = useClassNames16({
|
|
1413
|
+
component: "Checkbox",
|
|
1414
|
+
variant,
|
|
1415
|
+
size,
|
|
1416
|
+
className: { group: "flex flex-col items-start gap-[0.5ch]" }
|
|
1417
|
+
});
|
|
1321
1418
|
const props = {
|
|
1419
|
+
className: classNames2.group,
|
|
1322
1420
|
isRequired: required,
|
|
1323
1421
|
isDisabled: disabled,
|
|
1324
1422
|
isReadOnly: readOnly,
|
|
1325
|
-
|
|
1423
|
+
isInvalid: error,
|
|
1326
1424
|
...rest
|
|
1327
1425
|
};
|
|
1328
|
-
|
|
1329
|
-
const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(props, state);
|
|
1330
|
-
const classNames2 = useClassNames14({
|
|
1331
|
-
component: "Checkbox",
|
|
1332
|
-
variant,
|
|
1333
|
-
size,
|
|
1334
|
-
className: { group: "flex flex-col items-start gap-[0.5ch]" }
|
|
1335
|
-
});
|
|
1336
|
-
const stateProps = useStateProps4({
|
|
1337
|
-
disabled,
|
|
1338
|
-
readOnly,
|
|
1339
|
-
error
|
|
1340
|
-
});
|
|
1341
|
-
return /* @__PURE__ */ jsx30(
|
|
1342
|
-
FieldBase,
|
|
1343
|
-
{
|
|
1344
|
-
label: props.label,
|
|
1345
|
-
labelProps: { elementType: "span", ...labelProps },
|
|
1346
|
-
description: props.description,
|
|
1347
|
-
descriptionProps,
|
|
1348
|
-
error,
|
|
1349
|
-
errorMessage: props.errorMessage,
|
|
1350
|
-
errorMessageProps,
|
|
1351
|
-
disabled,
|
|
1352
|
-
stateProps,
|
|
1353
|
-
width,
|
|
1354
|
-
...groupProps,
|
|
1355
|
-
children: /* @__PURE__ */ jsx30("div", { role: "presentation", className: classNames2.group, children: /* @__PURE__ */ jsx30(CheckboxGroupContext.Provider, { value: { error, ...state }, children }) })
|
|
1356
|
-
}
|
|
1357
|
-
);
|
|
1426
|
+
return /* @__PURE__ */ jsx32(FieldBase2, { as: CheckboxGroup, ...props, children });
|
|
1358
1427
|
};
|
|
1359
1428
|
|
|
1360
1429
|
// src/Columns/Columns.tsx
|
|
1361
1430
|
import { Children as Children3, cloneElement as cloneElement3, isValidElement as isValidElement2 } from "react";
|
|
1362
|
-
import { cn as
|
|
1363
|
-
import { jsx as
|
|
1431
|
+
import { cn as cn18, createVar as createVar6, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1432
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1364
1433
|
var Columns = ({
|
|
1365
1434
|
space = 0,
|
|
1366
1435
|
columns,
|
|
@@ -1376,19 +1445,19 @@ var Columns = ({
|
|
|
1376
1445
|
)}`
|
|
1377
1446
|
);
|
|
1378
1447
|
}
|
|
1379
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ jsx33(
|
|
1380
1449
|
"div",
|
|
1381
1450
|
{
|
|
1382
|
-
className:
|
|
1451
|
+
className: cn18(
|
|
1383
1452
|
"flex flex-wrap items-stretch",
|
|
1384
1453
|
stretch && "h-full",
|
|
1385
1454
|
gapSpace4[space]
|
|
1386
1455
|
),
|
|
1387
1456
|
...props,
|
|
1388
|
-
children: Children3.map(children, (child, idx) => /* @__PURE__ */
|
|
1457
|
+
children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx33(
|
|
1389
1458
|
"div",
|
|
1390
1459
|
{
|
|
1391
|
-
className:
|
|
1460
|
+
className: cn18(
|
|
1392
1461
|
"grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1393
1462
|
),
|
|
1394
1463
|
style: createVar6({ collapseAt, columnSize: columns[idx] }),
|
|
@@ -1401,13 +1470,13 @@ var Columns = ({
|
|
|
1401
1470
|
|
|
1402
1471
|
// src/Container/Container.tsx
|
|
1403
1472
|
import {
|
|
1404
|
-
cn as
|
|
1473
|
+
cn as cn19,
|
|
1405
1474
|
createVar as createVar7,
|
|
1406
1475
|
gridColsAlign,
|
|
1407
1476
|
gridColumn,
|
|
1408
1477
|
placeItems
|
|
1409
1478
|
} from "@marigold/system";
|
|
1410
|
-
import { jsx as
|
|
1479
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1411
1480
|
var content = {
|
|
1412
1481
|
small: "20ch",
|
|
1413
1482
|
medium: "45ch",
|
|
@@ -1427,11 +1496,11 @@ var Container = ({
|
|
|
1427
1496
|
...props
|
|
1428
1497
|
}) => {
|
|
1429
1498
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1430
|
-
return /* @__PURE__ */
|
|
1499
|
+
return /* @__PURE__ */ jsx34(
|
|
1431
1500
|
"div",
|
|
1432
1501
|
{
|
|
1433
1502
|
...props,
|
|
1434
|
-
className:
|
|
1503
|
+
className: cn19(
|
|
1435
1504
|
"grid",
|
|
1436
1505
|
placeItems[alignItems],
|
|
1437
1506
|
gridColsAlign[align],
|
|
@@ -1452,32 +1521,32 @@ import {
|
|
|
1452
1521
|
} from "react";
|
|
1453
1522
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
1454
1523
|
import { useDialog } from "@react-aria/dialog";
|
|
1455
|
-
import { cn as
|
|
1524
|
+
import { cn as cn21, useClassNames as useClassNames19 } from "@marigold/system";
|
|
1456
1525
|
|
|
1457
1526
|
// src/Header/Header.tsx
|
|
1458
1527
|
import { Header } from "react-aria-components";
|
|
1459
|
-
import { useClassNames as
|
|
1460
|
-
import { jsx as
|
|
1528
|
+
import { useClassNames as useClassNames17 } from "@marigold/system";
|
|
1529
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1461
1530
|
var _Header = ({ variant, size, ...props }) => {
|
|
1462
|
-
const classNames2 =
|
|
1531
|
+
const classNames2 = useClassNames17({
|
|
1463
1532
|
component: "Header",
|
|
1464
1533
|
variant,
|
|
1465
1534
|
size
|
|
1466
1535
|
});
|
|
1467
|
-
return /* @__PURE__ */
|
|
1536
|
+
return /* @__PURE__ */ jsx35(Header, { className: classNames2, ...props, children: props.children });
|
|
1468
1537
|
};
|
|
1469
1538
|
|
|
1470
1539
|
// src/Headline/Headline.tsx
|
|
1471
1540
|
import { Heading } from "react-aria-components";
|
|
1472
1541
|
import {
|
|
1473
|
-
cn as
|
|
1542
|
+
cn as cn20,
|
|
1474
1543
|
createVar as createVar8,
|
|
1475
1544
|
get,
|
|
1476
1545
|
textAlign,
|
|
1477
|
-
useClassNames as
|
|
1546
|
+
useClassNames as useClassNames18,
|
|
1478
1547
|
useTheme as useTheme2
|
|
1479
1548
|
} from "@marigold/system";
|
|
1480
|
-
import { jsx as
|
|
1549
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1481
1550
|
var _Headline = ({
|
|
1482
1551
|
variant,
|
|
1483
1552
|
size,
|
|
@@ -1488,17 +1557,17 @@ var _Headline = ({
|
|
|
1488
1557
|
...props
|
|
1489
1558
|
}) => {
|
|
1490
1559
|
const theme = useTheme2();
|
|
1491
|
-
const classNames2 =
|
|
1560
|
+
const classNames2 = useClassNames18({
|
|
1492
1561
|
component: "Headline",
|
|
1493
1562
|
variant,
|
|
1494
1563
|
size: size != null ? size : `level-${level}`
|
|
1495
1564
|
});
|
|
1496
|
-
return /* @__PURE__ */
|
|
1565
|
+
return /* @__PURE__ */ jsx36(
|
|
1497
1566
|
Heading,
|
|
1498
1567
|
{
|
|
1499
1568
|
level: Number(level),
|
|
1500
1569
|
...props,
|
|
1501
|
-
className:
|
|
1570
|
+
className: cn20(classNames2, "text-[--color]", textAlign[align]),
|
|
1502
1571
|
style: createVar8({
|
|
1503
1572
|
color: color && theme.colors && get(
|
|
1504
1573
|
theme.colors,
|
|
@@ -1513,13 +1582,13 @@ var _Headline = ({
|
|
|
1513
1582
|
};
|
|
1514
1583
|
|
|
1515
1584
|
// src/Dialog/Context.ts
|
|
1516
|
-
import { createContext as
|
|
1517
|
-
var DialogContext =
|
|
1518
|
-
var useDialogContext = () =>
|
|
1585
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
1586
|
+
var DialogContext = createContext3({});
|
|
1587
|
+
var useDialogContext = () => useContext3(DialogContext);
|
|
1519
1588
|
|
|
1520
1589
|
// src/Dialog/DialogController.tsx
|
|
1521
1590
|
import { useOverlayTriggerState } from "@react-stately/overlays";
|
|
1522
|
-
import { jsx as
|
|
1591
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1523
1592
|
var DialogController = ({
|
|
1524
1593
|
children,
|
|
1525
1594
|
dismissable = true,
|
|
@@ -1532,7 +1601,7 @@ var DialogController = ({
|
|
|
1532
1601
|
onOpenChange
|
|
1533
1602
|
});
|
|
1534
1603
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1535
|
-
return /* @__PURE__ */
|
|
1604
|
+
return /* @__PURE__ */ jsx37(DialogContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx37(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx37(
|
|
1536
1605
|
Modal,
|
|
1537
1606
|
{
|
|
1538
1607
|
open: state.isOpen,
|
|
@@ -1548,7 +1617,7 @@ var DialogController = ({
|
|
|
1548
1617
|
import { Children as Children4, useRef as useRef8 } from "react";
|
|
1549
1618
|
import { PressResponder } from "@react-aria/interactions";
|
|
1550
1619
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
|
1551
|
-
import { jsx as
|
|
1620
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1552
1621
|
var DialogTrigger = ({
|
|
1553
1622
|
children,
|
|
1554
1623
|
dismissable = true,
|
|
@@ -1558,8 +1627,8 @@ var DialogTrigger = ({
|
|
|
1558
1627
|
const dialogTriggerRef = useRef8(null);
|
|
1559
1628
|
const state = useOverlayTriggerState2({});
|
|
1560
1629
|
const ctx = { open: state.isOpen, close: state.close };
|
|
1561
|
-
return /* @__PURE__ */
|
|
1562
|
-
/* @__PURE__ */
|
|
1630
|
+
return /* @__PURE__ */ jsxs16(DialogContext.Provider, { value: ctx, children: [
|
|
1631
|
+
/* @__PURE__ */ jsx38(
|
|
1563
1632
|
PressResponder,
|
|
1564
1633
|
{
|
|
1565
1634
|
ref: dialogTriggerRef,
|
|
@@ -1568,7 +1637,7 @@ var DialogTrigger = ({
|
|
|
1568
1637
|
children: dialogTrigger
|
|
1569
1638
|
}
|
|
1570
1639
|
),
|
|
1571
|
-
/* @__PURE__ */
|
|
1640
|
+
/* @__PURE__ */ jsx38(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx38(
|
|
1572
1641
|
Modal,
|
|
1573
1642
|
{
|
|
1574
1643
|
open: state.isOpen,
|
|
@@ -1582,7 +1651,7 @@ var DialogTrigger = ({
|
|
|
1582
1651
|
};
|
|
1583
1652
|
|
|
1584
1653
|
// src/Dialog/Dialog.tsx
|
|
1585
|
-
import { jsx as
|
|
1654
|
+
import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1586
1655
|
var CloseButton = ({ className }) => {
|
|
1587
1656
|
const ref = useRef9(null);
|
|
1588
1657
|
const { close } = useDialogContext();
|
|
@@ -1592,16 +1661,16 @@ var CloseButton = ({ className }) => {
|
|
|
1592
1661
|
},
|
|
1593
1662
|
ref
|
|
1594
1663
|
);
|
|
1595
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ jsx39("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx39(
|
|
1596
1665
|
"button",
|
|
1597
1666
|
{
|
|
1598
|
-
className:
|
|
1667
|
+
className: cn21(
|
|
1599
1668
|
"h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
|
|
1600
1669
|
className
|
|
1601
1670
|
),
|
|
1602
1671
|
ref,
|
|
1603
1672
|
...buttonProps,
|
|
1604
|
-
children: /* @__PURE__ */
|
|
1673
|
+
children: /* @__PURE__ */ jsx39("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx39(
|
|
1605
1674
|
"path",
|
|
1606
1675
|
{
|
|
1607
1676
|
fillRule: "evenodd",
|
|
@@ -1640,9 +1709,9 @@ var Dialog = ({
|
|
|
1640
1709
|
const ref = useRef9(null);
|
|
1641
1710
|
const { close } = useDialogContext();
|
|
1642
1711
|
const { dialogProps, titleProps } = useDialog(props, ref);
|
|
1643
|
-
const classNames2 =
|
|
1644
|
-
return /* @__PURE__ */
|
|
1645
|
-
closeButton && /* @__PURE__ */
|
|
1712
|
+
const classNames2 = useClassNames19({ component: "Dialog", variant, size });
|
|
1713
|
+
return /* @__PURE__ */ jsxs17("div", { className: classNames2.container, ...dialogProps, children: [
|
|
1714
|
+
closeButton && /* @__PURE__ */ jsx39(CloseButton, { className: classNames2.closeButton }),
|
|
1646
1715
|
typeof children === "function" ? children({ close, titleProps }) : props["aria-labelledby"] ? children : addTitleProps(children, titleProps)
|
|
1647
1716
|
] });
|
|
1648
1717
|
};
|
|
@@ -1651,29 +1720,29 @@ Dialog.Controller = DialogController;
|
|
|
1651
1720
|
|
|
1652
1721
|
// src/Divider/Divider.tsx
|
|
1653
1722
|
import { Separator } from "react-aria-components";
|
|
1654
|
-
import { useClassNames as
|
|
1655
|
-
import { jsx as
|
|
1723
|
+
import { useClassNames as useClassNames20 } from "@marigold/system";
|
|
1724
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1656
1725
|
var _Divider = ({ variant, ...props }) => {
|
|
1657
|
-
const classNames2 =
|
|
1658
|
-
return /* @__PURE__ */
|
|
1726
|
+
const classNames2 = useClassNames20({ component: "Divider", variant });
|
|
1727
|
+
return /* @__PURE__ */ jsx40(Separator, { className: classNames2, ...props });
|
|
1659
1728
|
};
|
|
1660
1729
|
|
|
1661
1730
|
// src/Footer/Footer.tsx
|
|
1662
|
-
import { useClassNames as
|
|
1663
|
-
import { jsx as
|
|
1731
|
+
import { useClassNames as useClassNames21 } from "@marigold/system";
|
|
1732
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1664
1733
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1665
|
-
const classNames2 =
|
|
1666
|
-
return /* @__PURE__ */
|
|
1734
|
+
const classNames2 = useClassNames21({ component: "Footer", variant, size });
|
|
1735
|
+
return /* @__PURE__ */ jsx41("footer", { ...props, className: classNames2, children });
|
|
1667
1736
|
};
|
|
1668
1737
|
|
|
1669
1738
|
// src/Image/Image.tsx
|
|
1670
1739
|
import {
|
|
1671
|
-
cn as
|
|
1740
|
+
cn as cn22,
|
|
1672
1741
|
objectFit,
|
|
1673
1742
|
objectPosition,
|
|
1674
|
-
useClassNames as
|
|
1743
|
+
useClassNames as useClassNames22
|
|
1675
1744
|
} from "@marigold/system";
|
|
1676
|
-
import { jsx as
|
|
1745
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1677
1746
|
var Image = ({
|
|
1678
1747
|
variant,
|
|
1679
1748
|
size,
|
|
@@ -1681,13 +1750,13 @@ var Image = ({
|
|
|
1681
1750
|
position = "none",
|
|
1682
1751
|
...props
|
|
1683
1752
|
}) => {
|
|
1684
|
-
const classNames2 =
|
|
1685
|
-
return /* @__PURE__ */
|
|
1753
|
+
const classNames2 = useClassNames22({ component: "Image", variant, size });
|
|
1754
|
+
return /* @__PURE__ */ jsx42(
|
|
1686
1755
|
"img",
|
|
1687
1756
|
{
|
|
1688
1757
|
...props,
|
|
1689
1758
|
alt: props.alt,
|
|
1690
|
-
className:
|
|
1759
|
+
className: cn22(
|
|
1691
1760
|
fit !== "none" && "h-full w-full",
|
|
1692
1761
|
classNames2,
|
|
1693
1762
|
objectFit[fit],
|
|
@@ -1700,10 +1769,10 @@ var Image = ({
|
|
|
1700
1769
|
// src/Inline/Inline.tsx
|
|
1701
1770
|
import {
|
|
1702
1771
|
alignment as alignment2,
|
|
1703
|
-
cn as
|
|
1772
|
+
cn as cn23,
|
|
1704
1773
|
gapSpace as gapSpace5
|
|
1705
1774
|
} from "@marigold/system";
|
|
1706
|
-
import { jsx as
|
|
1775
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1707
1776
|
var Inline = ({
|
|
1708
1777
|
space = 0,
|
|
1709
1778
|
orientation,
|
|
@@ -1713,11 +1782,11 @@ var Inline = ({
|
|
|
1713
1782
|
...props
|
|
1714
1783
|
}) => {
|
|
1715
1784
|
var _a2, _b2, _c, _d;
|
|
1716
|
-
return /* @__PURE__ */
|
|
1785
|
+
return /* @__PURE__ */ jsx43(
|
|
1717
1786
|
"div",
|
|
1718
1787
|
{
|
|
1719
1788
|
...props,
|
|
1720
|
-
className:
|
|
1789
|
+
className: cn23(
|
|
1721
1790
|
"flex flex-wrap",
|
|
1722
1791
|
gapSpace5[space],
|
|
1723
1792
|
alignX && ((_b2 = (_a2 = alignment2) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
@@ -1737,15 +1806,15 @@ import { useLocale } from "@react-aria/i18n";
|
|
|
1737
1806
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
1738
1807
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
1739
1808
|
import { useDateFieldState } from "@react-stately/datepicker";
|
|
1740
|
-
import { cn as
|
|
1809
|
+
import { cn as cn25, useClassNames as useClassNames23, useStateProps as useStateProps5 } from "@marigold/system";
|
|
1741
1810
|
|
|
1742
1811
|
// src/DateField/DateSegment.tsx
|
|
1743
1812
|
import { useRef as useRef10 } from "react";
|
|
1744
1813
|
import { useDateSegment } from "@react-aria/datepicker";
|
|
1745
1814
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
1746
1815
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
1747
|
-
import { cn as
|
|
1748
|
-
import { jsx as
|
|
1816
|
+
import { cn as cn24, useStateProps as useStateProps4 } from "@marigold/system";
|
|
1817
|
+
import { jsx as jsx44, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1749
1818
|
var DateSegment = ({
|
|
1750
1819
|
className,
|
|
1751
1820
|
segment,
|
|
@@ -1758,17 +1827,17 @@ var DateSegment = ({
|
|
|
1758
1827
|
within: true,
|
|
1759
1828
|
isTextInput: true
|
|
1760
1829
|
});
|
|
1761
|
-
const stateProps =
|
|
1830
|
+
const stateProps = useStateProps4({
|
|
1762
1831
|
disabled: state.isDisabled,
|
|
1763
1832
|
focusVisible: isFocused
|
|
1764
1833
|
});
|
|
1765
1834
|
const { isPlaceholder, placeholder, text, type, maxValue } = segment;
|
|
1766
|
-
return /* @__PURE__ */
|
|
1835
|
+
return /* @__PURE__ */ jsxs18(
|
|
1767
1836
|
"div",
|
|
1768
1837
|
{
|
|
1769
1838
|
...mergeProps6(segmentProps, stateProps, focusProps),
|
|
1770
1839
|
ref,
|
|
1771
|
-
className:
|
|
1840
|
+
className: cn24(
|
|
1772
1841
|
"group/segment",
|
|
1773
1842
|
"text-center leading-none outline-0",
|
|
1774
1843
|
type !== "literal" && "p-0.5",
|
|
@@ -1779,25 +1848,25 @@ var DateSegment = ({
|
|
|
1779
1848
|
minWidth: maxValue != null ? String(maxValue).length + "ch" : void 0
|
|
1780
1849
|
},
|
|
1781
1850
|
children: [
|
|
1782
|
-
/* @__PURE__ */
|
|
1851
|
+
/* @__PURE__ */ jsx44(
|
|
1783
1852
|
"span",
|
|
1784
1853
|
{
|
|
1785
1854
|
"aria-hidden": "true",
|
|
1786
|
-
className:
|
|
1855
|
+
className: cn24(
|
|
1787
1856
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1788
1857
|
"pointer-events-none w-full text-center"
|
|
1789
1858
|
),
|
|
1790
1859
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1791
1860
|
}
|
|
1792
1861
|
),
|
|
1793
|
-
/* @__PURE__ */
|
|
1862
|
+
/* @__PURE__ */ jsx44("span", { children: isPlaceholder ? "" : type === "month" || type === "day" ? Number(text) < 10 ? "0" + text : text : text })
|
|
1794
1863
|
]
|
|
1795
1864
|
}
|
|
1796
1865
|
);
|
|
1797
1866
|
};
|
|
1798
1867
|
|
|
1799
1868
|
// src/DateField/DateField.tsx
|
|
1800
|
-
import { jsx as
|
|
1869
|
+
import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1801
1870
|
var DateField = ({
|
|
1802
1871
|
disabled,
|
|
1803
1872
|
readOnly,
|
|
@@ -1832,14 +1901,14 @@ var DateField = ({
|
|
|
1832
1901
|
state,
|
|
1833
1902
|
ref
|
|
1834
1903
|
);
|
|
1835
|
-
const classNames2 =
|
|
1904
|
+
const classNames2 = useClassNames23({ component: "DateField", variant, size });
|
|
1836
1905
|
const { focusProps, isFocused } = useFocusRing4({
|
|
1837
1906
|
within: true,
|
|
1838
1907
|
isTextInput: true,
|
|
1839
1908
|
autoFocus: props.autoFocus
|
|
1840
1909
|
});
|
|
1841
1910
|
const { hoverProps, isHovered } = useHover2({ isDisabled: disabled });
|
|
1842
|
-
const stateProps =
|
|
1911
|
+
const stateProps = useStateProps5({
|
|
1843
1912
|
hover: isHovered,
|
|
1844
1913
|
error,
|
|
1845
1914
|
readOnly,
|
|
@@ -1847,7 +1916,7 @@ var DateField = ({
|
|
|
1847
1916
|
required,
|
|
1848
1917
|
focus: isFocused || isPressed
|
|
1849
1918
|
});
|
|
1850
|
-
return /* @__PURE__ */
|
|
1919
|
+
return /* @__PURE__ */ jsx45(
|
|
1851
1920
|
FieldBase,
|
|
1852
1921
|
{
|
|
1853
1922
|
error,
|
|
@@ -1862,11 +1931,11 @@ var DateField = ({
|
|
|
1862
1931
|
variant,
|
|
1863
1932
|
size,
|
|
1864
1933
|
width,
|
|
1865
|
-
children: /* @__PURE__ */
|
|
1934
|
+
children: /* @__PURE__ */ jsxs19(
|
|
1866
1935
|
"div",
|
|
1867
1936
|
{
|
|
1868
1937
|
...mergeProps7(fieldProps, focusProps, stateProps, hoverProps),
|
|
1869
|
-
className:
|
|
1938
|
+
className: cn25(
|
|
1870
1939
|
"relative flex flex-row flex-nowrap",
|
|
1871
1940
|
"cursor-text aria-disabled:cursor-not-allowed",
|
|
1872
1941
|
classNames2.field
|
|
@@ -1874,9 +1943,9 @@ var DateField = ({
|
|
|
1874
1943
|
"data-testid": "date-field",
|
|
1875
1944
|
ref: triggerRef,
|
|
1876
1945
|
children: [
|
|
1877
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ jsx45("div", { ref, className: "flex basis-full items-center", children: state.segments.map((segment, i) => {
|
|
1878
1947
|
var _a;
|
|
1879
|
-
return /* @__PURE__ */
|
|
1948
|
+
return /* @__PURE__ */ jsx45(
|
|
1880
1949
|
DateSegment,
|
|
1881
1950
|
{
|
|
1882
1951
|
className: classNames2.segment,
|
|
@@ -1887,15 +1956,15 @@ var DateField = ({
|
|
|
1887
1956
|
i
|
|
1888
1957
|
);
|
|
1889
1958
|
}) }),
|
|
1890
|
-
action ? action : /* @__PURE__ */
|
|
1959
|
+
action ? action : /* @__PURE__ */ jsx45("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx45(
|
|
1891
1960
|
"svg",
|
|
1892
1961
|
{
|
|
1893
1962
|
"data-testid": "action",
|
|
1894
|
-
className:
|
|
1963
|
+
className: cn25(classNames2.action),
|
|
1895
1964
|
viewBox: "0 0 24 24",
|
|
1896
1965
|
width: 24,
|
|
1897
1966
|
height: 24,
|
|
1898
|
-
children: /* @__PURE__ */
|
|
1967
|
+
children: /* @__PURE__ */ jsx45("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" })
|
|
1899
1968
|
}
|
|
1900
1969
|
) })
|
|
1901
1970
|
]
|
|
@@ -1914,7 +1983,7 @@ import {
|
|
|
1914
1983
|
import { useDateFormatter as useDateFormatter3, useLocale as useLocale3 } from "@react-aria/i18n";
|
|
1915
1984
|
import { useCalendarState } from "@react-stately/calendar";
|
|
1916
1985
|
import { ChevronDown as ChevronDown2, ChevronLeft, ChevronRight } from "@marigold/icons";
|
|
1917
|
-
import { cn as
|
|
1986
|
+
import { cn as cn27, useClassNames as useClassNames25, useStateProps as useStateProps7 } from "@marigold/system";
|
|
1918
1987
|
|
|
1919
1988
|
// src/Calendar/CalendarGrid.tsx
|
|
1920
1989
|
import { getWeeksInMonth, startOfWeek, today } from "@internationalized/date";
|
|
@@ -1928,28 +1997,28 @@ import { useRef as useRef12 } from "react";
|
|
|
1928
1997
|
import { useCalendarCell } from "@react-aria/calendar";
|
|
1929
1998
|
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
1930
1999
|
import { mergeProps as mergeProps8 } from "@react-aria/utils";
|
|
1931
|
-
import { cn as
|
|
1932
|
-
import { jsx as
|
|
2000
|
+
import { cn as cn26, useClassNames as useClassNames24, useStateProps as useStateProps6 } from "@marigold/system";
|
|
2001
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1933
2002
|
var CalendarCell = (props) => {
|
|
1934
2003
|
const ref = useRef12(null);
|
|
1935
2004
|
const { state } = props;
|
|
1936
2005
|
let { cellProps, buttonProps, formattedDate, isOutsideVisibleRange } = useCalendarCell(props, state, ref);
|
|
1937
|
-
const classNames2 =
|
|
2006
|
+
const classNames2 = useClassNames24({
|
|
1938
2007
|
component: "Calendar"
|
|
1939
2008
|
});
|
|
1940
2009
|
const isDisabled = cellProps["aria-disabled"];
|
|
1941
2010
|
const { hoverProps, isHovered } = useHover3({
|
|
1942
2011
|
isDisabled: isDisabled || cellProps["aria-selected"]
|
|
1943
2012
|
});
|
|
1944
|
-
const stateProps =
|
|
2013
|
+
const stateProps = useStateProps6({
|
|
1945
2014
|
disabled: isDisabled,
|
|
1946
2015
|
hover: isHovered,
|
|
1947
2016
|
selected: cellProps["aria-selected"]
|
|
1948
2017
|
});
|
|
1949
|
-
return /* @__PURE__ */
|
|
2018
|
+
return /* @__PURE__ */ jsx46("td", { className: "group/cell", ...cellProps, children: /* @__PURE__ */ jsx46(
|
|
1950
2019
|
"div",
|
|
1951
2020
|
{
|
|
1952
|
-
className:
|
|
2021
|
+
className: cn26(
|
|
1953
2022
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
1954
2023
|
classNames2.calendarCell
|
|
1955
2024
|
),
|
|
@@ -1962,7 +2031,7 @@ var CalendarCell = (props) => {
|
|
|
1962
2031
|
};
|
|
1963
2032
|
|
|
1964
2033
|
// src/Calendar/CalendarGrid.tsx
|
|
1965
|
-
import { jsx as
|
|
2034
|
+
import { jsx as jsx47, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1966
2035
|
var CalendarGrid = ({ state, ...props }) => {
|
|
1967
2036
|
const { locale } = useLocale2();
|
|
1968
2037
|
const { gridProps, headerProps } = useCalendarGrid(props, state);
|
|
@@ -1982,23 +2051,23 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
1982
2051
|
return dayFormatter.format(dateDay);
|
|
1983
2052
|
});
|
|
1984
2053
|
}, [locale, state.timeZone, dayFormatter]);
|
|
1985
|
-
return /* @__PURE__ */
|
|
2054
|
+
return /* @__PURE__ */ jsxs20(
|
|
1986
2055
|
"table",
|
|
1987
2056
|
{
|
|
1988
2057
|
className: "w-full border-spacing-[6px]",
|
|
1989
2058
|
...gridProps,
|
|
1990
2059
|
cellPadding: "8",
|
|
1991
2060
|
children: [
|
|
1992
|
-
/* @__PURE__ */
|
|
1993
|
-
/* @__PURE__ */
|
|
1994
|
-
(date, i) => date ? /* @__PURE__ */
|
|
2061
|
+
/* @__PURE__ */ jsx47("thead", { ...headerProps, children: /* @__PURE__ */ jsx47("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx47("th", { style: { fontWeight: "bolder" }, children: day.substring(0, 2) }, index)) }) }),
|
|
2062
|
+
/* @__PURE__ */ jsx47("tbody", { children: [...new Array(numberOfWeeksInMonth).keys()].map((weekIndex) => /* @__PURE__ */ jsx47("tr", { children: state.getDatesInWeek(weekIndex).map(
|
|
2063
|
+
(date, i) => date ? /* @__PURE__ */ jsx47(
|
|
1995
2064
|
CalendarCell,
|
|
1996
2065
|
{
|
|
1997
2066
|
date,
|
|
1998
2067
|
state
|
|
1999
2068
|
},
|
|
2000
2069
|
i
|
|
2001
|
-
) : /* @__PURE__ */
|
|
2070
|
+
) : /* @__PURE__ */ jsx47("td", {}, i)
|
|
2002
2071
|
) }, weekIndex)) })
|
|
2003
2072
|
]
|
|
2004
2073
|
}
|
|
@@ -2006,7 +2075,7 @@ var CalendarGrid = ({ state, ...props }) => {
|
|
|
2006
2075
|
};
|
|
2007
2076
|
|
|
2008
2077
|
// src/Calendar/MonthDropdown.tsx
|
|
2009
|
-
import { jsx as
|
|
2078
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2010
2079
|
var MonthDropdown = ({
|
|
2011
2080
|
state,
|
|
2012
2081
|
setSelectedDropdown,
|
|
@@ -2017,13 +2086,13 @@ var MonthDropdown = ({
|
|
|
2017
2086
|
let date = state.focusedDate.set({ month: value });
|
|
2018
2087
|
state.setFocusedDate(date);
|
|
2019
2088
|
};
|
|
2020
|
-
return /* @__PURE__ */
|
|
2089
|
+
return /* @__PURE__ */ jsx48(
|
|
2021
2090
|
"ul",
|
|
2022
2091
|
{
|
|
2023
2092
|
"data-testid": "monthOptions",
|
|
2024
2093
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
2025
2094
|
children: months.map((month, index) => {
|
|
2026
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ jsx48("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx48(
|
|
2027
2096
|
_Button,
|
|
2028
2097
|
{
|
|
2029
2098
|
variant: index === state.focusedDate.month - 1 ? "secondary" : "text",
|
|
@@ -2045,7 +2114,7 @@ var MonthDropdown_default = MonthDropdown;
|
|
|
2045
2114
|
// src/Calendar/YearDropdown.tsx
|
|
2046
2115
|
import { useEffect as useEffect2, useRef as useRef13 } from "react";
|
|
2047
2116
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
2048
|
-
import { jsx as
|
|
2117
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2049
2118
|
var YearDropdown = ({ state, setSelectedDropdown }) => {
|
|
2050
2119
|
const years = [];
|
|
2051
2120
|
let formatter = useDateFormatter2({
|
|
@@ -2074,19 +2143,19 @@ var YearDropdown = ({ state, setSelectedDropdown }) => {
|
|
|
2074
2143
|
let date = years[index].value;
|
|
2075
2144
|
state.setFocusedDate(date);
|
|
2076
2145
|
};
|
|
2077
|
-
return /* @__PURE__ */
|
|
2146
|
+
return /* @__PURE__ */ jsx49(
|
|
2078
2147
|
"ul",
|
|
2079
2148
|
{
|
|
2080
2149
|
"data-testid": "yearOptions",
|
|
2081
2150
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
2082
2151
|
children: years.map((year, index) => {
|
|
2083
2152
|
const isActive = +year.formatted === state.focusedDate.year;
|
|
2084
|
-
return /* @__PURE__ */
|
|
2153
|
+
return /* @__PURE__ */ jsx49("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx49(
|
|
2085
2154
|
"div",
|
|
2086
2155
|
{
|
|
2087
2156
|
ref: isActive ? activeButtonRef : null,
|
|
2088
2157
|
style: { height: "100%", width: "100%" },
|
|
2089
|
-
children: /* @__PURE__ */
|
|
2158
|
+
children: /* @__PURE__ */ jsx49(
|
|
2090
2159
|
_Button,
|
|
2091
2160
|
{
|
|
2092
2161
|
disabled: state.isDisabled,
|
|
@@ -2110,7 +2179,7 @@ var YearDropdown = ({ state, setSelectedDropdown }) => {
|
|
|
2110
2179
|
var YearDropdown_default = YearDropdown;
|
|
2111
2180
|
|
|
2112
2181
|
// src/Calendar/Calendar.tsx
|
|
2113
|
-
import { Fragment as Fragment5, jsx as
|
|
2182
|
+
import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2114
2183
|
var buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
2115
2184
|
var Calendar = ({
|
|
2116
2185
|
disabled,
|
|
@@ -2145,12 +2214,12 @@ var Calendar = ({
|
|
|
2145
2214
|
onFocusChange: nextFocusChange,
|
|
2146
2215
|
...nextPropsRest
|
|
2147
2216
|
} = nextButtonProps;
|
|
2148
|
-
const calendarState =
|
|
2217
|
+
const calendarState = useStateProps7({
|
|
2149
2218
|
disabled: state.isDisabled,
|
|
2150
2219
|
focusVisible: state.isFocused
|
|
2151
2220
|
});
|
|
2152
|
-
const classNames2 =
|
|
2153
|
-
const { select: selectClassNames } =
|
|
2221
|
+
const classNames2 = useClassNames25({ component: "Calendar" });
|
|
2222
|
+
const { select: selectClassNames } = useClassNames25({ component: "Select" });
|
|
2154
2223
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
2155
2224
|
let months = [];
|
|
2156
2225
|
let formatter = useDateFormatter3({
|
|
@@ -2166,75 +2235,75 @@ var Calendar = ({
|
|
|
2166
2235
|
month: months[state.focusedDate.month - 1].substring(0, 3),
|
|
2167
2236
|
year: state.focusedDate.year
|
|
2168
2237
|
};
|
|
2169
|
-
return /* @__PURE__ */
|
|
2238
|
+
return /* @__PURE__ */ jsx50(
|
|
2170
2239
|
"div",
|
|
2171
2240
|
{
|
|
2172
2241
|
tabIndex: -1,
|
|
2173
|
-
className:
|
|
2242
|
+
className: cn27(
|
|
2174
2243
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4 shadow-[0_4px_4px_rgba(165,165,165,0.25)]",
|
|
2175
2244
|
classNames2.calendar
|
|
2176
2245
|
),
|
|
2177
2246
|
...calendarProps,
|
|
2178
2247
|
...calendarState,
|
|
2179
2248
|
ref,
|
|
2180
|
-
children: selectedDropdown ? selectedDropdown === "month" ? /* @__PURE__ */
|
|
2249
|
+
children: selectedDropdown ? selectedDropdown === "month" ? /* @__PURE__ */ jsx50(
|
|
2181
2250
|
MonthDropdown_default,
|
|
2182
2251
|
{
|
|
2183
2252
|
setSelectedDropdown,
|
|
2184
2253
|
months,
|
|
2185
2254
|
state
|
|
2186
2255
|
}
|
|
2187
|
-
) : /* @__PURE__ */
|
|
2256
|
+
) : /* @__PURE__ */ jsx50(
|
|
2188
2257
|
YearDropdown_default,
|
|
2189
2258
|
{
|
|
2190
2259
|
setSelectedDropdown,
|
|
2191
2260
|
state
|
|
2192
2261
|
}
|
|
2193
|
-
) : /* @__PURE__ */
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2262
|
+
) : /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
2263
|
+
/* @__PURE__ */ jsxs21("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2264
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex w-full gap-4", children: [
|
|
2265
|
+
/* @__PURE__ */ jsxs21(
|
|
2197
2266
|
"button",
|
|
2198
2267
|
{
|
|
2199
2268
|
disabled: state.isDisabled,
|
|
2200
2269
|
onClick: () => setSelectedDropdown("month"),
|
|
2201
|
-
className:
|
|
2270
|
+
className: cn27(buttonStyles, selectClassNames),
|
|
2202
2271
|
"data-testid": "month",
|
|
2203
2272
|
children: [
|
|
2204
2273
|
selectedValue.month,
|
|
2205
|
-
/* @__PURE__ */
|
|
2274
|
+
/* @__PURE__ */ jsx50(ChevronDown2, {})
|
|
2206
2275
|
]
|
|
2207
2276
|
}
|
|
2208
2277
|
),
|
|
2209
|
-
/* @__PURE__ */
|
|
2278
|
+
/* @__PURE__ */ jsxs21(
|
|
2210
2279
|
"button",
|
|
2211
2280
|
{
|
|
2212
2281
|
disabled: state.isDisabled,
|
|
2213
2282
|
onClick: () => setSelectedDropdown("year"),
|
|
2214
|
-
className:
|
|
2283
|
+
className: cn27(buttonStyles, selectClassNames),
|
|
2215
2284
|
"data-testid": "year",
|
|
2216
2285
|
children: [
|
|
2217
2286
|
selectedValue.year,
|
|
2218
|
-
/* @__PURE__ */
|
|
2287
|
+
/* @__PURE__ */ jsx50(ChevronDown2, {})
|
|
2219
2288
|
]
|
|
2220
2289
|
}
|
|
2221
2290
|
)
|
|
2222
2291
|
] }),
|
|
2223
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ jsxs21(
|
|
2224
2293
|
"div",
|
|
2225
2294
|
{
|
|
2226
|
-
className:
|
|
2295
|
+
className: cn27(
|
|
2227
2296
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
2228
2297
|
classNames2.calendarControllers
|
|
2229
2298
|
),
|
|
2230
2299
|
children: [
|
|
2231
|
-
/* @__PURE__ */
|
|
2232
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ jsx50(_Button, { ...prevPropsRest, disabled: prevIsDisabled, children: /* @__PURE__ */ jsx50(ChevronLeft, {}) }),
|
|
2301
|
+
/* @__PURE__ */ jsx50(_Button, { ...nextPropsRest, disabled: nextIsDisabled, children: /* @__PURE__ */ jsx50(ChevronRight, {}) })
|
|
2233
2302
|
]
|
|
2234
2303
|
}
|
|
2235
2304
|
)
|
|
2236
2305
|
] }),
|
|
2237
|
-
/* @__PURE__ */
|
|
2306
|
+
/* @__PURE__ */ jsx50(CalendarGrid, { state })
|
|
2238
2307
|
] })
|
|
2239
2308
|
}
|
|
2240
2309
|
);
|
|
@@ -2245,8 +2314,8 @@ import { useRef as useRef15 } from "react";
|
|
|
2245
2314
|
import { useDatePicker } from "@react-aria/datepicker";
|
|
2246
2315
|
import { mergeProps as mergeProps9 } from "@react-aria/utils";
|
|
2247
2316
|
import { useDatePickerState } from "@react-stately/datepicker";
|
|
2248
|
-
import { useClassNames as
|
|
2249
|
-
import { Fragment as Fragment6, jsx as
|
|
2317
|
+
import { useClassNames as useClassNames26, useStateProps as useStateProps8 } from "@marigold/system";
|
|
2318
|
+
import { Fragment as Fragment6, jsx as jsx51, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2250
2319
|
var DatePicker = ({
|
|
2251
2320
|
disabled,
|
|
2252
2321
|
required,
|
|
@@ -2271,7 +2340,7 @@ var DatePicker = ({
|
|
|
2271
2340
|
...props
|
|
2272
2341
|
});
|
|
2273
2342
|
const ref = useRef15(null);
|
|
2274
|
-
const stateProps =
|
|
2343
|
+
const stateProps = useStateProps8({
|
|
2275
2344
|
focus: state.isOpen
|
|
2276
2345
|
});
|
|
2277
2346
|
const { groupProps, fieldProps, buttonProps, calendarProps } = useDatePicker(
|
|
@@ -2280,13 +2349,13 @@ var DatePicker = ({
|
|
|
2280
2349
|
ref
|
|
2281
2350
|
);
|
|
2282
2351
|
const { isDisabled, errorMessage, description, label } = props;
|
|
2283
|
-
const classNames2 =
|
|
2352
|
+
const classNames2 = useClassNames26({
|
|
2284
2353
|
component: "DatePicker",
|
|
2285
2354
|
size,
|
|
2286
2355
|
variant
|
|
2287
2356
|
});
|
|
2288
|
-
return /* @__PURE__ */
|
|
2289
|
-
/* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
2358
|
+
/* @__PURE__ */ jsx51("div", { className: "flex w-full min-w-[300px]", ...groupProps, children: /* @__PURE__ */ jsx51(
|
|
2290
2359
|
DateField,
|
|
2291
2360
|
{
|
|
2292
2361
|
...fieldProps,
|
|
@@ -2299,41 +2368,41 @@ var DatePicker = ({
|
|
|
2299
2368
|
description: !state.isOpen && description,
|
|
2300
2369
|
triggerRef: ref,
|
|
2301
2370
|
width,
|
|
2302
|
-
action: /* @__PURE__ */
|
|
2371
|
+
action: /* @__PURE__ */ jsx51("div", { className: classNames2.container, children: /* @__PURE__ */ jsx51(
|
|
2303
2372
|
_Button,
|
|
2304
2373
|
{
|
|
2305
2374
|
...mergeProps9(buttonProps, stateProps),
|
|
2306
2375
|
disabled: isDisabled,
|
|
2307
|
-
children: /* @__PURE__ */
|
|
2376
|
+
children: /* @__PURE__ */ jsx51(
|
|
2308
2377
|
"svg",
|
|
2309
2378
|
{
|
|
2310
2379
|
width: "24",
|
|
2311
2380
|
height: "24",
|
|
2312
2381
|
viewBox: "0 0 24 24",
|
|
2313
2382
|
fill: "currentColor",
|
|
2314
|
-
children: /* @__PURE__ */
|
|
2383
|
+
children: /* @__PURE__ */ jsx51("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
2315
2384
|
}
|
|
2316
2385
|
)
|
|
2317
2386
|
}
|
|
2318
2387
|
) })
|
|
2319
2388
|
}
|
|
2320
2389
|
) }),
|
|
2321
|
-
state.isOpen && /* @__PURE__ */
|
|
2390
|
+
state.isOpen && /* @__PURE__ */ jsx51(Popover, { triggerRef: ref, state, children: /* @__PURE__ */ jsx51(Calendar, { disabled, ...calendarProps }) })
|
|
2322
2391
|
] });
|
|
2323
2392
|
};
|
|
2324
2393
|
|
|
2325
2394
|
// src/Inset/Inset.tsx
|
|
2326
2395
|
import {
|
|
2327
|
-
cn as
|
|
2396
|
+
cn as cn28,
|
|
2328
2397
|
paddingSpace as paddingSpace2,
|
|
2329
2398
|
paddingSpaceX as paddingSpaceX2,
|
|
2330
2399
|
paddingSpaceY as paddingSpaceY2
|
|
2331
2400
|
} from "@marigold/system";
|
|
2332
|
-
import { jsx as
|
|
2333
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
2401
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2402
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx52(
|
|
2334
2403
|
"div",
|
|
2335
2404
|
{
|
|
2336
|
-
className:
|
|
2405
|
+
className: cn28(
|
|
2337
2406
|
space && paddingSpace2[space],
|
|
2338
2407
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
2339
2408
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -2343,38 +2412,38 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx50(
|
|
|
2343
2412
|
);
|
|
2344
2413
|
|
|
2345
2414
|
// src/Link/Link.tsx
|
|
2346
|
-
import { forwardRef as
|
|
2415
|
+
import { forwardRef as forwardRef11 } from "react";
|
|
2347
2416
|
import { Link } from "react-aria-components";
|
|
2348
|
-
import { useClassNames as
|
|
2349
|
-
import { jsx as
|
|
2350
|
-
var _Link =
|
|
2417
|
+
import { useClassNames as useClassNames27 } from "@marigold/system";
|
|
2418
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2419
|
+
var _Link = forwardRef11(
|
|
2351
2420
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
2352
|
-
const classNames2 =
|
|
2421
|
+
const classNames2 = useClassNames27({
|
|
2353
2422
|
component: "Link",
|
|
2354
2423
|
variant,
|
|
2355
2424
|
size
|
|
2356
2425
|
});
|
|
2357
|
-
return /* @__PURE__ */
|
|
2426
|
+
return /* @__PURE__ */ jsx53(Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
|
|
2358
2427
|
}
|
|
2359
2428
|
);
|
|
2360
2429
|
|
|
2361
2430
|
// src/List/List.tsx
|
|
2362
|
-
import { useClassNames as
|
|
2431
|
+
import { useClassNames as useClassNames28 } from "@marigold/system";
|
|
2363
2432
|
|
|
2364
2433
|
// src/List/Context.ts
|
|
2365
|
-
import { createContext as
|
|
2366
|
-
var ListContext =
|
|
2367
|
-
var useListContext = () =>
|
|
2434
|
+
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
2435
|
+
var ListContext = createContext4({});
|
|
2436
|
+
var useListContext = () => useContext4(ListContext);
|
|
2368
2437
|
|
|
2369
2438
|
// src/List/ListItem.tsx
|
|
2370
|
-
import { jsx as
|
|
2439
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
2371
2440
|
var ListItem = ({ children, ...props }) => {
|
|
2372
2441
|
const { classNames: classNames2 } = useListContext();
|
|
2373
|
-
return /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ jsx54("li", { ...props, className: classNames2, children });
|
|
2374
2443
|
};
|
|
2375
2444
|
|
|
2376
2445
|
// src/List/List.tsx
|
|
2377
|
-
import { jsx as
|
|
2446
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2378
2447
|
var List = ({
|
|
2379
2448
|
as = "ul",
|
|
2380
2449
|
children,
|
|
@@ -2383,8 +2452,8 @@ var List = ({
|
|
|
2383
2452
|
...props
|
|
2384
2453
|
}) => {
|
|
2385
2454
|
const Component = as;
|
|
2386
|
-
const classNames2 =
|
|
2387
|
-
return /* @__PURE__ */
|
|
2455
|
+
const classNames2 = useClassNames28({ component: "List", variant, size });
|
|
2456
|
+
return /* @__PURE__ */ jsx55(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx55(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2388
2457
|
};
|
|
2389
2458
|
List.Item = ListItem;
|
|
2390
2459
|
|
|
@@ -2394,23 +2463,23 @@ import { useMenu } from "@react-aria/menu";
|
|
|
2394
2463
|
import { useSyncRef } from "@react-aria/utils";
|
|
2395
2464
|
import { Item as Item4, Section } from "@react-stately/collections";
|
|
2396
2465
|
import { useTreeState as useTreeState2 } from "@react-stately/tree";
|
|
2397
|
-
import { useClassNames as
|
|
2466
|
+
import { useClassNames as useClassNames30 } from "@marigold/system";
|
|
2398
2467
|
|
|
2399
2468
|
// src/Menu/Context.ts
|
|
2400
2469
|
import {
|
|
2401
|
-
createContext as
|
|
2402
|
-
useContext as
|
|
2470
|
+
createContext as createContext5,
|
|
2471
|
+
useContext as useContext5
|
|
2403
2472
|
} from "react";
|
|
2404
|
-
var MenuContext =
|
|
2405
|
-
var useMenuContext = () =>
|
|
2473
|
+
var MenuContext = createContext5({});
|
|
2474
|
+
var useMenuContext = () => useContext5(MenuContext);
|
|
2406
2475
|
|
|
2407
2476
|
// src/Menu/MenuItem.tsx
|
|
2408
2477
|
import { useRef as useRef16 } from "react";
|
|
2409
2478
|
import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
2410
2479
|
import { useMenuItem } from "@react-aria/menu";
|
|
2411
2480
|
import { mergeProps as mergeProps10 } from "@react-aria/utils";
|
|
2412
|
-
import { useStateProps as
|
|
2413
|
-
import { jsx as
|
|
2481
|
+
import { useStateProps as useStateProps9 } from "@marigold/system";
|
|
2482
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2414
2483
|
var MenuItem = ({
|
|
2415
2484
|
item,
|
|
2416
2485
|
state,
|
|
@@ -2429,11 +2498,11 @@ var MenuItem = ({
|
|
|
2429
2498
|
ref
|
|
2430
2499
|
);
|
|
2431
2500
|
const { isFocusVisible, focusProps } = useFocusRing5();
|
|
2432
|
-
const stateProps =
|
|
2501
|
+
const stateProps = useStateProps9({
|
|
2433
2502
|
focus: isFocusVisible
|
|
2434
2503
|
});
|
|
2435
2504
|
const { onPointerUp, ...props } = menuItemProps;
|
|
2436
|
-
return /* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsx56(
|
|
2437
2506
|
"li",
|
|
2438
2507
|
{
|
|
2439
2508
|
ref,
|
|
@@ -2451,19 +2520,19 @@ var MenuItem = ({
|
|
|
2451
2520
|
|
|
2452
2521
|
// src/Menu/MenuSection.tsx
|
|
2453
2522
|
import { useMenuSection } from "@react-aria/menu";
|
|
2454
|
-
import { useClassNames as
|
|
2455
|
-
import { Fragment as Fragment7, jsx as
|
|
2523
|
+
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
2524
|
+
import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2456
2525
|
var MenuSection = ({ onAction, item, state }) => {
|
|
2457
2526
|
let { itemProps, headingProps, groupProps } = useMenuSection({
|
|
2458
2527
|
heading: item.rendered,
|
|
2459
2528
|
"aria-label": item["aria-label"]
|
|
2460
2529
|
});
|
|
2461
|
-
const className =
|
|
2462
|
-
return /* @__PURE__ */
|
|
2463
|
-
item.key !== state.collection.getFirstKey() && /* @__PURE__ */
|
|
2464
|
-
/* @__PURE__ */
|
|
2465
|
-
item.rendered && /* @__PURE__ */
|
|
2466
|
-
/* @__PURE__ */
|
|
2530
|
+
const className = useClassNames29({ component: "Menu" });
|
|
2531
|
+
return /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
2532
|
+
item.key !== state.collection.getFirstKey() && /* @__PURE__ */ jsx57("li", { children: /* @__PURE__ */ jsx57(_Divider, { variant: "section" }) }),
|
|
2533
|
+
/* @__PURE__ */ jsxs23("li", { ...itemProps, children: [
|
|
2534
|
+
item.rendered && /* @__PURE__ */ jsx57("span", { ...headingProps, className: className.section, children: item.rendered }),
|
|
2535
|
+
/* @__PURE__ */ jsx57("ul", { ...groupProps, className: "pb-1", children: [...item.props.children].map((node) => /* @__PURE__ */ jsx57(
|
|
2467
2536
|
MenuItem,
|
|
2468
2537
|
{
|
|
2469
2538
|
item: node,
|
|
@@ -2485,7 +2554,7 @@ import { useMenuTrigger } from "@react-aria/menu";
|
|
|
2485
2554
|
import { useObjectRef as useObjectRef4 } from "@react-aria/utils";
|
|
2486
2555
|
import { useMenuTriggerState } from "@react-stately/menu";
|
|
2487
2556
|
import { useSmallScreen } from "@marigold/system";
|
|
2488
|
-
import { jsx as
|
|
2557
|
+
import { jsx as jsx58, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2489
2558
|
var MenuTrigger = ({
|
|
2490
2559
|
disabled,
|
|
2491
2560
|
open,
|
|
@@ -2512,8 +2581,8 @@ var MenuTrigger = ({
|
|
|
2512
2581
|
autoFocus: state.focusStrategy
|
|
2513
2582
|
};
|
|
2514
2583
|
const isSmallScreen = useSmallScreen();
|
|
2515
|
-
return /* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2584
|
+
return /* @__PURE__ */ jsxs24(MenuContext.Provider, { value: menuContext, children: [
|
|
2585
|
+
/* @__PURE__ */ jsx58(
|
|
2517
2586
|
PressResponder2,
|
|
2518
2587
|
{
|
|
2519
2588
|
...menuTriggerProps,
|
|
@@ -2522,12 +2591,12 @@ var MenuTrigger = ({
|
|
|
2522
2591
|
children: menuTrigger
|
|
2523
2592
|
}
|
|
2524
2593
|
),
|
|
2525
|
-
isSmallScreen ? /* @__PURE__ */
|
|
2594
|
+
isSmallScreen ? /* @__PURE__ */ jsx58(Tray, { state, children: menu }) : /* @__PURE__ */ jsx58(Popover, { triggerRef: menuTriggerRef, scrollRef: menuRef, state, children: menu })
|
|
2526
2595
|
] });
|
|
2527
2596
|
};
|
|
2528
2597
|
|
|
2529
2598
|
// src/Menu/Menu.tsx
|
|
2530
|
-
import { jsx as
|
|
2599
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2531
2600
|
var Menu = ({ variant, size, ...props }) => {
|
|
2532
2601
|
const { ref: scrollRef, ...menuContext } = useMenuContext();
|
|
2533
2602
|
const ownProps = { ...props, ...menuContext };
|
|
@@ -2535,10 +2604,10 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
2535
2604
|
const state = useTreeState2({ ...ownProps, selectionMode: "none" });
|
|
2536
2605
|
const { menuProps } = useMenu(ownProps, state, ref);
|
|
2537
2606
|
useSyncRef({ ref: scrollRef }, ref);
|
|
2538
|
-
const classNames2 =
|
|
2539
|
-
return /* @__PURE__ */
|
|
2607
|
+
const classNames2 = useClassNames30({ component: "Menu", variant, size });
|
|
2608
|
+
return /* @__PURE__ */ jsx59("ul", { ref, className: classNames2.container, ...menuProps, children: [...state.collection].map((item) => {
|
|
2540
2609
|
if (item.type === "section") {
|
|
2541
|
-
return /* @__PURE__ */
|
|
2610
|
+
return /* @__PURE__ */ jsx59(
|
|
2542
2611
|
MenuSection_default,
|
|
2543
2612
|
{
|
|
2544
2613
|
item,
|
|
@@ -2548,7 +2617,7 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
2548
2617
|
item.key
|
|
2549
2618
|
);
|
|
2550
2619
|
}
|
|
2551
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ jsx59(
|
|
2552
2621
|
MenuItem,
|
|
2553
2622
|
{
|
|
2554
2623
|
item,
|
|
@@ -2566,25 +2635,25 @@ Menu.Section = Section;
|
|
|
2566
2635
|
|
|
2567
2636
|
// src/Menu/ActionMenu.tsx
|
|
2568
2637
|
import { SVG as SVG5 } from "@marigold/system";
|
|
2569
|
-
import { jsx as
|
|
2638
|
+
import { jsx as jsx60, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2570
2639
|
var ActionMenu = (props) => {
|
|
2571
|
-
return /* @__PURE__ */
|
|
2572
|
-
/* @__PURE__ */
|
|
2573
|
-
/* @__PURE__ */
|
|
2640
|
+
return /* @__PURE__ */ jsxs25(Menu.Trigger, { children: [
|
|
2641
|
+
/* @__PURE__ */ jsx60(_Button, { variant: "menu", size: "small", children: /* @__PURE__ */ jsx60(SVG5, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx60("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
|
|
2642
|
+
/* @__PURE__ */ jsx60(Menu, { ...props })
|
|
2574
2643
|
] });
|
|
2575
2644
|
};
|
|
2576
2645
|
|
|
2577
2646
|
// src/Message/Message.tsx
|
|
2578
|
-
import { cn as
|
|
2579
|
-
import { jsx as
|
|
2647
|
+
import { cn as cn29, useClassNames as useClassNames31 } from "@marigold/system";
|
|
2648
|
+
import { jsx as jsx61, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2580
2649
|
var icons = {
|
|
2581
|
-
info: () => /* @__PURE__ */
|
|
2650
|
+
info: () => /* @__PURE__ */ jsx61(
|
|
2582
2651
|
"svg",
|
|
2583
2652
|
{
|
|
2584
2653
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2585
2654
|
viewBox: "0 0 24 24",
|
|
2586
2655
|
fill: "currentColor",
|
|
2587
|
-
children: /* @__PURE__ */
|
|
2656
|
+
children: /* @__PURE__ */ jsx61(
|
|
2588
2657
|
"path",
|
|
2589
2658
|
{
|
|
2590
2659
|
fillRule: "evenodd",
|
|
@@ -2594,13 +2663,13 @@ var icons = {
|
|
|
2594
2663
|
)
|
|
2595
2664
|
}
|
|
2596
2665
|
),
|
|
2597
|
-
warning: () => /* @__PURE__ */
|
|
2666
|
+
warning: () => /* @__PURE__ */ jsx61(
|
|
2598
2667
|
"svg",
|
|
2599
2668
|
{
|
|
2600
2669
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2601
2670
|
viewBox: "0 0 24 24",
|
|
2602
2671
|
fill: "currentColor",
|
|
2603
|
-
children: /* @__PURE__ */
|
|
2672
|
+
children: /* @__PURE__ */ jsx61(
|
|
2604
2673
|
"path",
|
|
2605
2674
|
{
|
|
2606
2675
|
fillRule: "evenodd",
|
|
@@ -2610,13 +2679,13 @@ var icons = {
|
|
|
2610
2679
|
)
|
|
2611
2680
|
}
|
|
2612
2681
|
),
|
|
2613
|
-
error: () => /* @__PURE__ */
|
|
2682
|
+
error: () => /* @__PURE__ */ jsx61(
|
|
2614
2683
|
"svg",
|
|
2615
2684
|
{
|
|
2616
2685
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2617
2686
|
viewBox: "0 0 24 24",
|
|
2618
2687
|
fill: "currentColor",
|
|
2619
|
-
children: /* @__PURE__ */
|
|
2688
|
+
children: /* @__PURE__ */ jsx61(
|
|
2620
2689
|
"path",
|
|
2621
2690
|
{
|
|
2622
2691
|
fillRule: "evenodd",
|
|
@@ -2634,49 +2703,49 @@ var Message = ({
|
|
|
2634
2703
|
children,
|
|
2635
2704
|
...props
|
|
2636
2705
|
}) => {
|
|
2637
|
-
const classNames2 =
|
|
2706
|
+
const classNames2 = useClassNames31({ component: "Message", variant, size });
|
|
2638
2707
|
const Icon3 = icons[variant];
|
|
2639
|
-
return /* @__PURE__ */
|
|
2708
|
+
return /* @__PURE__ */ jsxs26(
|
|
2640
2709
|
"div",
|
|
2641
2710
|
{
|
|
2642
|
-
className:
|
|
2711
|
+
className: cn29(
|
|
2643
2712
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2644
2713
|
classNames2.container
|
|
2645
2714
|
),
|
|
2646
2715
|
...props,
|
|
2647
2716
|
children: [
|
|
2648
|
-
/* @__PURE__ */
|
|
2649
|
-
/* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ jsx61("div", { className: cn29("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx61(Icon3, {}) }),
|
|
2718
|
+
/* @__PURE__ */ jsx61(
|
|
2650
2719
|
"div",
|
|
2651
2720
|
{
|
|
2652
|
-
className:
|
|
2721
|
+
className: cn29("col-start-2 row-start-1 self-center", classNames2.title),
|
|
2653
2722
|
children: messageTitle
|
|
2654
2723
|
}
|
|
2655
2724
|
),
|
|
2656
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ jsx61("div", { className: cn29("col-start-2", classNames2.content), children })
|
|
2657
2726
|
]
|
|
2658
2727
|
}
|
|
2659
2728
|
);
|
|
2660
2729
|
};
|
|
2661
2730
|
|
|
2662
2731
|
// src/NumberField/NumberField.tsx
|
|
2663
|
-
import { forwardRef as
|
|
2732
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
2664
2733
|
import { useFocusRing as useFocusRing6 } from "@react-aria/focus";
|
|
2665
2734
|
import { useLocale as useLocale4 } from "@react-aria/i18n";
|
|
2666
2735
|
import { useHover as useHover5 } from "@react-aria/interactions";
|
|
2667
2736
|
import { useNumberField } from "@react-aria/numberfield";
|
|
2668
2737
|
import { mergeProps as mergeProps12, useObjectRef as useObjectRef5 } from "@react-aria/utils";
|
|
2669
2738
|
import { useNumberFieldState } from "@react-stately/numberfield";
|
|
2670
|
-
import { cn as
|
|
2739
|
+
import { cn as cn31, useClassNames as useClassNames32, useStateProps as useStateProps11 } from "@marigold/system";
|
|
2671
2740
|
|
|
2672
2741
|
// src/NumberField/StepButton.tsx
|
|
2673
2742
|
import { useRef as useRef19 } from "react";
|
|
2674
2743
|
import { useButton as useButton4 } from "@react-aria/button";
|
|
2675
2744
|
import { useHover as useHover4 } from "@react-aria/interactions";
|
|
2676
2745
|
import { mergeProps as mergeProps11 } from "@react-aria/utils";
|
|
2677
|
-
import { cn as
|
|
2678
|
-
import { jsx as
|
|
2679
|
-
var Plus = () => /* @__PURE__ */
|
|
2746
|
+
import { cn as cn30, useStateProps as useStateProps10 } from "@marigold/system";
|
|
2747
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2748
|
+
var Plus = () => /* @__PURE__ */ jsx62("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx62(
|
|
2680
2749
|
"path",
|
|
2681
2750
|
{
|
|
2682
2751
|
fillRule: "evenodd",
|
|
@@ -2684,7 +2753,7 @@ var Plus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox:
|
|
|
2684
2753
|
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"
|
|
2685
2754
|
}
|
|
2686
2755
|
) });
|
|
2687
|
-
var Minus = () => /* @__PURE__ */
|
|
2756
|
+
var Minus = () => /* @__PURE__ */ jsx62("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx62(
|
|
2688
2757
|
"path",
|
|
2689
2758
|
{
|
|
2690
2759
|
fillRule: "evenodd",
|
|
@@ -2703,16 +2772,16 @@ var StepButton = ({
|
|
|
2703
2772
|
ref
|
|
2704
2773
|
);
|
|
2705
2774
|
const { hoverProps, isHovered } = useHover4(props);
|
|
2706
|
-
const stateProps =
|
|
2775
|
+
const stateProps = useStateProps10({
|
|
2707
2776
|
active: isPressed,
|
|
2708
2777
|
hover: isHovered,
|
|
2709
2778
|
disabled: props.isDisabled
|
|
2710
2779
|
});
|
|
2711
2780
|
const Icon3 = direction === "up" ? Plus : Minus;
|
|
2712
|
-
return /* @__PURE__ */
|
|
2781
|
+
return /* @__PURE__ */ jsx62(
|
|
2713
2782
|
"div",
|
|
2714
2783
|
{
|
|
2715
|
-
className:
|
|
2784
|
+
className: cn30(
|
|
2716
2785
|
[
|
|
2717
2786
|
"flex items-center justify-center",
|
|
2718
2787
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
@@ -2721,14 +2790,14 @@ var StepButton = ({
|
|
|
2721
2790
|
),
|
|
2722
2791
|
...mergeProps11(buttonProps, hoverProps),
|
|
2723
2792
|
...stateProps,
|
|
2724
|
-
children: /* @__PURE__ */
|
|
2793
|
+
children: /* @__PURE__ */ jsx62(Icon3, {})
|
|
2725
2794
|
}
|
|
2726
2795
|
);
|
|
2727
2796
|
};
|
|
2728
2797
|
|
|
2729
2798
|
// src/NumberField/NumberField.tsx
|
|
2730
|
-
import { jsx as
|
|
2731
|
-
var NumberField =
|
|
2799
|
+
import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2800
|
+
var NumberField = forwardRef12(
|
|
2732
2801
|
({
|
|
2733
2802
|
variant,
|
|
2734
2803
|
size,
|
|
@@ -2766,7 +2835,7 @@ var NumberField = forwardRef11(
|
|
|
2766
2835
|
isTextInput: true,
|
|
2767
2836
|
autoFocus: props.autoFocus
|
|
2768
2837
|
});
|
|
2769
|
-
const stateProps =
|
|
2838
|
+
const stateProps = useStateProps11({
|
|
2770
2839
|
hover: isHovered,
|
|
2771
2840
|
focus: isFocused,
|
|
2772
2841
|
disabled,
|
|
@@ -2774,12 +2843,12 @@ var NumberField = forwardRef11(
|
|
|
2774
2843
|
readOnly,
|
|
2775
2844
|
required
|
|
2776
2845
|
});
|
|
2777
|
-
const classNames2 =
|
|
2846
|
+
const classNames2 = useClassNames32({
|
|
2778
2847
|
component: "NumberField",
|
|
2779
2848
|
size,
|
|
2780
2849
|
variant
|
|
2781
2850
|
});
|
|
2782
|
-
return /* @__PURE__ */
|
|
2851
|
+
return /* @__PURE__ */ jsx63(
|
|
2783
2852
|
FieldBase,
|
|
2784
2853
|
{
|
|
2785
2854
|
label: props.label,
|
|
@@ -2793,16 +2862,16 @@ var NumberField = forwardRef11(
|
|
|
2793
2862
|
variant,
|
|
2794
2863
|
size,
|
|
2795
2864
|
width,
|
|
2796
|
-
children: /* @__PURE__ */
|
|
2865
|
+
children: /* @__PURE__ */ jsxs27(
|
|
2797
2866
|
"div",
|
|
2798
2867
|
{
|
|
2799
2868
|
"data-group": true,
|
|
2800
|
-
className:
|
|
2869
|
+
className: cn31("flex items-stretch", classNames2.group),
|
|
2801
2870
|
"data-testid": "number-field-container",
|
|
2802
2871
|
...mergeProps12(groupProps, focusProps, hoverProps),
|
|
2803
2872
|
...stateProps,
|
|
2804
2873
|
children: [
|
|
2805
|
-
showStepper && /* @__PURE__ */
|
|
2874
|
+
showStepper && /* @__PURE__ */ jsx63(
|
|
2806
2875
|
StepButton,
|
|
2807
2876
|
{
|
|
2808
2877
|
className: classNames2.stepper,
|
|
@@ -2810,7 +2879,7 @@ var NumberField = forwardRef11(
|
|
|
2810
2879
|
...decrementButtonProps
|
|
2811
2880
|
}
|
|
2812
2881
|
),
|
|
2813
|
-
/* @__PURE__ */
|
|
2882
|
+
/* @__PURE__ */ jsx63("div", { className: "flex-1", children: /* @__PURE__ */ jsx63(
|
|
2814
2883
|
Input,
|
|
2815
2884
|
{
|
|
2816
2885
|
ref: inputRef,
|
|
@@ -2820,7 +2889,7 @@ var NumberField = forwardRef11(
|
|
|
2820
2889
|
...stateProps
|
|
2821
2890
|
}
|
|
2822
2891
|
) }),
|
|
2823
|
-
showStepper && /* @__PURE__ */
|
|
2892
|
+
showStepper && /* @__PURE__ */ jsx63(
|
|
2824
2893
|
StepButton,
|
|
2825
2894
|
{
|
|
2826
2895
|
className: classNames2.stepper,
|
|
@@ -2846,14 +2915,14 @@ import {
|
|
|
2846
2915
|
defaultTheme,
|
|
2847
2916
|
useTheme as useTheme3
|
|
2848
2917
|
} from "@marigold/system";
|
|
2849
|
-
import { jsx as
|
|
2918
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
2850
2919
|
function MarigoldProvider({
|
|
2851
2920
|
children,
|
|
2852
2921
|
theme
|
|
2853
2922
|
}) {
|
|
2854
2923
|
const outerTheme = useTheme3();
|
|
2855
2924
|
const isTopLevel = outerTheme === defaultTheme;
|
|
2856
|
-
return /* @__PURE__ */
|
|
2925
|
+
return /* @__PURE__ */ jsx64(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx64(OverlayProvider, { children }) : children });
|
|
2857
2926
|
}
|
|
2858
2927
|
|
|
2859
2928
|
// src/Radio/Radio.tsx
|
|
@@ -2864,109 +2933,15 @@ import { Radio } from "react-aria-components";
|
|
|
2864
2933
|
import { cn as cn33, useClassNames as useClassNames34 } from "@marigold/system";
|
|
2865
2934
|
|
|
2866
2935
|
// src/Radio/Context.ts
|
|
2867
|
-
import { createContext as
|
|
2868
|
-
var RadioGroupContext =
|
|
2936
|
+
import { createContext as createContext6, useContext as useContext6 } from "react";
|
|
2937
|
+
var RadioGroupContext = createContext6(
|
|
2869
2938
|
null
|
|
2870
2939
|
);
|
|
2871
|
-
var useRadioGroupContext = () =>
|
|
2940
|
+
var useRadioGroupContext = () => useContext6(RadioGroupContext);
|
|
2872
2941
|
|
|
2873
2942
|
// src/Radio/RadioGroup.tsx
|
|
2874
2943
|
import { RadioGroup } from "react-aria-components";
|
|
2875
2944
|
import { cn as cn32, useClassNames as useClassNames33 } from "@marigold/system";
|
|
2876
|
-
|
|
2877
|
-
// src/FieldBase/_FieldBase.tsx
|
|
2878
|
-
import { forwardRef as forwardRef12 } from "react";
|
|
2879
|
-
import { cn as cn31, width as twWidth2, useClassNames as useClassNames32 } from "@marigold/system";
|
|
2880
|
-
|
|
2881
|
-
// src/HelpText/_HelpText.tsx
|
|
2882
|
-
import { Text } from "react-aria-components";
|
|
2883
|
-
import { cn as cn30, useClassNames as useClassNames31 } from "@marigold/system";
|
|
2884
|
-
import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2885
|
-
var HelpText2 = ({
|
|
2886
|
-
variant,
|
|
2887
|
-
size,
|
|
2888
|
-
description,
|
|
2889
|
-
error,
|
|
2890
|
-
errorMessage,
|
|
2891
|
-
...props
|
|
2892
|
-
}) => {
|
|
2893
|
-
const hasErrorMessage = errorMessage && error;
|
|
2894
|
-
const classNames2 = useClassNames31({
|
|
2895
|
-
component: "HelpText",
|
|
2896
|
-
variant,
|
|
2897
|
-
size
|
|
2898
|
-
});
|
|
2899
|
-
if (!description && !errorMessage) {
|
|
2900
|
-
return null;
|
|
2901
|
-
}
|
|
2902
|
-
return /* @__PURE__ */ jsx63(
|
|
2903
|
-
Text,
|
|
2904
|
-
{
|
|
2905
|
-
...props,
|
|
2906
|
-
slot: hasErrorMessage ? "errorMessage" : "description",
|
|
2907
|
-
className: cn30("flex items-center gap-1", classNames2.container),
|
|
2908
|
-
children: hasErrorMessage ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
2909
|
-
/* @__PURE__ */ jsx63(
|
|
2910
|
-
"svg",
|
|
2911
|
-
{
|
|
2912
|
-
className: cn30("h-4 w-4", classNames2.icon),
|
|
2913
|
-
viewBox: "0 0 24 24",
|
|
2914
|
-
role: "presentation",
|
|
2915
|
-
children: /* @__PURE__ */ jsx63("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" })
|
|
2916
|
-
}
|
|
2917
|
-
),
|
|
2918
|
-
errorMessage
|
|
2919
|
-
] }) : description
|
|
2920
|
-
}
|
|
2921
|
-
);
|
|
2922
|
-
};
|
|
2923
|
-
|
|
2924
|
-
// src/FieldBase/_FieldBase.tsx
|
|
2925
|
-
import { jsx as jsx64, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2926
|
-
var fixedForwardRef = forwardRef12;
|
|
2927
|
-
var _FieldBase = (props, ref) => {
|
|
2928
|
-
const {
|
|
2929
|
-
as: Component = "div",
|
|
2930
|
-
children,
|
|
2931
|
-
label,
|
|
2932
|
-
size,
|
|
2933
|
-
variant,
|
|
2934
|
-
width = "full",
|
|
2935
|
-
description,
|
|
2936
|
-
errorMessage,
|
|
2937
|
-
...rest
|
|
2938
|
-
} = props;
|
|
2939
|
-
const classNames2 = useClassNames32({
|
|
2940
|
-
component: "Field",
|
|
2941
|
-
variant,
|
|
2942
|
-
size
|
|
2943
|
-
});
|
|
2944
|
-
return /* @__PURE__ */ jsxs27(
|
|
2945
|
-
Component,
|
|
2946
|
-
{
|
|
2947
|
-
ref,
|
|
2948
|
-
className: cn31("group/field", twWidth2[width], classNames2),
|
|
2949
|
-
...rest,
|
|
2950
|
-
children: [
|
|
2951
|
-
label ? /* @__PURE__ */ jsx64(_Label, { variant, size, children: label }) : /* @__PURE__ */ jsx64("span", { "aria-hidden": "true" }),
|
|
2952
|
-
children,
|
|
2953
|
-
/* @__PURE__ */ jsx64(
|
|
2954
|
-
HelpText2,
|
|
2955
|
-
{
|
|
2956
|
-
variant,
|
|
2957
|
-
size,
|
|
2958
|
-
description,
|
|
2959
|
-
errorMessage,
|
|
2960
|
-
error: props.isInvalid
|
|
2961
|
-
}
|
|
2962
|
-
)
|
|
2963
|
-
]
|
|
2964
|
-
}
|
|
2965
|
-
);
|
|
2966
|
-
};
|
|
2967
|
-
var FieldBase2 = fixedForwardRef(_FieldBase);
|
|
2968
|
-
|
|
2969
|
-
// src/Radio/RadioGroup.tsx
|
|
2970
2945
|
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2971
2946
|
var _RadioGroup = ({
|
|
2972
2947
|
variant,
|
|
@@ -3021,7 +2996,7 @@ var _RadioGroup = ({
|
|
|
3021
2996
|
};
|
|
3022
2997
|
|
|
3023
2998
|
// src/Radio/Radio.tsx
|
|
3024
|
-
import { Fragment as
|
|
2999
|
+
import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3025
3000
|
var Dot = () => /* @__PURE__ */ jsx66("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx66("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
3026
3001
|
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx66(
|
|
3027
3002
|
"div",
|
|
@@ -3056,7 +3031,7 @@ var _Radio = forwardRef13(
|
|
|
3056
3031
|
value,
|
|
3057
3032
|
isDisabled: disabled,
|
|
3058
3033
|
...props,
|
|
3059
|
-
children: ({ isSelected }) => /* @__PURE__ */ jsxs28(
|
|
3034
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3060
3035
|
/* @__PURE__ */ jsx66(
|
|
3061
3036
|
Icon2,
|
|
3062
3037
|
{
|
|
@@ -3091,7 +3066,7 @@ import {
|
|
|
3091
3066
|
cn as cn34,
|
|
3092
3067
|
useClassNames as useClassNames35,
|
|
3093
3068
|
useSmallScreen as useSmallScreen2,
|
|
3094
|
-
useStateProps as
|
|
3069
|
+
useStateProps as useStateProps12
|
|
3095
3070
|
} from "@marigold/system";
|
|
3096
3071
|
|
|
3097
3072
|
// src/Select/intl.ts
|
|
@@ -3146,7 +3121,7 @@ var Select = forwardRef14(
|
|
|
3146
3121
|
const { focusProps, isFocusVisible } = useFocusRing7();
|
|
3147
3122
|
const classNames2 = useClassNames35({ component: "Select", variant, size });
|
|
3148
3123
|
const isSmallScreen = useSmallScreen2();
|
|
3149
|
-
const stateProps =
|
|
3124
|
+
const stateProps = useStateProps12({
|
|
3150
3125
|
disabled,
|
|
3151
3126
|
error,
|
|
3152
3127
|
focusVisible: isFocusVisible,
|
|
@@ -3407,9 +3382,9 @@ import {
|
|
|
3407
3382
|
import { cn as cn42, useClassNames as useClassNames39 } from "@marigold/system";
|
|
3408
3383
|
|
|
3409
3384
|
// src/Table/Context.tsx
|
|
3410
|
-
import { createContext as
|
|
3411
|
-
var TableContext =
|
|
3412
|
-
var useTableContext = () =>
|
|
3385
|
+
import { createContext as createContext7, useContext as useContext7 } from "react";
|
|
3386
|
+
var TableContext = createContext7({});
|
|
3387
|
+
var useTableContext = () => useContext7(TableContext);
|
|
3413
3388
|
|
|
3414
3389
|
// src/Table/TableBody.tsx
|
|
3415
3390
|
import { useTableRowGroup } from "@react-aria/table";
|
|
@@ -3424,7 +3399,7 @@ import { useRef as useRef21 } from "react";
|
|
|
3424
3399
|
import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
|
|
3425
3400
|
import { useTableCell } from "@react-aria/table";
|
|
3426
3401
|
import { mergeProps as mergeProps14 } from "@react-aria/utils";
|
|
3427
|
-
import { useStateProps as
|
|
3402
|
+
import { useStateProps as useStateProps13 } from "@marigold/system";
|
|
3428
3403
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
3429
3404
|
var TableCell = ({ cell }) => {
|
|
3430
3405
|
const ref = useRef21(null);
|
|
@@ -3447,7 +3422,7 @@ var TableCell = ({ cell }) => {
|
|
|
3447
3422
|
onPointerDown: (e) => e.stopPropagation()
|
|
3448
3423
|
};
|
|
3449
3424
|
const { focusProps, isFocusVisible } = useFocusRing8();
|
|
3450
|
-
const stateProps =
|
|
3425
|
+
const stateProps = useStateProps13({ disabled, focusVisible: isFocusVisible });
|
|
3451
3426
|
return /* @__PURE__ */ jsx73(
|
|
3452
3427
|
"td",
|
|
3453
3428
|
{
|
|
@@ -3465,7 +3440,7 @@ import { useRef as useRef22 } from "react";
|
|
|
3465
3440
|
import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
|
|
3466
3441
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
3467
3442
|
import { mergeProps as mergeProps15 } from "@react-aria/utils";
|
|
3468
|
-
import { cn as cn38, useStateProps as
|
|
3443
|
+
import { cn as cn38, useStateProps as useStateProps14 } from "@marigold/system";
|
|
3469
3444
|
|
|
3470
3445
|
// src/Table/utils.ts
|
|
3471
3446
|
var mapCheckboxProps = ({
|
|
@@ -3504,7 +3479,7 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
3504
3479
|
useTableSelectionCheckbox({ key: cell.parentKey }, state)
|
|
3505
3480
|
);
|
|
3506
3481
|
const { focusProps, isFocusVisible } = useFocusRing9();
|
|
3507
|
-
const stateProps =
|
|
3482
|
+
const stateProps = useStateProps14({ disabled, focusVisible: isFocusVisible });
|
|
3508
3483
|
return /* @__PURE__ */ jsx74(
|
|
3509
3484
|
"td",
|
|
3510
3485
|
{
|
|
@@ -3524,7 +3499,7 @@ import { useHover as useHover6 } from "@react-aria/interactions";
|
|
|
3524
3499
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3525
3500
|
import { mergeProps as mergeProps16 } from "@react-aria/utils";
|
|
3526
3501
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
3527
|
-
import { cn as cn39, useStateProps as
|
|
3502
|
+
import { cn as cn39, useStateProps as useStateProps15 } from "@marigold/system";
|
|
3528
3503
|
import { width as twWidth5 } from "@marigold/system";
|
|
3529
3504
|
import { jsx as jsx75, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3530
3505
|
var TableColumnHeader = ({
|
|
@@ -3543,7 +3518,7 @@ var TableColumnHeader = ({
|
|
|
3543
3518
|
);
|
|
3544
3519
|
const { hoverProps, isHovered } = useHover6({});
|
|
3545
3520
|
const { focusProps, isFocusVisible } = useFocusRing10();
|
|
3546
|
-
const stateProps =
|
|
3521
|
+
const stateProps = useStateProps15({
|
|
3547
3522
|
hover: isHovered,
|
|
3548
3523
|
focusVisible: isFocusVisible
|
|
3549
3524
|
});
|
|
@@ -3588,7 +3563,7 @@ import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
|
|
|
3588
3563
|
import { useHover as useHover7 } from "@react-aria/interactions";
|
|
3589
3564
|
import { useTableRow } from "@react-aria/table";
|
|
3590
3565
|
import { mergeProps as mergeProps17 } from "@react-aria/utils";
|
|
3591
|
-
import { cn as cn40, useClassNames as useClassNames38, useStateProps as
|
|
3566
|
+
import { cn as cn40, useClassNames as useClassNames38, useStateProps as useStateProps16 } from "@marigold/system";
|
|
3592
3567
|
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
3593
3568
|
var TableRow = ({ children, row }) => {
|
|
3594
3569
|
const ref = useRef25(null);
|
|
@@ -3612,7 +3587,7 @@ var TableRow = ({ children, row }) => {
|
|
|
3612
3587
|
const { hoverProps, isHovered } = useHover7({
|
|
3613
3588
|
isDisabled: disabled || !interactive
|
|
3614
3589
|
});
|
|
3615
|
-
const stateProps =
|
|
3590
|
+
const stateProps = useStateProps16({
|
|
3616
3591
|
disabled,
|
|
3617
3592
|
selected,
|
|
3618
3593
|
hover: isHovered,
|
|
@@ -3648,7 +3623,7 @@ import { mergeProps as mergeProps18 } from "@react-aria/utils";
|
|
|
3648
3623
|
import {
|
|
3649
3624
|
cn as cn41,
|
|
3650
3625
|
width as twWidth6,
|
|
3651
|
-
useStateProps as
|
|
3626
|
+
useStateProps as useStateProps17
|
|
3652
3627
|
} from "@marigold/system";
|
|
3653
3628
|
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
3654
3629
|
var TableSelectAllCell = ({
|
|
@@ -3667,7 +3642,7 @@ var TableSelectAllCell = ({
|
|
|
3667
3642
|
const { checkboxProps } = mapCheckboxProps(useTableSelectAllCheckbox(state));
|
|
3668
3643
|
const { hoverProps, isHovered } = useHover8({});
|
|
3669
3644
|
const { focusProps, isFocusVisible } = useFocusRing12();
|
|
3670
|
-
const stateProps =
|
|
3645
|
+
const stateProps = useStateProps17({
|
|
3671
3646
|
hover: isHovered,
|
|
3672
3647
|
focusVisible: isFocusVisible
|
|
3673
3648
|
});
|
|
@@ -3833,7 +3808,7 @@ import { useFocusRing as useFocusRing13 } from "@react-aria/focus";
|
|
|
3833
3808
|
import { useHover as useHover9 } from "@react-aria/interactions";
|
|
3834
3809
|
import { useTextField } from "@react-aria/textfield";
|
|
3835
3810
|
import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
|
|
3836
|
-
import { useClassNames as useClassNames41, useStateProps as
|
|
3811
|
+
import { useClassNames as useClassNames41, useStateProps as useStateProps18 } from "@marigold/system";
|
|
3837
3812
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3838
3813
|
var TextArea = forwardRef17(
|
|
3839
3814
|
({
|
|
@@ -3862,7 +3837,7 @@ var TextArea = forwardRef17(
|
|
|
3862
3837
|
);
|
|
3863
3838
|
const { hoverProps, isHovered } = useHover9({});
|
|
3864
3839
|
const { focusProps, isFocusVisible } = useFocusRing13();
|
|
3865
|
-
const stateProps =
|
|
3840
|
+
const stateProps = useStateProps18({
|
|
3866
3841
|
hover: isHovered,
|
|
3867
3842
|
focus: isFocusVisible,
|
|
3868
3843
|
disabled,
|
|
@@ -3907,7 +3882,7 @@ import { useFocusRing as useFocusRing14 } from "@react-aria/focus";
|
|
|
3907
3882
|
import { useHover as useHover10 } from "@react-aria/interactions";
|
|
3908
3883
|
import { useTextField as useTextField2 } from "@react-aria/textfield";
|
|
3909
3884
|
import { mergeProps as mergeProps19, useObjectRef as useObjectRef8 } from "@react-aria/utils";
|
|
3910
|
-
import { useStateProps as
|
|
3885
|
+
import { useStateProps as useStateProps19 } from "@marigold/system";
|
|
3911
3886
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
3912
3887
|
var TextField = forwardRef18(
|
|
3913
3888
|
({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
|
|
@@ -3928,7 +3903,7 @@ var TextField = forwardRef18(
|
|
|
3928
3903
|
isTextInput: true,
|
|
3929
3904
|
autoFocus
|
|
3930
3905
|
});
|
|
3931
|
-
const stateProps =
|
|
3906
|
+
const stateProps = useStateProps19({
|
|
3932
3907
|
hover: isHovered,
|
|
3933
3908
|
focus: isFocused,
|
|
3934
3909
|
disabled,
|
|
@@ -4000,9 +3975,9 @@ import { useTooltip } from "@react-aria/tooltip";
|
|
|
4000
3975
|
import { cn as cn45, useClassNames as useClassNames42 } from "@marigold/system";
|
|
4001
3976
|
|
|
4002
3977
|
// src/Tooltip/Context.ts
|
|
4003
|
-
import { createContext as
|
|
4004
|
-
var TooltipContext =
|
|
4005
|
-
var useTooltipContext = () =>
|
|
3978
|
+
import { createContext as createContext8, useContext as useContext8 } from "react";
|
|
3979
|
+
var TooltipContext = createContext8({});
|
|
3980
|
+
var useTooltipContext = () => useContext8(TooltipContext);
|
|
4006
3981
|
|
|
4007
3982
|
// src/Tooltip/TooltipTrigger.tsx
|
|
4008
3983
|
import { Children as Children7, useRef as useRef28 } from "react";
|
|
@@ -4102,7 +4077,7 @@ import { Item as Item6 } from "@react-stately/collections";
|
|
|
4102
4077
|
import { useRef as useRef30 } from "react";
|
|
4103
4078
|
import { useTagGroup } from "@react-aria/tag";
|
|
4104
4079
|
import { useListState } from "@react-stately/list";
|
|
4105
|
-
import { useStateProps as
|
|
4080
|
+
import { useStateProps as useStateProps20 } from "@marigold/system";
|
|
4106
4081
|
|
|
4107
4082
|
// src/TagGroup/Tag.tsx
|
|
4108
4083
|
import React3, { useRef as useRef29 } from "react";
|
|
@@ -4171,7 +4146,7 @@ var TagGroup = ({
|
|
|
4171
4146
|
const inputRef = useRef30(null);
|
|
4172
4147
|
const state = useListState(props);
|
|
4173
4148
|
const { gridProps, labelProps, descriptionProps, errorMessageProps } = useTagGroup(props, state, inputRef);
|
|
4174
|
-
const stateProps =
|
|
4149
|
+
const stateProps = useStateProps20({
|
|
4175
4150
|
error,
|
|
4176
4151
|
required
|
|
4177
4152
|
});
|
|
@@ -4444,16 +4419,16 @@ import { useTabListState } from "@react-stately/tabs";
|
|
|
4444
4419
|
import { cn as cn49, gapSpace as gapSpace8, useClassNames as useClassNames44 } from "@marigold/system";
|
|
4445
4420
|
|
|
4446
4421
|
// src/Tabs/Context.ts
|
|
4447
|
-
import { createContext as
|
|
4448
|
-
var TabContext =
|
|
4449
|
-
var useTabContext = () =>
|
|
4422
|
+
import { createContext as createContext9, useContext as useContext9 } from "react";
|
|
4423
|
+
var TabContext = createContext9({});
|
|
4424
|
+
var useTabContext = () => useContext9(TabContext);
|
|
4450
4425
|
|
|
4451
4426
|
// src/Tabs/Tab.tsx
|
|
4452
4427
|
import { useRef as useRef31 } from "react";
|
|
4453
4428
|
import { useFocus, useHover as useHover11 } from "@react-aria/interactions";
|
|
4454
4429
|
import { useTab } from "@react-aria/tabs";
|
|
4455
4430
|
import { mergeProps as mergeProps21 } from "@react-aria/utils";
|
|
4456
|
-
import { cn as cn47, useStateProps as
|
|
4431
|
+
import { cn as cn47, useStateProps as useStateProps21 } from "@marigold/system";
|
|
4457
4432
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
4458
4433
|
var Tab = ({ item, state }) => {
|
|
4459
4434
|
const { key, rendered } = item;
|
|
@@ -4464,7 +4439,7 @@ var Tab = ({ item, state }) => {
|
|
|
4464
4439
|
isDisabled: disabled || isSelected
|
|
4465
4440
|
});
|
|
4466
4441
|
const { focusProps } = useFocus({});
|
|
4467
|
-
const stateProps =
|
|
4442
|
+
const stateProps = useStateProps21({ active: isSelected, hover: isHovered });
|
|
4468
4443
|
const { classNames: classNames2 } = useTabContext();
|
|
4469
4444
|
return /* @__PURE__ */ jsx90(
|
|
4470
4445
|
"div",
|
|
@@ -4549,8 +4524,7 @@ export {
|
|
|
4549
4524
|
Card,
|
|
4550
4525
|
Center,
|
|
4551
4526
|
_Checkbox as Checkbox,
|
|
4552
|
-
CheckboxGroup,
|
|
4553
|
-
CheckboxGroupContext,
|
|
4527
|
+
_CheckboxGroup as CheckboxGroup,
|
|
4554
4528
|
Columns,
|
|
4555
4529
|
ComboBox,
|
|
4556
4530
|
Container,
|
|
@@ -4601,7 +4575,6 @@ export {
|
|
|
4601
4575
|
XLoader,
|
|
4602
4576
|
_Slider,
|
|
4603
4577
|
useAsyncList,
|
|
4604
|
-
useCheckboxGroupContext,
|
|
4605
4578
|
useFieldGroupContext,
|
|
4606
4579
|
useListData,
|
|
4607
4580
|
useTheme4 as useTheme
|