@marigold/components 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -2
- package/dist/index.js +127 -113
- package/dist/index.mjs +81 -67
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -159,6 +159,7 @@ var Button = forwardRef(
|
|
|
159
159
|
__baseCSS: {
|
|
160
160
|
display: "inline-flex",
|
|
161
161
|
alignItems: "center",
|
|
162
|
+
justifyContent: "center",
|
|
162
163
|
gap: "0.5ch",
|
|
163
164
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
164
165
|
width: fullWidth ? "100%" : void 0,
|
|
@@ -377,6 +378,7 @@ var Checkbox = forwardRef2(
|
|
|
377
378
|
useToggleState({
|
|
378
379
|
isSelected: checked,
|
|
379
380
|
defaultSelected: defaultChecked,
|
|
381
|
+
isReadOnly: readOnly,
|
|
380
382
|
...props
|
|
381
383
|
}),
|
|
382
384
|
inputRef
|
|
@@ -846,13 +848,25 @@ var Footer = ({ children, variant, size, ...props }) => {
|
|
|
846
848
|
|
|
847
849
|
// src/Image/Image.tsx
|
|
848
850
|
import React24 from "react";
|
|
851
|
+
import { Box as Box12 } from "@marigold/system";
|
|
849
852
|
import { useComponentStyles as useComponentStyles14 } from "@marigold/system";
|
|
850
|
-
var Image = ({
|
|
851
|
-
|
|
852
|
-
|
|
853
|
+
var Image = ({
|
|
854
|
+
variant,
|
|
855
|
+
size,
|
|
856
|
+
fit,
|
|
857
|
+
position,
|
|
858
|
+
...props
|
|
859
|
+
}) => {
|
|
860
|
+
const styles = useComponentStyles14("Image", { variant, size });
|
|
861
|
+
const css = {
|
|
862
|
+
...styles,
|
|
863
|
+
objectFit: fit,
|
|
864
|
+
objectPosition: position
|
|
865
|
+
};
|
|
866
|
+
return /* @__PURE__ */ React24.createElement(Box12, {
|
|
853
867
|
...props,
|
|
854
868
|
as: "img",
|
|
855
|
-
css
|
|
869
|
+
css
|
|
856
870
|
});
|
|
857
871
|
};
|
|
858
872
|
|
|
@@ -887,11 +901,11 @@ var Inline = ({
|
|
|
887
901
|
|
|
888
902
|
// src/Input/Input.tsx
|
|
889
903
|
import React26, { forwardRef as forwardRef5 } from "react";
|
|
890
|
-
import { Box as
|
|
904
|
+
import { Box as Box13, useComponentStyles as useComponentStyles15 } from "@marigold/system";
|
|
891
905
|
var Input = forwardRef5(
|
|
892
906
|
({ variant, size, type = "text", ...props }, ref) => {
|
|
893
907
|
const styles = useComponentStyles15("Input", { variant, size });
|
|
894
|
-
return /* @__PURE__ */ React26.createElement(
|
|
908
|
+
return /* @__PURE__ */ React26.createElement(Box13, {
|
|
895
909
|
...props,
|
|
896
910
|
ref,
|
|
897
911
|
as: "input",
|
|
@@ -940,7 +954,7 @@ var Link = forwardRef6(
|
|
|
940
954
|
// src/List/List.tsx
|
|
941
955
|
import React29 from "react";
|
|
942
956
|
import {
|
|
943
|
-
Box as
|
|
957
|
+
Box as Box15,
|
|
944
958
|
useComponentStyles as useComponentStyles17
|
|
945
959
|
} from "@marigold/system";
|
|
946
960
|
|
|
@@ -951,10 +965,10 @@ var useListContext = () => useContext3(ListContext);
|
|
|
951
965
|
|
|
952
966
|
// src/List/ListItem.tsx
|
|
953
967
|
import React28 from "react";
|
|
954
|
-
import { Box as
|
|
968
|
+
import { Box as Box14 } from "@marigold/system";
|
|
955
969
|
var ListItem = ({ children, ...props }) => {
|
|
956
970
|
const { styles } = useListContext();
|
|
957
|
-
return /* @__PURE__ */ React28.createElement(
|
|
971
|
+
return /* @__PURE__ */ React28.createElement(Box14, {
|
|
958
972
|
...props,
|
|
959
973
|
as: "li",
|
|
960
974
|
css: styles
|
|
@@ -974,7 +988,7 @@ var List = ({
|
|
|
974
988
|
{ variant, size },
|
|
975
989
|
{ parts: ["ul", "ol", "item"] }
|
|
976
990
|
);
|
|
977
|
-
return /* @__PURE__ */ React29.createElement(
|
|
991
|
+
return /* @__PURE__ */ React29.createElement(Box15, {
|
|
978
992
|
...props,
|
|
979
993
|
as,
|
|
980
994
|
css: styles[as]
|
|
@@ -992,7 +1006,7 @@ import { DismissButton } from "@react-aria/overlays";
|
|
|
992
1006
|
import { Item } from "@react-stately/collections";
|
|
993
1007
|
import { useTreeState } from "@react-stately/tree";
|
|
994
1008
|
import {
|
|
995
|
-
Box as
|
|
1009
|
+
Box as Box17,
|
|
996
1010
|
useComponentStyles as useComponentStyles18
|
|
997
1011
|
} from "@marigold/system";
|
|
998
1012
|
|
|
@@ -1050,7 +1064,7 @@ import React31, { useRef as useRef5 } from "react";
|
|
|
1050
1064
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
1051
1065
|
import { useMenuItem } from "@react-aria/menu";
|
|
1052
1066
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
1053
|
-
import { Box as
|
|
1067
|
+
import { Box as Box16, useStateProps as useStateProps3 } from "@marigold/system";
|
|
1054
1068
|
var MenuItem = ({ item, state, onAction, css }) => {
|
|
1055
1069
|
const ref = useRef5(null);
|
|
1056
1070
|
const { onClose } = useMenuContext();
|
|
@@ -1067,7 +1081,7 @@ var MenuItem = ({ item, state, onAction, css }) => {
|
|
|
1067
1081
|
const stateProps = useStateProps3({
|
|
1068
1082
|
focus: isFocusVisible
|
|
1069
1083
|
});
|
|
1070
|
-
return /* @__PURE__ */ React31.createElement(
|
|
1084
|
+
return /* @__PURE__ */ React31.createElement(Box16, {
|
|
1071
1085
|
as: "li",
|
|
1072
1086
|
ref,
|
|
1073
1087
|
__baseCSS: {
|
|
@@ -1097,7 +1111,7 @@ var Menu = ({ variant, size, ...props }) => {
|
|
|
1097
1111
|
restoreFocus: true
|
|
1098
1112
|
}, /* @__PURE__ */ React32.createElement("div", null, /* @__PURE__ */ React32.createElement(DismissButton, {
|
|
1099
1113
|
onDismiss: ownProps.onClose
|
|
1100
|
-
}), /* @__PURE__ */ React32.createElement(
|
|
1114
|
+
}), /* @__PURE__ */ React32.createElement(Box17, {
|
|
1101
1115
|
as: "ul",
|
|
1102
1116
|
ref,
|
|
1103
1117
|
style: { width: triggerWidth },
|
|
@@ -1171,20 +1185,20 @@ import { useNumberField } from "@react-aria/numberfield";
|
|
|
1171
1185
|
import { mergeProps as mergeProps6, useObjectRef as useObjectRef5 } from "@react-aria/utils";
|
|
1172
1186
|
import { useNumberFieldState } from "@react-stately/numberfield";
|
|
1173
1187
|
import {
|
|
1174
|
-
Box as
|
|
1188
|
+
Box as Box21,
|
|
1175
1189
|
useComponentStyles as useComponentStyles21,
|
|
1176
1190
|
useStateProps as useStateProps5
|
|
1177
1191
|
} from "@marigold/system";
|
|
1178
1192
|
|
|
1179
1193
|
// src/FieldBase/FieldBase.tsx
|
|
1180
1194
|
import React35 from "react";
|
|
1181
|
-
import { Box as
|
|
1195
|
+
import { Box as Box19 } from "@marigold/system";
|
|
1182
1196
|
|
|
1183
1197
|
// src/HelpText/HelpText.tsx
|
|
1184
1198
|
import React34 from "react";
|
|
1185
1199
|
import { Exclamation as Exclamation2 } from "@marigold/icons";
|
|
1186
1200
|
import {
|
|
1187
|
-
Box as
|
|
1201
|
+
Box as Box18,
|
|
1188
1202
|
useComponentStyles as useComponentStyles20
|
|
1189
1203
|
} from "@marigold/system";
|
|
1190
1204
|
var HelpText = ({
|
|
@@ -1205,7 +1219,7 @@ var HelpText = ({
|
|
|
1205
1219
|
{ variant, size },
|
|
1206
1220
|
{ parts: ["container", "icon"] }
|
|
1207
1221
|
);
|
|
1208
|
-
return /* @__PURE__ */ React34.createElement(
|
|
1222
|
+
return /* @__PURE__ */ React34.createElement(Box18, {
|
|
1209
1223
|
...hasErrorMessage ? errorMessageProps : descriptionProps,
|
|
1210
1224
|
...props,
|
|
1211
1225
|
__baseCSS: { display: "flex", alignItems: "center", gap: 4 },
|
|
@@ -1234,7 +1248,7 @@ var FieldBase = ({
|
|
|
1234
1248
|
stateProps
|
|
1235
1249
|
}) => {
|
|
1236
1250
|
const hasHelpText = !!description || errorMessage && error;
|
|
1237
|
-
return /* @__PURE__ */ React35.createElement(
|
|
1251
|
+
return /* @__PURE__ */ React35.createElement(Box19, {
|
|
1238
1252
|
css: { display: "flex", flexDirection: "column", width }
|
|
1239
1253
|
}, label && /* @__PURE__ */ React35.createElement(Label, {
|
|
1240
1254
|
required,
|
|
@@ -1260,8 +1274,8 @@ import React36, { useRef as useRef7 } from "react";
|
|
|
1260
1274
|
import { useButton as useButton3 } from "@react-aria/button";
|
|
1261
1275
|
import { useHover as useHover3 } from "@react-aria/interactions";
|
|
1262
1276
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
1263
|
-
import { Box as
|
|
1264
|
-
var Plus = () => /* @__PURE__ */ React36.createElement(
|
|
1277
|
+
import { Box as Box20, useStateProps as useStateProps4 } from "@marigold/system";
|
|
1278
|
+
var Plus = () => /* @__PURE__ */ React36.createElement(Box20, {
|
|
1265
1279
|
as: "svg",
|
|
1266
1280
|
__baseCSS: { width: 16, height: 16 },
|
|
1267
1281
|
viewBox: "0 0 20 20",
|
|
@@ -1271,7 +1285,7 @@ var Plus = () => /* @__PURE__ */ React36.createElement(Box19, {
|
|
|
1271
1285
|
clipRule: "evenodd",
|
|
1272
1286
|
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"
|
|
1273
1287
|
}));
|
|
1274
|
-
var Minus = () => /* @__PURE__ */ React36.createElement(
|
|
1288
|
+
var Minus = () => /* @__PURE__ */ React36.createElement(Box20, {
|
|
1275
1289
|
as: "svg",
|
|
1276
1290
|
__baseCSS: { width: 16, height: 16 },
|
|
1277
1291
|
viewBox: "0 0 20 20",
|
|
@@ -1294,7 +1308,7 @@ var StepButton = ({ direction, css, ...props }) => {
|
|
|
1294
1308
|
disabled: props.isDisabled
|
|
1295
1309
|
});
|
|
1296
1310
|
const Icon3 = direction === "up" ? Plus : Minus;
|
|
1297
|
-
return /* @__PURE__ */ React36.createElement(
|
|
1311
|
+
return /* @__PURE__ */ React36.createElement(Box20, {
|
|
1298
1312
|
__baseCSS: {
|
|
1299
1313
|
display: "flex",
|
|
1300
1314
|
alignItems: "center",
|
|
@@ -1371,7 +1385,7 @@ var NumberField = forwardRef7(
|
|
|
1371
1385
|
variant,
|
|
1372
1386
|
size,
|
|
1373
1387
|
width
|
|
1374
|
-
}, /* @__PURE__ */ React37.createElement(
|
|
1388
|
+
}, /* @__PURE__ */ React37.createElement(Box21, {
|
|
1375
1389
|
"data-group": true,
|
|
1376
1390
|
__baseCSS: {
|
|
1377
1391
|
display: "flex",
|
|
@@ -1446,7 +1460,7 @@ import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
|
1446
1460
|
import { useRadio } from "@react-aria/radio";
|
|
1447
1461
|
import { useObjectRef as useObjectRef6 } from "@react-aria/utils";
|
|
1448
1462
|
import {
|
|
1449
|
-
Box as
|
|
1463
|
+
Box as Box23,
|
|
1450
1464
|
useComponentStyles as useComponentStyles23,
|
|
1451
1465
|
useStateProps as useStateProps6
|
|
1452
1466
|
} from "@marigold/system";
|
|
@@ -1463,7 +1477,7 @@ import React39 from "react";
|
|
|
1463
1477
|
import { useRadioGroup } from "@react-aria/radio";
|
|
1464
1478
|
import { useRadioGroupState } from "@react-stately/radio";
|
|
1465
1479
|
import {
|
|
1466
|
-
Box as
|
|
1480
|
+
Box as Box22,
|
|
1467
1481
|
useComponentStyles as useComponentStyles22
|
|
1468
1482
|
} from "@marigold/system";
|
|
1469
1483
|
var RadioGroup = ({
|
|
@@ -1492,14 +1506,14 @@ var RadioGroup = ({
|
|
|
1492
1506
|
{ variant, size },
|
|
1493
1507
|
{ parts: ["container", "group"] }
|
|
1494
1508
|
);
|
|
1495
|
-
return /* @__PURE__ */ React39.createElement(
|
|
1509
|
+
return /* @__PURE__ */ React39.createElement(Box22, {
|
|
1496
1510
|
...radioGroupProps,
|
|
1497
1511
|
css: styles.container
|
|
1498
1512
|
}, props.label && /* @__PURE__ */ React39.createElement(Label, {
|
|
1499
1513
|
as: "span",
|
|
1500
1514
|
required,
|
|
1501
1515
|
...labelProps
|
|
1502
|
-
}, props.label), /* @__PURE__ */ React39.createElement(
|
|
1516
|
+
}, props.label), /* @__PURE__ */ React39.createElement(Box22, {
|
|
1503
1517
|
role: "presentation",
|
|
1504
1518
|
"data-orientation": orientation,
|
|
1505
1519
|
__baseCSS: {
|
|
@@ -1523,7 +1537,7 @@ var Dot = () => /* @__PURE__ */ React40.createElement("svg", {
|
|
|
1523
1537
|
cy: "3",
|
|
1524
1538
|
r: "3"
|
|
1525
1539
|
}));
|
|
1526
|
-
var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React40.createElement(
|
|
1540
|
+
var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React40.createElement(Box23, {
|
|
1527
1541
|
"aria-hidden": "true",
|
|
1528
1542
|
__baseCSS: {
|
|
1529
1543
|
width: 16,
|
|
@@ -1569,7 +1583,7 @@ var Radio = forwardRef8(
|
|
|
1569
1583
|
readOnly: props.readOnly,
|
|
1570
1584
|
error
|
|
1571
1585
|
});
|
|
1572
|
-
return /* @__PURE__ */ React40.createElement(
|
|
1586
|
+
return /* @__PURE__ */ React40.createElement(Box23, {
|
|
1573
1587
|
as: "label",
|
|
1574
1588
|
__baseCSS: {
|
|
1575
1589
|
display: "flex",
|
|
@@ -1581,7 +1595,7 @@ var Radio = forwardRef8(
|
|
|
1581
1595
|
css: styles.container,
|
|
1582
1596
|
...hoverProps,
|
|
1583
1597
|
...stateProps
|
|
1584
|
-
}, /* @__PURE__ */ React40.createElement(
|
|
1598
|
+
}, /* @__PURE__ */ React40.createElement(Box23, {
|
|
1585
1599
|
as: "input",
|
|
1586
1600
|
ref: inputRef,
|
|
1587
1601
|
css: {
|
|
@@ -1600,7 +1614,7 @@ var Radio = forwardRef8(
|
|
|
1600
1614
|
checked: inputProps.checked,
|
|
1601
1615
|
css: styles.radio,
|
|
1602
1616
|
...stateProps
|
|
1603
|
-
}), /* @__PURE__ */ React40.createElement(
|
|
1617
|
+
}), /* @__PURE__ */ React40.createElement(Box23, {
|
|
1604
1618
|
css: styles.label,
|
|
1605
1619
|
...stateProps
|
|
1606
1620
|
}, props.children));
|
|
@@ -1622,7 +1636,7 @@ import { useSelectState } from "@react-stately/select";
|
|
|
1622
1636
|
import { Item as Item2, Section } from "@react-stately/collections";
|
|
1623
1637
|
import { mergeProps as mergeProps7, useObjectRef as useObjectRef8 } from "@react-aria/utils";
|
|
1624
1638
|
import {
|
|
1625
|
-
Box as
|
|
1639
|
+
Box as Box27,
|
|
1626
1640
|
useComponentStyles as useComponentStyles25,
|
|
1627
1641
|
useStateProps as useStateProps8
|
|
1628
1642
|
} from "@marigold/system";
|
|
@@ -1631,7 +1645,7 @@ import {
|
|
|
1631
1645
|
import React43, { forwardRef as forwardRef9 } from "react";
|
|
1632
1646
|
import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
|
|
1633
1647
|
import {
|
|
1634
|
-
Box as
|
|
1648
|
+
Box as Box26,
|
|
1635
1649
|
useComponentStyles as useComponentStyles24
|
|
1636
1650
|
} from "@marigold/system";
|
|
1637
1651
|
import { useListBox } from "@react-aria/listbox";
|
|
@@ -1644,12 +1658,12 @@ var useListBoxContext = () => useContext6(ListBoxContext);
|
|
|
1644
1658
|
// src/ListBox/ListBoxSection.tsx
|
|
1645
1659
|
import React42 from "react";
|
|
1646
1660
|
import { useListBoxSection } from "@react-aria/listbox";
|
|
1647
|
-
import { Box as
|
|
1661
|
+
import { Box as Box25 } from "@marigold/system";
|
|
1648
1662
|
|
|
1649
1663
|
// src/ListBox/ListBoxOption.tsx
|
|
1650
1664
|
import React41, { useRef as useRef8 } from "react";
|
|
1651
1665
|
import { useOption } from "@react-aria/listbox";
|
|
1652
|
-
import { Box as
|
|
1666
|
+
import { Box as Box24, useStateProps as useStateProps7 } from "@marigold/system";
|
|
1653
1667
|
var ListBoxOption = ({ item, state }) => {
|
|
1654
1668
|
const ref = useRef8(null);
|
|
1655
1669
|
const { optionProps, isSelected, isDisabled, isFocused } = useOption(
|
|
@@ -1665,7 +1679,7 @@ var ListBoxOption = ({ item, state }) => {
|
|
|
1665
1679
|
disabled: isDisabled,
|
|
1666
1680
|
focusVisible: isFocused
|
|
1667
1681
|
});
|
|
1668
|
-
return /* @__PURE__ */ React41.createElement(
|
|
1682
|
+
return /* @__PURE__ */ React41.createElement(Box24, {
|
|
1669
1683
|
as: "li",
|
|
1670
1684
|
ref,
|
|
1671
1685
|
css: styles.option,
|
|
@@ -1681,14 +1695,14 @@ var ListBoxSection = ({ section, state }) => {
|
|
|
1681
1695
|
"aria-label": section["aria-label"]
|
|
1682
1696
|
});
|
|
1683
1697
|
const { styles } = useListBoxContext();
|
|
1684
|
-
return /* @__PURE__ */ React42.createElement(
|
|
1698
|
+
return /* @__PURE__ */ React42.createElement(Box25, {
|
|
1685
1699
|
as: "li",
|
|
1686
1700
|
css: styles.section,
|
|
1687
1701
|
...itemProps
|
|
1688
|
-
}, section.rendered && /* @__PURE__ */ React42.createElement(
|
|
1702
|
+
}, section.rendered && /* @__PURE__ */ React42.createElement(Box25, {
|
|
1689
1703
|
css: styles.sectionTitle,
|
|
1690
1704
|
...headingProps
|
|
1691
|
-
}, section.rendered), /* @__PURE__ */ React42.createElement(
|
|
1705
|
+
}, section.rendered), /* @__PURE__ */ React42.createElement(Box25, {
|
|
1692
1706
|
as: "ul",
|
|
1693
1707
|
__baseCSS: { listStyle: "none", p: 0 },
|
|
1694
1708
|
css: styles.list,
|
|
@@ -1712,9 +1726,9 @@ var ListBox = forwardRef9(
|
|
|
1712
1726
|
);
|
|
1713
1727
|
return /* @__PURE__ */ React43.createElement(ListBoxContext.Provider, {
|
|
1714
1728
|
value: { styles }
|
|
1715
|
-
}, /* @__PURE__ */ React43.createElement(
|
|
1729
|
+
}, /* @__PURE__ */ React43.createElement(Box26, {
|
|
1716
1730
|
css: styles.container
|
|
1717
|
-
}, /* @__PURE__ */ React43.createElement(
|
|
1731
|
+
}, /* @__PURE__ */ React43.createElement(Box26, {
|
|
1718
1732
|
as: "ul",
|
|
1719
1733
|
ref: innerRef,
|
|
1720
1734
|
__baseCSS: { listStyle: "none", p: 0 },
|
|
@@ -1745,7 +1759,7 @@ var messages = {
|
|
|
1745
1759
|
};
|
|
1746
1760
|
|
|
1747
1761
|
// src/Select/Select.tsx
|
|
1748
|
-
var Chevron = ({ css }) => /* @__PURE__ */ React44.createElement(
|
|
1762
|
+
var Chevron = ({ css }) => /* @__PURE__ */ React44.createElement(Box27, {
|
|
1749
1763
|
as: "svg",
|
|
1750
1764
|
__baseCSS: { width: 16, height: 16 },
|
|
1751
1765
|
css,
|
|
@@ -1822,7 +1836,7 @@ var Select = forwardRef10(
|
|
|
1822
1836
|
label: props.label,
|
|
1823
1837
|
name: props.name,
|
|
1824
1838
|
isDisabled: disabled
|
|
1825
|
-
}), /* @__PURE__ */ React44.createElement(
|
|
1839
|
+
}), /* @__PURE__ */ React44.createElement(Box27, {
|
|
1826
1840
|
as: "button",
|
|
1827
1841
|
__baseCSS: {
|
|
1828
1842
|
display: "flex",
|
|
@@ -1835,7 +1849,7 @@ var Select = forwardRef10(
|
|
|
1835
1849
|
ref: buttonRef,
|
|
1836
1850
|
...mergeProps7(buttonProps, focusProps),
|
|
1837
1851
|
...stateProps
|
|
1838
|
-
}, /* @__PURE__ */ React44.createElement(
|
|
1852
|
+
}, /* @__PURE__ */ React44.createElement(Box27, {
|
|
1839
1853
|
css: {
|
|
1840
1854
|
overflow: "hidden",
|
|
1841
1855
|
whiteSpace: "nowrap"
|
|
@@ -1985,8 +1999,8 @@ var Slider = forwardRef11(
|
|
|
1985
1999
|
|
|
1986
2000
|
// src/Split/Split.tsx
|
|
1987
2001
|
import React47 from "react";
|
|
1988
|
-
import { Box as
|
|
1989
|
-
var Split = (props) => /* @__PURE__ */ React47.createElement(
|
|
2002
|
+
import { Box as Box28 } from "@marigold/system";
|
|
2003
|
+
var Split = (props) => /* @__PURE__ */ React47.createElement(Box28, {
|
|
1990
2004
|
...props,
|
|
1991
2005
|
role: "separator",
|
|
1992
2006
|
css: { flexGrow: 1 }
|
|
@@ -2140,7 +2154,7 @@ import {
|
|
|
2140
2154
|
useTableState
|
|
2141
2155
|
} from "@react-stately/table";
|
|
2142
2156
|
import {
|
|
2143
|
-
Box as
|
|
2157
|
+
Box as Box34,
|
|
2144
2158
|
useComponentStyles as useComponentStyles28
|
|
2145
2159
|
} from "@marigold/system";
|
|
2146
2160
|
|
|
@@ -2164,7 +2178,7 @@ import React51, { useRef as useRef10 } from "react";
|
|
|
2164
2178
|
import { useTableCell } from "@react-aria/table";
|
|
2165
2179
|
import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
|
|
2166
2180
|
import { mergeProps as mergeProps9 } from "@react-aria/utils";
|
|
2167
|
-
import { Box as
|
|
2181
|
+
import { Box as Box29, useStateProps as useStateProps11 } from "@marigold/system";
|
|
2168
2182
|
var TableCell = ({ cell }) => {
|
|
2169
2183
|
const ref = useRef10(null);
|
|
2170
2184
|
const { state, styles } = useTableContext();
|
|
@@ -2178,7 +2192,7 @@ var TableCell = ({ cell }) => {
|
|
|
2178
2192
|
);
|
|
2179
2193
|
const { focusProps, isFocusVisible } = useFocusRing9();
|
|
2180
2194
|
const stateProps = useStateProps11({ disabled, focusVisible: isFocusVisible });
|
|
2181
|
-
return /* @__PURE__ */ React51.createElement(
|
|
2195
|
+
return /* @__PURE__ */ React51.createElement(Box29, {
|
|
2182
2196
|
as: "td",
|
|
2183
2197
|
ref,
|
|
2184
2198
|
css: styles.cell,
|
|
@@ -2192,7 +2206,7 @@ import React52, { useRef as useRef11 } from "react";
|
|
|
2192
2206
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
2193
2207
|
import { useFocusRing as useFocusRing10 } from "@react-aria/focus";
|
|
2194
2208
|
import { mergeProps as mergeProps10 } from "@react-aria/utils";
|
|
2195
|
-
import { Box as
|
|
2209
|
+
import { Box as Box30, useStateProps as useStateProps12 } from "@marigold/system";
|
|
2196
2210
|
|
|
2197
2211
|
// src/Table/utils.ts
|
|
2198
2212
|
var mapCheckboxProps = ({
|
|
@@ -2231,7 +2245,7 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
2231
2245
|
);
|
|
2232
2246
|
const { focusProps, isFocusVisible } = useFocusRing10();
|
|
2233
2247
|
const stateProps = useStateProps12({ disabled, focusVisible: isFocusVisible });
|
|
2234
|
-
return /* @__PURE__ */ React52.createElement(
|
|
2248
|
+
return /* @__PURE__ */ React52.createElement(Box30, {
|
|
2235
2249
|
as: "td",
|
|
2236
2250
|
ref,
|
|
2237
2251
|
__baseCSS: {
|
|
@@ -2253,11 +2267,11 @@ import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
|
|
|
2253
2267
|
import { useHover as useHover6 } from "@react-aria/interactions";
|
|
2254
2268
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
2255
2269
|
import { mergeProps as mergeProps11 } from "@react-aria/utils";
|
|
2256
|
-
import { Box as
|
|
2270
|
+
import { Box as Box31, useStateProps as useStateProps13 } from "@marigold/system";
|
|
2257
2271
|
var SortIndicator = ({
|
|
2258
2272
|
direction = "ascending",
|
|
2259
2273
|
visible
|
|
2260
|
-
}) => /* @__PURE__ */ React53.createElement(
|
|
2274
|
+
}) => /* @__PURE__ */ React53.createElement(Box31, {
|
|
2261
2275
|
as: "span",
|
|
2262
2276
|
role: "presentation",
|
|
2263
2277
|
"aria-hidden": "true",
|
|
@@ -2284,7 +2298,7 @@ var TableColumnHeader = ({ column }) => {
|
|
|
2284
2298
|
hover: isHovered,
|
|
2285
2299
|
focusVisible: isFocusVisible
|
|
2286
2300
|
});
|
|
2287
|
-
return /* @__PURE__ */ React53.createElement(
|
|
2301
|
+
return /* @__PURE__ */ React53.createElement(Box31, {
|
|
2288
2302
|
as: "th",
|
|
2289
2303
|
colSpan: column.colspan,
|
|
2290
2304
|
ref,
|
|
@@ -2326,7 +2340,7 @@ import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
|
|
|
2326
2340
|
import { useHover as useHover7 } from "@react-aria/interactions";
|
|
2327
2341
|
import { useTableRow } from "@react-aria/table";
|
|
2328
2342
|
import { mergeProps as mergeProps12 } from "@react-aria/utils";
|
|
2329
|
-
import { Box as
|
|
2343
|
+
import { Box as Box32, useStateProps as useStateProps14 } from "@marigold/system";
|
|
2330
2344
|
var TableRow = ({ children, row }) => {
|
|
2331
2345
|
const ref = useRef14(null);
|
|
2332
2346
|
const { state, styles } = useTableContext();
|
|
@@ -2348,7 +2362,7 @@ var TableRow = ({ children, row }) => {
|
|
|
2348
2362
|
focusVisible: isFocusVisible,
|
|
2349
2363
|
active: isPressed
|
|
2350
2364
|
});
|
|
2351
|
-
return /* @__PURE__ */ React56.createElement(
|
|
2365
|
+
return /* @__PURE__ */ React56.createElement(Box32, {
|
|
2352
2366
|
as: "tr",
|
|
2353
2367
|
ref,
|
|
2354
2368
|
css: styles.row,
|
|
@@ -2366,7 +2380,7 @@ import {
|
|
|
2366
2380
|
useTableSelectAllCheckbox
|
|
2367
2381
|
} from "@react-aria/table";
|
|
2368
2382
|
import { mergeProps as mergeProps13 } from "@react-aria/utils";
|
|
2369
|
-
import { Box as
|
|
2383
|
+
import { Box as Box33, useStateProps as useStateProps15 } from "@marigold/system";
|
|
2370
2384
|
var TableSelectAllCell = ({ column }) => {
|
|
2371
2385
|
const ref = useRef15(null);
|
|
2372
2386
|
const { state, styles } = useTableContext();
|
|
@@ -2384,7 +2398,7 @@ var TableSelectAllCell = ({ column }) => {
|
|
|
2384
2398
|
hover: isHovered,
|
|
2385
2399
|
focusVisible: isFocusVisible
|
|
2386
2400
|
});
|
|
2387
|
-
return /* @__PURE__ */ React57.createElement(
|
|
2401
|
+
return /* @__PURE__ */ React57.createElement(Box33, {
|
|
2388
2402
|
as: "th",
|
|
2389
2403
|
ref,
|
|
2390
2404
|
__baseCSS: {
|
|
@@ -2421,7 +2435,7 @@ var Table = ({
|
|
|
2421
2435
|
const { collection } = state;
|
|
2422
2436
|
return /* @__PURE__ */ React58.createElement(TableContext.Provider, {
|
|
2423
2437
|
value: { state, styles }
|
|
2424
|
-
}, /* @__PURE__ */ React58.createElement(
|
|
2438
|
+
}, /* @__PURE__ */ React58.createElement(Box34, {
|
|
2425
2439
|
as: "table",
|
|
2426
2440
|
ref: tableRef,
|
|
2427
2441
|
__baseCSS: {
|
|
@@ -2471,7 +2485,7 @@ import React59 from "react";
|
|
|
2471
2485
|
import {
|
|
2472
2486
|
useComponentStyles as useComponentStyles29
|
|
2473
2487
|
} from "@marigold/system";
|
|
2474
|
-
import { Box as
|
|
2488
|
+
import { Box as Box35 } from "@marigold/system";
|
|
2475
2489
|
var Text = ({
|
|
2476
2490
|
variant,
|
|
2477
2491
|
size,
|
|
@@ -2487,7 +2501,7 @@ var Text = ({
|
|
|
2487
2501
|
variant,
|
|
2488
2502
|
size
|
|
2489
2503
|
});
|
|
2490
|
-
return /* @__PURE__ */ React59.createElement(
|
|
2504
|
+
return /* @__PURE__ */ React59.createElement(Box35, {
|
|
2491
2505
|
as: "p",
|
|
2492
2506
|
...props,
|
|
2493
2507
|
css: { color, cursor, outline, fontSize, textAlign: align, ...styles }
|
|
@@ -2501,7 +2515,7 @@ import { useFocusRing as useFocusRing14 } from "@react-aria/focus";
|
|
|
2501
2515
|
import { useTextField } from "@react-aria/textfield";
|
|
2502
2516
|
import { useObjectRef as useObjectRef11 } from "@react-aria/utils";
|
|
2503
2517
|
import {
|
|
2504
|
-
Box as
|
|
2518
|
+
Box as Box36,
|
|
2505
2519
|
useComponentStyles as useComponentStyles30,
|
|
2506
2520
|
useStateProps as useStateProps16
|
|
2507
2521
|
} from "@marigold/system";
|
|
@@ -2553,7 +2567,7 @@ var TextArea = forwardRef13(
|
|
|
2553
2567
|
variant,
|
|
2554
2568
|
size,
|
|
2555
2569
|
width
|
|
2556
|
-
}, /* @__PURE__ */ React60.createElement(
|
|
2570
|
+
}, /* @__PURE__ */ React60.createElement(Box36, {
|
|
2557
2571
|
as: "textarea",
|
|
2558
2572
|
css: styles,
|
|
2559
2573
|
ref: textAreaRef,
|
|
@@ -2642,7 +2656,7 @@ var Tiles = React62.forwardRef(
|
|
|
2642
2656
|
import React64 from "react";
|
|
2643
2657
|
import { useTooltip } from "@react-aria/tooltip";
|
|
2644
2658
|
import {
|
|
2645
|
-
Box as
|
|
2659
|
+
Box as Box37,
|
|
2646
2660
|
useComponentStyles as useComponentStyles31
|
|
2647
2661
|
} from "@marigold/system";
|
|
2648
2662
|
|
|
@@ -2719,13 +2733,13 @@ var Tooltip = ({ children, variant, size }) => {
|
|
|
2719
2733
|
{ variant, size },
|
|
2720
2734
|
{ parts: ["container", "arrow"] }
|
|
2721
2735
|
);
|
|
2722
|
-
return /* @__PURE__ */ React64.createElement(
|
|
2736
|
+
return /* @__PURE__ */ React64.createElement(Box37, {
|
|
2723
2737
|
...tooltipProps,
|
|
2724
2738
|
...rest,
|
|
2725
2739
|
ref: overlayRef,
|
|
2726
2740
|
css: styles.container,
|
|
2727
2741
|
"data-placement": placement
|
|
2728
|
-
}, /* @__PURE__ */ React64.createElement("div", null, children), /* @__PURE__ */ React64.createElement(
|
|
2742
|
+
}, /* @__PURE__ */ React64.createElement("div", null, children), /* @__PURE__ */ React64.createElement(Box37, {
|
|
2729
2743
|
...arrowProps,
|
|
2730
2744
|
__baseCSS: {
|
|
2731
2745
|
position: "absolute",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marigold/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Components for the Marigold Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"directory": "packages/components"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@marigold/icons": "1.0.
|
|
27
|
-
"@marigold/system": "2.
|
|
26
|
+
"@marigold/icons": "1.0.1",
|
|
27
|
+
"@marigold/system": "2.1.0",
|
|
28
28
|
"@marigold/tokens": "3.1.0",
|
|
29
29
|
"@marigold/types": "0.5.2",
|
|
30
30
|
"@react-aria/button": "3.6.0",
|