@zentrades-ui/components 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.css +60 -190
- package/dist/components.css.map +1 -1
- package/dist/components.d.ts +60 -9
- package/dist/components.js +938 -652
- package/dist/components.js.map +1 -1
- package/dist/index.css +60 -190
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +60 -9
- package/dist/index.js +938 -652
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -520,7 +520,7 @@ var TextComponent = forwardRef5(function Text(props, ref) {
|
|
|
520
520
|
...restProps
|
|
521
521
|
} = props;
|
|
522
522
|
const Element = as || DefaultTextElement;
|
|
523
|
-
const
|
|
523
|
+
const variantStyles2 = applyTextVariantStyles(fontVariant);
|
|
524
524
|
const defaultElementReset = { margin: 0, padding: 0 };
|
|
525
525
|
const truncationStyles = {};
|
|
526
526
|
if (truncate) {
|
|
@@ -553,7 +553,7 @@ var TextComponent = forwardRef5(function Text(props, ref) {
|
|
|
553
553
|
className,
|
|
554
554
|
style: {
|
|
555
555
|
...defaultElementReset,
|
|
556
|
-
...
|
|
556
|
+
...variantStyles2,
|
|
557
557
|
...truncationStyles,
|
|
558
558
|
...style
|
|
559
559
|
},
|
|
@@ -623,7 +623,8 @@ var HeadingComponent = forwardRef5(function Heading(props, ref) {
|
|
|
623
623
|
...restProps
|
|
624
624
|
} = props;
|
|
625
625
|
const Element = as || (level ? `h${level}` : DefaultHeadingElement);
|
|
626
|
-
const
|
|
626
|
+
const variantStyles2 = applyHeadingVariantStyles(fontVariant);
|
|
627
|
+
const defaultElementReset = { margin: 0, padding: 0 };
|
|
627
628
|
const truncationStyles = {};
|
|
628
629
|
if (truncate) {
|
|
629
630
|
truncationStyles.overflow = "hidden";
|
|
@@ -670,7 +671,8 @@ var HeadingComponent = forwardRef5(function Heading(props, ref) {
|
|
|
670
671
|
marginY,
|
|
671
672
|
className,
|
|
672
673
|
style: {
|
|
673
|
-
...
|
|
674
|
+
...defaultElementReset,
|
|
675
|
+
...variantStyles2,
|
|
674
676
|
...truncationStyles,
|
|
675
677
|
...style
|
|
676
678
|
},
|
|
@@ -892,8 +894,8 @@ import React2, { forwardRef as forwardRef7 } from "react";
|
|
|
892
894
|
|
|
893
895
|
// src/components/Badge/badge.css.ts
|
|
894
896
|
import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
895
|
-
var badgeVariants = _7a4682({ defaultClassName: "badge__1o0zxcn1 badge_baseBadge__1o0zxcn0", variantClassNames: { variant: { primary: "badge_badgeVariants_variant_primary__1o0zxcn2", secondary: "badge_badgeVariants_variant_secondary__1o0zxcn3", outline: "badge_badgeVariants_variant_outline__1o0zxcn4", info: "badge_badgeVariants_variant_info__1o0zxcn5", success: "badge_badgeVariants_variant_success__1o0zxcn6", warning: "badge_badgeVariants_variant_warning__1o0zxcn7", error: "badge_badgeVariants_variant_error__1o0zxcn8" }, hasIconLeft: { true: "
|
|
896
|
-
var iconWrapper2 = "
|
|
897
|
+
var badgeVariants = _7a4682({ defaultClassName: "badge__1o0zxcn1 badge_baseBadge__1o0zxcn0", variantClassNames: { variant: { primary: "badge_badgeVariants_variant_primary__1o0zxcn2", secondary: "badge_badgeVariants_variant_secondary__1o0zxcn3", outline: "badge_badgeVariants_variant_outline__1o0zxcn4", info: "badge_badgeVariants_variant_info__1o0zxcn5", success: "badge_badgeVariants_variant_success__1o0zxcn6", warning: "badge_badgeVariants_variant_warning__1o0zxcn7", error: "badge_badgeVariants_variant_error__1o0zxcn8" }, size: { "default": "badge_badgeVariants_size_default__1o0zxcn9", medium: "badge_badgeVariants_size_medium__1o0zxcna" }, hasIconLeft: { true: "badge_badgeVariants_hasIconLeft_true__1o0zxcnb", false: "badge_badgeVariants_hasIconLeft_false__1o0zxcnc" }, hasIconRight: { true: "badge_badgeVariants_hasIconRight_true__1o0zxcnd", false: "badge_badgeVariants_hasIconRight_false__1o0zxcne" } }, defaultVariants: { variant: "primary", size: "default", hasIconLeft: false, hasIconRight: false }, compoundVariants: [] });
|
|
898
|
+
var iconWrapper2 = "badge_iconWrapper__1o0zxcnf";
|
|
897
899
|
|
|
898
900
|
// src/components/Badge/Badge.tsx
|
|
899
901
|
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -901,6 +903,7 @@ var Badge = forwardRef7(
|
|
|
901
903
|
({
|
|
902
904
|
children,
|
|
903
905
|
variant = "primary",
|
|
906
|
+
size = "default",
|
|
904
907
|
icon,
|
|
905
908
|
iconPosition = "left",
|
|
906
909
|
className,
|
|
@@ -912,6 +915,7 @@ var Badge = forwardRef7(
|
|
|
912
915
|
const hasIconRight = hasIcon && iconPosition === "right";
|
|
913
916
|
const badgeClasses = badgeVariants({
|
|
914
917
|
variant,
|
|
918
|
+
size,
|
|
915
919
|
hasIconLeft,
|
|
916
920
|
hasIconRight
|
|
917
921
|
});
|
|
@@ -934,6 +938,50 @@ var Badge = forwardRef7(
|
|
|
934
938
|
);
|
|
935
939
|
Badge.displayName = "Badge";
|
|
936
940
|
|
|
941
|
+
// src/components/Badge/BadgeNumber.tsx
|
|
942
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
943
|
+
var VARIANT_STYLES = {
|
|
944
|
+
primary: { bgColor: "backgroundInverse", color: "contentPrimaryInverse" },
|
|
945
|
+
secondary: { bgColor: "backgroundHover", color: "contentPrimary" },
|
|
946
|
+
outline: { bgColor: "transparent", color: "contentPrimary", border: true }
|
|
947
|
+
};
|
|
948
|
+
var BadgeNumber = ({
|
|
949
|
+
value,
|
|
950
|
+
variant = "primary",
|
|
951
|
+
round = "circle",
|
|
952
|
+
max,
|
|
953
|
+
showPlus = true,
|
|
954
|
+
className
|
|
955
|
+
}) => {
|
|
956
|
+
const styles = VARIANT_STYLES[variant];
|
|
957
|
+
const isCircle = round === "circle";
|
|
958
|
+
const numericValue = typeof value === "number" ? value : Number.isFinite(Number(value)) ? Number(value) : null;
|
|
959
|
+
const isCapped = max !== void 0 && numericValue !== null && numericValue > max;
|
|
960
|
+
const displayValue = isCapped && max !== void 0 ? `${max}${showPlus ? "+" : ""}` : numericValue !== null ? String(numericValue) : String(value);
|
|
961
|
+
return /* @__PURE__ */ jsx8(
|
|
962
|
+
Box2,
|
|
963
|
+
{
|
|
964
|
+
display: "flex",
|
|
965
|
+
alignItems: "center",
|
|
966
|
+
justifyContent: "center",
|
|
967
|
+
rounded: isCircle ? "circle" : "sm",
|
|
968
|
+
bgColor: styles.bgColor,
|
|
969
|
+
borderWidth: styles.border ? "s" : "none",
|
|
970
|
+
borderStyle: styles.border ? "solid" : "none",
|
|
971
|
+
borderColor: styles.border ? "borderTertiary" : void 0,
|
|
972
|
+
className,
|
|
973
|
+
style: {
|
|
974
|
+
minWidth: 20,
|
|
975
|
+
minHeight: 20,
|
|
976
|
+
width: 20,
|
|
977
|
+
height: 20
|
|
978
|
+
},
|
|
979
|
+
children: /* @__PURE__ */ jsx8(Text2, { fontVariant: "text-s-regular", color: styles.color, textAlign: "center", children: displayValue })
|
|
980
|
+
}
|
|
981
|
+
);
|
|
982
|
+
};
|
|
983
|
+
BadgeNumber.displayName = "BadgeNumber";
|
|
984
|
+
|
|
937
985
|
// src/components/Input/Input.tsx
|
|
938
986
|
import React3, {
|
|
939
987
|
forwardRef as forwardRef8
|
|
@@ -951,7 +999,7 @@ var inputWrapper = "input_inputWrapper__gw6uv63";
|
|
|
951
999
|
var simpleInputContent = "input_simpleInputContent__gw6uv6d";
|
|
952
1000
|
|
|
953
1001
|
// src/components/Input/Input.tsx
|
|
954
|
-
import { jsx as
|
|
1002
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
955
1003
|
var isNativeInputElement = (node) => React3.isValidElement(node) && typeof node.type === "string" && node.type.toLowerCase() === "input";
|
|
956
1004
|
var Input = forwardRef8(function Input2(props, ref) {
|
|
957
1005
|
const {
|
|
@@ -972,6 +1020,7 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
972
1020
|
id,
|
|
973
1021
|
invalid,
|
|
974
1022
|
noOutline = false,
|
|
1023
|
+
viewOnly = false,
|
|
975
1024
|
...inputProps
|
|
976
1025
|
} = props;
|
|
977
1026
|
const isRequired = required || mandatory || false;
|
|
@@ -979,6 +1028,7 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
979
1028
|
const helperTextId = `${inputId}-helper`;
|
|
980
1029
|
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
981
1030
|
const isCompound = leadingSection || trailingSection;
|
|
1031
|
+
const isViewOnly = viewOnly || inputProps.readOnly;
|
|
982
1032
|
const enhanceSection = (section2) => {
|
|
983
1033
|
if (!section2) {
|
|
984
1034
|
return { element: null, isInput: false };
|
|
@@ -1002,17 +1052,27 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1002
1052
|
const leadingSectionMeta = enhanceSection(leadingSection);
|
|
1003
1053
|
const trailingSectionMeta = enhanceSection(trailingSection);
|
|
1004
1054
|
const labelElement = label && /* @__PURE__ */ jsxs3(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
1005
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ jsx9(
|
|
1006
1056
|
Text2,
|
|
1007
1057
|
{
|
|
1008
1058
|
as: "label",
|
|
1009
1059
|
fontVariant: "text-m-regular",
|
|
1010
1060
|
color: "contentTertiary",
|
|
1011
1061
|
htmlFor: inputId,
|
|
1062
|
+
style: { lineHeight: "var(--lineHeight-xs)" },
|
|
1012
1063
|
children: label
|
|
1013
1064
|
}
|
|
1014
1065
|
),
|
|
1015
|
-
isRequired && /* @__PURE__ */
|
|
1066
|
+
isRequired && /* @__PURE__ */ jsx9(
|
|
1067
|
+
Text2,
|
|
1068
|
+
{
|
|
1069
|
+
fontVariant: "text-m-regular",
|
|
1070
|
+
color: "contentTertiary",
|
|
1071
|
+
as: "span",
|
|
1072
|
+
style: { lineHeight: "var(--lineHeight-xs)" },
|
|
1073
|
+
children: "*"
|
|
1074
|
+
}
|
|
1075
|
+
)
|
|
1016
1076
|
] });
|
|
1017
1077
|
const inputElement2 = /* @__PURE__ */ jsxs3(Box2, { className: inputWrapper, children: [
|
|
1018
1078
|
/* @__PURE__ */ jsxs3(
|
|
@@ -1020,10 +1080,16 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1020
1080
|
{
|
|
1021
1081
|
className: inputField({
|
|
1022
1082
|
state: disabled ? "disabled" : error ? "error" : "default",
|
|
1023
|
-
outline: noOutline ? "none" : "default"
|
|
1083
|
+
outline: noOutline || isViewOnly ? "none" : "default"
|
|
1024
1084
|
}),
|
|
1085
|
+
style: isViewOnly ? {
|
|
1086
|
+
backgroundColor: "var(--backgroundSecondary)",
|
|
1087
|
+
borderWidth: 0,
|
|
1088
|
+
borderColor: "transparent",
|
|
1089
|
+
boxShadow: "none"
|
|
1090
|
+
} : void 0,
|
|
1025
1091
|
children: [
|
|
1026
|
-
leadingSectionMeta.element && /* @__PURE__ */
|
|
1092
|
+
leadingSectionMeta.element && /* @__PURE__ */ jsx9(
|
|
1027
1093
|
Inline2,
|
|
1028
1094
|
{
|
|
1029
1095
|
alignItems: "center",
|
|
@@ -1050,24 +1116,25 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1050
1116
|
{
|
|
1051
1117
|
className: isCompound ? inputContent : simpleInputContent,
|
|
1052
1118
|
children: [
|
|
1053
|
-
!isCompound && leftIcon && /* @__PURE__ */
|
|
1054
|
-
/* @__PURE__ */
|
|
1119
|
+
!isCompound && leftIcon && /* @__PURE__ */ jsx9(Box2, { className: iconContainer, children: leftIcon }),
|
|
1120
|
+
/* @__PURE__ */ jsx9(
|
|
1055
1121
|
"input",
|
|
1056
1122
|
{
|
|
1057
1123
|
ref,
|
|
1058
1124
|
id: inputId,
|
|
1059
1125
|
className: inputElement,
|
|
1060
1126
|
disabled,
|
|
1127
|
+
readOnly: isViewOnly || inputProps.readOnly,
|
|
1061
1128
|
"aria-invalid": invalid || error,
|
|
1062
1129
|
"aria-describedby": displayHelperText ? helperTextId : void 0,
|
|
1063
1130
|
...inputProps
|
|
1064
1131
|
}
|
|
1065
1132
|
),
|
|
1066
|
-
icon && /* @__PURE__ */
|
|
1133
|
+
icon && /* @__PURE__ */ jsx9(Box2, { className: iconContainer, children: icon })
|
|
1067
1134
|
]
|
|
1068
1135
|
}
|
|
1069
1136
|
),
|
|
1070
|
-
trailingSectionMeta.element && /* @__PURE__ */
|
|
1137
|
+
trailingSectionMeta.element && /* @__PURE__ */ jsx9(
|
|
1071
1138
|
Inline2,
|
|
1072
1139
|
{
|
|
1073
1140
|
alignItems: "center",
|
|
@@ -1093,13 +1160,13 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1093
1160
|
]
|
|
1094
1161
|
}
|
|
1095
1162
|
),
|
|
1096
|
-
displayHelperText && /* @__PURE__ */
|
|
1163
|
+
displayHelperText && /* @__PURE__ */ jsx9(
|
|
1097
1164
|
Text2,
|
|
1098
1165
|
{
|
|
1099
1166
|
id: helperTextId,
|
|
1100
1167
|
fontVariant: "text-s-regular",
|
|
1101
1168
|
role: error ? "alert" : void 0,
|
|
1102
|
-
color:
|
|
1169
|
+
color: "contentQuaternary",
|
|
1103
1170
|
children: displayHelperText
|
|
1104
1171
|
}
|
|
1105
1172
|
)
|
|
@@ -1129,7 +1196,7 @@ var checkboxRoot = "checkbox_checkboxRoot__1dtlqzp0";
|
|
|
1129
1196
|
|
|
1130
1197
|
// src/components/Checkbox/Checkbox.tsx
|
|
1131
1198
|
import { CheckIcon, MinusIcon } from "@zentrades-ui/icons";
|
|
1132
|
-
import { jsx as
|
|
1199
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1133
1200
|
var sizePxMap = {
|
|
1134
1201
|
xs: 12,
|
|
1135
1202
|
sm: 16,
|
|
@@ -1151,6 +1218,7 @@ var Checkbox = React4.forwardRef(
|
|
|
1151
1218
|
helperText,
|
|
1152
1219
|
disabled,
|
|
1153
1220
|
checked,
|
|
1221
|
+
onCheckedChange,
|
|
1154
1222
|
partialChecked,
|
|
1155
1223
|
size = "md",
|
|
1156
1224
|
required,
|
|
@@ -1158,6 +1226,15 @@ var Checkbox = React4.forwardRef(
|
|
|
1158
1226
|
errorMessage,
|
|
1159
1227
|
...props
|
|
1160
1228
|
}, forwardedRef) => {
|
|
1229
|
+
const checkboxRef = React4.useRef(null);
|
|
1230
|
+
const setCheckboxRef = (node) => {
|
|
1231
|
+
checkboxRef.current = node;
|
|
1232
|
+
if (typeof forwardedRef === "function") {
|
|
1233
|
+
forwardedRef(node);
|
|
1234
|
+
} else if (forwardedRef) {
|
|
1235
|
+
forwardedRef.current = node;
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1161
1238
|
const boxSize = sizePxMap[size];
|
|
1162
1239
|
const checkboxId = props.id || `checkbox-${React4.useId()}`;
|
|
1163
1240
|
const displayHelperText = error && errorMessage ? errorMessage : helperText || description;
|
|
@@ -1175,10 +1252,10 @@ var Checkbox = React4.forwardRef(
|
|
|
1175
1252
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
1176
1253
|
padding: 0
|
|
1177
1254
|
};
|
|
1178
|
-
const checkbox = /* @__PURE__ */
|
|
1255
|
+
const checkbox = /* @__PURE__ */ jsx10(
|
|
1179
1256
|
CheckboxPrimitive.Root,
|
|
1180
1257
|
{
|
|
1181
|
-
ref:
|
|
1258
|
+
ref: setCheckboxRef,
|
|
1182
1259
|
id: checkboxId,
|
|
1183
1260
|
style: checkboxStyles,
|
|
1184
1261
|
className: cn(checkboxRoot, className),
|
|
@@ -1187,12 +1264,12 @@ var Checkbox = React4.forwardRef(
|
|
|
1187
1264
|
required,
|
|
1188
1265
|
"aria-invalid": error || void 0,
|
|
1189
1266
|
...props,
|
|
1190
|
-
children: /* @__PURE__ */
|
|
1267
|
+
children: /* @__PURE__ */ jsx10(
|
|
1191
1268
|
CheckboxPrimitive.Indicator,
|
|
1192
1269
|
{
|
|
1193
1270
|
className: checkboxIndicator,
|
|
1194
1271
|
style: { maxHeight: boxSize },
|
|
1195
|
-
children: partialChecked ? /* @__PURE__ */
|
|
1272
|
+
children: partialChecked ? /* @__PURE__ */ jsx10(MinusIcon, { size: iconSizeMap2[size], strokeWidth: 1.5 }) : /* @__PURE__ */ jsx10(CheckIcon, { size: iconSizeMap2[size], strokeWidth: 1.5 })
|
|
1196
1273
|
}
|
|
1197
1274
|
)
|
|
1198
1275
|
}
|
|
@@ -1201,55 +1278,54 @@ var Checkbox = React4.forwardRef(
|
|
|
1201
1278
|
return /* @__PURE__ */ jsxs4(
|
|
1202
1279
|
Stack2,
|
|
1203
1280
|
{
|
|
1204
|
-
gap: "
|
|
1281
|
+
gap: "xs",
|
|
1205
1282
|
style: {
|
|
1206
1283
|
opacity: disabled ? 0.5 : 1
|
|
1207
1284
|
},
|
|
1208
1285
|
children: [
|
|
1209
|
-
/* @__PURE__ */ jsxs4(
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}
|
|
1226
|
-
},
|
|
1227
|
-
children: [
|
|
1228
|
-
/* @__PURE__ */ jsx9(
|
|
1229
|
-
Text2,
|
|
1230
|
-
{
|
|
1231
|
-
as: "label",
|
|
1232
|
-
fontVariant: "text-s-medium",
|
|
1233
|
-
htmlFor: checkboxId,
|
|
1234
|
-
children: label
|
|
1235
|
-
}
|
|
1236
|
-
),
|
|
1237
|
-
required && /* @__PURE__ */ jsx9(
|
|
1238
|
-
Text2,
|
|
1239
|
-
{
|
|
1240
|
-
as: "span",
|
|
1241
|
-
color: "contentTertiary",
|
|
1242
|
-
fontVariant: "text-s-medium",
|
|
1243
|
-
children: "*"
|
|
1244
|
-
}
|
|
1245
|
-
)
|
|
1246
|
-
]
|
|
1286
|
+
/* @__PURE__ */ jsxs4(Inline2, { gap: "sm", alignItems: "center", children: [
|
|
1287
|
+
checkbox,
|
|
1288
|
+
label && /* @__PURE__ */ jsxs4(
|
|
1289
|
+
Inline2,
|
|
1290
|
+
{
|
|
1291
|
+
gap: "2xs",
|
|
1292
|
+
alignItems: "center",
|
|
1293
|
+
onClick: () => {
|
|
1294
|
+
if (!disabled) {
|
|
1295
|
+
if (onCheckedChange && checked !== void 0) {
|
|
1296
|
+
const isIndeterminate = partialChecked || checked === "indeterminate";
|
|
1297
|
+
const nextChecked = isIndeterminate ? true : !checked;
|
|
1298
|
+
onCheckedChange(nextChecked);
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
checkboxRef.current?.click();
|
|
1247
1302
|
}
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1303
|
+
},
|
|
1304
|
+
children: [
|
|
1305
|
+
/* @__PURE__ */ jsx10(
|
|
1306
|
+
Text2,
|
|
1307
|
+
{
|
|
1308
|
+
as: "label",
|
|
1309
|
+
fontVariant: "text-s-medium",
|
|
1310
|
+
htmlFor: checkboxId,
|
|
1311
|
+
style: { cursor: disabled ? "not-allowed" : "pointer" },
|
|
1312
|
+
children: label
|
|
1313
|
+
}
|
|
1314
|
+
),
|
|
1315
|
+
required && /* @__PURE__ */ jsx10(
|
|
1316
|
+
Text2,
|
|
1317
|
+
{
|
|
1318
|
+
as: "span",
|
|
1319
|
+
color: "contentTertiary",
|
|
1320
|
+
fontVariant: "text-s-medium",
|
|
1321
|
+
children: "*"
|
|
1322
|
+
}
|
|
1323
|
+
)
|
|
1324
|
+
]
|
|
1325
|
+
}
|
|
1326
|
+
)
|
|
1327
|
+
] }),
|
|
1328
|
+
displayHelperText && /* @__PURE__ */ jsx10(
|
|
1253
1329
|
Text2,
|
|
1254
1330
|
{
|
|
1255
1331
|
fontVariant: "text-s-regular",
|
|
@@ -1278,7 +1354,7 @@ var switchRoot = _7a4684({ defaultClassName: "switch__1q0tj351 switch_baseSwitch
|
|
|
1278
1354
|
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: [] });
|
|
1279
1355
|
|
|
1280
1356
|
// src/components/Switch/Switch.tsx
|
|
1281
|
-
import { jsx as
|
|
1357
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1282
1358
|
var Switch = forwardRef10(
|
|
1283
1359
|
({
|
|
1284
1360
|
size = "md",
|
|
@@ -1295,7 +1371,7 @@ var Switch = forwardRef10(
|
|
|
1295
1371
|
const thumbClasses = switchThumb({ size });
|
|
1296
1372
|
const switchId = props.id || `switch-${React5.useId()}`;
|
|
1297
1373
|
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
1298
|
-
const switchElement = /* @__PURE__ */
|
|
1374
|
+
const switchElement = /* @__PURE__ */ jsx11(
|
|
1299
1375
|
SwitchPrimitive.Root,
|
|
1300
1376
|
{
|
|
1301
1377
|
ref,
|
|
@@ -1304,7 +1380,7 @@ var Switch = forwardRef10(
|
|
|
1304
1380
|
disabled,
|
|
1305
1381
|
"aria-invalid": error || void 0,
|
|
1306
1382
|
...props,
|
|
1307
|
-
children: /* @__PURE__ */
|
|
1383
|
+
children: /* @__PURE__ */ jsx11(SwitchPrimitive.Thumb, { className: thumbClasses })
|
|
1308
1384
|
}
|
|
1309
1385
|
);
|
|
1310
1386
|
if (label || displayHelperText) {
|
|
@@ -1319,7 +1395,7 @@ var Switch = forwardRef10(
|
|
|
1319
1395
|
children: [
|
|
1320
1396
|
switchElement,
|
|
1321
1397
|
label && /* @__PURE__ */ jsxs5(Inline2, { gap: "2xs", alignItems: "center", children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1398
|
+
/* @__PURE__ */ jsx11(
|
|
1323
1399
|
Text2,
|
|
1324
1400
|
{
|
|
1325
1401
|
as: "label",
|
|
@@ -1329,12 +1405,12 @@ var Switch = forwardRef10(
|
|
|
1329
1405
|
children: label
|
|
1330
1406
|
}
|
|
1331
1407
|
),
|
|
1332
|
-
required && /* @__PURE__ */
|
|
1408
|
+
required && /* @__PURE__ */ jsx11(Text2, { as: "span", color: "contentTertiary", fontVariant: "text-s-medium", children: "*" })
|
|
1333
1409
|
] })
|
|
1334
1410
|
]
|
|
1335
1411
|
}
|
|
1336
1412
|
),
|
|
1337
|
-
displayHelperText && /* @__PURE__ */
|
|
1413
|
+
displayHelperText && /* @__PURE__ */ jsx11(
|
|
1338
1414
|
Text2,
|
|
1339
1415
|
{
|
|
1340
1416
|
fontVariant: "text-s-regular",
|
|
@@ -1352,28 +1428,33 @@ Switch.displayName = "Switch";
|
|
|
1352
1428
|
|
|
1353
1429
|
// src/components/Chip/Chip.tsx
|
|
1354
1430
|
import React6, { forwardRef as forwardRef11 } from "react";
|
|
1355
|
-
import { jsx as
|
|
1431
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1356
1432
|
var ChipComponent = forwardRef11(function Chip(props, ref) {
|
|
1357
1433
|
const { icon, outline, variant, children, disabled, onClick, ...restProps } = props;
|
|
1358
1434
|
const isValidIcon = icon && React6.isValidElement(icon);
|
|
1359
1435
|
const isOnlyIcon = icon && React6.isValidElement(icon) && !children;
|
|
1436
|
+
const shouldRenderButton = typeof onClick === "function";
|
|
1437
|
+
const gapValue = isValidIcon ? "xs" : "none";
|
|
1438
|
+
const paddingRightValue = isValidIcon && !isOnlyIcon ? "md" : "sm";
|
|
1360
1439
|
return /* @__PURE__ */ jsxs6(
|
|
1361
1440
|
Inline2,
|
|
1362
1441
|
{
|
|
1363
1442
|
ref,
|
|
1364
|
-
as: "button",
|
|
1443
|
+
as: shouldRenderButton ? "button" : "div",
|
|
1365
1444
|
borderColor: variant === "light" ? "borderQuaternary" : "borderTertiary",
|
|
1366
1445
|
borderWidth: "s",
|
|
1367
1446
|
rounded: "md",
|
|
1368
1447
|
paddingY: "xs",
|
|
1369
1448
|
paddingLeft: "sm",
|
|
1370
|
-
paddingRight:
|
|
1449
|
+
paddingRight: paddingRightValue,
|
|
1371
1450
|
borderStyle: outline === "dashed" ? "dashed" : "solid",
|
|
1372
|
-
gap:
|
|
1451
|
+
gap: gapValue,
|
|
1373
1452
|
maxWidth: "fit",
|
|
1374
1453
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
1375
1454
|
onClick,
|
|
1376
1455
|
bgColor: "transparent",
|
|
1456
|
+
disabled: shouldRenderButton ? disabled : void 0,
|
|
1457
|
+
"aria-disabled": shouldRenderButton && disabled ? true : void 0,
|
|
1377
1458
|
...restProps,
|
|
1378
1459
|
children: [
|
|
1379
1460
|
isValidIcon ? React6.cloneElement(icon, {
|
|
@@ -1381,7 +1462,7 @@ var ChipComponent = forwardRef11(function Chip(props, ref) {
|
|
|
1381
1462
|
color: variant === "light" ? "contentTertiary" : "contentPrimary",
|
|
1382
1463
|
...icon?.props || {}
|
|
1383
1464
|
}) : null,
|
|
1384
|
-
children && /* @__PURE__ */
|
|
1465
|
+
children && /* @__PURE__ */ jsx12(
|
|
1385
1466
|
Text2,
|
|
1386
1467
|
{
|
|
1387
1468
|
fontVariant: "text-m-regular",
|
|
@@ -1403,7 +1484,7 @@ var tooltipArrow = "tooltip_tooltipArrow__jg1db35";
|
|
|
1403
1484
|
var tooltipContent = "tooltip_tooltipContent__jg1db34";
|
|
1404
1485
|
|
|
1405
1486
|
// src/components/Tooltip/Tooltip.tsx
|
|
1406
|
-
import { jsx as
|
|
1487
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1407
1488
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1408
1489
|
var Tooltip = ({
|
|
1409
1490
|
children,
|
|
@@ -1416,15 +1497,15 @@ var Tooltip = ({
|
|
|
1416
1497
|
disableHoverableContent = false,
|
|
1417
1498
|
showArrow = true
|
|
1418
1499
|
}) => {
|
|
1419
|
-
return /* @__PURE__ */
|
|
1500
|
+
return /* @__PURE__ */ jsx13(
|
|
1420
1501
|
TooltipPrimitive.Provider,
|
|
1421
1502
|
{
|
|
1422
1503
|
delayDuration,
|
|
1423
1504
|
skipDelayDuration,
|
|
1424
1505
|
disableHoverableContent,
|
|
1425
1506
|
children: /* @__PURE__ */ jsxs7(TooltipPrimitive.Root, { children: [
|
|
1426
|
-
/* @__PURE__ */
|
|
1427
|
-
/* @__PURE__ */
|
|
1507
|
+
/* @__PURE__ */ jsx13(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
1508
|
+
/* @__PURE__ */ jsx13(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
|
|
1428
1509
|
TooltipPrimitive.Content,
|
|
1429
1510
|
{
|
|
1430
1511
|
className: tooltipContent,
|
|
@@ -1432,7 +1513,7 @@ var Tooltip = ({
|
|
|
1432
1513
|
sideOffset,
|
|
1433
1514
|
align,
|
|
1434
1515
|
children: [
|
|
1435
|
-
/* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ jsx13(
|
|
1436
1517
|
Text2,
|
|
1437
1518
|
{
|
|
1438
1519
|
as: "div",
|
|
@@ -1441,7 +1522,7 @@ var Tooltip = ({
|
|
|
1441
1522
|
children: content
|
|
1442
1523
|
}
|
|
1443
1524
|
),
|
|
1444
|
-
showArrow && /* @__PURE__ */
|
|
1525
|
+
showArrow && /* @__PURE__ */ jsx13(
|
|
1445
1526
|
TooltipPrimitive.Arrow,
|
|
1446
1527
|
{
|
|
1447
1528
|
className: tooltipArrow,
|
|
@@ -1475,8 +1556,8 @@ var selectValue = "select_selectValue__ijj2cg8";
|
|
|
1475
1556
|
var selectViewport = "select_selectViewport__ijj2cgb";
|
|
1476
1557
|
|
|
1477
1558
|
// src/components/Select/Select.tsx
|
|
1478
|
-
import { jsx as
|
|
1479
|
-
var ChevronDownIcon = ({ className }) => /* @__PURE__ */
|
|
1559
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1560
|
+
var ChevronDownIcon = ({ className }) => /* @__PURE__ */ jsx14(
|
|
1480
1561
|
"svg",
|
|
1481
1562
|
{
|
|
1482
1563
|
className,
|
|
@@ -1488,7 +1569,7 @@ var ChevronDownIcon = ({ className }) => /* @__PURE__ */ jsx13(
|
|
|
1488
1569
|
strokeWidth: "2",
|
|
1489
1570
|
strokeLinecap: "round",
|
|
1490
1571
|
strokeLinejoin: "round",
|
|
1491
|
-
children: /* @__PURE__ */
|
|
1572
|
+
children: /* @__PURE__ */ jsx14("path", { d: "m6 9 6 6 6-6" })
|
|
1492
1573
|
}
|
|
1493
1574
|
);
|
|
1494
1575
|
var SelectRoot = SelectPrimitive.Root;
|
|
@@ -1502,7 +1583,7 @@ var SelectTrigger = React7.forwardRef(({ children, error, ...props }, ref) => {
|
|
|
1502
1583
|
...props,
|
|
1503
1584
|
children: [
|
|
1504
1585
|
children,
|
|
1505
|
-
/* @__PURE__ */
|
|
1586
|
+
/* @__PURE__ */ jsx14(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx14(ChevronDownIcon, { className: selectIcon }) })
|
|
1506
1587
|
]
|
|
1507
1588
|
}
|
|
1508
1589
|
);
|
|
@@ -1519,8 +1600,8 @@ var SelectContent = React7.forwardRef(
|
|
|
1519
1600
|
disableListWrapper = false,
|
|
1520
1601
|
...props
|
|
1521
1602
|
}, ref) => {
|
|
1522
|
-
const contentChildren = disableListWrapper ? children : /* @__PURE__ */
|
|
1523
|
-
return /* @__PURE__ */
|
|
1603
|
+
const contentChildren = disableListWrapper ? children : /* @__PURE__ */ jsx14(Stack2, { as: "ul", gap: "xs", children });
|
|
1604
|
+
return /* @__PURE__ */ jsx14(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs8(
|
|
1524
1605
|
SelectPrimitive.Content,
|
|
1525
1606
|
{
|
|
1526
1607
|
ref,
|
|
@@ -1530,7 +1611,7 @@ var SelectContent = React7.forwardRef(
|
|
|
1530
1611
|
...props,
|
|
1531
1612
|
children: [
|
|
1532
1613
|
header,
|
|
1533
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsx14(SelectPrimitive.Viewport, { className: selectViewport, children: contentChildren }),
|
|
1534
1615
|
footer
|
|
1535
1616
|
]
|
|
1536
1617
|
}
|
|
@@ -1539,11 +1620,11 @@ var SelectContent = React7.forwardRef(
|
|
|
1539
1620
|
);
|
|
1540
1621
|
SelectContent.displayName = "SelectContent";
|
|
1541
1622
|
var SelectItem = React7.forwardRef(({ children, ...props }, ref) => {
|
|
1542
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsx14(SelectPrimitive.Item, { ref, className: selectItem, ...props, children: /* @__PURE__ */ jsx14(SelectPrimitive.ItemText, { className: selectItemText, children }) });
|
|
1543
1624
|
});
|
|
1544
1625
|
SelectItem.displayName = "SelectItem";
|
|
1545
1626
|
var SelectSeparator = React7.forwardRef((props, ref) => {
|
|
1546
|
-
return /* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ jsx14(
|
|
1547
1628
|
SelectPrimitive.Separator,
|
|
1548
1629
|
{
|
|
1549
1630
|
ref,
|
|
@@ -1573,7 +1654,7 @@ var Select = React7.forwardRef(
|
|
|
1573
1654
|
return /* @__PURE__ */ jsxs8(Stack2, { gap: "sm", children: [
|
|
1574
1655
|
label && /* @__PURE__ */ jsxs8("label", { className: selectLabel, children: [
|
|
1575
1656
|
label,
|
|
1576
|
-
required && /* @__PURE__ */
|
|
1657
|
+
required && /* @__PURE__ */ jsx14(Text2, { as: "span", color: "contentTertiary", children: "*" })
|
|
1577
1658
|
] }),
|
|
1578
1659
|
/* @__PURE__ */ jsxs8(
|
|
1579
1660
|
SelectRoot,
|
|
@@ -1585,8 +1666,8 @@ var Select = React7.forwardRef(
|
|
|
1585
1666
|
name,
|
|
1586
1667
|
required,
|
|
1587
1668
|
children: [
|
|
1588
|
-
/* @__PURE__ */
|
|
1589
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ jsx14(SelectTrigger, { ref, error: !!error, children: /* @__PURE__ */ jsx14(SelectValue, { placeholder, className: selectValue }) }),
|
|
1670
|
+
/* @__PURE__ */ jsx14(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx14(
|
|
1590
1671
|
SelectItem,
|
|
1591
1672
|
{
|
|
1592
1673
|
value: option.value,
|
|
@@ -1598,7 +1679,7 @@ var Select = React7.forwardRef(
|
|
|
1598
1679
|
]
|
|
1599
1680
|
}
|
|
1600
1681
|
),
|
|
1601
|
-
displayHelperText && /* @__PURE__ */
|
|
1682
|
+
displayHelperText && /* @__PURE__ */ jsx14(
|
|
1602
1683
|
Text2,
|
|
1603
1684
|
{
|
|
1604
1685
|
id: helperTextId,
|
|
@@ -1656,7 +1737,7 @@ function getInitials(name) {
|
|
|
1656
1737
|
}
|
|
1657
1738
|
|
|
1658
1739
|
// src/components/Avatar/Avatar.tsx
|
|
1659
|
-
import { jsx as
|
|
1740
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1660
1741
|
var TYPOGRAPHY_MAP = {
|
|
1661
1742
|
xs: "text-xs-medium",
|
|
1662
1743
|
sm: "text-s-medium",
|
|
@@ -1664,6 +1745,13 @@ var TYPOGRAPHY_MAP = {
|
|
|
1664
1745
|
lg: "text-m-medium",
|
|
1665
1746
|
xl: "text-l-medium"
|
|
1666
1747
|
};
|
|
1748
|
+
var HEADING_MAP = {
|
|
1749
|
+
xs: null,
|
|
1750
|
+
sm: null,
|
|
1751
|
+
md: "heading-xs-semibold",
|
|
1752
|
+
lg: "heading-s-semibold",
|
|
1753
|
+
xl: "heading-s-semibold"
|
|
1754
|
+
};
|
|
1667
1755
|
var Avatar = forwardRef13(
|
|
1668
1756
|
({
|
|
1669
1757
|
size = "md",
|
|
@@ -1687,6 +1775,7 @@ var Avatar = forwardRef13(
|
|
|
1687
1775
|
}, [color, name]);
|
|
1688
1776
|
const initials = useMemo(() => getInitials(name), [name]);
|
|
1689
1777
|
const typographyVariant = TYPOGRAPHY_MAP[size];
|
|
1778
|
+
const headingVariant = HEADING_MAP[size];
|
|
1690
1779
|
useEffect(() => {
|
|
1691
1780
|
if (!src) {
|
|
1692
1781
|
setImageLoadingStatus("error");
|
|
@@ -1706,37 +1795,131 @@ var Avatar = forwardRef13(
|
|
|
1706
1795
|
};
|
|
1707
1796
|
}, [src]);
|
|
1708
1797
|
const fallbackClasses = avatarFallbackVariants({ color: resolvedColor });
|
|
1709
|
-
const avatarElement = /* @__PURE__ */
|
|
1798
|
+
const avatarElement = /* @__PURE__ */ jsx15(
|
|
1710
1799
|
AvatarPrimitive.Root,
|
|
1711
1800
|
{
|
|
1712
1801
|
ref,
|
|
1713
1802
|
className: combinedClassName,
|
|
1714
1803
|
...props,
|
|
1715
|
-
children: imageLoadingStatus === "loaded" && src ? /* @__PURE__ */
|
|
1804
|
+
children: imageLoadingStatus === "loaded" && src ? /* @__PURE__ */ jsx15(
|
|
1716
1805
|
AvatarPrimitive.Image,
|
|
1717
1806
|
{
|
|
1718
1807
|
className: avatarImage,
|
|
1719
1808
|
src,
|
|
1720
1809
|
alt: `${name} avatar`
|
|
1721
1810
|
}
|
|
1722
|
-
) : icon ? icon : /* @__PURE__ */
|
|
1811
|
+
) : icon ? icon : /* @__PURE__ */ jsx15(
|
|
1723
1812
|
AvatarPrimitive.Fallback,
|
|
1724
1813
|
{
|
|
1725
1814
|
className: fallbackClasses,
|
|
1726
1815
|
delayMs,
|
|
1727
|
-
children: /* @__PURE__ */
|
|
1816
|
+
children: headingVariant ? /* @__PURE__ */ jsx15(
|
|
1817
|
+
Heading2,
|
|
1818
|
+
{
|
|
1819
|
+
as: "span",
|
|
1820
|
+
fontVariant: headingVariant,
|
|
1821
|
+
textTransform: "uppercase",
|
|
1822
|
+
children: initials
|
|
1823
|
+
}
|
|
1824
|
+
) : /* @__PURE__ */ jsx15(Text2, { fontVariant: typographyVariant, textTransform: "uppercase", children: initials })
|
|
1728
1825
|
}
|
|
1729
1826
|
)
|
|
1730
1827
|
}
|
|
1731
1828
|
);
|
|
1732
1829
|
if (tooltip) {
|
|
1733
|
-
return /* @__PURE__ */
|
|
1830
|
+
return /* @__PURE__ */ jsx15(Tooltip, { content: tooltip, children: avatarElement });
|
|
1734
1831
|
}
|
|
1735
1832
|
return avatarElement;
|
|
1736
1833
|
}
|
|
1737
1834
|
);
|
|
1738
1835
|
Avatar.displayName = "Avatar";
|
|
1739
1836
|
|
|
1837
|
+
// src/components/Avatar/AvatarGroup.tsx
|
|
1838
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1839
|
+
var SIZE_MAP = {
|
|
1840
|
+
xs: "20",
|
|
1841
|
+
sm: "xl",
|
|
1842
|
+
md: "2xl",
|
|
1843
|
+
lg: "3xl",
|
|
1844
|
+
xl: "4xl"
|
|
1845
|
+
};
|
|
1846
|
+
var BORDER_WIDTH_MAP = {
|
|
1847
|
+
xs: "s",
|
|
1848
|
+
sm: "s",
|
|
1849
|
+
md: "m",
|
|
1850
|
+
lg: "m",
|
|
1851
|
+
xl: "l"
|
|
1852
|
+
};
|
|
1853
|
+
var OVERLAP_MAP = {
|
|
1854
|
+
xs: 6,
|
|
1855
|
+
sm: 8,
|
|
1856
|
+
md: 10,
|
|
1857
|
+
lg: 12,
|
|
1858
|
+
xl: 14
|
|
1859
|
+
};
|
|
1860
|
+
var TEXT_VARIANT_MAP = {
|
|
1861
|
+
xs: "text-xs-medium",
|
|
1862
|
+
sm: "text-s-medium",
|
|
1863
|
+
md: "text-s-medium",
|
|
1864
|
+
lg: "text-m-medium",
|
|
1865
|
+
xl: "text-l-medium"
|
|
1866
|
+
};
|
|
1867
|
+
var HEADING_MAP2 = {
|
|
1868
|
+
xs: null,
|
|
1869
|
+
sm: null,
|
|
1870
|
+
md: "heading-xs-semibold",
|
|
1871
|
+
lg: "heading-s-semibold",
|
|
1872
|
+
xl: "heading-s-semibold"
|
|
1873
|
+
};
|
|
1874
|
+
var AvatarGroup = ({
|
|
1875
|
+
size = "md",
|
|
1876
|
+
avatars,
|
|
1877
|
+
max = 3,
|
|
1878
|
+
className
|
|
1879
|
+
}) => {
|
|
1880
|
+
const visible = avatars.slice(0, max);
|
|
1881
|
+
const overflow = avatars.length - visible.length;
|
|
1882
|
+
const overlap = OVERLAP_MAP[size];
|
|
1883
|
+
const headingVariant = HEADING_MAP2[size];
|
|
1884
|
+
const textVariant = TEXT_VARIANT_MAP[size];
|
|
1885
|
+
return /* @__PURE__ */ jsxs9(Box2, { display: "flex", alignItems: "center", className, children: [
|
|
1886
|
+
visible.map((avatar, index) => /* @__PURE__ */ jsx16(
|
|
1887
|
+
Box2,
|
|
1888
|
+
{
|
|
1889
|
+
style: { marginLeft: index === 0 ? 0 : -overlap },
|
|
1890
|
+
children: /* @__PURE__ */ jsx16(
|
|
1891
|
+
Avatar,
|
|
1892
|
+
{
|
|
1893
|
+
size,
|
|
1894
|
+
name: avatar.name,
|
|
1895
|
+
src: avatar.src,
|
|
1896
|
+
icon: avatar.icon,
|
|
1897
|
+
color: avatar.color
|
|
1898
|
+
}
|
|
1899
|
+
)
|
|
1900
|
+
},
|
|
1901
|
+
`${avatar.name}-${index}`
|
|
1902
|
+
)),
|
|
1903
|
+
overflow > 0 && /* @__PURE__ */ jsx16(
|
|
1904
|
+
Box2,
|
|
1905
|
+
{
|
|
1906
|
+
display: "flex",
|
|
1907
|
+
alignItems: "center",
|
|
1908
|
+
justifyContent: "center",
|
|
1909
|
+
size: SIZE_MAP[size],
|
|
1910
|
+
rounded: "pill",
|
|
1911
|
+
borderWidth: BORDER_WIDTH_MAP[size],
|
|
1912
|
+
borderStyle: "solid",
|
|
1913
|
+
bgColor: "backgroundPrimary",
|
|
1914
|
+
color: "contentPrimary",
|
|
1915
|
+
style: { marginLeft: -overlap, borderColor: "#F0F1F1" },
|
|
1916
|
+
children: headingVariant ? /* @__PURE__ */ jsx16(Heading2, { as: "span", fontVariant: headingVariant, children: `${overflow}+` }) : /* @__PURE__ */ jsx16(Text2, { as: "span", fontVariant: textVariant, children: `${overflow}+` })
|
|
1917
|
+
}
|
|
1918
|
+
)
|
|
1919
|
+
] });
|
|
1920
|
+
};
|
|
1921
|
+
AvatarGroup.displayName = "AvatarGroup";
|
|
1922
|
+
|
|
1740
1923
|
// src/components/Loader/Spinner.tsx
|
|
1741
1924
|
import { forwardRef as forwardRef14 } from "react";
|
|
1742
1925
|
import { colorVars } from "@zentrades-ui/theme";
|
|
@@ -1748,7 +1931,7 @@ var spinnerRoot = "spinner_spinnerRoot__1vppgfr2";
|
|
|
1748
1931
|
var spinnerSizes = _7a4687({ defaultClassName: "spinner_spinnerSizes__1vppgfr4", variantClassNames: { size: { sm: "spinner_spinnerSizes_size_sm__1vppgfr5", md: "spinner_spinnerSizes_size_md__1vppgfr6", lg: "spinner_spinnerSizes_size_lg__1vppgfr7", xl: "spinner_spinnerSizes_size_xl__1vppgfr8" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
1749
1932
|
|
|
1750
1933
|
// src/components/Loader/Spinner.tsx
|
|
1751
|
-
import { jsx as
|
|
1934
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1752
1935
|
var VIEWBOX_SIZE = 44;
|
|
1753
1936
|
var STROKE_WIDTH = 3.6;
|
|
1754
1937
|
var Spinner = forwardRef14(
|
|
@@ -1758,7 +1941,7 @@ var Spinner = forwardRef14(
|
|
|
1758
1941
|
className,
|
|
1759
1942
|
"aria-label": ariaLabel = "Loading"
|
|
1760
1943
|
}, ref) => {
|
|
1761
|
-
return /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ jsx17(
|
|
1762
1945
|
"svg",
|
|
1763
1946
|
{
|
|
1764
1947
|
ref,
|
|
@@ -1766,7 +1949,7 @@ var Spinner = forwardRef14(
|
|
|
1766
1949
|
"aria-label": ariaLabel,
|
|
1767
1950
|
className: cn(spinnerRoot, spinnerSizes({ size }), className),
|
|
1768
1951
|
viewBox: `0 0 ${VIEWBOX_SIZE} ${VIEWBOX_SIZE}`,
|
|
1769
|
-
children: /* @__PURE__ */
|
|
1952
|
+
children: /* @__PURE__ */ jsx17(
|
|
1770
1953
|
"circle",
|
|
1771
1954
|
{
|
|
1772
1955
|
className: spinnerCircle,
|
|
@@ -1792,7 +1975,7 @@ import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRunti
|
|
|
1792
1975
|
var skeletonVariants = _7a4688({ defaultClassName: "skeleton__1bhxgpz2 skeleton_baseSkeleton__1bhxgpz1", variantClassNames: { variant: { text: "skeleton_skeletonVariants_variant_text__1bhxgpz3", circle: "skeleton_skeletonVariants_variant_circle__1bhxgpz4", rectangular: "skeleton_skeletonVariants_variant_rectangular__1bhxgpz5", rounded: "skeleton_skeletonVariants_variant_rounded__1bhxgpz6" } }, defaultVariants: { variant: "text" }, compoundVariants: [] });
|
|
1793
1976
|
|
|
1794
1977
|
// src/components/Loader/Skeleton.tsx
|
|
1795
|
-
import { jsx as
|
|
1978
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1796
1979
|
var Skeleton = React9.forwardRef(
|
|
1797
1980
|
({ variant = "text", width, height, className, style, ...props }, ref) => {
|
|
1798
1981
|
const inlineStyles = {
|
|
@@ -1800,7 +1983,7 @@ var Skeleton = React9.forwardRef(
|
|
|
1800
1983
|
...width !== void 0 && { width },
|
|
1801
1984
|
...height !== void 0 && { height }
|
|
1802
1985
|
};
|
|
1803
|
-
return /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsx18(
|
|
1804
1987
|
"span",
|
|
1805
1988
|
{
|
|
1806
1989
|
ref,
|
|
@@ -1815,8 +1998,68 @@ var Skeleton = React9.forwardRef(
|
|
|
1815
1998
|
);
|
|
1816
1999
|
Skeleton.displayName = "Skeleton";
|
|
1817
2000
|
|
|
2001
|
+
// src/components/Loader/ProgressBar.tsx
|
|
2002
|
+
import { forwardRef as forwardRef15, useMemo as useMemo2 } from "react";
|
|
2003
|
+
|
|
2004
|
+
// src/components/Loader/progress.css.ts
|
|
2005
|
+
var progressBar = "progress_progressBar__15o0mnv1";
|
|
2006
|
+
var progressTrack = "progress_progressTrack__15o0mnv2";
|
|
2007
|
+
|
|
2008
|
+
// src/components/Loader/ProgressBar.tsx
|
|
2009
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2010
|
+
var ProgressBar = forwardRef15(
|
|
2011
|
+
({
|
|
2012
|
+
value,
|
|
2013
|
+
className,
|
|
2014
|
+
barClassName,
|
|
2015
|
+
height = 3,
|
|
2016
|
+
ariaValueText,
|
|
2017
|
+
variant = "secondary"
|
|
2018
|
+
}, ref) => {
|
|
2019
|
+
const isDeterminate = typeof value === "number";
|
|
2020
|
+
const width = isDeterminate ? `${Math.min(Math.max(value, 0), 100)}%` : void 0;
|
|
2021
|
+
const backgroundColorMap = useMemo2(() => {
|
|
2022
|
+
return variant === "primary" ? {
|
|
2023
|
+
background: "backgroundSelected",
|
|
2024
|
+
foreground: "backgroundBrand"
|
|
2025
|
+
} : {
|
|
2026
|
+
background: "backgroundSecondarySelected",
|
|
2027
|
+
foreground: "backgroundSecondaryBrand"
|
|
2028
|
+
};
|
|
2029
|
+
}, [variant]);
|
|
2030
|
+
return /* @__PURE__ */ jsx19(
|
|
2031
|
+
Box2,
|
|
2032
|
+
{
|
|
2033
|
+
ref,
|
|
2034
|
+
role: "progressbar",
|
|
2035
|
+
"aria-valuemin": isDeterminate ? 0 : void 0,
|
|
2036
|
+
"aria-valuemax": isDeterminate ? 100 : void 0,
|
|
2037
|
+
"aria-valuenow": value,
|
|
2038
|
+
"aria-valuetext": ariaValueText,
|
|
2039
|
+
className: cn(progressBar, className),
|
|
2040
|
+
style: { height },
|
|
2041
|
+
backgroundColor: backgroundColorMap.background,
|
|
2042
|
+
children: /* @__PURE__ */ jsx19(
|
|
2043
|
+
Box2,
|
|
2044
|
+
{
|
|
2045
|
+
className: cn(progressTrack, barClassName),
|
|
2046
|
+
style: {
|
|
2047
|
+
width,
|
|
2048
|
+
maxWidth: isDeterminate ? void 0 : "30%",
|
|
2049
|
+
transition: isDeterminate ? "width 160ms ease" : void 0,
|
|
2050
|
+
animation: isDeterminate ? "none" : void 0
|
|
2051
|
+
},
|
|
2052
|
+
backgroundColor: backgroundColorMap.foreground
|
|
2053
|
+
}
|
|
2054
|
+
)
|
|
2055
|
+
}
|
|
2056
|
+
);
|
|
2057
|
+
}
|
|
2058
|
+
);
|
|
2059
|
+
ProgressBar.displayName = "ProgressBar";
|
|
2060
|
+
|
|
1818
2061
|
// src/components/TextArea/TextArea.tsx
|
|
1819
|
-
import React10, { forwardRef as
|
|
2062
|
+
import React10, { forwardRef as forwardRef16 } from "react";
|
|
1820
2063
|
|
|
1821
2064
|
// src/components/TextArea/textarea.css.ts
|
|
1822
2065
|
import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -1827,8 +2070,8 @@ var textareaElement = _7a4689({ defaultClassName: "textarea__o7hyjda textarea_ba
|
|
|
1827
2070
|
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: [] });
|
|
1828
2071
|
|
|
1829
2072
|
// src/components/TextArea/TextArea.tsx
|
|
1830
|
-
import { jsx as
|
|
1831
|
-
var ResizeIcon = () => /* @__PURE__ */
|
|
2073
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2074
|
+
var ResizeIcon = () => /* @__PURE__ */ jsx20(
|
|
1832
2075
|
"svg",
|
|
1833
2076
|
{
|
|
1834
2077
|
width: "12",
|
|
@@ -1836,7 +2079,7 @@ var ResizeIcon = () => /* @__PURE__ */ jsx17(
|
|
|
1836
2079
|
viewBox: "0 0 12 12",
|
|
1837
2080
|
fill: "none",
|
|
1838
2081
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1839
|
-
children: /* @__PURE__ */
|
|
2082
|
+
children: /* @__PURE__ */ jsx20(
|
|
1840
2083
|
"path",
|
|
1841
2084
|
{
|
|
1842
2085
|
d: "M10.5 1.5L1.5 10.5M10.5 5.5L5.5 10.5M10.5 9.5L9.5 10.5",
|
|
@@ -1848,7 +2091,7 @@ var ResizeIcon = () => /* @__PURE__ */ jsx17(
|
|
|
1848
2091
|
)
|
|
1849
2092
|
}
|
|
1850
2093
|
);
|
|
1851
|
-
var TextArea =
|
|
2094
|
+
var TextArea = forwardRef16(
|
|
1852
2095
|
function TextArea2(props, ref) {
|
|
1853
2096
|
const {
|
|
1854
2097
|
label,
|
|
@@ -1877,8 +2120,8 @@ var TextArea = forwardRef15(
|
|
|
1877
2120
|
if (error) return "error";
|
|
1878
2121
|
return "default";
|
|
1879
2122
|
};
|
|
1880
|
-
const labelElement = label && /* @__PURE__ */
|
|
1881
|
-
/* @__PURE__ */
|
|
2123
|
+
const labelElement = label && /* @__PURE__ */ jsxs10(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
2124
|
+
/* @__PURE__ */ jsx20(
|
|
1882
2125
|
Text2,
|
|
1883
2126
|
{
|
|
1884
2127
|
as: "label",
|
|
@@ -1888,12 +2131,12 @@ var TextArea = forwardRef15(
|
|
|
1888
2131
|
children: label
|
|
1889
2132
|
}
|
|
1890
2133
|
),
|
|
1891
|
-
isRequired && /* @__PURE__ */
|
|
2134
|
+
isRequired && /* @__PURE__ */ jsx20(Text2, { fontVariant: "text-m-regular", color: "contentTertiary", as: "span", children: "*" })
|
|
1892
2135
|
] });
|
|
1893
2136
|
const state = getState();
|
|
1894
|
-
const textareaElement2 = /* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
2137
|
+
const textareaElement2 = /* @__PURE__ */ jsxs10(Stack2, { gap: "sm", width: "full", children: [
|
|
2138
|
+
/* @__PURE__ */ jsxs10(Box2, { className: textareaField({ state }), children: [
|
|
2139
|
+
/* @__PURE__ */ jsx20(
|
|
1897
2140
|
"textarea",
|
|
1898
2141
|
{
|
|
1899
2142
|
ref,
|
|
@@ -1906,10 +2149,10 @@ var TextArea = forwardRef15(
|
|
|
1906
2149
|
...textareaProps
|
|
1907
2150
|
}
|
|
1908
2151
|
),
|
|
1909
|
-
showResizeHandle && !viewMode && !readOnly && !disabled && /* @__PURE__ */
|
|
1910
|
-
showResizeHandle && !viewMode && !readOnly && disabled && /* @__PURE__ */
|
|
2152
|
+
showResizeHandle && !viewMode && !readOnly && !disabled && /* @__PURE__ */ jsx20(Box2, { className: resizeHandle, children: /* @__PURE__ */ jsx20(ResizeIcon, {}) }),
|
|
2153
|
+
showResizeHandle && !viewMode && !readOnly && disabled && /* @__PURE__ */ jsx20(Box2, { className: resizeHandleDisabled, children: /* @__PURE__ */ jsx20(ResizeIcon, {}) })
|
|
1911
2154
|
] }),
|
|
1912
|
-
displayHelperText && /* @__PURE__ */
|
|
2155
|
+
displayHelperText && /* @__PURE__ */ jsx20(
|
|
1913
2156
|
Text2,
|
|
1914
2157
|
{
|
|
1915
2158
|
id: helperTextId,
|
|
@@ -1920,7 +2163,7 @@ var TextArea = forwardRef15(
|
|
|
1920
2163
|
}
|
|
1921
2164
|
)
|
|
1922
2165
|
] });
|
|
1923
|
-
return /* @__PURE__ */
|
|
2166
|
+
return /* @__PURE__ */ jsxs10(
|
|
1924
2167
|
Box2,
|
|
1925
2168
|
{
|
|
1926
2169
|
className: textareaContainer({
|
|
@@ -1951,8 +2194,8 @@ var iconWrapper3 = "accordion_iconWrapper__1m7j6g7a";
|
|
|
1951
2194
|
var triggerTitle = "accordion_triggerTitle__1m7j6g79";
|
|
1952
2195
|
|
|
1953
2196
|
// src/components/Accordion/Accordion.tsx
|
|
1954
|
-
import { jsx as
|
|
1955
|
-
var ChevronDownIcon2 = () => /* @__PURE__ */
|
|
2197
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2198
|
+
var ChevronDownIcon2 = () => /* @__PURE__ */ jsx21(
|
|
1956
2199
|
"svg",
|
|
1957
2200
|
{
|
|
1958
2201
|
width: "20",
|
|
@@ -1963,7 +2206,7 @@ var ChevronDownIcon2 = () => /* @__PURE__ */ jsx18(
|
|
|
1963
2206
|
strokeWidth: "2",
|
|
1964
2207
|
strokeLinecap: "round",
|
|
1965
2208
|
strokeLinejoin: "round",
|
|
1966
|
-
children: /* @__PURE__ */
|
|
2209
|
+
children: /* @__PURE__ */ jsx21("path", { d: "m6 9 6 6 6-6" })
|
|
1967
2210
|
}
|
|
1968
2211
|
);
|
|
1969
2212
|
var AccordionItemContext = React11.createContext(
|
|
@@ -1976,7 +2219,7 @@ var AccordionRoot = React11.forwardRef(
|
|
|
1976
2219
|
const composedClassName = cn(accordionRoot({ variant }), className);
|
|
1977
2220
|
if (allowMultiple) {
|
|
1978
2221
|
const multipleProps = props;
|
|
1979
|
-
return /* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ jsx21(AccordionItemContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx21(
|
|
1980
2223
|
AccordionPrimitive.Root,
|
|
1981
2224
|
{
|
|
1982
2225
|
ref,
|
|
@@ -1987,7 +2230,7 @@ var AccordionRoot = React11.forwardRef(
|
|
|
1987
2230
|
) });
|
|
1988
2231
|
}
|
|
1989
2232
|
const { collapsible = true, ...singleProps } = props;
|
|
1990
|
-
return /* @__PURE__ */
|
|
2233
|
+
return /* @__PURE__ */ jsx21(AccordionItemContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx21(
|
|
1991
2234
|
AccordionPrimitive.Root,
|
|
1992
2235
|
{
|
|
1993
2236
|
ref,
|
|
@@ -2003,7 +2246,7 @@ AccordionRoot.displayName = "Accordion.Root";
|
|
|
2003
2246
|
var AccordionItem = React11.forwardRef(({ className, variant, ...props }, ref) => {
|
|
2004
2247
|
const context = React11.useContext(AccordionItemContext);
|
|
2005
2248
|
const resolvedVariant = variant ?? context.variant;
|
|
2006
|
-
return /* @__PURE__ */
|
|
2249
|
+
return /* @__PURE__ */ jsx21(
|
|
2007
2250
|
AccordionPrimitive.Item,
|
|
2008
2251
|
{
|
|
2009
2252
|
ref,
|
|
@@ -2016,13 +2259,13 @@ AccordionItem.displayName = "Accordion.Item";
|
|
|
2016
2259
|
var AccordionTrigger = React11.forwardRef(({ children, className, variant, ...props }, ref) => {
|
|
2017
2260
|
const context = React11.useContext(AccordionItemContext);
|
|
2018
2261
|
const resolvedVariant = variant ?? context.variant;
|
|
2019
|
-
return /* @__PURE__ */
|
|
2262
|
+
return /* @__PURE__ */ jsx21(AccordionPrimitive.Header, { asChild: true, children: /* @__PURE__ */ jsx21(
|
|
2020
2263
|
AccordionPrimitive.Trigger,
|
|
2021
2264
|
{
|
|
2022
2265
|
ref,
|
|
2023
2266
|
className: cn(accordionTrigger({ variant: resolvedVariant }), className),
|
|
2024
2267
|
...props,
|
|
2025
|
-
children: /* @__PURE__ */
|
|
2268
|
+
children: /* @__PURE__ */ jsxs11(
|
|
2026
2269
|
Inline2,
|
|
2027
2270
|
{
|
|
2028
2271
|
flex: "1",
|
|
@@ -2031,8 +2274,8 @@ var AccordionTrigger = React11.forwardRef(({ children, className, variant, ...pr
|
|
|
2031
2274
|
alignItems: "center",
|
|
2032
2275
|
justifyContent: "between",
|
|
2033
2276
|
children: [
|
|
2034
|
-
/* @__PURE__ */
|
|
2035
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ jsx21(Box2, { color: "contentPrimary", className: triggerTitle, children }),
|
|
2278
|
+
/* @__PURE__ */ jsx21("div", { className: iconWrapper3, children: /* @__PURE__ */ jsx21(ChevronDownIcon2, {}) })
|
|
2036
2279
|
]
|
|
2037
2280
|
}
|
|
2038
2281
|
)
|
|
@@ -2043,13 +2286,13 @@ AccordionTrigger.displayName = "Accordion.Trigger";
|
|
|
2043
2286
|
var AccordionContent = React11.forwardRef(({ children, className, variant, ...props }, ref) => {
|
|
2044
2287
|
const context = React11.useContext(AccordionItemContext);
|
|
2045
2288
|
const resolvedVariant = variant ?? context.variant;
|
|
2046
|
-
return /* @__PURE__ */
|
|
2289
|
+
return /* @__PURE__ */ jsx21(
|
|
2047
2290
|
AccordionPrimitive.Content,
|
|
2048
2291
|
{
|
|
2049
2292
|
ref,
|
|
2050
2293
|
className: cn(accordionContent({ variant: resolvedVariant }), className),
|
|
2051
2294
|
...props,
|
|
2052
|
-
children: /* @__PURE__ */
|
|
2295
|
+
children: /* @__PURE__ */ jsx21("div", { className: contentInner({ variant: resolvedVariant }), children })
|
|
2053
2296
|
}
|
|
2054
2297
|
);
|
|
2055
2298
|
});
|
|
@@ -2060,7 +2303,7 @@ var AccordionItemWithContext = React11.forwardRef(({ variant, ...props }, ref) =
|
|
|
2060
2303
|
() => ({ variant: variant ?? parentContext.variant }),
|
|
2061
2304
|
[variant, parentContext.variant]
|
|
2062
2305
|
);
|
|
2063
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ jsx21(AccordionItemContext.Provider, { value, children: /* @__PURE__ */ jsx21(AccordionItem, { ref, ...props }) });
|
|
2064
2307
|
});
|
|
2065
2308
|
AccordionItemWithContext.displayName = "Accordion.Item";
|
|
2066
2309
|
var Accordion = Object.assign(AccordionRoot, {
|
|
@@ -2084,8 +2327,8 @@ var menuSubContent = "menu_menuSubContent__1b87dxfe";
|
|
|
2084
2327
|
var menuSubTrigger = "menu_menuSubTrigger__1b87dxfd menu_menuItemBase__1b87dxfa";
|
|
2085
2328
|
|
|
2086
2329
|
// src/components/Menu/Menu.tsx
|
|
2087
|
-
import { jsx as
|
|
2088
|
-
var ChevronRightIcon = () => /* @__PURE__ */
|
|
2330
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2331
|
+
var ChevronRightIcon = () => /* @__PURE__ */ jsx22(
|
|
2089
2332
|
"svg",
|
|
2090
2333
|
{
|
|
2091
2334
|
width: "12",
|
|
@@ -2097,15 +2340,15 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx19(
|
|
|
2097
2340
|
strokeLinecap: "round",
|
|
2098
2341
|
strokeLinejoin: "round",
|
|
2099
2342
|
className: chevronIcon,
|
|
2100
|
-
children: /* @__PURE__ */
|
|
2343
|
+
children: /* @__PURE__ */ jsx22("path", { d: "m9 18 6-6-6-6" })
|
|
2101
2344
|
}
|
|
2102
2345
|
);
|
|
2103
2346
|
var MenuRoot = ({ children, ...props }) => {
|
|
2104
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Root, { modal: props.modal || false, ...props, children });
|
|
2105
2348
|
};
|
|
2106
2349
|
MenuRoot.displayName = "MenuRoot";
|
|
2107
2350
|
var MenuTrigger = React12.forwardRef(({ children, ...props }, ref) => {
|
|
2108
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Trigger, { ref, asChild: true, ...props, children });
|
|
2109
2352
|
});
|
|
2110
2353
|
MenuTrigger.displayName = "MenuTrigger";
|
|
2111
2354
|
var MenuContent = React12.forwardRef(
|
|
@@ -2119,7 +2362,7 @@ var MenuContent = React12.forwardRef(
|
|
|
2119
2362
|
className,
|
|
2120
2363
|
...props
|
|
2121
2364
|
}, ref) => {
|
|
2122
|
-
return /* @__PURE__ */
|
|
2365
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx22(
|
|
2123
2366
|
DropdownMenu.Content,
|
|
2124
2367
|
{
|
|
2125
2368
|
ref,
|
|
@@ -2210,9 +2453,9 @@ var Menu = ({
|
|
|
2210
2453
|
...defaultOpen !== void 0 ? { defaultOpen } : {},
|
|
2211
2454
|
...onOpenChange ? { onOpenChange } : {}
|
|
2212
2455
|
};
|
|
2213
|
-
return /* @__PURE__ */
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
/* @__PURE__ */
|
|
2456
|
+
return /* @__PURE__ */ jsxs12(MenuRoot, { ...menuRootProps, children: [
|
|
2457
|
+
/* @__PURE__ */ jsx22(MenuTrigger, { children: triggerWithHoverHandlers }),
|
|
2458
|
+
/* @__PURE__ */ jsx22(
|
|
2216
2459
|
MenuContent,
|
|
2217
2460
|
{
|
|
2218
2461
|
align,
|
|
@@ -2247,7 +2490,7 @@ var MenuItem = React12.forwardRef(
|
|
|
2247
2490
|
}
|
|
2248
2491
|
onClick?.(event);
|
|
2249
2492
|
};
|
|
2250
|
-
return /* @__PURE__ */
|
|
2493
|
+
return /* @__PURE__ */ jsx22(
|
|
2251
2494
|
DropdownMenu.Item,
|
|
2252
2495
|
{
|
|
2253
2496
|
ref,
|
|
@@ -2262,20 +2505,20 @@ var MenuItem = React12.forwardRef(
|
|
|
2262
2505
|
);
|
|
2263
2506
|
MenuItem.displayName = "MenuItem";
|
|
2264
2507
|
var MenuLabel = ({ children, className }) => {
|
|
2265
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Label, { className, children });
|
|
2266
2509
|
};
|
|
2267
2510
|
MenuLabel.displayName = "MenuLabel";
|
|
2268
2511
|
var MenuSeparator = ({ className }) => {
|
|
2269
|
-
return /* @__PURE__ */
|
|
2512
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Separator, { className: cn(menuSeparator, className) });
|
|
2270
2513
|
};
|
|
2271
2514
|
MenuSeparator.displayName = "MenuSeparator";
|
|
2272
2515
|
var MenuSub = ({ children, label, padding = "xs" }) => {
|
|
2273
|
-
return /* @__PURE__ */
|
|
2274
|
-
/* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ jsxs12(DropdownMenu.Sub, { children: [
|
|
2517
|
+
/* @__PURE__ */ jsxs12(DropdownMenu.SubTrigger, { className: menuSubTrigger, children: [
|
|
2275
2518
|
label,
|
|
2276
|
-
/* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ jsx22(ChevronRightIcon, {})
|
|
2277
2520
|
] }),
|
|
2278
|
-
/* @__PURE__ */
|
|
2521
|
+
/* @__PURE__ */ jsx22(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx22(
|
|
2279
2522
|
DropdownMenu.SubContent,
|
|
2280
2523
|
{
|
|
2281
2524
|
className: menuSubContent,
|
|
@@ -2304,8 +2547,8 @@ var dialogHeader = "dialog_dialogHeader__1934qpw8";
|
|
|
2304
2547
|
var dialogOverlay = "dialog_dialogOverlay__1934qpw2";
|
|
2305
2548
|
|
|
2306
2549
|
// src/components/Dialog/Dialog.tsx
|
|
2307
|
-
import { jsx as
|
|
2308
|
-
var CloseIcon = () => /* @__PURE__ */
|
|
2550
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2551
|
+
var CloseIcon = () => /* @__PURE__ */ jsxs13(
|
|
2309
2552
|
"svg",
|
|
2310
2553
|
{
|
|
2311
2554
|
width: "20",
|
|
@@ -2317,8 +2560,8 @@ var CloseIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2317
2560
|
strokeLinecap: "round",
|
|
2318
2561
|
strokeLinejoin: "round",
|
|
2319
2562
|
children: [
|
|
2320
|
-
/* @__PURE__ */
|
|
2321
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ jsx23("path", { d: "M18 6 6 18" }),
|
|
2564
|
+
/* @__PURE__ */ jsx23("path", { d: "m6 6 12 12" })
|
|
2322
2565
|
]
|
|
2323
2566
|
}
|
|
2324
2567
|
);
|
|
@@ -2330,7 +2573,7 @@ var DialogRoot = ({
|
|
|
2330
2573
|
children,
|
|
2331
2574
|
modal = true
|
|
2332
2575
|
}) => {
|
|
2333
|
-
return /* @__PURE__ */
|
|
2576
|
+
return /* @__PURE__ */ jsxs13(
|
|
2334
2577
|
DialogPrimitive.Root,
|
|
2335
2578
|
{
|
|
2336
2579
|
open,
|
|
@@ -2338,7 +2581,7 @@ var DialogRoot = ({
|
|
|
2338
2581
|
onOpenChange,
|
|
2339
2582
|
modal,
|
|
2340
2583
|
children: [
|
|
2341
|
-
trigger && /* @__PURE__ */
|
|
2584
|
+
trigger && /* @__PURE__ */ jsx23(DialogPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
2342
2585
|
children
|
|
2343
2586
|
]
|
|
2344
2587
|
}
|
|
@@ -2360,9 +2603,9 @@ var DialogContent = React13.forwardRef(
|
|
|
2360
2603
|
}, ref) => {
|
|
2361
2604
|
const resolvedMaxHeight = typeof maxHeight === "number" ? `${maxHeight / 16}rem` : maxHeight;
|
|
2362
2605
|
const resolvedHeight = typeof height === "number" ? `${height / 16}rem` : height;
|
|
2363
|
-
return /* @__PURE__ */
|
|
2364
|
-
/* @__PURE__ */
|
|
2365
|
-
/* @__PURE__ */
|
|
2606
|
+
return /* @__PURE__ */ jsxs13(DialogPrimitive.Portal, { children: [
|
|
2607
|
+
/* @__PURE__ */ jsx23(DialogPrimitive.Overlay, { className: dialogOverlay }),
|
|
2608
|
+
/* @__PURE__ */ jsxs13(
|
|
2366
2609
|
DialogPrimitive.Content,
|
|
2367
2610
|
{
|
|
2368
2611
|
ref,
|
|
@@ -2374,7 +2617,7 @@ var DialogContent = React13.forwardRef(
|
|
|
2374
2617
|
},
|
|
2375
2618
|
children: [
|
|
2376
2619
|
children,
|
|
2377
|
-
showCloseButton && /* @__PURE__ */
|
|
2620
|
+
showCloseButton && /* @__PURE__ */ jsx23(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx23(
|
|
2378
2621
|
"button",
|
|
2379
2622
|
{
|
|
2380
2623
|
className: closeButton,
|
|
@@ -2385,7 +2628,7 @@ var DialogContent = React13.forwardRef(
|
|
|
2385
2628
|
top: "16px",
|
|
2386
2629
|
right: "16px"
|
|
2387
2630
|
},
|
|
2388
|
-
children: /* @__PURE__ */
|
|
2631
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
2389
2632
|
}
|
|
2390
2633
|
) })
|
|
2391
2634
|
]
|
|
@@ -2396,11 +2639,11 @@ var DialogContent = React13.forwardRef(
|
|
|
2396
2639
|
);
|
|
2397
2640
|
DialogContent.displayName = "DialogContent";
|
|
2398
2641
|
var DialogHeader = ({ children, className }) => {
|
|
2399
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ jsx23("div", { className: cn(dialogHeader, className), children });
|
|
2400
2643
|
};
|
|
2401
2644
|
DialogHeader.displayName = "DialogHeader";
|
|
2402
2645
|
var DialogTitle = React13.forwardRef(({ children, className }, ref) => {
|
|
2403
|
-
return /* @__PURE__ */
|
|
2646
|
+
return /* @__PURE__ */ jsx23(DialogPrimitive.Title, { ref, asChild: true, children: /* @__PURE__ */ jsx23(
|
|
2404
2647
|
Text2,
|
|
2405
2648
|
{
|
|
2406
2649
|
fontVariant: "text-l-medium",
|
|
@@ -2412,7 +2655,7 @@ var DialogTitle = React13.forwardRef(({ children, className }, ref) => {
|
|
|
2412
2655
|
});
|
|
2413
2656
|
DialogTitle.displayName = "DialogTitle";
|
|
2414
2657
|
var DialogDescription = React13.forwardRef(({ children, className }, ref) => {
|
|
2415
|
-
return /* @__PURE__ */
|
|
2658
|
+
return /* @__PURE__ */ jsx23(DialogPrimitive.Description, { ref, asChild: true, children: /* @__PURE__ */ jsx23(
|
|
2416
2659
|
Text2,
|
|
2417
2660
|
{
|
|
2418
2661
|
fontVariant: "text-s-regular",
|
|
@@ -2424,11 +2667,11 @@ var DialogDescription = React13.forwardRef(({ children, className }, ref) => {
|
|
|
2424
2667
|
});
|
|
2425
2668
|
DialogDescription.displayName = "DialogDescription";
|
|
2426
2669
|
var DialogBody = ({ children, className, style }) => {
|
|
2427
|
-
return /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ jsx23("div", { className: cn(dialogBody, className), style, children });
|
|
2428
2671
|
};
|
|
2429
2672
|
DialogBody.displayName = "DialogBody";
|
|
2430
2673
|
var DialogFooter = ({ children, className }) => {
|
|
2431
|
-
return /* @__PURE__ */
|
|
2674
|
+
return /* @__PURE__ */ jsx23("div", { className: cn(dialogFooter, className), children });
|
|
2432
2675
|
};
|
|
2433
2676
|
DialogFooter.displayName = "DialogFooter";
|
|
2434
2677
|
var DialogClose = DialogPrimitive.Close;
|
|
@@ -2447,7 +2690,7 @@ var Dialog = Object.assign(DialogRoot, {
|
|
|
2447
2690
|
|
|
2448
2691
|
// src/components/Dialog/AlertDialog.tsx
|
|
2449
2692
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2450
|
-
import { jsx as
|
|
2693
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2451
2694
|
var AlertDialog = ({
|
|
2452
2695
|
layout = "medium",
|
|
2453
2696
|
title,
|
|
@@ -2467,96 +2710,102 @@ var AlertDialog = ({
|
|
|
2467
2710
|
const isMedium = layout === "medium";
|
|
2468
2711
|
const isStacked = layout === "stacked";
|
|
2469
2712
|
const maxWidthStyle = maxWidth ? `${maxWidth / 16}rem` : void 0;
|
|
2470
|
-
return /* @__PURE__ */
|
|
2471
|
-
trigger && /* @__PURE__ */
|
|
2472
|
-
/* @__PURE__ */
|
|
2473
|
-
/* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsxs14(AlertDialogPrimitive.Root, { open, onOpenChange, children: [
|
|
2714
|
+
trigger && /* @__PURE__ */ jsx24(AlertDialogPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
2715
|
+
/* @__PURE__ */ jsxs14(AlertDialogPrimitive.Portal, { children: [
|
|
2716
|
+
/* @__PURE__ */ jsx24(
|
|
2474
2717
|
AlertDialogPrimitive.Overlay,
|
|
2475
2718
|
{
|
|
2476
2719
|
className: alertDialogOverlay,
|
|
2477
2720
|
style: overlayStyles
|
|
2478
2721
|
}
|
|
2479
2722
|
),
|
|
2480
|
-
/* @__PURE__ */
|
|
2723
|
+
/* @__PURE__ */ jsx24(
|
|
2481
2724
|
AlertDialogPrimitive.Content,
|
|
2482
2725
|
{
|
|
2483
2726
|
className: cn(alertDialogContent({ layout })),
|
|
2484
2727
|
style: maxWidthStyle ? { maxWidth: maxWidthStyle } : void 0,
|
|
2485
|
-
children: /* @__PURE__ */
|
|
2728
|
+
children: /* @__PURE__ */ jsxs14(
|
|
2486
2729
|
Stack2,
|
|
2487
2730
|
{
|
|
2488
2731
|
gap: "20",
|
|
2489
2732
|
bgColor: "backgroundPrimary",
|
|
2490
|
-
borderWidth: "
|
|
2733
|
+
borderWidth: "xs",
|
|
2491
2734
|
borderStyle: "solid",
|
|
2492
2735
|
borderColor: "borderQuaternary",
|
|
2493
2736
|
rounded: "lg",
|
|
2494
2737
|
padding: "xl",
|
|
2495
2738
|
shadow: "L4",
|
|
2496
2739
|
children: [
|
|
2497
|
-
/* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ jsxs14(
|
|
2498
2741
|
Stack2,
|
|
2499
2742
|
{
|
|
2500
2743
|
gap: "sm",
|
|
2501
2744
|
alignItems: isStacked ? "center" : "start",
|
|
2502
2745
|
textAlign: isStacked ? "center" : "left",
|
|
2503
2746
|
children: [
|
|
2504
|
-
/* @__PURE__ */
|
|
2505
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ jsx24(AlertDialogPrimitive.Title, { asChild: true, children: /* @__PURE__ */ jsx24(Heading2, { fontVariant: "heading-s-semibold", color: "contentPrimary", children: title }) }),
|
|
2748
|
+
/* @__PURE__ */ jsx24(AlertDialogPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx24(Text2, { fontVariant: "text-l-regular", color: "contentPrimary", children: description }) })
|
|
2506
2749
|
]
|
|
2507
2750
|
}
|
|
2508
2751
|
),
|
|
2509
|
-
isMedium ? /* @__PURE__ */
|
|
2510
|
-
/* @__PURE__ */
|
|
2752
|
+
isMedium ? /* @__PURE__ */ jsxs14(Inline2, { gap: "md", justifyContent: "end", children: [
|
|
2753
|
+
/* @__PURE__ */ jsx24(AlertDialogPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2511
2754
|
Button,
|
|
2512
2755
|
{
|
|
2513
2756
|
variant: footerButtonConfig?.secondary?.variant || "outline",
|
|
2757
|
+
size: "md",
|
|
2514
2758
|
onClick: onCancel,
|
|
2515
2759
|
...footerButtonConfig?.secondary,
|
|
2516
2760
|
children: cancelText
|
|
2517
2761
|
}
|
|
2518
2762
|
) }),
|
|
2519
|
-
preventCloseOnAction ? /* @__PURE__ */
|
|
2763
|
+
preventCloseOnAction ? /* @__PURE__ */ jsx24(
|
|
2520
2764
|
Button,
|
|
2521
2765
|
{
|
|
2522
2766
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2767
|
+
size: "md",
|
|
2523
2768
|
...footerButtonConfig?.primary,
|
|
2524
2769
|
onClick: onContinue,
|
|
2525
2770
|
children: continueText
|
|
2526
2771
|
}
|
|
2527
|
-
) : /* @__PURE__ */
|
|
2772
|
+
) : /* @__PURE__ */ jsx24(AlertDialogPrimitive.Action, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2528
2773
|
Button,
|
|
2529
2774
|
{
|
|
2530
2775
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2776
|
+
size: "md",
|
|
2531
2777
|
...footerButtonConfig?.primary,
|
|
2532
2778
|
onClick: onContinue,
|
|
2533
2779
|
children: continueText
|
|
2534
2780
|
}
|
|
2535
2781
|
) })
|
|
2536
|
-
] }) : /* @__PURE__ */
|
|
2537
|
-
preventCloseOnAction ? /* @__PURE__ */
|
|
2782
|
+
] }) : /* @__PURE__ */ jsxs14(Stack2, { gap: "md", children: [
|
|
2783
|
+
preventCloseOnAction ? /* @__PURE__ */ jsx24(
|
|
2538
2784
|
Button,
|
|
2539
2785
|
{
|
|
2540
2786
|
onClick: onContinue,
|
|
2541
2787
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2788
|
+
size: "md",
|
|
2542
2789
|
...footerButtonConfig?.primary,
|
|
2543
2790
|
style: { width: "100%" },
|
|
2544
2791
|
children: continueText
|
|
2545
2792
|
}
|
|
2546
|
-
) : /* @__PURE__ */
|
|
2793
|
+
) : /* @__PURE__ */ jsx24(AlertDialogPrimitive.Action, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2547
2794
|
Button,
|
|
2548
2795
|
{
|
|
2549
2796
|
onClick: onContinue,
|
|
2550
2797
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2798
|
+
size: "md",
|
|
2551
2799
|
...footerButtonConfig?.primary,
|
|
2552
2800
|
style: { width: "100%" },
|
|
2553
2801
|
children: continueText
|
|
2554
2802
|
}
|
|
2555
2803
|
) }),
|
|
2556
|
-
/* @__PURE__ */
|
|
2804
|
+
/* @__PURE__ */ jsx24(AlertDialogPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2557
2805
|
Button,
|
|
2558
2806
|
{
|
|
2559
2807
|
variant: footerButtonConfig?.secondary?.variant || "outline",
|
|
2808
|
+
size: "md",
|
|
2560
2809
|
onClick: onCancel,
|
|
2561
2810
|
...footerButtonConfig?.secondary,
|
|
2562
2811
|
style: { width: "100%" },
|
|
@@ -2579,93 +2828,22 @@ import * as React14 from "react";
|
|
|
2579
2828
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
2580
2829
|
|
|
2581
2830
|
// src/components/Toast/toast.css.ts
|
|
2582
|
-
|
|
2583
|
-
var toastCloseButton = "toast_toastCloseButton__1c9srd8h";
|
|
2584
|
-
var toastContent = "toast_toastContent__1c9srd8j";
|
|
2585
|
-
var toastDescription = "toast_toastDescription__1c9srd8g";
|
|
2586
|
-
var toastIcon = "toast_toastIcon__1c9srd8i";
|
|
2587
|
-
var toastRoot = _7a46813({ defaultClassName: "toast_toastRoot__1c9srd89", variantClassNames: { variant: { "default": "toast_toastRoot_variant_default__1c9srd8a", info: "toast_toastRoot_variant_info__1c9srd8b", success: "toast_toastRoot_variant_success__1c9srd8c", warning: "toast_toastRoot_variant_warning__1c9srd8d", error: "toast_toastRoot_variant_error__1c9srd8e" } }, defaultVariants: { variant: "default" }, compoundVariants: [] });
|
|
2588
|
-
var toastTitle = "toast_toastTitle__1c9srd8f";
|
|
2589
|
-
var toastViewportPositions = { "top-left": "toast_toastViewportPositions_top-left__1c9srd80", "top-center": "toast_toastViewportPositions_top-center__1c9srd81", "top-right": "toast_toastViewportPositions_top-right__1c9srd82", "bottom-left": "toast_toastViewportPositions_bottom-left__1c9srd83", "bottom-center": "toast_toastViewportPositions_bottom-center__1c9srd84", "bottom-right": "toast_toastViewportPositions_bottom-right__1c9srd85" };
|
|
2590
|
-
var toastViewportStyle = "toast_toastViewportStyle__1c9srd86";
|
|
2831
|
+
var toastRootAnimation = "toast_toastRootAnimation__1c9srd82";
|
|
2591
2832
|
|
|
2592
2833
|
// src/components/Toast/Toast.tsx
|
|
2593
|
-
import {
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
strokeWidth: "2",
|
|
2603
|
-
strokeLinecap: "round",
|
|
2604
|
-
strokeLinejoin: "round",
|
|
2605
|
-
children: [
|
|
2606
|
-
/* @__PURE__ */ jsx22("path", { d: "M18 6 6 18" }),
|
|
2607
|
-
/* @__PURE__ */ jsx22("path", { d: "m6 6 12 12" })
|
|
2608
|
-
]
|
|
2609
|
-
}
|
|
2610
|
-
);
|
|
2611
|
-
var InfoIcon = () => /* @__PURE__ */ jsxs14(
|
|
2612
|
-
"svg",
|
|
2613
|
-
{
|
|
2614
|
-
width: "20",
|
|
2615
|
-
height: "20",
|
|
2616
|
-
viewBox: "0 0 24 24",
|
|
2617
|
-
fill: "none",
|
|
2618
|
-
stroke: "currentColor",
|
|
2619
|
-
strokeWidth: "2",
|
|
2620
|
-
strokeLinecap: "round",
|
|
2621
|
-
strokeLinejoin: "round",
|
|
2622
|
-
children: [
|
|
2623
|
-
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2624
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 16v-4" }),
|
|
2625
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 8h.01" })
|
|
2626
|
-
]
|
|
2627
|
-
}
|
|
2628
|
-
);
|
|
2629
|
-
var SuccessIcon = () => /* @__PURE__ */ jsxs14(
|
|
2630
|
-
"svg",
|
|
2631
|
-
{
|
|
2632
|
-
width: "20",
|
|
2633
|
-
height: "20",
|
|
2634
|
-
viewBox: "0 0 24 24",
|
|
2635
|
-
fill: "none",
|
|
2636
|
-
stroke: "currentColor",
|
|
2637
|
-
strokeWidth: "2",
|
|
2638
|
-
strokeLinecap: "round",
|
|
2639
|
-
strokeLinejoin: "round",
|
|
2640
|
-
children: [
|
|
2641
|
-
/* @__PURE__ */ jsx22("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
2642
|
-
/* @__PURE__ */ jsx22("path", { d: "m9 11 3 3L22 4" })
|
|
2643
|
-
]
|
|
2644
|
-
}
|
|
2645
|
-
);
|
|
2646
|
-
var WarningIcon = () => /* @__PURE__ */ jsxs14(
|
|
2647
|
-
"svg",
|
|
2648
|
-
{
|
|
2649
|
-
width: "20",
|
|
2650
|
-
height: "20",
|
|
2651
|
-
viewBox: "0 0 24 24",
|
|
2652
|
-
fill: "none",
|
|
2653
|
-
stroke: "currentColor",
|
|
2654
|
-
strokeWidth: "2",
|
|
2655
|
-
strokeLinecap: "round",
|
|
2656
|
-
strokeLinejoin: "round",
|
|
2657
|
-
children: [
|
|
2658
|
-
/* @__PURE__ */ jsx22("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
2659
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 9v4" }),
|
|
2660
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 17h.01" })
|
|
2661
|
-
]
|
|
2662
|
-
}
|
|
2663
|
-
);
|
|
2664
|
-
var ErrorIcon = () => /* @__PURE__ */ jsxs14(
|
|
2834
|
+
import { SEMANTIC_SPACING, Z_INDEX } from "@zentrades-ui/tokens";
|
|
2835
|
+
import {
|
|
2836
|
+
CloseIcon as CloseIcon2,
|
|
2837
|
+
InfoIcon,
|
|
2838
|
+
CheckCircleIcon,
|
|
2839
|
+
AlertCircleIcon
|
|
2840
|
+
} from "@zentrades-ui/icons";
|
|
2841
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2842
|
+
var WarningIcon = () => /* @__PURE__ */ jsxs15(
|
|
2665
2843
|
"svg",
|
|
2666
2844
|
{
|
|
2667
|
-
width: "
|
|
2668
|
-
height: "
|
|
2845
|
+
width: "24",
|
|
2846
|
+
height: "24",
|
|
2669
2847
|
viewBox: "0 0 24 24",
|
|
2670
2848
|
fill: "none",
|
|
2671
2849
|
stroke: "currentColor",
|
|
@@ -2673,24 +2851,51 @@ var ErrorIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2673
2851
|
strokeLinecap: "round",
|
|
2674
2852
|
strokeLinejoin: "round",
|
|
2675
2853
|
children: [
|
|
2676
|
-
/* @__PURE__ */
|
|
2677
|
-
/* @__PURE__ */
|
|
2678
|
-
/* @__PURE__ */
|
|
2854
|
+
/* @__PURE__ */ jsx25("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
2855
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 9v4" }),
|
|
2856
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 17h.01" })
|
|
2679
2857
|
]
|
|
2680
2858
|
}
|
|
2681
2859
|
);
|
|
2682
2860
|
var getIconForVariant = (variant) => {
|
|
2683
2861
|
switch (variant) {
|
|
2684
2862
|
case "info":
|
|
2685
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ jsx25(InfoIcon, { size: "24" });
|
|
2686
2864
|
case "success":
|
|
2687
|
-
return /* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ jsx25(CheckCircleIcon, { size: "24" });
|
|
2688
2866
|
case "warning":
|
|
2689
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ jsx25(WarningIcon, {});
|
|
2690
2868
|
case "error":
|
|
2691
|
-
return /* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ jsx25(AlertCircleIcon, { size: "24" });
|
|
2692
2870
|
default:
|
|
2693
|
-
return /* @__PURE__ */
|
|
2871
|
+
return /* @__PURE__ */ jsx25(InfoIcon, { size: "24" });
|
|
2872
|
+
}
|
|
2873
|
+
};
|
|
2874
|
+
var variantStyles = {
|
|
2875
|
+
default: {
|
|
2876
|
+
bgColor: "backgroundPrimary",
|
|
2877
|
+
borderColor: "borderPrimary",
|
|
2878
|
+
color: "contentPrimary"
|
|
2879
|
+
},
|
|
2880
|
+
info: {
|
|
2881
|
+
bgColor: "backgroundInfoSubtle",
|
|
2882
|
+
borderColor: "borderInfo",
|
|
2883
|
+
color: "contentInfo"
|
|
2884
|
+
},
|
|
2885
|
+
success: {
|
|
2886
|
+
bgColor: "backgroundPositiveSubtle",
|
|
2887
|
+
borderColor: "borderPositive",
|
|
2888
|
+
color: "contentPositive"
|
|
2889
|
+
},
|
|
2890
|
+
warning: {
|
|
2891
|
+
bgColor: "backgroundNoticeSubtle",
|
|
2892
|
+
borderColor: "borderNotice",
|
|
2893
|
+
color: "contentNotice"
|
|
2894
|
+
},
|
|
2895
|
+
error: {
|
|
2896
|
+
bgColor: "backgroundNegativeSubtle",
|
|
2897
|
+
borderColor: "borderNegative",
|
|
2898
|
+
color: "contentNegative"
|
|
2694
2899
|
}
|
|
2695
2900
|
};
|
|
2696
2901
|
var Toast = React14.forwardRef(
|
|
@@ -2706,22 +2911,61 @@ var Toast = React14.forwardRef(
|
|
|
2706
2911
|
showClose = true
|
|
2707
2912
|
}, ref) => {
|
|
2708
2913
|
const displayIcon = icon !== void 0 ? icon : getIconForVariant(variant);
|
|
2709
|
-
|
|
2914
|
+
const hasDescription = Boolean(description);
|
|
2915
|
+
const variantStyle = variantStyles[variant];
|
|
2916
|
+
return /* @__PURE__ */ jsx25(
|
|
2710
2917
|
ToastPrimitive.Root,
|
|
2711
2918
|
{
|
|
2712
2919
|
ref,
|
|
2713
2920
|
open,
|
|
2714
2921
|
onOpenChange,
|
|
2715
2922
|
duration,
|
|
2716
|
-
className: cn(
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2923
|
+
className: cn(toastRootAnimation, className),
|
|
2924
|
+
asChild: true,
|
|
2925
|
+
children: /* @__PURE__ */ jsxs15(
|
|
2926
|
+
Box2,
|
|
2927
|
+
{
|
|
2928
|
+
as: "li",
|
|
2929
|
+
display: "flex",
|
|
2930
|
+
alignItems: hasDescription ? "start" : "center",
|
|
2931
|
+
gap: "sm",
|
|
2932
|
+
paddingY: "md",
|
|
2933
|
+
paddingX: "lg",
|
|
2934
|
+
rounded: "md",
|
|
2935
|
+
borderWidth: "s",
|
|
2936
|
+
borderStyle: "solid",
|
|
2937
|
+
shadow: "L5",
|
|
2938
|
+
bgColor: variantStyle.bgColor,
|
|
2939
|
+
borderColor: variantStyle.borderColor,
|
|
2940
|
+
style: { width: 412 },
|
|
2941
|
+
children: [
|
|
2942
|
+
displayIcon && /* @__PURE__ */ jsx25(
|
|
2943
|
+
Box2,
|
|
2944
|
+
{
|
|
2945
|
+
display: "flex",
|
|
2946
|
+
alignItems: "center",
|
|
2947
|
+
justifyContent: "center",
|
|
2948
|
+
size: "24",
|
|
2949
|
+
color: variantStyle.color,
|
|
2950
|
+
children: displayIcon
|
|
2951
|
+
}
|
|
2952
|
+
),
|
|
2953
|
+
/* @__PURE__ */ jsxs15(Stack2, { gap: "2xs", flex: "1", style: { minWidth: 0 }, children: [
|
|
2954
|
+
/* @__PURE__ */ jsx25(ToastPrimitive.Title, { asChild: true, children: /* @__PURE__ */ jsx25(
|
|
2955
|
+
Heading2,
|
|
2956
|
+
{
|
|
2957
|
+
as: "span",
|
|
2958
|
+
fontVariant: "heading-xs-semibold",
|
|
2959
|
+
color: variantStyle.color,
|
|
2960
|
+
children: title
|
|
2961
|
+
}
|
|
2962
|
+
) }),
|
|
2963
|
+
description && /* @__PURE__ */ jsx25(ToastPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx25(Text2, { fontVariant: "text-s-regular", color: "contentTertiary", children: description }) })
|
|
2964
|
+
] }),
|
|
2965
|
+
showClose && /* @__PURE__ */ jsx25(ToastPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx25(Button, { variant: "text", size: "sm", icon: /* @__PURE__ */ jsx25(CloseIcon2, {}) }) })
|
|
2966
|
+
]
|
|
2967
|
+
}
|
|
2968
|
+
)
|
|
2725
2969
|
}
|
|
2726
2970
|
);
|
|
2727
2971
|
}
|
|
@@ -2730,16 +2974,42 @@ Toast.displayName = "Toast";
|
|
|
2730
2974
|
var ToastProvider = ToastPrimitive.Provider;
|
|
2731
2975
|
ToastProvider.displayName = "ToastProvider";
|
|
2732
2976
|
var ToastViewport = React14.forwardRef(({ position = "bottom-right", className, ...props }, ref) => {
|
|
2733
|
-
|
|
2977
|
+
const positionStyle = (() => {
|
|
2978
|
+
switch (position) {
|
|
2979
|
+
case "top-left":
|
|
2980
|
+
return { top: 16, left: 16 };
|
|
2981
|
+
case "top-center":
|
|
2982
|
+
return { top: 16, left: "50%", transform: "translateX(-50%)" };
|
|
2983
|
+
case "top-right":
|
|
2984
|
+
return { top: 16, right: 16 };
|
|
2985
|
+
case "bottom-left":
|
|
2986
|
+
return { bottom: 16, left: 16 };
|
|
2987
|
+
case "bottom-center":
|
|
2988
|
+
return { bottom: 16, left: "50%", transform: "translateX(-50%)" };
|
|
2989
|
+
case "bottom-right":
|
|
2990
|
+
default:
|
|
2991
|
+
return { bottom: 16, right: 16 };
|
|
2992
|
+
}
|
|
2993
|
+
})();
|
|
2994
|
+
return /* @__PURE__ */ jsx25(
|
|
2734
2995
|
ToastPrimitive.Viewport,
|
|
2735
2996
|
{
|
|
2736
2997
|
ref,
|
|
2737
2998
|
...props,
|
|
2738
|
-
className
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2999
|
+
className,
|
|
3000
|
+
style: {
|
|
3001
|
+
position: "fixed",
|
|
3002
|
+
display: "flex",
|
|
3003
|
+
flexDirection: "column",
|
|
3004
|
+
gap: SEMANTIC_SPACING.sm,
|
|
3005
|
+
padding: SEMANTIC_SPACING.lg,
|
|
3006
|
+
margin: 0,
|
|
3007
|
+
width: 420,
|
|
3008
|
+
listStyle: "none",
|
|
3009
|
+
maxWidth: "100vw",
|
|
3010
|
+
zIndex: Z_INDEX.TOAST,
|
|
3011
|
+
...positionStyle
|
|
3012
|
+
}
|
|
2743
3013
|
}
|
|
2744
3014
|
);
|
|
2745
3015
|
});
|
|
@@ -2767,14 +3037,11 @@ var toastReducer = (state, action) => {
|
|
|
2767
3037
|
};
|
|
2768
3038
|
var useToast = () => {
|
|
2769
3039
|
const [state, dispatch] = React14.useReducer(toastReducer, { toasts: [] });
|
|
2770
|
-
const toast = React14.useCallback(
|
|
2771
|
-
(
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
},
|
|
2776
|
-
[]
|
|
2777
|
-
);
|
|
3040
|
+
const toast = React14.useCallback((props) => {
|
|
3041
|
+
const id = Math.random().toString(36).substring(2, 9);
|
|
3042
|
+
dispatch({ type: "ADD_TOAST", toast: { ...props, id } });
|
|
3043
|
+
return id;
|
|
3044
|
+
}, []);
|
|
2778
3045
|
const dismiss = React14.useCallback((id) => {
|
|
2779
3046
|
dispatch({ type: "REMOVE_TOAST", id });
|
|
2780
3047
|
}, []);
|
|
@@ -2794,14 +3061,14 @@ import * as React15 from "react";
|
|
|
2794
3061
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2795
3062
|
|
|
2796
3063
|
// src/components/Popover/popover.css.ts
|
|
2797
|
-
import { createRuntimeFn as
|
|
3064
|
+
import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2798
3065
|
var popoverArrow = "popover_popoverArrow__qv1k3x9";
|
|
2799
3066
|
var popoverClose = "popover_popoverClose__qv1k3xa";
|
|
2800
|
-
var popoverContent =
|
|
3067
|
+
var popoverContent = _7a46813({ 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: [] });
|
|
2801
3068
|
|
|
2802
3069
|
// src/components/Popover/Popover.tsx
|
|
2803
|
-
import { jsx as
|
|
2804
|
-
var CloseIcon3 = () => /* @__PURE__ */
|
|
3070
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3071
|
+
var CloseIcon3 = () => /* @__PURE__ */ jsxs16(
|
|
2805
3072
|
"svg",
|
|
2806
3073
|
{
|
|
2807
3074
|
width: "16",
|
|
@@ -2813,15 +3080,15 @@ var CloseIcon3 = () => /* @__PURE__ */ jsxs15(
|
|
|
2813
3080
|
strokeLinecap: "round",
|
|
2814
3081
|
strokeLinejoin: "round",
|
|
2815
3082
|
children: [
|
|
2816
|
-
/* @__PURE__ */
|
|
2817
|
-
/* @__PURE__ */
|
|
3083
|
+
/* @__PURE__ */ jsx26("path", { d: "M18 6 6 18" }),
|
|
3084
|
+
/* @__PURE__ */ jsx26("path", { d: "m6 6 12 12" })
|
|
2818
3085
|
]
|
|
2819
3086
|
}
|
|
2820
3087
|
);
|
|
2821
3088
|
var PopoverRoot = PopoverPrimitive.Root;
|
|
2822
3089
|
PopoverRoot.displayName = "PopoverRoot";
|
|
2823
3090
|
var PopoverTrigger = React15.forwardRef(({ children, ...props }, ref) => {
|
|
2824
|
-
return /* @__PURE__ */
|
|
3091
|
+
return /* @__PURE__ */ jsx26(PopoverPrimitive.Trigger, { ref, asChild: true, ...props, children });
|
|
2825
3092
|
});
|
|
2826
3093
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
2827
3094
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
@@ -2837,7 +3104,7 @@ var PopoverContent = React15.forwardRef(
|
|
|
2837
3104
|
onClose,
|
|
2838
3105
|
...props
|
|
2839
3106
|
}, ref) => {
|
|
2840
|
-
return /* @__PURE__ */
|
|
3107
|
+
return /* @__PURE__ */ jsx26(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs16(
|
|
2841
3108
|
PopoverPrimitive.Content,
|
|
2842
3109
|
{
|
|
2843
3110
|
ref,
|
|
@@ -2846,14 +3113,14 @@ var PopoverContent = React15.forwardRef(
|
|
|
2846
3113
|
...props,
|
|
2847
3114
|
children: [
|
|
2848
3115
|
children,
|
|
2849
|
-
showArrow && /* @__PURE__ */
|
|
2850
|
-
showClose && /* @__PURE__ */
|
|
3116
|
+
showArrow && /* @__PURE__ */ jsx26(PopoverPrimitive.Arrow, { className: popoverArrow, width: 12, height: 6 }),
|
|
3117
|
+
showClose && /* @__PURE__ */ jsx26(
|
|
2851
3118
|
PopoverPrimitive.Close,
|
|
2852
3119
|
{
|
|
2853
3120
|
className: popoverClose,
|
|
2854
3121
|
"aria-label": "Close",
|
|
2855
3122
|
onClick: onClose,
|
|
2856
|
-
children: /* @__PURE__ */
|
|
3123
|
+
children: /* @__PURE__ */ jsx26(CloseIcon3, {})
|
|
2857
3124
|
}
|
|
2858
3125
|
)
|
|
2859
3126
|
]
|
|
@@ -2879,9 +3146,9 @@ var Popover = ({
|
|
|
2879
3146
|
showClose = false,
|
|
2880
3147
|
modal = false
|
|
2881
3148
|
}) => {
|
|
2882
|
-
return /* @__PURE__ */
|
|
2883
|
-
/* @__PURE__ */
|
|
2884
|
-
/* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ jsxs16(PopoverRoot, { open, defaultOpen, onOpenChange, modal, children: [
|
|
3150
|
+
/* @__PURE__ */ jsx26(PopoverTrigger, { children: trigger }),
|
|
3151
|
+
/* @__PURE__ */ jsx26(
|
|
2885
3152
|
PopoverContent,
|
|
2886
3153
|
{
|
|
2887
3154
|
side,
|
|
@@ -2909,30 +3176,30 @@ var PopoverCompound = Object.assign(Popover, {
|
|
|
2909
3176
|
// src/components/Tabs/Tabs.tsx
|
|
2910
3177
|
import React16, {
|
|
2911
3178
|
createContext as createContext2,
|
|
2912
|
-
forwardRef as
|
|
3179
|
+
forwardRef as forwardRef22,
|
|
2913
3180
|
useContext as useContext2
|
|
2914
3181
|
} from "react";
|
|
2915
3182
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2916
3183
|
|
|
2917
3184
|
// src/components/Tabs/tabs.css.ts
|
|
2918
|
-
import { createRuntimeFn as
|
|
3185
|
+
import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2919
3186
|
var labelText = "tabs_labelText__1c5op4v1";
|
|
2920
3187
|
var tabContent = "tabs_tabContent__1c5op4vi";
|
|
2921
|
-
var tabItem =
|
|
2922
|
-
var tabsList =
|
|
3188
|
+
var tabItem = _7a46814({ defaultClassName: "tabs_tabItem__1c5op4v7", variantClassNames: { variant: { pills: "tabs_tabItem_variant_pills__1c5op4v8", underline: "tabs_tabItem_variant_underline__1c5op4v9" }, itemVariant: { "default": "tabs_tabItem_itemVariant_default__1c5op4va", icon: "tabs_tabItem_itemVariant_icon__1c5op4vb", onlyIcon: "tabs_tabItem_itemVariant_onlyIcon__1c5op4vc" }, state: { "default": "tabs_tabItem_state_default__1c5op4vd", selected: "tabs_tabItem_state_selected__1c5op4ve" } }, defaultVariants: { variant: "pills", itemVariant: "default", state: "default" }, compoundVariants: [[{ variant: "pills", state: "selected" }, "tabs_tabItem_compound_0__1c5op4vf"], [{ variant: "underline", state: "selected" }, "tabs_tabItem_compound_1__1c5op4vg"], [{ variant: "underline", state: "default" }, "tabs_tabItem_compound_2__1c5op4vh"]] });
|
|
3189
|
+
var tabsList = _7a46814({ 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: [] });
|
|
2923
3190
|
|
|
2924
3191
|
// src/components/Tabs/Tabs.tsx
|
|
2925
|
-
import { jsx as
|
|
3192
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2926
3193
|
var TabsContext = createContext2({ variant: "pills" });
|
|
2927
3194
|
var useTabsContext = () => useContext2(TabsContext);
|
|
2928
|
-
var TabsRoot =
|
|
2929
|
-
return /* @__PURE__ */
|
|
3195
|
+
var TabsRoot = forwardRef22(({ variant = "pills", children, ...props }, ref) => {
|
|
3196
|
+
return /* @__PURE__ */ jsx27(TabsContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx27(TabsPrimitive.Root, { ref, ...props, children }) });
|
|
2930
3197
|
});
|
|
2931
3198
|
TabsRoot.displayName = "Tabs.Root";
|
|
2932
|
-
var TabsList =
|
|
3199
|
+
var TabsList = forwardRef22(({ variant, fullWidth = false, className, children, ...props }, ref) => {
|
|
2933
3200
|
const context = useTabsContext();
|
|
2934
3201
|
const resolvedVariant = variant ?? context.variant;
|
|
2935
|
-
return /* @__PURE__ */
|
|
3202
|
+
return /* @__PURE__ */ jsx27(
|
|
2936
3203
|
TabsPrimitive.List,
|
|
2937
3204
|
{
|
|
2938
3205
|
ref,
|
|
@@ -2946,11 +3213,11 @@ var TabsList = forwardRef21(({ variant, fullWidth = false, className, children,
|
|
|
2946
3213
|
);
|
|
2947
3214
|
});
|
|
2948
3215
|
TabsList.displayName = "Tabs.List";
|
|
2949
|
-
var TabsTrigger =
|
|
3216
|
+
var TabsTrigger = forwardRef22(({ value, icon, children, className, disabled, variant, ...props }, ref) => {
|
|
2950
3217
|
const context = useTabsContext();
|
|
2951
3218
|
const resolvedVariant = variant ?? context.variant;
|
|
2952
3219
|
const itemVariant = !children && icon ? "onlyIcon" : children && icon ? "icon" : "default";
|
|
2953
|
-
return /* @__PURE__ */
|
|
3220
|
+
return /* @__PURE__ */ jsx27(
|
|
2954
3221
|
TabsPrimitive.Trigger,
|
|
2955
3222
|
{
|
|
2956
3223
|
ref,
|
|
@@ -2966,12 +3233,12 @@ var TabsTrigger = forwardRef21(({ value, icon, children, className, disabled, va
|
|
|
2966
3233
|
),
|
|
2967
3234
|
"data-variant": resolvedVariant,
|
|
2968
3235
|
...props,
|
|
2969
|
-
children: /* @__PURE__ */
|
|
3236
|
+
children: /* @__PURE__ */ jsxs17(Inline2, { gap: "sm", alignItems: "center", justifyContent: "center", children: [
|
|
2970
3237
|
icon && React16.cloneElement(icon, {
|
|
2971
3238
|
size: "20",
|
|
2972
3239
|
style: { color: "inherit" }
|
|
2973
3240
|
}),
|
|
2974
|
-
children && /* @__PURE__ */
|
|
3241
|
+
children && /* @__PURE__ */ jsx27(
|
|
2975
3242
|
Text2,
|
|
2976
3243
|
{
|
|
2977
3244
|
fontVariant: "text-m-medium",
|
|
@@ -2985,8 +3252,8 @@ var TabsTrigger = forwardRef21(({ value, icon, children, className, disabled, va
|
|
|
2985
3252
|
);
|
|
2986
3253
|
});
|
|
2987
3254
|
TabsTrigger.displayName = "Tabs.Trigger";
|
|
2988
|
-
var TabsContent =
|
|
2989
|
-
return /* @__PURE__ */
|
|
3255
|
+
var TabsContent = forwardRef22(({ className, children, ...props }, ref) => {
|
|
3256
|
+
return /* @__PURE__ */ jsx27(
|
|
2990
3257
|
TabsPrimitive.Content,
|
|
2991
3258
|
{
|
|
2992
3259
|
ref,
|
|
@@ -3005,14 +3272,14 @@ var Tabs = Object.assign(TabsRoot, {
|
|
|
3005
3272
|
});
|
|
3006
3273
|
|
|
3007
3274
|
// src/components/Drawer/Drawer.tsx
|
|
3008
|
-
import { forwardRef as
|
|
3275
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
3009
3276
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
3010
3277
|
|
|
3011
3278
|
// src/components/Drawer/drawer.css.ts
|
|
3012
|
-
import { createRuntimeFn as
|
|
3279
|
+
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3013
3280
|
var closeButton2 = "drawer_closeButton__4fc39fj";
|
|
3014
3281
|
var drawerBody = "drawer_drawerBody__4fc39fh";
|
|
3015
|
-
var drawerContent =
|
|
3282
|
+
var drawerContent = _7a46815({ defaultClassName: "drawer_drawerContent__4fc39f7", variantClassNames: { side: { right: "drawer_drawerContent_side_right__4fc39f8", left: "drawer_drawerContent_side_left__4fc39f9" }, size: { sm: "drawer_drawerContent_size_sm__4fc39fa", md: "drawer_drawerContent_size_md__4fc39fb", lg: "drawer_drawerContent_size_lg__4fc39fc", xl: "drawer_drawerContent_size_xl__4fc39fd" } }, defaultVariants: { side: "right", size: "lg" }, compoundVariants: [] });
|
|
3016
3283
|
var drawerDescription = "drawer_drawerDescription__4fc39fg";
|
|
3017
3284
|
var drawerFooter = "drawer_drawerFooter__4fc39fi";
|
|
3018
3285
|
var drawerHeader = "drawer_drawerHeader__4fc39fe";
|
|
@@ -3025,8 +3292,8 @@ var sectionHeader = "drawer_sectionHeader__4fc39fl";
|
|
|
3025
3292
|
var sectionText = "drawer_sectionText__4fc39fm";
|
|
3026
3293
|
|
|
3027
3294
|
// src/components/Drawer/Drawer.tsx
|
|
3028
|
-
import { jsx as
|
|
3029
|
-
var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */
|
|
3295
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3296
|
+
var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */ jsxs18(
|
|
3030
3297
|
"svg",
|
|
3031
3298
|
{
|
|
3032
3299
|
width: size,
|
|
@@ -3038,8 +3305,8 @@ var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */ jsxs17(
|
|
|
3038
3305
|
strokeLinecap: "round",
|
|
3039
3306
|
strokeLinejoin: "round",
|
|
3040
3307
|
children: [
|
|
3041
|
-
/* @__PURE__ */
|
|
3042
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ jsx28("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3309
|
+
/* @__PURE__ */ jsx28("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3043
3310
|
]
|
|
3044
3311
|
}
|
|
3045
3312
|
);
|
|
@@ -3047,8 +3314,8 @@ var DrawerRoot = DialogPrimitive2.Root;
|
|
|
3047
3314
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
3048
3315
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
3049
3316
|
var DrawerClose = DialogPrimitive2.Close;
|
|
3050
|
-
var DrawerOverlay =
|
|
3051
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3317
|
+
var DrawerOverlay = forwardRef23(
|
|
3318
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
3052
3319
|
DialogPrimitive2.Overlay,
|
|
3053
3320
|
{
|
|
3054
3321
|
ref,
|
|
@@ -3058,8 +3325,8 @@ var DrawerOverlay = forwardRef22(
|
|
|
3058
3325
|
)
|
|
3059
3326
|
);
|
|
3060
3327
|
DrawerOverlay.displayName = "Drawer.Overlay";
|
|
3061
|
-
var DrawerContent =
|
|
3062
|
-
({ children, className, side = "right", size = "lg", ...props }, ref) => /* @__PURE__ */
|
|
3328
|
+
var DrawerContent = forwardRef23(
|
|
3329
|
+
({ children, className, side = "right", size = "lg", ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
3063
3330
|
DialogPrimitive2.Content,
|
|
3064
3331
|
{
|
|
3065
3332
|
ref,
|
|
@@ -3070,7 +3337,7 @@ var DrawerContent = forwardRef22(
|
|
|
3070
3337
|
)
|
|
3071
3338
|
);
|
|
3072
3339
|
DrawerContent.displayName = "Drawer.Content";
|
|
3073
|
-
var DrawerHeader =
|
|
3340
|
+
var DrawerHeader = forwardRef23(
|
|
3074
3341
|
({
|
|
3075
3342
|
className,
|
|
3076
3343
|
title,
|
|
@@ -3078,21 +3345,21 @@ var DrawerHeader = forwardRef22(
|
|
|
3078
3345
|
showCloseButton = true,
|
|
3079
3346
|
closeLabel = "Close drawer",
|
|
3080
3347
|
...props
|
|
3081
|
-
}, ref) => title || children ? /* @__PURE__ */
|
|
3082
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
3083
|
-
showCloseButton && /* @__PURE__ */
|
|
3348
|
+
}, ref) => title || children ? /* @__PURE__ */ jsxs18("header", { ref, className: cn(drawerHeader, className), ...props, children: [
|
|
3349
|
+
typeof title === "string" ? /* @__PURE__ */ jsx28(Text2, { fontVariant: "text-xl-medium", color: "contentPrimary", children: title }) : title || children,
|
|
3350
|
+
showCloseButton && /* @__PURE__ */ jsx28(
|
|
3084
3351
|
DialogPrimitive2.Close,
|
|
3085
3352
|
{
|
|
3086
3353
|
className: closeButton2,
|
|
3087
3354
|
"aria-label": closeLabel,
|
|
3088
|
-
children: /* @__PURE__ */
|
|
3355
|
+
children: /* @__PURE__ */ jsx28(CloseIcon4, { size: "20" })
|
|
3089
3356
|
}
|
|
3090
3357
|
)
|
|
3091
3358
|
] }) : null
|
|
3092
3359
|
);
|
|
3093
3360
|
DrawerHeader.displayName = "Drawer.Header";
|
|
3094
|
-
var DrawerTitle =
|
|
3095
|
-
({ children, className, ...props }, ref) => /* @__PURE__ */
|
|
3361
|
+
var DrawerTitle = forwardRef23(
|
|
3362
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ jsx28(DialogPrimitive2.Title, { asChild: true, ref, ...props, children: /* @__PURE__ */ jsx28(
|
|
3096
3363
|
Text2,
|
|
3097
3364
|
{
|
|
3098
3365
|
as: "h2",
|
|
@@ -3103,7 +3370,7 @@ var DrawerTitle = forwardRef22(
|
|
|
3103
3370
|
) })
|
|
3104
3371
|
);
|
|
3105
3372
|
DrawerTitle.displayName = "Drawer.Title";
|
|
3106
|
-
var DrawerDescription =
|
|
3373
|
+
var DrawerDescription = forwardRef23(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx28(DialogPrimitive2.Description, { asChild: true, ref, ...props, children: /* @__PURE__ */ jsx28(
|
|
3107
3374
|
Text2,
|
|
3108
3375
|
{
|
|
3109
3376
|
as: "p",
|
|
@@ -3113,12 +3380,12 @@ var DrawerDescription = forwardRef22(({ children, className, ...props }, ref) =>
|
|
|
3113
3380
|
}
|
|
3114
3381
|
) }));
|
|
3115
3382
|
DrawerDescription.displayName = "Drawer.Description";
|
|
3116
|
-
var DrawerBody =
|
|
3117
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3383
|
+
var DrawerBody = forwardRef23(
|
|
3384
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, className: cn(drawerBody, className), ...props })
|
|
3118
3385
|
);
|
|
3119
3386
|
DrawerBody.displayName = "Drawer.Body";
|
|
3120
|
-
var DrawerFooter =
|
|
3121
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3387
|
+
var DrawerFooter = forwardRef23(
|
|
3388
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
3122
3389
|
"footer",
|
|
3123
3390
|
{
|
|
3124
3391
|
ref,
|
|
@@ -3128,9 +3395,9 @@ var DrawerFooter = forwardRef22(
|
|
|
3128
3395
|
)
|
|
3129
3396
|
);
|
|
3130
3397
|
DrawerFooter.displayName = "Drawer.Footer";
|
|
3131
|
-
var DrawerSection =
|
|
3132
|
-
({ title, description, actions, children, className, ...props }, ref) => /* @__PURE__ */
|
|
3133
|
-
(title || description || actions) && /* @__PURE__ */
|
|
3398
|
+
var DrawerSection = forwardRef23(
|
|
3399
|
+
({ title, description, actions, children, className, ...props }, ref) => /* @__PURE__ */ jsxs18("section", { ref, className: cn(section, className), ...props, children: [
|
|
3400
|
+
(title || description || actions) && /* @__PURE__ */ jsxs18(
|
|
3134
3401
|
Inline2,
|
|
3135
3402
|
{
|
|
3136
3403
|
className: sectionHeader,
|
|
@@ -3138,15 +3405,15 @@ var DrawerSection = forwardRef22(
|
|
|
3138
3405
|
alignItems: "flex-start",
|
|
3139
3406
|
gap: "md",
|
|
3140
3407
|
children: [
|
|
3141
|
-
/* @__PURE__ */
|
|
3142
|
-
title && /* @__PURE__ */
|
|
3143
|
-
description && /* @__PURE__ */
|
|
3408
|
+
/* @__PURE__ */ jsxs18(Stack2, { className: sectionText, gap: "2xs", children: [
|
|
3409
|
+
title && /* @__PURE__ */ jsx28(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: title }),
|
|
3410
|
+
description && /* @__PURE__ */ jsx28(Text2, { fontVariant: "text-s-regular", color: "contentSecondary", children: description })
|
|
3144
3411
|
] }),
|
|
3145
|
-
actions && /* @__PURE__ */
|
|
3412
|
+
actions && /* @__PURE__ */ jsx28("div", { className: sectionActions, children: actions })
|
|
3146
3413
|
]
|
|
3147
3414
|
}
|
|
3148
3415
|
),
|
|
3149
|
-
/* @__PURE__ */
|
|
3416
|
+
/* @__PURE__ */ jsx28("div", { className: sectionContent, children })
|
|
3150
3417
|
] })
|
|
3151
3418
|
);
|
|
3152
3419
|
DrawerSection.displayName = "Drawer.Section";
|
|
@@ -3161,12 +3428,12 @@ var Drawer = ({
|
|
|
3161
3428
|
size = "lg",
|
|
3162
3429
|
showCloseButton = true
|
|
3163
3430
|
}) => {
|
|
3164
|
-
return /* @__PURE__ */
|
|
3165
|
-
trigger && /* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
showOverlay && /* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3169
|
-
title && /* @__PURE__ */
|
|
3431
|
+
return /* @__PURE__ */ jsxs18(DrawerRoot, { open, onOpenChange, children: [
|
|
3432
|
+
trigger && /* @__PURE__ */ jsx28(DrawerTrigger, { asChild: true, children: trigger }),
|
|
3433
|
+
/* @__PURE__ */ jsxs18(DrawerPortal, { children: [
|
|
3434
|
+
showOverlay && /* @__PURE__ */ jsx28(DrawerOverlay, {}),
|
|
3435
|
+
/* @__PURE__ */ jsxs18(DrawerContent, { side, size, children: [
|
|
3436
|
+
title && /* @__PURE__ */ jsx28(DrawerHeader, { title, showCloseButton }),
|
|
3170
3437
|
children
|
|
3171
3438
|
] })
|
|
3172
3439
|
] })
|
|
@@ -3189,17 +3456,17 @@ var DrawerCompound = Object.assign(DrawerRoot, {
|
|
|
3189
3456
|
});
|
|
3190
3457
|
|
|
3191
3458
|
// src/components/Pagination/pagination.css.ts
|
|
3192
|
-
import { createRuntimeFn as
|
|
3459
|
+
import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3193
3460
|
var iconWrapper4 = "pagination_iconWrapper__x6drlh7";
|
|
3194
|
-
var paginationItem =
|
|
3195
|
-
var pickerButton =
|
|
3461
|
+
var paginationItem = _7a46816({ defaultClassName: "pagination_paginationItem__x6drlh1", variantClassNames: { variant: { previous: "pagination_paginationItem_variant_previous__x6drlh2", next: "pagination_paginationItem_variant_next__x6drlh3", page: "pagination_paginationItem_variant_page__x6drlh4", ellipsis: "pagination_paginationItem_variant_ellipsis__x6drlh5" }, active: { true: "pagination_paginationItem_active_true__x6drlh6" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3462
|
+
var pickerButton = _7a46816({ defaultClassName: "pagination_pickerButton__x6drlha", variantClassNames: { disabled: { true: "pagination_pickerButton_disabled_true__x6drlhb" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3196
3463
|
var rangeTextPrimary = "pagination_rangeTextPrimary__x6drlhe";
|
|
3197
3464
|
var rangeTextSecondary = "pagination_rangeTextSecondary__x6drlhd";
|
|
3198
3465
|
var rangeWrapper = "pagination_rangeWrapper__x6drlhc";
|
|
3199
3466
|
|
|
3200
3467
|
// src/components/Pagination/Pagination.tsx
|
|
3201
|
-
import { jsx as
|
|
3202
|
-
var ChevronLeftIcon = ({ size = "16" }) => /* @__PURE__ */
|
|
3468
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3469
|
+
var ChevronLeftIcon = ({ size = "16" }) => /* @__PURE__ */ jsx29(
|
|
3203
3470
|
"svg",
|
|
3204
3471
|
{
|
|
3205
3472
|
width: size,
|
|
@@ -3210,10 +3477,10 @@ var ChevronLeftIcon = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
|
3210
3477
|
strokeWidth: "2",
|
|
3211
3478
|
strokeLinecap: "round",
|
|
3212
3479
|
strokeLinejoin: "round",
|
|
3213
|
-
children: /* @__PURE__ */
|
|
3480
|
+
children: /* @__PURE__ */ jsx29("path", { d: "M15 18l-6-6 6-6" })
|
|
3214
3481
|
}
|
|
3215
3482
|
);
|
|
3216
|
-
var ChevronRightIcon2 = ({ size = "16" }) => /* @__PURE__ */
|
|
3483
|
+
var ChevronRightIcon2 = ({ size = "16" }) => /* @__PURE__ */ jsx29(
|
|
3217
3484
|
"svg",
|
|
3218
3485
|
{
|
|
3219
3486
|
width: size,
|
|
@@ -3224,10 +3491,10 @@ var ChevronRightIcon2 = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
|
3224
3491
|
strokeWidth: "2",
|
|
3225
3492
|
strokeLinecap: "round",
|
|
3226
3493
|
strokeLinejoin: "round",
|
|
3227
|
-
children: /* @__PURE__ */
|
|
3494
|
+
children: /* @__PURE__ */ jsx29("path", { d: "M9 18l6-6-6-6" })
|
|
3228
3495
|
}
|
|
3229
3496
|
);
|
|
3230
|
-
var ChevronDownIcon3 = ({ size = "16" }) => /* @__PURE__ */
|
|
3497
|
+
var ChevronDownIcon3 = ({ size = "16" }) => /* @__PURE__ */ jsx29(
|
|
3231
3498
|
"svg",
|
|
3232
3499
|
{
|
|
3233
3500
|
width: size,
|
|
@@ -3238,10 +3505,10 @@ var ChevronDownIcon3 = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
|
3238
3505
|
strokeWidth: "2",
|
|
3239
3506
|
strokeLinecap: "round",
|
|
3240
3507
|
strokeLinejoin: "round",
|
|
3241
|
-
children: /* @__PURE__ */
|
|
3508
|
+
children: /* @__PURE__ */ jsx29("path", { d: "M6 9l6 6 6-6" })
|
|
3242
3509
|
}
|
|
3243
3510
|
);
|
|
3244
|
-
var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */
|
|
3511
|
+
var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */ jsxs19(
|
|
3245
3512
|
"svg",
|
|
3246
3513
|
{
|
|
3247
3514
|
width: size,
|
|
@@ -3249,9 +3516,9 @@ var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */ jsxs18(
|
|
|
3249
3516
|
viewBox: "0 0 24 24",
|
|
3250
3517
|
fill: "currentColor",
|
|
3251
3518
|
children: [
|
|
3252
|
-
/* @__PURE__ */
|
|
3253
|
-
/* @__PURE__ */
|
|
3254
|
-
/* @__PURE__ */
|
|
3519
|
+
/* @__PURE__ */ jsx29("circle", { cx: "5", cy: "12", r: "2" }),
|
|
3520
|
+
/* @__PURE__ */ jsx29("circle", { cx: "12", cy: "12", r: "2" }),
|
|
3521
|
+
/* @__PURE__ */ jsx29("circle", { cx: "19", cy: "12", r: "2" })
|
|
3255
3522
|
]
|
|
3256
3523
|
}
|
|
3257
3524
|
);
|
|
@@ -3259,7 +3526,7 @@ var PaginationRoot = ({
|
|
|
3259
3526
|
children,
|
|
3260
3527
|
className
|
|
3261
3528
|
}) => {
|
|
3262
|
-
return /* @__PURE__ */
|
|
3529
|
+
return /* @__PURE__ */ jsx29(Box2, { as: "nav", className, "aria-label": "Pagination", children: /* @__PURE__ */ jsx29(Inline2, { gap: "4", alignItems: "center", children }) });
|
|
3263
3530
|
};
|
|
3264
3531
|
PaginationRoot.displayName = "Pagination.Root";
|
|
3265
3532
|
var PaginationPrevious = ({
|
|
@@ -3268,7 +3535,7 @@ var PaginationPrevious = ({
|
|
|
3268
3535
|
children = "Previous",
|
|
3269
3536
|
className
|
|
3270
3537
|
}) => {
|
|
3271
|
-
return /* @__PURE__ */
|
|
3538
|
+
return /* @__PURE__ */ jsxs19(
|
|
3272
3539
|
"button",
|
|
3273
3540
|
{
|
|
3274
3541
|
className: cn(paginationItem({ variant: "previous" }), className),
|
|
@@ -3276,7 +3543,7 @@ var PaginationPrevious = ({
|
|
|
3276
3543
|
disabled,
|
|
3277
3544
|
"aria-label": "Go to previous page",
|
|
3278
3545
|
children: [
|
|
3279
|
-
/* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ jsx29("span", { className: iconWrapper4, children: /* @__PURE__ */ jsx29(ChevronLeftIcon, { size: "16" }) }),
|
|
3280
3547
|
children
|
|
3281
3548
|
]
|
|
3282
3549
|
}
|
|
@@ -3289,7 +3556,7 @@ var PaginationNext = ({
|
|
|
3289
3556
|
children = "Next",
|
|
3290
3557
|
className
|
|
3291
3558
|
}) => {
|
|
3292
|
-
return /* @__PURE__ */
|
|
3559
|
+
return /* @__PURE__ */ jsxs19(
|
|
3293
3560
|
"button",
|
|
3294
3561
|
{
|
|
3295
3562
|
className: cn(paginationItem({ variant: "next" }), className),
|
|
@@ -3298,7 +3565,7 @@ var PaginationNext = ({
|
|
|
3298
3565
|
"aria-label": "Go to next page",
|
|
3299
3566
|
children: [
|
|
3300
3567
|
children,
|
|
3301
|
-
/* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ jsx29("span", { className: iconWrapper4, children: /* @__PURE__ */ jsx29(ChevronRightIcon2, { size: "16" }) })
|
|
3302
3569
|
]
|
|
3303
3570
|
}
|
|
3304
3571
|
);
|
|
@@ -3310,7 +3577,7 @@ var PaginationPage = ({
|
|
|
3310
3577
|
onClick,
|
|
3311
3578
|
className
|
|
3312
3579
|
}) => {
|
|
3313
|
-
return /* @__PURE__ */
|
|
3580
|
+
return /* @__PURE__ */ jsx29(
|
|
3314
3581
|
"button",
|
|
3315
3582
|
{
|
|
3316
3583
|
className: cn(
|
|
@@ -3326,12 +3593,12 @@ var PaginationPage = ({
|
|
|
3326
3593
|
};
|
|
3327
3594
|
PaginationPage.displayName = "Pagination.Page";
|
|
3328
3595
|
var PaginationEllipsis = ({ className }) => {
|
|
3329
|
-
return /* @__PURE__ */
|
|
3596
|
+
return /* @__PURE__ */ jsx29(
|
|
3330
3597
|
"span",
|
|
3331
3598
|
{
|
|
3332
3599
|
className: cn(paginationItem({ variant: "ellipsis" }), className),
|
|
3333
3600
|
"aria-hidden": "true",
|
|
3334
|
-
children: /* @__PURE__ */
|
|
3601
|
+
children: /* @__PURE__ */ jsx29("span", { className: iconWrapper4, children: /* @__PURE__ */ jsx29(EllipsisIcon, { size: "16" }) })
|
|
3335
3602
|
}
|
|
3336
3603
|
);
|
|
3337
3604
|
};
|
|
@@ -3347,11 +3614,11 @@ var PaginationInfoRoot = ({
|
|
|
3347
3614
|
children,
|
|
3348
3615
|
className
|
|
3349
3616
|
}) => {
|
|
3350
|
-
return /* @__PURE__ */
|
|
3617
|
+
return /* @__PURE__ */ jsx29(Inline2, { alignItems: "center", gap: "sm", className, children });
|
|
3351
3618
|
};
|
|
3352
3619
|
PaginationInfoRoot.displayName = "PaginationInfo.Root";
|
|
3353
3620
|
var PaginationInfoLabel = ({ children }) => {
|
|
3354
|
-
return /* @__PURE__ */
|
|
3621
|
+
return /* @__PURE__ */ jsx29(
|
|
3355
3622
|
Text2,
|
|
3356
3623
|
{
|
|
3357
3624
|
whiteSpace: "nowrap",
|
|
@@ -3367,14 +3634,14 @@ var PaginationInfoRange = ({
|
|
|
3367
3634
|
end,
|
|
3368
3635
|
total
|
|
3369
3636
|
}) => {
|
|
3370
|
-
return /* @__PURE__ */
|
|
3371
|
-
/* @__PURE__ */
|
|
3637
|
+
return /* @__PURE__ */ jsxs19("div", { className: rangeWrapper, children: [
|
|
3638
|
+
/* @__PURE__ */ jsxs19("span", { className: rangeTextSecondary, children: [
|
|
3372
3639
|
start,
|
|
3373
3640
|
"-",
|
|
3374
3641
|
end
|
|
3375
3642
|
] }),
|
|
3376
|
-
/* @__PURE__ */
|
|
3377
|
-
/* @__PURE__ */
|
|
3643
|
+
/* @__PURE__ */ jsx29("span", { className: rangeTextSecondary, children: "of" }),
|
|
3644
|
+
/* @__PURE__ */ jsx29("span", { className: rangeTextPrimary, children: total })
|
|
3378
3645
|
] });
|
|
3379
3646
|
};
|
|
3380
3647
|
PaginationInfoRange.displayName = "PaginationInfo.Range";
|
|
@@ -3389,14 +3656,14 @@ var PaginationInfoComplete = ({
|
|
|
3389
3656
|
}) => {
|
|
3390
3657
|
const start = Math.min((currentPage - 1) * pageSize + 1, totalItems);
|
|
3391
3658
|
const end = Math.min(currentPage * pageSize, totalItems);
|
|
3392
|
-
return /* @__PURE__ */
|
|
3393
|
-
/* @__PURE__ */
|
|
3394
|
-
/* @__PURE__ */
|
|
3659
|
+
return /* @__PURE__ */ jsxs19(PaginationInfoRoot, { className, children: [
|
|
3660
|
+
/* @__PURE__ */ jsx29(PaginationInfoLabel, { children: label }),
|
|
3661
|
+
/* @__PURE__ */ jsx29(
|
|
3395
3662
|
Menu,
|
|
3396
3663
|
{
|
|
3397
|
-
trigger: /* @__PURE__ */
|
|
3664
|
+
trigger: /* @__PURE__ */ jsxs19("button", { className: pickerButton({ disabled: false }), children: [
|
|
3398
3665
|
pageSize,
|
|
3399
|
-
/* @__PURE__ */
|
|
3666
|
+
/* @__PURE__ */ jsx29(
|
|
3400
3667
|
Inline2,
|
|
3401
3668
|
{
|
|
3402
3669
|
as: "span",
|
|
@@ -3406,14 +3673,14 @@ var PaginationInfoComplete = ({
|
|
|
3406
3673
|
alignItems: "center",
|
|
3407
3674
|
justifyContent: "center",
|
|
3408
3675
|
className: iconWrapper4,
|
|
3409
|
-
children: /* @__PURE__ */
|
|
3676
|
+
children: /* @__PURE__ */ jsx29(ChevronDownIcon3, { size: "16" })
|
|
3410
3677
|
}
|
|
3411
3678
|
)
|
|
3412
3679
|
] }),
|
|
3413
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
3680
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx29(MenuItem, { onClick: () => onPageSizeChange?.(size), children: size }, size))
|
|
3414
3681
|
}
|
|
3415
3682
|
),
|
|
3416
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ jsx29(PaginationInfoRange, { start, end, total: totalItems })
|
|
3417
3684
|
] });
|
|
3418
3685
|
};
|
|
3419
3686
|
PaginationInfoComplete.displayName = "PaginationInfo.Complete";
|
|
@@ -3427,57 +3694,21 @@ var PaginationInfo = Object.assign(PaginationInfoRoot, {
|
|
|
3427
3694
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
3428
3695
|
import * as React18 from "react";
|
|
3429
3696
|
import { Slot } from "@radix-ui/react-slot";
|
|
3697
|
+
import { ChevronDownIcon as ChevronDownIcon4, ChevronRightIcon as ChevronRightIcon3 } from "@zentrades-ui/icons";
|
|
3430
3698
|
|
|
3431
3699
|
// src/components/Breadcrumb/breadcrumb.css.ts
|
|
3432
|
-
import { createRuntimeFn as
|
|
3433
|
-
var breadcrumbLink =
|
|
3700
|
+
import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3701
|
+
var breadcrumbLink = _7a46817({ defaultClassName: "breadcrumb_breadcrumbLink__1egtvlp0", variantClassNames: { current: { false: "breadcrumb_breadcrumbLink_current_false__1egtvlp1", true: "breadcrumb_breadcrumbLink_current_true__1egtvlp2" } }, defaultVariants: { current: false }, compoundVariants: [] });
|
|
3434
3702
|
|
|
3435
3703
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
3436
|
-
import { jsx as
|
|
3437
|
-
var ChevronRightIcon3 = ({
|
|
3438
|
-
size = "16",
|
|
3439
|
-
color
|
|
3440
|
-
}) => /* @__PURE__ */ jsx27(
|
|
3441
|
-
"svg",
|
|
3442
|
-
{
|
|
3443
|
-
width: size,
|
|
3444
|
-
height: size,
|
|
3445
|
-
viewBox: "0 0 24 24",
|
|
3446
|
-
fill: "none",
|
|
3447
|
-
stroke: color || "currentColor",
|
|
3448
|
-
strokeWidth: "2",
|
|
3449
|
-
strokeLinecap: "round",
|
|
3450
|
-
strokeLinejoin: "round",
|
|
3451
|
-
children: /* @__PURE__ */ jsx27("path", { d: "M9 18l6-6-6-6" })
|
|
3452
|
-
}
|
|
3453
|
-
);
|
|
3704
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3454
3705
|
var BreadcrumbContext = React18.createContext({});
|
|
3455
|
-
var useBreadcrumbContext = () => {
|
|
3456
|
-
return React18.useContext(BreadcrumbContext);
|
|
3457
|
-
};
|
|
3458
3706
|
var BreadcrumbRoot = React18.forwardRef(({ children, separator, ...props }, ref) => {
|
|
3459
|
-
return /* @__PURE__ */
|
|
3707
|
+
return /* @__PURE__ */ jsx30("nav", { ref, "aria-label": "Breadcrumb", ...props, children: /* @__PURE__ */ jsx30(BreadcrumbContext.Provider, { value: { separator }, children }) });
|
|
3460
3708
|
});
|
|
3461
3709
|
BreadcrumbRoot.displayName = "Breadcrumb.Root";
|
|
3462
|
-
var BreadcrumbList = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3463
|
-
return /* @__PURE__ */ jsx27(
|
|
3464
|
-
Inline2,
|
|
3465
|
-
{
|
|
3466
|
-
as: "ol",
|
|
3467
|
-
ref,
|
|
3468
|
-
style: { listStyle: "none" },
|
|
3469
|
-
margin: "none",
|
|
3470
|
-
padding: "none",
|
|
3471
|
-
alignItems: "center",
|
|
3472
|
-
gap: "xs",
|
|
3473
|
-
className,
|
|
3474
|
-
...props
|
|
3475
|
-
}
|
|
3476
|
-
);
|
|
3477
|
-
});
|
|
3478
|
-
BreadcrumbList.displayName = "Breadcrumb.List";
|
|
3479
3710
|
var BreadcrumbItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3480
|
-
return /* @__PURE__ */
|
|
3711
|
+
return /* @__PURE__ */ jsx30(
|
|
3481
3712
|
Inline2,
|
|
3482
3713
|
{
|
|
3483
3714
|
as: "li",
|
|
@@ -3491,21 +3722,28 @@ var BreadcrumbItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
3491
3722
|
});
|
|
3492
3723
|
BreadcrumbItem.displayName = "Breadcrumb.Item";
|
|
3493
3724
|
var BreadcrumbLink = React18.forwardRef(({ asChild, current, className, ...props }, ref) => {
|
|
3725
|
+
const { dropdown, children, ...restProps } = props;
|
|
3494
3726
|
const Comp = asChild ? Slot : "a";
|
|
3495
|
-
return /* @__PURE__ */
|
|
3496
|
-
|
|
3727
|
+
return /* @__PURE__ */ jsxs20(
|
|
3728
|
+
Inline2,
|
|
3497
3729
|
{
|
|
3730
|
+
as: Comp,
|
|
3498
3731
|
ref,
|
|
3732
|
+
alignItems: "center",
|
|
3733
|
+
gap: dropdown ? "2xs" : "none",
|
|
3499
3734
|
className: cn(breadcrumbLink({ current }), className),
|
|
3500
3735
|
"aria-current": current ? "page" : void 0,
|
|
3501
|
-
...
|
|
3736
|
+
...restProps,
|
|
3737
|
+
children: [
|
|
3738
|
+
children,
|
|
3739
|
+
dropdown ? /* @__PURE__ */ jsx30(ChevronDownIcon4, { size: "16" }) : null
|
|
3740
|
+
]
|
|
3502
3741
|
}
|
|
3503
3742
|
);
|
|
3504
3743
|
});
|
|
3505
3744
|
BreadcrumbLink.displayName = "Breadcrumb.Link";
|
|
3506
3745
|
var BreadcrumbSeparator = React18.forwardRef(({ children, className, ...props }, ref) => {
|
|
3507
|
-
|
|
3508
|
-
return /* @__PURE__ */ jsx27(
|
|
3746
|
+
return /* @__PURE__ */ jsx30(
|
|
3509
3747
|
Inline2,
|
|
3510
3748
|
{
|
|
3511
3749
|
as: "li",
|
|
@@ -3513,30 +3751,65 @@ var BreadcrumbSeparator = React18.forwardRef(({ children, className, ...props },
|
|
|
3513
3751
|
role: "presentation",
|
|
3514
3752
|
"aria-hidden": "true",
|
|
3515
3753
|
alignItems: "center",
|
|
3754
|
+
padding: "2xs",
|
|
3516
3755
|
className,
|
|
3517
3756
|
...props,
|
|
3518
|
-
children: children ||
|
|
3757
|
+
children: children || /* @__PURE__ */ jsx30(
|
|
3758
|
+
ChevronRightIcon3,
|
|
3759
|
+
{
|
|
3760
|
+
color: "contentQuaternary",
|
|
3761
|
+
size: "16"
|
|
3762
|
+
}
|
|
3763
|
+
)
|
|
3519
3764
|
}
|
|
3520
3765
|
);
|
|
3521
3766
|
});
|
|
3522
3767
|
BreadcrumbSeparator.displayName = "Breadcrumb.Separator";
|
|
3768
|
+
var BreadcrumbList = React18.forwardRef(({ className, children, ...props }, ref) => {
|
|
3769
|
+
const items = React18.Children.toArray(children);
|
|
3770
|
+
const hasSeparator = items.some((child) => {
|
|
3771
|
+
return React18.isValidElement(child) && child.type === BreadcrumbSeparator;
|
|
3772
|
+
});
|
|
3773
|
+
const content = hasSeparator ? items : items.flatMap((child, index) => {
|
|
3774
|
+
if (index === items.length - 1) return [child];
|
|
3775
|
+
return [child, /* @__PURE__ */ jsx30(BreadcrumbSeparator, {}, `sep-${index}`)];
|
|
3776
|
+
});
|
|
3777
|
+
return /* @__PURE__ */ jsx30(
|
|
3778
|
+
Inline2,
|
|
3779
|
+
{
|
|
3780
|
+
as: "ol",
|
|
3781
|
+
ref,
|
|
3782
|
+
style: { listStyle: "none" },
|
|
3783
|
+
margin: "none",
|
|
3784
|
+
padding: "none",
|
|
3785
|
+
alignItems: "center",
|
|
3786
|
+
gap: "xs",
|
|
3787
|
+
className,
|
|
3788
|
+
...props,
|
|
3789
|
+
children: content
|
|
3790
|
+
}
|
|
3791
|
+
);
|
|
3792
|
+
});
|
|
3793
|
+
BreadcrumbList.displayName = "Breadcrumb.List";
|
|
3523
3794
|
var BreadcrumbEllipsis = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3524
|
-
return /* @__PURE__ */
|
|
3525
|
-
|
|
3795
|
+
return /* @__PURE__ */ jsx30(
|
|
3796
|
+
Heading2,
|
|
3526
3797
|
{
|
|
3798
|
+
as: "span",
|
|
3799
|
+
fontVariant: "heading-2xs-medium",
|
|
3527
3800
|
ref,
|
|
3528
3801
|
role: "presentation",
|
|
3529
3802
|
"aria-hidden": "true",
|
|
3530
3803
|
className,
|
|
3531
|
-
|
|
3804
|
+
color: "contentQuaternary",
|
|
3532
3805
|
...props,
|
|
3533
|
-
children: "
|
|
3806
|
+
children: "..."
|
|
3534
3807
|
}
|
|
3535
3808
|
);
|
|
3536
3809
|
});
|
|
3537
3810
|
BreadcrumbEllipsis.displayName = "Breadcrumb.Ellipsis";
|
|
3538
3811
|
var BreadcrumbPage = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3539
|
-
return /* @__PURE__ */
|
|
3812
|
+
return /* @__PURE__ */ jsx30(
|
|
3540
3813
|
"span",
|
|
3541
3814
|
{
|
|
3542
3815
|
ref,
|
|
@@ -3561,14 +3834,14 @@ var Breadcrumb = Object.assign(BreadcrumbRoot, {
|
|
|
3561
3834
|
|
|
3562
3835
|
// src/components/ContentSplitter/ContentSplitter.tsx
|
|
3563
3836
|
import React19 from "react";
|
|
3564
|
-
import { jsx as
|
|
3837
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3565
3838
|
var circleSize = {
|
|
3566
3839
|
sm: "2",
|
|
3567
3840
|
md: "4",
|
|
3568
3841
|
lg: "6"
|
|
3569
3842
|
};
|
|
3570
3843
|
function Circle({ size }) {
|
|
3571
|
-
return /* @__PURE__ */
|
|
3844
|
+
return /* @__PURE__ */ jsx31(
|
|
3572
3845
|
Box2,
|
|
3573
3846
|
{
|
|
3574
3847
|
rounded: "circle",
|
|
@@ -3587,24 +3860,24 @@ function ContentSplitter({
|
|
|
3587
3860
|
const interleaved = items.flatMap((child, index) => {
|
|
3588
3861
|
const onlyOne = items.length === 1;
|
|
3589
3862
|
const isLast = index === items.length - 1;
|
|
3590
|
-
return isLast || onlyOne ? [child] : [child, /* @__PURE__ */
|
|
3863
|
+
return isLast || onlyOne ? [child] : [child, /* @__PURE__ */ jsx31(Circle, { size }, `split-${index}`)];
|
|
3591
3864
|
});
|
|
3592
3865
|
const Wrapper = align === "horizontal" ? Inline2 : Stack2;
|
|
3593
|
-
return /* @__PURE__ */
|
|
3866
|
+
return /* @__PURE__ */ jsx31(Wrapper, { gap, alignItems: "center", justifyContent: "center", children: interleaved });
|
|
3594
3867
|
}
|
|
3595
3868
|
|
|
3596
3869
|
// src/components/Image/Image.tsx
|
|
3597
|
-
import { forwardRef as
|
|
3870
|
+
import { forwardRef as forwardRef25, useState as useState3, useCallback as useCallback3 } from "react";
|
|
3598
3871
|
|
|
3599
3872
|
// src/components/Image/image.css.ts
|
|
3600
|
-
import { createRuntimeFn as
|
|
3873
|
+
import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3601
3874
|
var imageContainerStyles = "image_imageContainerStyles__1hj4ov10";
|
|
3602
|
-
var imageStyles =
|
|
3875
|
+
var imageStyles = _7a46818({ defaultClassName: "image_imageStyles__1hj4ov11", variantClassNames: { loaded: { true: "image_imageStyles_loaded_true__1hj4ov12", false: "image_imageStyles_loaded_false__1hj4ov13" }, fadeIn: { true: "image_imageStyles_fadeIn_true__1hj4ov14", false: "image_imageStyles_fadeIn_false__1hj4ov15" } }, defaultVariants: { loaded: false, fadeIn: true }, compoundVariants: [[{ loaded: false, fadeIn: true }, "image_imageStyles_compound_0__1hj4ov16"], [{ loaded: true, fadeIn: true }, "image_imageStyles_compound_1__1hj4ov17"], [{ fadeIn: false }, "image_imageStyles_compound_2__1hj4ov18"]] });
|
|
3603
3876
|
var placeholderStyles = "image_placeholderStyles__1hj4ov19";
|
|
3604
3877
|
|
|
3605
3878
|
// src/components/Image/Image.tsx
|
|
3606
|
-
import { jsx as
|
|
3607
|
-
var Image3 =
|
|
3879
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3880
|
+
var Image3 = forwardRef25(function Image4({
|
|
3608
3881
|
src,
|
|
3609
3882
|
alt,
|
|
3610
3883
|
objectFit = "cover",
|
|
@@ -3638,7 +3911,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3638
3911
|
const showPlaceholder = imageState === "loading" && placeholder;
|
|
3639
3912
|
const showFallback = imageState === "error" && fallback;
|
|
3640
3913
|
const showImage = imageState !== "error";
|
|
3641
|
-
return /* @__PURE__ */
|
|
3914
|
+
return /* @__PURE__ */ jsxs21(
|
|
3642
3915
|
Box2,
|
|
3643
3916
|
{
|
|
3644
3917
|
ref,
|
|
@@ -3652,7 +3925,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3652
3925
|
},
|
|
3653
3926
|
...restProps,
|
|
3654
3927
|
children: [
|
|
3655
|
-
showPlaceholder && /* @__PURE__ */
|
|
3928
|
+
showPlaceholder && /* @__PURE__ */ jsx32(
|
|
3656
3929
|
Box2,
|
|
3657
3930
|
{
|
|
3658
3931
|
className: placeholderStyles,
|
|
@@ -3664,7 +3937,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3664
3937
|
children: placeholder
|
|
3665
3938
|
}
|
|
3666
3939
|
),
|
|
3667
|
-
showFallback && /* @__PURE__ */
|
|
3940
|
+
showFallback && /* @__PURE__ */ jsx32(
|
|
3668
3941
|
Box2,
|
|
3669
3942
|
{
|
|
3670
3943
|
position: "absolute",
|
|
@@ -3675,7 +3948,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3675
3948
|
children: fallback
|
|
3676
3949
|
}
|
|
3677
3950
|
),
|
|
3678
|
-
showImage && /* @__PURE__ */
|
|
3951
|
+
showImage && /* @__PURE__ */ jsx32(
|
|
3679
3952
|
Box2,
|
|
3680
3953
|
{
|
|
3681
3954
|
as: "img",
|
|
@@ -3708,12 +3981,12 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3708
3981
|
Image3.displayName = "Image";
|
|
3709
3982
|
|
|
3710
3983
|
// src/components/FileUpload/FileUpload.tsx
|
|
3711
|
-
import { useCallback as useCallback4, useId as useId2, useMemo as
|
|
3984
|
+
import { useCallback as useCallback4, useId as useId2, useMemo as useMemo4, useRef as useRef3, useState as useState4 } from "react";
|
|
3712
3985
|
|
|
3713
3986
|
// src/components/FileUpload/fileUpload.css.ts
|
|
3714
|
-
import { createRuntimeFn as
|
|
3987
|
+
import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3715
3988
|
var chooseFileLink = "fileUpload_chooseFileLink__1nxjf87a";
|
|
3716
|
-
var dropzone =
|
|
3989
|
+
var dropzone = _7a46819({ defaultClassName: "fileUpload_dropzone__1nxjf871", variantClassNames: { variant: { full: "fileUpload_dropzone_variant_full__1nxjf872", compact: "fileUpload_dropzone_variant_compact__1nxjf873" }, state: { "default": "fileUpload_dropzone_state_default__1nxjf874", dragging: "fileUpload_dropzone_state_dragging__1nxjf875" }, disabled: { true: "fileUpload_dropzone_disabled_true__1nxjf876", false: "fileUpload_dropzone_disabled_false__1nxjf877" } }, defaultVariants: { variant: "full", state: "default", disabled: false }, compoundVariants: [[{ variant: "full" }, "fileUpload_dropzone_compound_0__1nxjf878"]] });
|
|
3717
3990
|
var fileItem = "fileUpload_fileItem__1nxjf87c";
|
|
3718
3991
|
var fileList = "fileUpload_fileList__1nxjf87b";
|
|
3719
3992
|
var fileMeta = "fileUpload_fileMeta__1nxjf87d";
|
|
@@ -3726,8 +3999,8 @@ var previewImage = "fileUpload_previewImage__1nxjf87h";
|
|
|
3726
3999
|
var uploaderContainer = "fileUpload_uploaderContainer__1nxjf870";
|
|
3727
4000
|
|
|
3728
4001
|
// src/components/FileUpload/FileUpload.tsx
|
|
3729
|
-
import { jsx as
|
|
3730
|
-
var UploadCloudIcon = ({ size = "24", color = "currentColor" }) => /* @__PURE__ */
|
|
4002
|
+
import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4003
|
+
var UploadCloudIcon = ({ size = "24", color = "currentColor" }) => /* @__PURE__ */ jsx33(
|
|
3731
4004
|
"svg",
|
|
3732
4005
|
{
|
|
3733
4006
|
width: size,
|
|
@@ -3735,7 +4008,7 @@ var UploadCloudIcon = ({ size = "24", color = "currentColor" }) => /* @__PURE__
|
|
|
3735
4008
|
viewBox: "0 0 24 24",
|
|
3736
4009
|
fill: "none",
|
|
3737
4010
|
stroke: "none",
|
|
3738
|
-
children: /* @__PURE__ */
|
|
4011
|
+
children: /* @__PURE__ */ jsx33(
|
|
3739
4012
|
"path",
|
|
3740
4013
|
{
|
|
3741
4014
|
d: "M15.5433 8.1019L14.7069 8.43411C14.8693 8.84309 15.3037 9.07464 15.7338 8.98153L15.5433 8.1019ZM4.57793 16.0258C4.94899 16.3565 5.5179 16.3238 5.84863 15.9527C6.17935 15.5817 6.14666 15.0128 5.7756 14.6821L5.17676 15.3539L4.57793 16.0258ZM19.6105 15.7519L18.9883 15.1016L18.9883 15.1016L19.6105 15.7519ZM18.686 15.3606C18.2913 15.6628 18.2163 16.2277 18.5185 16.6223C18.8206 17.017 19.3855 17.092 19.7802 16.7899L19.2331 16.0752L18.686 15.3606ZM11.1 21C11.1 21.4971 11.5029 21.9 12 21.9C12.4971 21.9 12.9 21.4971 12.9 21H12H11.1ZM12 12L12.6364 11.3636C12.2849 11.0121 11.7151 11.0121 11.3636 11.3636L12 12ZM7.86361 14.8636C7.51214 15.2151 7.51214 15.7849 7.86361 16.1364C8.21508 16.4879 8.78493 16.4879 9.1364 16.1364L8.5 15.5L7.86361 14.8636ZM14.8636 16.1364C15.2151 16.4879 15.7849 16.4879 16.1364 16.1364C16.4879 15.7849 16.4879 15.2151 16.1364 14.8636L15.5 15.5L14.8636 16.1364ZM3 10.5H3.9C3.9 7.40721 6.40721 4.9 9.5 4.9V4V3.1C5.41309 3.1 2.1 6.41309 2.1 10.5H3ZM16.5 8V8.9C18.4882 8.9 20.1 10.5118 20.1 12.5H21H21.9C21.9 9.51766 19.4823 7.1 16.5 7.1V8ZM15.5433 8.1019L15.7338 8.98153C15.9799 8.92824 16.2361 8.9 16.5 8.9V8V7.1C16.1073 7.1 15.7234 7.14207 15.3529 7.22228L15.5433 8.1019ZM9.5 4V4.9C11.8617 4.9 13.884 6.36226 14.7069 8.43411L15.5433 8.1019L16.3798 7.7697C15.2939 5.03562 12.6241 3.1 9.5 3.1V4ZM5.17676 15.3539L5.7756 14.6821C4.62343 13.6551 3.9 12.1626 3.9 10.5H3H2.1C2.1 12.6973 3.0588 14.6718 4.57793 16.0258L5.17676 15.3539ZM21 12.5H20.1C20.1 13.523 19.6745 14.4451 18.9883 15.1016L19.6105 15.7519L20.2327 16.4021C21.259 15.4202 21.9 14.0342 21.9 12.5H21ZM19.6105 15.7519L18.9883 15.1016C18.8924 15.1933 18.7915 15.2799 18.686 15.3606L19.2331 16.0752L19.7802 16.7899C19.9382 16.6689 20.0893 16.5394 20.2327 16.4021L19.6105 15.7519ZM12 21H12.9V12H12H11.1V21H12ZM12 12L11.3636 11.3636L7.86361 14.8636L8.5 15.5L9.1364 16.1364L12.6364 12.6364L12 12ZM12 12L11.3636 12.6364L14.8636 16.1364L15.5 15.5L16.1364 14.8636L12.6364 11.3636L12 12Z",
|
|
@@ -3744,14 +4017,14 @@ var UploadCloudIcon = ({ size = "24", color = "currentColor" }) => /* @__PURE__
|
|
|
3744
4017
|
)
|
|
3745
4018
|
}
|
|
3746
4019
|
);
|
|
3747
|
-
var CloseIcon5 = ({ size = "16", color = "currentColor" }) => /* @__PURE__ */
|
|
4020
|
+
var CloseIcon5 = ({ size = "16", color = "currentColor" }) => /* @__PURE__ */ jsx33(
|
|
3748
4021
|
"svg",
|
|
3749
4022
|
{
|
|
3750
4023
|
width: size,
|
|
3751
4024
|
height: size,
|
|
3752
4025
|
viewBox: "0 0 12 12",
|
|
3753
4026
|
fill: "none",
|
|
3754
|
-
children: /* @__PURE__ */
|
|
4027
|
+
children: /* @__PURE__ */ jsx33(
|
|
3755
4028
|
"path",
|
|
3756
4029
|
{
|
|
3757
4030
|
d: "M9.74993 2.25L5.99996 5.99998M5.99996 5.99998L2.24998 9.74995M5.99996 5.99998L2.24998 2.25001M5.99996 5.99998L9.75003 9.75",
|
|
@@ -3806,10 +4079,10 @@ function FileUpload({
|
|
|
3806
4079
|
className
|
|
3807
4080
|
}) {
|
|
3808
4081
|
const inputId = useId2();
|
|
3809
|
-
const inputRef =
|
|
3810
|
-
const dragCounterRef =
|
|
4082
|
+
const inputRef = useRef3(null);
|
|
4083
|
+
const dragCounterRef = useRef3(0);
|
|
3811
4084
|
const [isDragging, setIsDragging] = useState4(false);
|
|
3812
|
-
const resolvedFiles =
|
|
4085
|
+
const resolvedFiles = useMemo4(() => {
|
|
3813
4086
|
return files.map((file) => ({
|
|
3814
4087
|
...file,
|
|
3815
4088
|
extension: file.extension ?? getExtension(file.name),
|
|
@@ -3890,12 +4163,12 @@ function FileUpload({
|
|
|
3890
4163
|
state: isDragging ? "dragging" : "default",
|
|
3891
4164
|
disabled
|
|
3892
4165
|
});
|
|
3893
|
-
return /* @__PURE__ */
|
|
3894
|
-
(title || description) && /* @__PURE__ */
|
|
3895
|
-
title ? /* @__PURE__ */
|
|
3896
|
-
description ? /* @__PURE__ */
|
|
4166
|
+
return /* @__PURE__ */ jsxs22(Stack2, { className: cn(uploaderContainer, className), gap: "sm", children: [
|
|
4167
|
+
(title || description) && /* @__PURE__ */ jsxs22(Stack2, { gap: "2xs", children: [
|
|
4168
|
+
title ? /* @__PURE__ */ jsx33(Heading2, { fontVariant: "heading-xs-medium", color: "contentPrimary", children: title }) : null,
|
|
4169
|
+
description ? /* @__PURE__ */ jsx33(Text2, { fontVariant: "text-s-regular", color: "contentQuaternary", children: description }) : null
|
|
3897
4170
|
] }),
|
|
3898
|
-
/* @__PURE__ */
|
|
4171
|
+
/* @__PURE__ */ jsx33(
|
|
3899
4172
|
Box2,
|
|
3900
4173
|
{
|
|
3901
4174
|
as: "div",
|
|
@@ -3909,11 +4182,11 @@ function FileUpload({
|
|
|
3909
4182
|
onDragLeave: handleDragLeave,
|
|
3910
4183
|
onDragOver: handleDragOver,
|
|
3911
4184
|
onDrop: handleDrop,
|
|
3912
|
-
children: variant === "compact" ? /* @__PURE__ */
|
|
3913
|
-
/* @__PURE__ */
|
|
3914
|
-
/* @__PURE__ */
|
|
3915
|
-
/* @__PURE__ */
|
|
3916
|
-
/* @__PURE__ */
|
|
4185
|
+
children: variant === "compact" ? /* @__PURE__ */ jsxs22(Inline2, { alignItems: "center", gap: "xs", wrap: true, children: [
|
|
4186
|
+
/* @__PURE__ */ jsx33(UploadCloudIcon, { size: "24", color: "var(--zen-color-content-secondary)" }),
|
|
4187
|
+
/* @__PURE__ */ jsxs22(Inline2, { alignItems: "center", gap: "xs", wrap: true, children: [
|
|
4188
|
+
/* @__PURE__ */ jsx33(Text2, { fontVariant: "text-s-medium", color: "contentSecondary", children: compactDragLabel }),
|
|
4189
|
+
/* @__PURE__ */ jsx33(
|
|
3917
4190
|
"button",
|
|
3918
4191
|
{
|
|
3919
4192
|
type: "button",
|
|
@@ -3927,14 +4200,14 @@ function FileUpload({
|
|
|
3927
4200
|
}
|
|
3928
4201
|
)
|
|
3929
4202
|
] })
|
|
3930
|
-
] }) : /* @__PURE__ */
|
|
3931
|
-
/* @__PURE__ */
|
|
3932
|
-
/* @__PURE__ */
|
|
3933
|
-
/* @__PURE__ */
|
|
3934
|
-
supportedText ? /* @__PURE__ */
|
|
4203
|
+
] }) : /* @__PURE__ */ jsxs22(Stack2, { gap: "sm", alignItems: "center", children: [
|
|
4204
|
+
/* @__PURE__ */ jsx33(UploadCloudIcon, { size: "24", color: "var(--zen-color-content-secondary)" }),
|
|
4205
|
+
/* @__PURE__ */ jsxs22(Stack2, { gap: "2xs", alignItems: "center", children: [
|
|
4206
|
+
/* @__PURE__ */ jsx33(Text2, { fontVariant: "text-s-medium", color: "contentSecondary", children: dragLabel }),
|
|
4207
|
+
supportedText ? /* @__PURE__ */ jsx33(Text2, { fontVariant: "text-xs-regular", color: "contentQuaternary", children: supportedText }) : null
|
|
3935
4208
|
] }),
|
|
3936
|
-
/* @__PURE__ */
|
|
3937
|
-
/* @__PURE__ */
|
|
4209
|
+
/* @__PURE__ */ jsxs22(Stack2, { gap: "2xs", alignItems: "center", children: [
|
|
4210
|
+
/* @__PURE__ */ jsx33(
|
|
3938
4211
|
Button,
|
|
3939
4212
|
{
|
|
3940
4213
|
type: "button",
|
|
@@ -3947,12 +4220,12 @@ function FileUpload({
|
|
|
3947
4220
|
children: buttonLabel
|
|
3948
4221
|
}
|
|
3949
4222
|
),
|
|
3950
|
-
maxSizeLabel ? /* @__PURE__ */
|
|
4223
|
+
maxSizeLabel ? /* @__PURE__ */ jsx33(Text2, { fontVariant: "text-xs-regular", color: "contentQuaternary", children: maxSizeLabel }) : null
|
|
3951
4224
|
] })
|
|
3952
4225
|
] })
|
|
3953
4226
|
}
|
|
3954
4227
|
),
|
|
3955
|
-
variant === "compact" && (supportedText || maxSizeLabel) ? /* @__PURE__ */
|
|
4228
|
+
variant === "compact" && (supportedText || maxSizeLabel) ? /* @__PURE__ */ jsxs22(
|
|
3956
4229
|
Inline2,
|
|
3957
4230
|
{
|
|
3958
4231
|
alignItems: "center",
|
|
@@ -3961,41 +4234,41 @@ function FileUpload({
|
|
|
3961
4234
|
wrap: true,
|
|
3962
4235
|
gap: "xs",
|
|
3963
4236
|
children: [
|
|
3964
|
-
supportedText ? /* @__PURE__ */
|
|
3965
|
-
maxSizeLabel ? /* @__PURE__ */
|
|
4237
|
+
supportedText ? /* @__PURE__ */ jsx33(Text2, { fontVariant: "text-xs-regular", color: "contentQuaternary", children: supportedText }) : null,
|
|
4238
|
+
maxSizeLabel ? /* @__PURE__ */ jsx33(Text2, { fontVariant: "text-xs-regular", color: "contentQuaternary", children: maxSizeLabel }) : null
|
|
3966
4239
|
]
|
|
3967
4240
|
}
|
|
3968
4241
|
) : null,
|
|
3969
|
-
helperText ? /* @__PURE__ */
|
|
3970
|
-
resolvedFiles.length ? /* @__PURE__ */
|
|
4242
|
+
helperText ? /* @__PURE__ */ jsx33(Text2, { fontVariant: "text-s-regular", className: helperTextStyle, children: helperText }) : null,
|
|
4243
|
+
resolvedFiles.length ? /* @__PURE__ */ jsx33("div", { className: fileList, children: resolvedFiles.map((file) => {
|
|
3971
4244
|
const previewLabel = getPreviewLabel(file);
|
|
3972
|
-
return /* @__PURE__ */
|
|
3973
|
-
/* @__PURE__ */
|
|
3974
|
-
/* @__PURE__ */
|
|
4245
|
+
return /* @__PURE__ */ jsxs22("div", { className: fileItem, children: [
|
|
4246
|
+
/* @__PURE__ */ jsxs22("div", { className: fileMeta, children: [
|
|
4247
|
+
/* @__PURE__ */ jsx33("div", { className: previewBox, children: file.previewUrl ? /* @__PURE__ */ jsx33(
|
|
3975
4248
|
"img",
|
|
3976
4249
|
{
|
|
3977
4250
|
src: file.previewUrl,
|
|
3978
4251
|
alt: `${file.name} preview`,
|
|
3979
4252
|
className: previewImage
|
|
3980
4253
|
}
|
|
3981
|
-
) : /* @__PURE__ */
|
|
3982
|
-
/* @__PURE__ */
|
|
3983
|
-
/* @__PURE__ */
|
|
3984
|
-
file.sizeLabel ? /* @__PURE__ */
|
|
4254
|
+
) : /* @__PURE__ */ jsx33("span", { className: previewFallback, children: previewLabel }) }),
|
|
4255
|
+
/* @__PURE__ */ jsxs22(Stack2, { gap: "2xs", flex: "1", minWidth: "none", children: [
|
|
4256
|
+
/* @__PURE__ */ jsx33("span", { className: fileName, children: file.name }),
|
|
4257
|
+
file.sizeLabel ? /* @__PURE__ */ jsx33("span", { className: fileSize, children: file.sizeLabel }) : null
|
|
3985
4258
|
] })
|
|
3986
4259
|
] }),
|
|
3987
|
-
onRemoveFile ? /* @__PURE__ */
|
|
4260
|
+
onRemoveFile ? /* @__PURE__ */ jsx33(
|
|
3988
4261
|
IconButton,
|
|
3989
4262
|
{
|
|
3990
4263
|
size: "sm",
|
|
3991
4264
|
"aria-label": `Remove ${file.name}`,
|
|
3992
4265
|
onClick: () => onRemoveFile(file.id),
|
|
3993
|
-
children: /* @__PURE__ */
|
|
4266
|
+
children: /* @__PURE__ */ jsx33(CloseIcon5, { size: "16", color: "var(--zen-color-content-secondary)" })
|
|
3994
4267
|
}
|
|
3995
4268
|
) : null
|
|
3996
4269
|
] }, file.id);
|
|
3997
4270
|
}) }) : null,
|
|
3998
|
-
/* @__PURE__ */
|
|
4271
|
+
/* @__PURE__ */ jsx33(
|
|
3999
4272
|
"input",
|
|
4000
4273
|
{
|
|
4001
4274
|
ref: inputRef,
|
|
@@ -4034,7 +4307,7 @@ var toneStyles = { "default": "datePicker_toneStyles_default__1cnp4rt1", outside
|
|
|
4034
4307
|
var unavailableMark = "datePicker_unavailableMark__1cnp4rth";
|
|
4035
4308
|
|
|
4036
4309
|
// src/components/DatePicker/CalendarArrowButton.tsx
|
|
4037
|
-
import { jsx as
|
|
4310
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4038
4311
|
var CalendarArrowButton = ({
|
|
4039
4312
|
direction,
|
|
4040
4313
|
disabled = false,
|
|
@@ -4043,7 +4316,7 @@ var CalendarArrowButton = ({
|
|
|
4043
4316
|
}) => {
|
|
4044
4317
|
const Icon3 = direction === "previous" ? Icon_exports.ChevronLeftIcon : Icon_exports.ChevronRightIcon;
|
|
4045
4318
|
const label = direction === "previous" ? "Previous" : "Next";
|
|
4046
|
-
return /* @__PURE__ */
|
|
4319
|
+
return /* @__PURE__ */ jsx34(
|
|
4047
4320
|
"button",
|
|
4048
4321
|
{
|
|
4049
4322
|
type: "button",
|
|
@@ -4053,17 +4326,17 @@ var CalendarArrowButton = ({
|
|
|
4053
4326
|
"data-disabled": disabled || void 0,
|
|
4054
4327
|
className: cn(baseArrowButton, className),
|
|
4055
4328
|
onClick,
|
|
4056
|
-
children: /* @__PURE__ */
|
|
4329
|
+
children: /* @__PURE__ */ jsx34(Icon3, { size: "16" })
|
|
4057
4330
|
}
|
|
4058
4331
|
);
|
|
4059
4332
|
};
|
|
4060
4333
|
CalendarArrowButton.displayName = "CalendarArrowButton";
|
|
4061
4334
|
|
|
4062
4335
|
// src/components/DatePicker/CalendarGrid.tsx
|
|
4063
|
-
import { useMemo as
|
|
4336
|
+
import { useMemo as useMemo5 } from "react";
|
|
4064
4337
|
|
|
4065
4338
|
// src/components/DatePicker/CalendarDateButton.tsx
|
|
4066
|
-
import { jsx as
|
|
4339
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4067
4340
|
var CalendarDateButton = ({
|
|
4068
4341
|
label,
|
|
4069
4342
|
selection = "none",
|
|
@@ -4080,7 +4353,7 @@ var CalendarDateButton = ({
|
|
|
4080
4353
|
const isPressed = selection !== "none";
|
|
4081
4354
|
const isRangeEndpoint = selection === "selected" || selection === "start" || selection === "end";
|
|
4082
4355
|
const hasEdgeRadius = isRangeEndpoint || selection === "inRange";
|
|
4083
|
-
return /* @__PURE__ */
|
|
4356
|
+
return /* @__PURE__ */ jsx35(
|
|
4084
4357
|
"button",
|
|
4085
4358
|
{
|
|
4086
4359
|
type: "button",
|
|
@@ -4100,7 +4373,7 @@ var CalendarDateButton = ({
|
|
|
4100
4373
|
hasEdgeRadius && edgeRadiusStyles[edgeRadius],
|
|
4101
4374
|
className
|
|
4102
4375
|
),
|
|
4103
|
-
children: /* @__PURE__ */
|
|
4376
|
+
children: /* @__PURE__ */ jsx35("span", { className: cn(dateButtonContent, isUnavailable && unavailableMark), children: label })
|
|
4104
4377
|
}
|
|
4105
4378
|
);
|
|
4106
4379
|
};
|
|
@@ -4186,7 +4459,7 @@ var parseInputDate = (value) => {
|
|
|
4186
4459
|
};
|
|
4187
4460
|
|
|
4188
4461
|
// src/components/DatePicker/CalendarGrid.tsx
|
|
4189
|
-
import { Fragment, jsx as
|
|
4462
|
+
import { Fragment, jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4190
4463
|
var CALENDAR_ROWS = 5;
|
|
4191
4464
|
var CALENDAR_CELLS = CALENDAR_ROWS * 7;
|
|
4192
4465
|
var useCalendarDays = ({
|
|
@@ -4200,7 +4473,7 @@ var useCalendarDays = ({
|
|
|
4200
4473
|
maxDate,
|
|
4201
4474
|
unavailableDates = []
|
|
4202
4475
|
}) => {
|
|
4203
|
-
return
|
|
4476
|
+
return useMemo5(() => {
|
|
4204
4477
|
const days = [];
|
|
4205
4478
|
const firstDayOfMonth = new Date(year, month, 1);
|
|
4206
4479
|
const startDate = new Date(firstDayOfMonth);
|
|
@@ -4297,8 +4570,8 @@ var CalendarGrid = ({
|
|
|
4297
4570
|
if (day.isDisabled || day.isUnavailable) return;
|
|
4298
4571
|
onDateSelect?.(day.date);
|
|
4299
4572
|
};
|
|
4300
|
-
return /* @__PURE__ */
|
|
4301
|
-
/* @__PURE__ */
|
|
4573
|
+
return /* @__PURE__ */ jsxs23(Fragment, { children: [
|
|
4574
|
+
/* @__PURE__ */ jsx36(Box2, { className: calendarWeekdaysRow, children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx36(
|
|
4302
4575
|
Text2,
|
|
4303
4576
|
{
|
|
4304
4577
|
as: "span",
|
|
@@ -4309,9 +4582,9 @@ var CalendarGrid = ({
|
|
|
4309
4582
|
},
|
|
4310
4583
|
day
|
|
4311
4584
|
)) }),
|
|
4312
|
-
/* @__PURE__ */
|
|
4585
|
+
/* @__PURE__ */ jsx36(Box2, { className: calendarDaysGrid, children: calendarDays.map((day, index) => {
|
|
4313
4586
|
if (day.isOutsideMonth && !showOutsideDays) {
|
|
4314
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ jsx36(
|
|
4315
4588
|
CalendarDateButton,
|
|
4316
4589
|
{
|
|
4317
4590
|
label: "",
|
|
@@ -4348,7 +4621,7 @@ var CalendarGrid = ({
|
|
|
4348
4621
|
if (selection === "end" && prevInRange && columnIndex > 0) {
|
|
4349
4622
|
rangeExtends = "left";
|
|
4350
4623
|
}
|
|
4351
|
-
return /* @__PURE__ */
|
|
4624
|
+
return /* @__PURE__ */ jsx36(
|
|
4352
4625
|
CalendarDateButton,
|
|
4353
4626
|
{
|
|
4354
4627
|
label: day.day,
|
|
@@ -4368,7 +4641,7 @@ var CalendarGrid = ({
|
|
|
4368
4641
|
CalendarGrid.displayName = "CalendarGrid";
|
|
4369
4642
|
|
|
4370
4643
|
// src/components/DatePicker/Calendar.tsx
|
|
4371
|
-
import { jsx as
|
|
4644
|
+
import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4372
4645
|
var Calendar = ({
|
|
4373
4646
|
month,
|
|
4374
4647
|
year,
|
|
@@ -4387,9 +4660,9 @@ var Calendar = ({
|
|
|
4387
4660
|
showOutsideDays = true,
|
|
4388
4661
|
className
|
|
4389
4662
|
}) => {
|
|
4390
|
-
return /* @__PURE__ */
|
|
4391
|
-
/* @__PURE__ */
|
|
4392
|
-
/* @__PURE__ */
|
|
4663
|
+
return /* @__PURE__ */ jsxs24(Box2, { className: cn(calendarContainer, className), children: [
|
|
4664
|
+
/* @__PURE__ */ jsxs24(Box2, { className: calendarHeader, children: [
|
|
4665
|
+
/* @__PURE__ */ jsx37(
|
|
4393
4666
|
CalendarArrowButton,
|
|
4394
4667
|
{
|
|
4395
4668
|
direction: "previous",
|
|
@@ -4397,7 +4670,7 @@ var Calendar = ({
|
|
|
4397
4670
|
disabled: previousMonthDisabled
|
|
4398
4671
|
}
|
|
4399
4672
|
),
|
|
4400
|
-
/* @__PURE__ */
|
|
4673
|
+
/* @__PURE__ */ jsxs24(
|
|
4401
4674
|
Text2,
|
|
4402
4675
|
{
|
|
4403
4676
|
as: "span",
|
|
@@ -4410,7 +4683,7 @@ var Calendar = ({
|
|
|
4410
4683
|
]
|
|
4411
4684
|
}
|
|
4412
4685
|
),
|
|
4413
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsx37(
|
|
4414
4687
|
CalendarArrowButton,
|
|
4415
4688
|
{
|
|
4416
4689
|
direction: "next",
|
|
@@ -4419,7 +4692,7 @@ var Calendar = ({
|
|
|
4419
4692
|
}
|
|
4420
4693
|
)
|
|
4421
4694
|
] }),
|
|
4422
|
-
/* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsx37(
|
|
4423
4696
|
CalendarGrid,
|
|
4424
4697
|
{
|
|
4425
4698
|
month,
|
|
@@ -4441,36 +4714,35 @@ Calendar.displayName = "Calendar";
|
|
|
4441
4714
|
|
|
4442
4715
|
// src/components/TimePicker/TimePicker.tsx
|
|
4443
4716
|
import {
|
|
4444
|
-
forwardRef as
|
|
4717
|
+
forwardRef as forwardRef26,
|
|
4445
4718
|
useCallback as useCallback5,
|
|
4446
4719
|
useEffect as useEffect3,
|
|
4447
|
-
useMemo as
|
|
4448
|
-
useRef as
|
|
4720
|
+
useMemo as useMemo6,
|
|
4721
|
+
useRef as useRef4,
|
|
4449
4722
|
useState as useState5
|
|
4450
4723
|
} from "react";
|
|
4451
4724
|
|
|
4452
4725
|
// src/components/TimePicker/timePicker.css.ts
|
|
4453
|
-
import { createRuntimeFn as
|
|
4726
|
+
import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4454
4727
|
var columnLabel = "timePicker_columnLabel__1trbi7d4";
|
|
4455
4728
|
var columnSeparator = "timePicker_columnSeparator__1trbi7dh";
|
|
4456
|
-
var periodButton =
|
|
4729
|
+
var periodButton = _7a46820({ defaultClassName: "timePicker_periodButton__1trbi7dc", variantClassNames: { selected: { false: "timePicker_periodButton_selected_false__1trbi7dd", true: "timePicker_periodButton_selected_true__1trbi7de" } }, defaultVariants: { selected: false }, compoundVariants: [] });
|
|
4457
4730
|
var periodColumn = "timePicker_periodColumn__1trbi7df";
|
|
4458
4731
|
var periodLabel = "timePicker_periodLabel__1trbi7dg";
|
|
4459
4732
|
var presetButton = "timePicker_presetButton__1trbi7dj";
|
|
4460
|
-
var
|
|
4461
|
-
var timeButton = _7a46821({ defaultClassName: "timePicker__1trbi7d7 timePicker_baseTimeButton__1trbi7d6", variantClassNames: { selected: { false: "timePicker_timeButton_selected_false__1trbi7d8", true: "timePicker_timeButton_selected_true__1trbi7d9" }, disabled: { false: "timePicker_timeButton_disabled_false__1trbi7da", true: "timePicker_timeButton_disabled_true__1trbi7db" } }, defaultVariants: { selected: false, disabled: false }, compoundVariants: [] });
|
|
4733
|
+
var timeButton = _7a46820({ defaultClassName: "timePicker__1trbi7d7 timePicker_baseTimeButton__1trbi7d6", variantClassNames: { selected: { false: "timePicker_timeButton_selected_false__1trbi7d8", true: "timePicker_timeButton_selected_true__1trbi7d9" }, disabled: { false: "timePicker_timeButton_disabled_false__1trbi7da", true: "timePicker_timeButton_disabled_true__1trbi7db" } }, defaultVariants: { selected: false, disabled: false }, compoundVariants: [] });
|
|
4462
4734
|
var timeColumn = "timePicker_timeColumn__1trbi7d3";
|
|
4463
4735
|
var timeDisplayPlaceholder = "timePicker_timeDisplayPlaceholder__1trbi7dp";
|
|
4464
4736
|
var timeDisplayText = "timePicker_timeDisplayText__1trbi7do";
|
|
4465
4737
|
var timeIconContainer = "timePicker_timeIconContainer__1trbi7dq";
|
|
4466
|
-
var timeInputField =
|
|
4738
|
+
var timeInputField = _7a46820({ defaultClassName: "timePicker_timeInputField__1trbi7dk", variantClassNames: { state: { "default": "timePicker_timeInputField_state_default__1trbi7dl", error: "timePicker_timeInputField_state_error__1trbi7dm", disabled: "timePicker_timeInputField_state_disabled__1trbi7dn" } }, defaultVariants: { state: "default" }, compoundVariants: [] });
|
|
4467
4739
|
var timePickerContainer = "timePicker_timePickerContainer__1trbi7d0";
|
|
4468
4740
|
var timePickerFooter = "timePicker_timePickerFooter__1trbi7dr";
|
|
4469
4741
|
var timePickerHeader = "timePicker_timePickerHeader__1trbi7d1";
|
|
4470
4742
|
var timeScrollContainer = "timePicker_timeScrollContainer__1trbi7d5";
|
|
4471
4743
|
|
|
4472
4744
|
// src/components/TimePicker/TimePicker.tsx
|
|
4473
|
-
import { Fragment as Fragment2, jsx as
|
|
4745
|
+
import { Fragment as Fragment2, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4474
4746
|
var DEFAULT_PRESETS = [
|
|
4475
4747
|
{ label: "Now", time: { hours: -1, minutes: -1 } },
|
|
4476
4748
|
// Special marker for "now"
|
|
@@ -4516,7 +4788,7 @@ var isTimeDisabled = (time, minTime, maxTime) => {
|
|
|
4516
4788
|
}
|
|
4517
4789
|
return false;
|
|
4518
4790
|
};
|
|
4519
|
-
var TimePicker =
|
|
4791
|
+
var TimePicker = forwardRef26(
|
|
4520
4792
|
function TimePicker2(props, ref) {
|
|
4521
4793
|
const {
|
|
4522
4794
|
value,
|
|
@@ -4550,9 +4822,9 @@ var TimePicker = forwardRef25(
|
|
|
4550
4822
|
}
|
|
4551
4823
|
return "AM";
|
|
4552
4824
|
});
|
|
4553
|
-
const hoursRef =
|
|
4554
|
-
const minutesRef =
|
|
4555
|
-
const secondsRef =
|
|
4825
|
+
const hoursRef = useRef4(null);
|
|
4826
|
+
const minutesRef = useRef4(null);
|
|
4827
|
+
const secondsRef = useRef4(null);
|
|
4556
4828
|
useEffect3(() => {
|
|
4557
4829
|
if (value !== void 0) {
|
|
4558
4830
|
setSelectedTime(value);
|
|
@@ -4561,19 +4833,19 @@ var TimePicker = forwardRef25(
|
|
|
4561
4833
|
}
|
|
4562
4834
|
}
|
|
4563
4835
|
}, [value]);
|
|
4564
|
-
const hoursArray =
|
|
4836
|
+
const hoursArray = useMemo6(() => {
|
|
4565
4837
|
if (format === "12h") {
|
|
4566
4838
|
return Array.from({ length: 12 }, (_, i) => i + 1);
|
|
4567
4839
|
}
|
|
4568
4840
|
return Array.from({ length: 24 }, (_, i) => i);
|
|
4569
4841
|
}, [format]);
|
|
4570
|
-
const minutesArray =
|
|
4842
|
+
const minutesArray = useMemo6(() => {
|
|
4571
4843
|
return Array.from(
|
|
4572
4844
|
{ length: Math.ceil(60 / minuteStep) },
|
|
4573
4845
|
(_, i) => i * minuteStep
|
|
4574
4846
|
);
|
|
4575
4847
|
}, [minuteStep]);
|
|
4576
|
-
const secondsArray =
|
|
4848
|
+
const secondsArray = useMemo6(() => {
|
|
4577
4849
|
return Array.from({ length: 60 }, (_, i) => i);
|
|
4578
4850
|
}, []);
|
|
4579
4851
|
const getDisplayHours = useCallback5(
|
|
@@ -4692,13 +4964,13 @@ var TimePicker = forwardRef25(
|
|
|
4692
4964
|
}, 0);
|
|
4693
4965
|
}
|
|
4694
4966
|
}, [open, selectedTime, format, getDisplayHours, minuteStep, showSeconds]);
|
|
4695
|
-
const displayValue =
|
|
4967
|
+
const displayValue = useMemo6(() => {
|
|
4696
4968
|
return formatTime(selectedTime, format, showSeconds);
|
|
4697
4969
|
}, [selectedTime, format, showSeconds]);
|
|
4698
4970
|
const renderTriggerElement = () => {
|
|
4699
4971
|
if (renderTrigger) return renderTrigger(displayValue || placeholder);
|
|
4700
4972
|
if (trigger) return trigger;
|
|
4701
|
-
return /* @__PURE__ */
|
|
4973
|
+
return /* @__PURE__ */ jsxs25(
|
|
4702
4974
|
Box2,
|
|
4703
4975
|
{
|
|
4704
4976
|
ref,
|
|
@@ -4711,24 +4983,24 @@ var TimePicker = forwardRef25(
|
|
|
4711
4983
|
"aria-expanded": open,
|
|
4712
4984
|
"aria-disabled": disabled,
|
|
4713
4985
|
children: [
|
|
4714
|
-
displayValue ? /* @__PURE__ */
|
|
4715
|
-
/* @__PURE__ */
|
|
4986
|
+
displayValue ? /* @__PURE__ */ jsx38("span", { className: timeDisplayText, children: displayValue }) : /* @__PURE__ */ jsx38("span", { className: timeDisplayPlaceholder, children: placeholder }),
|
|
4987
|
+
/* @__PURE__ */ jsx38("span", { className: timeIconContainer, children: /* @__PURE__ */ jsx38(Icon_exports.ClockIcon, { size: "20" }) })
|
|
4716
4988
|
]
|
|
4717
4989
|
}
|
|
4718
4990
|
);
|
|
4719
4991
|
};
|
|
4720
4992
|
const selectedDisplayHours = selectedTime ? getDisplayHours(selectedTime.hours) : null;
|
|
4721
|
-
return /* @__PURE__ */
|
|
4722
|
-
/* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4724
|
-
/* @__PURE__ */
|
|
4725
|
-
/* @__PURE__ */
|
|
4726
|
-
selectedTime && /* @__PURE__ */
|
|
4993
|
+
return /* @__PURE__ */ jsxs25(MenuRoot, { open, onOpenChange: setOpen, children: [
|
|
4994
|
+
/* @__PURE__ */ jsx38(MenuTrigger, { disabled, children: renderTriggerElement() }),
|
|
4995
|
+
/* @__PURE__ */ jsx38(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */ jsxs25(Box2, { className: timePickerContainer, children: [
|
|
4996
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timePickerHeader, children: [
|
|
4997
|
+
/* @__PURE__ */ jsx38(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: "Select Time" }),
|
|
4998
|
+
selectedTime && /* @__PURE__ */ jsx38(Text2, { fontVariant: "text-s-regular", color: "contentBrand", children: displayValue })
|
|
4727
4999
|
] }),
|
|
4728
|
-
/* @__PURE__ */
|
|
4729
|
-
/* @__PURE__ */
|
|
4730
|
-
/* @__PURE__ */
|
|
4731
|
-
/* @__PURE__ */
|
|
5000
|
+
/* @__PURE__ */ jsxs25(Inline2, { gap: "xs", alignItems: "center", children: [
|
|
5001
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timeColumn, children: [
|
|
5002
|
+
/* @__PURE__ */ jsx38("span", { className: columnLabel, children: "Hour" }),
|
|
5003
|
+
/* @__PURE__ */ jsx38(Box2, { ref: hoursRef, className: timeScrollContainer, children: hoursArray.map((hour) => {
|
|
4732
5004
|
const isSelected = selectedDisplayHours === hour;
|
|
4733
5005
|
const hours24 = format === "12h" ? convertTo24Hour(hour, period) : hour;
|
|
4734
5006
|
const isDisabled = isTimeDisabled(
|
|
@@ -4736,7 +5008,7 @@ var TimePicker = forwardRef25(
|
|
|
4736
5008
|
minTime,
|
|
4737
5009
|
maxTime
|
|
4738
5010
|
);
|
|
4739
|
-
return /* @__PURE__ */
|
|
5011
|
+
return /* @__PURE__ */ jsx38(
|
|
4740
5012
|
"button",
|
|
4741
5013
|
{
|
|
4742
5014
|
type: "button",
|
|
@@ -4754,10 +5026,10 @@ var TimePicker = forwardRef25(
|
|
|
4754
5026
|
);
|
|
4755
5027
|
}) })
|
|
4756
5028
|
] }),
|
|
4757
|
-
/* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */
|
|
4759
|
-
/* @__PURE__ */
|
|
4760
|
-
/* @__PURE__ */
|
|
5029
|
+
/* @__PURE__ */ jsx38("span", { className: columnSeparator, children: ":" }),
|
|
5030
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timeColumn, children: [
|
|
5031
|
+
/* @__PURE__ */ jsx38("span", { className: columnLabel, children: "Min" }),
|
|
5032
|
+
/* @__PURE__ */ jsx38(Box2, { ref: minutesRef, className: timeScrollContainer, children: minutesArray.map((minute) => {
|
|
4761
5033
|
const isSelected = selectedTime?.minutes === minute;
|
|
4762
5034
|
const isDisabled = isTimeDisabled(
|
|
4763
5035
|
{
|
|
@@ -4767,7 +5039,7 @@ var TimePicker = forwardRef25(
|
|
|
4767
5039
|
minTime,
|
|
4768
5040
|
maxTime
|
|
4769
5041
|
);
|
|
4770
|
-
return /* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ jsx38(
|
|
4771
5043
|
"button",
|
|
4772
5044
|
{
|
|
4773
5045
|
type: "button",
|
|
@@ -4785,18 +5057,18 @@ var TimePicker = forwardRef25(
|
|
|
4785
5057
|
);
|
|
4786
5058
|
}) })
|
|
4787
5059
|
] }),
|
|
4788
|
-
showSeconds && /* @__PURE__ */
|
|
4789
|
-
/* @__PURE__ */
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
5060
|
+
showSeconds && /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
5061
|
+
/* @__PURE__ */ jsx38("span", { className: columnSeparator, children: ":" }),
|
|
5062
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timeColumn, children: [
|
|
5063
|
+
/* @__PURE__ */ jsx38("span", { className: columnLabel, children: "Sec" }),
|
|
5064
|
+
/* @__PURE__ */ jsx38(
|
|
4793
5065
|
Box2,
|
|
4794
5066
|
{
|
|
4795
5067
|
ref: secondsRef,
|
|
4796
5068
|
className: timeScrollContainer,
|
|
4797
5069
|
children: secondsArray.map((second) => {
|
|
4798
5070
|
const isSelected = selectedTime?.seconds === second;
|
|
4799
|
-
return /* @__PURE__ */
|
|
5071
|
+
return /* @__PURE__ */ jsx38(
|
|
4800
5072
|
"button",
|
|
4801
5073
|
{
|
|
4802
5074
|
type: "button",
|
|
@@ -4815,10 +5087,10 @@ var TimePicker = forwardRef25(
|
|
|
4815
5087
|
)
|
|
4816
5088
|
] })
|
|
4817
5089
|
] }),
|
|
4818
|
-
format === "12h" && /* @__PURE__ */
|
|
4819
|
-
/* @__PURE__ */
|
|
4820
|
-
/* @__PURE__ */
|
|
4821
|
-
/* @__PURE__ */
|
|
5090
|
+
format === "12h" && /* @__PURE__ */ jsxs25(Box2, { className: periodColumn, children: [
|
|
5091
|
+
/* @__PURE__ */ jsx38("span", { className: periodLabel, children: "Period" }),
|
|
5092
|
+
/* @__PURE__ */ jsxs25(Stack2, { gap: "xs", children: [
|
|
5093
|
+
/* @__PURE__ */ jsx38(
|
|
4822
5094
|
"button",
|
|
4823
5095
|
{
|
|
4824
5096
|
type: "button",
|
|
@@ -4830,7 +5102,7 @@ var TimePicker = forwardRef25(
|
|
|
4830
5102
|
children: "AM"
|
|
4831
5103
|
}
|
|
4832
5104
|
),
|
|
4833
|
-
/* @__PURE__ */
|
|
5105
|
+
/* @__PURE__ */ jsx38(
|
|
4834
5106
|
"button",
|
|
4835
5107
|
{
|
|
4836
5108
|
type: "button",
|
|
@@ -4845,18 +5117,29 @@ var TimePicker = forwardRef25(
|
|
|
4845
5117
|
] })
|
|
4846
5118
|
] })
|
|
4847
5119
|
] }),
|
|
4848
|
-
showPresets && presets.length > 0 && /* @__PURE__ */
|
|
4849
|
-
|
|
5120
|
+
showPresets && presets.length > 0 && /* @__PURE__ */ jsx38(
|
|
5121
|
+
Inline2,
|
|
4850
5122
|
{
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
5123
|
+
gap: "xs",
|
|
5124
|
+
paddingTop: "sm",
|
|
5125
|
+
paddingX: "sm",
|
|
5126
|
+
borderTopWidth: "xs",
|
|
5127
|
+
borderTopStyle: "solid",
|
|
5128
|
+
borderColor: "borderQuaternary",
|
|
5129
|
+
children: presets.map((preset, index) => /* @__PURE__ */ jsx38(
|
|
5130
|
+
"button",
|
|
5131
|
+
{
|
|
5132
|
+
type: "button",
|
|
5133
|
+
className: presetButton,
|
|
5134
|
+
onClick: () => handlePresetSelect(preset),
|
|
5135
|
+
children: preset.label
|
|
5136
|
+
},
|
|
5137
|
+
index
|
|
5138
|
+
))
|
|
5139
|
+
}
|
|
5140
|
+
),
|
|
5141
|
+
/* @__PURE__ */ jsxs25(Box2, { className: timePickerFooter, children: [
|
|
5142
|
+
/* @__PURE__ */ jsx38(
|
|
4860
5143
|
Button,
|
|
4861
5144
|
{
|
|
4862
5145
|
variant: "ghost",
|
|
@@ -4866,7 +5149,7 @@ var TimePicker = forwardRef25(
|
|
|
4866
5149
|
children: "Cancel"
|
|
4867
5150
|
}
|
|
4868
5151
|
),
|
|
4869
|
-
/* @__PURE__ */
|
|
5152
|
+
/* @__PURE__ */ jsx38(Button, { size: "md", onClick: handleApply, disabled: !selectedTime, children: "Apply" })
|
|
4870
5153
|
] })
|
|
4871
5154
|
] }) })
|
|
4872
5155
|
] });
|
|
@@ -4875,13 +5158,13 @@ var TimePicker = forwardRef25(
|
|
|
4875
5158
|
TimePicker.displayName = "TimePicker";
|
|
4876
5159
|
|
|
4877
5160
|
// src/components/DateTimeInput/DateTimeInput.tsx
|
|
4878
|
-
import React23, { forwardRef as
|
|
5161
|
+
import React23, { forwardRef as forwardRef27, useCallback as useCallback6, useMemo as useMemo7, useState as useState6 } from "react";
|
|
4879
5162
|
|
|
4880
5163
|
// src/components/DateTimeInput/dateTimeInput.css.ts
|
|
4881
|
-
import { createRuntimeFn as
|
|
5164
|
+
import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4882
5165
|
var clearButton = "dateTimeInput_clearButton__183d6ehd";
|
|
4883
|
-
var dateTimeFieldContainer =
|
|
4884
|
-
var dateTimeInputContainer =
|
|
5166
|
+
var dateTimeFieldContainer = _7a46821({ defaultClassName: "dateTimeInput_dateTimeFieldContainer__183d6eh4", variantClassNames: { state: { "default": "dateTimeInput_dateTimeFieldContainer_state_default__183d6eh5", error: "dateTimeInput_dateTimeFieldContainer_state_error__183d6eh6", disabled: "dateTimeInput_dateTimeFieldContainer_state_disabled__183d6eh7" } }, defaultVariants: { state: "default" }, compoundVariants: [] });
|
|
5167
|
+
var dateTimeInputContainer = _7a46821({ defaultClassName: "dateTimeInput_dateTimeInputContainer__183d6eh0", variantClassNames: { layout: { vertical: "dateTimeInput_dateTimeInputContainer_layout_vertical__183d6eh1", horizontal: "dateTimeInput_dateTimeInputContainer_layout_horizontal__183d6eh2" } }, defaultVariants: { layout: "vertical" }, compoundVariants: [] });
|
|
4885
5168
|
var dateTimeSegmentWithSeparator = "dateTimeInput_dateTimeSegmentWithSeparator__183d6eh9 dateTimeInput_dateTimeSegment__183d6eh8";
|
|
4886
5169
|
var inputWrapper2 = "dateTimeInput_inputWrapper__183d6eh3";
|
|
4887
5170
|
var segmentIcon = "dateTimeInput_segmentIcon__183d6ehc";
|
|
@@ -4890,7 +5173,7 @@ var segmentText = "dateTimeInput_segmentText__183d6eha";
|
|
|
4890
5173
|
var singleInputSegment = "dateTimeInput_singleInputSegment__183d6ehe";
|
|
4891
5174
|
|
|
4892
5175
|
// src/components/DateTimeInput/DateTimeInput.tsx
|
|
4893
|
-
import { Fragment as Fragment3, jsx as
|
|
5176
|
+
import { Fragment as Fragment3, jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4894
5177
|
var padZero2 = (num) => num.toString().padStart(2, "0");
|
|
4895
5178
|
var formatTimeDisplay = (time, format, showSeconds) => {
|
|
4896
5179
|
if (!time) return "";
|
|
@@ -4906,7 +5189,7 @@ var formatTimeDisplay = (time, format, showSeconds) => {
|
|
|
4906
5189
|
}
|
|
4907
5190
|
return parts.join(":") + period;
|
|
4908
5191
|
};
|
|
4909
|
-
var DateTimeInput =
|
|
5192
|
+
var DateTimeInput = forwardRef27(
|
|
4910
5193
|
function DateTimeInput2(props, ref) {
|
|
4911
5194
|
const {
|
|
4912
5195
|
mode = "datetime",
|
|
@@ -4929,12 +5212,12 @@ var DateTimeInput = forwardRef26(
|
|
|
4929
5212
|
showClear = true,
|
|
4930
5213
|
today: todayProp
|
|
4931
5214
|
} = props;
|
|
4932
|
-
const today =
|
|
4933
|
-
const derivedMinDate =
|
|
5215
|
+
const today = useMemo7(() => todayProp ?? /* @__PURE__ */ new Date(), [todayProp]);
|
|
5216
|
+
const derivedMinDate = useMemo7(
|
|
4934
5217
|
() => minDate ?? getDefaultMinDate(today),
|
|
4935
5218
|
[minDate, today]
|
|
4936
5219
|
);
|
|
4937
|
-
const derivedMaxDate =
|
|
5220
|
+
const derivedMaxDate = useMemo7(
|
|
4938
5221
|
() => maxDate ?? getDefaultMaxDate(today),
|
|
4939
5222
|
[maxDate, today]
|
|
4940
5223
|
);
|
|
@@ -5013,15 +5296,15 @@ var DateTimeInput = forwardRef26(
|
|
|
5013
5296
|
return newMonth;
|
|
5014
5297
|
});
|
|
5015
5298
|
}, [year]);
|
|
5016
|
-
const dateDisplayValue =
|
|
5299
|
+
const dateDisplayValue = useMemo7(() => {
|
|
5017
5300
|
return selectedDate ? formatDate(selectedDate) : null;
|
|
5018
5301
|
}, [selectedDate]);
|
|
5019
|
-
const timeDisplayValue =
|
|
5302
|
+
const timeDisplayValue = useMemo7(() => {
|
|
5020
5303
|
return formatTimeDisplay(selectedTime, timeFormat, showSeconds);
|
|
5021
5304
|
}, [selectedTime, timeFormat, showSeconds]);
|
|
5022
5305
|
const hasValue = mode === "date" && selectedDate || mode === "time" && selectedTime || mode === "datetime" && (selectedDate || selectedTime);
|
|
5023
|
-
const labelElement = label && /* @__PURE__ */
|
|
5024
|
-
/* @__PURE__ */
|
|
5306
|
+
const labelElement = label && /* @__PURE__ */ jsxs26(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
5307
|
+
/* @__PURE__ */ jsx39(
|
|
5025
5308
|
Text2,
|
|
5026
5309
|
{
|
|
5027
5310
|
as: "label",
|
|
@@ -5031,10 +5314,10 @@ var DateTimeInput = forwardRef26(
|
|
|
5031
5314
|
children: label
|
|
5032
5315
|
}
|
|
5033
5316
|
),
|
|
5034
|
-
mandatory && /* @__PURE__ */
|
|
5317
|
+
mandatory && /* @__PURE__ */ jsx39(Text2, { fontVariant: "text-m-regular", color: "contentTertiary", as: "span", children: "*" })
|
|
5035
5318
|
] });
|
|
5036
|
-
const renderDateSegment = (withSeparator = false) => /* @__PURE__ */
|
|
5037
|
-
/* @__PURE__ */
|
|
5319
|
+
const renderDateSegment = (withSeparator = false) => /* @__PURE__ */ jsxs26(MenuRoot, { open: dateOpen, onOpenChange: setDateOpen, children: [
|
|
5320
|
+
/* @__PURE__ */ jsx39(MenuTrigger, { disabled, children: /* @__PURE__ */ jsxs26(
|
|
5038
5321
|
Box2,
|
|
5039
5322
|
{
|
|
5040
5323
|
className: withSeparator ? dateTimeSegmentWithSeparator : singleInputSegment,
|
|
@@ -5043,14 +5326,14 @@ var DateTimeInput = forwardRef26(
|
|
|
5043
5326
|
"aria-haspopup": "dialog",
|
|
5044
5327
|
"aria-expanded": dateOpen,
|
|
5045
5328
|
children: [
|
|
5046
|
-
/* @__PURE__ */
|
|
5047
|
-
dateDisplayValue ? /* @__PURE__ */
|
|
5329
|
+
/* @__PURE__ */ jsx39("span", { className: segmentIcon, children: /* @__PURE__ */ jsx39(Icon_exports.CalendarIcon, { size: "20" }) }),
|
|
5330
|
+
dateDisplayValue ? /* @__PURE__ */ jsx39("span", { className: segmentText, children: dateDisplayValue }) : /* @__PURE__ */ jsx39("span", { className: segmentPlaceholder, children: datePlaceholder })
|
|
5048
5331
|
]
|
|
5049
5332
|
}
|
|
5050
5333
|
) }),
|
|
5051
|
-
/* @__PURE__ */
|
|
5052
|
-
/* @__PURE__ */
|
|
5053
|
-
/* @__PURE__ */
|
|
5334
|
+
/* @__PURE__ */ jsx39(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */ jsxs26(Stack2, { padding: "md", gap: "md", children: [
|
|
5335
|
+
/* @__PURE__ */ jsx39(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: "Select Date" }),
|
|
5336
|
+
/* @__PURE__ */ jsx39(
|
|
5054
5337
|
Calendar,
|
|
5055
5338
|
{
|
|
5056
5339
|
month,
|
|
@@ -5066,8 +5349,8 @@ var DateTimeInput = forwardRef26(
|
|
|
5066
5349
|
)
|
|
5067
5350
|
] }) })
|
|
5068
5351
|
] });
|
|
5069
|
-
const renderTimeSegment = () => /* @__PURE__ */
|
|
5070
|
-
/* @__PURE__ */
|
|
5352
|
+
const renderTimeSegment = () => /* @__PURE__ */ jsxs26(MenuRoot, { open: timeOpen, onOpenChange: setTimeOpen, children: [
|
|
5353
|
+
/* @__PURE__ */ jsx39(MenuTrigger, { disabled, children: /* @__PURE__ */ jsxs26(
|
|
5071
5354
|
Box2,
|
|
5072
5355
|
{
|
|
5073
5356
|
className: singleInputSegment,
|
|
@@ -5076,12 +5359,12 @@ var DateTimeInput = forwardRef26(
|
|
|
5076
5359
|
"aria-haspopup": "dialog",
|
|
5077
5360
|
"aria-expanded": timeOpen,
|
|
5078
5361
|
children: [
|
|
5079
|
-
/* @__PURE__ */
|
|
5080
|
-
timeDisplayValue ? /* @__PURE__ */
|
|
5362
|
+
/* @__PURE__ */ jsx39("span", { className: segmentIcon, children: /* @__PURE__ */ jsx39(Icon_exports.ClockIcon, { size: "20" }) }),
|
|
5363
|
+
timeDisplayValue ? /* @__PURE__ */ jsx39("span", { className: segmentText, children: timeDisplayValue }) : /* @__PURE__ */ jsx39("span", { className: segmentPlaceholder, children: timePlaceholder })
|
|
5081
5364
|
]
|
|
5082
5365
|
}
|
|
5083
5366
|
) }),
|
|
5084
|
-
/* @__PURE__ */
|
|
5367
|
+
/* @__PURE__ */ jsx39(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */ jsx39(
|
|
5085
5368
|
TimePickerContent,
|
|
5086
5369
|
{
|
|
5087
5370
|
value: selectedTime,
|
|
@@ -5095,8 +5378,8 @@ var DateTimeInput = forwardRef26(
|
|
|
5095
5378
|
}
|
|
5096
5379
|
) })
|
|
5097
5380
|
] });
|
|
5098
|
-
const inputElement2 = /* @__PURE__ */
|
|
5099
|
-
/* @__PURE__ */
|
|
5381
|
+
const inputElement2 = /* @__PURE__ */ jsxs26(Box2, { className: inputWrapper2, children: [
|
|
5382
|
+
/* @__PURE__ */ jsxs26(
|
|
5100
5383
|
Box2,
|
|
5101
5384
|
{
|
|
5102
5385
|
ref,
|
|
@@ -5107,24 +5390,24 @@ var DateTimeInput = forwardRef26(
|
|
|
5107
5390
|
children: [
|
|
5108
5391
|
mode === "date" && renderDateSegment(false),
|
|
5109
5392
|
mode === "time" && renderTimeSegment(),
|
|
5110
|
-
mode === "datetime" && /* @__PURE__ */
|
|
5393
|
+
mode === "datetime" && /* @__PURE__ */ jsxs26(Fragment3, { children: [
|
|
5111
5394
|
renderDateSegment(true),
|
|
5112
5395
|
renderTimeSegment()
|
|
5113
5396
|
] }),
|
|
5114
|
-
showClear && hasValue && !disabled && /* @__PURE__ */
|
|
5397
|
+
showClear && hasValue && !disabled && /* @__PURE__ */ jsx39(
|
|
5115
5398
|
"button",
|
|
5116
5399
|
{
|
|
5117
5400
|
type: "button",
|
|
5118
5401
|
className: clearButton,
|
|
5119
5402
|
onClick: handleClear,
|
|
5120
5403
|
"aria-label": "Clear",
|
|
5121
|
-
children: /* @__PURE__ */
|
|
5404
|
+
children: /* @__PURE__ */ jsx39(Icon_exports.CloseIcon, { size: "16" })
|
|
5122
5405
|
}
|
|
5123
5406
|
)
|
|
5124
5407
|
]
|
|
5125
5408
|
}
|
|
5126
5409
|
),
|
|
5127
|
-
displayHelperText && /* @__PURE__ */
|
|
5410
|
+
displayHelperText && /* @__PURE__ */ jsx39(
|
|
5128
5411
|
Text2,
|
|
5129
5412
|
{
|
|
5130
5413
|
id: helperTextId,
|
|
@@ -5135,7 +5418,7 @@ var DateTimeInput = forwardRef26(
|
|
|
5135
5418
|
}
|
|
5136
5419
|
)
|
|
5137
5420
|
] });
|
|
5138
|
-
return /* @__PURE__ */
|
|
5421
|
+
return /* @__PURE__ */ jsxs26(
|
|
5139
5422
|
Box2,
|
|
5140
5423
|
{
|
|
5141
5424
|
className: dateTimeInputContainer({
|
|
@@ -5164,16 +5447,16 @@ var TimePickerContent = ({
|
|
|
5164
5447
|
}
|
|
5165
5448
|
return "AM";
|
|
5166
5449
|
});
|
|
5167
|
-
const hoursArray =
|
|
5450
|
+
const hoursArray = useMemo7(() => {
|
|
5168
5451
|
if (format === "12h") {
|
|
5169
5452
|
return Array.from({ length: 12 }, (_, i) => i + 1);
|
|
5170
5453
|
}
|
|
5171
5454
|
return Array.from({ length: 24 }, (_, i) => i);
|
|
5172
5455
|
}, [format]);
|
|
5173
|
-
const minutesArray =
|
|
5456
|
+
const minutesArray = useMemo7(() => {
|
|
5174
5457
|
return Array.from({ length: 60 }, (_, i) => i);
|
|
5175
5458
|
}, []);
|
|
5176
|
-
const secondsArray =
|
|
5459
|
+
const secondsArray = useMemo7(() => {
|
|
5177
5460
|
return Array.from({ length: 60 }, (_, i) => i);
|
|
5178
5461
|
}, []);
|
|
5179
5462
|
const pad = (num) => num.toString().padStart(2, "0");
|
|
@@ -5218,12 +5501,12 @@ var TimePickerContent = ({
|
|
|
5218
5501
|
}
|
|
5219
5502
|
};
|
|
5220
5503
|
const selectedDisplayHours = selectedTime ? getDisplayHours(selectedTime.hours) : null;
|
|
5221
|
-
return /* @__PURE__ */
|
|
5222
|
-
/* @__PURE__ */
|
|
5223
|
-
/* @__PURE__ */
|
|
5224
|
-
/* @__PURE__ */
|
|
5225
|
-
/* @__PURE__ */
|
|
5226
|
-
/* @__PURE__ */
|
|
5504
|
+
return /* @__PURE__ */ jsxs26(Box2, { className: timePickerContainer, children: [
|
|
5505
|
+
/* @__PURE__ */ jsx39(Box2, { className: timePickerHeader, children: /* @__PURE__ */ jsx39(Text2, { fontVariant: "text-m-medium", color: "contentPrimary", children: "Select Time" }) }),
|
|
5506
|
+
/* @__PURE__ */ jsxs26(Inline2, { gap: "xs", alignItems: "start", children: [
|
|
5507
|
+
/* @__PURE__ */ jsxs26(Box2, { className: timeColumn, children: [
|
|
5508
|
+
/* @__PURE__ */ jsx39("span", { className: columnLabel, children: "Hour" }),
|
|
5509
|
+
/* @__PURE__ */ jsx39(Box2, { className: timeScrollContainer, children: hoursArray.map((hour) => /* @__PURE__ */ jsx39(
|
|
5227
5510
|
"button",
|
|
5228
5511
|
{
|
|
5229
5512
|
type: "button",
|
|
@@ -5237,10 +5520,10 @@ var TimePickerContent = ({
|
|
|
5237
5520
|
hour
|
|
5238
5521
|
)) })
|
|
5239
5522
|
] }),
|
|
5240
|
-
/* @__PURE__ */
|
|
5241
|
-
/* @__PURE__ */
|
|
5242
|
-
/* @__PURE__ */
|
|
5243
|
-
/* @__PURE__ */
|
|
5523
|
+
/* @__PURE__ */ jsx39("span", { className: columnSeparator, children: ":" }),
|
|
5524
|
+
/* @__PURE__ */ jsxs26(Box2, { className: timeColumn, children: [
|
|
5525
|
+
/* @__PURE__ */ jsx39("span", { className: columnLabel, children: "Min" }),
|
|
5526
|
+
/* @__PURE__ */ jsx39(Box2, { className: timeScrollContainer, children: minutesArray.map((minute) => /* @__PURE__ */ jsx39(
|
|
5244
5527
|
"button",
|
|
5245
5528
|
{
|
|
5246
5529
|
type: "button",
|
|
@@ -5254,11 +5537,11 @@ var TimePickerContent = ({
|
|
|
5254
5537
|
minute
|
|
5255
5538
|
)) })
|
|
5256
5539
|
] }),
|
|
5257
|
-
showSeconds && /* @__PURE__ */
|
|
5258
|
-
/* @__PURE__ */
|
|
5259
|
-
/* @__PURE__ */
|
|
5260
|
-
/* @__PURE__ */
|
|
5261
|
-
/* @__PURE__ */
|
|
5540
|
+
showSeconds && /* @__PURE__ */ jsxs26(Fragment3, { children: [
|
|
5541
|
+
/* @__PURE__ */ jsx39("span", { className: columnSeparator, children: ":" }),
|
|
5542
|
+
/* @__PURE__ */ jsxs26(Box2, { className: timeColumn, children: [
|
|
5543
|
+
/* @__PURE__ */ jsx39("span", { className: columnLabel, children: "Sec" }),
|
|
5544
|
+
/* @__PURE__ */ jsx39(Box2, { className: timeScrollContainer, children: secondsArray.map((second) => /* @__PURE__ */ jsx39(
|
|
5262
5545
|
"button",
|
|
5263
5546
|
{
|
|
5264
5547
|
type: "button",
|
|
@@ -5273,10 +5556,10 @@ var TimePickerContent = ({
|
|
|
5273
5556
|
)) })
|
|
5274
5557
|
] })
|
|
5275
5558
|
] }),
|
|
5276
|
-
format === "12h" && /* @__PURE__ */
|
|
5277
|
-
/* @__PURE__ */
|
|
5278
|
-
/* @__PURE__ */
|
|
5279
|
-
/* @__PURE__ */
|
|
5559
|
+
format === "12h" && /* @__PURE__ */ jsxs26(Box2, { className: periodColumn, children: [
|
|
5560
|
+
/* @__PURE__ */ jsx39("span", { className: periodLabel, children: "Period" }),
|
|
5561
|
+
/* @__PURE__ */ jsxs26(Stack2, { gap: "xs", children: [
|
|
5562
|
+
/* @__PURE__ */ jsx39(
|
|
5280
5563
|
"button",
|
|
5281
5564
|
{
|
|
5282
5565
|
type: "button",
|
|
@@ -5285,7 +5568,7 @@ var TimePickerContent = ({
|
|
|
5285
5568
|
children: "AM"
|
|
5286
5569
|
}
|
|
5287
5570
|
),
|
|
5288
|
-
/* @__PURE__ */
|
|
5571
|
+
/* @__PURE__ */ jsx39(
|
|
5289
5572
|
"button",
|
|
5290
5573
|
{
|
|
5291
5574
|
type: "button",
|
|
@@ -5297,9 +5580,9 @@ var TimePickerContent = ({
|
|
|
5297
5580
|
] })
|
|
5298
5581
|
] })
|
|
5299
5582
|
] }),
|
|
5300
|
-
/* @__PURE__ */
|
|
5301
|
-
/* @__PURE__ */
|
|
5302
|
-
/* @__PURE__ */
|
|
5583
|
+
/* @__PURE__ */ jsxs26(Box2, { className: timePickerFooter, children: [
|
|
5584
|
+
/* @__PURE__ */ jsx39(Button, { variant: "ghost", destructive: true, size: "md", onClick: onClear, children: "Cancel" }),
|
|
5585
|
+
/* @__PURE__ */ jsx39(Button, { size: "md", onClick: () => onApply(selectedTime), disabled: !selectedTime, children: "Apply" })
|
|
5303
5586
|
] })
|
|
5304
5587
|
] });
|
|
5305
5588
|
};
|
|
@@ -5343,7 +5626,9 @@ export {
|
|
|
5343
5626
|
export_ArrowLeftIcon as ArrowLeftIcon,
|
|
5344
5627
|
export_ArrowRightIcon as ArrowRightIcon,
|
|
5345
5628
|
Avatar,
|
|
5629
|
+
AvatarGroup,
|
|
5346
5630
|
Badge,
|
|
5631
|
+
BadgeNumber,
|
|
5347
5632
|
Body,
|
|
5348
5633
|
Box2 as Box,
|
|
5349
5634
|
Breadcrumb,
|
|
@@ -5445,6 +5730,7 @@ export {
|
|
|
5445
5730
|
PopoverContent,
|
|
5446
5731
|
PopoverRoot,
|
|
5447
5732
|
PopoverTrigger,
|
|
5733
|
+
ProgressBar,
|
|
5448
5734
|
export_SearchIcon as SearchIcon,
|
|
5449
5735
|
Select,
|
|
5450
5736
|
SelectContent,
|