@marigold/components 7.5.0 → 7.5.1
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 +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +620 -566
- package/dist/index.mjs +483 -430
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -424,7 +424,13 @@ var _FieldBase = (props, ref) => {
|
|
|
424
424
|
Component,
|
|
425
425
|
{
|
|
426
426
|
ref,
|
|
427
|
-
className: cn6(
|
|
427
|
+
className: cn6(
|
|
428
|
+
"group/field",
|
|
429
|
+
twWidth[width],
|
|
430
|
+
classNames2,
|
|
431
|
+
className,
|
|
432
|
+
!label && `gap-x-0`
|
|
433
|
+
),
|
|
428
434
|
"data-required": props.isRequired ? true : void 0,
|
|
429
435
|
"data-error": props.isInvalid ? true : void 0,
|
|
430
436
|
...rest,
|
|
@@ -693,7 +699,7 @@ var Underlay = ({
|
|
|
693
699
|
ModalOverlay,
|
|
694
700
|
{
|
|
695
701
|
className: ({ isEntering, isExiting }) => cn11(
|
|
696
|
-
"fixed inset-0 z-
|
|
702
|
+
"fixed inset-0 z-40 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur ",
|
|
697
703
|
isEntering ? "animate-in fade-in duration-300 ease-out" : "",
|
|
698
704
|
isExiting ? "animate-out fade-out duration-200 ease-in" : "",
|
|
699
705
|
classNames2
|
|
@@ -1014,11 +1020,25 @@ var Center = ({
|
|
|
1014
1020
|
};
|
|
1015
1021
|
|
|
1016
1022
|
// src/Checkbox/Checkbox.tsx
|
|
1017
|
-
import { forwardRef as forwardRef11 } from "react";
|
|
1023
|
+
import { forwardRef as forwardRef11, useContext as useContext4 } from "react";
|
|
1018
1024
|
import { Checkbox } from "react-aria-components";
|
|
1019
|
-
import {
|
|
1020
|
-
import {
|
|
1021
|
-
|
|
1025
|
+
import { CheckboxGroupStateContext } from "react-aria-components";
|
|
1026
|
+
import { cn as cn17, useClassNames as useClassNames15 } from "@marigold/system";
|
|
1027
|
+
|
|
1028
|
+
// src/Checkbox/CheckBoxField.tsx
|
|
1029
|
+
import { createVar as createVar6, useClassNames as useClassNames14 } from "@marigold/system";
|
|
1030
|
+
import { jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1031
|
+
var CheckboxField = ({ children, labelWidth }) => {
|
|
1032
|
+
const classNames2 = useClassNames14({ component: "Field" });
|
|
1033
|
+
return /* @__PURE__ */ jsxs10("div", { className: classNames2, children: [
|
|
1034
|
+
/* @__PURE__ */ jsx27("div", { className: "w-[--labelWidth]", style: createVar6({ labelWidth }) }),
|
|
1035
|
+
children
|
|
1036
|
+
] });
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
// src/Checkbox/Checkbox.tsx
|
|
1040
|
+
import { Fragment as Fragment2, jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1041
|
+
var CheckMark = () => /* @__PURE__ */ jsx28("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx28(
|
|
1022
1042
|
"path",
|
|
1023
1043
|
{
|
|
1024
1044
|
fill: "currentColor",
|
|
@@ -1026,7 +1046,7 @@ var CheckMark = () => /* @__PURE__ */ jsx27("svg", { viewBox: "0 0 12 10", child
|
|
|
1026
1046
|
d: "M11.915 1.548 10.367 0 4.045 6.315 1.557 3.827 0 5.373l4.045 4.046 7.87-7.871Z"
|
|
1027
1047
|
}
|
|
1028
1048
|
) });
|
|
1029
|
-
var IndeterminateMark = () => /* @__PURE__ */
|
|
1049
|
+
var IndeterminateMark = () => /* @__PURE__ */ jsx28("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ jsx28(
|
|
1030
1050
|
"path",
|
|
1031
1051
|
{
|
|
1032
1052
|
fill: "currentColor",
|
|
@@ -1035,7 +1055,7 @@ var IndeterminateMark = () => /* @__PURE__ */ jsx27("svg", { width: "12", height
|
|
|
1035
1055
|
}
|
|
1036
1056
|
) });
|
|
1037
1057
|
var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
1038
|
-
return /* @__PURE__ */
|
|
1058
|
+
return /* @__PURE__ */ jsx28(
|
|
1039
1059
|
"div",
|
|
1040
1060
|
{
|
|
1041
1061
|
"aria-hidden": "true",
|
|
@@ -1047,7 +1067,7 @@ var Icon2 = ({ className, checked, indeterminate, ...props }) => {
|
|
|
1047
1067
|
className
|
|
1048
1068
|
),
|
|
1049
1069
|
...props,
|
|
1050
|
-
children: indeterminate ? /* @__PURE__ */
|
|
1070
|
+
children: indeterminate ? /* @__PURE__ */ jsx28(IndeterminateMark, {}) : checked ? /* @__PURE__ */ jsx28(CheckMark, {}) : null
|
|
1051
1071
|
}
|
|
1052
1072
|
);
|
|
1053
1073
|
};
|
|
@@ -1076,8 +1096,10 @@ var _Checkbox = forwardRef11(
|
|
|
1076
1096
|
defaultSelected: defaultChecked,
|
|
1077
1097
|
...rest
|
|
1078
1098
|
};
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1099
|
+
const { labelWidth } = useFieldGroupContext();
|
|
1100
|
+
const classNames2 = useClassNames15({ component: "Checkbox", variant, size });
|
|
1101
|
+
const state = useContext4(CheckboxGroupStateContext);
|
|
1102
|
+
const component = /* @__PURE__ */ jsx28(
|
|
1081
1103
|
Checkbox,
|
|
1082
1104
|
{
|
|
1083
1105
|
ref,
|
|
@@ -1087,8 +1109,8 @@ var _Checkbox = forwardRef11(
|
|
|
1087
1109
|
classNames2.container
|
|
1088
1110
|
),
|
|
1089
1111
|
...props,
|
|
1090
|
-
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1112
|
+
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1113
|
+
/* @__PURE__ */ jsx28(
|
|
1092
1114
|
Icon2,
|
|
1093
1115
|
{
|
|
1094
1116
|
checked: isSelected,
|
|
@@ -1096,17 +1118,26 @@ var _Checkbox = forwardRef11(
|
|
|
1096
1118
|
className: classNames2.checkbox
|
|
1097
1119
|
}
|
|
1098
1120
|
),
|
|
1099
|
-
/* @__PURE__ */
|
|
1121
|
+
/* @__PURE__ */ jsx28("div", { className: classNames2.label, children })
|
|
1100
1122
|
] })
|
|
1101
1123
|
}
|
|
1102
1124
|
);
|
|
1125
|
+
return !state && labelWidth ? /* @__PURE__ */ jsx28(CheckboxField, { labelWidth, children: component }) : component;
|
|
1103
1126
|
}
|
|
1104
1127
|
);
|
|
1105
1128
|
|
|
1106
1129
|
// src/Checkbox/CheckboxGroup.tsx
|
|
1107
1130
|
import { CheckboxGroup } from "react-aria-components";
|
|
1108
|
-
import { useClassNames as
|
|
1109
|
-
|
|
1131
|
+
import { cn as cn18, useClassNames as useClassNames16 } from "@marigold/system";
|
|
1132
|
+
|
|
1133
|
+
// src/Checkbox/Context.tsx
|
|
1134
|
+
import { createContext as createContext4, useContext as useContext5 } from "react";
|
|
1135
|
+
var CheckboxGroupContext = createContext4(
|
|
1136
|
+
null
|
|
1137
|
+
);
|
|
1138
|
+
|
|
1139
|
+
// src/Checkbox/CheckboxGroup.tsx
|
|
1140
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1110
1141
|
var _CheckboxGroup = ({
|
|
1111
1142
|
children,
|
|
1112
1143
|
variant,
|
|
@@ -1115,13 +1146,15 @@ var _CheckboxGroup = ({
|
|
|
1115
1146
|
disabled,
|
|
1116
1147
|
readOnly,
|
|
1117
1148
|
error,
|
|
1149
|
+
width,
|
|
1150
|
+
orientation = "vertical",
|
|
1118
1151
|
...rest
|
|
1119
1152
|
}) => {
|
|
1120
|
-
const classNames2 =
|
|
1153
|
+
const classNames2 = useClassNames16({
|
|
1121
1154
|
component: "Checkbox",
|
|
1122
1155
|
variant,
|
|
1123
1156
|
size,
|
|
1124
|
-
className: { group: "
|
|
1157
|
+
className: { group: "gap-x-2" }
|
|
1125
1158
|
});
|
|
1126
1159
|
const props = {
|
|
1127
1160
|
className: classNames2.group,
|
|
@@ -1131,17 +1164,29 @@ var _CheckboxGroup = ({
|
|
|
1131
1164
|
isInvalid: error,
|
|
1132
1165
|
...rest
|
|
1133
1166
|
};
|
|
1134
|
-
return /* @__PURE__ */
|
|
1167
|
+
return /* @__PURE__ */ jsx29(FieldBase, { as: CheckboxGroup, width, ...props, children: /* @__PURE__ */ jsx29(
|
|
1168
|
+
"div",
|
|
1169
|
+
{
|
|
1170
|
+
role: "presentation",
|
|
1171
|
+
"data-orientation": orientation,
|
|
1172
|
+
className: cn18(
|
|
1173
|
+
classNames2.group,
|
|
1174
|
+
"flex items-start",
|
|
1175
|
+
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
1176
|
+
),
|
|
1177
|
+
children: /* @__PURE__ */ jsx29(CheckboxGroupContext.Provider, { value: { width, variant, size }, children })
|
|
1178
|
+
}
|
|
1179
|
+
) });
|
|
1135
1180
|
};
|
|
1136
1181
|
|
|
1137
1182
|
// src/Columns/Columns.tsx
|
|
1138
1183
|
import { Children as Children3 } from "react";
|
|
1139
|
-
import { cn as
|
|
1140
|
-
import { jsx as
|
|
1184
|
+
import { cn as cn19, createVar as createVar7, gapSpace as gapSpace4 } from "@marigold/system";
|
|
1185
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1141
1186
|
var Columns = ({
|
|
1142
1187
|
space = 0,
|
|
1143
1188
|
columns,
|
|
1144
|
-
collapseAt
|
|
1189
|
+
collapseAt,
|
|
1145
1190
|
stretch,
|
|
1146
1191
|
children,
|
|
1147
1192
|
...props
|
|
@@ -1153,22 +1198,26 @@ var Columns = ({
|
|
|
1153
1198
|
)}`
|
|
1154
1199
|
);
|
|
1155
1200
|
}
|
|
1156
|
-
return /* @__PURE__ */
|
|
1201
|
+
return /* @__PURE__ */ jsx30(
|
|
1157
1202
|
"div",
|
|
1158
1203
|
{
|
|
1159
|
-
className:
|
|
1204
|
+
className: cn19(
|
|
1160
1205
|
"flex flex-wrap items-stretch",
|
|
1161
1206
|
stretch && "h-full",
|
|
1162
1207
|
gapSpace4[space]
|
|
1163
1208
|
),
|
|
1164
1209
|
...props,
|
|
1165
|
-
children: Children3.map(children, (child, idx) => /* @__PURE__ */
|
|
1210
|
+
children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx30(
|
|
1166
1211
|
"div",
|
|
1167
1212
|
{
|
|
1168
|
-
className:
|
|
1169
|
-
"
|
|
1213
|
+
className: cn19(
|
|
1214
|
+
columns[idx] !== "fit" ? "flex-[--columnSize]" : "flex h-fit w-fit",
|
|
1215
|
+
"basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
|
|
1170
1216
|
),
|
|
1171
|
-
style:
|
|
1217
|
+
style: createVar7({
|
|
1218
|
+
collapseAt,
|
|
1219
|
+
columnSize: columns[idx]
|
|
1220
|
+
}),
|
|
1172
1221
|
children: child
|
|
1173
1222
|
}
|
|
1174
1223
|
))
|
|
@@ -1178,13 +1227,13 @@ var Columns = ({
|
|
|
1178
1227
|
|
|
1179
1228
|
// src/Container/Container.tsx
|
|
1180
1229
|
import {
|
|
1181
|
-
cn as
|
|
1182
|
-
createVar as
|
|
1230
|
+
cn as cn20,
|
|
1231
|
+
createVar as createVar8,
|
|
1183
1232
|
gridColsAlign,
|
|
1184
1233
|
gridColumn,
|
|
1185
1234
|
placeItems
|
|
1186
1235
|
} from "@marigold/system";
|
|
1187
|
-
import { jsx as
|
|
1236
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1188
1237
|
var content = {
|
|
1189
1238
|
small: "20ch",
|
|
1190
1239
|
medium: "45ch",
|
|
@@ -1204,38 +1253,38 @@ var Container = ({
|
|
|
1204
1253
|
...props
|
|
1205
1254
|
}) => {
|
|
1206
1255
|
const maxWidth = contentType === "content" ? content[size] : header[size];
|
|
1207
|
-
return /* @__PURE__ */
|
|
1256
|
+
return /* @__PURE__ */ jsx31(
|
|
1208
1257
|
"div",
|
|
1209
1258
|
{
|
|
1210
1259
|
...props,
|
|
1211
|
-
className:
|
|
1260
|
+
className: cn20(
|
|
1212
1261
|
"grid",
|
|
1213
1262
|
placeItems[alignItems],
|
|
1214
1263
|
gridColsAlign[align],
|
|
1215
1264
|
gridColumn[align]
|
|
1216
1265
|
),
|
|
1217
|
-
style:
|
|
1266
|
+
style: createVar8({ maxWidth }),
|
|
1218
1267
|
children
|
|
1219
1268
|
}
|
|
1220
1269
|
);
|
|
1221
1270
|
};
|
|
1222
1271
|
|
|
1223
1272
|
// src/Dialog/Dialog.tsx
|
|
1224
|
-
import { useContext as
|
|
1273
|
+
import { useContext as useContext6 } from "react";
|
|
1225
1274
|
import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
|
|
1226
|
-
import { cn as
|
|
1275
|
+
import { cn as cn22, useClassNames as useClassNames18 } from "@marigold/system";
|
|
1227
1276
|
|
|
1228
1277
|
// src/Headline/Headline.tsx
|
|
1229
1278
|
import { Heading } from "react-aria-components";
|
|
1230
1279
|
import {
|
|
1231
|
-
cn as
|
|
1232
|
-
createVar as
|
|
1280
|
+
cn as cn21,
|
|
1281
|
+
createVar as createVar9,
|
|
1233
1282
|
getColor,
|
|
1234
1283
|
textAlign,
|
|
1235
|
-
useClassNames as
|
|
1284
|
+
useClassNames as useClassNames17,
|
|
1236
1285
|
useTheme as useTheme2
|
|
1237
1286
|
} from "@marigold/system";
|
|
1238
|
-
import { jsx as
|
|
1287
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1239
1288
|
var _Headline = ({
|
|
1240
1289
|
variant,
|
|
1241
1290
|
size,
|
|
@@ -1246,18 +1295,18 @@ var _Headline = ({
|
|
|
1246
1295
|
...props
|
|
1247
1296
|
}) => {
|
|
1248
1297
|
const theme = useTheme2();
|
|
1249
|
-
const classNames2 =
|
|
1298
|
+
const classNames2 = useClassNames17({
|
|
1250
1299
|
component: "Headline",
|
|
1251
1300
|
variant,
|
|
1252
1301
|
size: size != null ? size : `level-${level}`
|
|
1253
1302
|
});
|
|
1254
|
-
return /* @__PURE__ */
|
|
1303
|
+
return /* @__PURE__ */ jsx32(
|
|
1255
1304
|
Heading,
|
|
1256
1305
|
{
|
|
1257
1306
|
level: Number(level),
|
|
1258
1307
|
...props,
|
|
1259
|
-
className:
|
|
1260
|
-
style:
|
|
1308
|
+
className: cn21(classNames2, "text-[--color]", textAlign[align]),
|
|
1309
|
+
style: createVar9({
|
|
1261
1310
|
color: color && getColor(
|
|
1262
1311
|
theme,
|
|
1263
1312
|
color,
|
|
@@ -1277,7 +1326,7 @@ import { DialogTrigger } from "react-aria-components";
|
|
|
1277
1326
|
// src/Overlay/Modal.tsx
|
|
1278
1327
|
import { forwardRef as forwardRef12 } from "react";
|
|
1279
1328
|
import { Modal } from "react-aria-components";
|
|
1280
|
-
import { jsx as
|
|
1329
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1281
1330
|
var _Modal = forwardRef12(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
|
|
1282
1331
|
const props = {
|
|
1283
1332
|
isOpen: open,
|
|
@@ -1285,20 +1334,20 @@ var _Modal = forwardRef12(({ open, dismissable, keyboardDismissable, ...rest },
|
|
|
1285
1334
|
isKeyboardDismissDisabled: keyboardDismissable,
|
|
1286
1335
|
...rest
|
|
1287
1336
|
};
|
|
1288
|
-
return /* @__PURE__ */
|
|
1337
|
+
return /* @__PURE__ */ jsx33(
|
|
1289
1338
|
Underlay,
|
|
1290
1339
|
{
|
|
1291
1340
|
dismissable,
|
|
1292
1341
|
keyboardDismissable,
|
|
1293
1342
|
open,
|
|
1294
1343
|
variant: "modal",
|
|
1295
|
-
children: /* @__PURE__ */
|
|
1344
|
+
children: /* @__PURE__ */ jsx33(Modal, { ref, ...props, children: props.children })
|
|
1296
1345
|
}
|
|
1297
1346
|
);
|
|
1298
1347
|
});
|
|
1299
1348
|
|
|
1300
1349
|
// src/Dialog/DialogTrigger.tsx
|
|
1301
|
-
import { jsx as
|
|
1350
|
+
import { jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1302
1351
|
var _DialogTrigger = ({
|
|
1303
1352
|
open,
|
|
1304
1353
|
dismissable,
|
|
@@ -1315,10 +1364,10 @@ var _DialogTrigger = ({
|
|
|
1315
1364
|
const hasDialogTrigger = dialogTrigger.type !== _Dialog;
|
|
1316
1365
|
const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
|
|
1317
1366
|
if (isNonModal)
|
|
1318
|
-
return /* @__PURE__ */
|
|
1319
|
-
return /* @__PURE__ */
|
|
1367
|
+
return /* @__PURE__ */ jsx34(DialogTrigger, { ...props, children: props.children });
|
|
1368
|
+
return /* @__PURE__ */ jsxs12(DialogTrigger, { ...props, children: [
|
|
1320
1369
|
hasDialogTrigger && dialogTrigger,
|
|
1321
|
-
/* @__PURE__ */
|
|
1370
|
+
/* @__PURE__ */ jsx34(
|
|
1322
1371
|
_Modal,
|
|
1323
1372
|
{
|
|
1324
1373
|
dismissable,
|
|
@@ -1330,18 +1379,18 @@ var _DialogTrigger = ({
|
|
|
1330
1379
|
};
|
|
1331
1380
|
|
|
1332
1381
|
// src/Dialog/Dialog.tsx
|
|
1333
|
-
import { Fragment as Fragment3, jsx as
|
|
1382
|
+
import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1334
1383
|
var CloseButton = ({ className }) => {
|
|
1335
|
-
const { close } =
|
|
1336
|
-
return /* @__PURE__ */
|
|
1384
|
+
const { close } = useContext6(OverlayTriggerStateContext);
|
|
1385
|
+
return /* @__PURE__ */ jsx35("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx35(
|
|
1337
1386
|
"button",
|
|
1338
1387
|
{
|
|
1339
|
-
className:
|
|
1388
|
+
className: cn22(
|
|
1340
1389
|
"h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
|
|
1341
1390
|
className
|
|
1342
1391
|
),
|
|
1343
1392
|
onClick: close,
|
|
1344
|
-
children: /* @__PURE__ */
|
|
1393
|
+
children: /* @__PURE__ */ jsx35("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx35(
|
|
1345
1394
|
"path",
|
|
1346
1395
|
{
|
|
1347
1396
|
fillRule: "evenodd",
|
|
@@ -1352,7 +1401,7 @@ var CloseButton = ({ className }) => {
|
|
|
1352
1401
|
}
|
|
1353
1402
|
) });
|
|
1354
1403
|
};
|
|
1355
|
-
var DialogHeadline = ({ children }) => /* @__PURE__ */
|
|
1404
|
+
var DialogHeadline = ({ children }) => /* @__PURE__ */ jsx35(_Headline, { slot: "title", children });
|
|
1356
1405
|
var _Dialog = ({
|
|
1357
1406
|
variant,
|
|
1358
1407
|
size,
|
|
@@ -1360,8 +1409,8 @@ var _Dialog = ({
|
|
|
1360
1409
|
isNonModal,
|
|
1361
1410
|
...props
|
|
1362
1411
|
}) => {
|
|
1363
|
-
const classNames2 =
|
|
1364
|
-
let state =
|
|
1412
|
+
const classNames2 = useClassNames18({ component: "Dialog", variant, size });
|
|
1413
|
+
let state = useContext6(OverlayTriggerStateContext);
|
|
1365
1414
|
let children = props.children;
|
|
1366
1415
|
if (typeof children === "function") {
|
|
1367
1416
|
children = children({
|
|
@@ -1369,13 +1418,13 @@ var _Dialog = ({
|
|
|
1369
1418
|
})
|
|
1370
1419
|
});
|
|
1371
1420
|
}
|
|
1372
|
-
return /* @__PURE__ */
|
|
1421
|
+
return /* @__PURE__ */ jsx35(
|
|
1373
1422
|
Dialog,
|
|
1374
1423
|
{
|
|
1375
1424
|
...props,
|
|
1376
|
-
className:
|
|
1377
|
-
children: /* @__PURE__ */
|
|
1378
|
-
closeButton && /* @__PURE__ */
|
|
1425
|
+
className: cn22("relative outline-none", classNames2.container),
|
|
1426
|
+
children: /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
1427
|
+
closeButton && /* @__PURE__ */ jsx35(CloseButton, { className: classNames2.closeButton }),
|
|
1379
1428
|
children
|
|
1380
1429
|
] })
|
|
1381
1430
|
}
|
|
@@ -1386,19 +1435,19 @@ _Dialog.Headline = DialogHeadline;
|
|
|
1386
1435
|
|
|
1387
1436
|
// src/Divider/Divider.tsx
|
|
1388
1437
|
import { Separator } from "react-aria-components";
|
|
1389
|
-
import { useClassNames as
|
|
1390
|
-
import { jsx as
|
|
1438
|
+
import { useClassNames as useClassNames19 } from "@marigold/system";
|
|
1439
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1391
1440
|
var _Divider = ({ variant, ...props }) => {
|
|
1392
|
-
const classNames2 =
|
|
1393
|
-
return /* @__PURE__ */
|
|
1441
|
+
const classNames2 = useClassNames19({ component: "Divider", variant });
|
|
1442
|
+
return /* @__PURE__ */ jsx36(Separator, { className: classNames2, ...props });
|
|
1394
1443
|
};
|
|
1395
1444
|
|
|
1396
1445
|
// src/Footer/Footer.tsx
|
|
1397
|
-
import { useClassNames as
|
|
1398
|
-
import { jsx as
|
|
1446
|
+
import { useClassNames as useClassNames20 } from "@marigold/system";
|
|
1447
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1399
1448
|
var Footer = ({ children, variant, size, ...props }) => {
|
|
1400
|
-
const classNames2 =
|
|
1401
|
-
return /* @__PURE__ */
|
|
1449
|
+
const classNames2 = useClassNames20({ component: "Footer", variant, size });
|
|
1450
|
+
return /* @__PURE__ */ jsx37("footer", { ...props, className: classNames2, children });
|
|
1402
1451
|
};
|
|
1403
1452
|
|
|
1404
1453
|
// src/Form/Form.tsx
|
|
@@ -1406,25 +1455,25 @@ import { Form } from "react-aria-components";
|
|
|
1406
1455
|
|
|
1407
1456
|
// src/Header/Header.tsx
|
|
1408
1457
|
import { Header } from "react-aria-components";
|
|
1409
|
-
import { useClassNames as
|
|
1410
|
-
import { jsx as
|
|
1458
|
+
import { useClassNames as useClassNames21 } from "@marigold/system";
|
|
1459
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1411
1460
|
var _Header = ({ variant, size, ...props }) => {
|
|
1412
|
-
const classNames2 =
|
|
1461
|
+
const classNames2 = useClassNames21({
|
|
1413
1462
|
component: "Header",
|
|
1414
1463
|
variant,
|
|
1415
1464
|
size
|
|
1416
1465
|
});
|
|
1417
|
-
return /* @__PURE__ */
|
|
1466
|
+
return /* @__PURE__ */ jsx38(Header, { className: classNames2, ...props, children: props.children });
|
|
1418
1467
|
};
|
|
1419
1468
|
|
|
1420
1469
|
// src/Image/Image.tsx
|
|
1421
1470
|
import {
|
|
1422
|
-
cn as
|
|
1471
|
+
cn as cn23,
|
|
1423
1472
|
objectFit,
|
|
1424
1473
|
objectPosition,
|
|
1425
|
-
useClassNames as
|
|
1474
|
+
useClassNames as useClassNames22
|
|
1426
1475
|
} from "@marigold/system";
|
|
1427
|
-
import { jsx as
|
|
1476
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1428
1477
|
var Image = ({
|
|
1429
1478
|
variant,
|
|
1430
1479
|
size,
|
|
@@ -1432,13 +1481,13 @@ var Image = ({
|
|
|
1432
1481
|
position = "none",
|
|
1433
1482
|
...props
|
|
1434
1483
|
}) => {
|
|
1435
|
-
const classNames2 =
|
|
1436
|
-
return /* @__PURE__ */
|
|
1484
|
+
const classNames2 = useClassNames22({ component: "Image", variant, size });
|
|
1485
|
+
return /* @__PURE__ */ jsx39(
|
|
1437
1486
|
"img",
|
|
1438
1487
|
{
|
|
1439
1488
|
...props,
|
|
1440
1489
|
alt: props.alt,
|
|
1441
|
-
className:
|
|
1490
|
+
className: cn23(
|
|
1442
1491
|
fit !== "none" && "h-full w-full",
|
|
1443
1492
|
classNames2,
|
|
1444
1493
|
objectFit[fit],
|
|
@@ -1451,10 +1500,10 @@ var Image = ({
|
|
|
1451
1500
|
// src/Inline/Inline.tsx
|
|
1452
1501
|
import {
|
|
1453
1502
|
alignment as alignment2,
|
|
1454
|
-
cn as
|
|
1503
|
+
cn as cn24,
|
|
1455
1504
|
gapSpace as gapSpace5
|
|
1456
1505
|
} from "@marigold/system";
|
|
1457
|
-
import { jsx as
|
|
1506
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1458
1507
|
var Inline = ({
|
|
1459
1508
|
space = 0,
|
|
1460
1509
|
orientation,
|
|
@@ -1464,11 +1513,11 @@ var Inline = ({
|
|
|
1464
1513
|
...props
|
|
1465
1514
|
}) => {
|
|
1466
1515
|
var _a2, _b2, _c, _d;
|
|
1467
|
-
return /* @__PURE__ */
|
|
1516
|
+
return /* @__PURE__ */ jsx40(
|
|
1468
1517
|
"div",
|
|
1469
1518
|
{
|
|
1470
1519
|
...props,
|
|
1471
|
-
className:
|
|
1520
|
+
className: cn24(
|
|
1472
1521
|
"flex flex-wrap",
|
|
1473
1522
|
gapSpace5[space],
|
|
1474
1523
|
alignX && ((_b2 = (_a2 = alignment2) == null ? void 0 : _a2.horizontal) == null ? void 0 : _b2.alignmentX[alignX]),
|
|
@@ -1485,14 +1534,14 @@ import { DateField } from "react-aria-components";
|
|
|
1485
1534
|
|
|
1486
1535
|
// src/DateField/DateInput.tsx
|
|
1487
1536
|
import { DateInput, Group } from "react-aria-components";
|
|
1488
|
-
import { useClassNames as
|
|
1537
|
+
import { useClassNames as useClassNames23 } from "@marigold/system";
|
|
1489
1538
|
|
|
1490
1539
|
// src/DateField/DateSegment.tsx
|
|
1491
1540
|
import { DateSegment } from "react-aria-components";
|
|
1492
|
-
import { cn as
|
|
1493
|
-
import { Fragment as Fragment4, jsx as
|
|
1541
|
+
import { cn as cn25 } from "@marigold/system";
|
|
1542
|
+
import { Fragment as Fragment4, jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1494
1543
|
var _DateSegment = ({ segment, ...props }) => {
|
|
1495
|
-
return /* @__PURE__ */
|
|
1544
|
+
return /* @__PURE__ */ jsx41(
|
|
1496
1545
|
DateSegment,
|
|
1497
1546
|
{
|
|
1498
1547
|
...props,
|
|
@@ -1500,31 +1549,31 @@ var _DateSegment = ({ segment, ...props }) => {
|
|
|
1500
1549
|
style: {
|
|
1501
1550
|
minWidth: segment.maxValue != null ? `${String(segment.maxValue).length}ch` : void 0
|
|
1502
1551
|
},
|
|
1503
|
-
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */
|
|
1504
|
-
/* @__PURE__ */
|
|
1552
|
+
children: ({ text, placeholder, isPlaceholder }) => /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
1553
|
+
/* @__PURE__ */ jsx41(
|
|
1505
1554
|
"span",
|
|
1506
1555
|
{
|
|
1507
1556
|
"aria-hidden": "true",
|
|
1508
|
-
className:
|
|
1557
|
+
className: cn25(
|
|
1509
1558
|
isPlaceholder ? "visible block" : "invisible hidden",
|
|
1510
1559
|
"pointer-events-none w-full text-center"
|
|
1511
1560
|
),
|
|
1512
1561
|
children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
|
|
1513
1562
|
}
|
|
1514
1563
|
),
|
|
1515
|
-
/* @__PURE__ */
|
|
1564
|
+
/* @__PURE__ */ jsx41("span", { children: isPlaceholder ? "" : segment.type === "month" || segment.type === "day" ? segment.text.padStart(2, "0") : text })
|
|
1516
1565
|
] })
|
|
1517
1566
|
}
|
|
1518
1567
|
);
|
|
1519
1568
|
};
|
|
1520
1569
|
|
|
1521
1570
|
// src/DateField/DateInput.tsx
|
|
1522
|
-
import { jsx as
|
|
1571
|
+
import { jsx as jsx42, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1523
1572
|
var _DateInput = ({ variant, size, action, ...props }) => {
|
|
1524
|
-
const classNames2 =
|
|
1525
|
-
return /* @__PURE__ */
|
|
1526
|
-
/* @__PURE__ */
|
|
1527
|
-
action ? action : /* @__PURE__ */
|
|
1573
|
+
const classNames2 = useClassNames23({ component: "DateField", variant, size });
|
|
1574
|
+
return /* @__PURE__ */ jsxs15(Group, { className: classNames2.field, children: [
|
|
1575
|
+
/* @__PURE__ */ jsx42(DateInput, { className: "flex flex-1 items-center", ...props, children: (segment) => /* @__PURE__ */ jsx42(_DateSegment, { className: classNames2.segment, segment }) }),
|
|
1576
|
+
action ? action : /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx42(
|
|
1528
1577
|
"svg",
|
|
1529
1578
|
{
|
|
1530
1579
|
"data-testid": "action",
|
|
@@ -1532,14 +1581,14 @@ var _DateInput = ({ variant, size, action, ...props }) => {
|
|
|
1532
1581
|
viewBox: "0 0 24 24",
|
|
1533
1582
|
width: 24,
|
|
1534
1583
|
height: 24,
|
|
1535
|
-
children: /* @__PURE__ */
|
|
1584
|
+
children: /* @__PURE__ */ jsx42("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
|
|
1536
1585
|
}
|
|
1537
1586
|
) })
|
|
1538
1587
|
] });
|
|
1539
1588
|
};
|
|
1540
1589
|
|
|
1541
1590
|
// src/DateField/DateField.tsx
|
|
1542
|
-
import { jsx as
|
|
1591
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1543
1592
|
var _DateField = forwardRef13(
|
|
1544
1593
|
({
|
|
1545
1594
|
variant,
|
|
@@ -1558,7 +1607,7 @@ var _DateField = forwardRef13(
|
|
|
1558
1607
|
isRequired: required,
|
|
1559
1608
|
...rest
|
|
1560
1609
|
};
|
|
1561
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ jsx43(
|
|
1562
1611
|
FieldBase,
|
|
1563
1612
|
{
|
|
1564
1613
|
as: DateField,
|
|
@@ -1566,7 +1615,7 @@ var _DateField = forwardRef13(
|
|
|
1566
1615
|
size,
|
|
1567
1616
|
ref,
|
|
1568
1617
|
...props,
|
|
1569
|
-
children: /* @__PURE__ */
|
|
1618
|
+
children: /* @__PURE__ */ jsx43(_DateInput, { action })
|
|
1570
1619
|
}
|
|
1571
1620
|
);
|
|
1572
1621
|
}
|
|
@@ -1575,7 +1624,7 @@ var _DateField = forwardRef13(
|
|
|
1575
1624
|
// src/Calendar/Calendar.tsx
|
|
1576
1625
|
import { useState } from "react";
|
|
1577
1626
|
import { Calendar } from "react-aria-components";
|
|
1578
|
-
import { cn as
|
|
1627
|
+
import { cn as cn29, useClassNames as useClassNames28 } from "@marigold/system";
|
|
1579
1628
|
|
|
1580
1629
|
// src/Calendar/CalendarGrid.tsx
|
|
1581
1630
|
import {
|
|
@@ -1583,18 +1632,18 @@ import {
|
|
|
1583
1632
|
CalendarGrid,
|
|
1584
1633
|
CalendarGridBody
|
|
1585
1634
|
} from "react-aria-components";
|
|
1586
|
-
import { cn as
|
|
1635
|
+
import { cn as cn26, useClassNames as useClassNames25 } from "@marigold/system";
|
|
1587
1636
|
|
|
1588
1637
|
// src/Calendar/CalendarGridHeader.tsx
|
|
1589
1638
|
import { startOfWeek, today } from "@internationalized/date";
|
|
1590
|
-
import { useContext as
|
|
1639
|
+
import { useContext as useContext7, useMemo } from "react";
|
|
1591
1640
|
import { CalendarStateContext } from "react-aria-components";
|
|
1592
1641
|
import { useCalendarGrid } from "@react-aria/calendar";
|
|
1593
1642
|
import { useDateFormatter, useLocale } from "@react-aria/i18n";
|
|
1594
|
-
import { useClassNames as
|
|
1595
|
-
import { jsx as
|
|
1643
|
+
import { useClassNames as useClassNames24 } from "@marigold/system";
|
|
1644
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
1596
1645
|
function CalendarGridHeader(props) {
|
|
1597
|
-
const state =
|
|
1646
|
+
const state = useContext7(CalendarStateContext);
|
|
1598
1647
|
const { headerProps } = useCalendarGrid(props, state);
|
|
1599
1648
|
const { locale } = useLocale();
|
|
1600
1649
|
const dayFormatter = useDateFormatter({
|
|
@@ -1609,21 +1658,21 @@ function CalendarGridHeader(props) {
|
|
|
1609
1658
|
return dayFormatter.format(dateDay);
|
|
1610
1659
|
});
|
|
1611
1660
|
}, [locale, state.timeZone, dayFormatter]);
|
|
1612
|
-
const classNames2 =
|
|
1613
|
-
return /* @__PURE__ */
|
|
1661
|
+
const classNames2 = useClassNames24({ component: "Calendar" });
|
|
1662
|
+
return /* @__PURE__ */ jsx44("thead", { ...headerProps, children: /* @__PURE__ */ jsx44("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx44("th", { className: classNames2.calendarHeader, children: day.substring(0, 2) }, index)) }) });
|
|
1614
1663
|
}
|
|
1615
1664
|
|
|
1616
1665
|
// src/Calendar/CalendarGrid.tsx
|
|
1617
|
-
import { jsx as
|
|
1666
|
+
import { jsx as jsx45, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1618
1667
|
var _CalendarGrid = () => {
|
|
1619
|
-
const classNames2 =
|
|
1620
|
-
return /* @__PURE__ */
|
|
1621
|
-
/* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1668
|
+
const classNames2 = useClassNames25({ component: "Calendar" });
|
|
1669
|
+
return /* @__PURE__ */ jsxs16(CalendarGrid, { className: classNames2.calendarGrid, children: [
|
|
1670
|
+
/* @__PURE__ */ jsx45(CalendarGridHeader, {}),
|
|
1671
|
+
/* @__PURE__ */ jsx45(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx45(
|
|
1623
1672
|
CalendarCell,
|
|
1624
1673
|
{
|
|
1625
1674
|
date,
|
|
1626
|
-
className:
|
|
1675
|
+
className: cn26(
|
|
1627
1676
|
"flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
|
|
1628
1677
|
classNames2.calendarCell
|
|
1629
1678
|
)
|
|
@@ -1633,10 +1682,10 @@ var _CalendarGrid = () => {
|
|
|
1633
1682
|
};
|
|
1634
1683
|
|
|
1635
1684
|
// src/Calendar/CalendarListBox.tsx
|
|
1636
|
-
import { useContext as
|
|
1685
|
+
import { useContext as useContext8 } from "react";
|
|
1637
1686
|
import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
|
|
1638
1687
|
import { ChevronDown as ChevronDown2 } from "@marigold/icons";
|
|
1639
|
-
import { cn as
|
|
1688
|
+
import { cn as cn27, useClassNames as useClassNames26 } from "@marigold/system";
|
|
1640
1689
|
|
|
1641
1690
|
// src/Calendar/useFormattedMonths.tsx
|
|
1642
1691
|
import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
|
|
@@ -1655,26 +1704,26 @@ function useFormattedMonths(timeZone, focusedDate) {
|
|
|
1655
1704
|
}
|
|
1656
1705
|
|
|
1657
1706
|
// src/Calendar/CalendarListBox.tsx
|
|
1658
|
-
import { jsx as
|
|
1707
|
+
import { jsx as jsx46, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1659
1708
|
function CalendarListBox({
|
|
1660
1709
|
type,
|
|
1661
1710
|
isDisabled,
|
|
1662
1711
|
setSelectedDropdown
|
|
1663
1712
|
}) {
|
|
1664
|
-
const state =
|
|
1713
|
+
const state = useContext8(CalendarStateContext2);
|
|
1665
1714
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1666
1715
|
const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
1667
|
-
const { select: selectClassNames } =
|
|
1668
|
-
return /* @__PURE__ */
|
|
1716
|
+
const { select: selectClassNames } = useClassNames26({ component: "Select" });
|
|
1717
|
+
return /* @__PURE__ */ jsxs17(
|
|
1669
1718
|
"button",
|
|
1670
1719
|
{
|
|
1671
1720
|
disabled: isDisabled,
|
|
1672
1721
|
onClick: () => setSelectedDropdown(type),
|
|
1673
|
-
className:
|
|
1722
|
+
className: cn27(buttonStyles, selectClassNames),
|
|
1674
1723
|
"data-testid": type,
|
|
1675
1724
|
children: [
|
|
1676
1725
|
type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
|
|
1677
|
-
/* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ jsx46(ChevronDown2, {})
|
|
1678
1727
|
]
|
|
1679
1728
|
}
|
|
1680
1729
|
);
|
|
@@ -1683,39 +1732,39 @@ function CalendarListBox({
|
|
|
1683
1732
|
// src/Calendar/MonthControls.tsx
|
|
1684
1733
|
import { Button as Button3 } from "react-aria-components";
|
|
1685
1734
|
import { ChevronLeft, ChevronRight } from "@marigold/icons";
|
|
1686
|
-
import { cn as
|
|
1687
|
-
import { jsx as
|
|
1735
|
+
import { cn as cn28, useClassNames as useClassNames27 } from "@marigold/system";
|
|
1736
|
+
import { jsx as jsx47, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1688
1737
|
function MonthControls() {
|
|
1689
|
-
const classNames2 =
|
|
1690
|
-
const buttonClassNames =
|
|
1691
|
-
return /* @__PURE__ */
|
|
1738
|
+
const classNames2 = useClassNames27({ component: "Calendar" });
|
|
1739
|
+
const buttonClassNames = useClassNames27({ component: "Button" });
|
|
1740
|
+
return /* @__PURE__ */ jsxs18(
|
|
1692
1741
|
"div",
|
|
1693
1742
|
{
|
|
1694
|
-
className:
|
|
1743
|
+
className: cn28(
|
|
1695
1744
|
"flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
|
|
1696
1745
|
classNames2.calendarControllers
|
|
1697
1746
|
),
|
|
1698
1747
|
children: [
|
|
1699
|
-
/* @__PURE__ */
|
|
1748
|
+
/* @__PURE__ */ jsx47(
|
|
1700
1749
|
Button3,
|
|
1701
1750
|
{
|
|
1702
|
-
className:
|
|
1751
|
+
className: cn28(
|
|
1703
1752
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1704
1753
|
buttonClassNames
|
|
1705
1754
|
),
|
|
1706
1755
|
slot: "previous",
|
|
1707
|
-
children: /* @__PURE__ */
|
|
1756
|
+
children: /* @__PURE__ */ jsx47(ChevronLeft, {})
|
|
1708
1757
|
}
|
|
1709
1758
|
),
|
|
1710
|
-
/* @__PURE__ */
|
|
1759
|
+
/* @__PURE__ */ jsx47(
|
|
1711
1760
|
Button3,
|
|
1712
1761
|
{
|
|
1713
|
-
className:
|
|
1762
|
+
className: cn28(
|
|
1714
1763
|
"inline-flex items-center justify-center gap-[0.5ch]",
|
|
1715
1764
|
buttonClassNames
|
|
1716
1765
|
),
|
|
1717
1766
|
slot: "next",
|
|
1718
|
-
children: /* @__PURE__ */
|
|
1767
|
+
children: /* @__PURE__ */ jsx47(ChevronRight, {})
|
|
1719
1768
|
}
|
|
1720
1769
|
)
|
|
1721
1770
|
]
|
|
@@ -1725,24 +1774,24 @@ function MonthControls() {
|
|
|
1725
1774
|
var MonthControls_default = MonthControls;
|
|
1726
1775
|
|
|
1727
1776
|
// src/Calendar/MonthListBox.tsx
|
|
1728
|
-
import { useContext as
|
|
1777
|
+
import { useContext as useContext9 } from "react";
|
|
1729
1778
|
import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
|
|
1730
|
-
import { jsx as
|
|
1779
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1731
1780
|
var MonthListBox = ({ setSelectedDropdown }) => {
|
|
1732
|
-
const state =
|
|
1781
|
+
const state = useContext9(CalendarStateContext3);
|
|
1733
1782
|
const months = useFormattedMonths(state.timeZone, state.focusedDate);
|
|
1734
1783
|
let onChange = (index) => {
|
|
1735
1784
|
let value = Number(index) + 1;
|
|
1736
1785
|
let date = state.focusedDate.set({ month: value });
|
|
1737
1786
|
state.setFocusedDate(date);
|
|
1738
1787
|
};
|
|
1739
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ jsx48(
|
|
1740
1789
|
"ul",
|
|
1741
1790
|
{
|
|
1742
1791
|
"data-testid": "monthOptions",
|
|
1743
1792
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1744
1793
|
children: months.map((month, index) => {
|
|
1745
|
-
return /* @__PURE__ */
|
|
1794
|
+
return /* @__PURE__ */ jsx48("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx48(
|
|
1746
1795
|
_Button,
|
|
1747
1796
|
{
|
|
1748
1797
|
slot: "previous",
|
|
@@ -1764,15 +1813,15 @@ var MonthListBox_default = MonthListBox;
|
|
|
1764
1813
|
|
|
1765
1814
|
// src/Calendar/YearListBox.tsx
|
|
1766
1815
|
import {
|
|
1767
|
-
useContext as
|
|
1816
|
+
useContext as useContext10,
|
|
1768
1817
|
useEffect as useEffect2,
|
|
1769
1818
|
useRef as useRef3
|
|
1770
1819
|
} from "react";
|
|
1771
1820
|
import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
|
|
1772
1821
|
import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
|
|
1773
|
-
import { jsx as
|
|
1822
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1774
1823
|
var YearListBox = ({ setSelectedDropdown }) => {
|
|
1775
|
-
const state =
|
|
1824
|
+
const state = useContext10(CalendarStateContext4);
|
|
1776
1825
|
const years = [];
|
|
1777
1826
|
let formatter = useDateFormatter3({
|
|
1778
1827
|
year: "numeric",
|
|
@@ -1800,19 +1849,19 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1800
1849
|
let date = years[index].value;
|
|
1801
1850
|
state.setFocusedDate(date);
|
|
1802
1851
|
};
|
|
1803
|
-
return /* @__PURE__ */
|
|
1852
|
+
return /* @__PURE__ */ jsx49(
|
|
1804
1853
|
"ul",
|
|
1805
1854
|
{
|
|
1806
1855
|
"data-testid": "yearOptions",
|
|
1807
1856
|
className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
|
|
1808
1857
|
children: years.map((year, index) => {
|
|
1809
1858
|
const isActive = +year.formatted === state.focusedDate.year;
|
|
1810
|
-
return /* @__PURE__ */
|
|
1859
|
+
return /* @__PURE__ */ jsx49("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx49(
|
|
1811
1860
|
"div",
|
|
1812
1861
|
{
|
|
1813
1862
|
ref: isActive ? activeButtonRef : null,
|
|
1814
1863
|
style: { height: "100%", width: "100%" },
|
|
1815
|
-
children: /* @__PURE__ */
|
|
1864
|
+
children: /* @__PURE__ */ jsx49(
|
|
1816
1865
|
_Button,
|
|
1817
1866
|
{
|
|
1818
1867
|
slot: "previous",
|
|
@@ -1837,7 +1886,7 @@ var YearListBox = ({ setSelectedDropdown }) => {
|
|
|
1837
1886
|
var YearListBox_default = YearListBox;
|
|
1838
1887
|
|
|
1839
1888
|
// src/Calendar/Calendar.tsx
|
|
1840
|
-
import { Fragment as Fragment5, jsx as
|
|
1889
|
+
import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1841
1890
|
var _Calendar = ({
|
|
1842
1891
|
disabled,
|
|
1843
1892
|
readOnly,
|
|
@@ -1850,24 +1899,24 @@ var _Calendar = ({
|
|
|
1850
1899
|
isReadOnly: readOnly,
|
|
1851
1900
|
...rest
|
|
1852
1901
|
};
|
|
1853
|
-
const classNames2 =
|
|
1902
|
+
const classNames2 = useClassNames28({ component: "Calendar" });
|
|
1854
1903
|
const [selectedDropdown, setSelectedDropdown] = useState();
|
|
1855
1904
|
const ViewMap = {
|
|
1856
|
-
month: /* @__PURE__ */
|
|
1857
|
-
year: /* @__PURE__ */
|
|
1905
|
+
month: /* @__PURE__ */ jsx50(MonthListBox_default, { setSelectedDropdown }),
|
|
1906
|
+
year: /* @__PURE__ */ jsx50(YearListBox_default, { setSelectedDropdown })
|
|
1858
1907
|
};
|
|
1859
|
-
return /* @__PURE__ */
|
|
1908
|
+
return /* @__PURE__ */ jsx50(
|
|
1860
1909
|
Calendar,
|
|
1861
1910
|
{
|
|
1862
|
-
className:
|
|
1911
|
+
className: cn29(
|
|
1863
1912
|
"flex min-h-[350px] w-[360px] flex-col rounded-sm p-4",
|
|
1864
1913
|
classNames2.calendar
|
|
1865
1914
|
),
|
|
1866
1915
|
...props,
|
|
1867
|
-
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
1869
|
-
/* @__PURE__ */
|
|
1870
|
-
/* @__PURE__ */
|
|
1916
|
+
children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
1917
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
1918
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex w-full gap-4", children: [
|
|
1919
|
+
/* @__PURE__ */ jsx50(
|
|
1871
1920
|
CalendarListBox,
|
|
1872
1921
|
{
|
|
1873
1922
|
type: "month",
|
|
@@ -1875,7 +1924,7 @@ var _Calendar = ({
|
|
|
1875
1924
|
setSelectedDropdown
|
|
1876
1925
|
}
|
|
1877
1926
|
),
|
|
1878
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ jsx50(
|
|
1879
1928
|
CalendarListBox,
|
|
1880
1929
|
{
|
|
1881
1930
|
type: "year",
|
|
@@ -1884,9 +1933,9 @@ var _Calendar = ({
|
|
|
1884
1933
|
}
|
|
1885
1934
|
)
|
|
1886
1935
|
] }),
|
|
1887
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ jsx50(MonthControls_default, {})
|
|
1888
1937
|
] }),
|
|
1889
|
-
/* @__PURE__ */
|
|
1938
|
+
/* @__PURE__ */ jsx50(_CalendarGrid, {})
|
|
1890
1939
|
] })
|
|
1891
1940
|
}
|
|
1892
1941
|
);
|
|
@@ -1894,8 +1943,8 @@ var _Calendar = ({
|
|
|
1894
1943
|
|
|
1895
1944
|
// src/DatePicker/DatePicker.tsx
|
|
1896
1945
|
import { DatePicker } from "react-aria-components";
|
|
1897
|
-
import { useClassNames as
|
|
1898
|
-
import { jsx as
|
|
1946
|
+
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
1947
|
+
import { jsx as jsx51, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1899
1948
|
var _DatePicker = ({
|
|
1900
1949
|
disabled,
|
|
1901
1950
|
required,
|
|
@@ -1914,22 +1963,22 @@ var _DatePicker = ({
|
|
|
1914
1963
|
isOpen: open,
|
|
1915
1964
|
...rest
|
|
1916
1965
|
};
|
|
1917
|
-
const classNames2 =
|
|
1966
|
+
const classNames2 = useClassNames29({
|
|
1918
1967
|
component: "DatePicker",
|
|
1919
1968
|
size,
|
|
1920
1969
|
variant
|
|
1921
1970
|
});
|
|
1922
|
-
return /* @__PURE__ */
|
|
1923
|
-
/* @__PURE__ */
|
|
1971
|
+
return /* @__PURE__ */ jsxs20(FieldBase, { as: DatePicker, variant, size, ...props, children: [
|
|
1972
|
+
/* @__PURE__ */ jsx51(
|
|
1924
1973
|
_DateInput,
|
|
1925
1974
|
{
|
|
1926
|
-
action: /* @__PURE__ */
|
|
1975
|
+
action: /* @__PURE__ */ jsx51("div", { className: classNames2.container, children: /* @__PURE__ */ jsx51(
|
|
1927
1976
|
_Button,
|
|
1928
1977
|
{
|
|
1929
1978
|
size: "small",
|
|
1930
1979
|
disabled,
|
|
1931
1980
|
className: classNames2.button,
|
|
1932
|
-
children: /* @__PURE__ */
|
|
1981
|
+
children: /* @__PURE__ */ jsx51(
|
|
1933
1982
|
"svg",
|
|
1934
1983
|
{
|
|
1935
1984
|
"data-testid": "action",
|
|
@@ -1937,29 +1986,29 @@ var _DatePicker = ({
|
|
|
1937
1986
|
width: 24,
|
|
1938
1987
|
height: 24,
|
|
1939
1988
|
fill: "currentColor",
|
|
1940
|
-
children: /* @__PURE__ */
|
|
1989
|
+
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" })
|
|
1941
1990
|
}
|
|
1942
1991
|
)
|
|
1943
1992
|
}
|
|
1944
1993
|
) })
|
|
1945
1994
|
}
|
|
1946
1995
|
),
|
|
1947
|
-
/* @__PURE__ */
|
|
1996
|
+
/* @__PURE__ */ jsx51(_Popover, { children: /* @__PURE__ */ jsx51(_Calendar, { disabled }) })
|
|
1948
1997
|
] });
|
|
1949
1998
|
};
|
|
1950
1999
|
|
|
1951
2000
|
// src/Inset/Inset.tsx
|
|
1952
2001
|
import {
|
|
1953
|
-
cn as
|
|
2002
|
+
cn as cn30,
|
|
1954
2003
|
paddingSpace as paddingSpace2,
|
|
1955
2004
|
paddingSpaceX as paddingSpaceX2,
|
|
1956
2005
|
paddingSpaceY as paddingSpaceY2
|
|
1957
2006
|
} from "@marigold/system";
|
|
1958
|
-
import { jsx as
|
|
1959
|
-
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */
|
|
2007
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2008
|
+
var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx52(
|
|
1960
2009
|
"div",
|
|
1961
2010
|
{
|
|
1962
|
-
className:
|
|
2011
|
+
className: cn30(
|
|
1963
2012
|
space && paddingSpace2[space],
|
|
1964
2013
|
!space && spaceX && paddingSpaceX2[spaceX],
|
|
1965
2014
|
!space && spaceY && paddingSpaceY2[spaceY]
|
|
@@ -1971,36 +2020,36 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx51(
|
|
|
1971
2020
|
// src/Link/Link.tsx
|
|
1972
2021
|
import { forwardRef as forwardRef14 } from "react";
|
|
1973
2022
|
import { Link } from "react-aria-components";
|
|
1974
|
-
import { useClassNames as
|
|
1975
|
-
import { jsx as
|
|
2023
|
+
import { useClassNames as useClassNames30 } from "@marigold/system";
|
|
2024
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
1976
2025
|
var _Link = forwardRef14(
|
|
1977
2026
|
({ variant, size, disabled, children, ...props }, ref) => {
|
|
1978
|
-
const classNames2 =
|
|
2027
|
+
const classNames2 = useClassNames30({
|
|
1979
2028
|
component: "Link",
|
|
1980
2029
|
variant,
|
|
1981
2030
|
size
|
|
1982
2031
|
});
|
|
1983
|
-
return /* @__PURE__ */
|
|
2032
|
+
return /* @__PURE__ */ jsx53(Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
|
|
1984
2033
|
}
|
|
1985
2034
|
);
|
|
1986
2035
|
|
|
1987
2036
|
// src/List/List.tsx
|
|
1988
|
-
import { useClassNames as
|
|
2037
|
+
import { useClassNames as useClassNames31 } from "@marigold/system";
|
|
1989
2038
|
|
|
1990
2039
|
// src/List/Context.ts
|
|
1991
|
-
import { createContext as
|
|
1992
|
-
var ListContext =
|
|
1993
|
-
var useListContext = () =>
|
|
2040
|
+
import { createContext as createContext5, useContext as useContext11 } from "react";
|
|
2041
|
+
var ListContext = createContext5({});
|
|
2042
|
+
var useListContext = () => useContext11(ListContext);
|
|
1994
2043
|
|
|
1995
2044
|
// src/List/ListItem.tsx
|
|
1996
|
-
import { jsx as
|
|
2045
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
1997
2046
|
var ListItem = ({ children, ...props }) => {
|
|
1998
2047
|
const { classNames: classNames2 } = useListContext();
|
|
1999
|
-
return /* @__PURE__ */
|
|
2048
|
+
return /* @__PURE__ */ jsx54("li", { ...props, className: classNames2, children });
|
|
2000
2049
|
};
|
|
2001
2050
|
|
|
2002
2051
|
// src/List/List.tsx
|
|
2003
|
-
import { jsx as
|
|
2052
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2004
2053
|
var List = ({
|
|
2005
2054
|
as = "ul",
|
|
2006
2055
|
children,
|
|
@@ -2009,38 +2058,38 @@ var List = ({
|
|
|
2009
2058
|
...props
|
|
2010
2059
|
}) => {
|
|
2011
2060
|
const Component = as;
|
|
2012
|
-
const classNames2 =
|
|
2013
|
-
return /* @__PURE__ */
|
|
2061
|
+
const classNames2 = useClassNames31({ component: "List", variant, size });
|
|
2062
|
+
return /* @__PURE__ */ jsx55(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx55(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
|
|
2014
2063
|
};
|
|
2015
2064
|
List.Item = ListItem;
|
|
2016
2065
|
|
|
2017
2066
|
// src/Menu/Menu.tsx
|
|
2018
2067
|
import { Menu, MenuTrigger } from "react-aria-components";
|
|
2019
|
-
import { useClassNames as
|
|
2068
|
+
import { useClassNames as useClassNames34 } from "@marigold/system";
|
|
2020
2069
|
|
|
2021
2070
|
// src/Menu/MenuItem.tsx
|
|
2022
2071
|
import { MenuItem } from "react-aria-components";
|
|
2023
|
-
import { useClassNames as
|
|
2024
|
-
import { jsx as
|
|
2072
|
+
import { useClassNames as useClassNames32 } from "@marigold/system";
|
|
2073
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2025
2074
|
var _MenuItem = ({ children, ...props }) => {
|
|
2026
|
-
const classNames2 =
|
|
2027
|
-
return /* @__PURE__ */
|
|
2075
|
+
const classNames2 = useClassNames32({ component: "Menu" });
|
|
2076
|
+
return /* @__PURE__ */ jsx56(MenuItem, { ...props, className: classNames2.item, children });
|
|
2028
2077
|
};
|
|
2029
2078
|
|
|
2030
2079
|
// src/Menu/MenuSection.tsx
|
|
2031
2080
|
import { Section as Section2 } from "react-aria-components";
|
|
2032
|
-
import { useClassNames as
|
|
2033
|
-
import { jsx as
|
|
2081
|
+
import { useClassNames as useClassNames33 } from "@marigold/system";
|
|
2082
|
+
import { jsx as jsx57, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2034
2083
|
var _MenuSection = ({ children, title, ...props }) => {
|
|
2035
|
-
const className =
|
|
2036
|
-
return /* @__PURE__ */
|
|
2037
|
-
/* @__PURE__ */
|
|
2084
|
+
const className = useClassNames33({ component: "Menu" });
|
|
2085
|
+
return /* @__PURE__ */ jsxs21(Section2, { ...props, children: [
|
|
2086
|
+
/* @__PURE__ */ jsx57(_Header, { className: className.section, children: title }),
|
|
2038
2087
|
children
|
|
2039
2088
|
] });
|
|
2040
2089
|
};
|
|
2041
2090
|
|
|
2042
2091
|
// src/Menu/Menu.tsx
|
|
2043
|
-
import { jsx as
|
|
2092
|
+
import { jsx as jsx58, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2044
2093
|
var _Menu = ({
|
|
2045
2094
|
children,
|
|
2046
2095
|
label,
|
|
@@ -2050,10 +2099,10 @@ var _Menu = ({
|
|
|
2050
2099
|
open,
|
|
2051
2100
|
...props
|
|
2052
2101
|
}) => {
|
|
2053
|
-
const classNames2 =
|
|
2054
|
-
return /* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2102
|
+
const classNames2 = useClassNames34({ component: "Menu", variant, size });
|
|
2103
|
+
return /* @__PURE__ */ jsxs22(MenuTrigger, { ...props, children: [
|
|
2104
|
+
/* @__PURE__ */ jsx58(_Button, { variant: "menu", disabled, children: label }),
|
|
2105
|
+
/* @__PURE__ */ jsx58(_Popover, { open, children: /* @__PURE__ */ jsx58(Menu, { ...props, className: classNames2.container, children }) })
|
|
2057
2106
|
] });
|
|
2058
2107
|
};
|
|
2059
2108
|
_Menu.Item = _MenuItem;
|
|
@@ -2061,33 +2110,33 @@ _Menu.Section = _MenuSection;
|
|
|
2061
2110
|
|
|
2062
2111
|
// src/Menu/ActionMenu.tsx
|
|
2063
2112
|
import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
|
|
2064
|
-
import { SVG as SVG4, useClassNames as
|
|
2065
|
-
import { jsx as
|
|
2113
|
+
import { SVG as SVG4, useClassNames as useClassNames35 } from "@marigold/system";
|
|
2114
|
+
import { jsx as jsx59, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2066
2115
|
var ActionMenu = ({
|
|
2067
2116
|
variant,
|
|
2068
2117
|
size,
|
|
2069
2118
|
disabled,
|
|
2070
2119
|
...props
|
|
2071
2120
|
}) => {
|
|
2072
|
-
const classNames2 =
|
|
2073
|
-
return /* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2121
|
+
const classNames2 = useClassNames35({ component: "Menu", variant, size });
|
|
2122
|
+
return /* @__PURE__ */ jsxs23(MenuTrigger2, { children: [
|
|
2123
|
+
/* @__PURE__ */ jsx59(_Button, { variant: "menu", size: "small", disabled, children: /* @__PURE__ */ jsx59(SVG4, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx59("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" }) }) }),
|
|
2124
|
+
/* @__PURE__ */ jsx59(_Popover, { children: /* @__PURE__ */ jsx59(Menu2, { ...props, className: classNames2.container, children: props.children }) })
|
|
2076
2125
|
] });
|
|
2077
2126
|
};
|
|
2078
2127
|
|
|
2079
2128
|
// src/Message/Message.tsx
|
|
2080
2129
|
import { forwardRef as forwardRef15 } from "react";
|
|
2081
|
-
import { cn as
|
|
2082
|
-
import { jsx as
|
|
2130
|
+
import { cn as cn31, useClassNames as useClassNames36 } from "@marigold/system";
|
|
2131
|
+
import { jsx as jsx60, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2083
2132
|
var icons = {
|
|
2084
|
-
success: () => /* @__PURE__ */
|
|
2133
|
+
success: () => /* @__PURE__ */ jsx60(
|
|
2085
2134
|
"svg",
|
|
2086
2135
|
{
|
|
2087
2136
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2088
2137
|
viewBox: "0 0 24 24",
|
|
2089
2138
|
fill: "currentColor",
|
|
2090
|
-
children: /* @__PURE__ */
|
|
2139
|
+
children: /* @__PURE__ */ jsx60(
|
|
2091
2140
|
"path",
|
|
2092
2141
|
{
|
|
2093
2142
|
fillRule: "evenodd",
|
|
@@ -2097,13 +2146,13 @@ var icons = {
|
|
|
2097
2146
|
)
|
|
2098
2147
|
}
|
|
2099
2148
|
),
|
|
2100
|
-
info: () => /* @__PURE__ */
|
|
2149
|
+
info: () => /* @__PURE__ */ jsx60(
|
|
2101
2150
|
"svg",
|
|
2102
2151
|
{
|
|
2103
2152
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2104
2153
|
viewBox: "0 0 24 24",
|
|
2105
2154
|
fill: "currentColor",
|
|
2106
|
-
children: /* @__PURE__ */
|
|
2155
|
+
children: /* @__PURE__ */ jsx60(
|
|
2107
2156
|
"path",
|
|
2108
2157
|
{
|
|
2109
2158
|
fillRule: "evenodd",
|
|
@@ -2113,13 +2162,13 @@ var icons = {
|
|
|
2113
2162
|
)
|
|
2114
2163
|
}
|
|
2115
2164
|
),
|
|
2116
|
-
warning: () => /* @__PURE__ */
|
|
2165
|
+
warning: () => /* @__PURE__ */ jsx60(
|
|
2117
2166
|
"svg",
|
|
2118
2167
|
{
|
|
2119
2168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2120
2169
|
viewBox: "0 0 24 24",
|
|
2121
2170
|
fill: "currentColor",
|
|
2122
|
-
children: /* @__PURE__ */
|
|
2171
|
+
children: /* @__PURE__ */ jsx60(
|
|
2123
2172
|
"path",
|
|
2124
2173
|
{
|
|
2125
2174
|
fillRule: "evenodd",
|
|
@@ -2129,13 +2178,13 @@ var icons = {
|
|
|
2129
2178
|
)
|
|
2130
2179
|
}
|
|
2131
2180
|
),
|
|
2132
|
-
error: () => /* @__PURE__ */
|
|
2181
|
+
error: () => /* @__PURE__ */ jsx60(
|
|
2133
2182
|
"svg",
|
|
2134
2183
|
{
|
|
2135
2184
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2136
2185
|
viewBox: "0 0 24 24",
|
|
2137
2186
|
fill: "currentColor",
|
|
2138
|
-
children: /* @__PURE__ */
|
|
2187
|
+
children: /* @__PURE__ */ jsx60(
|
|
2139
2188
|
"path",
|
|
2140
2189
|
{
|
|
2141
2190
|
fillRule: "evenodd",
|
|
@@ -2148,30 +2197,30 @@ var icons = {
|
|
|
2148
2197
|
};
|
|
2149
2198
|
var Message = forwardRef15(
|
|
2150
2199
|
({ messageTitle, variant = "info", size, children, ...props }, ref) => {
|
|
2151
|
-
const classNames2 =
|
|
2200
|
+
const classNames2 = useClassNames36({ component: "Message", variant, size });
|
|
2152
2201
|
const Icon4 = icons[variant];
|
|
2153
|
-
return /* @__PURE__ */
|
|
2202
|
+
return /* @__PURE__ */ jsxs24(
|
|
2154
2203
|
"div",
|
|
2155
2204
|
{
|
|
2156
|
-
className:
|
|
2205
|
+
className: cn31(
|
|
2157
2206
|
"grid auto-rows-min grid-cols-[min-content_auto] gap-1",
|
|
2158
2207
|
classNames2.container
|
|
2159
2208
|
),
|
|
2160
2209
|
ref,
|
|
2161
2210
|
...props,
|
|
2162
2211
|
children: [
|
|
2163
|
-
/* @__PURE__ */
|
|
2164
|
-
/* @__PURE__ */
|
|
2212
|
+
/* @__PURE__ */ jsx60("div", { className: cn31("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx60(Icon4, {}) }),
|
|
2213
|
+
/* @__PURE__ */ jsx60(
|
|
2165
2214
|
"div",
|
|
2166
2215
|
{
|
|
2167
|
-
className:
|
|
2216
|
+
className: cn31(
|
|
2168
2217
|
"col-start-2 row-start-1 self-center",
|
|
2169
2218
|
classNames2.title
|
|
2170
2219
|
),
|
|
2171
2220
|
children: messageTitle
|
|
2172
2221
|
}
|
|
2173
2222
|
),
|
|
2174
|
-
/* @__PURE__ */
|
|
2223
|
+
/* @__PURE__ */ jsx60("div", { className: cn31("col-start-2", classNames2.content), children })
|
|
2175
2224
|
]
|
|
2176
2225
|
}
|
|
2177
2226
|
);
|
|
@@ -2181,13 +2230,13 @@ var Message = forwardRef15(
|
|
|
2181
2230
|
// src/NumberField/NumberField.tsx
|
|
2182
2231
|
import { forwardRef as forwardRef16 } from "react";
|
|
2183
2232
|
import { Group as Group2, NumberField } from "react-aria-components";
|
|
2184
|
-
import { cn as
|
|
2233
|
+
import { cn as cn33, useClassNames as useClassNames37 } from "@marigold/system";
|
|
2185
2234
|
|
|
2186
2235
|
// src/NumberField/StepButton.tsx
|
|
2187
2236
|
import { Button as Button4 } from "react-aria-components";
|
|
2188
|
-
import { cn as
|
|
2189
|
-
import { jsx as
|
|
2190
|
-
var Plus = () => /* @__PURE__ */
|
|
2237
|
+
import { cn as cn32 } from "@marigold/system";
|
|
2238
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
2239
|
+
var Plus = () => /* @__PURE__ */ jsx61("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx61(
|
|
2191
2240
|
"path",
|
|
2192
2241
|
{
|
|
2193
2242
|
fillRule: "evenodd",
|
|
@@ -2195,7 +2244,7 @@ var Plus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox:
|
|
|
2195
2244
|
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"
|
|
2196
2245
|
}
|
|
2197
2246
|
) });
|
|
2198
|
-
var Minus = () => /* @__PURE__ */
|
|
2247
|
+
var Minus = () => /* @__PURE__ */ jsx61("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx61(
|
|
2199
2248
|
"path",
|
|
2200
2249
|
{
|
|
2201
2250
|
fillRule: "evenodd",
|
|
@@ -2205,10 +2254,10 @@ var Minus = () => /* @__PURE__ */ jsx60("svg", { width: 16, height: 16, viewBox:
|
|
|
2205
2254
|
) });
|
|
2206
2255
|
var _StepButton = ({ direction, className, ...props }) => {
|
|
2207
2256
|
const Icon4 = direction === "up" ? Plus : Minus;
|
|
2208
|
-
return /* @__PURE__ */
|
|
2257
|
+
return /* @__PURE__ */ jsx61(
|
|
2209
2258
|
Button4,
|
|
2210
2259
|
{
|
|
2211
|
-
className:
|
|
2260
|
+
className: cn32(
|
|
2212
2261
|
[
|
|
2213
2262
|
"flex items-center justify-center",
|
|
2214
2263
|
"cursor-pointer data-[disabled]:cursor-not-allowed"
|
|
@@ -2216,13 +2265,13 @@ var _StepButton = ({ direction, className, ...props }) => {
|
|
|
2216
2265
|
className
|
|
2217
2266
|
),
|
|
2218
2267
|
...props,
|
|
2219
|
-
children: /* @__PURE__ */
|
|
2268
|
+
children: /* @__PURE__ */ jsx61(Icon4, {})
|
|
2220
2269
|
}
|
|
2221
2270
|
);
|
|
2222
2271
|
};
|
|
2223
2272
|
|
|
2224
2273
|
// src/NumberField/NumberField.tsx
|
|
2225
|
-
import { jsx as
|
|
2274
|
+
import { jsx as jsx62, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2226
2275
|
var _NumberField = forwardRef16(
|
|
2227
2276
|
({
|
|
2228
2277
|
variant,
|
|
@@ -2234,7 +2283,7 @@ var _NumberField = forwardRef16(
|
|
|
2234
2283
|
hideStepper,
|
|
2235
2284
|
...rest
|
|
2236
2285
|
}, ref) => {
|
|
2237
|
-
const classNames2 =
|
|
2286
|
+
const classNames2 = useClassNames37({
|
|
2238
2287
|
component: "NumberField",
|
|
2239
2288
|
size,
|
|
2240
2289
|
variant
|
|
@@ -2247,8 +2296,8 @@ var _NumberField = forwardRef16(
|
|
|
2247
2296
|
...rest
|
|
2248
2297
|
};
|
|
2249
2298
|
const showStepper = !hideStepper;
|
|
2250
|
-
return /* @__PURE__ */
|
|
2251
|
-
showStepper && /* @__PURE__ */
|
|
2299
|
+
return /* @__PURE__ */ jsx62(FieldBase, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs25(Group2, { className: cn33("flex items-stretch", classNames2.group), children: [
|
|
2300
|
+
showStepper && /* @__PURE__ */ jsx62(
|
|
2252
2301
|
_StepButton,
|
|
2253
2302
|
{
|
|
2254
2303
|
className: classNames2.stepper,
|
|
@@ -2256,7 +2305,7 @@ var _NumberField = forwardRef16(
|
|
|
2256
2305
|
slot: "decrement"
|
|
2257
2306
|
}
|
|
2258
2307
|
),
|
|
2259
|
-
/* @__PURE__ */
|
|
2308
|
+
/* @__PURE__ */ jsx62("div", { className: "flex-1", children: /* @__PURE__ */ jsx62(
|
|
2260
2309
|
_Input,
|
|
2261
2310
|
{
|
|
2262
2311
|
ref,
|
|
@@ -2265,7 +2314,7 @@ var _NumberField = forwardRef16(
|
|
|
2265
2314
|
className: classNames2.input
|
|
2266
2315
|
}
|
|
2267
2316
|
) }),
|
|
2268
|
-
showStepper && /* @__PURE__ */
|
|
2317
|
+
showStepper && /* @__PURE__ */ jsx62(
|
|
2269
2318
|
_StepButton,
|
|
2270
2319
|
{
|
|
2271
2320
|
className: classNames2.stepper,
|
|
@@ -2282,19 +2331,19 @@ import {
|
|
|
2282
2331
|
forwardRef as forwardRef17
|
|
2283
2332
|
} from "react";
|
|
2284
2333
|
import { Radio } from "react-aria-components";
|
|
2285
|
-
import { cn as
|
|
2334
|
+
import { cn as cn35, useClassNames as useClassNames39 } from "@marigold/system";
|
|
2286
2335
|
|
|
2287
2336
|
// src/Radio/Context.ts
|
|
2288
|
-
import { createContext as
|
|
2289
|
-
var RadioGroupContext =
|
|
2337
|
+
import { createContext as createContext6, useContext as useContext12 } from "react";
|
|
2338
|
+
var RadioGroupContext = createContext6(
|
|
2290
2339
|
null
|
|
2291
2340
|
);
|
|
2292
|
-
var useRadioGroupContext = () =>
|
|
2341
|
+
var useRadioGroupContext = () => useContext12(RadioGroupContext);
|
|
2293
2342
|
|
|
2294
2343
|
// src/Radio/RadioGroup.tsx
|
|
2295
2344
|
import { RadioGroup } from "react-aria-components";
|
|
2296
|
-
import { cn as
|
|
2297
|
-
import { jsx as
|
|
2345
|
+
import { cn as cn34, useClassNames as useClassNames38 } from "@marigold/system";
|
|
2346
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2298
2347
|
var _RadioGroup = ({
|
|
2299
2348
|
variant,
|
|
2300
2349
|
size,
|
|
@@ -2310,7 +2359,7 @@ var _RadioGroup = ({
|
|
|
2310
2359
|
width,
|
|
2311
2360
|
...rest
|
|
2312
2361
|
}) => {
|
|
2313
|
-
const classNames2 =
|
|
2362
|
+
const classNames2 = useClassNames38({ component: "Radio", variant, size });
|
|
2314
2363
|
const props = {
|
|
2315
2364
|
isDisabled: disabled,
|
|
2316
2365
|
isReadOnly: readOnly,
|
|
@@ -2318,7 +2367,7 @@ var _RadioGroup = ({
|
|
|
2318
2367
|
isInvalid: error,
|
|
2319
2368
|
...rest
|
|
2320
2369
|
};
|
|
2321
|
-
return /* @__PURE__ */
|
|
2370
|
+
return /* @__PURE__ */ jsx63(
|
|
2322
2371
|
FieldBase,
|
|
2323
2372
|
{
|
|
2324
2373
|
as: RadioGroup,
|
|
@@ -2329,18 +2378,18 @@ var _RadioGroup = ({
|
|
|
2329
2378
|
variant,
|
|
2330
2379
|
size,
|
|
2331
2380
|
...props,
|
|
2332
|
-
children: /* @__PURE__ */
|
|
2381
|
+
children: /* @__PURE__ */ jsx63(
|
|
2333
2382
|
"div",
|
|
2334
2383
|
{
|
|
2335
2384
|
role: "presentation",
|
|
2336
2385
|
"data-testid": "group",
|
|
2337
2386
|
"data-orientation": orientation,
|
|
2338
|
-
className:
|
|
2387
|
+
className: cn34(
|
|
2339
2388
|
classNames2.group,
|
|
2340
2389
|
"flex items-start",
|
|
2341
2390
|
orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
|
|
2342
2391
|
),
|
|
2343
|
-
children: /* @__PURE__ */
|
|
2392
|
+
children: /* @__PURE__ */ jsx63(RadioGroupContext.Provider, { value: { width, variant, size }, children })
|
|
2344
2393
|
}
|
|
2345
2394
|
)
|
|
2346
2395
|
}
|
|
@@ -2348,33 +2397,33 @@ var _RadioGroup = ({
|
|
|
2348
2397
|
};
|
|
2349
2398
|
|
|
2350
2399
|
// src/Radio/Radio.tsx
|
|
2351
|
-
import { Fragment as Fragment6, jsx as
|
|
2352
|
-
var Dot = () => /* @__PURE__ */
|
|
2353
|
-
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */
|
|
2400
|
+
import { Fragment as Fragment6, jsx as jsx64, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2401
|
+
var Dot = () => /* @__PURE__ */ jsx64("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx64("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2402
|
+
var Icon3 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx64(
|
|
2354
2403
|
"div",
|
|
2355
2404
|
{
|
|
2356
|
-
className:
|
|
2405
|
+
className: cn35(
|
|
2357
2406
|
"bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
|
|
2358
2407
|
className
|
|
2359
2408
|
),
|
|
2360
2409
|
"aria-hidden": "true",
|
|
2361
2410
|
...props,
|
|
2362
|
-
children: checked ? /* @__PURE__ */
|
|
2411
|
+
children: checked ? /* @__PURE__ */ jsx64(Dot, {}) : null
|
|
2363
2412
|
}
|
|
2364
2413
|
);
|
|
2365
2414
|
var _Radio = forwardRef17(
|
|
2366
2415
|
({ value, disabled, width, children, ...props }, ref) => {
|
|
2367
2416
|
const { variant, size, width: groupWidth } = useRadioGroupContext();
|
|
2368
|
-
const classNames2 =
|
|
2417
|
+
const classNames2 = useClassNames39({
|
|
2369
2418
|
component: "Radio",
|
|
2370
2419
|
variant: variant || props.variant,
|
|
2371
2420
|
size: size || props.size
|
|
2372
2421
|
});
|
|
2373
|
-
return /* @__PURE__ */
|
|
2422
|
+
return /* @__PURE__ */ jsx64(
|
|
2374
2423
|
Radio,
|
|
2375
2424
|
{
|
|
2376
2425
|
ref,
|
|
2377
|
-
className:
|
|
2426
|
+
className: cn35(
|
|
2378
2427
|
"group/radio",
|
|
2379
2428
|
"relative flex items-center gap-[1ch]",
|
|
2380
2429
|
width || groupWidth || "w-full",
|
|
@@ -2383,18 +2432,18 @@ var _Radio = forwardRef17(
|
|
|
2383
2432
|
value,
|
|
2384
2433
|
isDisabled: disabled,
|
|
2385
2434
|
...props,
|
|
2386
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
2387
|
-
/* @__PURE__ */
|
|
2435
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
2436
|
+
/* @__PURE__ */ jsx64(
|
|
2388
2437
|
Icon3,
|
|
2389
2438
|
{
|
|
2390
2439
|
checked: isSelected,
|
|
2391
|
-
className:
|
|
2440
|
+
className: cn35(
|
|
2392
2441
|
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
2393
2442
|
classNames2.radio
|
|
2394
2443
|
)
|
|
2395
2444
|
}
|
|
2396
2445
|
),
|
|
2397
|
-
/* @__PURE__ */
|
|
2446
|
+
/* @__PURE__ */ jsx64("div", { className: classNames2.label, children })
|
|
2398
2447
|
] })
|
|
2399
2448
|
}
|
|
2400
2449
|
);
|
|
@@ -2405,7 +2454,7 @@ _Radio.Group = _RadioGroup;
|
|
|
2405
2454
|
// src/SearchField/SearchField.tsx
|
|
2406
2455
|
import { forwardRef as forwardRef18 } from "react";
|
|
2407
2456
|
import { SearchField } from "react-aria-components";
|
|
2408
|
-
import { jsx as
|
|
2457
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2409
2458
|
var _SearchField = forwardRef18(
|
|
2410
2459
|
({ disabled, required, readOnly, error, action, ...rest }, ref) => {
|
|
2411
2460
|
const props = {
|
|
@@ -2415,7 +2464,7 @@ var _SearchField = forwardRef18(
|
|
|
2415
2464
|
isReadOnly: readOnly,
|
|
2416
2465
|
isInvalid: error
|
|
2417
2466
|
};
|
|
2418
|
-
return /* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ jsx65(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx65(
|
|
2419
2468
|
SearchInput,
|
|
2420
2469
|
{
|
|
2421
2470
|
ref,
|
|
@@ -2432,8 +2481,8 @@ import {
|
|
|
2432
2481
|
Select,
|
|
2433
2482
|
SelectValue
|
|
2434
2483
|
} from "react-aria-components";
|
|
2435
|
-
import { cn as
|
|
2436
|
-
import { jsx as
|
|
2484
|
+
import { cn as cn36, useClassNames as useClassNames40 } from "@marigold/system";
|
|
2485
|
+
import { jsx as jsx66, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2437
2486
|
var _Select = forwardRef19(
|
|
2438
2487
|
({
|
|
2439
2488
|
disabled,
|
|
@@ -2454,22 +2503,22 @@ var _Select = forwardRef19(
|
|
|
2454
2503
|
onSelectionChange: onChange,
|
|
2455
2504
|
...rest
|
|
2456
2505
|
};
|
|
2457
|
-
const classNames2 =
|
|
2458
|
-
return /* @__PURE__ */
|
|
2459
|
-
/* @__PURE__ */
|
|
2506
|
+
const classNames2 = useClassNames40({ component: "Select", variant, size });
|
|
2507
|
+
return /* @__PURE__ */ jsxs27(FieldBase, { isOpen: true, as: Select, ref, ...props, children: [
|
|
2508
|
+
/* @__PURE__ */ jsxs27(
|
|
2460
2509
|
Button5,
|
|
2461
2510
|
{
|
|
2462
|
-
className:
|
|
2511
|
+
className: cn36(
|
|
2463
2512
|
"flex w-full items-center justify-between gap-1 overflow-hidden",
|
|
2464
2513
|
classNames2.select
|
|
2465
2514
|
),
|
|
2466
2515
|
children: [
|
|
2467
|
-
/* @__PURE__ */
|
|
2468
|
-
/* @__PURE__ */
|
|
2516
|
+
/* @__PURE__ */ jsx66(SelectValue, {}),
|
|
2517
|
+
/* @__PURE__ */ jsx66(ChevronDown, { className: "size-4" })
|
|
2469
2518
|
]
|
|
2470
2519
|
}
|
|
2471
2520
|
),
|
|
2472
|
-
/* @__PURE__ */
|
|
2521
|
+
/* @__PURE__ */ jsx66(_Popover, { children: /* @__PURE__ */ jsx66(_ListBox, { items, children: props.children }) })
|
|
2473
2522
|
] });
|
|
2474
2523
|
}
|
|
2475
2524
|
);
|
|
@@ -2477,19 +2526,19 @@ _Select.Option = _ListBox.Item;
|
|
|
2477
2526
|
_Select.Section = _ListBox.Section;
|
|
2478
2527
|
|
|
2479
2528
|
// src/Scrollable/Scrollable.tsx
|
|
2480
|
-
import { cn as
|
|
2481
|
-
import { jsx as
|
|
2529
|
+
import { cn as cn37, createVar as createVar10, width as twWidth2 } from "@marigold/system";
|
|
2530
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2482
2531
|
var Scrollable = ({
|
|
2483
2532
|
children,
|
|
2484
2533
|
width = "full",
|
|
2485
2534
|
height,
|
|
2486
2535
|
...props
|
|
2487
|
-
}) => /* @__PURE__ */
|
|
2536
|
+
}) => /* @__PURE__ */ jsx67(
|
|
2488
2537
|
"div",
|
|
2489
2538
|
{
|
|
2490
2539
|
...props,
|
|
2491
|
-
className:
|
|
2492
|
-
style:
|
|
2540
|
+
className: cn37(["sticky h-[--height] overflow-auto", twWidth2[width]]),
|
|
2541
|
+
style: createVar10({ height }),
|
|
2493
2542
|
children
|
|
2494
2543
|
}
|
|
2495
2544
|
);
|
|
@@ -2503,11 +2552,11 @@ import {
|
|
|
2503
2552
|
SliderTrack
|
|
2504
2553
|
} from "react-aria-components";
|
|
2505
2554
|
import {
|
|
2506
|
-
cn as
|
|
2555
|
+
cn as cn38,
|
|
2507
2556
|
width as twWidth3,
|
|
2508
|
-
useClassNames as
|
|
2557
|
+
useClassNames as useClassNames41
|
|
2509
2558
|
} from "@marigold/system";
|
|
2510
|
-
import { jsx as
|
|
2559
|
+
import { jsx as jsx68, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2511
2560
|
var _Slider = forwardRef20(
|
|
2512
2561
|
({
|
|
2513
2562
|
thumbLabels,
|
|
@@ -2517,7 +2566,7 @@ var _Slider = forwardRef20(
|
|
|
2517
2566
|
disabled,
|
|
2518
2567
|
...rest
|
|
2519
2568
|
}, ref) => {
|
|
2520
|
-
const classNames2 =
|
|
2569
|
+
const classNames2 = useClassNames41({
|
|
2521
2570
|
component: "Slider",
|
|
2522
2571
|
variant,
|
|
2523
2572
|
size
|
|
@@ -2526,10 +2575,10 @@ var _Slider = forwardRef20(
|
|
|
2526
2575
|
isDisabled: disabled,
|
|
2527
2576
|
...rest
|
|
2528
2577
|
};
|
|
2529
|
-
return /* @__PURE__ */
|
|
2578
|
+
return /* @__PURE__ */ jsxs28(
|
|
2530
2579
|
Slider,
|
|
2531
2580
|
{
|
|
2532
|
-
className:
|
|
2581
|
+
className: cn38(
|
|
2533
2582
|
"grid grid-cols-[auto_1fr] gap-y-1",
|
|
2534
2583
|
classNames2.container,
|
|
2535
2584
|
twWidth3[width]
|
|
@@ -2537,16 +2586,16 @@ var _Slider = forwardRef20(
|
|
|
2537
2586
|
ref,
|
|
2538
2587
|
...props,
|
|
2539
2588
|
children: [
|
|
2540
|
-
/* @__PURE__ */
|
|
2541
|
-
/* @__PURE__ */
|
|
2542
|
-
/* @__PURE__ */
|
|
2589
|
+
/* @__PURE__ */ jsx68(_Label, { children: props.children }),
|
|
2590
|
+
/* @__PURE__ */ jsx68(SliderOutput, { className: cn38("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
|
|
2591
|
+
/* @__PURE__ */ jsx68(
|
|
2543
2592
|
SliderTrack,
|
|
2544
2593
|
{
|
|
2545
|
-
className:
|
|
2546
|
-
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */
|
|
2594
|
+
className: cn38("relative col-span-2 h-2 w-full", classNames2.track),
|
|
2595
|
+
children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx68(
|
|
2547
2596
|
SliderThumb,
|
|
2548
2597
|
{
|
|
2549
|
-
className:
|
|
2598
|
+
className: cn38("top-1/2 cursor-pointer", classNames2.thumb),
|
|
2550
2599
|
index: i,
|
|
2551
2600
|
"aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
|
|
2552
2601
|
},
|
|
@@ -2561,16 +2610,16 @@ var _Slider = forwardRef20(
|
|
|
2561
2610
|
);
|
|
2562
2611
|
|
|
2563
2612
|
// src/Split/Split.tsx
|
|
2564
|
-
import { jsx as
|
|
2565
|
-
var Split = (props) => /* @__PURE__ */
|
|
2613
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2614
|
+
var Split = (props) => /* @__PURE__ */ jsx69("div", { ...props, role: "separator", className: "grow" });
|
|
2566
2615
|
|
|
2567
2616
|
// src/Stack/Stack.tsx
|
|
2568
2617
|
import {
|
|
2569
2618
|
alignment as alignment3,
|
|
2570
|
-
cn as
|
|
2619
|
+
cn as cn39,
|
|
2571
2620
|
gapSpace as gapSpace6
|
|
2572
2621
|
} from "@marigold/system";
|
|
2573
|
-
import { jsx as
|
|
2622
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2574
2623
|
var Stack = ({
|
|
2575
2624
|
children,
|
|
2576
2625
|
space = 0,
|
|
@@ -2581,10 +2630,10 @@ var Stack = ({
|
|
|
2581
2630
|
...props
|
|
2582
2631
|
}) => {
|
|
2583
2632
|
var _a, _b, _c, _d;
|
|
2584
|
-
return /* @__PURE__ */
|
|
2633
|
+
return /* @__PURE__ */ jsx70(
|
|
2585
2634
|
"div",
|
|
2586
2635
|
{
|
|
2587
|
-
className:
|
|
2636
|
+
className: cn39(
|
|
2588
2637
|
"flex flex-col",
|
|
2589
2638
|
gapSpace6[space],
|
|
2590
2639
|
alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
|
|
@@ -2601,11 +2650,11 @@ var Stack = ({
|
|
|
2601
2650
|
import { forwardRef as forwardRef21 } from "react";
|
|
2602
2651
|
import { Switch } from "react-aria-components";
|
|
2603
2652
|
import {
|
|
2604
|
-
cn as
|
|
2653
|
+
cn as cn40,
|
|
2605
2654
|
width as twWidth4,
|
|
2606
|
-
useClassNames as
|
|
2655
|
+
useClassNames as useClassNames42
|
|
2607
2656
|
} from "@marigold/system";
|
|
2608
|
-
import { jsx as
|
|
2657
|
+
import { jsx as jsx71, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2609
2658
|
var _Switch = forwardRef21(
|
|
2610
2659
|
({
|
|
2611
2660
|
variant,
|
|
@@ -2617,37 +2666,37 @@ var _Switch = forwardRef21(
|
|
|
2617
2666
|
readOnly,
|
|
2618
2667
|
...rest
|
|
2619
2668
|
}, ref) => {
|
|
2620
|
-
const classNames2 =
|
|
2669
|
+
const classNames2 = useClassNames42({ component: "Switch", size, variant });
|
|
2621
2670
|
const props = {
|
|
2622
2671
|
isDisabled: disabled,
|
|
2623
2672
|
isReadOnly: readOnly,
|
|
2624
2673
|
isSelected: selected,
|
|
2625
2674
|
...rest
|
|
2626
2675
|
};
|
|
2627
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ jsxs29(
|
|
2628
2677
|
Switch,
|
|
2629
2678
|
{
|
|
2630
2679
|
...props,
|
|
2631
2680
|
ref,
|
|
2632
|
-
className:
|
|
2681
|
+
className: cn40(
|
|
2633
2682
|
twWidth4[width],
|
|
2634
2683
|
"group/switch",
|
|
2635
2684
|
"flex items-center gap-[1ch]",
|
|
2636
2685
|
classNames2.container
|
|
2637
2686
|
),
|
|
2638
2687
|
children: [
|
|
2639
|
-
/* @__PURE__ */
|
|
2640
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ jsx71(_Label, { elementType: "span", children }),
|
|
2689
|
+
/* @__PURE__ */ jsx71("div", { className: "relative", children: /* @__PURE__ */ jsx71(
|
|
2641
2690
|
"div",
|
|
2642
2691
|
{
|
|
2643
|
-
className:
|
|
2692
|
+
className: cn40(
|
|
2644
2693
|
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
|
|
2645
2694
|
classNames2.track
|
|
2646
2695
|
),
|
|
2647
|
-
children: /* @__PURE__ */
|
|
2696
|
+
children: /* @__PURE__ */ jsx71(
|
|
2648
2697
|
"div",
|
|
2649
2698
|
{
|
|
2650
|
-
className:
|
|
2699
|
+
className: cn40(
|
|
2651
2700
|
"h-[22px] w-[22px]",
|
|
2652
2701
|
"cubic-bezier(.7,0,.3,1)",
|
|
2653
2702
|
"absolute left-0 top-px",
|
|
@@ -2676,19 +2725,19 @@ import {
|
|
|
2676
2725
|
Row,
|
|
2677
2726
|
useTableState
|
|
2678
2727
|
} from "@react-stately/table";
|
|
2679
|
-
import { cn as
|
|
2728
|
+
import { cn as cn46, useClassNames as useClassNames44 } from "@marigold/system";
|
|
2680
2729
|
|
|
2681
2730
|
// src/Table/Context.tsx
|
|
2682
|
-
import { createContext as
|
|
2683
|
-
var TableContext =
|
|
2684
|
-
var useTableContext = () =>
|
|
2731
|
+
import { createContext as createContext7, useContext as useContext13 } from "react";
|
|
2732
|
+
var TableContext = createContext7({});
|
|
2733
|
+
var useTableContext = () => useContext13(TableContext);
|
|
2685
2734
|
|
|
2686
2735
|
// src/Table/TableBody.tsx
|
|
2687
2736
|
import { useTableRowGroup } from "@react-aria/table";
|
|
2688
|
-
import { jsx as
|
|
2737
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2689
2738
|
var TableBody = ({ children }) => {
|
|
2690
2739
|
const { rowGroupProps } = useTableRowGroup();
|
|
2691
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ jsx72("tbody", { ...rowGroupProps, children });
|
|
2692
2741
|
};
|
|
2693
2742
|
|
|
2694
2743
|
// src/Table/TableCell.tsx
|
|
@@ -2696,8 +2745,8 @@ import { useRef as useRef4 } from "react";
|
|
|
2696
2745
|
import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
|
|
2697
2746
|
import { useTableCell } from "@react-aria/table";
|
|
2698
2747
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
|
2699
|
-
import { cn as
|
|
2700
|
-
import { jsx as
|
|
2748
|
+
import { cn as cn41, useStateProps as useStateProps2 } from "@marigold/system";
|
|
2749
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2701
2750
|
var TableCell = ({ cell, align = "left" }) => {
|
|
2702
2751
|
const ref = useRef4(null);
|
|
2703
2752
|
const { interactive, state, classNames: classNames2 } = useTableContext();
|
|
@@ -2720,11 +2769,11 @@ var TableCell = ({ cell, align = "left" }) => {
|
|
|
2720
2769
|
};
|
|
2721
2770
|
const { focusProps, isFocusVisible } = useFocusRing2();
|
|
2722
2771
|
const stateProps = useStateProps2({ disabled, focusVisible: isFocusVisible });
|
|
2723
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx73(
|
|
2724
2773
|
"td",
|
|
2725
2774
|
{
|
|
2726
2775
|
ref,
|
|
2727
|
-
className:
|
|
2776
|
+
className: cn41(classNames2 == null ? void 0 : classNames2.cell),
|
|
2728
2777
|
...mergeProps3(cellProps, focusProps),
|
|
2729
2778
|
...stateProps,
|
|
2730
2779
|
align,
|
|
@@ -2738,7 +2787,7 @@ import { useRef as useRef5 } from "react";
|
|
|
2738
2787
|
import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
|
|
2739
2788
|
import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
|
|
2740
2789
|
import { mergeProps as mergeProps4 } from "@react-aria/utils";
|
|
2741
|
-
import { cn as
|
|
2790
|
+
import { cn as cn42, useStateProps as useStateProps3 } from "@marigold/system";
|
|
2742
2791
|
|
|
2743
2792
|
// src/Table/utils.ts
|
|
2744
2793
|
var mapCheckboxProps = ({
|
|
@@ -2761,7 +2810,7 @@ var mapCheckboxProps = ({
|
|
|
2761
2810
|
};
|
|
2762
2811
|
|
|
2763
2812
|
// src/Table/TableCheckboxCell.tsx
|
|
2764
|
-
import { jsx as
|
|
2813
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
2765
2814
|
var TableCheckboxCell = ({ cell }) => {
|
|
2766
2815
|
const ref = useRef5(null);
|
|
2767
2816
|
const { state, classNames: classNames2 } = useTableContext();
|
|
@@ -2778,14 +2827,14 @@ var TableCheckboxCell = ({ cell }) => {
|
|
|
2778
2827
|
);
|
|
2779
2828
|
const { focusProps, isFocusVisible } = useFocusRing3();
|
|
2780
2829
|
const stateProps = useStateProps3({ disabled, focusVisible: isFocusVisible });
|
|
2781
|
-
return /* @__PURE__ */
|
|
2830
|
+
return /* @__PURE__ */ jsx74(
|
|
2782
2831
|
"td",
|
|
2783
2832
|
{
|
|
2784
2833
|
ref,
|
|
2785
|
-
className:
|
|
2834
|
+
className: cn42("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
|
|
2786
2835
|
...mergeProps4(gridCellProps, focusProps),
|
|
2787
2836
|
...stateProps,
|
|
2788
|
-
children: /* @__PURE__ */
|
|
2837
|
+
children: /* @__PURE__ */ jsx74(_Checkbox, { ...checkboxProps })
|
|
2789
2838
|
}
|
|
2790
2839
|
);
|
|
2791
2840
|
};
|
|
@@ -2797,9 +2846,9 @@ import { useHover } from "@react-aria/interactions";
|
|
|
2797
2846
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
2798
2847
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
2799
2848
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
2800
|
-
import { cn as
|
|
2849
|
+
import { cn as cn43, useStateProps as useStateProps4 } from "@marigold/system";
|
|
2801
2850
|
import { width as twWidth5 } from "@marigold/system";
|
|
2802
|
-
import { jsx as
|
|
2851
|
+
import { jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2803
2852
|
var TableColumnHeader = ({
|
|
2804
2853
|
column,
|
|
2805
2854
|
width = "auto",
|
|
@@ -2821,18 +2870,18 @@ var TableColumnHeader = ({
|
|
|
2821
2870
|
hover: isHovered,
|
|
2822
2871
|
focusVisible: isFocusVisible
|
|
2823
2872
|
});
|
|
2824
|
-
return /* @__PURE__ */
|
|
2873
|
+
return /* @__PURE__ */ jsxs30(
|
|
2825
2874
|
"th",
|
|
2826
2875
|
{
|
|
2827
2876
|
colSpan: column.colspan,
|
|
2828
2877
|
ref,
|
|
2829
|
-
className:
|
|
2878
|
+
className: cn43("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
|
|
2830
2879
|
...mergeProps5(columnHeaderProps, hoverProps, focusProps),
|
|
2831
2880
|
...stateProps,
|
|
2832
2881
|
align,
|
|
2833
2882
|
children: [
|
|
2834
2883
|
column.rendered,
|
|
2835
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */
|
|
2884
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx75(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx75(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx75(SortDown, { className: "inline-block" }))
|
|
2836
2885
|
]
|
|
2837
2886
|
}
|
|
2838
2887
|
);
|
|
@@ -2840,10 +2889,10 @@ var TableColumnHeader = ({
|
|
|
2840
2889
|
|
|
2841
2890
|
// src/Table/TableHeader.tsx
|
|
2842
2891
|
import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
|
|
2843
|
-
import { jsx as
|
|
2892
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2844
2893
|
var TableHeader = ({ stickyHeader, children }) => {
|
|
2845
2894
|
const { rowGroupProps } = useTableRowGroup2();
|
|
2846
|
-
return /* @__PURE__ */
|
|
2895
|
+
return /* @__PURE__ */ jsx76(
|
|
2847
2896
|
"thead",
|
|
2848
2897
|
{
|
|
2849
2898
|
...rowGroupProps,
|
|
@@ -2856,12 +2905,12 @@ var TableHeader = ({ stickyHeader, children }) => {
|
|
|
2856
2905
|
// src/Table/TableHeaderRow.tsx
|
|
2857
2906
|
import { useRef as useRef7 } from "react";
|
|
2858
2907
|
import { useTableHeaderRow } from "@react-aria/table";
|
|
2859
|
-
import { jsx as
|
|
2908
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2860
2909
|
var TableHeaderRow = ({ item, children }) => {
|
|
2861
2910
|
const { state } = useTableContext();
|
|
2862
2911
|
const ref = useRef7(null);
|
|
2863
2912
|
const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
|
|
2864
|
-
return /* @__PURE__ */
|
|
2913
|
+
return /* @__PURE__ */ jsx77("tr", { ...rowProps, ref, children });
|
|
2865
2914
|
};
|
|
2866
2915
|
|
|
2867
2916
|
// src/Table/TableRow.tsx
|
|
@@ -2870,13 +2919,13 @@ import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
|
|
|
2870
2919
|
import { useHover as useHover2 } from "@react-aria/interactions";
|
|
2871
2920
|
import { useTableRow } from "@react-aria/table";
|
|
2872
2921
|
import { mergeProps as mergeProps6 } from "@react-aria/utils";
|
|
2873
|
-
import { cn as
|
|
2874
|
-
import { jsx as
|
|
2922
|
+
import { cn as cn44, useClassNames as useClassNames43, useStateProps as useStateProps5 } from "@marigold/system";
|
|
2923
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
2875
2924
|
var TableRow = ({ children, row }) => {
|
|
2876
2925
|
const ref = useRef8(null);
|
|
2877
2926
|
const { interactive, state, ...ctx } = useTableContext();
|
|
2878
2927
|
const { variant, size } = row.props;
|
|
2879
|
-
const classNames2 =
|
|
2928
|
+
const classNames2 = useClassNames43({
|
|
2880
2929
|
component: "Table",
|
|
2881
2930
|
variant: variant || ctx.variant,
|
|
2882
2931
|
size: size || ctx.size
|
|
@@ -2901,11 +2950,11 @@ var TableRow = ({ children, row }) => {
|
|
|
2901
2950
|
focusVisible: isFocusVisible,
|
|
2902
2951
|
active: isPressed
|
|
2903
2952
|
});
|
|
2904
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ jsx78(
|
|
2905
2954
|
"tr",
|
|
2906
2955
|
{
|
|
2907
2956
|
ref,
|
|
2908
|
-
className:
|
|
2957
|
+
className: cn44(
|
|
2909
2958
|
[
|
|
2910
2959
|
!interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
|
|
2911
2960
|
],
|
|
@@ -2928,11 +2977,11 @@ import {
|
|
|
2928
2977
|
} from "@react-aria/table";
|
|
2929
2978
|
import { mergeProps as mergeProps7 } from "@react-aria/utils";
|
|
2930
2979
|
import {
|
|
2931
|
-
cn as
|
|
2980
|
+
cn as cn45,
|
|
2932
2981
|
width as twWidth6,
|
|
2933
2982
|
useStateProps as useStateProps6
|
|
2934
2983
|
} from "@marigold/system";
|
|
2935
|
-
import { jsx as
|
|
2984
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
2936
2985
|
var TableSelectAllCell = ({
|
|
2937
2986
|
column,
|
|
2938
2987
|
width = "auto",
|
|
@@ -2954,21 +3003,21 @@ var TableSelectAllCell = ({
|
|
|
2954
3003
|
hover: isHovered,
|
|
2955
3004
|
focusVisible: isFocusVisible
|
|
2956
3005
|
});
|
|
2957
|
-
return /* @__PURE__ */
|
|
3006
|
+
return /* @__PURE__ */ jsx79(
|
|
2958
3007
|
"th",
|
|
2959
3008
|
{
|
|
2960
3009
|
ref,
|
|
2961
|
-
className:
|
|
3010
|
+
className: cn45(twWidth6[width], [" leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
2962
3011
|
...mergeProps7(columnHeaderProps, hoverProps, focusProps),
|
|
2963
3012
|
...stateProps,
|
|
2964
3013
|
align,
|
|
2965
|
-
children: /* @__PURE__ */
|
|
3014
|
+
children: /* @__PURE__ */ jsx79(_Checkbox, { ...checkboxProps })
|
|
2966
3015
|
}
|
|
2967
3016
|
);
|
|
2968
3017
|
};
|
|
2969
3018
|
|
|
2970
3019
|
// src/Table/Table.tsx
|
|
2971
|
-
import { jsx as
|
|
3020
|
+
import { jsx as jsx80, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2972
3021
|
var Table = ({
|
|
2973
3022
|
variant,
|
|
2974
3023
|
size,
|
|
@@ -2986,21 +3035,21 @@ var Table = ({
|
|
|
2986
3035
|
props.selectionBehavior !== "replace"
|
|
2987
3036
|
});
|
|
2988
3037
|
const { gridProps } = useTable(props, state, tableRef);
|
|
2989
|
-
const classNames2 =
|
|
3038
|
+
const classNames2 = useClassNames44({
|
|
2990
3039
|
component: "Table",
|
|
2991
3040
|
variant,
|
|
2992
3041
|
size
|
|
2993
3042
|
});
|
|
2994
3043
|
const { collection } = state;
|
|
2995
|
-
return /* @__PURE__ */
|
|
3044
|
+
return /* @__PURE__ */ jsx80(
|
|
2996
3045
|
TableContext.Provider,
|
|
2997
3046
|
{
|
|
2998
3047
|
value: { state, interactive, classNames: classNames2, variant, size },
|
|
2999
|
-
children: /* @__PURE__ */
|
|
3048
|
+
children: /* @__PURE__ */ jsxs31(
|
|
3000
3049
|
"table",
|
|
3001
3050
|
{
|
|
3002
3051
|
ref: tableRef,
|
|
3003
|
-
className:
|
|
3052
|
+
className: cn46(
|
|
3004
3053
|
"group/table",
|
|
3005
3054
|
"border-collapse whitespace-nowrap",
|
|
3006
3055
|
stretch ? "table w-full" : "block",
|
|
@@ -3008,10 +3057,10 @@ var Table = ({
|
|
|
3008
3057
|
),
|
|
3009
3058
|
...gridProps,
|
|
3010
3059
|
children: [
|
|
3011
|
-
/* @__PURE__ */
|
|
3060
|
+
/* @__PURE__ */ jsx80(TableHeader, { stickyHeader, children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx80(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
|
|
3012
3061
|
(column) => {
|
|
3013
3062
|
var _a, _b, _c, _d, _e;
|
|
3014
|
-
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3063
|
+
return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx80(
|
|
3015
3064
|
TableSelectAllCell,
|
|
3016
3065
|
{
|
|
3017
3066
|
width: (_b = column.props) == null ? void 0 : _b.width,
|
|
@@ -3019,7 +3068,7 @@ var Table = ({
|
|
|
3019
3068
|
align: (_c = column.props) == null ? void 0 : _c.align
|
|
3020
3069
|
},
|
|
3021
3070
|
column.key
|
|
3022
|
-
) : /* @__PURE__ */
|
|
3071
|
+
) : /* @__PURE__ */ jsx80(
|
|
3023
3072
|
TableColumnHeader,
|
|
3024
3073
|
{
|
|
3025
3074
|
width: (_d = column.props) == null ? void 0 : _d.width,
|
|
@@ -3030,12 +3079,12 @@ var Table = ({
|
|
|
3030
3079
|
);
|
|
3031
3080
|
}
|
|
3032
3081
|
) }, headerRow.key)) }),
|
|
3033
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ jsxs31(TableBody, { children: [
|
|
3034
3083
|
...collection.rows.map(
|
|
3035
|
-
(row) => row.type === "item" && /* @__PURE__ */
|
|
3084
|
+
(row) => row.type === "item" && /* @__PURE__ */ jsx80(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3036
3085
|
var _a, _b;
|
|
3037
3086
|
const currentColumn = collection.columns[index];
|
|
3038
|
-
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */
|
|
3087
|
+
return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx80(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx80(
|
|
3039
3088
|
TableCell,
|
|
3040
3089
|
{
|
|
3041
3090
|
align: (_b = currentColumn.props) == null ? void 0 : _b.align,
|
|
@@ -3060,18 +3109,18 @@ Table.Row = Row;
|
|
|
3060
3109
|
|
|
3061
3110
|
// src/Text/Text.tsx
|
|
3062
3111
|
import {
|
|
3063
|
-
cn as
|
|
3064
|
-
createVar as
|
|
3112
|
+
cn as cn47,
|
|
3113
|
+
createVar as createVar11,
|
|
3065
3114
|
cursorStyle,
|
|
3066
3115
|
fontWeight,
|
|
3067
3116
|
getColor as getColor2,
|
|
3068
3117
|
textAlign as textAlign2,
|
|
3069
3118
|
textSize,
|
|
3070
3119
|
textStyle,
|
|
3071
|
-
useClassNames as
|
|
3120
|
+
useClassNames as useClassNames45,
|
|
3072
3121
|
useTheme as useTheme3
|
|
3073
3122
|
} from "@marigold/system";
|
|
3074
|
-
import { jsx as
|
|
3123
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3075
3124
|
var Text2 = ({
|
|
3076
3125
|
variant,
|
|
3077
3126
|
size,
|
|
@@ -3085,16 +3134,16 @@ var Text2 = ({
|
|
|
3085
3134
|
...props
|
|
3086
3135
|
}) => {
|
|
3087
3136
|
const theme = useTheme3();
|
|
3088
|
-
const classNames2 =
|
|
3137
|
+
const classNames2 = useClassNames45({
|
|
3089
3138
|
component: "Text",
|
|
3090
3139
|
variant,
|
|
3091
3140
|
size
|
|
3092
3141
|
});
|
|
3093
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ jsx81(
|
|
3094
3143
|
"p",
|
|
3095
3144
|
{
|
|
3096
3145
|
...props,
|
|
3097
|
-
className:
|
|
3146
|
+
className: cn47(
|
|
3098
3147
|
"text-[--color] outline-[--outline]",
|
|
3099
3148
|
classNames2,
|
|
3100
3149
|
fontStyle && textStyle[fontStyle],
|
|
@@ -3103,7 +3152,7 @@ var Text2 = ({
|
|
|
3103
3152
|
weight && fontWeight[weight],
|
|
3104
3153
|
fontSize && textSize[fontSize]
|
|
3105
3154
|
),
|
|
3106
|
-
style:
|
|
3155
|
+
style: createVar11({
|
|
3107
3156
|
color: color && getColor2(
|
|
3108
3157
|
theme,
|
|
3109
3158
|
color,
|
|
@@ -3119,8 +3168,8 @@ var Text2 = ({
|
|
|
3119
3168
|
// src/TextArea/TextArea.tsx
|
|
3120
3169
|
import { forwardRef as forwardRef22 } from "react";
|
|
3121
3170
|
import { TextArea, TextField } from "react-aria-components";
|
|
3122
|
-
import { useClassNames as
|
|
3123
|
-
import { jsx as
|
|
3171
|
+
import { useClassNames as useClassNames46 } from "@marigold/system";
|
|
3172
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
3124
3173
|
var _TextArea = forwardRef22(
|
|
3125
3174
|
({
|
|
3126
3175
|
variant,
|
|
@@ -3132,7 +3181,7 @@ var _TextArea = forwardRef22(
|
|
|
3132
3181
|
rows,
|
|
3133
3182
|
...rest
|
|
3134
3183
|
}, ref) => {
|
|
3135
|
-
const classNames2 =
|
|
3184
|
+
const classNames2 = useClassNames46({ component: "TextArea", variant, size });
|
|
3136
3185
|
const props = {
|
|
3137
3186
|
isDisabled: disabled,
|
|
3138
3187
|
isReadOnly: readOnly,
|
|
@@ -3140,14 +3189,14 @@ var _TextArea = forwardRef22(
|
|
|
3140
3189
|
isRequired: required,
|
|
3141
3190
|
...rest
|
|
3142
3191
|
};
|
|
3143
|
-
return /* @__PURE__ */
|
|
3192
|
+
return /* @__PURE__ */ jsx82(FieldBase, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx82(TextArea, { className: classNames2, ref, rows }) });
|
|
3144
3193
|
}
|
|
3145
3194
|
);
|
|
3146
3195
|
|
|
3147
3196
|
// src/TextField/TextField.tsx
|
|
3148
3197
|
import { forwardRef as forwardRef23 } from "react";
|
|
3149
3198
|
import { TextField as TextField2 } from "react-aria-components";
|
|
3150
|
-
import { jsx as
|
|
3199
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
3151
3200
|
var _TextField = forwardRef23(
|
|
3152
3201
|
({
|
|
3153
3202
|
variant,
|
|
@@ -3165,13 +3214,13 @@ var _TextField = forwardRef23(
|
|
|
3165
3214
|
isRequired: required,
|
|
3166
3215
|
...rest
|
|
3167
3216
|
};
|
|
3168
|
-
return /* @__PURE__ */
|
|
3217
|
+
return /* @__PURE__ */ jsx83(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx83(_Input, { ref }) });
|
|
3169
3218
|
}
|
|
3170
3219
|
);
|
|
3171
3220
|
|
|
3172
3221
|
// src/Tiles/Tiles.tsx
|
|
3173
|
-
import { cn as
|
|
3174
|
-
import { jsx as
|
|
3222
|
+
import { cn as cn48, createVar as createVar12, gapSpace as gapSpace7 } from "@marigold/system";
|
|
3223
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
3175
3224
|
var Tiles = ({
|
|
3176
3225
|
space = 0,
|
|
3177
3226
|
stretch = false,
|
|
@@ -3184,17 +3233,17 @@ var Tiles = ({
|
|
|
3184
3233
|
if (stretch) {
|
|
3185
3234
|
column = `minmax(${column}, 1fr)`;
|
|
3186
3235
|
}
|
|
3187
|
-
return /* @__PURE__ */
|
|
3236
|
+
return /* @__PURE__ */ jsx84(
|
|
3188
3237
|
"div",
|
|
3189
3238
|
{
|
|
3190
3239
|
...props,
|
|
3191
|
-
className:
|
|
3240
|
+
className: cn48(
|
|
3192
3241
|
"grid",
|
|
3193
3242
|
gapSpace7[space],
|
|
3194
3243
|
"grid-cols-[repeat(auto-fit,var(--column))]",
|
|
3195
3244
|
equalHeight && "auto-rows-[1fr]"
|
|
3196
3245
|
),
|
|
3197
|
-
style:
|
|
3246
|
+
style: createVar12({ column, tilesWidth }),
|
|
3198
3247
|
children
|
|
3199
3248
|
}
|
|
3200
3249
|
);
|
|
@@ -3202,11 +3251,11 @@ var Tiles = ({
|
|
|
3202
3251
|
|
|
3203
3252
|
// src/Tooltip/Tooltip.tsx
|
|
3204
3253
|
import { OverlayArrow, Tooltip } from "react-aria-components";
|
|
3205
|
-
import { cn as
|
|
3254
|
+
import { cn as cn49, useClassNames as useClassNames47 } from "@marigold/system";
|
|
3206
3255
|
|
|
3207
3256
|
// src/Tooltip/TooltipTrigger.tsx
|
|
3208
3257
|
import { TooltipTrigger } from "react-aria-components";
|
|
3209
|
-
import { jsx as
|
|
3258
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
3210
3259
|
var _TooltipTrigger = ({
|
|
3211
3260
|
delay = 1e3,
|
|
3212
3261
|
children,
|
|
@@ -3220,19 +3269,19 @@ var _TooltipTrigger = ({
|
|
|
3220
3269
|
isOpen: open,
|
|
3221
3270
|
delay
|
|
3222
3271
|
};
|
|
3223
|
-
return /* @__PURE__ */
|
|
3272
|
+
return /* @__PURE__ */ jsx85(TooltipTrigger, { ...props, children });
|
|
3224
3273
|
};
|
|
3225
3274
|
|
|
3226
3275
|
// src/Tooltip/Tooltip.tsx
|
|
3227
|
-
import { jsx as
|
|
3276
|
+
import { jsx as jsx86, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3228
3277
|
var _Tooltip = ({ children, variant, size, open, ...rest }) => {
|
|
3229
3278
|
const props = {
|
|
3230
3279
|
...rest,
|
|
3231
3280
|
isOpen: open
|
|
3232
3281
|
};
|
|
3233
|
-
const classNames2 =
|
|
3234
|
-
return /* @__PURE__ */
|
|
3235
|
-
/* @__PURE__ */
|
|
3282
|
+
const classNames2 = useClassNames47({ component: "Tooltip", variant, size });
|
|
3283
|
+
return /* @__PURE__ */ jsxs32(Tooltip, { ...props, className: cn49("group/tooltip", classNames2.container), children: [
|
|
3284
|
+
/* @__PURE__ */ jsx86(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx86("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx86("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
3236
3285
|
children
|
|
3237
3286
|
] });
|
|
3238
3287
|
};
|
|
@@ -3240,12 +3289,12 @@ _Tooltip.Trigger = _TooltipTrigger;
|
|
|
3240
3289
|
|
|
3241
3290
|
// src/TagGroup/Tag.tsx
|
|
3242
3291
|
import { Button as Button6, Tag } from "react-aria-components";
|
|
3243
|
-
import { cn as
|
|
3292
|
+
import { cn as cn50, useClassNames as useClassNames49 } from "@marigold/system";
|
|
3244
3293
|
|
|
3245
3294
|
// src/TagGroup/TagGroup.tsx
|
|
3246
3295
|
import { TagGroup, TagList } from "react-aria-components";
|
|
3247
|
-
import { useClassNames as
|
|
3248
|
-
import { jsx as
|
|
3296
|
+
import { useClassNames as useClassNames48 } from "@marigold/system";
|
|
3297
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
3249
3298
|
var _TagGroup = ({
|
|
3250
3299
|
width,
|
|
3251
3300
|
items,
|
|
@@ -3255,8 +3304,8 @@ var _TagGroup = ({
|
|
|
3255
3304
|
size,
|
|
3256
3305
|
...rest
|
|
3257
3306
|
}) => {
|
|
3258
|
-
const classNames2 =
|
|
3259
|
-
return /* @__PURE__ */
|
|
3307
|
+
const classNames2 = useClassNames48({ component: "Tag", variant, size });
|
|
3308
|
+
return /* @__PURE__ */ jsx87(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx87(
|
|
3260
3309
|
TagList,
|
|
3261
3310
|
{
|
|
3262
3311
|
items,
|
|
@@ -3268,19 +3317,19 @@ var _TagGroup = ({
|
|
|
3268
3317
|
};
|
|
3269
3318
|
|
|
3270
3319
|
// src/TagGroup/Tag.tsx
|
|
3271
|
-
import { Fragment as Fragment7, jsx as
|
|
3320
|
+
import { Fragment as Fragment7, jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3272
3321
|
var CloseButton2 = ({ className }) => {
|
|
3273
|
-
return /* @__PURE__ */
|
|
3322
|
+
return /* @__PURE__ */ jsx88(Button6, { slot: "remove", className, children: /* @__PURE__ */ jsx88("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx88("path", { d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }) }) });
|
|
3274
3323
|
};
|
|
3275
3324
|
var _Tag = ({ variant, size, children, ...props }) => {
|
|
3276
3325
|
let textValue = typeof children === "string" ? children : void 0;
|
|
3277
|
-
const classNames2 =
|
|
3278
|
-
return /* @__PURE__ */
|
|
3326
|
+
const classNames2 = useClassNames49({ component: "Tag", variant, size });
|
|
3327
|
+
return /* @__PURE__ */ jsx88(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs33(Fragment7, { children: [
|
|
3279
3328
|
children,
|
|
3280
|
-
allowsRemoving && /* @__PURE__ */
|
|
3329
|
+
allowsRemoving && /* @__PURE__ */ jsx88(
|
|
3281
3330
|
CloseButton2,
|
|
3282
3331
|
{
|
|
3283
|
-
className:
|
|
3332
|
+
className: cn50("flex items-center", classNames2.closeButton)
|
|
3284
3333
|
}
|
|
3285
3334
|
)
|
|
3286
3335
|
] }) });
|
|
@@ -3293,8 +3342,8 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
|
|
|
3293
3342
|
// src/XLoader/XLoader.tsx
|
|
3294
3343
|
import { forwardRef as forwardRef24 } from "react";
|
|
3295
3344
|
import { SVG as SVG5 } from "@marigold/system";
|
|
3296
|
-
import { jsx as
|
|
3297
|
-
var XLoader = forwardRef24((props, ref) => /* @__PURE__ */
|
|
3345
|
+
import { jsx as jsx89, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3346
|
+
var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs34(
|
|
3298
3347
|
SVG5,
|
|
3299
3348
|
{
|
|
3300
3349
|
id: "XLoader",
|
|
@@ -3304,13 +3353,13 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3304
3353
|
...props,
|
|
3305
3354
|
...ref,
|
|
3306
3355
|
children: [
|
|
3307
|
-
/* @__PURE__ */
|
|
3308
|
-
/* @__PURE__ */
|
|
3356
|
+
/* @__PURE__ */ jsx89("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
|
|
3357
|
+
/* @__PURE__ */ jsx89(
|
|
3309
3358
|
"path",
|
|
3310
3359
|
{
|
|
3311
3360
|
id: "XMLID_5_",
|
|
3312
3361
|
d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3313
|
-
children: /* @__PURE__ */
|
|
3362
|
+
children: /* @__PURE__ */ jsx89(
|
|
3314
3363
|
"animate",
|
|
3315
3364
|
{
|
|
3316
3365
|
attributeName: "opacity",
|
|
@@ -3323,12 +3372,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3323
3372
|
)
|
|
3324
3373
|
}
|
|
3325
3374
|
),
|
|
3326
|
-
/* @__PURE__ */
|
|
3375
|
+
/* @__PURE__ */ jsx89(
|
|
3327
3376
|
"path",
|
|
3328
3377
|
{
|
|
3329
3378
|
id: "XMLID_18_",
|
|
3330
3379
|
d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3331
|
-
children: /* @__PURE__ */
|
|
3380
|
+
children: /* @__PURE__ */ jsx89(
|
|
3332
3381
|
"animate",
|
|
3333
3382
|
{
|
|
3334
3383
|
attributeName: "opacity",
|
|
@@ -3341,12 +3390,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3341
3390
|
)
|
|
3342
3391
|
}
|
|
3343
3392
|
),
|
|
3344
|
-
/* @__PURE__ */
|
|
3393
|
+
/* @__PURE__ */ jsx89(
|
|
3345
3394
|
"path",
|
|
3346
3395
|
{
|
|
3347
3396
|
id: "XMLID_19_",
|
|
3348
3397
|
d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3349
|
-
children: /* @__PURE__ */
|
|
3398
|
+
children: /* @__PURE__ */ jsx89(
|
|
3350
3399
|
"animate",
|
|
3351
3400
|
{
|
|
3352
3401
|
attributeName: "opacity",
|
|
@@ -3359,12 +3408,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3359
3408
|
)
|
|
3360
3409
|
}
|
|
3361
3410
|
),
|
|
3362
|
-
/* @__PURE__ */
|
|
3411
|
+
/* @__PURE__ */ jsx89(
|
|
3363
3412
|
"path",
|
|
3364
3413
|
{
|
|
3365
3414
|
id: "XMLID_20_",
|
|
3366
3415
|
d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3367
|
-
children: /* @__PURE__ */
|
|
3416
|
+
children: /* @__PURE__ */ jsx89(
|
|
3368
3417
|
"animate",
|
|
3369
3418
|
{
|
|
3370
3419
|
attributeName: "opacity",
|
|
@@ -3377,12 +3426,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3377
3426
|
)
|
|
3378
3427
|
}
|
|
3379
3428
|
),
|
|
3380
|
-
/* @__PURE__ */
|
|
3429
|
+
/* @__PURE__ */ jsx89(
|
|
3381
3430
|
"path",
|
|
3382
3431
|
{
|
|
3383
3432
|
id: "XMLID_21_",
|
|
3384
3433
|
d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z",
|
|
3385
|
-
children: /* @__PURE__ */
|
|
3434
|
+
children: /* @__PURE__ */ jsx89(
|
|
3386
3435
|
"animate",
|
|
3387
3436
|
{
|
|
3388
3437
|
attributeName: "opacity",
|
|
@@ -3395,12 +3444,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3395
3444
|
)
|
|
3396
3445
|
}
|
|
3397
3446
|
),
|
|
3398
|
-
/* @__PURE__ */
|
|
3447
|
+
/* @__PURE__ */ jsx89(
|
|
3399
3448
|
"path",
|
|
3400
3449
|
{
|
|
3401
3450
|
id: "XMLID_22_",
|
|
3402
3451
|
d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z",
|
|
3403
|
-
children: /* @__PURE__ */
|
|
3452
|
+
children: /* @__PURE__ */ jsx89(
|
|
3404
3453
|
"animate",
|
|
3405
3454
|
{
|
|
3406
3455
|
attributeName: "opacity",
|
|
@@ -3413,12 +3462,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3413
3462
|
)
|
|
3414
3463
|
}
|
|
3415
3464
|
),
|
|
3416
|
-
/* @__PURE__ */
|
|
3465
|
+
/* @__PURE__ */ jsx89(
|
|
3417
3466
|
"path",
|
|
3418
3467
|
{
|
|
3419
3468
|
id: "XMLID_23_",
|
|
3420
3469
|
d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z",
|
|
3421
|
-
children: /* @__PURE__ */
|
|
3470
|
+
children: /* @__PURE__ */ jsx89(
|
|
3422
3471
|
"animate",
|
|
3423
3472
|
{
|
|
3424
3473
|
attributeName: "opacity",
|
|
@@ -3431,12 +3480,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3431
3480
|
)
|
|
3432
3481
|
}
|
|
3433
3482
|
),
|
|
3434
|
-
/* @__PURE__ */
|
|
3483
|
+
/* @__PURE__ */ jsx89(
|
|
3435
3484
|
"path",
|
|
3436
3485
|
{
|
|
3437
3486
|
id: "XMLID_24_",
|
|
3438
3487
|
d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3439
|
-
children: /* @__PURE__ */
|
|
3488
|
+
children: /* @__PURE__ */ jsx89(
|
|
3440
3489
|
"animate",
|
|
3441
3490
|
{
|
|
3442
3491
|
attributeName: "opacity",
|
|
@@ -3449,12 +3498,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3449
3498
|
)
|
|
3450
3499
|
}
|
|
3451
3500
|
),
|
|
3452
|
-
/* @__PURE__ */
|
|
3501
|
+
/* @__PURE__ */ jsx89(
|
|
3453
3502
|
"path",
|
|
3454
3503
|
{
|
|
3455
3504
|
id: "XMLID_25_",
|
|
3456
3505
|
d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3457
|
-
children: /* @__PURE__ */
|
|
3506
|
+
children: /* @__PURE__ */ jsx89(
|
|
3458
3507
|
"animate",
|
|
3459
3508
|
{
|
|
3460
3509
|
attributeName: "opacity",
|
|
@@ -3467,12 +3516,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3467
3516
|
)
|
|
3468
3517
|
}
|
|
3469
3518
|
),
|
|
3470
|
-
/* @__PURE__ */
|
|
3519
|
+
/* @__PURE__ */ jsx89(
|
|
3471
3520
|
"path",
|
|
3472
3521
|
{
|
|
3473
3522
|
id: "XMLID_26_",
|
|
3474
3523
|
d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z",
|
|
3475
|
-
children: /* @__PURE__ */
|
|
3524
|
+
children: /* @__PURE__ */ jsx89(
|
|
3476
3525
|
"animate",
|
|
3477
3526
|
{
|
|
3478
3527
|
attributeName: "opacity",
|
|
@@ -3485,12 +3534,12 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3485
3534
|
)
|
|
3486
3535
|
}
|
|
3487
3536
|
),
|
|
3488
|
-
/* @__PURE__ */
|
|
3537
|
+
/* @__PURE__ */ jsx89(
|
|
3489
3538
|
"path",
|
|
3490
3539
|
{
|
|
3491
3540
|
id: "XMLID_27_",
|
|
3492
3541
|
d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z",
|
|
3493
|
-
children: /* @__PURE__ */
|
|
3542
|
+
children: /* @__PURE__ */ jsx89(
|
|
3494
3543
|
"animate",
|
|
3495
3544
|
{
|
|
3496
3545
|
attributeName: "opacity",
|
|
@@ -3509,24 +3558,24 @@ var XLoader = forwardRef24((props, ref) => /* @__PURE__ */ jsxs33(
|
|
|
3509
3558
|
|
|
3510
3559
|
// src/Tabs/Tabs.tsx
|
|
3511
3560
|
import { Tabs } from "react-aria-components";
|
|
3512
|
-
import { useClassNames as
|
|
3561
|
+
import { useClassNames as useClassNames50 } from "@marigold/system";
|
|
3513
3562
|
|
|
3514
3563
|
// src/Tabs/Context.ts
|
|
3515
|
-
import { createContext as
|
|
3516
|
-
var TabContext =
|
|
3517
|
-
var useTabContext = () =>
|
|
3564
|
+
import { createContext as createContext8, useContext as useContext14 } from "react";
|
|
3565
|
+
var TabContext = createContext8({});
|
|
3566
|
+
var useTabContext = () => useContext14(TabContext);
|
|
3518
3567
|
|
|
3519
3568
|
// src/Tabs/Tab.tsx
|
|
3520
3569
|
import { Tab } from "react-aria-components";
|
|
3521
|
-
import { cn as
|
|
3522
|
-
import { jsx as
|
|
3570
|
+
import { cn as cn51 } from "@marigold/system";
|
|
3571
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
3523
3572
|
var _Tab = (props) => {
|
|
3524
3573
|
const { classNames: classNames2 } = useTabContext();
|
|
3525
|
-
return /* @__PURE__ */
|
|
3574
|
+
return /* @__PURE__ */ jsx90(
|
|
3526
3575
|
Tab,
|
|
3527
3576
|
{
|
|
3528
3577
|
...props,
|
|
3529
|
-
className:
|
|
3578
|
+
className: cn51(
|
|
3530
3579
|
"flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
|
|
3531
3580
|
classNames2.tab
|
|
3532
3581
|
),
|
|
@@ -3537,15 +3586,15 @@ var _Tab = (props) => {
|
|
|
3537
3586
|
|
|
3538
3587
|
// src/Tabs/TabList.tsx
|
|
3539
3588
|
import { TabList } from "react-aria-components";
|
|
3540
|
-
import { cn as
|
|
3541
|
-
import { jsx as
|
|
3589
|
+
import { cn as cn52, gapSpace as gapSpace8 } from "@marigold/system";
|
|
3590
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
3542
3591
|
var _TabList = ({ space = 2, ...props }) => {
|
|
3543
3592
|
const { classNames: classNames2 } = useTabContext();
|
|
3544
|
-
return /* @__PURE__ */
|
|
3593
|
+
return /* @__PURE__ */ jsx91(
|
|
3545
3594
|
TabList,
|
|
3546
3595
|
{
|
|
3547
3596
|
...props,
|
|
3548
|
-
className:
|
|
3597
|
+
className: cn52("flex", gapSpace8[space], classNames2.tabsList),
|
|
3549
3598
|
children: props.children
|
|
3550
3599
|
}
|
|
3551
3600
|
);
|
|
@@ -3553,29 +3602,32 @@ var _TabList = ({ space = 2, ...props }) => {
|
|
|
3553
3602
|
|
|
3554
3603
|
// src/Tabs/TabPanel.tsx
|
|
3555
3604
|
import { TabPanel } from "react-aria-components";
|
|
3556
|
-
import { jsx as
|
|
3605
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
3557
3606
|
var _TabPanel = (props) => {
|
|
3558
3607
|
const { classNames: classNames2 } = useTabContext();
|
|
3559
|
-
return /* @__PURE__ */
|
|
3608
|
+
return /* @__PURE__ */ jsx92(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
|
|
3560
3609
|
};
|
|
3561
3610
|
|
|
3562
3611
|
// src/Tabs/Tabs.tsx
|
|
3563
|
-
import { jsx as
|
|
3612
|
+
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
3564
3613
|
var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
|
|
3565
3614
|
const props = {
|
|
3566
3615
|
isDisabled: disabled,
|
|
3567
3616
|
...rest
|
|
3568
3617
|
};
|
|
3569
|
-
const classNames2 =
|
|
3618
|
+
const classNames2 = useClassNames50({
|
|
3570
3619
|
component: "Tabs",
|
|
3571
3620
|
size,
|
|
3572
3621
|
variant
|
|
3573
3622
|
});
|
|
3574
|
-
return /* @__PURE__ */
|
|
3623
|
+
return /* @__PURE__ */ jsx93(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx93(Tabs, { ...props, className: classNames2.container, children: props.children }) });
|
|
3575
3624
|
};
|
|
3576
3625
|
_Tabs.List = _TabList;
|
|
3577
3626
|
_Tabs.TabPanel = _TabPanel;
|
|
3578
3627
|
_Tabs.Item = _Tab;
|
|
3628
|
+
|
|
3629
|
+
// src/RouterProvider/RouterProvider.tsx
|
|
3630
|
+
import { RouterProvider } from "react-aria-components";
|
|
3579
3631
|
export {
|
|
3580
3632
|
Accordion,
|
|
3581
3633
|
AccordionItem,
|
|
@@ -3624,6 +3676,7 @@ export {
|
|
|
3624
3676
|
_Popover as Popover,
|
|
3625
3677
|
_Radio as Radio,
|
|
3626
3678
|
_RadioGroup as RadioGroup,
|
|
3679
|
+
RouterProvider,
|
|
3627
3680
|
Scrollable,
|
|
3628
3681
|
_SearchField as SearchField,
|
|
3629
3682
|
_Select as Select,
|