@zentrades-ui/components 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +455 -9
- package/dist/components.css +3059 -2899
- package/dist/components.css.map +1 -1
- package/dist/components.d.ts +2476 -18
- package/dist/components.js +263 -177
- package/dist/components.js.map +1 -1
- package/dist/icons.d.ts +3 -3
- package/dist/index.css +3059 -2899
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +190 -44
- package/dist/index.js +263 -177
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
|
|
1
3
|
// src/atoms/Box.tsx
|
|
2
4
|
import { forwardRef } from "react";
|
|
3
5
|
|
|
@@ -939,7 +941,9 @@ var isNativeInputElement = (node) => React3.isValidElement(node) && typeof node.
|
|
|
939
941
|
var Input = forwardRef8(function Input2(props, ref) {
|
|
940
942
|
const {
|
|
941
943
|
label,
|
|
942
|
-
|
|
944
|
+
required = false,
|
|
945
|
+
mandatory,
|
|
946
|
+
// deprecated - kept for backwards compatibility
|
|
943
947
|
helperText,
|
|
944
948
|
error = false,
|
|
945
949
|
errorMessage,
|
|
@@ -955,6 +959,7 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
955
959
|
noOutline = false,
|
|
956
960
|
...inputProps
|
|
957
961
|
} = props;
|
|
962
|
+
const isRequired = required || mandatory || false;
|
|
958
963
|
const inputId = id || `input-${React3.useId()}`;
|
|
959
964
|
const helperTextId = `${inputId}-helper`;
|
|
960
965
|
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
@@ -992,7 +997,7 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
992
997
|
children: label
|
|
993
998
|
}
|
|
994
999
|
),
|
|
995
|
-
|
|
1000
|
+
isRequired && /* @__PURE__ */ jsx8(Text2, { fontVariant: "text-m-regular", color: "contentTertiary", as: "span", children: "*" })
|
|
996
1001
|
] });
|
|
997
1002
|
const inputElement2 = /* @__PURE__ */ jsxs3(Box2, { className: inputWrapper, children: [
|
|
998
1003
|
/* @__PURE__ */ jsxs3(
|
|
@@ -1148,13 +1153,20 @@ var Checkbox = React4.forwardRef(
|
|
|
1148
1153
|
className,
|
|
1149
1154
|
label,
|
|
1150
1155
|
description,
|
|
1156
|
+
// deprecated
|
|
1157
|
+
helperText,
|
|
1151
1158
|
disabled,
|
|
1152
1159
|
checked,
|
|
1153
1160
|
partialChecked,
|
|
1154
1161
|
size = "md",
|
|
1162
|
+
required,
|
|
1163
|
+
error = false,
|
|
1164
|
+
errorMessage,
|
|
1155
1165
|
...props
|
|
1156
1166
|
}, forwardedRef) => {
|
|
1157
1167
|
const boxSize = sizePxMap[size];
|
|
1168
|
+
const checkboxId = props.id || `checkbox-${React4.useId()}`;
|
|
1169
|
+
const displayHelperText = error && errorMessage ? errorMessage : helperText || description;
|
|
1158
1170
|
const checkboxStyles = {
|
|
1159
1171
|
display: "flex",
|
|
1160
1172
|
justifyContent: "center",
|
|
@@ -1173,10 +1185,13 @@ var Checkbox = React4.forwardRef(
|
|
|
1173
1185
|
CheckboxPrimitive.Root,
|
|
1174
1186
|
{
|
|
1175
1187
|
ref: forwardedRef,
|
|
1188
|
+
id: checkboxId,
|
|
1176
1189
|
style: checkboxStyles,
|
|
1177
1190
|
className: cn(checkboxRoot, className),
|
|
1178
1191
|
disabled,
|
|
1179
1192
|
checked,
|
|
1193
|
+
required,
|
|
1194
|
+
"aria-invalid": error || void 0,
|
|
1180
1195
|
...props,
|
|
1181
1196
|
children: /* @__PURE__ */ jsx9(
|
|
1182
1197
|
CheckboxPrimitive.Indicator,
|
|
@@ -1188,35 +1203,47 @@ var Checkbox = React4.forwardRef(
|
|
|
1188
1203
|
)
|
|
1189
1204
|
}
|
|
1190
1205
|
);
|
|
1191
|
-
if (label ||
|
|
1192
|
-
return /* @__PURE__ */ jsxs4(
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
label && /* @__PURE__ */
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1206
|
+
if (label || displayHelperText) {
|
|
1207
|
+
return /* @__PURE__ */ jsxs4(Stack2, { gap: "xs", children: [
|
|
1208
|
+
/* @__PURE__ */ jsxs4(
|
|
1209
|
+
Inline2,
|
|
1210
|
+
{
|
|
1211
|
+
gap: "sm",
|
|
1212
|
+
alignItems: "flex-start",
|
|
1213
|
+
opacity: disabled ? "50" : "100",
|
|
1214
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
1215
|
+
children: [
|
|
1216
|
+
checkbox,
|
|
1217
|
+
/* @__PURE__ */ jsx9(
|
|
1218
|
+
Stack2,
|
|
1219
|
+
{
|
|
1220
|
+
gap: "xs",
|
|
1221
|
+
onClick: (e) => {
|
|
1222
|
+
if (!disabled) {
|
|
1223
|
+
const button = e.currentTarget.parentElement?.querySelector("button");
|
|
1224
|
+
button?.click();
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
children: label && /* @__PURE__ */ jsxs4(Inline2, { gap: "2xs", alignItems: "center", children: [
|
|
1228
|
+
/* @__PURE__ */ jsx9(Text2, { as: "label", fontVariant: "text-s-medium", htmlFor: checkboxId, children: label }),
|
|
1229
|
+
required && /* @__PURE__ */ jsx9(Text2, { as: "span", color: "contentTertiary", fontVariant: "text-s-medium", children: "*" })
|
|
1230
|
+
] })
|
|
1231
|
+
}
|
|
1232
|
+
)
|
|
1233
|
+
]
|
|
1234
|
+
}
|
|
1235
|
+
),
|
|
1236
|
+
displayHelperText && /* @__PURE__ */ jsx9(
|
|
1237
|
+
Text2,
|
|
1238
|
+
{
|
|
1239
|
+
fontVariant: "text-s-regular",
|
|
1240
|
+
color: error ? "contentNegative" : "contentTertiary",
|
|
1241
|
+
role: error ? "alert" : void 0,
|
|
1242
|
+
style: { marginLeft: boxSize + 8 },
|
|
1243
|
+
children: displayHelperText
|
|
1244
|
+
}
|
|
1245
|
+
)
|
|
1246
|
+
] });
|
|
1220
1247
|
}
|
|
1221
1248
|
return checkbox;
|
|
1222
1249
|
}
|
|
@@ -1224,7 +1251,7 @@ var Checkbox = React4.forwardRef(
|
|
|
1224
1251
|
Checkbox.displayName = "Checkbox";
|
|
1225
1252
|
|
|
1226
1253
|
// src/components/Switch/Switch.tsx
|
|
1227
|
-
import { forwardRef as forwardRef10 } from "react";
|
|
1254
|
+
import React5, { forwardRef as forwardRef10 } from "react";
|
|
1228
1255
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
1229
1256
|
|
|
1230
1257
|
// src/components/Switch/switch.css.ts
|
|
@@ -1233,30 +1260,86 @@ var switchRoot = _7a4684({ defaultClassName: "switch__1q0tj351 switch_baseSwitch
|
|
|
1233
1260
|
var switchThumb = _7a4684({ defaultClassName: "switch__1q0tj356 switch_baseSwitchThumb__1q0tj355", variantClassNames: { size: { sm: "switch_switchThumb_size_sm__1q0tj357", md: "switch_switchThumb_size_md__1q0tj358", lg: "switch_switchThumb_size_lg__1q0tj359" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1234
1261
|
|
|
1235
1262
|
// src/components/Switch/Switch.tsx
|
|
1236
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1237
|
-
var Switch = forwardRef10(
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1263
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1264
|
+
var Switch = forwardRef10(
|
|
1265
|
+
({
|
|
1266
|
+
size = "md",
|
|
1267
|
+
className,
|
|
1268
|
+
label,
|
|
1269
|
+
helperText,
|
|
1270
|
+
required,
|
|
1271
|
+
error = false,
|
|
1272
|
+
errorMessage,
|
|
1273
|
+
disabled,
|
|
1274
|
+
...props
|
|
1275
|
+
}, ref) => {
|
|
1276
|
+
const rootClasses = switchRoot({ size });
|
|
1277
|
+
const thumbClasses = switchThumb({ size });
|
|
1278
|
+
const switchId = props.id || `switch-${React5.useId()}`;
|
|
1279
|
+
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
1280
|
+
const switchElement = /* @__PURE__ */ jsx10(
|
|
1281
|
+
SwitchPrimitive.Root,
|
|
1282
|
+
{
|
|
1283
|
+
ref,
|
|
1284
|
+
id: switchId,
|
|
1285
|
+
className: cn(rootClasses, className),
|
|
1286
|
+
disabled,
|
|
1287
|
+
"aria-invalid": error || void 0,
|
|
1288
|
+
...props,
|
|
1289
|
+
children: /* @__PURE__ */ jsx10(SwitchPrimitive.Thumb, { className: thumbClasses })
|
|
1290
|
+
}
|
|
1291
|
+
);
|
|
1292
|
+
if (label || displayHelperText) {
|
|
1293
|
+
return /* @__PURE__ */ jsxs5(Stack2, { gap: "xs", children: [
|
|
1294
|
+
/* @__PURE__ */ jsxs5(
|
|
1295
|
+
Inline2,
|
|
1296
|
+
{
|
|
1297
|
+
gap: "sm",
|
|
1298
|
+
alignItems: "center",
|
|
1299
|
+
opacity: disabled ? "50" : "100",
|
|
1300
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
1301
|
+
children: [
|
|
1302
|
+
switchElement,
|
|
1303
|
+
label && /* @__PURE__ */ jsxs5(Inline2, { gap: "2xs", alignItems: "center", children: [
|
|
1304
|
+
/* @__PURE__ */ jsx10(
|
|
1305
|
+
Text2,
|
|
1306
|
+
{
|
|
1307
|
+
as: "label",
|
|
1308
|
+
fontVariant: "text-s-medium",
|
|
1309
|
+
htmlFor: switchId,
|
|
1310
|
+
style: { cursor: disabled ? "not-allowed" : "pointer" },
|
|
1311
|
+
children: label
|
|
1312
|
+
}
|
|
1313
|
+
),
|
|
1314
|
+
required && /* @__PURE__ */ jsx10(Text2, { as: "span", color: "contentTertiary", fontVariant: "text-s-medium", children: "*" })
|
|
1315
|
+
] })
|
|
1316
|
+
]
|
|
1317
|
+
}
|
|
1318
|
+
),
|
|
1319
|
+
displayHelperText && /* @__PURE__ */ jsx10(
|
|
1320
|
+
Text2,
|
|
1321
|
+
{
|
|
1322
|
+
fontVariant: "text-s-regular",
|
|
1323
|
+
color: error ? "contentNegative" : "contentTertiary",
|
|
1324
|
+
role: error ? "alert" : void 0,
|
|
1325
|
+
children: displayHelperText
|
|
1326
|
+
}
|
|
1327
|
+
)
|
|
1328
|
+
] });
|
|
1247
1329
|
}
|
|
1248
|
-
|
|
1249
|
-
}
|
|
1330
|
+
return switchElement;
|
|
1331
|
+
}
|
|
1332
|
+
);
|
|
1250
1333
|
Switch.displayName = "Switch";
|
|
1251
1334
|
|
|
1252
1335
|
// src/components/Chip/Chip.tsx
|
|
1253
1336
|
import React6, { forwardRef as forwardRef11 } from "react";
|
|
1254
|
-
import { jsx as jsx11, jsxs as
|
|
1337
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1255
1338
|
var ChipComponent = forwardRef11(function Chip(props, ref) {
|
|
1256
1339
|
const { icon, outline, variant, children, disabled, onClick, ...restProps } = props;
|
|
1257
1340
|
const isValidIcon = icon && React6.isValidElement(icon);
|
|
1258
1341
|
const isOnlyIcon = icon && React6.isValidElement(icon) && !children;
|
|
1259
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ jsxs6(
|
|
1260
1343
|
Inline2,
|
|
1261
1344
|
{
|
|
1262
1345
|
ref,
|
|
@@ -1302,7 +1385,7 @@ var tooltipArrow = "tooltip_tooltipArrow__jg1db35";
|
|
|
1302
1385
|
var tooltipContent = "tooltip_tooltipContent__jg1db34";
|
|
1303
1386
|
|
|
1304
1387
|
// src/components/Tooltip/Tooltip.tsx
|
|
1305
|
-
import { jsx as jsx12, jsxs as
|
|
1388
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1306
1389
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1307
1390
|
var Tooltip = ({
|
|
1308
1391
|
children,
|
|
@@ -1321,9 +1404,9 @@ var Tooltip = ({
|
|
|
1321
1404
|
delayDuration,
|
|
1322
1405
|
skipDelayDuration,
|
|
1323
1406
|
disableHoverableContent,
|
|
1324
|
-
children: /* @__PURE__ */
|
|
1407
|
+
children: /* @__PURE__ */ jsxs7(TooltipPrimitive.Root, { children: [
|
|
1325
1408
|
/* @__PURE__ */ jsx12(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
1326
|
-
/* @__PURE__ */ jsx12(TooltipPrimitive.Portal, { children: /* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ jsx12(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
|
|
1327
1410
|
TooltipPrimitive.Content,
|
|
1328
1411
|
{
|
|
1329
1412
|
className: tooltipContent,
|
|
@@ -1374,7 +1457,7 @@ var selectValue = "select_selectValue__ijj2cg8";
|
|
|
1374
1457
|
var selectViewport = "select_selectViewport__ijj2cgb";
|
|
1375
1458
|
|
|
1376
1459
|
// src/components/Select/Select.tsx
|
|
1377
|
-
import { jsx as jsx13, jsxs as
|
|
1460
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1378
1461
|
var ChevronDownIcon = ({ className }) => /* @__PURE__ */ jsx13(
|
|
1379
1462
|
"svg",
|
|
1380
1463
|
{
|
|
@@ -1393,7 +1476,7 @@ var ChevronDownIcon = ({ className }) => /* @__PURE__ */ jsx13(
|
|
|
1393
1476
|
var SelectRoot = SelectPrimitive.Root;
|
|
1394
1477
|
SelectRoot.displayName = "SelectRoot";
|
|
1395
1478
|
var SelectTrigger = React7.forwardRef(({ children, error, ...props }, ref) => {
|
|
1396
|
-
return /* @__PURE__ */
|
|
1479
|
+
return /* @__PURE__ */ jsxs8(
|
|
1397
1480
|
SelectPrimitive.Trigger,
|
|
1398
1481
|
{
|
|
1399
1482
|
ref,
|
|
@@ -1419,7 +1502,7 @@ var SelectContent = React7.forwardRef(
|
|
|
1419
1502
|
...props
|
|
1420
1503
|
}, ref) => {
|
|
1421
1504
|
const contentChildren = disableListWrapper ? children : /* @__PURE__ */ jsx13(Stack2, { as: "ul", gap: "xs", children });
|
|
1422
|
-
return /* @__PURE__ */ jsx13(SelectPrimitive.Portal, { children: /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsx13(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs8(
|
|
1423
1506
|
SelectPrimitive.Content,
|
|
1424
1507
|
{
|
|
1425
1508
|
ref,
|
|
@@ -1469,12 +1552,12 @@ var Select = React7.forwardRef(
|
|
|
1469
1552
|
}, ref) => {
|
|
1470
1553
|
const helperTextId = `${name}-helper`;
|
|
1471
1554
|
const displayHelperText = error && Boolean(errorMessage) ? errorMessage : helperText;
|
|
1472
|
-
return /* @__PURE__ */
|
|
1473
|
-
label && /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ jsxs8(Stack2, { gap: "sm", children: [
|
|
1556
|
+
label && /* @__PURE__ */ jsxs8("label", { className: selectLabel, children: [
|
|
1474
1557
|
label,
|
|
1475
1558
|
required && /* @__PURE__ */ jsx13(Text2, { as: "span", color: "contentTertiary", children: "*" })
|
|
1476
1559
|
] }),
|
|
1477
|
-
/* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ jsxs8(
|
|
1478
1561
|
SelectRoot,
|
|
1479
1562
|
{
|
|
1480
1563
|
value,
|
|
@@ -1726,7 +1809,7 @@ var textareaElement = _7a4689({ defaultClassName: "textarea__o7hyjda textarea_ba
|
|
|
1726
1809
|
var textareaField = _7a4689({ defaultClassName: "textarea__o7hyjd4 textarea_baseTextareaField__o7hyjd3", variantClassNames: { state: { "default": "textarea_textareaField_state_default__o7hyjd5", error: "textarea_textareaField_state_error__o7hyjd6", disabled: "textarea_textareaField_state_disabled__o7hyjd7", view: "textarea_textareaField_state_view__o7hyjd8" } }, defaultVariants: { state: "default" }, compoundVariants: [] });
|
|
1727
1810
|
|
|
1728
1811
|
// src/components/TextArea/TextArea.tsx
|
|
1729
|
-
import { jsx as jsx17, jsxs as
|
|
1812
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1730
1813
|
var ResizeIcon = () => /* @__PURE__ */ jsx17(
|
|
1731
1814
|
"svg",
|
|
1732
1815
|
{
|
|
@@ -1751,7 +1834,9 @@ var TextArea = forwardRef15(
|
|
|
1751
1834
|
function TextArea2(props, ref) {
|
|
1752
1835
|
const {
|
|
1753
1836
|
label,
|
|
1754
|
-
|
|
1837
|
+
required = false,
|
|
1838
|
+
mandatory,
|
|
1839
|
+
// deprecated - kept for backwards compatibility
|
|
1755
1840
|
helperText,
|
|
1756
1841
|
error = false,
|
|
1757
1842
|
errorMessage,
|
|
@@ -1764,6 +1849,7 @@ var TextArea = forwardRef15(
|
|
|
1764
1849
|
readOnly,
|
|
1765
1850
|
...textareaProps
|
|
1766
1851
|
} = props;
|
|
1852
|
+
const isRequired = required || mandatory || false;
|
|
1767
1853
|
const textareaId = id || `textarea-${React10.useId()}`;
|
|
1768
1854
|
const helperTextId = `${textareaId}-helper`;
|
|
1769
1855
|
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
@@ -1773,7 +1859,7 @@ var TextArea = forwardRef15(
|
|
|
1773
1859
|
if (error) return "error";
|
|
1774
1860
|
return "default";
|
|
1775
1861
|
};
|
|
1776
|
-
const labelElement = label && /* @__PURE__ */
|
|
1862
|
+
const labelElement = label && /* @__PURE__ */ jsxs9(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
1777
1863
|
/* @__PURE__ */ jsx17(
|
|
1778
1864
|
Text2,
|
|
1779
1865
|
{
|
|
@@ -1784,11 +1870,11 @@ var TextArea = forwardRef15(
|
|
|
1784
1870
|
children: label
|
|
1785
1871
|
}
|
|
1786
1872
|
),
|
|
1787
|
-
|
|
1873
|
+
isRequired && /* @__PURE__ */ jsx17(Text2, { fontVariant: "text-m-regular", color: "contentTertiary", as: "span", children: "*" })
|
|
1788
1874
|
] });
|
|
1789
1875
|
const state = getState();
|
|
1790
|
-
const textareaElement2 = /* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1876
|
+
const textareaElement2 = /* @__PURE__ */ jsxs9(Stack2, { gap: "sm", width: "full", children: [
|
|
1877
|
+
/* @__PURE__ */ jsxs9(Box2, { className: textareaField({ state }), children: [
|
|
1792
1878
|
/* @__PURE__ */ jsx17(
|
|
1793
1879
|
"textarea",
|
|
1794
1880
|
{
|
|
@@ -1816,7 +1902,7 @@ var TextArea = forwardRef15(
|
|
|
1816
1902
|
}
|
|
1817
1903
|
)
|
|
1818
1904
|
] });
|
|
1819
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ jsxs9(
|
|
1820
1906
|
Box2,
|
|
1821
1907
|
{
|
|
1822
1908
|
className: textareaContainer({
|
|
@@ -1847,7 +1933,7 @@ var iconWrapper3 = "accordion_iconWrapper__1m7j6g7a";
|
|
|
1847
1933
|
var triggerTitle = "accordion_triggerTitle__1m7j6g79";
|
|
1848
1934
|
|
|
1849
1935
|
// src/components/Accordion/Accordion.tsx
|
|
1850
|
-
import { jsx as jsx18, jsxs as
|
|
1936
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1851
1937
|
var ChevronDownIcon2 = () => /* @__PURE__ */ jsx18(
|
|
1852
1938
|
"svg",
|
|
1853
1939
|
{
|
|
@@ -1918,7 +2004,7 @@ var AccordionTrigger = React11.forwardRef(({ children, className, variant, ...pr
|
|
|
1918
2004
|
ref,
|
|
1919
2005
|
className: cn(accordionTrigger({ variant: resolvedVariant }), className),
|
|
1920
2006
|
...props,
|
|
1921
|
-
children: /* @__PURE__ */
|
|
2007
|
+
children: /* @__PURE__ */ jsxs10(
|
|
1922
2008
|
Inline2,
|
|
1923
2009
|
{
|
|
1924
2010
|
flex: "1",
|
|
@@ -1980,7 +2066,7 @@ var menuSubContent = "menu_menuSubContent__1b87dxfe";
|
|
|
1980
2066
|
var menuSubTrigger = "menu_menuSubTrigger__1b87dxfd menu_menuItemBase__1b87dxfa";
|
|
1981
2067
|
|
|
1982
2068
|
// src/components/Menu/Menu.tsx
|
|
1983
|
-
import { jsx as jsx19, jsxs as
|
|
2069
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1984
2070
|
var ChevronRightIcon = () => /* @__PURE__ */ jsx19(
|
|
1985
2071
|
"svg",
|
|
1986
2072
|
{
|
|
@@ -2106,7 +2192,7 @@ var Menu = ({
|
|
|
2106
2192
|
...defaultOpen !== void 0 ? { defaultOpen } : {},
|
|
2107
2193
|
...onOpenChange ? { onOpenChange } : {}
|
|
2108
2194
|
};
|
|
2109
|
-
return /* @__PURE__ */
|
|
2195
|
+
return /* @__PURE__ */ jsxs11(MenuRoot, { ...menuRootProps, children: [
|
|
2110
2196
|
/* @__PURE__ */ jsx19(MenuTrigger, { children: triggerWithHoverHandlers }),
|
|
2111
2197
|
/* @__PURE__ */ jsx19(
|
|
2112
2198
|
MenuContent,
|
|
@@ -2166,8 +2252,8 @@ var MenuSeparator = ({ className }) => {
|
|
|
2166
2252
|
};
|
|
2167
2253
|
MenuSeparator.displayName = "MenuSeparator";
|
|
2168
2254
|
var MenuSub = ({ children, label, padding = "xs" }) => {
|
|
2169
|
-
return /* @__PURE__ */
|
|
2170
|
-
/* @__PURE__ */
|
|
2255
|
+
return /* @__PURE__ */ jsxs11(DropdownMenu.Sub, { children: [
|
|
2256
|
+
/* @__PURE__ */ jsxs11(DropdownMenu.SubTrigger, { className: menuSubTrigger, children: [
|
|
2171
2257
|
label,
|
|
2172
2258
|
/* @__PURE__ */ jsx19(ChevronRightIcon, {})
|
|
2173
2259
|
] }),
|
|
@@ -2200,8 +2286,8 @@ var dialogHeader = "dialog_dialogHeader__1934qpw8";
|
|
|
2200
2286
|
var dialogOverlay = "dialog_dialogOverlay__1934qpw2";
|
|
2201
2287
|
|
|
2202
2288
|
// src/components/Dialog/Dialog.tsx
|
|
2203
|
-
import { jsx as jsx20, jsxs as
|
|
2204
|
-
var CloseIcon = () => /* @__PURE__ */
|
|
2289
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2290
|
+
var CloseIcon = () => /* @__PURE__ */ jsxs12(
|
|
2205
2291
|
"svg",
|
|
2206
2292
|
{
|
|
2207
2293
|
width: "20",
|
|
@@ -2226,7 +2312,7 @@ var DialogRoot = ({
|
|
|
2226
2312
|
children,
|
|
2227
2313
|
modal = true
|
|
2228
2314
|
}) => {
|
|
2229
|
-
return /* @__PURE__ */
|
|
2315
|
+
return /* @__PURE__ */ jsxs12(
|
|
2230
2316
|
DialogPrimitive.Root,
|
|
2231
2317
|
{
|
|
2232
2318
|
open,
|
|
@@ -2256,9 +2342,9 @@ var DialogContent = React13.forwardRef(
|
|
|
2256
2342
|
}, ref) => {
|
|
2257
2343
|
const resolvedMaxHeight = typeof maxHeight === "number" ? `${maxHeight / 16}rem` : maxHeight;
|
|
2258
2344
|
const resolvedHeight = typeof height === "number" ? `${height / 16}rem` : height;
|
|
2259
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ jsxs12(DialogPrimitive.Portal, { children: [
|
|
2260
2346
|
/* @__PURE__ */ jsx20(DialogPrimitive.Overlay, { className: dialogOverlay }),
|
|
2261
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ jsxs12(
|
|
2262
2348
|
DialogPrimitive.Content,
|
|
2263
2349
|
{
|
|
2264
2350
|
ref,
|
|
@@ -2343,7 +2429,7 @@ var Dialog = Object.assign(DialogRoot, {
|
|
|
2343
2429
|
|
|
2344
2430
|
// src/components/Dialog/AlertDialog.tsx
|
|
2345
2431
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2346
|
-
import { jsx as jsx21, jsxs as
|
|
2432
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2347
2433
|
var AlertDialog = ({
|
|
2348
2434
|
layout = "medium",
|
|
2349
2435
|
title,
|
|
@@ -2363,9 +2449,9 @@ var AlertDialog = ({
|
|
|
2363
2449
|
const isMedium = layout === "medium";
|
|
2364
2450
|
const isStacked = layout === "stacked";
|
|
2365
2451
|
const maxWidthStyle = maxWidth ? `${maxWidth / 16}rem` : void 0;
|
|
2366
|
-
return /* @__PURE__ */
|
|
2452
|
+
return /* @__PURE__ */ jsxs13(AlertDialogPrimitive.Root, { open, onOpenChange, children: [
|
|
2367
2453
|
trigger && /* @__PURE__ */ jsx21(AlertDialogPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
2368
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ jsxs13(AlertDialogPrimitive.Portal, { children: [
|
|
2369
2455
|
/* @__PURE__ */ jsx21(
|
|
2370
2456
|
AlertDialogPrimitive.Overlay,
|
|
2371
2457
|
{
|
|
@@ -2378,7 +2464,7 @@ var AlertDialog = ({
|
|
|
2378
2464
|
{
|
|
2379
2465
|
className: cn(alertDialogContent({ layout })),
|
|
2380
2466
|
style: maxWidthStyle ? { maxWidth: maxWidthStyle } : void 0,
|
|
2381
|
-
children: /* @__PURE__ */
|
|
2467
|
+
children: /* @__PURE__ */ jsxs13(
|
|
2382
2468
|
Stack2,
|
|
2383
2469
|
{
|
|
2384
2470
|
gap: "20",
|
|
@@ -2390,7 +2476,7 @@ var AlertDialog = ({
|
|
|
2390
2476
|
padding: "xl",
|
|
2391
2477
|
shadow: "L4",
|
|
2392
2478
|
children: [
|
|
2393
|
-
/* @__PURE__ */
|
|
2479
|
+
/* @__PURE__ */ jsxs13(
|
|
2394
2480
|
Stack2,
|
|
2395
2481
|
{
|
|
2396
2482
|
gap: "sm",
|
|
@@ -2402,7 +2488,7 @@ var AlertDialog = ({
|
|
|
2402
2488
|
]
|
|
2403
2489
|
}
|
|
2404
2490
|
),
|
|
2405
|
-
isMedium ? /* @__PURE__ */
|
|
2491
|
+
isMedium ? /* @__PURE__ */ jsxs13(Inline2, { gap: "md", justifyContent: "end", children: [
|
|
2406
2492
|
/* @__PURE__ */ jsx21(AlertDialogPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx21(
|
|
2407
2493
|
Button,
|
|
2408
2494
|
{
|
|
@@ -2429,7 +2515,7 @@ var AlertDialog = ({
|
|
|
2429
2515
|
children: continueText
|
|
2430
2516
|
}
|
|
2431
2517
|
) })
|
|
2432
|
-
] }) : /* @__PURE__ */
|
|
2518
|
+
] }) : /* @__PURE__ */ jsxs13(Stack2, { gap: "md", children: [
|
|
2433
2519
|
preventCloseOnAction ? /* @__PURE__ */ jsx21(
|
|
2434
2520
|
Button,
|
|
2435
2521
|
{
|
|
@@ -2486,8 +2572,8 @@ var toastViewportPositions = { "top-left": "toast_toastViewportPositions_top-lef
|
|
|
2486
2572
|
var toastViewportStyle = "toast_toastViewportStyle__1c9srd86";
|
|
2487
2573
|
|
|
2488
2574
|
// src/components/Toast/Toast.tsx
|
|
2489
|
-
import { jsx as jsx22, jsxs as
|
|
2490
|
-
var CloseIcon2 = () => /* @__PURE__ */
|
|
2575
|
+
import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2576
|
+
var CloseIcon2 = () => /* @__PURE__ */ jsxs14(
|
|
2491
2577
|
"svg",
|
|
2492
2578
|
{
|
|
2493
2579
|
width: "16",
|
|
@@ -2504,7 +2590,7 @@ var CloseIcon2 = () => /* @__PURE__ */ jsxs13(
|
|
|
2504
2590
|
]
|
|
2505
2591
|
}
|
|
2506
2592
|
);
|
|
2507
|
-
var InfoIcon = () => /* @__PURE__ */
|
|
2593
|
+
var InfoIcon = () => /* @__PURE__ */ jsxs14(
|
|
2508
2594
|
"svg",
|
|
2509
2595
|
{
|
|
2510
2596
|
width: "20",
|
|
@@ -2522,7 +2608,7 @@ var InfoIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2522
2608
|
]
|
|
2523
2609
|
}
|
|
2524
2610
|
);
|
|
2525
|
-
var SuccessIcon = () => /* @__PURE__ */
|
|
2611
|
+
var SuccessIcon = () => /* @__PURE__ */ jsxs14(
|
|
2526
2612
|
"svg",
|
|
2527
2613
|
{
|
|
2528
2614
|
width: "20",
|
|
@@ -2539,7 +2625,7 @@ var SuccessIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2539
2625
|
]
|
|
2540
2626
|
}
|
|
2541
2627
|
);
|
|
2542
|
-
var WarningIcon = () => /* @__PURE__ */
|
|
2628
|
+
var WarningIcon = () => /* @__PURE__ */ jsxs14(
|
|
2543
2629
|
"svg",
|
|
2544
2630
|
{
|
|
2545
2631
|
width: "20",
|
|
@@ -2557,7 +2643,7 @@ var WarningIcon = () => /* @__PURE__ */ jsxs13(
|
|
|
2557
2643
|
]
|
|
2558
2644
|
}
|
|
2559
2645
|
);
|
|
2560
|
-
var ErrorIcon = () => /* @__PURE__ */
|
|
2646
|
+
var ErrorIcon = () => /* @__PURE__ */ jsxs14(
|
|
2561
2647
|
"svg",
|
|
2562
2648
|
{
|
|
2563
2649
|
width: "20",
|
|
@@ -2602,7 +2688,7 @@ var Toast = React14.forwardRef(
|
|
|
2602
2688
|
showClose = true
|
|
2603
2689
|
}, ref) => {
|
|
2604
2690
|
const displayIcon = icon !== void 0 ? icon : getIconForVariant(variant);
|
|
2605
|
-
return /* @__PURE__ */
|
|
2691
|
+
return /* @__PURE__ */ jsxs14(
|
|
2606
2692
|
ToastPrimitive.Root,
|
|
2607
2693
|
{
|
|
2608
2694
|
ref,
|
|
@@ -2612,7 +2698,7 @@ var Toast = React14.forwardRef(
|
|
|
2612
2698
|
className: cn(toastRoot({ variant }), className),
|
|
2613
2699
|
children: [
|
|
2614
2700
|
displayIcon && /* @__PURE__ */ jsx22("div", { className: toastIcon, children: displayIcon }),
|
|
2615
|
-
/* @__PURE__ */
|
|
2701
|
+
/* @__PURE__ */ jsxs14("div", { className: toastContent, children: [
|
|
2616
2702
|
/* @__PURE__ */ jsx22(ToastPrimitive.Title, { className: toastTitle, children: title }),
|
|
2617
2703
|
description && /* @__PURE__ */ jsx22(ToastPrimitive.Description, { className: toastDescription, children: description })
|
|
2618
2704
|
] }),
|
|
@@ -2696,8 +2782,8 @@ var popoverClose = "popover_popoverClose__qv1k3xa";
|
|
|
2696
2782
|
var popoverContent = _7a46814({ defaultClassName: "popover_popoverContent__qv1k3x4", variantClassNames: { size: { sm: "popover_popoverContent_size_sm__qv1k3x5", md: "popover_popoverContent_size_md__qv1k3x6", lg: "popover_popoverContent_size_lg__qv1k3x7", auto: "popover_popoverContent_size_auto__qv1k3x8" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2697
2783
|
|
|
2698
2784
|
// src/components/Popover/Popover.tsx
|
|
2699
|
-
import { jsx as jsx23, jsxs as
|
|
2700
|
-
var CloseIcon3 = () => /* @__PURE__ */
|
|
2785
|
+
import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2786
|
+
var CloseIcon3 = () => /* @__PURE__ */ jsxs15(
|
|
2701
2787
|
"svg",
|
|
2702
2788
|
{
|
|
2703
2789
|
width: "16",
|
|
@@ -2733,7 +2819,7 @@ var PopoverContent = React15.forwardRef(
|
|
|
2733
2819
|
onClose,
|
|
2734
2820
|
...props
|
|
2735
2821
|
}, ref) => {
|
|
2736
|
-
return /* @__PURE__ */ jsx23(PopoverPrimitive.Portal, { children: /* @__PURE__ */
|
|
2822
|
+
return /* @__PURE__ */ jsx23(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs15(
|
|
2737
2823
|
PopoverPrimitive.Content,
|
|
2738
2824
|
{
|
|
2739
2825
|
ref,
|
|
@@ -2775,7 +2861,7 @@ var Popover = ({
|
|
|
2775
2861
|
showClose = false,
|
|
2776
2862
|
modal = false
|
|
2777
2863
|
}) => {
|
|
2778
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ jsxs15(PopoverRoot, { open, defaultOpen, onOpenChange, modal, children: [
|
|
2779
2865
|
/* @__PURE__ */ jsx23(PopoverTrigger, { children: trigger }),
|
|
2780
2866
|
/* @__PURE__ */ jsx23(
|
|
2781
2867
|
PopoverContent,
|
|
@@ -2818,7 +2904,7 @@ var tabItem = _7a46815({ defaultClassName: "tabs_tabItem__1c5op4v7", variantClas
|
|
|
2818
2904
|
var tabsList = _7a46815({ defaultClassName: "tabs_tabsList__1c5op4v2", variantClassNames: { variant: { pills: "tabs_tabsList_variant_pills__1c5op4v3", underline: "tabs_tabsList_variant_underline__1c5op4v4" }, fullWidth: { true: "tabs_tabsList_fullWidth_true__1c5op4v5", false: "tabs_tabsList_fullWidth_false__1c5op4v6" } }, defaultVariants: { variant: "pills", fullWidth: false }, compoundVariants: [] });
|
|
2819
2905
|
|
|
2820
2906
|
// src/components/Tabs/Tabs.tsx
|
|
2821
|
-
import { jsx as jsx24, jsxs as
|
|
2907
|
+
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2822
2908
|
var TabsContext = createContext2({ variant: "pills" });
|
|
2823
2909
|
var useTabsContext = () => useContext2(TabsContext);
|
|
2824
2910
|
var TabsRoot = forwardRef21(({ variant = "pills", children, ...props }, ref) => {
|
|
@@ -2862,7 +2948,7 @@ var TabsTrigger = forwardRef21(({ value, icon, children, className, disabled, va
|
|
|
2862
2948
|
),
|
|
2863
2949
|
"data-variant": resolvedVariant,
|
|
2864
2950
|
...props,
|
|
2865
|
-
children: /* @__PURE__ */
|
|
2951
|
+
children: /* @__PURE__ */ jsxs16(Inline2, { gap: "sm", alignItems: "center", justifyContent: "center", children: [
|
|
2866
2952
|
icon && React16.cloneElement(icon, {
|
|
2867
2953
|
size: "20",
|
|
2868
2954
|
style: { color: "inherit" }
|
|
@@ -2921,8 +3007,8 @@ var sectionHeader = "drawer_sectionHeader__4fc39fl";
|
|
|
2921
3007
|
var sectionText = "drawer_sectionText__4fc39fm";
|
|
2922
3008
|
|
|
2923
3009
|
// src/components/Drawer/Drawer.tsx
|
|
2924
|
-
import { jsx as jsx25, jsxs as
|
|
2925
|
-
var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */
|
|
3010
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3011
|
+
var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */ jsxs17(
|
|
2926
3012
|
"svg",
|
|
2927
3013
|
{
|
|
2928
3014
|
width: size,
|
|
@@ -2974,7 +3060,7 @@ var DrawerHeader = forwardRef22(
|
|
|
2974
3060
|
showCloseButton = true,
|
|
2975
3061
|
closeLabel = "Close drawer",
|
|
2976
3062
|
...props
|
|
2977
|
-
}, ref) => title || children ? /* @__PURE__ */
|
|
3063
|
+
}, ref) => title || children ? /* @__PURE__ */ jsxs17("header", { ref, className: cn(drawerHeader, className), ...props, children: [
|
|
2978
3064
|
typeof title === "string" ? /* @__PURE__ */ jsx25(Text2, { fontVariant: "text-xl-medium", color: "contentPrimary", children: title }) : title || children,
|
|
2979
3065
|
showCloseButton && /* @__PURE__ */ jsx25(
|
|
2980
3066
|
DialogPrimitive2.Close,
|
|
@@ -3025,8 +3111,8 @@ var DrawerFooter = forwardRef22(
|
|
|
3025
3111
|
);
|
|
3026
3112
|
DrawerFooter.displayName = "Drawer.Footer";
|
|
3027
3113
|
var DrawerSection = forwardRef22(
|
|
3028
|
-
({ title, description, actions, children, className, ...props }, ref) => /* @__PURE__ */
|
|
3029
|
-
(title || description || actions) && /* @__PURE__ */
|
|
3114
|
+
({ title, description, actions, children, className, ...props }, ref) => /* @__PURE__ */ jsxs17("section", { ref, className: cn(section, className), ...props, children: [
|
|
3115
|
+
(title || description || actions) && /* @__PURE__ */ jsxs17(
|
|
3030
3116
|
Inline2,
|
|
3031
3117
|
{
|
|
3032
3118
|
className: sectionHeader,
|
|
@@ -3034,7 +3120,7 @@ var DrawerSection = forwardRef22(
|
|
|
3034
3120
|
alignItems: "flex-start",
|
|
3035
3121
|
gap: "md",
|
|
3036
3122
|
children: [
|
|
3037
|
-
/* @__PURE__ */
|
|
3123
|
+
/* @__PURE__ */ jsxs17(Stack2, { className: sectionText, gap: "2xs", children: [
|
|
3038
3124
|
title && /* @__PURE__ */ jsx25(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: title }),
|
|
3039
3125
|
description && /* @__PURE__ */ jsx25(Text2, { fontVariant: "text-s-regular", color: "contentSecondary", children: description })
|
|
3040
3126
|
] }),
|
|
@@ -3057,11 +3143,11 @@ var Drawer = ({
|
|
|
3057
3143
|
size = "lg",
|
|
3058
3144
|
showCloseButton = true
|
|
3059
3145
|
}) => {
|
|
3060
|
-
return /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ jsxs17(DrawerRoot, { open, onOpenChange, children: [
|
|
3061
3147
|
trigger && /* @__PURE__ */ jsx25(DrawerTrigger, { asChild: true, children: trigger }),
|
|
3062
|
-
/* @__PURE__ */
|
|
3148
|
+
/* @__PURE__ */ jsxs17(DrawerPortal, { children: [
|
|
3063
3149
|
showOverlay && /* @__PURE__ */ jsx25(DrawerOverlay, {}),
|
|
3064
|
-
/* @__PURE__ */
|
|
3150
|
+
/* @__PURE__ */ jsxs17(DrawerContent, { side, size, children: [
|
|
3065
3151
|
title && /* @__PURE__ */ jsx25(DrawerHeader, { title, showCloseButton }),
|
|
3066
3152
|
children
|
|
3067
3153
|
] })
|
|
@@ -3094,7 +3180,7 @@ var rangeTextSecondary = "pagination_rangeTextSecondary__x6drlhd";
|
|
|
3094
3180
|
var rangeWrapper = "pagination_rangeWrapper__x6drlhc";
|
|
3095
3181
|
|
|
3096
3182
|
// src/components/Pagination/Pagination.tsx
|
|
3097
|
-
import { jsx as jsx26, jsxs as
|
|
3183
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3098
3184
|
var ChevronLeftIcon = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
3099
3185
|
"svg",
|
|
3100
3186
|
{
|
|
@@ -3137,7 +3223,7 @@ var ChevronDownIcon3 = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
|
3137
3223
|
children: /* @__PURE__ */ jsx26("path", { d: "M6 9l6 6 6-6" })
|
|
3138
3224
|
}
|
|
3139
3225
|
);
|
|
3140
|
-
var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */
|
|
3226
|
+
var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */ jsxs18(
|
|
3141
3227
|
"svg",
|
|
3142
3228
|
{
|
|
3143
3229
|
width: size,
|
|
@@ -3164,7 +3250,7 @@ var PaginationPrevious = ({
|
|
|
3164
3250
|
children = "Previous",
|
|
3165
3251
|
className
|
|
3166
3252
|
}) => {
|
|
3167
|
-
return /* @__PURE__ */
|
|
3253
|
+
return /* @__PURE__ */ jsxs18(
|
|
3168
3254
|
"button",
|
|
3169
3255
|
{
|
|
3170
3256
|
className: cn(paginationItem({ variant: "previous" }), className),
|
|
@@ -3185,7 +3271,7 @@ var PaginationNext = ({
|
|
|
3185
3271
|
children = "Next",
|
|
3186
3272
|
className
|
|
3187
3273
|
}) => {
|
|
3188
|
-
return /* @__PURE__ */
|
|
3274
|
+
return /* @__PURE__ */ jsxs18(
|
|
3189
3275
|
"button",
|
|
3190
3276
|
{
|
|
3191
3277
|
className: cn(paginationItem({ variant: "next" }), className),
|
|
@@ -3263,8 +3349,8 @@ var PaginationInfoRange = ({
|
|
|
3263
3349
|
end,
|
|
3264
3350
|
total
|
|
3265
3351
|
}) => {
|
|
3266
|
-
return /* @__PURE__ */
|
|
3267
|
-
/* @__PURE__ */
|
|
3352
|
+
return /* @__PURE__ */ jsxs18("div", { className: rangeWrapper, children: [
|
|
3353
|
+
/* @__PURE__ */ jsxs18("span", { className: rangeTextSecondary, children: [
|
|
3268
3354
|
start,
|
|
3269
3355
|
"-",
|
|
3270
3356
|
end
|
|
@@ -3285,12 +3371,12 @@ var PaginationInfoComplete = ({
|
|
|
3285
3371
|
}) => {
|
|
3286
3372
|
const start = Math.min((currentPage - 1) * pageSize + 1, totalItems);
|
|
3287
3373
|
const end = Math.min(currentPage * pageSize, totalItems);
|
|
3288
|
-
return /* @__PURE__ */
|
|
3374
|
+
return /* @__PURE__ */ jsxs18(PaginationInfoRoot, { className, children: [
|
|
3289
3375
|
/* @__PURE__ */ jsx26(PaginationInfoLabel, { children: label }),
|
|
3290
3376
|
/* @__PURE__ */ jsx26(
|
|
3291
3377
|
Menu,
|
|
3292
3378
|
{
|
|
3293
|
-
trigger: /* @__PURE__ */
|
|
3379
|
+
trigger: /* @__PURE__ */ jsxs18("button", { className: pickerButton({ disabled: false }), children: [
|
|
3294
3380
|
pageSize,
|
|
3295
3381
|
/* @__PURE__ */ jsx26(
|
|
3296
3382
|
Inline2,
|
|
@@ -3499,7 +3585,7 @@ var imageStyles = _7a46819({ defaultClassName: "image_imageStyles__1hj4ov11", va
|
|
|
3499
3585
|
var placeholderStyles = "image_placeholderStyles__1hj4ov19";
|
|
3500
3586
|
|
|
3501
3587
|
// src/components/Image/Image.tsx
|
|
3502
|
-
import { jsx as jsx29, jsxs as
|
|
3588
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3503
3589
|
var Image3 = forwardRef24(function Image4({
|
|
3504
3590
|
src,
|
|
3505
3591
|
alt,
|
|
@@ -3534,7 +3620,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3534
3620
|
const showPlaceholder = imageState === "loading" && placeholder;
|
|
3535
3621
|
const showFallback = imageState === "error" && fallback;
|
|
3536
3622
|
const showImage = imageState !== "error";
|
|
3537
|
-
return /* @__PURE__ */
|
|
3623
|
+
return /* @__PURE__ */ jsxs19(
|
|
3538
3624
|
Box2,
|
|
3539
3625
|
{
|
|
3540
3626
|
ref,
|
|
@@ -3604,7 +3690,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3604
3690
|
Image3.displayName = "Image";
|
|
3605
3691
|
|
|
3606
3692
|
// src/components/FileUpload/FileUpload.tsx
|
|
3607
|
-
import { useCallback as useCallback4, useId, useMemo as useMemo3, useRef as useRef2, useState as useState4 } from "react";
|
|
3693
|
+
import { useCallback as useCallback4, useId as useId2, useMemo as useMemo3, useRef as useRef2, useState as useState4 } from "react";
|
|
3608
3694
|
|
|
3609
3695
|
// src/components/FileUpload/fileUpload.css.ts
|
|
3610
3696
|
import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -3622,7 +3708,7 @@ var previewImage = "fileUpload_previewImage__1nxjf87h";
|
|
|
3622
3708
|
var uploaderContainer = "fileUpload_uploaderContainer__1nxjf870";
|
|
3623
3709
|
|
|
3624
3710
|
// src/components/FileUpload/FileUpload.tsx
|
|
3625
|
-
import { jsx as jsx30, jsxs as
|
|
3711
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3626
3712
|
var UploadCloudIcon = ({ size = "24", color = "currentColor" }) => /* @__PURE__ */ jsx30(
|
|
3627
3713
|
"svg",
|
|
3628
3714
|
{
|
|
@@ -3701,7 +3787,7 @@ function FileUpload({
|
|
|
3701
3787
|
onRemoveFile,
|
|
3702
3788
|
className
|
|
3703
3789
|
}) {
|
|
3704
|
-
const inputId =
|
|
3790
|
+
const inputId = useId2();
|
|
3705
3791
|
const inputRef = useRef2(null);
|
|
3706
3792
|
const dragCounterRef = useRef2(0);
|
|
3707
3793
|
const [isDragging, setIsDragging] = useState4(false);
|
|
@@ -3786,8 +3872,8 @@ function FileUpload({
|
|
|
3786
3872
|
state: isDragging ? "dragging" : "default",
|
|
3787
3873
|
disabled
|
|
3788
3874
|
});
|
|
3789
|
-
return /* @__PURE__ */
|
|
3790
|
-
(title || description) && /* @__PURE__ */
|
|
3875
|
+
return /* @__PURE__ */ jsxs20(Stack2, { className: cn(uploaderContainer, className), gap: "sm", children: [
|
|
3876
|
+
(title || description) && /* @__PURE__ */ jsxs20(Stack2, { gap: "2xs", children: [
|
|
3791
3877
|
title ? /* @__PURE__ */ jsx30(Heading2, { fontVariant: "heading-xs-medium", color: "contentPrimary", children: title }) : null,
|
|
3792
3878
|
description ? /* @__PURE__ */ jsx30(Text2, { fontVariant: "text-s-regular", color: "contentQuaternary", children: description }) : null
|
|
3793
3879
|
] }),
|
|
@@ -3805,9 +3891,9 @@ function FileUpload({
|
|
|
3805
3891
|
onDragLeave: handleDragLeave,
|
|
3806
3892
|
onDragOver: handleDragOver,
|
|
3807
3893
|
onDrop: handleDrop,
|
|
3808
|
-
children: variant === "compact" ? /* @__PURE__ */
|
|
3894
|
+
children: variant === "compact" ? /* @__PURE__ */ jsxs20(Inline2, { alignItems: "center", gap: "xs", wrap: true, children: [
|
|
3809
3895
|
/* @__PURE__ */ jsx30(UploadCloudIcon, { size: "24", color: "var(--zen-color-content-secondary)" }),
|
|
3810
|
-
/* @__PURE__ */
|
|
3896
|
+
/* @__PURE__ */ jsxs20(Inline2, { alignItems: "center", gap: "xs", wrap: true, children: [
|
|
3811
3897
|
/* @__PURE__ */ jsx30(Text2, { fontVariant: "text-s-medium", color: "contentSecondary", children: compactDragLabel }),
|
|
3812
3898
|
/* @__PURE__ */ jsx30(
|
|
3813
3899
|
"button",
|
|
@@ -3823,13 +3909,13 @@ function FileUpload({
|
|
|
3823
3909
|
}
|
|
3824
3910
|
)
|
|
3825
3911
|
] })
|
|
3826
|
-
] }) : /* @__PURE__ */
|
|
3912
|
+
] }) : /* @__PURE__ */ jsxs20(Stack2, { gap: "sm", alignItems: "center", children: [
|
|
3827
3913
|
/* @__PURE__ */ jsx30(UploadCloudIcon, { size: "24", color: "var(--zen-color-content-secondary)" }),
|
|
3828
|
-
/* @__PURE__ */
|
|
3914
|
+
/* @__PURE__ */ jsxs20(Stack2, { gap: "2xs", alignItems: "center", children: [
|
|
3829
3915
|
/* @__PURE__ */ jsx30(Text2, { fontVariant: "text-s-medium", color: "contentSecondary", children: dragLabel }),
|
|
3830
3916
|
supportedText ? /* @__PURE__ */ jsx30(Text2, { fontVariant: "text-xs-regular", color: "contentQuaternary", children: supportedText }) : null
|
|
3831
3917
|
] }),
|
|
3832
|
-
/* @__PURE__ */
|
|
3918
|
+
/* @__PURE__ */ jsxs20(Stack2, { gap: "2xs", alignItems: "center", children: [
|
|
3833
3919
|
/* @__PURE__ */ jsx30(
|
|
3834
3920
|
Button,
|
|
3835
3921
|
{
|
|
@@ -3848,7 +3934,7 @@ function FileUpload({
|
|
|
3848
3934
|
] })
|
|
3849
3935
|
}
|
|
3850
3936
|
),
|
|
3851
|
-
variant === "compact" && (supportedText || maxSizeLabel) ? /* @__PURE__ */
|
|
3937
|
+
variant === "compact" && (supportedText || maxSizeLabel) ? /* @__PURE__ */ jsxs20(
|
|
3852
3938
|
Inline2,
|
|
3853
3939
|
{
|
|
3854
3940
|
alignItems: "center",
|
|
@@ -3865,8 +3951,8 @@ function FileUpload({
|
|
|
3865
3951
|
helperText ? /* @__PURE__ */ jsx30(Text2, { fontVariant: "text-s-regular", className: helperTextStyle, children: helperText }) : null,
|
|
3866
3952
|
resolvedFiles.length ? /* @__PURE__ */ jsx30("div", { className: fileList, children: resolvedFiles.map((file) => {
|
|
3867
3953
|
const previewLabel = getPreviewLabel(file);
|
|
3868
|
-
return /* @__PURE__ */
|
|
3869
|
-
/* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ jsxs20("div", { className: fileItem, children: [
|
|
3955
|
+
/* @__PURE__ */ jsxs20("div", { className: fileMeta, children: [
|
|
3870
3956
|
/* @__PURE__ */ jsx30("div", { className: previewBox, children: file.previewUrl ? /* @__PURE__ */ jsx30(
|
|
3871
3957
|
"img",
|
|
3872
3958
|
{
|
|
@@ -3875,7 +3961,7 @@ function FileUpload({
|
|
|
3875
3961
|
className: previewImage
|
|
3876
3962
|
}
|
|
3877
3963
|
) : /* @__PURE__ */ jsx30("span", { className: previewFallback, children: previewLabel }) }),
|
|
3878
|
-
/* @__PURE__ */
|
|
3964
|
+
/* @__PURE__ */ jsxs20(Stack2, { gap: "2xs", flex: "1", minWidth: "none", children: [
|
|
3879
3965
|
/* @__PURE__ */ jsx30("span", { className: fileName, children: file.name }),
|
|
3880
3966
|
file.sizeLabel ? /* @__PURE__ */ jsx30("span", { className: fileSize, children: file.sizeLabel }) : null
|
|
3881
3967
|
] })
|
|
@@ -3909,7 +3995,7 @@ function FileUpload({
|
|
|
3909
3995
|
|
|
3910
3996
|
// src/components/Icon/Icon.tsx
|
|
3911
3997
|
import { forwardRef as forwardRef25 } from "react";
|
|
3912
|
-
import { jsx as jsx31, jsxs as
|
|
3998
|
+
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3913
3999
|
var Icon2 = forwardRef25(function Icon3({
|
|
3914
4000
|
title,
|
|
3915
4001
|
viewBox = "0 0 24 24",
|
|
@@ -3918,7 +4004,7 @@ var Icon2 = forwardRef25(function Icon3({
|
|
|
3918
4004
|
className,
|
|
3919
4005
|
...restProps
|
|
3920
4006
|
}, ref) {
|
|
3921
|
-
return /* @__PURE__ */
|
|
4007
|
+
return /* @__PURE__ */ jsxs21(
|
|
3922
4008
|
"svg",
|
|
3923
4009
|
{
|
|
3924
4010
|
ref,
|
|
@@ -4016,7 +4102,7 @@ function MinusIcon2(props) {
|
|
|
4016
4102
|
return /* @__PURE__ */ jsx31(Icon2, { viewBox: "0 0 12 12", ...props, children: /* @__PURE__ */ jsx31("path", { d: "M2.5 6H9.5", stroke: "currentColor", strokeLinecap: "round" }) });
|
|
4017
4103
|
}
|
|
4018
4104
|
function SearchIcon(props) {
|
|
4019
|
-
return /* @__PURE__ */
|
|
4105
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 12 12", ...props, children: [
|
|
4020
4106
|
/* @__PURE__ */ jsx31(
|
|
4021
4107
|
"path",
|
|
4022
4108
|
{
|
|
@@ -4045,7 +4131,7 @@ function CalendarIcon(props) {
|
|
|
4045
4131
|
) });
|
|
4046
4132
|
}
|
|
4047
4133
|
function ClockIcon(props) {
|
|
4048
|
-
return /* @__PURE__ */
|
|
4134
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 20 20", ...props, children: [
|
|
4049
4135
|
/* @__PURE__ */ jsx31(
|
|
4050
4136
|
"path",
|
|
4051
4137
|
{
|
|
@@ -4076,7 +4162,7 @@ function UploadCloudIcon2(props) {
|
|
|
4076
4162
|
) });
|
|
4077
4163
|
}
|
|
4078
4164
|
function MoreVerticalIcon(props) {
|
|
4079
|
-
return /* @__PURE__ */
|
|
4165
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 12 12", ...props, children: [
|
|
4080
4166
|
/* @__PURE__ */ jsx31(
|
|
4081
4167
|
"path",
|
|
4082
4168
|
{
|
|
@@ -4107,7 +4193,7 @@ function MoreVerticalIcon(props) {
|
|
|
4107
4193
|
] });
|
|
4108
4194
|
}
|
|
4109
4195
|
function MoreHorizontalIcon(props) {
|
|
4110
|
-
return /* @__PURE__ */
|
|
4196
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 12 12", ...props, children: [
|
|
4111
4197
|
/* @__PURE__ */ jsx31(
|
|
4112
4198
|
"path",
|
|
4113
4199
|
{
|
|
@@ -4160,7 +4246,7 @@ function ArrowRightIcon(props) {
|
|
|
4160
4246
|
) });
|
|
4161
4247
|
}
|
|
4162
4248
|
function InfoIcon2(props) {
|
|
4163
|
-
return /* @__PURE__ */
|
|
4249
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 20 20", ...props, children: [
|
|
4164
4250
|
/* @__PURE__ */ jsx31(
|
|
4165
4251
|
"path",
|
|
4166
4252
|
{
|
|
@@ -4181,7 +4267,7 @@ function InfoIcon2(props) {
|
|
|
4181
4267
|
] });
|
|
4182
4268
|
}
|
|
4183
4269
|
function AlertCircleIcon(props) {
|
|
4184
|
-
return /* @__PURE__ */
|
|
4270
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 20 20", ...props, children: [
|
|
4185
4271
|
/* @__PURE__ */ jsx31(
|
|
4186
4272
|
"path",
|
|
4187
4273
|
{
|
|
@@ -4202,7 +4288,7 @@ function AlertCircleIcon(props) {
|
|
|
4202
4288
|
] });
|
|
4203
4289
|
}
|
|
4204
4290
|
function CheckCircleIcon(props) {
|
|
4205
|
-
return /* @__PURE__ */
|
|
4291
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 20 20", ...props, children: [
|
|
4206
4292
|
/* @__PURE__ */ jsx31(
|
|
4207
4293
|
"path",
|
|
4208
4294
|
{
|
|
@@ -4246,7 +4332,7 @@ function EditIcon(props) {
|
|
|
4246
4332
|
) });
|
|
4247
4333
|
}
|
|
4248
4334
|
function CopyIcon(props) {
|
|
4249
|
-
return /* @__PURE__ */
|
|
4335
|
+
return /* @__PURE__ */ jsxs21(Icon2, { viewBox: "0 0 12 12", ...props, children: [
|
|
4250
4336
|
/* @__PURE__ */ jsx31(
|
|
4251
4337
|
"path",
|
|
4252
4338
|
{
|
|
@@ -4481,7 +4567,7 @@ var parseInputDate = (value) => {
|
|
|
4481
4567
|
};
|
|
4482
4568
|
|
|
4483
4569
|
// src/components/DatePicker/CalendarGrid.tsx
|
|
4484
|
-
import { Fragment, jsx as jsx34, jsxs as
|
|
4570
|
+
import { Fragment, jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4485
4571
|
var CALENDAR_ROWS = 5;
|
|
4486
4572
|
var CALENDAR_CELLS = CALENDAR_ROWS * 7;
|
|
4487
4573
|
var useCalendarDays = ({
|
|
@@ -4592,7 +4678,7 @@ var CalendarGrid = ({
|
|
|
4592
4678
|
if (day.isDisabled || day.isUnavailable) return;
|
|
4593
4679
|
onDateSelect?.(day.date);
|
|
4594
4680
|
};
|
|
4595
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ jsxs22(Fragment, { children: [
|
|
4596
4682
|
/* @__PURE__ */ jsx34(Box2, { className: calendarWeekdaysRow, children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx34(
|
|
4597
4683
|
Text2,
|
|
4598
4684
|
{
|
|
@@ -4663,7 +4749,7 @@ var CalendarGrid = ({
|
|
|
4663
4749
|
CalendarGrid.displayName = "CalendarGrid";
|
|
4664
4750
|
|
|
4665
4751
|
// src/components/DatePicker/Calendar.tsx
|
|
4666
|
-
import { jsx as jsx35, jsxs as
|
|
4752
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4667
4753
|
var Calendar = ({
|
|
4668
4754
|
month,
|
|
4669
4755
|
year,
|
|
@@ -4682,8 +4768,8 @@ var Calendar = ({
|
|
|
4682
4768
|
showOutsideDays = true,
|
|
4683
4769
|
className
|
|
4684
4770
|
}) => {
|
|
4685
|
-
return /* @__PURE__ */
|
|
4686
|
-
/* @__PURE__ */
|
|
4771
|
+
return /* @__PURE__ */ jsxs23(Box2, { className: cn(calendarContainer, className), children: [
|
|
4772
|
+
/* @__PURE__ */ jsxs23(Box2, { className: calendarHeader, children: [
|
|
4687
4773
|
/* @__PURE__ */ jsx35(
|
|
4688
4774
|
CalendarArrowButton,
|
|
4689
4775
|
{
|
|
@@ -4692,7 +4778,7 @@ var Calendar = ({
|
|
|
4692
4778
|
disabled: previousMonthDisabled
|
|
4693
4779
|
}
|
|
4694
4780
|
),
|
|
4695
|
-
/* @__PURE__ */
|
|
4781
|
+
/* @__PURE__ */ jsxs23(
|
|
4696
4782
|
Text2,
|
|
4697
4783
|
{
|
|
4698
4784
|
as: "span",
|
|
@@ -4765,7 +4851,7 @@ var timePickerHeader = "timePicker_timePickerHeader__1trbi7d1";
|
|
|
4765
4851
|
var timeScrollContainer = "timePicker_timeScrollContainer__1trbi7d5";
|
|
4766
4852
|
|
|
4767
4853
|
// src/components/TimePicker/TimePicker.tsx
|
|
4768
|
-
import { Fragment as Fragment2, jsx as jsx36, jsxs as
|
|
4854
|
+
import { Fragment as Fragment2, jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4769
4855
|
var DEFAULT_PRESETS = [
|
|
4770
4856
|
{ label: "Now", time: { hours: -1, minutes: -1 } },
|
|
4771
4857
|
// Special marker for "now"
|
|
@@ -4993,7 +5079,7 @@ var TimePicker = forwardRef26(
|
|
|
4993
5079
|
const renderTriggerElement = () => {
|
|
4994
5080
|
if (renderTrigger) return renderTrigger(displayValue || placeholder);
|
|
4995
5081
|
if (trigger) return trigger;
|
|
4996
|
-
return /* @__PURE__ */
|
|
5082
|
+
return /* @__PURE__ */ jsxs24(
|
|
4997
5083
|
Box2,
|
|
4998
5084
|
{
|
|
4999
5085
|
ref,
|
|
@@ -5013,15 +5099,15 @@ var TimePicker = forwardRef26(
|
|
|
5013
5099
|
);
|
|
5014
5100
|
};
|
|
5015
5101
|
const selectedDisplayHours = selectedTime ? getDisplayHours(selectedTime.hours) : null;
|
|
5016
|
-
return /* @__PURE__ */
|
|
5102
|
+
return /* @__PURE__ */ jsxs24(MenuRoot, { open, onOpenChange: setOpen, children: [
|
|
5017
5103
|
/* @__PURE__ */ jsx36(MenuTrigger, { disabled, children: renderTriggerElement() }),
|
|
5018
|
-
/* @__PURE__ */ jsx36(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */
|
|
5019
|
-
/* @__PURE__ */
|
|
5104
|
+
/* @__PURE__ */ jsx36(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */ jsxs24(Box2, { className: timePickerContainer, children: [
|
|
5105
|
+
/* @__PURE__ */ jsxs24(Box2, { className: timePickerHeader, children: [
|
|
5020
5106
|
/* @__PURE__ */ jsx36(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: "Select Time" }),
|
|
5021
5107
|
selectedTime && /* @__PURE__ */ jsx36(Text2, { fontVariant: "text-s-regular", color: "contentBrand", children: displayValue })
|
|
5022
5108
|
] }),
|
|
5023
|
-
/* @__PURE__ */
|
|
5024
|
-
/* @__PURE__ */
|
|
5109
|
+
/* @__PURE__ */ jsxs24(Inline2, { gap: "xs", alignItems: "center", children: [
|
|
5110
|
+
/* @__PURE__ */ jsxs24(Box2, { className: timeColumn, children: [
|
|
5025
5111
|
/* @__PURE__ */ jsx36("span", { className: columnLabel, children: "Hour" }),
|
|
5026
5112
|
/* @__PURE__ */ jsx36(Box2, { ref: hoursRef, className: timeScrollContainer, children: hoursArray.map((hour) => {
|
|
5027
5113
|
const isSelected = selectedDisplayHours === hour;
|
|
@@ -5050,7 +5136,7 @@ var TimePicker = forwardRef26(
|
|
|
5050
5136
|
}) })
|
|
5051
5137
|
] }),
|
|
5052
5138
|
/* @__PURE__ */ jsx36("span", { className: columnSeparator, children: ":" }),
|
|
5053
|
-
/* @__PURE__ */
|
|
5139
|
+
/* @__PURE__ */ jsxs24(Box2, { className: timeColumn, children: [
|
|
5054
5140
|
/* @__PURE__ */ jsx36("span", { className: columnLabel, children: "Min" }),
|
|
5055
5141
|
/* @__PURE__ */ jsx36(Box2, { ref: minutesRef, className: timeScrollContainer, children: minutesArray.map((minute) => {
|
|
5056
5142
|
const isSelected = selectedTime?.minutes === minute;
|
|
@@ -5080,9 +5166,9 @@ var TimePicker = forwardRef26(
|
|
|
5080
5166
|
);
|
|
5081
5167
|
}) })
|
|
5082
5168
|
] }),
|
|
5083
|
-
showSeconds && /* @__PURE__ */
|
|
5169
|
+
showSeconds && /* @__PURE__ */ jsxs24(Fragment2, { children: [
|
|
5084
5170
|
/* @__PURE__ */ jsx36("span", { className: columnSeparator, children: ":" }),
|
|
5085
|
-
/* @__PURE__ */
|
|
5171
|
+
/* @__PURE__ */ jsxs24(Box2, { className: timeColumn, children: [
|
|
5086
5172
|
/* @__PURE__ */ jsx36("span", { className: columnLabel, children: "Sec" }),
|
|
5087
5173
|
/* @__PURE__ */ jsx36(
|
|
5088
5174
|
Box2,
|
|
@@ -5110,9 +5196,9 @@ var TimePicker = forwardRef26(
|
|
|
5110
5196
|
)
|
|
5111
5197
|
] })
|
|
5112
5198
|
] }),
|
|
5113
|
-
format === "12h" && /* @__PURE__ */
|
|
5199
|
+
format === "12h" && /* @__PURE__ */ jsxs24(Box2, { className: periodColumn, children: [
|
|
5114
5200
|
/* @__PURE__ */ jsx36("span", { className: periodLabel, children: "Period" }),
|
|
5115
|
-
/* @__PURE__ */
|
|
5201
|
+
/* @__PURE__ */ jsxs24(Stack2, { gap: "xs", children: [
|
|
5116
5202
|
/* @__PURE__ */ jsx36(
|
|
5117
5203
|
"button",
|
|
5118
5204
|
{
|
|
@@ -5150,7 +5236,7 @@ var TimePicker = forwardRef26(
|
|
|
5150
5236
|
},
|
|
5151
5237
|
index
|
|
5152
5238
|
)) }),
|
|
5153
|
-
/* @__PURE__ */
|
|
5239
|
+
/* @__PURE__ */ jsxs24(Box2, { className: timePickerFooter, children: [
|
|
5154
5240
|
/* @__PURE__ */ jsx36(
|
|
5155
5241
|
Button,
|
|
5156
5242
|
{
|
|
@@ -5185,7 +5271,7 @@ var segmentText = "dateTimeInput_segmentText__183d6eha";
|
|
|
5185
5271
|
var singleInputSegment = "dateTimeInput_singleInputSegment__183d6ehe";
|
|
5186
5272
|
|
|
5187
5273
|
// src/components/DateTimeInput/DateTimeInput.tsx
|
|
5188
|
-
import { Fragment as Fragment3, jsx as jsx37, jsxs as
|
|
5274
|
+
import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5189
5275
|
var padZero2 = (num) => num.toString().padStart(2, "0");
|
|
5190
5276
|
var formatTimeDisplay = (time, format, showSeconds) => {
|
|
5191
5277
|
if (!time) return "";
|
|
@@ -5315,7 +5401,7 @@ var DateTimeInput = forwardRef27(
|
|
|
5315
5401
|
return formatTimeDisplay(selectedTime, timeFormat, showSeconds);
|
|
5316
5402
|
}, [selectedTime, timeFormat, showSeconds]);
|
|
5317
5403
|
const hasValue = mode === "date" && selectedDate || mode === "time" && selectedTime || mode === "datetime" && (selectedDate || selectedTime);
|
|
5318
|
-
const labelElement = label && /* @__PURE__ */
|
|
5404
|
+
const labelElement = label && /* @__PURE__ */ jsxs25(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
5319
5405
|
/* @__PURE__ */ jsx37(
|
|
5320
5406
|
Text2,
|
|
5321
5407
|
{
|
|
@@ -5328,8 +5414,8 @@ var DateTimeInput = forwardRef27(
|
|
|
5328
5414
|
),
|
|
5329
5415
|
mandatory && /* @__PURE__ */ jsx37(Text2, { fontVariant: "text-m-regular", color: "contentTertiary", as: "span", children: "*" })
|
|
5330
5416
|
] });
|
|
5331
|
-
const renderDateSegment = (withSeparator = false) => /* @__PURE__ */
|
|
5332
|
-
/* @__PURE__ */ jsx37(MenuTrigger, { disabled, children: /* @__PURE__ */
|
|
5417
|
+
const renderDateSegment = (withSeparator = false) => /* @__PURE__ */ jsxs25(MenuRoot, { open: dateOpen, onOpenChange: setDateOpen, children: [
|
|
5418
|
+
/* @__PURE__ */ jsx37(MenuTrigger, { disabled, children: /* @__PURE__ */ jsxs25(
|
|
5333
5419
|
Box2,
|
|
5334
5420
|
{
|
|
5335
5421
|
className: withSeparator ? dateTimeSegmentWithSeparator : singleInputSegment,
|
|
@@ -5343,7 +5429,7 @@ var DateTimeInput = forwardRef27(
|
|
|
5343
5429
|
]
|
|
5344
5430
|
}
|
|
5345
5431
|
) }),
|
|
5346
|
-
/* @__PURE__ */ jsx37(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */
|
|
5432
|
+
/* @__PURE__ */ jsx37(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */ jsxs25(Stack2, { padding: "md", gap: "md", children: [
|
|
5347
5433
|
/* @__PURE__ */ jsx37(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: "Select Date" }),
|
|
5348
5434
|
/* @__PURE__ */ jsx37(
|
|
5349
5435
|
Calendar,
|
|
@@ -5361,8 +5447,8 @@ var DateTimeInput = forwardRef27(
|
|
|
5361
5447
|
)
|
|
5362
5448
|
] }) })
|
|
5363
5449
|
] });
|
|
5364
|
-
const renderTimeSegment = () => /* @__PURE__ */
|
|
5365
|
-
/* @__PURE__ */ jsx37(MenuTrigger, { disabled, children: /* @__PURE__ */
|
|
5450
|
+
const renderTimeSegment = () => /* @__PURE__ */ jsxs25(MenuRoot, { open: timeOpen, onOpenChange: setTimeOpen, children: [
|
|
5451
|
+
/* @__PURE__ */ jsx37(MenuTrigger, { disabled, children: /* @__PURE__ */ jsxs25(
|
|
5366
5452
|
Box2,
|
|
5367
5453
|
{
|
|
5368
5454
|
className: singleInputSegment,
|
|
@@ -5390,8 +5476,8 @@ var DateTimeInput = forwardRef27(
|
|
|
5390
5476
|
}
|
|
5391
5477
|
) })
|
|
5392
5478
|
] });
|
|
5393
|
-
const inputElement2 = /* @__PURE__ */
|
|
5394
|
-
/* @__PURE__ */
|
|
5479
|
+
const inputElement2 = /* @__PURE__ */ jsxs25(Box2, { className: inputWrapper2, children: [
|
|
5480
|
+
/* @__PURE__ */ jsxs25(
|
|
5395
5481
|
Box2,
|
|
5396
5482
|
{
|
|
5397
5483
|
ref,
|
|
@@ -5402,7 +5488,7 @@ var DateTimeInput = forwardRef27(
|
|
|
5402
5488
|
children: [
|
|
5403
5489
|
mode === "date" && renderDateSegment(false),
|
|
5404
5490
|
mode === "time" && renderTimeSegment(),
|
|
5405
|
-
mode === "datetime" && /* @__PURE__ */
|
|
5491
|
+
mode === "datetime" && /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
5406
5492
|
renderDateSegment(true),
|
|
5407
5493
|
renderTimeSegment()
|
|
5408
5494
|
] }),
|
|
@@ -5430,7 +5516,7 @@ var DateTimeInput = forwardRef27(
|
|
|
5430
5516
|
}
|
|
5431
5517
|
)
|
|
5432
5518
|
] });
|
|
5433
|
-
return /* @__PURE__ */
|
|
5519
|
+
return /* @__PURE__ */ jsxs25(
|
|
5434
5520
|
Box2,
|
|
5435
5521
|
{
|
|
5436
5522
|
className: dateTimeInputContainer({
|
|
@@ -5513,10 +5599,10 @@ var TimePickerContent = ({
|
|
|
5513
5599
|
}
|
|
5514
5600
|
};
|
|
5515
5601
|
const selectedDisplayHours = selectedTime ? getDisplayHours(selectedTime.hours) : null;
|
|
5516
|
-
return /* @__PURE__ */
|
|
5602
|
+
return /* @__PURE__ */ jsxs25(Box2, { className: timePickerContainer, children: [
|
|
5517
5603
|
/* @__PURE__ */ jsx37(Box2, { className: timePickerHeader, children: /* @__PURE__ */ jsx37(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: "Select Time" }) }),
|
|
5518
|
-
/* @__PURE__ */
|
|
5519
|
-
/* @__PURE__ */
|
|
5604
|
+
/* @__PURE__ */ jsxs25(Inline2, { gap: "xs", alignItems: "start", children: [
|
|
5605
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timeColumn, children: [
|
|
5520
5606
|
/* @__PURE__ */ jsx37("span", { className: columnLabel, children: "Hour" }),
|
|
5521
5607
|
/* @__PURE__ */ jsx37(Box2, { className: timeScrollContainer, children: hoursArray.map((hour) => /* @__PURE__ */ jsx37(
|
|
5522
5608
|
"button",
|
|
@@ -5533,7 +5619,7 @@ var TimePickerContent = ({
|
|
|
5533
5619
|
)) })
|
|
5534
5620
|
] }),
|
|
5535
5621
|
/* @__PURE__ */ jsx37("span", { className: columnSeparator, children: ":" }),
|
|
5536
|
-
/* @__PURE__ */
|
|
5622
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timeColumn, children: [
|
|
5537
5623
|
/* @__PURE__ */ jsx37("span", { className: columnLabel, children: "Min" }),
|
|
5538
5624
|
/* @__PURE__ */ jsx37(Box2, { className: timeScrollContainer, children: minutesArray.map((minute) => /* @__PURE__ */ jsx37(
|
|
5539
5625
|
"button",
|
|
@@ -5549,9 +5635,9 @@ var TimePickerContent = ({
|
|
|
5549
5635
|
minute
|
|
5550
5636
|
)) })
|
|
5551
5637
|
] }),
|
|
5552
|
-
showSeconds && /* @__PURE__ */
|
|
5638
|
+
showSeconds && /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
5553
5639
|
/* @__PURE__ */ jsx37("span", { className: columnSeparator, children: ":" }),
|
|
5554
|
-
/* @__PURE__ */
|
|
5640
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timeColumn, children: [
|
|
5555
5641
|
/* @__PURE__ */ jsx37("span", { className: columnLabel, children: "Sec" }),
|
|
5556
5642
|
/* @__PURE__ */ jsx37(Box2, { className: timeScrollContainer, children: secondsArray.map((second) => /* @__PURE__ */ jsx37(
|
|
5557
5643
|
"button",
|
|
@@ -5568,9 +5654,9 @@ var TimePickerContent = ({
|
|
|
5568
5654
|
)) })
|
|
5569
5655
|
] })
|
|
5570
5656
|
] }),
|
|
5571
|
-
format === "12h" && /* @__PURE__ */
|
|
5657
|
+
format === "12h" && /* @__PURE__ */ jsxs25(Box2, { className: periodColumn, children: [
|
|
5572
5658
|
/* @__PURE__ */ jsx37("span", { className: periodLabel, children: "Period" }),
|
|
5573
|
-
/* @__PURE__ */
|
|
5659
|
+
/* @__PURE__ */ jsxs25(Stack2, { gap: "xs", children: [
|
|
5574
5660
|
/* @__PURE__ */ jsx37(
|
|
5575
5661
|
"button",
|
|
5576
5662
|
{
|
|
@@ -5592,7 +5678,7 @@ var TimePickerContent = ({
|
|
|
5592
5678
|
] })
|
|
5593
5679
|
] })
|
|
5594
5680
|
] }),
|
|
5595
|
-
/* @__PURE__ */
|
|
5681
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timePickerFooter, children: [
|
|
5596
5682
|
/* @__PURE__ */ jsx37(Button, { variant: "ghost", destructive: true, size: "md", onClick: onClear, children: "Cancel" }),
|
|
5597
5683
|
/* @__PURE__ */ jsx37(Button, { size: "md", onClick: () => onApply(selectedTime), disabled: !selectedTime, children: "Apply" })
|
|
5598
5684
|
] })
|