@zentrades-ui/components 0.2.7 → 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 +952 -653
- 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 +952 -653
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -520,7 +520,8 @@ 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
|
+
const defaultElementReset = { margin: 0, padding: 0 };
|
|
524
525
|
const truncationStyles = {};
|
|
525
526
|
if (truncate) {
|
|
526
527
|
truncationStyles.overflow = "hidden";
|
|
@@ -551,7 +552,8 @@ var TextComponent = forwardRef5(function Text(props, ref) {
|
|
|
551
552
|
color,
|
|
552
553
|
className,
|
|
553
554
|
style: {
|
|
554
|
-
...
|
|
555
|
+
...defaultElementReset,
|
|
556
|
+
...variantStyles2,
|
|
555
557
|
...truncationStyles,
|
|
556
558
|
...style
|
|
557
559
|
},
|
|
@@ -621,7 +623,8 @@ var HeadingComponent = forwardRef5(function Heading(props, ref) {
|
|
|
621
623
|
...restProps
|
|
622
624
|
} = props;
|
|
623
625
|
const Element = as || (level ? `h${level}` : DefaultHeadingElement);
|
|
624
|
-
const
|
|
626
|
+
const variantStyles2 = applyHeadingVariantStyles(fontVariant);
|
|
627
|
+
const defaultElementReset = { margin: 0, padding: 0 };
|
|
625
628
|
const truncationStyles = {};
|
|
626
629
|
if (truncate) {
|
|
627
630
|
truncationStyles.overflow = "hidden";
|
|
@@ -668,7 +671,8 @@ var HeadingComponent = forwardRef5(function Heading(props, ref) {
|
|
|
668
671
|
marginY,
|
|
669
672
|
className,
|
|
670
673
|
style: {
|
|
671
|
-
...
|
|
674
|
+
...defaultElementReset,
|
|
675
|
+
...variantStyles2,
|
|
672
676
|
...truncationStyles,
|
|
673
677
|
...style
|
|
674
678
|
},
|
|
@@ -890,8 +894,8 @@ import React2, { forwardRef as forwardRef7 } from "react";
|
|
|
890
894
|
|
|
891
895
|
// src/components/Badge/badge.css.ts
|
|
892
896
|
import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
893
|
-
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: "
|
|
894
|
-
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";
|
|
895
899
|
|
|
896
900
|
// src/components/Badge/Badge.tsx
|
|
897
901
|
import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -899,6 +903,7 @@ var Badge = forwardRef7(
|
|
|
899
903
|
({
|
|
900
904
|
children,
|
|
901
905
|
variant = "primary",
|
|
906
|
+
size = "default",
|
|
902
907
|
icon,
|
|
903
908
|
iconPosition = "left",
|
|
904
909
|
className,
|
|
@@ -910,6 +915,7 @@ var Badge = forwardRef7(
|
|
|
910
915
|
const hasIconRight = hasIcon && iconPosition === "right";
|
|
911
916
|
const badgeClasses = badgeVariants({
|
|
912
917
|
variant,
|
|
918
|
+
size,
|
|
913
919
|
hasIconLeft,
|
|
914
920
|
hasIconRight
|
|
915
921
|
});
|
|
@@ -932,6 +938,50 @@ var Badge = forwardRef7(
|
|
|
932
938
|
);
|
|
933
939
|
Badge.displayName = "Badge";
|
|
934
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
|
+
|
|
935
985
|
// src/components/Input/Input.tsx
|
|
936
986
|
import React3, {
|
|
937
987
|
forwardRef as forwardRef8
|
|
@@ -949,7 +999,7 @@ var inputWrapper = "input_inputWrapper__gw6uv63";
|
|
|
949
999
|
var simpleInputContent = "input_simpleInputContent__gw6uv6d";
|
|
950
1000
|
|
|
951
1001
|
// src/components/Input/Input.tsx
|
|
952
|
-
import { jsx as
|
|
1002
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
953
1003
|
var isNativeInputElement = (node) => React3.isValidElement(node) && typeof node.type === "string" && node.type.toLowerCase() === "input";
|
|
954
1004
|
var Input = forwardRef8(function Input2(props, ref) {
|
|
955
1005
|
const {
|
|
@@ -970,6 +1020,7 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
970
1020
|
id,
|
|
971
1021
|
invalid,
|
|
972
1022
|
noOutline = false,
|
|
1023
|
+
viewOnly = false,
|
|
973
1024
|
...inputProps
|
|
974
1025
|
} = props;
|
|
975
1026
|
const isRequired = required || mandatory || false;
|
|
@@ -977,6 +1028,7 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
977
1028
|
const helperTextId = `${inputId}-helper`;
|
|
978
1029
|
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
979
1030
|
const isCompound = leadingSection || trailingSection;
|
|
1031
|
+
const isViewOnly = viewOnly || inputProps.readOnly;
|
|
980
1032
|
const enhanceSection = (section2) => {
|
|
981
1033
|
if (!section2) {
|
|
982
1034
|
return { element: null, isInput: false };
|
|
@@ -1000,17 +1052,27 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1000
1052
|
const leadingSectionMeta = enhanceSection(leadingSection);
|
|
1001
1053
|
const trailingSectionMeta = enhanceSection(trailingSection);
|
|
1002
1054
|
const labelElement = label && /* @__PURE__ */ jsxs3(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
1003
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ jsx9(
|
|
1004
1056
|
Text2,
|
|
1005
1057
|
{
|
|
1006
1058
|
as: "label",
|
|
1007
1059
|
fontVariant: "text-m-regular",
|
|
1008
1060
|
color: "contentTertiary",
|
|
1009
1061
|
htmlFor: inputId,
|
|
1062
|
+
style: { lineHeight: "var(--lineHeight-xs)" },
|
|
1010
1063
|
children: label
|
|
1011
1064
|
}
|
|
1012
1065
|
),
|
|
1013
|
-
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
|
+
)
|
|
1014
1076
|
] });
|
|
1015
1077
|
const inputElement2 = /* @__PURE__ */ jsxs3(Box2, { className: inputWrapper, children: [
|
|
1016
1078
|
/* @__PURE__ */ jsxs3(
|
|
@@ -1018,10 +1080,16 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1018
1080
|
{
|
|
1019
1081
|
className: inputField({
|
|
1020
1082
|
state: disabled ? "disabled" : error ? "error" : "default",
|
|
1021
|
-
outline: noOutline ? "none" : "default"
|
|
1083
|
+
outline: noOutline || isViewOnly ? "none" : "default"
|
|
1022
1084
|
}),
|
|
1085
|
+
style: isViewOnly ? {
|
|
1086
|
+
backgroundColor: "var(--backgroundSecondary)",
|
|
1087
|
+
borderWidth: 0,
|
|
1088
|
+
borderColor: "transparent",
|
|
1089
|
+
boxShadow: "none"
|
|
1090
|
+
} : void 0,
|
|
1023
1091
|
children: [
|
|
1024
|
-
leadingSectionMeta.element && /* @__PURE__ */
|
|
1092
|
+
leadingSectionMeta.element && /* @__PURE__ */ jsx9(
|
|
1025
1093
|
Inline2,
|
|
1026
1094
|
{
|
|
1027
1095
|
alignItems: "center",
|
|
@@ -1048,24 +1116,25 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1048
1116
|
{
|
|
1049
1117
|
className: isCompound ? inputContent : simpleInputContent,
|
|
1050
1118
|
children: [
|
|
1051
|
-
!isCompound && leftIcon && /* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1119
|
+
!isCompound && leftIcon && /* @__PURE__ */ jsx9(Box2, { className: iconContainer, children: leftIcon }),
|
|
1120
|
+
/* @__PURE__ */ jsx9(
|
|
1053
1121
|
"input",
|
|
1054
1122
|
{
|
|
1055
1123
|
ref,
|
|
1056
1124
|
id: inputId,
|
|
1057
1125
|
className: inputElement,
|
|
1058
1126
|
disabled,
|
|
1127
|
+
readOnly: isViewOnly || inputProps.readOnly,
|
|
1059
1128
|
"aria-invalid": invalid || error,
|
|
1060
1129
|
"aria-describedby": displayHelperText ? helperTextId : void 0,
|
|
1061
1130
|
...inputProps
|
|
1062
1131
|
}
|
|
1063
1132
|
),
|
|
1064
|
-
icon && /* @__PURE__ */
|
|
1133
|
+
icon && /* @__PURE__ */ jsx9(Box2, { className: iconContainer, children: icon })
|
|
1065
1134
|
]
|
|
1066
1135
|
}
|
|
1067
1136
|
),
|
|
1068
|
-
trailingSectionMeta.element && /* @__PURE__ */
|
|
1137
|
+
trailingSectionMeta.element && /* @__PURE__ */ jsx9(
|
|
1069
1138
|
Inline2,
|
|
1070
1139
|
{
|
|
1071
1140
|
alignItems: "center",
|
|
@@ -1091,13 +1160,13 @@ var Input = forwardRef8(function Input2(props, ref) {
|
|
|
1091
1160
|
]
|
|
1092
1161
|
}
|
|
1093
1162
|
),
|
|
1094
|
-
displayHelperText && /* @__PURE__ */
|
|
1163
|
+
displayHelperText && /* @__PURE__ */ jsx9(
|
|
1095
1164
|
Text2,
|
|
1096
1165
|
{
|
|
1097
1166
|
id: helperTextId,
|
|
1098
1167
|
fontVariant: "text-s-regular",
|
|
1099
1168
|
role: error ? "alert" : void 0,
|
|
1100
|
-
color:
|
|
1169
|
+
color: "contentQuaternary",
|
|
1101
1170
|
children: displayHelperText
|
|
1102
1171
|
}
|
|
1103
1172
|
)
|
|
@@ -1127,7 +1196,7 @@ var checkboxRoot = "checkbox_checkboxRoot__1dtlqzp0";
|
|
|
1127
1196
|
|
|
1128
1197
|
// src/components/Checkbox/Checkbox.tsx
|
|
1129
1198
|
import { CheckIcon, MinusIcon } from "@zentrades-ui/icons";
|
|
1130
|
-
import { jsx as
|
|
1199
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1131
1200
|
var sizePxMap = {
|
|
1132
1201
|
xs: 12,
|
|
1133
1202
|
sm: 16,
|
|
@@ -1149,6 +1218,7 @@ var Checkbox = React4.forwardRef(
|
|
|
1149
1218
|
helperText,
|
|
1150
1219
|
disabled,
|
|
1151
1220
|
checked,
|
|
1221
|
+
onCheckedChange,
|
|
1152
1222
|
partialChecked,
|
|
1153
1223
|
size = "md",
|
|
1154
1224
|
required,
|
|
@@ -1156,6 +1226,15 @@ var Checkbox = React4.forwardRef(
|
|
|
1156
1226
|
errorMessage,
|
|
1157
1227
|
...props
|
|
1158
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
|
+
};
|
|
1159
1238
|
const boxSize = sizePxMap[size];
|
|
1160
1239
|
const checkboxId = props.id || `checkbox-${React4.useId()}`;
|
|
1161
1240
|
const displayHelperText = error && errorMessage ? errorMessage : helperText || description;
|
|
@@ -1173,10 +1252,10 @@ var Checkbox = React4.forwardRef(
|
|
|
1173
1252
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
1174
1253
|
padding: 0
|
|
1175
1254
|
};
|
|
1176
|
-
const checkbox = /* @__PURE__ */
|
|
1255
|
+
const checkbox = /* @__PURE__ */ jsx10(
|
|
1177
1256
|
CheckboxPrimitive.Root,
|
|
1178
1257
|
{
|
|
1179
|
-
ref:
|
|
1258
|
+
ref: setCheckboxRef,
|
|
1180
1259
|
id: checkboxId,
|
|
1181
1260
|
style: checkboxStyles,
|
|
1182
1261
|
className: cn(checkboxRoot, className),
|
|
@@ -1185,68 +1264,78 @@ var Checkbox = React4.forwardRef(
|
|
|
1185
1264
|
required,
|
|
1186
1265
|
"aria-invalid": error || void 0,
|
|
1187
1266
|
...props,
|
|
1188
|
-
children: /* @__PURE__ */
|
|
1267
|
+
children: /* @__PURE__ */ jsx10(
|
|
1189
1268
|
CheckboxPrimitive.Indicator,
|
|
1190
1269
|
{
|
|
1191
1270
|
className: checkboxIndicator,
|
|
1192
1271
|
style: { maxHeight: boxSize },
|
|
1193
|
-
children: partialChecked ? /* @__PURE__ */
|
|
1272
|
+
children: partialChecked ? /* @__PURE__ */ jsx10(MinusIcon, { size: iconSizeMap2[size], strokeWidth: 1.5 }) : /* @__PURE__ */ jsx10(CheckIcon, { size: iconSizeMap2[size], strokeWidth: 1.5 })
|
|
1194
1273
|
}
|
|
1195
1274
|
)
|
|
1196
1275
|
}
|
|
1197
1276
|
);
|
|
1198
1277
|
if (label || displayHelperText) {
|
|
1199
|
-
return /* @__PURE__ */
|
|
1278
|
+
return /* @__PURE__ */ jsxs4(
|
|
1200
1279
|
Stack2,
|
|
1201
1280
|
{
|
|
1202
|
-
gap: "
|
|
1281
|
+
gap: "xs",
|
|
1203
1282
|
style: {
|
|
1204
1283
|
opacity: disabled ? 0.5 : 1
|
|
1205
1284
|
},
|
|
1206
|
-
children:
|
|
1207
|
-
Inline2,
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
const button = e.currentTarget.parentElement?.querySelector("button");
|
|
1222
|
-
button?.click();
|
|
1285
|
+
children: [
|
|
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;
|
|
1223
1300
|
}
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1301
|
+
checkboxRef.current?.click();
|
|
1302
|
+
}
|
|
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(
|
|
1329
|
+
Text2,
|
|
1330
|
+
{
|
|
1331
|
+
fontVariant: "text-s-regular",
|
|
1332
|
+
color: error ? "contentNegative" : "contentTertiary",
|
|
1333
|
+
role: error ? "alert" : void 0,
|
|
1334
|
+
style: { marginLeft: boxSize + 8 },
|
|
1335
|
+
children: displayHelperText
|
|
1336
|
+
}
|
|
1337
|
+
)
|
|
1338
|
+
]
|
|
1250
1339
|
}
|
|
1251
1340
|
);
|
|
1252
1341
|
}
|
|
@@ -1265,7 +1354,7 @@ var switchRoot = _7a4684({ defaultClassName: "switch__1q0tj351 switch_baseSwitch
|
|
|
1265
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: [] });
|
|
1266
1355
|
|
|
1267
1356
|
// src/components/Switch/Switch.tsx
|
|
1268
|
-
import { jsx as
|
|
1357
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1269
1358
|
var Switch = forwardRef10(
|
|
1270
1359
|
({
|
|
1271
1360
|
size = "md",
|
|
@@ -1282,7 +1371,7 @@ var Switch = forwardRef10(
|
|
|
1282
1371
|
const thumbClasses = switchThumb({ size });
|
|
1283
1372
|
const switchId = props.id || `switch-${React5.useId()}`;
|
|
1284
1373
|
const displayHelperText = error && errorMessage ? errorMessage : helperText;
|
|
1285
|
-
const switchElement = /* @__PURE__ */
|
|
1374
|
+
const switchElement = /* @__PURE__ */ jsx11(
|
|
1286
1375
|
SwitchPrimitive.Root,
|
|
1287
1376
|
{
|
|
1288
1377
|
ref,
|
|
@@ -1291,7 +1380,7 @@ var Switch = forwardRef10(
|
|
|
1291
1380
|
disabled,
|
|
1292
1381
|
"aria-invalid": error || void 0,
|
|
1293
1382
|
...props,
|
|
1294
|
-
children: /* @__PURE__ */
|
|
1383
|
+
children: /* @__PURE__ */ jsx11(SwitchPrimitive.Thumb, { className: thumbClasses })
|
|
1295
1384
|
}
|
|
1296
1385
|
);
|
|
1297
1386
|
if (label || displayHelperText) {
|
|
@@ -1306,7 +1395,7 @@ var Switch = forwardRef10(
|
|
|
1306
1395
|
children: [
|
|
1307
1396
|
switchElement,
|
|
1308
1397
|
label && /* @__PURE__ */ jsxs5(Inline2, { gap: "2xs", alignItems: "center", children: [
|
|
1309
|
-
/* @__PURE__ */
|
|
1398
|
+
/* @__PURE__ */ jsx11(
|
|
1310
1399
|
Text2,
|
|
1311
1400
|
{
|
|
1312
1401
|
as: "label",
|
|
@@ -1316,12 +1405,12 @@ var Switch = forwardRef10(
|
|
|
1316
1405
|
children: label
|
|
1317
1406
|
}
|
|
1318
1407
|
),
|
|
1319
|
-
required && /* @__PURE__ */
|
|
1408
|
+
required && /* @__PURE__ */ jsx11(Text2, { as: "span", color: "contentTertiary", fontVariant: "text-s-medium", children: "*" })
|
|
1320
1409
|
] })
|
|
1321
1410
|
]
|
|
1322
1411
|
}
|
|
1323
1412
|
),
|
|
1324
|
-
displayHelperText && /* @__PURE__ */
|
|
1413
|
+
displayHelperText && /* @__PURE__ */ jsx11(
|
|
1325
1414
|
Text2,
|
|
1326
1415
|
{
|
|
1327
1416
|
fontVariant: "text-s-regular",
|
|
@@ -1339,28 +1428,33 @@ Switch.displayName = "Switch";
|
|
|
1339
1428
|
|
|
1340
1429
|
// src/components/Chip/Chip.tsx
|
|
1341
1430
|
import React6, { forwardRef as forwardRef11 } from "react";
|
|
1342
|
-
import { jsx as
|
|
1431
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1343
1432
|
var ChipComponent = forwardRef11(function Chip(props, ref) {
|
|
1344
1433
|
const { icon, outline, variant, children, disabled, onClick, ...restProps } = props;
|
|
1345
1434
|
const isValidIcon = icon && React6.isValidElement(icon);
|
|
1346
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";
|
|
1347
1439
|
return /* @__PURE__ */ jsxs6(
|
|
1348
1440
|
Inline2,
|
|
1349
1441
|
{
|
|
1350
1442
|
ref,
|
|
1351
|
-
as: "button",
|
|
1443
|
+
as: shouldRenderButton ? "button" : "div",
|
|
1352
1444
|
borderColor: variant === "light" ? "borderQuaternary" : "borderTertiary",
|
|
1353
1445
|
borderWidth: "s",
|
|
1354
1446
|
rounded: "md",
|
|
1355
1447
|
paddingY: "xs",
|
|
1356
1448
|
paddingLeft: "sm",
|
|
1357
|
-
paddingRight:
|
|
1449
|
+
paddingRight: paddingRightValue,
|
|
1358
1450
|
borderStyle: outline === "dashed" ? "dashed" : "solid",
|
|
1359
|
-
gap:
|
|
1451
|
+
gap: gapValue,
|
|
1360
1452
|
maxWidth: "fit",
|
|
1361
1453
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
1362
1454
|
onClick,
|
|
1363
1455
|
bgColor: "transparent",
|
|
1456
|
+
disabled: shouldRenderButton ? disabled : void 0,
|
|
1457
|
+
"aria-disabled": shouldRenderButton && disabled ? true : void 0,
|
|
1364
1458
|
...restProps,
|
|
1365
1459
|
children: [
|
|
1366
1460
|
isValidIcon ? React6.cloneElement(icon, {
|
|
@@ -1368,7 +1462,7 @@ var ChipComponent = forwardRef11(function Chip(props, ref) {
|
|
|
1368
1462
|
color: variant === "light" ? "contentTertiary" : "contentPrimary",
|
|
1369
1463
|
...icon?.props || {}
|
|
1370
1464
|
}) : null,
|
|
1371
|
-
children && /* @__PURE__ */
|
|
1465
|
+
children && /* @__PURE__ */ jsx12(
|
|
1372
1466
|
Text2,
|
|
1373
1467
|
{
|
|
1374
1468
|
fontVariant: "text-m-regular",
|
|
@@ -1390,7 +1484,7 @@ var tooltipArrow = "tooltip_tooltipArrow__jg1db35";
|
|
|
1390
1484
|
var tooltipContent = "tooltip_tooltipContent__jg1db34";
|
|
1391
1485
|
|
|
1392
1486
|
// src/components/Tooltip/Tooltip.tsx
|
|
1393
|
-
import { jsx as
|
|
1487
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1394
1488
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1395
1489
|
var Tooltip = ({
|
|
1396
1490
|
children,
|
|
@@ -1403,15 +1497,15 @@ var Tooltip = ({
|
|
|
1403
1497
|
disableHoverableContent = false,
|
|
1404
1498
|
showArrow = true
|
|
1405
1499
|
}) => {
|
|
1406
|
-
return /* @__PURE__ */
|
|
1500
|
+
return /* @__PURE__ */ jsx13(
|
|
1407
1501
|
TooltipPrimitive.Provider,
|
|
1408
1502
|
{
|
|
1409
1503
|
delayDuration,
|
|
1410
1504
|
skipDelayDuration,
|
|
1411
1505
|
disableHoverableContent,
|
|
1412
1506
|
children: /* @__PURE__ */ jsxs7(TooltipPrimitive.Root, { children: [
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1507
|
+
/* @__PURE__ */ jsx13(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
1508
|
+
/* @__PURE__ */ jsx13(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
|
|
1415
1509
|
TooltipPrimitive.Content,
|
|
1416
1510
|
{
|
|
1417
1511
|
className: tooltipContent,
|
|
@@ -1419,7 +1513,7 @@ var Tooltip = ({
|
|
|
1419
1513
|
sideOffset,
|
|
1420
1514
|
align,
|
|
1421
1515
|
children: [
|
|
1422
|
-
/* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ jsx13(
|
|
1423
1517
|
Text2,
|
|
1424
1518
|
{
|
|
1425
1519
|
as: "div",
|
|
@@ -1428,7 +1522,7 @@ var Tooltip = ({
|
|
|
1428
1522
|
children: content
|
|
1429
1523
|
}
|
|
1430
1524
|
),
|
|
1431
|
-
showArrow && /* @__PURE__ */
|
|
1525
|
+
showArrow && /* @__PURE__ */ jsx13(
|
|
1432
1526
|
TooltipPrimitive.Arrow,
|
|
1433
1527
|
{
|
|
1434
1528
|
className: tooltipArrow,
|
|
@@ -1462,8 +1556,8 @@ var selectValue = "select_selectValue__ijj2cg8";
|
|
|
1462
1556
|
var selectViewport = "select_selectViewport__ijj2cgb";
|
|
1463
1557
|
|
|
1464
1558
|
// src/components/Select/Select.tsx
|
|
1465
|
-
import { jsx as
|
|
1466
|
-
var ChevronDownIcon = ({ className }) => /* @__PURE__ */
|
|
1559
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1560
|
+
var ChevronDownIcon = ({ className }) => /* @__PURE__ */ jsx14(
|
|
1467
1561
|
"svg",
|
|
1468
1562
|
{
|
|
1469
1563
|
className,
|
|
@@ -1475,7 +1569,7 @@ var ChevronDownIcon = ({ className }) => /* @__PURE__ */ jsx13(
|
|
|
1475
1569
|
strokeWidth: "2",
|
|
1476
1570
|
strokeLinecap: "round",
|
|
1477
1571
|
strokeLinejoin: "round",
|
|
1478
|
-
children: /* @__PURE__ */
|
|
1572
|
+
children: /* @__PURE__ */ jsx14("path", { d: "m6 9 6 6 6-6" })
|
|
1479
1573
|
}
|
|
1480
1574
|
);
|
|
1481
1575
|
var SelectRoot = SelectPrimitive.Root;
|
|
@@ -1489,7 +1583,7 @@ var SelectTrigger = React7.forwardRef(({ children, error, ...props }, ref) => {
|
|
|
1489
1583
|
...props,
|
|
1490
1584
|
children: [
|
|
1491
1585
|
children,
|
|
1492
|
-
/* @__PURE__ */
|
|
1586
|
+
/* @__PURE__ */ jsx14(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx14(ChevronDownIcon, { className: selectIcon }) })
|
|
1493
1587
|
]
|
|
1494
1588
|
}
|
|
1495
1589
|
);
|
|
@@ -1506,8 +1600,8 @@ var SelectContent = React7.forwardRef(
|
|
|
1506
1600
|
disableListWrapper = false,
|
|
1507
1601
|
...props
|
|
1508
1602
|
}, ref) => {
|
|
1509
|
-
const contentChildren = disableListWrapper ? children : /* @__PURE__ */
|
|
1510
|
-
return /* @__PURE__ */
|
|
1603
|
+
const contentChildren = disableListWrapper ? children : /* @__PURE__ */ jsx14(Stack2, { as: "ul", gap: "xs", children });
|
|
1604
|
+
return /* @__PURE__ */ jsx14(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs8(
|
|
1511
1605
|
SelectPrimitive.Content,
|
|
1512
1606
|
{
|
|
1513
1607
|
ref,
|
|
@@ -1517,7 +1611,7 @@ var SelectContent = React7.forwardRef(
|
|
|
1517
1611
|
...props,
|
|
1518
1612
|
children: [
|
|
1519
1613
|
header,
|
|
1520
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsx14(SelectPrimitive.Viewport, { className: selectViewport, children: contentChildren }),
|
|
1521
1615
|
footer
|
|
1522
1616
|
]
|
|
1523
1617
|
}
|
|
@@ -1526,11 +1620,11 @@ var SelectContent = React7.forwardRef(
|
|
|
1526
1620
|
);
|
|
1527
1621
|
SelectContent.displayName = "SelectContent";
|
|
1528
1622
|
var SelectItem = React7.forwardRef(({ children, ...props }, ref) => {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsx14(SelectPrimitive.Item, { ref, className: selectItem, ...props, children: /* @__PURE__ */ jsx14(SelectPrimitive.ItemText, { className: selectItemText, children }) });
|
|
1530
1624
|
});
|
|
1531
1625
|
SelectItem.displayName = "SelectItem";
|
|
1532
1626
|
var SelectSeparator = React7.forwardRef((props, ref) => {
|
|
1533
|
-
return /* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ jsx14(
|
|
1534
1628
|
SelectPrimitive.Separator,
|
|
1535
1629
|
{
|
|
1536
1630
|
ref,
|
|
@@ -1560,7 +1654,7 @@ var Select = React7.forwardRef(
|
|
|
1560
1654
|
return /* @__PURE__ */ jsxs8(Stack2, { gap: "sm", children: [
|
|
1561
1655
|
label && /* @__PURE__ */ jsxs8("label", { className: selectLabel, children: [
|
|
1562
1656
|
label,
|
|
1563
|
-
required && /* @__PURE__ */
|
|
1657
|
+
required && /* @__PURE__ */ jsx14(Text2, { as: "span", color: "contentTertiary", children: "*" })
|
|
1564
1658
|
] }),
|
|
1565
1659
|
/* @__PURE__ */ jsxs8(
|
|
1566
1660
|
SelectRoot,
|
|
@@ -1572,8 +1666,8 @@ var Select = React7.forwardRef(
|
|
|
1572
1666
|
name,
|
|
1573
1667
|
required,
|
|
1574
1668
|
children: [
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
/* @__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(
|
|
1577
1671
|
SelectItem,
|
|
1578
1672
|
{
|
|
1579
1673
|
value: option.value,
|
|
@@ -1585,7 +1679,7 @@ var Select = React7.forwardRef(
|
|
|
1585
1679
|
]
|
|
1586
1680
|
}
|
|
1587
1681
|
),
|
|
1588
|
-
displayHelperText && /* @__PURE__ */
|
|
1682
|
+
displayHelperText && /* @__PURE__ */ jsx14(
|
|
1589
1683
|
Text2,
|
|
1590
1684
|
{
|
|
1591
1685
|
id: helperTextId,
|
|
@@ -1643,7 +1737,7 @@ function getInitials(name) {
|
|
|
1643
1737
|
}
|
|
1644
1738
|
|
|
1645
1739
|
// src/components/Avatar/Avatar.tsx
|
|
1646
|
-
import { jsx as
|
|
1740
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1647
1741
|
var TYPOGRAPHY_MAP = {
|
|
1648
1742
|
xs: "text-xs-medium",
|
|
1649
1743
|
sm: "text-s-medium",
|
|
@@ -1651,6 +1745,13 @@ var TYPOGRAPHY_MAP = {
|
|
|
1651
1745
|
lg: "text-m-medium",
|
|
1652
1746
|
xl: "text-l-medium"
|
|
1653
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
|
+
};
|
|
1654
1755
|
var Avatar = forwardRef13(
|
|
1655
1756
|
({
|
|
1656
1757
|
size = "md",
|
|
@@ -1674,6 +1775,7 @@ var Avatar = forwardRef13(
|
|
|
1674
1775
|
}, [color, name]);
|
|
1675
1776
|
const initials = useMemo(() => getInitials(name), [name]);
|
|
1676
1777
|
const typographyVariant = TYPOGRAPHY_MAP[size];
|
|
1778
|
+
const headingVariant = HEADING_MAP[size];
|
|
1677
1779
|
useEffect(() => {
|
|
1678
1780
|
if (!src) {
|
|
1679
1781
|
setImageLoadingStatus("error");
|
|
@@ -1693,37 +1795,131 @@ var Avatar = forwardRef13(
|
|
|
1693
1795
|
};
|
|
1694
1796
|
}, [src]);
|
|
1695
1797
|
const fallbackClasses = avatarFallbackVariants({ color: resolvedColor });
|
|
1696
|
-
const avatarElement = /* @__PURE__ */
|
|
1798
|
+
const avatarElement = /* @__PURE__ */ jsx15(
|
|
1697
1799
|
AvatarPrimitive.Root,
|
|
1698
1800
|
{
|
|
1699
1801
|
ref,
|
|
1700
1802
|
className: combinedClassName,
|
|
1701
1803
|
...props,
|
|
1702
|
-
children: imageLoadingStatus === "loaded" && src ? /* @__PURE__ */
|
|
1804
|
+
children: imageLoadingStatus === "loaded" && src ? /* @__PURE__ */ jsx15(
|
|
1703
1805
|
AvatarPrimitive.Image,
|
|
1704
1806
|
{
|
|
1705
1807
|
className: avatarImage,
|
|
1706
1808
|
src,
|
|
1707
1809
|
alt: `${name} avatar`
|
|
1708
1810
|
}
|
|
1709
|
-
) : icon ? icon : /* @__PURE__ */
|
|
1811
|
+
) : icon ? icon : /* @__PURE__ */ jsx15(
|
|
1710
1812
|
AvatarPrimitive.Fallback,
|
|
1711
1813
|
{
|
|
1712
1814
|
className: fallbackClasses,
|
|
1713
1815
|
delayMs,
|
|
1714
|
-
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 })
|
|
1715
1825
|
}
|
|
1716
1826
|
)
|
|
1717
1827
|
}
|
|
1718
1828
|
);
|
|
1719
1829
|
if (tooltip) {
|
|
1720
|
-
return /* @__PURE__ */
|
|
1830
|
+
return /* @__PURE__ */ jsx15(Tooltip, { content: tooltip, children: avatarElement });
|
|
1721
1831
|
}
|
|
1722
1832
|
return avatarElement;
|
|
1723
1833
|
}
|
|
1724
1834
|
);
|
|
1725
1835
|
Avatar.displayName = "Avatar";
|
|
1726
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
|
+
|
|
1727
1923
|
// src/components/Loader/Spinner.tsx
|
|
1728
1924
|
import { forwardRef as forwardRef14 } from "react";
|
|
1729
1925
|
import { colorVars } from "@zentrades-ui/theme";
|
|
@@ -1735,7 +1931,7 @@ var spinnerRoot = "spinner_spinnerRoot__1vppgfr2";
|
|
|
1735
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: [] });
|
|
1736
1932
|
|
|
1737
1933
|
// src/components/Loader/Spinner.tsx
|
|
1738
|
-
import { jsx as
|
|
1934
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1739
1935
|
var VIEWBOX_SIZE = 44;
|
|
1740
1936
|
var STROKE_WIDTH = 3.6;
|
|
1741
1937
|
var Spinner = forwardRef14(
|
|
@@ -1745,7 +1941,7 @@ var Spinner = forwardRef14(
|
|
|
1745
1941
|
className,
|
|
1746
1942
|
"aria-label": ariaLabel = "Loading"
|
|
1747
1943
|
}, ref) => {
|
|
1748
|
-
return /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ jsx17(
|
|
1749
1945
|
"svg",
|
|
1750
1946
|
{
|
|
1751
1947
|
ref,
|
|
@@ -1753,7 +1949,7 @@ var Spinner = forwardRef14(
|
|
|
1753
1949
|
"aria-label": ariaLabel,
|
|
1754
1950
|
className: cn(spinnerRoot, spinnerSizes({ size }), className),
|
|
1755
1951
|
viewBox: `0 0 ${VIEWBOX_SIZE} ${VIEWBOX_SIZE}`,
|
|
1756
|
-
children: /* @__PURE__ */
|
|
1952
|
+
children: /* @__PURE__ */ jsx17(
|
|
1757
1953
|
"circle",
|
|
1758
1954
|
{
|
|
1759
1955
|
className: spinnerCircle,
|
|
@@ -1779,7 +1975,7 @@ import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRunti
|
|
|
1779
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: [] });
|
|
1780
1976
|
|
|
1781
1977
|
// src/components/Loader/Skeleton.tsx
|
|
1782
|
-
import { jsx as
|
|
1978
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1783
1979
|
var Skeleton = React9.forwardRef(
|
|
1784
1980
|
({ variant = "text", width, height, className, style, ...props }, ref) => {
|
|
1785
1981
|
const inlineStyles = {
|
|
@@ -1787,7 +1983,7 @@ var Skeleton = React9.forwardRef(
|
|
|
1787
1983
|
...width !== void 0 && { width },
|
|
1788
1984
|
...height !== void 0 && { height }
|
|
1789
1985
|
};
|
|
1790
|
-
return /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsx18(
|
|
1791
1987
|
"span",
|
|
1792
1988
|
{
|
|
1793
1989
|
ref,
|
|
@@ -1802,8 +1998,68 @@ var Skeleton = React9.forwardRef(
|
|
|
1802
1998
|
);
|
|
1803
1999
|
Skeleton.displayName = "Skeleton";
|
|
1804
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
|
+
|
|
1805
2061
|
// src/components/TextArea/TextArea.tsx
|
|
1806
|
-
import React10, { forwardRef as
|
|
2062
|
+
import React10, { forwardRef as forwardRef16 } from "react";
|
|
1807
2063
|
|
|
1808
2064
|
// src/components/TextArea/textarea.css.ts
|
|
1809
2065
|
import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -1814,8 +2070,8 @@ var textareaElement = _7a4689({ defaultClassName: "textarea__o7hyjda textarea_ba
|
|
|
1814
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: [] });
|
|
1815
2071
|
|
|
1816
2072
|
// src/components/TextArea/TextArea.tsx
|
|
1817
|
-
import { jsx as
|
|
1818
|
-
var ResizeIcon = () => /* @__PURE__ */
|
|
2073
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2074
|
+
var ResizeIcon = () => /* @__PURE__ */ jsx20(
|
|
1819
2075
|
"svg",
|
|
1820
2076
|
{
|
|
1821
2077
|
width: "12",
|
|
@@ -1823,7 +2079,7 @@ var ResizeIcon = () => /* @__PURE__ */ jsx17(
|
|
|
1823
2079
|
viewBox: "0 0 12 12",
|
|
1824
2080
|
fill: "none",
|
|
1825
2081
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1826
|
-
children: /* @__PURE__ */
|
|
2082
|
+
children: /* @__PURE__ */ jsx20(
|
|
1827
2083
|
"path",
|
|
1828
2084
|
{
|
|
1829
2085
|
d: "M10.5 1.5L1.5 10.5M10.5 5.5L5.5 10.5M10.5 9.5L9.5 10.5",
|
|
@@ -1835,7 +2091,7 @@ var ResizeIcon = () => /* @__PURE__ */ jsx17(
|
|
|
1835
2091
|
)
|
|
1836
2092
|
}
|
|
1837
2093
|
);
|
|
1838
|
-
var TextArea =
|
|
2094
|
+
var TextArea = forwardRef16(
|
|
1839
2095
|
function TextArea2(props, ref) {
|
|
1840
2096
|
const {
|
|
1841
2097
|
label,
|
|
@@ -1864,8 +2120,8 @@ var TextArea = forwardRef15(
|
|
|
1864
2120
|
if (error) return "error";
|
|
1865
2121
|
return "default";
|
|
1866
2122
|
};
|
|
1867
|
-
const labelElement = label && /* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
2123
|
+
const labelElement = label && /* @__PURE__ */ jsxs10(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
2124
|
+
/* @__PURE__ */ jsx20(
|
|
1869
2125
|
Text2,
|
|
1870
2126
|
{
|
|
1871
2127
|
as: "label",
|
|
@@ -1875,12 +2131,12 @@ var TextArea = forwardRef15(
|
|
|
1875
2131
|
children: label
|
|
1876
2132
|
}
|
|
1877
2133
|
),
|
|
1878
|
-
isRequired && /* @__PURE__ */
|
|
2134
|
+
isRequired && /* @__PURE__ */ jsx20(Text2, { fontVariant: "text-m-regular", color: "contentTertiary", as: "span", children: "*" })
|
|
1879
2135
|
] });
|
|
1880
2136
|
const state = getState();
|
|
1881
|
-
const textareaElement2 = /* @__PURE__ */
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
/* @__PURE__ */
|
|
2137
|
+
const textareaElement2 = /* @__PURE__ */ jsxs10(Stack2, { gap: "sm", width: "full", children: [
|
|
2138
|
+
/* @__PURE__ */ jsxs10(Box2, { className: textareaField({ state }), children: [
|
|
2139
|
+
/* @__PURE__ */ jsx20(
|
|
1884
2140
|
"textarea",
|
|
1885
2141
|
{
|
|
1886
2142
|
ref,
|
|
@@ -1893,10 +2149,10 @@ var TextArea = forwardRef15(
|
|
|
1893
2149
|
...textareaProps
|
|
1894
2150
|
}
|
|
1895
2151
|
),
|
|
1896
|
-
showResizeHandle && !viewMode && !readOnly && !disabled && /* @__PURE__ */
|
|
1897
|
-
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, {}) })
|
|
1898
2154
|
] }),
|
|
1899
|
-
displayHelperText && /* @__PURE__ */
|
|
2155
|
+
displayHelperText && /* @__PURE__ */ jsx20(
|
|
1900
2156
|
Text2,
|
|
1901
2157
|
{
|
|
1902
2158
|
id: helperTextId,
|
|
@@ -1907,7 +2163,7 @@ var TextArea = forwardRef15(
|
|
|
1907
2163
|
}
|
|
1908
2164
|
)
|
|
1909
2165
|
] });
|
|
1910
|
-
return /* @__PURE__ */
|
|
2166
|
+
return /* @__PURE__ */ jsxs10(
|
|
1911
2167
|
Box2,
|
|
1912
2168
|
{
|
|
1913
2169
|
className: textareaContainer({
|
|
@@ -1938,8 +2194,8 @@ var iconWrapper3 = "accordion_iconWrapper__1m7j6g7a";
|
|
|
1938
2194
|
var triggerTitle = "accordion_triggerTitle__1m7j6g79";
|
|
1939
2195
|
|
|
1940
2196
|
// src/components/Accordion/Accordion.tsx
|
|
1941
|
-
import { jsx as
|
|
1942
|
-
var ChevronDownIcon2 = () => /* @__PURE__ */
|
|
2197
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2198
|
+
var ChevronDownIcon2 = () => /* @__PURE__ */ jsx21(
|
|
1943
2199
|
"svg",
|
|
1944
2200
|
{
|
|
1945
2201
|
width: "20",
|
|
@@ -1950,7 +2206,7 @@ var ChevronDownIcon2 = () => /* @__PURE__ */ jsx18(
|
|
|
1950
2206
|
strokeWidth: "2",
|
|
1951
2207
|
strokeLinecap: "round",
|
|
1952
2208
|
strokeLinejoin: "round",
|
|
1953
|
-
children: /* @__PURE__ */
|
|
2209
|
+
children: /* @__PURE__ */ jsx21("path", { d: "m6 9 6 6 6-6" })
|
|
1954
2210
|
}
|
|
1955
2211
|
);
|
|
1956
2212
|
var AccordionItemContext = React11.createContext(
|
|
@@ -1963,7 +2219,7 @@ var AccordionRoot = React11.forwardRef(
|
|
|
1963
2219
|
const composedClassName = cn(accordionRoot({ variant }), className);
|
|
1964
2220
|
if (allowMultiple) {
|
|
1965
2221
|
const multipleProps = props;
|
|
1966
|
-
return /* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ jsx21(AccordionItemContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx21(
|
|
1967
2223
|
AccordionPrimitive.Root,
|
|
1968
2224
|
{
|
|
1969
2225
|
ref,
|
|
@@ -1974,7 +2230,7 @@ var AccordionRoot = React11.forwardRef(
|
|
|
1974
2230
|
) });
|
|
1975
2231
|
}
|
|
1976
2232
|
const { collapsible = true, ...singleProps } = props;
|
|
1977
|
-
return /* @__PURE__ */
|
|
2233
|
+
return /* @__PURE__ */ jsx21(AccordionItemContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx21(
|
|
1978
2234
|
AccordionPrimitive.Root,
|
|
1979
2235
|
{
|
|
1980
2236
|
ref,
|
|
@@ -1990,7 +2246,7 @@ AccordionRoot.displayName = "Accordion.Root";
|
|
|
1990
2246
|
var AccordionItem = React11.forwardRef(({ className, variant, ...props }, ref) => {
|
|
1991
2247
|
const context = React11.useContext(AccordionItemContext);
|
|
1992
2248
|
const resolvedVariant = variant ?? context.variant;
|
|
1993
|
-
return /* @__PURE__ */
|
|
2249
|
+
return /* @__PURE__ */ jsx21(
|
|
1994
2250
|
AccordionPrimitive.Item,
|
|
1995
2251
|
{
|
|
1996
2252
|
ref,
|
|
@@ -2003,13 +2259,13 @@ AccordionItem.displayName = "Accordion.Item";
|
|
|
2003
2259
|
var AccordionTrigger = React11.forwardRef(({ children, className, variant, ...props }, ref) => {
|
|
2004
2260
|
const context = React11.useContext(AccordionItemContext);
|
|
2005
2261
|
const resolvedVariant = variant ?? context.variant;
|
|
2006
|
-
return /* @__PURE__ */
|
|
2262
|
+
return /* @__PURE__ */ jsx21(AccordionPrimitive.Header, { asChild: true, children: /* @__PURE__ */ jsx21(
|
|
2007
2263
|
AccordionPrimitive.Trigger,
|
|
2008
2264
|
{
|
|
2009
2265
|
ref,
|
|
2010
2266
|
className: cn(accordionTrigger({ variant: resolvedVariant }), className),
|
|
2011
2267
|
...props,
|
|
2012
|
-
children: /* @__PURE__ */
|
|
2268
|
+
children: /* @__PURE__ */ jsxs11(
|
|
2013
2269
|
Inline2,
|
|
2014
2270
|
{
|
|
2015
2271
|
flex: "1",
|
|
@@ -2018,8 +2274,8 @@ var AccordionTrigger = React11.forwardRef(({ children, className, variant, ...pr
|
|
|
2018
2274
|
alignItems: "center",
|
|
2019
2275
|
justifyContent: "between",
|
|
2020
2276
|
children: [
|
|
2021
|
-
/* @__PURE__ */
|
|
2022
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ jsx21(Box2, { color: "contentPrimary", className: triggerTitle, children }),
|
|
2278
|
+
/* @__PURE__ */ jsx21("div", { className: iconWrapper3, children: /* @__PURE__ */ jsx21(ChevronDownIcon2, {}) })
|
|
2023
2279
|
]
|
|
2024
2280
|
}
|
|
2025
2281
|
)
|
|
@@ -2030,13 +2286,13 @@ AccordionTrigger.displayName = "Accordion.Trigger";
|
|
|
2030
2286
|
var AccordionContent = React11.forwardRef(({ children, className, variant, ...props }, ref) => {
|
|
2031
2287
|
const context = React11.useContext(AccordionItemContext);
|
|
2032
2288
|
const resolvedVariant = variant ?? context.variant;
|
|
2033
|
-
return /* @__PURE__ */
|
|
2289
|
+
return /* @__PURE__ */ jsx21(
|
|
2034
2290
|
AccordionPrimitive.Content,
|
|
2035
2291
|
{
|
|
2036
2292
|
ref,
|
|
2037
2293
|
className: cn(accordionContent({ variant: resolvedVariant }), className),
|
|
2038
2294
|
...props,
|
|
2039
|
-
children: /* @__PURE__ */
|
|
2295
|
+
children: /* @__PURE__ */ jsx21("div", { className: contentInner({ variant: resolvedVariant }), children })
|
|
2040
2296
|
}
|
|
2041
2297
|
);
|
|
2042
2298
|
});
|
|
@@ -2047,7 +2303,7 @@ var AccordionItemWithContext = React11.forwardRef(({ variant, ...props }, ref) =
|
|
|
2047
2303
|
() => ({ variant: variant ?? parentContext.variant }),
|
|
2048
2304
|
[variant, parentContext.variant]
|
|
2049
2305
|
);
|
|
2050
|
-
return /* @__PURE__ */
|
|
2306
|
+
return /* @__PURE__ */ jsx21(AccordionItemContext.Provider, { value, children: /* @__PURE__ */ jsx21(AccordionItem, { ref, ...props }) });
|
|
2051
2307
|
});
|
|
2052
2308
|
AccordionItemWithContext.displayName = "Accordion.Item";
|
|
2053
2309
|
var Accordion = Object.assign(AccordionRoot, {
|
|
@@ -2071,8 +2327,8 @@ var menuSubContent = "menu_menuSubContent__1b87dxfe";
|
|
|
2071
2327
|
var menuSubTrigger = "menu_menuSubTrigger__1b87dxfd menu_menuItemBase__1b87dxfa";
|
|
2072
2328
|
|
|
2073
2329
|
// src/components/Menu/Menu.tsx
|
|
2074
|
-
import { jsx as
|
|
2075
|
-
var ChevronRightIcon = () => /* @__PURE__ */
|
|
2330
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2331
|
+
var ChevronRightIcon = () => /* @__PURE__ */ jsx22(
|
|
2076
2332
|
"svg",
|
|
2077
2333
|
{
|
|
2078
2334
|
width: "12",
|
|
@@ -2084,15 +2340,15 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx19(
|
|
|
2084
2340
|
strokeLinecap: "round",
|
|
2085
2341
|
strokeLinejoin: "round",
|
|
2086
2342
|
className: chevronIcon,
|
|
2087
|
-
children: /* @__PURE__ */
|
|
2343
|
+
children: /* @__PURE__ */ jsx22("path", { d: "m9 18 6-6-6-6" })
|
|
2088
2344
|
}
|
|
2089
2345
|
);
|
|
2090
2346
|
var MenuRoot = ({ children, ...props }) => {
|
|
2091
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Root, { modal: props.modal || false, ...props, children });
|
|
2092
2348
|
};
|
|
2093
2349
|
MenuRoot.displayName = "MenuRoot";
|
|
2094
2350
|
var MenuTrigger = React12.forwardRef(({ children, ...props }, ref) => {
|
|
2095
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Trigger, { ref, asChild: true, ...props, children });
|
|
2096
2352
|
});
|
|
2097
2353
|
MenuTrigger.displayName = "MenuTrigger";
|
|
2098
2354
|
var MenuContent = React12.forwardRef(
|
|
@@ -2106,7 +2362,7 @@ var MenuContent = React12.forwardRef(
|
|
|
2106
2362
|
className,
|
|
2107
2363
|
...props
|
|
2108
2364
|
}, ref) => {
|
|
2109
|
-
return /* @__PURE__ */
|
|
2365
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx22(
|
|
2110
2366
|
DropdownMenu.Content,
|
|
2111
2367
|
{
|
|
2112
2368
|
ref,
|
|
@@ -2197,9 +2453,9 @@ var Menu = ({
|
|
|
2197
2453
|
...defaultOpen !== void 0 ? { defaultOpen } : {},
|
|
2198
2454
|
...onOpenChange ? { onOpenChange } : {}
|
|
2199
2455
|
};
|
|
2200
|
-
return /* @__PURE__ */
|
|
2201
|
-
/* @__PURE__ */
|
|
2202
|
-
/* @__PURE__ */
|
|
2456
|
+
return /* @__PURE__ */ jsxs12(MenuRoot, { ...menuRootProps, children: [
|
|
2457
|
+
/* @__PURE__ */ jsx22(MenuTrigger, { children: triggerWithHoverHandlers }),
|
|
2458
|
+
/* @__PURE__ */ jsx22(
|
|
2203
2459
|
MenuContent,
|
|
2204
2460
|
{
|
|
2205
2461
|
align,
|
|
@@ -2234,7 +2490,7 @@ var MenuItem = React12.forwardRef(
|
|
|
2234
2490
|
}
|
|
2235
2491
|
onClick?.(event);
|
|
2236
2492
|
};
|
|
2237
|
-
return /* @__PURE__ */
|
|
2493
|
+
return /* @__PURE__ */ jsx22(
|
|
2238
2494
|
DropdownMenu.Item,
|
|
2239
2495
|
{
|
|
2240
2496
|
ref,
|
|
@@ -2249,20 +2505,20 @@ var MenuItem = React12.forwardRef(
|
|
|
2249
2505
|
);
|
|
2250
2506
|
MenuItem.displayName = "MenuItem";
|
|
2251
2507
|
var MenuLabel = ({ children, className }) => {
|
|
2252
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Label, { className, children });
|
|
2253
2509
|
};
|
|
2254
2510
|
MenuLabel.displayName = "MenuLabel";
|
|
2255
2511
|
var MenuSeparator = ({ className }) => {
|
|
2256
|
-
return /* @__PURE__ */
|
|
2512
|
+
return /* @__PURE__ */ jsx22(DropdownMenu.Separator, { className: cn(menuSeparator, className) });
|
|
2257
2513
|
};
|
|
2258
2514
|
MenuSeparator.displayName = "MenuSeparator";
|
|
2259
2515
|
var MenuSub = ({ children, label, padding = "xs" }) => {
|
|
2260
|
-
return /* @__PURE__ */
|
|
2261
|
-
/* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ jsxs12(DropdownMenu.Sub, { children: [
|
|
2517
|
+
/* @__PURE__ */ jsxs12(DropdownMenu.SubTrigger, { className: menuSubTrigger, children: [
|
|
2262
2518
|
label,
|
|
2263
|
-
/* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ jsx22(ChevronRightIcon, {})
|
|
2264
2520
|
] }),
|
|
2265
|
-
/* @__PURE__ */
|
|
2521
|
+
/* @__PURE__ */ jsx22(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx22(
|
|
2266
2522
|
DropdownMenu.SubContent,
|
|
2267
2523
|
{
|
|
2268
2524
|
className: menuSubContent,
|
|
@@ -2291,8 +2547,8 @@ var dialogHeader = "dialog_dialogHeader__1934qpw8";
|
|
|
2291
2547
|
var dialogOverlay = "dialog_dialogOverlay__1934qpw2";
|
|
2292
2548
|
|
|
2293
2549
|
// src/components/Dialog/Dialog.tsx
|
|
2294
|
-
import { jsx as
|
|
2295
|
-
var CloseIcon = () => /* @__PURE__ */
|
|
2550
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2551
|
+
var CloseIcon = () => /* @__PURE__ */ jsxs13(
|
|
2296
2552
|
"svg",
|
|
2297
2553
|
{
|
|
2298
2554
|
width: "20",
|
|
@@ -2304,8 +2560,8 @@ var CloseIcon = () => /* @__PURE__ */ jsxs12(
|
|
|
2304
2560
|
strokeLinecap: "round",
|
|
2305
2561
|
strokeLinejoin: "round",
|
|
2306
2562
|
children: [
|
|
2307
|
-
/* @__PURE__ */
|
|
2308
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ jsx23("path", { d: "M18 6 6 18" }),
|
|
2564
|
+
/* @__PURE__ */ jsx23("path", { d: "m6 6 12 12" })
|
|
2309
2565
|
]
|
|
2310
2566
|
}
|
|
2311
2567
|
);
|
|
@@ -2317,7 +2573,7 @@ var DialogRoot = ({
|
|
|
2317
2573
|
children,
|
|
2318
2574
|
modal = true
|
|
2319
2575
|
}) => {
|
|
2320
|
-
return /* @__PURE__ */
|
|
2576
|
+
return /* @__PURE__ */ jsxs13(
|
|
2321
2577
|
DialogPrimitive.Root,
|
|
2322
2578
|
{
|
|
2323
2579
|
open,
|
|
@@ -2325,7 +2581,7 @@ var DialogRoot = ({
|
|
|
2325
2581
|
onOpenChange,
|
|
2326
2582
|
modal,
|
|
2327
2583
|
children: [
|
|
2328
|
-
trigger && /* @__PURE__ */
|
|
2584
|
+
trigger && /* @__PURE__ */ jsx23(DialogPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
2329
2585
|
children
|
|
2330
2586
|
]
|
|
2331
2587
|
}
|
|
@@ -2347,9 +2603,9 @@ var DialogContent = React13.forwardRef(
|
|
|
2347
2603
|
}, ref) => {
|
|
2348
2604
|
const resolvedMaxHeight = typeof maxHeight === "number" ? `${maxHeight / 16}rem` : maxHeight;
|
|
2349
2605
|
const resolvedHeight = typeof height === "number" ? `${height / 16}rem` : height;
|
|
2350
|
-
return /* @__PURE__ */
|
|
2351
|
-
/* @__PURE__ */
|
|
2352
|
-
/* @__PURE__ */
|
|
2606
|
+
return /* @__PURE__ */ jsxs13(DialogPrimitive.Portal, { children: [
|
|
2607
|
+
/* @__PURE__ */ jsx23(DialogPrimitive.Overlay, { className: dialogOverlay }),
|
|
2608
|
+
/* @__PURE__ */ jsxs13(
|
|
2353
2609
|
DialogPrimitive.Content,
|
|
2354
2610
|
{
|
|
2355
2611
|
ref,
|
|
@@ -2361,7 +2617,7 @@ var DialogContent = React13.forwardRef(
|
|
|
2361
2617
|
},
|
|
2362
2618
|
children: [
|
|
2363
2619
|
children,
|
|
2364
|
-
showCloseButton && /* @__PURE__ */
|
|
2620
|
+
showCloseButton && /* @__PURE__ */ jsx23(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx23(
|
|
2365
2621
|
"button",
|
|
2366
2622
|
{
|
|
2367
2623
|
className: closeButton,
|
|
@@ -2372,7 +2628,7 @@ var DialogContent = React13.forwardRef(
|
|
|
2372
2628
|
top: "16px",
|
|
2373
2629
|
right: "16px"
|
|
2374
2630
|
},
|
|
2375
|
-
children: /* @__PURE__ */
|
|
2631
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
2376
2632
|
}
|
|
2377
2633
|
) })
|
|
2378
2634
|
]
|
|
@@ -2383,11 +2639,11 @@ var DialogContent = React13.forwardRef(
|
|
|
2383
2639
|
);
|
|
2384
2640
|
DialogContent.displayName = "DialogContent";
|
|
2385
2641
|
var DialogHeader = ({ children, className }) => {
|
|
2386
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ jsx23("div", { className: cn(dialogHeader, className), children });
|
|
2387
2643
|
};
|
|
2388
2644
|
DialogHeader.displayName = "DialogHeader";
|
|
2389
2645
|
var DialogTitle = React13.forwardRef(({ children, className }, ref) => {
|
|
2390
|
-
return /* @__PURE__ */
|
|
2646
|
+
return /* @__PURE__ */ jsx23(DialogPrimitive.Title, { ref, asChild: true, children: /* @__PURE__ */ jsx23(
|
|
2391
2647
|
Text2,
|
|
2392
2648
|
{
|
|
2393
2649
|
fontVariant: "text-l-medium",
|
|
@@ -2399,7 +2655,7 @@ var DialogTitle = React13.forwardRef(({ children, className }, ref) => {
|
|
|
2399
2655
|
});
|
|
2400
2656
|
DialogTitle.displayName = "DialogTitle";
|
|
2401
2657
|
var DialogDescription = React13.forwardRef(({ children, className }, ref) => {
|
|
2402
|
-
return /* @__PURE__ */
|
|
2658
|
+
return /* @__PURE__ */ jsx23(DialogPrimitive.Description, { ref, asChild: true, children: /* @__PURE__ */ jsx23(
|
|
2403
2659
|
Text2,
|
|
2404
2660
|
{
|
|
2405
2661
|
fontVariant: "text-s-regular",
|
|
@@ -2411,11 +2667,11 @@ var DialogDescription = React13.forwardRef(({ children, className }, ref) => {
|
|
|
2411
2667
|
});
|
|
2412
2668
|
DialogDescription.displayName = "DialogDescription";
|
|
2413
2669
|
var DialogBody = ({ children, className, style }) => {
|
|
2414
|
-
return /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ jsx23("div", { className: cn(dialogBody, className), style, children });
|
|
2415
2671
|
};
|
|
2416
2672
|
DialogBody.displayName = "DialogBody";
|
|
2417
2673
|
var DialogFooter = ({ children, className }) => {
|
|
2418
|
-
return /* @__PURE__ */
|
|
2674
|
+
return /* @__PURE__ */ jsx23("div", { className: cn(dialogFooter, className), children });
|
|
2419
2675
|
};
|
|
2420
2676
|
DialogFooter.displayName = "DialogFooter";
|
|
2421
2677
|
var DialogClose = DialogPrimitive.Close;
|
|
@@ -2434,7 +2690,7 @@ var Dialog = Object.assign(DialogRoot, {
|
|
|
2434
2690
|
|
|
2435
2691
|
// src/components/Dialog/AlertDialog.tsx
|
|
2436
2692
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
2437
|
-
import { jsx as
|
|
2693
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2438
2694
|
var AlertDialog = ({
|
|
2439
2695
|
layout = "medium",
|
|
2440
2696
|
title,
|
|
@@ -2454,96 +2710,102 @@ var AlertDialog = ({
|
|
|
2454
2710
|
const isMedium = layout === "medium";
|
|
2455
2711
|
const isStacked = layout === "stacked";
|
|
2456
2712
|
const maxWidthStyle = maxWidth ? `${maxWidth / 16}rem` : void 0;
|
|
2457
|
-
return /* @__PURE__ */
|
|
2458
|
-
trigger && /* @__PURE__ */
|
|
2459
|
-
/* @__PURE__ */
|
|
2460
|
-
/* @__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(
|
|
2461
2717
|
AlertDialogPrimitive.Overlay,
|
|
2462
2718
|
{
|
|
2463
2719
|
className: alertDialogOverlay,
|
|
2464
2720
|
style: overlayStyles
|
|
2465
2721
|
}
|
|
2466
2722
|
),
|
|
2467
|
-
/* @__PURE__ */
|
|
2723
|
+
/* @__PURE__ */ jsx24(
|
|
2468
2724
|
AlertDialogPrimitive.Content,
|
|
2469
2725
|
{
|
|
2470
2726
|
className: cn(alertDialogContent({ layout })),
|
|
2471
2727
|
style: maxWidthStyle ? { maxWidth: maxWidthStyle } : void 0,
|
|
2472
|
-
children: /* @__PURE__ */
|
|
2728
|
+
children: /* @__PURE__ */ jsxs14(
|
|
2473
2729
|
Stack2,
|
|
2474
2730
|
{
|
|
2475
2731
|
gap: "20",
|
|
2476
2732
|
bgColor: "backgroundPrimary",
|
|
2477
|
-
borderWidth: "
|
|
2733
|
+
borderWidth: "xs",
|
|
2478
2734
|
borderStyle: "solid",
|
|
2479
2735
|
borderColor: "borderQuaternary",
|
|
2480
2736
|
rounded: "lg",
|
|
2481
2737
|
padding: "xl",
|
|
2482
2738
|
shadow: "L4",
|
|
2483
2739
|
children: [
|
|
2484
|
-
/* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ jsxs14(
|
|
2485
2741
|
Stack2,
|
|
2486
2742
|
{
|
|
2487
2743
|
gap: "sm",
|
|
2488
2744
|
alignItems: isStacked ? "center" : "start",
|
|
2489
2745
|
textAlign: isStacked ? "center" : "left",
|
|
2490
2746
|
children: [
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
/* @__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 }) })
|
|
2493
2749
|
]
|
|
2494
2750
|
}
|
|
2495
2751
|
),
|
|
2496
|
-
isMedium ? /* @__PURE__ */
|
|
2497
|
-
/* @__PURE__ */
|
|
2752
|
+
isMedium ? /* @__PURE__ */ jsxs14(Inline2, { gap: "md", justifyContent: "end", children: [
|
|
2753
|
+
/* @__PURE__ */ jsx24(AlertDialogPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2498
2754
|
Button,
|
|
2499
2755
|
{
|
|
2500
2756
|
variant: footerButtonConfig?.secondary?.variant || "outline",
|
|
2757
|
+
size: "md",
|
|
2501
2758
|
onClick: onCancel,
|
|
2502
2759
|
...footerButtonConfig?.secondary,
|
|
2503
2760
|
children: cancelText
|
|
2504
2761
|
}
|
|
2505
2762
|
) }),
|
|
2506
|
-
preventCloseOnAction ? /* @__PURE__ */
|
|
2763
|
+
preventCloseOnAction ? /* @__PURE__ */ jsx24(
|
|
2507
2764
|
Button,
|
|
2508
2765
|
{
|
|
2509
2766
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2767
|
+
size: "md",
|
|
2510
2768
|
...footerButtonConfig?.primary,
|
|
2511
2769
|
onClick: onContinue,
|
|
2512
2770
|
children: continueText
|
|
2513
2771
|
}
|
|
2514
|
-
) : /* @__PURE__ */
|
|
2772
|
+
) : /* @__PURE__ */ jsx24(AlertDialogPrimitive.Action, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2515
2773
|
Button,
|
|
2516
2774
|
{
|
|
2517
2775
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2776
|
+
size: "md",
|
|
2518
2777
|
...footerButtonConfig?.primary,
|
|
2519
2778
|
onClick: onContinue,
|
|
2520
2779
|
children: continueText
|
|
2521
2780
|
}
|
|
2522
2781
|
) })
|
|
2523
|
-
] }) : /* @__PURE__ */
|
|
2524
|
-
preventCloseOnAction ? /* @__PURE__ */
|
|
2782
|
+
] }) : /* @__PURE__ */ jsxs14(Stack2, { gap: "md", children: [
|
|
2783
|
+
preventCloseOnAction ? /* @__PURE__ */ jsx24(
|
|
2525
2784
|
Button,
|
|
2526
2785
|
{
|
|
2527
2786
|
onClick: onContinue,
|
|
2528
2787
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2788
|
+
size: "md",
|
|
2529
2789
|
...footerButtonConfig?.primary,
|
|
2530
2790
|
style: { width: "100%" },
|
|
2531
2791
|
children: continueText
|
|
2532
2792
|
}
|
|
2533
|
-
) : /* @__PURE__ */
|
|
2793
|
+
) : /* @__PURE__ */ jsx24(AlertDialogPrimitive.Action, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2534
2794
|
Button,
|
|
2535
2795
|
{
|
|
2536
2796
|
onClick: onContinue,
|
|
2537
2797
|
variant: footerButtonConfig?.primary?.variant || "standard",
|
|
2798
|
+
size: "md",
|
|
2538
2799
|
...footerButtonConfig?.primary,
|
|
2539
2800
|
style: { width: "100%" },
|
|
2540
2801
|
children: continueText
|
|
2541
2802
|
}
|
|
2542
2803
|
) }),
|
|
2543
|
-
/* @__PURE__ */
|
|
2804
|
+
/* @__PURE__ */ jsx24(AlertDialogPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
2544
2805
|
Button,
|
|
2545
2806
|
{
|
|
2546
2807
|
variant: footerButtonConfig?.secondary?.variant || "outline",
|
|
2808
|
+
size: "md",
|
|
2547
2809
|
onClick: onCancel,
|
|
2548
2810
|
...footerButtonConfig?.secondary,
|
|
2549
2811
|
style: { width: "100%" },
|
|
@@ -2566,93 +2828,22 @@ import * as React14 from "react";
|
|
|
2566
2828
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
2567
2829
|
|
|
2568
2830
|
// src/components/Toast/toast.css.ts
|
|
2569
|
-
|
|
2570
|
-
var toastCloseButton = "toast_toastCloseButton__1c9srd8h";
|
|
2571
|
-
var toastContent = "toast_toastContent__1c9srd8j";
|
|
2572
|
-
var toastDescription = "toast_toastDescription__1c9srd8g";
|
|
2573
|
-
var toastIcon = "toast_toastIcon__1c9srd8i";
|
|
2574
|
-
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: [] });
|
|
2575
|
-
var toastTitle = "toast_toastTitle__1c9srd8f";
|
|
2576
|
-
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" };
|
|
2577
|
-
var toastViewportStyle = "toast_toastViewportStyle__1c9srd86";
|
|
2831
|
+
var toastRootAnimation = "toast_toastRootAnimation__1c9srd82";
|
|
2578
2832
|
|
|
2579
2833
|
// src/components/Toast/Toast.tsx
|
|
2580
|
-
import {
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
strokeWidth: "2",
|
|
2590
|
-
strokeLinecap: "round",
|
|
2591
|
-
strokeLinejoin: "round",
|
|
2592
|
-
children: [
|
|
2593
|
-
/* @__PURE__ */ jsx22("path", { d: "M18 6 6 18" }),
|
|
2594
|
-
/* @__PURE__ */ jsx22("path", { d: "m6 6 12 12" })
|
|
2595
|
-
]
|
|
2596
|
-
}
|
|
2597
|
-
);
|
|
2598
|
-
var InfoIcon = () => /* @__PURE__ */ jsxs14(
|
|
2599
|
-
"svg",
|
|
2600
|
-
{
|
|
2601
|
-
width: "20",
|
|
2602
|
-
height: "20",
|
|
2603
|
-
viewBox: "0 0 24 24",
|
|
2604
|
-
fill: "none",
|
|
2605
|
-
stroke: "currentColor",
|
|
2606
|
-
strokeWidth: "2",
|
|
2607
|
-
strokeLinecap: "round",
|
|
2608
|
-
strokeLinejoin: "round",
|
|
2609
|
-
children: [
|
|
2610
|
-
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2611
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 16v-4" }),
|
|
2612
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 8h.01" })
|
|
2613
|
-
]
|
|
2614
|
-
}
|
|
2615
|
-
);
|
|
2616
|
-
var SuccessIcon = () => /* @__PURE__ */ jsxs14(
|
|
2617
|
-
"svg",
|
|
2618
|
-
{
|
|
2619
|
-
width: "20",
|
|
2620
|
-
height: "20",
|
|
2621
|
-
viewBox: "0 0 24 24",
|
|
2622
|
-
fill: "none",
|
|
2623
|
-
stroke: "currentColor",
|
|
2624
|
-
strokeWidth: "2",
|
|
2625
|
-
strokeLinecap: "round",
|
|
2626
|
-
strokeLinejoin: "round",
|
|
2627
|
-
children: [
|
|
2628
|
-
/* @__PURE__ */ jsx22("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
2629
|
-
/* @__PURE__ */ jsx22("path", { d: "m9 11 3 3L22 4" })
|
|
2630
|
-
]
|
|
2631
|
-
}
|
|
2632
|
-
);
|
|
2633
|
-
var WarningIcon = () => /* @__PURE__ */ jsxs14(
|
|
2634
|
-
"svg",
|
|
2635
|
-
{
|
|
2636
|
-
width: "20",
|
|
2637
|
-
height: "20",
|
|
2638
|
-
viewBox: "0 0 24 24",
|
|
2639
|
-
fill: "none",
|
|
2640
|
-
stroke: "currentColor",
|
|
2641
|
-
strokeWidth: "2",
|
|
2642
|
-
strokeLinecap: "round",
|
|
2643
|
-
strokeLinejoin: "round",
|
|
2644
|
-
children: [
|
|
2645
|
-
/* @__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" }),
|
|
2646
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 9v4" }),
|
|
2647
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 17h.01" })
|
|
2648
|
-
]
|
|
2649
|
-
}
|
|
2650
|
-
);
|
|
2651
|
-
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(
|
|
2652
2843
|
"svg",
|
|
2653
2844
|
{
|
|
2654
|
-
width: "
|
|
2655
|
-
height: "
|
|
2845
|
+
width: "24",
|
|
2846
|
+
height: "24",
|
|
2656
2847
|
viewBox: "0 0 24 24",
|
|
2657
2848
|
fill: "none",
|
|
2658
2849
|
stroke: "currentColor",
|
|
@@ -2660,24 +2851,51 @@ var ErrorIcon = () => /* @__PURE__ */ jsxs14(
|
|
|
2660
2851
|
strokeLinecap: "round",
|
|
2661
2852
|
strokeLinejoin: "round",
|
|
2662
2853
|
children: [
|
|
2663
|
-
/* @__PURE__ */
|
|
2664
|
-
/* @__PURE__ */
|
|
2665
|
-
/* @__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" })
|
|
2666
2857
|
]
|
|
2667
2858
|
}
|
|
2668
2859
|
);
|
|
2669
2860
|
var getIconForVariant = (variant) => {
|
|
2670
2861
|
switch (variant) {
|
|
2671
2862
|
case "info":
|
|
2672
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ jsx25(InfoIcon, { size: "24" });
|
|
2673
2864
|
case "success":
|
|
2674
|
-
return /* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ jsx25(CheckCircleIcon, { size: "24" });
|
|
2675
2866
|
case "warning":
|
|
2676
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ jsx25(WarningIcon, {});
|
|
2677
2868
|
case "error":
|
|
2678
|
-
return /* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ jsx25(AlertCircleIcon, { size: "24" });
|
|
2679
2870
|
default:
|
|
2680
|
-
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"
|
|
2681
2899
|
}
|
|
2682
2900
|
};
|
|
2683
2901
|
var Toast = React14.forwardRef(
|
|
@@ -2693,22 +2911,61 @@ var Toast = React14.forwardRef(
|
|
|
2693
2911
|
showClose = true
|
|
2694
2912
|
}, ref) => {
|
|
2695
2913
|
const displayIcon = icon !== void 0 ? icon : getIconForVariant(variant);
|
|
2696
|
-
|
|
2914
|
+
const hasDescription = Boolean(description);
|
|
2915
|
+
const variantStyle = variantStyles[variant];
|
|
2916
|
+
return /* @__PURE__ */ jsx25(
|
|
2697
2917
|
ToastPrimitive.Root,
|
|
2698
2918
|
{
|
|
2699
2919
|
ref,
|
|
2700
2920
|
open,
|
|
2701
2921
|
onOpenChange,
|
|
2702
2922
|
duration,
|
|
2703
|
-
className: cn(
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
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
|
+
)
|
|
2712
2969
|
}
|
|
2713
2970
|
);
|
|
2714
2971
|
}
|
|
@@ -2717,16 +2974,42 @@ Toast.displayName = "Toast";
|
|
|
2717
2974
|
var ToastProvider = ToastPrimitive.Provider;
|
|
2718
2975
|
ToastProvider.displayName = "ToastProvider";
|
|
2719
2976
|
var ToastViewport = React14.forwardRef(({ position = "bottom-right", className, ...props }, ref) => {
|
|
2720
|
-
|
|
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(
|
|
2721
2995
|
ToastPrimitive.Viewport,
|
|
2722
2996
|
{
|
|
2723
2997
|
ref,
|
|
2724
2998
|
...props,
|
|
2725
|
-
className
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
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
|
+
}
|
|
2730
3013
|
}
|
|
2731
3014
|
);
|
|
2732
3015
|
});
|
|
@@ -2754,14 +3037,11 @@ var toastReducer = (state, action) => {
|
|
|
2754
3037
|
};
|
|
2755
3038
|
var useToast = () => {
|
|
2756
3039
|
const [state, dispatch] = React14.useReducer(toastReducer, { toasts: [] });
|
|
2757
|
-
const toast = React14.useCallback(
|
|
2758
|
-
(
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
},
|
|
2763
|
-
[]
|
|
2764
|
-
);
|
|
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
|
+
}, []);
|
|
2765
3045
|
const dismiss = React14.useCallback((id) => {
|
|
2766
3046
|
dispatch({ type: "REMOVE_TOAST", id });
|
|
2767
3047
|
}, []);
|
|
@@ -2781,14 +3061,14 @@ import * as React15 from "react";
|
|
|
2781
3061
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2782
3062
|
|
|
2783
3063
|
// src/components/Popover/popover.css.ts
|
|
2784
|
-
import { createRuntimeFn as
|
|
3064
|
+
import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2785
3065
|
var popoverArrow = "popover_popoverArrow__qv1k3x9";
|
|
2786
3066
|
var popoverClose = "popover_popoverClose__qv1k3xa";
|
|
2787
|
-
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: [] });
|
|
2788
3068
|
|
|
2789
3069
|
// src/components/Popover/Popover.tsx
|
|
2790
|
-
import { jsx as
|
|
2791
|
-
var CloseIcon3 = () => /* @__PURE__ */
|
|
3070
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3071
|
+
var CloseIcon3 = () => /* @__PURE__ */ jsxs16(
|
|
2792
3072
|
"svg",
|
|
2793
3073
|
{
|
|
2794
3074
|
width: "16",
|
|
@@ -2800,15 +3080,15 @@ var CloseIcon3 = () => /* @__PURE__ */ jsxs15(
|
|
|
2800
3080
|
strokeLinecap: "round",
|
|
2801
3081
|
strokeLinejoin: "round",
|
|
2802
3082
|
children: [
|
|
2803
|
-
/* @__PURE__ */
|
|
2804
|
-
/* @__PURE__ */
|
|
3083
|
+
/* @__PURE__ */ jsx26("path", { d: "M18 6 6 18" }),
|
|
3084
|
+
/* @__PURE__ */ jsx26("path", { d: "m6 6 12 12" })
|
|
2805
3085
|
]
|
|
2806
3086
|
}
|
|
2807
3087
|
);
|
|
2808
3088
|
var PopoverRoot = PopoverPrimitive.Root;
|
|
2809
3089
|
PopoverRoot.displayName = "PopoverRoot";
|
|
2810
3090
|
var PopoverTrigger = React15.forwardRef(({ children, ...props }, ref) => {
|
|
2811
|
-
return /* @__PURE__ */
|
|
3091
|
+
return /* @__PURE__ */ jsx26(PopoverPrimitive.Trigger, { ref, asChild: true, ...props, children });
|
|
2812
3092
|
});
|
|
2813
3093
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
2814
3094
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
@@ -2824,7 +3104,7 @@ var PopoverContent = React15.forwardRef(
|
|
|
2824
3104
|
onClose,
|
|
2825
3105
|
...props
|
|
2826
3106
|
}, ref) => {
|
|
2827
|
-
return /* @__PURE__ */
|
|
3107
|
+
return /* @__PURE__ */ jsx26(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs16(
|
|
2828
3108
|
PopoverPrimitive.Content,
|
|
2829
3109
|
{
|
|
2830
3110
|
ref,
|
|
@@ -2833,14 +3113,14 @@ var PopoverContent = React15.forwardRef(
|
|
|
2833
3113
|
...props,
|
|
2834
3114
|
children: [
|
|
2835
3115
|
children,
|
|
2836
|
-
showArrow && /* @__PURE__ */
|
|
2837
|
-
showClose && /* @__PURE__ */
|
|
3116
|
+
showArrow && /* @__PURE__ */ jsx26(PopoverPrimitive.Arrow, { className: popoverArrow, width: 12, height: 6 }),
|
|
3117
|
+
showClose && /* @__PURE__ */ jsx26(
|
|
2838
3118
|
PopoverPrimitive.Close,
|
|
2839
3119
|
{
|
|
2840
3120
|
className: popoverClose,
|
|
2841
3121
|
"aria-label": "Close",
|
|
2842
3122
|
onClick: onClose,
|
|
2843
|
-
children: /* @__PURE__ */
|
|
3123
|
+
children: /* @__PURE__ */ jsx26(CloseIcon3, {})
|
|
2844
3124
|
}
|
|
2845
3125
|
)
|
|
2846
3126
|
]
|
|
@@ -2866,9 +3146,9 @@ var Popover = ({
|
|
|
2866
3146
|
showClose = false,
|
|
2867
3147
|
modal = false
|
|
2868
3148
|
}) => {
|
|
2869
|
-
return /* @__PURE__ */
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
/* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ jsxs16(PopoverRoot, { open, defaultOpen, onOpenChange, modal, children: [
|
|
3150
|
+
/* @__PURE__ */ jsx26(PopoverTrigger, { children: trigger }),
|
|
3151
|
+
/* @__PURE__ */ jsx26(
|
|
2872
3152
|
PopoverContent,
|
|
2873
3153
|
{
|
|
2874
3154
|
side,
|
|
@@ -2896,30 +3176,30 @@ var PopoverCompound = Object.assign(Popover, {
|
|
|
2896
3176
|
// src/components/Tabs/Tabs.tsx
|
|
2897
3177
|
import React16, {
|
|
2898
3178
|
createContext as createContext2,
|
|
2899
|
-
forwardRef as
|
|
3179
|
+
forwardRef as forwardRef22,
|
|
2900
3180
|
useContext as useContext2
|
|
2901
3181
|
} from "react";
|
|
2902
3182
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2903
3183
|
|
|
2904
3184
|
// src/components/Tabs/tabs.css.ts
|
|
2905
|
-
import { createRuntimeFn as
|
|
3185
|
+
import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2906
3186
|
var labelText = "tabs_labelText__1c5op4v1";
|
|
2907
3187
|
var tabContent = "tabs_tabContent__1c5op4vi";
|
|
2908
|
-
var tabItem =
|
|
2909
|
-
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: [] });
|
|
2910
3190
|
|
|
2911
3191
|
// src/components/Tabs/Tabs.tsx
|
|
2912
|
-
import { jsx as
|
|
3192
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2913
3193
|
var TabsContext = createContext2({ variant: "pills" });
|
|
2914
3194
|
var useTabsContext = () => useContext2(TabsContext);
|
|
2915
|
-
var TabsRoot =
|
|
2916
|
-
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 }) });
|
|
2917
3197
|
});
|
|
2918
3198
|
TabsRoot.displayName = "Tabs.Root";
|
|
2919
|
-
var TabsList =
|
|
3199
|
+
var TabsList = forwardRef22(({ variant, fullWidth = false, className, children, ...props }, ref) => {
|
|
2920
3200
|
const context = useTabsContext();
|
|
2921
3201
|
const resolvedVariant = variant ?? context.variant;
|
|
2922
|
-
return /* @__PURE__ */
|
|
3202
|
+
return /* @__PURE__ */ jsx27(
|
|
2923
3203
|
TabsPrimitive.List,
|
|
2924
3204
|
{
|
|
2925
3205
|
ref,
|
|
@@ -2933,11 +3213,11 @@ var TabsList = forwardRef21(({ variant, fullWidth = false, className, children,
|
|
|
2933
3213
|
);
|
|
2934
3214
|
});
|
|
2935
3215
|
TabsList.displayName = "Tabs.List";
|
|
2936
|
-
var TabsTrigger =
|
|
3216
|
+
var TabsTrigger = forwardRef22(({ value, icon, children, className, disabled, variant, ...props }, ref) => {
|
|
2937
3217
|
const context = useTabsContext();
|
|
2938
3218
|
const resolvedVariant = variant ?? context.variant;
|
|
2939
3219
|
const itemVariant = !children && icon ? "onlyIcon" : children && icon ? "icon" : "default";
|
|
2940
|
-
return /* @__PURE__ */
|
|
3220
|
+
return /* @__PURE__ */ jsx27(
|
|
2941
3221
|
TabsPrimitive.Trigger,
|
|
2942
3222
|
{
|
|
2943
3223
|
ref,
|
|
@@ -2953,12 +3233,12 @@ var TabsTrigger = forwardRef21(({ value, icon, children, className, disabled, va
|
|
|
2953
3233
|
),
|
|
2954
3234
|
"data-variant": resolvedVariant,
|
|
2955
3235
|
...props,
|
|
2956
|
-
children: /* @__PURE__ */
|
|
3236
|
+
children: /* @__PURE__ */ jsxs17(Inline2, { gap: "sm", alignItems: "center", justifyContent: "center", children: [
|
|
2957
3237
|
icon && React16.cloneElement(icon, {
|
|
2958
3238
|
size: "20",
|
|
2959
3239
|
style: { color: "inherit" }
|
|
2960
3240
|
}),
|
|
2961
|
-
children && /* @__PURE__ */
|
|
3241
|
+
children && /* @__PURE__ */ jsx27(
|
|
2962
3242
|
Text2,
|
|
2963
3243
|
{
|
|
2964
3244
|
fontVariant: "text-m-medium",
|
|
@@ -2972,8 +3252,8 @@ var TabsTrigger = forwardRef21(({ value, icon, children, className, disabled, va
|
|
|
2972
3252
|
);
|
|
2973
3253
|
});
|
|
2974
3254
|
TabsTrigger.displayName = "Tabs.Trigger";
|
|
2975
|
-
var TabsContent =
|
|
2976
|
-
return /* @__PURE__ */
|
|
3255
|
+
var TabsContent = forwardRef22(({ className, children, ...props }, ref) => {
|
|
3256
|
+
return /* @__PURE__ */ jsx27(
|
|
2977
3257
|
TabsPrimitive.Content,
|
|
2978
3258
|
{
|
|
2979
3259
|
ref,
|
|
@@ -2992,14 +3272,14 @@ var Tabs = Object.assign(TabsRoot, {
|
|
|
2992
3272
|
});
|
|
2993
3273
|
|
|
2994
3274
|
// src/components/Drawer/Drawer.tsx
|
|
2995
|
-
import { forwardRef as
|
|
3275
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
2996
3276
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
2997
3277
|
|
|
2998
3278
|
// src/components/Drawer/drawer.css.ts
|
|
2999
|
-
import { createRuntimeFn as
|
|
3279
|
+
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3000
3280
|
var closeButton2 = "drawer_closeButton__4fc39fj";
|
|
3001
3281
|
var drawerBody = "drawer_drawerBody__4fc39fh";
|
|
3002
|
-
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: [] });
|
|
3003
3283
|
var drawerDescription = "drawer_drawerDescription__4fc39fg";
|
|
3004
3284
|
var drawerFooter = "drawer_drawerFooter__4fc39fi";
|
|
3005
3285
|
var drawerHeader = "drawer_drawerHeader__4fc39fe";
|
|
@@ -3012,8 +3292,8 @@ var sectionHeader = "drawer_sectionHeader__4fc39fl";
|
|
|
3012
3292
|
var sectionText = "drawer_sectionText__4fc39fm";
|
|
3013
3293
|
|
|
3014
3294
|
// src/components/Drawer/Drawer.tsx
|
|
3015
|
-
import { jsx as
|
|
3016
|
-
var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */
|
|
3295
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3296
|
+
var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */ jsxs18(
|
|
3017
3297
|
"svg",
|
|
3018
3298
|
{
|
|
3019
3299
|
width: size,
|
|
@@ -3025,8 +3305,8 @@ var CloseIcon4 = ({ size = "20" }) => /* @__PURE__ */ jsxs17(
|
|
|
3025
3305
|
strokeLinecap: "round",
|
|
3026
3306
|
strokeLinejoin: "round",
|
|
3027
3307
|
children: [
|
|
3028
|
-
/* @__PURE__ */
|
|
3029
|
-
/* @__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" })
|
|
3030
3310
|
]
|
|
3031
3311
|
}
|
|
3032
3312
|
);
|
|
@@ -3034,8 +3314,8 @@ var DrawerRoot = DialogPrimitive2.Root;
|
|
|
3034
3314
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
3035
3315
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
3036
3316
|
var DrawerClose = DialogPrimitive2.Close;
|
|
3037
|
-
var DrawerOverlay =
|
|
3038
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3317
|
+
var DrawerOverlay = forwardRef23(
|
|
3318
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
3039
3319
|
DialogPrimitive2.Overlay,
|
|
3040
3320
|
{
|
|
3041
3321
|
ref,
|
|
@@ -3045,8 +3325,8 @@ var DrawerOverlay = forwardRef22(
|
|
|
3045
3325
|
)
|
|
3046
3326
|
);
|
|
3047
3327
|
DrawerOverlay.displayName = "Drawer.Overlay";
|
|
3048
|
-
var DrawerContent =
|
|
3049
|
-
({ children, className, side = "right", size = "lg", ...props }, ref) => /* @__PURE__ */
|
|
3328
|
+
var DrawerContent = forwardRef23(
|
|
3329
|
+
({ children, className, side = "right", size = "lg", ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
3050
3330
|
DialogPrimitive2.Content,
|
|
3051
3331
|
{
|
|
3052
3332
|
ref,
|
|
@@ -3057,7 +3337,7 @@ var DrawerContent = forwardRef22(
|
|
|
3057
3337
|
)
|
|
3058
3338
|
);
|
|
3059
3339
|
DrawerContent.displayName = "Drawer.Content";
|
|
3060
|
-
var DrawerHeader =
|
|
3340
|
+
var DrawerHeader = forwardRef23(
|
|
3061
3341
|
({
|
|
3062
3342
|
className,
|
|
3063
3343
|
title,
|
|
@@ -3065,21 +3345,21 @@ var DrawerHeader = forwardRef22(
|
|
|
3065
3345
|
showCloseButton = true,
|
|
3066
3346
|
closeLabel = "Close drawer",
|
|
3067
3347
|
...props
|
|
3068
|
-
}, ref) => title || children ? /* @__PURE__ */
|
|
3069
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
3070
|
-
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(
|
|
3071
3351
|
DialogPrimitive2.Close,
|
|
3072
3352
|
{
|
|
3073
3353
|
className: closeButton2,
|
|
3074
3354
|
"aria-label": closeLabel,
|
|
3075
|
-
children: /* @__PURE__ */
|
|
3355
|
+
children: /* @__PURE__ */ jsx28(CloseIcon4, { size: "20" })
|
|
3076
3356
|
}
|
|
3077
3357
|
)
|
|
3078
3358
|
] }) : null
|
|
3079
3359
|
);
|
|
3080
3360
|
DrawerHeader.displayName = "Drawer.Header";
|
|
3081
|
-
var DrawerTitle =
|
|
3082
|
-
({ 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(
|
|
3083
3363
|
Text2,
|
|
3084
3364
|
{
|
|
3085
3365
|
as: "h2",
|
|
@@ -3090,7 +3370,7 @@ var DrawerTitle = forwardRef22(
|
|
|
3090
3370
|
) })
|
|
3091
3371
|
);
|
|
3092
3372
|
DrawerTitle.displayName = "Drawer.Title";
|
|
3093
|
-
var DrawerDescription =
|
|
3373
|
+
var DrawerDescription = forwardRef23(({ children, className, ...props }, ref) => /* @__PURE__ */ jsx28(DialogPrimitive2.Description, { asChild: true, ref, ...props, children: /* @__PURE__ */ jsx28(
|
|
3094
3374
|
Text2,
|
|
3095
3375
|
{
|
|
3096
3376
|
as: "p",
|
|
@@ -3100,12 +3380,12 @@ var DrawerDescription = forwardRef22(({ children, className, ...props }, ref) =>
|
|
|
3100
3380
|
}
|
|
3101
3381
|
) }));
|
|
3102
3382
|
DrawerDescription.displayName = "Drawer.Description";
|
|
3103
|
-
var DrawerBody =
|
|
3104
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3383
|
+
var DrawerBody = forwardRef23(
|
|
3384
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28("div", { ref, className: cn(drawerBody, className), ...props })
|
|
3105
3385
|
);
|
|
3106
3386
|
DrawerBody.displayName = "Drawer.Body";
|
|
3107
|
-
var DrawerFooter =
|
|
3108
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3387
|
+
var DrawerFooter = forwardRef23(
|
|
3388
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
3109
3389
|
"footer",
|
|
3110
3390
|
{
|
|
3111
3391
|
ref,
|
|
@@ -3115,9 +3395,9 @@ var DrawerFooter = forwardRef22(
|
|
|
3115
3395
|
)
|
|
3116
3396
|
);
|
|
3117
3397
|
DrawerFooter.displayName = "Drawer.Footer";
|
|
3118
|
-
var DrawerSection =
|
|
3119
|
-
({ title, description, actions, children, className, ...props }, ref) => /* @__PURE__ */
|
|
3120
|
-
(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(
|
|
3121
3401
|
Inline2,
|
|
3122
3402
|
{
|
|
3123
3403
|
className: sectionHeader,
|
|
@@ -3125,15 +3405,15 @@ var DrawerSection = forwardRef22(
|
|
|
3125
3405
|
alignItems: "flex-start",
|
|
3126
3406
|
gap: "md",
|
|
3127
3407
|
children: [
|
|
3128
|
-
/* @__PURE__ */
|
|
3129
|
-
title && /* @__PURE__ */
|
|
3130
|
-
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 })
|
|
3131
3411
|
] }),
|
|
3132
|
-
actions && /* @__PURE__ */
|
|
3412
|
+
actions && /* @__PURE__ */ jsx28("div", { className: sectionActions, children: actions })
|
|
3133
3413
|
]
|
|
3134
3414
|
}
|
|
3135
3415
|
),
|
|
3136
|
-
/* @__PURE__ */
|
|
3416
|
+
/* @__PURE__ */ jsx28("div", { className: sectionContent, children })
|
|
3137
3417
|
] })
|
|
3138
3418
|
);
|
|
3139
3419
|
DrawerSection.displayName = "Drawer.Section";
|
|
@@ -3148,12 +3428,12 @@ var Drawer = ({
|
|
|
3148
3428
|
size = "lg",
|
|
3149
3429
|
showCloseButton = true
|
|
3150
3430
|
}) => {
|
|
3151
|
-
return /* @__PURE__ */
|
|
3152
|
-
trigger && /* @__PURE__ */
|
|
3153
|
-
/* @__PURE__ */
|
|
3154
|
-
showOverlay && /* @__PURE__ */
|
|
3155
|
-
/* @__PURE__ */
|
|
3156
|
-
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 }),
|
|
3157
3437
|
children
|
|
3158
3438
|
] })
|
|
3159
3439
|
] })
|
|
@@ -3176,17 +3456,17 @@ var DrawerCompound = Object.assign(DrawerRoot, {
|
|
|
3176
3456
|
});
|
|
3177
3457
|
|
|
3178
3458
|
// src/components/Pagination/pagination.css.ts
|
|
3179
|
-
import { createRuntimeFn as
|
|
3459
|
+
import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3180
3460
|
var iconWrapper4 = "pagination_iconWrapper__x6drlh7";
|
|
3181
|
-
var paginationItem =
|
|
3182
|
-
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: [] });
|
|
3183
3463
|
var rangeTextPrimary = "pagination_rangeTextPrimary__x6drlhe";
|
|
3184
3464
|
var rangeTextSecondary = "pagination_rangeTextSecondary__x6drlhd";
|
|
3185
3465
|
var rangeWrapper = "pagination_rangeWrapper__x6drlhc";
|
|
3186
3466
|
|
|
3187
3467
|
// src/components/Pagination/Pagination.tsx
|
|
3188
|
-
import { jsx as
|
|
3189
|
-
var ChevronLeftIcon = ({ size = "16" }) => /* @__PURE__ */
|
|
3468
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3469
|
+
var ChevronLeftIcon = ({ size = "16" }) => /* @__PURE__ */ jsx29(
|
|
3190
3470
|
"svg",
|
|
3191
3471
|
{
|
|
3192
3472
|
width: size,
|
|
@@ -3197,10 +3477,10 @@ var ChevronLeftIcon = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
|
3197
3477
|
strokeWidth: "2",
|
|
3198
3478
|
strokeLinecap: "round",
|
|
3199
3479
|
strokeLinejoin: "round",
|
|
3200
|
-
children: /* @__PURE__ */
|
|
3480
|
+
children: /* @__PURE__ */ jsx29("path", { d: "M15 18l-6-6 6-6" })
|
|
3201
3481
|
}
|
|
3202
3482
|
);
|
|
3203
|
-
var ChevronRightIcon2 = ({ size = "16" }) => /* @__PURE__ */
|
|
3483
|
+
var ChevronRightIcon2 = ({ size = "16" }) => /* @__PURE__ */ jsx29(
|
|
3204
3484
|
"svg",
|
|
3205
3485
|
{
|
|
3206
3486
|
width: size,
|
|
@@ -3211,10 +3491,10 @@ var ChevronRightIcon2 = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
|
3211
3491
|
strokeWidth: "2",
|
|
3212
3492
|
strokeLinecap: "round",
|
|
3213
3493
|
strokeLinejoin: "round",
|
|
3214
|
-
children: /* @__PURE__ */
|
|
3494
|
+
children: /* @__PURE__ */ jsx29("path", { d: "M9 18l6-6-6-6" })
|
|
3215
3495
|
}
|
|
3216
3496
|
);
|
|
3217
|
-
var ChevronDownIcon3 = ({ size = "16" }) => /* @__PURE__ */
|
|
3497
|
+
var ChevronDownIcon3 = ({ size = "16" }) => /* @__PURE__ */ jsx29(
|
|
3218
3498
|
"svg",
|
|
3219
3499
|
{
|
|
3220
3500
|
width: size,
|
|
@@ -3225,10 +3505,10 @@ var ChevronDownIcon3 = ({ size = "16" }) => /* @__PURE__ */ jsx26(
|
|
|
3225
3505
|
strokeWidth: "2",
|
|
3226
3506
|
strokeLinecap: "round",
|
|
3227
3507
|
strokeLinejoin: "round",
|
|
3228
|
-
children: /* @__PURE__ */
|
|
3508
|
+
children: /* @__PURE__ */ jsx29("path", { d: "M6 9l6 6 6-6" })
|
|
3229
3509
|
}
|
|
3230
3510
|
);
|
|
3231
|
-
var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */
|
|
3511
|
+
var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */ jsxs19(
|
|
3232
3512
|
"svg",
|
|
3233
3513
|
{
|
|
3234
3514
|
width: size,
|
|
@@ -3236,9 +3516,9 @@ var EllipsisIcon = ({ size = "16" }) => /* @__PURE__ */ jsxs18(
|
|
|
3236
3516
|
viewBox: "0 0 24 24",
|
|
3237
3517
|
fill: "currentColor",
|
|
3238
3518
|
children: [
|
|
3239
|
-
/* @__PURE__ */
|
|
3240
|
-
/* @__PURE__ */
|
|
3241
|
-
/* @__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" })
|
|
3242
3522
|
]
|
|
3243
3523
|
}
|
|
3244
3524
|
);
|
|
@@ -3246,7 +3526,7 @@ var PaginationRoot = ({
|
|
|
3246
3526
|
children,
|
|
3247
3527
|
className
|
|
3248
3528
|
}) => {
|
|
3249
|
-
return /* @__PURE__ */
|
|
3529
|
+
return /* @__PURE__ */ jsx29(Box2, { as: "nav", className, "aria-label": "Pagination", children: /* @__PURE__ */ jsx29(Inline2, { gap: "4", alignItems: "center", children }) });
|
|
3250
3530
|
};
|
|
3251
3531
|
PaginationRoot.displayName = "Pagination.Root";
|
|
3252
3532
|
var PaginationPrevious = ({
|
|
@@ -3255,7 +3535,7 @@ var PaginationPrevious = ({
|
|
|
3255
3535
|
children = "Previous",
|
|
3256
3536
|
className
|
|
3257
3537
|
}) => {
|
|
3258
|
-
return /* @__PURE__ */
|
|
3538
|
+
return /* @__PURE__ */ jsxs19(
|
|
3259
3539
|
"button",
|
|
3260
3540
|
{
|
|
3261
3541
|
className: cn(paginationItem({ variant: "previous" }), className),
|
|
@@ -3263,7 +3543,7 @@ var PaginationPrevious = ({
|
|
|
3263
3543
|
disabled,
|
|
3264
3544
|
"aria-label": "Go to previous page",
|
|
3265
3545
|
children: [
|
|
3266
|
-
/* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ jsx29("span", { className: iconWrapper4, children: /* @__PURE__ */ jsx29(ChevronLeftIcon, { size: "16" }) }),
|
|
3267
3547
|
children
|
|
3268
3548
|
]
|
|
3269
3549
|
}
|
|
@@ -3276,7 +3556,7 @@ var PaginationNext = ({
|
|
|
3276
3556
|
children = "Next",
|
|
3277
3557
|
className
|
|
3278
3558
|
}) => {
|
|
3279
|
-
return /* @__PURE__ */
|
|
3559
|
+
return /* @__PURE__ */ jsxs19(
|
|
3280
3560
|
"button",
|
|
3281
3561
|
{
|
|
3282
3562
|
className: cn(paginationItem({ variant: "next" }), className),
|
|
@@ -3285,7 +3565,7 @@ var PaginationNext = ({
|
|
|
3285
3565
|
"aria-label": "Go to next page",
|
|
3286
3566
|
children: [
|
|
3287
3567
|
children,
|
|
3288
|
-
/* @__PURE__ */
|
|
3568
|
+
/* @__PURE__ */ jsx29("span", { className: iconWrapper4, children: /* @__PURE__ */ jsx29(ChevronRightIcon2, { size: "16" }) })
|
|
3289
3569
|
]
|
|
3290
3570
|
}
|
|
3291
3571
|
);
|
|
@@ -3297,7 +3577,7 @@ var PaginationPage = ({
|
|
|
3297
3577
|
onClick,
|
|
3298
3578
|
className
|
|
3299
3579
|
}) => {
|
|
3300
|
-
return /* @__PURE__ */
|
|
3580
|
+
return /* @__PURE__ */ jsx29(
|
|
3301
3581
|
"button",
|
|
3302
3582
|
{
|
|
3303
3583
|
className: cn(
|
|
@@ -3313,12 +3593,12 @@ var PaginationPage = ({
|
|
|
3313
3593
|
};
|
|
3314
3594
|
PaginationPage.displayName = "Pagination.Page";
|
|
3315
3595
|
var PaginationEllipsis = ({ className }) => {
|
|
3316
|
-
return /* @__PURE__ */
|
|
3596
|
+
return /* @__PURE__ */ jsx29(
|
|
3317
3597
|
"span",
|
|
3318
3598
|
{
|
|
3319
3599
|
className: cn(paginationItem({ variant: "ellipsis" }), className),
|
|
3320
3600
|
"aria-hidden": "true",
|
|
3321
|
-
children: /* @__PURE__ */
|
|
3601
|
+
children: /* @__PURE__ */ jsx29("span", { className: iconWrapper4, children: /* @__PURE__ */ jsx29(EllipsisIcon, { size: "16" }) })
|
|
3322
3602
|
}
|
|
3323
3603
|
);
|
|
3324
3604
|
};
|
|
@@ -3334,11 +3614,11 @@ var PaginationInfoRoot = ({
|
|
|
3334
3614
|
children,
|
|
3335
3615
|
className
|
|
3336
3616
|
}) => {
|
|
3337
|
-
return /* @__PURE__ */
|
|
3617
|
+
return /* @__PURE__ */ jsx29(Inline2, { alignItems: "center", gap: "sm", className, children });
|
|
3338
3618
|
};
|
|
3339
3619
|
PaginationInfoRoot.displayName = "PaginationInfo.Root";
|
|
3340
3620
|
var PaginationInfoLabel = ({ children }) => {
|
|
3341
|
-
return /* @__PURE__ */
|
|
3621
|
+
return /* @__PURE__ */ jsx29(
|
|
3342
3622
|
Text2,
|
|
3343
3623
|
{
|
|
3344
3624
|
whiteSpace: "nowrap",
|
|
@@ -3354,14 +3634,14 @@ var PaginationInfoRange = ({
|
|
|
3354
3634
|
end,
|
|
3355
3635
|
total
|
|
3356
3636
|
}) => {
|
|
3357
|
-
return /* @__PURE__ */
|
|
3358
|
-
/* @__PURE__ */
|
|
3637
|
+
return /* @__PURE__ */ jsxs19("div", { className: rangeWrapper, children: [
|
|
3638
|
+
/* @__PURE__ */ jsxs19("span", { className: rangeTextSecondary, children: [
|
|
3359
3639
|
start,
|
|
3360
3640
|
"-",
|
|
3361
3641
|
end
|
|
3362
3642
|
] }),
|
|
3363
|
-
/* @__PURE__ */
|
|
3364
|
-
/* @__PURE__ */
|
|
3643
|
+
/* @__PURE__ */ jsx29("span", { className: rangeTextSecondary, children: "of" }),
|
|
3644
|
+
/* @__PURE__ */ jsx29("span", { className: rangeTextPrimary, children: total })
|
|
3365
3645
|
] });
|
|
3366
3646
|
};
|
|
3367
3647
|
PaginationInfoRange.displayName = "PaginationInfo.Range";
|
|
@@ -3376,14 +3656,14 @@ var PaginationInfoComplete = ({
|
|
|
3376
3656
|
}) => {
|
|
3377
3657
|
const start = Math.min((currentPage - 1) * pageSize + 1, totalItems);
|
|
3378
3658
|
const end = Math.min(currentPage * pageSize, totalItems);
|
|
3379
|
-
return /* @__PURE__ */
|
|
3380
|
-
/* @__PURE__ */
|
|
3381
|
-
/* @__PURE__ */
|
|
3659
|
+
return /* @__PURE__ */ jsxs19(PaginationInfoRoot, { className, children: [
|
|
3660
|
+
/* @__PURE__ */ jsx29(PaginationInfoLabel, { children: label }),
|
|
3661
|
+
/* @__PURE__ */ jsx29(
|
|
3382
3662
|
Menu,
|
|
3383
3663
|
{
|
|
3384
|
-
trigger: /* @__PURE__ */
|
|
3664
|
+
trigger: /* @__PURE__ */ jsxs19("button", { className: pickerButton({ disabled: false }), children: [
|
|
3385
3665
|
pageSize,
|
|
3386
|
-
/* @__PURE__ */
|
|
3666
|
+
/* @__PURE__ */ jsx29(
|
|
3387
3667
|
Inline2,
|
|
3388
3668
|
{
|
|
3389
3669
|
as: "span",
|
|
@@ -3393,14 +3673,14 @@ var PaginationInfoComplete = ({
|
|
|
3393
3673
|
alignItems: "center",
|
|
3394
3674
|
justifyContent: "center",
|
|
3395
3675
|
className: iconWrapper4,
|
|
3396
|
-
children: /* @__PURE__ */
|
|
3676
|
+
children: /* @__PURE__ */ jsx29(ChevronDownIcon3, { size: "16" })
|
|
3397
3677
|
}
|
|
3398
3678
|
)
|
|
3399
3679
|
] }),
|
|
3400
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
3680
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx29(MenuItem, { onClick: () => onPageSizeChange?.(size), children: size }, size))
|
|
3401
3681
|
}
|
|
3402
3682
|
),
|
|
3403
|
-
/* @__PURE__ */
|
|
3683
|
+
/* @__PURE__ */ jsx29(PaginationInfoRange, { start, end, total: totalItems })
|
|
3404
3684
|
] });
|
|
3405
3685
|
};
|
|
3406
3686
|
PaginationInfoComplete.displayName = "PaginationInfo.Complete";
|
|
@@ -3414,57 +3694,21 @@ var PaginationInfo = Object.assign(PaginationInfoRoot, {
|
|
|
3414
3694
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
3415
3695
|
import * as React18 from "react";
|
|
3416
3696
|
import { Slot } from "@radix-ui/react-slot";
|
|
3697
|
+
import { ChevronDownIcon as ChevronDownIcon4, ChevronRightIcon as ChevronRightIcon3 } from "@zentrades-ui/icons";
|
|
3417
3698
|
|
|
3418
3699
|
// src/components/Breadcrumb/breadcrumb.css.ts
|
|
3419
|
-
import { createRuntimeFn as
|
|
3420
|
-
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: [] });
|
|
3421
3702
|
|
|
3422
3703
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
3423
|
-
import { jsx as
|
|
3424
|
-
var ChevronRightIcon3 = ({
|
|
3425
|
-
size = "16",
|
|
3426
|
-
color
|
|
3427
|
-
}) => /* @__PURE__ */ jsx27(
|
|
3428
|
-
"svg",
|
|
3429
|
-
{
|
|
3430
|
-
width: size,
|
|
3431
|
-
height: size,
|
|
3432
|
-
viewBox: "0 0 24 24",
|
|
3433
|
-
fill: "none",
|
|
3434
|
-
stroke: color || "currentColor",
|
|
3435
|
-
strokeWidth: "2",
|
|
3436
|
-
strokeLinecap: "round",
|
|
3437
|
-
strokeLinejoin: "round",
|
|
3438
|
-
children: /* @__PURE__ */ jsx27("path", { d: "M9 18l6-6-6-6" })
|
|
3439
|
-
}
|
|
3440
|
-
);
|
|
3704
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3441
3705
|
var BreadcrumbContext = React18.createContext({});
|
|
3442
|
-
var useBreadcrumbContext = () => {
|
|
3443
|
-
return React18.useContext(BreadcrumbContext);
|
|
3444
|
-
};
|
|
3445
3706
|
var BreadcrumbRoot = React18.forwardRef(({ children, separator, ...props }, ref) => {
|
|
3446
|
-
return /* @__PURE__ */
|
|
3707
|
+
return /* @__PURE__ */ jsx30("nav", { ref, "aria-label": "Breadcrumb", ...props, children: /* @__PURE__ */ jsx30(BreadcrumbContext.Provider, { value: { separator }, children }) });
|
|
3447
3708
|
});
|
|
3448
3709
|
BreadcrumbRoot.displayName = "Breadcrumb.Root";
|
|
3449
|
-
var BreadcrumbList = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3450
|
-
return /* @__PURE__ */ jsx27(
|
|
3451
|
-
Inline2,
|
|
3452
|
-
{
|
|
3453
|
-
as: "ol",
|
|
3454
|
-
ref,
|
|
3455
|
-
style: { listStyle: "none" },
|
|
3456
|
-
margin: "none",
|
|
3457
|
-
padding: "none",
|
|
3458
|
-
alignItems: "center",
|
|
3459
|
-
gap: "xs",
|
|
3460
|
-
className,
|
|
3461
|
-
...props
|
|
3462
|
-
}
|
|
3463
|
-
);
|
|
3464
|
-
});
|
|
3465
|
-
BreadcrumbList.displayName = "Breadcrumb.List";
|
|
3466
3710
|
var BreadcrumbItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3467
|
-
return /* @__PURE__ */
|
|
3711
|
+
return /* @__PURE__ */ jsx30(
|
|
3468
3712
|
Inline2,
|
|
3469
3713
|
{
|
|
3470
3714
|
as: "li",
|
|
@@ -3478,21 +3722,28 @@ var BreadcrumbItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
3478
3722
|
});
|
|
3479
3723
|
BreadcrumbItem.displayName = "Breadcrumb.Item";
|
|
3480
3724
|
var BreadcrumbLink = React18.forwardRef(({ asChild, current, className, ...props }, ref) => {
|
|
3725
|
+
const { dropdown, children, ...restProps } = props;
|
|
3481
3726
|
const Comp = asChild ? Slot : "a";
|
|
3482
|
-
return /* @__PURE__ */
|
|
3483
|
-
|
|
3727
|
+
return /* @__PURE__ */ jsxs20(
|
|
3728
|
+
Inline2,
|
|
3484
3729
|
{
|
|
3730
|
+
as: Comp,
|
|
3485
3731
|
ref,
|
|
3732
|
+
alignItems: "center",
|
|
3733
|
+
gap: dropdown ? "2xs" : "none",
|
|
3486
3734
|
className: cn(breadcrumbLink({ current }), className),
|
|
3487
3735
|
"aria-current": current ? "page" : void 0,
|
|
3488
|
-
...
|
|
3736
|
+
...restProps,
|
|
3737
|
+
children: [
|
|
3738
|
+
children,
|
|
3739
|
+
dropdown ? /* @__PURE__ */ jsx30(ChevronDownIcon4, { size: "16" }) : null
|
|
3740
|
+
]
|
|
3489
3741
|
}
|
|
3490
3742
|
);
|
|
3491
3743
|
});
|
|
3492
3744
|
BreadcrumbLink.displayName = "Breadcrumb.Link";
|
|
3493
3745
|
var BreadcrumbSeparator = React18.forwardRef(({ children, className, ...props }, ref) => {
|
|
3494
|
-
|
|
3495
|
-
return /* @__PURE__ */ jsx27(
|
|
3746
|
+
return /* @__PURE__ */ jsx30(
|
|
3496
3747
|
Inline2,
|
|
3497
3748
|
{
|
|
3498
3749
|
as: "li",
|
|
@@ -3500,30 +3751,65 @@ var BreadcrumbSeparator = React18.forwardRef(({ children, className, ...props },
|
|
|
3500
3751
|
role: "presentation",
|
|
3501
3752
|
"aria-hidden": "true",
|
|
3502
3753
|
alignItems: "center",
|
|
3754
|
+
padding: "2xs",
|
|
3503
3755
|
className,
|
|
3504
3756
|
...props,
|
|
3505
|
-
children: children ||
|
|
3757
|
+
children: children || /* @__PURE__ */ jsx30(
|
|
3758
|
+
ChevronRightIcon3,
|
|
3759
|
+
{
|
|
3760
|
+
color: "contentQuaternary",
|
|
3761
|
+
size: "16"
|
|
3762
|
+
}
|
|
3763
|
+
)
|
|
3506
3764
|
}
|
|
3507
3765
|
);
|
|
3508
3766
|
});
|
|
3509
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";
|
|
3510
3794
|
var BreadcrumbEllipsis = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3511
|
-
return /* @__PURE__ */
|
|
3512
|
-
|
|
3795
|
+
return /* @__PURE__ */ jsx30(
|
|
3796
|
+
Heading2,
|
|
3513
3797
|
{
|
|
3798
|
+
as: "span",
|
|
3799
|
+
fontVariant: "heading-2xs-medium",
|
|
3514
3800
|
ref,
|
|
3515
3801
|
role: "presentation",
|
|
3516
3802
|
"aria-hidden": "true",
|
|
3517
3803
|
className,
|
|
3518
|
-
|
|
3804
|
+
color: "contentQuaternary",
|
|
3519
3805
|
...props,
|
|
3520
|
-
children: "
|
|
3806
|
+
children: "..."
|
|
3521
3807
|
}
|
|
3522
3808
|
);
|
|
3523
3809
|
});
|
|
3524
3810
|
BreadcrumbEllipsis.displayName = "Breadcrumb.Ellipsis";
|
|
3525
3811
|
var BreadcrumbPage = React18.forwardRef(({ className, ...props }, ref) => {
|
|
3526
|
-
return /* @__PURE__ */
|
|
3812
|
+
return /* @__PURE__ */ jsx30(
|
|
3527
3813
|
"span",
|
|
3528
3814
|
{
|
|
3529
3815
|
ref,
|
|
@@ -3548,14 +3834,14 @@ var Breadcrumb = Object.assign(BreadcrumbRoot, {
|
|
|
3548
3834
|
|
|
3549
3835
|
// src/components/ContentSplitter/ContentSplitter.tsx
|
|
3550
3836
|
import React19 from "react";
|
|
3551
|
-
import { jsx as
|
|
3837
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3552
3838
|
var circleSize = {
|
|
3553
3839
|
sm: "2",
|
|
3554
3840
|
md: "4",
|
|
3555
3841
|
lg: "6"
|
|
3556
3842
|
};
|
|
3557
3843
|
function Circle({ size }) {
|
|
3558
|
-
return /* @__PURE__ */
|
|
3844
|
+
return /* @__PURE__ */ jsx31(
|
|
3559
3845
|
Box2,
|
|
3560
3846
|
{
|
|
3561
3847
|
rounded: "circle",
|
|
@@ -3574,24 +3860,24 @@ function ContentSplitter({
|
|
|
3574
3860
|
const interleaved = items.flatMap((child, index) => {
|
|
3575
3861
|
const onlyOne = items.length === 1;
|
|
3576
3862
|
const isLast = index === items.length - 1;
|
|
3577
|
-
return isLast || onlyOne ? [child] : [child, /* @__PURE__ */
|
|
3863
|
+
return isLast || onlyOne ? [child] : [child, /* @__PURE__ */ jsx31(Circle, { size }, `split-${index}`)];
|
|
3578
3864
|
});
|
|
3579
3865
|
const Wrapper = align === "horizontal" ? Inline2 : Stack2;
|
|
3580
|
-
return /* @__PURE__ */
|
|
3866
|
+
return /* @__PURE__ */ jsx31(Wrapper, { gap, alignItems: "center", justifyContent: "center", children: interleaved });
|
|
3581
3867
|
}
|
|
3582
3868
|
|
|
3583
3869
|
// src/components/Image/Image.tsx
|
|
3584
|
-
import { forwardRef as
|
|
3870
|
+
import { forwardRef as forwardRef25, useState as useState3, useCallback as useCallback3 } from "react";
|
|
3585
3871
|
|
|
3586
3872
|
// src/components/Image/image.css.ts
|
|
3587
|
-
import { createRuntimeFn as
|
|
3873
|
+
import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3588
3874
|
var imageContainerStyles = "image_imageContainerStyles__1hj4ov10";
|
|
3589
|
-
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"]] });
|
|
3590
3876
|
var placeholderStyles = "image_placeholderStyles__1hj4ov19";
|
|
3591
3877
|
|
|
3592
3878
|
// src/components/Image/Image.tsx
|
|
3593
|
-
import { jsx as
|
|
3594
|
-
var Image3 =
|
|
3879
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3880
|
+
var Image3 = forwardRef25(function Image4({
|
|
3595
3881
|
src,
|
|
3596
3882
|
alt,
|
|
3597
3883
|
objectFit = "cover",
|
|
@@ -3625,7 +3911,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3625
3911
|
const showPlaceholder = imageState === "loading" && placeholder;
|
|
3626
3912
|
const showFallback = imageState === "error" && fallback;
|
|
3627
3913
|
const showImage = imageState !== "error";
|
|
3628
|
-
return /* @__PURE__ */
|
|
3914
|
+
return /* @__PURE__ */ jsxs21(
|
|
3629
3915
|
Box2,
|
|
3630
3916
|
{
|
|
3631
3917
|
ref,
|
|
@@ -3639,7 +3925,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3639
3925
|
},
|
|
3640
3926
|
...restProps,
|
|
3641
3927
|
children: [
|
|
3642
|
-
showPlaceholder && /* @__PURE__ */
|
|
3928
|
+
showPlaceholder && /* @__PURE__ */ jsx32(
|
|
3643
3929
|
Box2,
|
|
3644
3930
|
{
|
|
3645
3931
|
className: placeholderStyles,
|
|
@@ -3651,7 +3937,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3651
3937
|
children: placeholder
|
|
3652
3938
|
}
|
|
3653
3939
|
),
|
|
3654
|
-
showFallback && /* @__PURE__ */
|
|
3940
|
+
showFallback && /* @__PURE__ */ jsx32(
|
|
3655
3941
|
Box2,
|
|
3656
3942
|
{
|
|
3657
3943
|
position: "absolute",
|
|
@@ -3662,7 +3948,7 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3662
3948
|
children: fallback
|
|
3663
3949
|
}
|
|
3664
3950
|
),
|
|
3665
|
-
showImage && /* @__PURE__ */
|
|
3951
|
+
showImage && /* @__PURE__ */ jsx32(
|
|
3666
3952
|
Box2,
|
|
3667
3953
|
{
|
|
3668
3954
|
as: "img",
|
|
@@ -3695,12 +3981,12 @@ var Image3 = forwardRef24(function Image4({
|
|
|
3695
3981
|
Image3.displayName = "Image";
|
|
3696
3982
|
|
|
3697
3983
|
// src/components/FileUpload/FileUpload.tsx
|
|
3698
|
-
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";
|
|
3699
3985
|
|
|
3700
3986
|
// src/components/FileUpload/fileUpload.css.ts
|
|
3701
|
-
import { createRuntimeFn as
|
|
3987
|
+
import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3702
3988
|
var chooseFileLink = "fileUpload_chooseFileLink__1nxjf87a";
|
|
3703
|
-
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"]] });
|
|
3704
3990
|
var fileItem = "fileUpload_fileItem__1nxjf87c";
|
|
3705
3991
|
var fileList = "fileUpload_fileList__1nxjf87b";
|
|
3706
3992
|
var fileMeta = "fileUpload_fileMeta__1nxjf87d";
|
|
@@ -3713,8 +3999,8 @@ var previewImage = "fileUpload_previewImage__1nxjf87h";
|
|
|
3713
3999
|
var uploaderContainer = "fileUpload_uploaderContainer__1nxjf870";
|
|
3714
4000
|
|
|
3715
4001
|
// src/components/FileUpload/FileUpload.tsx
|
|
3716
|
-
import { jsx as
|
|
3717
|
-
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(
|
|
3718
4004
|
"svg",
|
|
3719
4005
|
{
|
|
3720
4006
|
width: size,
|
|
@@ -3722,7 +4008,7 @@ var UploadCloudIcon = ({ size = "24", color = "currentColor" }) => /* @__PURE__
|
|
|
3722
4008
|
viewBox: "0 0 24 24",
|
|
3723
4009
|
fill: "none",
|
|
3724
4010
|
stroke: "none",
|
|
3725
|
-
children: /* @__PURE__ */
|
|
4011
|
+
children: /* @__PURE__ */ jsx33(
|
|
3726
4012
|
"path",
|
|
3727
4013
|
{
|
|
3728
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",
|
|
@@ -3731,14 +4017,14 @@ var UploadCloudIcon = ({ size = "24", color = "currentColor" }) => /* @__PURE__
|
|
|
3731
4017
|
)
|
|
3732
4018
|
}
|
|
3733
4019
|
);
|
|
3734
|
-
var CloseIcon5 = ({ size = "16", color = "currentColor" }) => /* @__PURE__ */
|
|
4020
|
+
var CloseIcon5 = ({ size = "16", color = "currentColor" }) => /* @__PURE__ */ jsx33(
|
|
3735
4021
|
"svg",
|
|
3736
4022
|
{
|
|
3737
4023
|
width: size,
|
|
3738
4024
|
height: size,
|
|
3739
4025
|
viewBox: "0 0 12 12",
|
|
3740
4026
|
fill: "none",
|
|
3741
|
-
children: /* @__PURE__ */
|
|
4027
|
+
children: /* @__PURE__ */ jsx33(
|
|
3742
4028
|
"path",
|
|
3743
4029
|
{
|
|
3744
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",
|
|
@@ -3793,10 +4079,10 @@ function FileUpload({
|
|
|
3793
4079
|
className
|
|
3794
4080
|
}) {
|
|
3795
4081
|
const inputId = useId2();
|
|
3796
|
-
const inputRef =
|
|
3797
|
-
const dragCounterRef =
|
|
4082
|
+
const inputRef = useRef3(null);
|
|
4083
|
+
const dragCounterRef = useRef3(0);
|
|
3798
4084
|
const [isDragging, setIsDragging] = useState4(false);
|
|
3799
|
-
const resolvedFiles =
|
|
4085
|
+
const resolvedFiles = useMemo4(() => {
|
|
3800
4086
|
return files.map((file) => ({
|
|
3801
4087
|
...file,
|
|
3802
4088
|
extension: file.extension ?? getExtension(file.name),
|
|
@@ -3877,12 +4163,12 @@ function FileUpload({
|
|
|
3877
4163
|
state: isDragging ? "dragging" : "default",
|
|
3878
4164
|
disabled
|
|
3879
4165
|
});
|
|
3880
|
-
return /* @__PURE__ */
|
|
3881
|
-
(title || description) && /* @__PURE__ */
|
|
3882
|
-
title ? /* @__PURE__ */
|
|
3883
|
-
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
|
|
3884
4170
|
] }),
|
|
3885
|
-
/* @__PURE__ */
|
|
4171
|
+
/* @__PURE__ */ jsx33(
|
|
3886
4172
|
Box2,
|
|
3887
4173
|
{
|
|
3888
4174
|
as: "div",
|
|
@@ -3896,11 +4182,11 @@ function FileUpload({
|
|
|
3896
4182
|
onDragLeave: handleDragLeave,
|
|
3897
4183
|
onDragOver: handleDragOver,
|
|
3898
4184
|
onDrop: handleDrop,
|
|
3899
|
-
children: variant === "compact" ? /* @__PURE__ */
|
|
3900
|
-
/* @__PURE__ */
|
|
3901
|
-
/* @__PURE__ */
|
|
3902
|
-
/* @__PURE__ */
|
|
3903
|
-
/* @__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(
|
|
3904
4190
|
"button",
|
|
3905
4191
|
{
|
|
3906
4192
|
type: "button",
|
|
@@ -3914,14 +4200,14 @@ function FileUpload({
|
|
|
3914
4200
|
}
|
|
3915
4201
|
)
|
|
3916
4202
|
] })
|
|
3917
|
-
] }) : /* @__PURE__ */
|
|
3918
|
-
/* @__PURE__ */
|
|
3919
|
-
/* @__PURE__ */
|
|
3920
|
-
/* @__PURE__ */
|
|
3921
|
-
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
|
|
3922
4208
|
] }),
|
|
3923
|
-
/* @__PURE__ */
|
|
3924
|
-
/* @__PURE__ */
|
|
4209
|
+
/* @__PURE__ */ jsxs22(Stack2, { gap: "2xs", alignItems: "center", children: [
|
|
4210
|
+
/* @__PURE__ */ jsx33(
|
|
3925
4211
|
Button,
|
|
3926
4212
|
{
|
|
3927
4213
|
type: "button",
|
|
@@ -3934,12 +4220,12 @@ function FileUpload({
|
|
|
3934
4220
|
children: buttonLabel
|
|
3935
4221
|
}
|
|
3936
4222
|
),
|
|
3937
|
-
maxSizeLabel ? /* @__PURE__ */
|
|
4223
|
+
maxSizeLabel ? /* @__PURE__ */ jsx33(Text2, { fontVariant: "text-xs-regular", color: "contentQuaternary", children: maxSizeLabel }) : null
|
|
3938
4224
|
] })
|
|
3939
4225
|
] })
|
|
3940
4226
|
}
|
|
3941
4227
|
),
|
|
3942
|
-
variant === "compact" && (supportedText || maxSizeLabel) ? /* @__PURE__ */
|
|
4228
|
+
variant === "compact" && (supportedText || maxSizeLabel) ? /* @__PURE__ */ jsxs22(
|
|
3943
4229
|
Inline2,
|
|
3944
4230
|
{
|
|
3945
4231
|
alignItems: "center",
|
|
@@ -3948,41 +4234,41 @@ function FileUpload({
|
|
|
3948
4234
|
wrap: true,
|
|
3949
4235
|
gap: "xs",
|
|
3950
4236
|
children: [
|
|
3951
|
-
supportedText ? /* @__PURE__ */
|
|
3952
|
-
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
|
|
3953
4239
|
]
|
|
3954
4240
|
}
|
|
3955
4241
|
) : null,
|
|
3956
|
-
helperText ? /* @__PURE__ */
|
|
3957
|
-
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) => {
|
|
3958
4244
|
const previewLabel = getPreviewLabel(file);
|
|
3959
|
-
return /* @__PURE__ */
|
|
3960
|
-
/* @__PURE__ */
|
|
3961
|
-
/* @__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(
|
|
3962
4248
|
"img",
|
|
3963
4249
|
{
|
|
3964
4250
|
src: file.previewUrl,
|
|
3965
4251
|
alt: `${file.name} preview`,
|
|
3966
4252
|
className: previewImage
|
|
3967
4253
|
}
|
|
3968
|
-
) : /* @__PURE__ */
|
|
3969
|
-
/* @__PURE__ */
|
|
3970
|
-
/* @__PURE__ */
|
|
3971
|
-
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
|
|
3972
4258
|
] })
|
|
3973
4259
|
] }),
|
|
3974
|
-
onRemoveFile ? /* @__PURE__ */
|
|
4260
|
+
onRemoveFile ? /* @__PURE__ */ jsx33(
|
|
3975
4261
|
IconButton,
|
|
3976
4262
|
{
|
|
3977
4263
|
size: "sm",
|
|
3978
4264
|
"aria-label": `Remove ${file.name}`,
|
|
3979
4265
|
onClick: () => onRemoveFile(file.id),
|
|
3980
|
-
children: /* @__PURE__ */
|
|
4266
|
+
children: /* @__PURE__ */ jsx33(CloseIcon5, { size: "16", color: "var(--zen-color-content-secondary)" })
|
|
3981
4267
|
}
|
|
3982
4268
|
) : null
|
|
3983
4269
|
] }, file.id);
|
|
3984
4270
|
}) }) : null,
|
|
3985
|
-
/* @__PURE__ */
|
|
4271
|
+
/* @__PURE__ */ jsx33(
|
|
3986
4272
|
"input",
|
|
3987
4273
|
{
|
|
3988
4274
|
ref: inputRef,
|
|
@@ -4021,7 +4307,7 @@ var toneStyles = { "default": "datePicker_toneStyles_default__1cnp4rt1", outside
|
|
|
4021
4307
|
var unavailableMark = "datePicker_unavailableMark__1cnp4rth";
|
|
4022
4308
|
|
|
4023
4309
|
// src/components/DatePicker/CalendarArrowButton.tsx
|
|
4024
|
-
import { jsx as
|
|
4310
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4025
4311
|
var CalendarArrowButton = ({
|
|
4026
4312
|
direction,
|
|
4027
4313
|
disabled = false,
|
|
@@ -4030,7 +4316,7 @@ var CalendarArrowButton = ({
|
|
|
4030
4316
|
}) => {
|
|
4031
4317
|
const Icon3 = direction === "previous" ? Icon_exports.ChevronLeftIcon : Icon_exports.ChevronRightIcon;
|
|
4032
4318
|
const label = direction === "previous" ? "Previous" : "Next";
|
|
4033
|
-
return /* @__PURE__ */
|
|
4319
|
+
return /* @__PURE__ */ jsx34(
|
|
4034
4320
|
"button",
|
|
4035
4321
|
{
|
|
4036
4322
|
type: "button",
|
|
@@ -4040,17 +4326,17 @@ var CalendarArrowButton = ({
|
|
|
4040
4326
|
"data-disabled": disabled || void 0,
|
|
4041
4327
|
className: cn(baseArrowButton, className),
|
|
4042
4328
|
onClick,
|
|
4043
|
-
children: /* @__PURE__ */
|
|
4329
|
+
children: /* @__PURE__ */ jsx34(Icon3, { size: "16" })
|
|
4044
4330
|
}
|
|
4045
4331
|
);
|
|
4046
4332
|
};
|
|
4047
4333
|
CalendarArrowButton.displayName = "CalendarArrowButton";
|
|
4048
4334
|
|
|
4049
4335
|
// src/components/DatePicker/CalendarGrid.tsx
|
|
4050
|
-
import { useMemo as
|
|
4336
|
+
import { useMemo as useMemo5 } from "react";
|
|
4051
4337
|
|
|
4052
4338
|
// src/components/DatePicker/CalendarDateButton.tsx
|
|
4053
|
-
import { jsx as
|
|
4339
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4054
4340
|
var CalendarDateButton = ({
|
|
4055
4341
|
label,
|
|
4056
4342
|
selection = "none",
|
|
@@ -4067,7 +4353,7 @@ var CalendarDateButton = ({
|
|
|
4067
4353
|
const isPressed = selection !== "none";
|
|
4068
4354
|
const isRangeEndpoint = selection === "selected" || selection === "start" || selection === "end";
|
|
4069
4355
|
const hasEdgeRadius = isRangeEndpoint || selection === "inRange";
|
|
4070
|
-
return /* @__PURE__ */
|
|
4356
|
+
return /* @__PURE__ */ jsx35(
|
|
4071
4357
|
"button",
|
|
4072
4358
|
{
|
|
4073
4359
|
type: "button",
|
|
@@ -4087,7 +4373,7 @@ var CalendarDateButton = ({
|
|
|
4087
4373
|
hasEdgeRadius && edgeRadiusStyles[edgeRadius],
|
|
4088
4374
|
className
|
|
4089
4375
|
),
|
|
4090
|
-
children: /* @__PURE__ */
|
|
4376
|
+
children: /* @__PURE__ */ jsx35("span", { className: cn(dateButtonContent, isUnavailable && unavailableMark), children: label })
|
|
4091
4377
|
}
|
|
4092
4378
|
);
|
|
4093
4379
|
};
|
|
@@ -4173,7 +4459,7 @@ var parseInputDate = (value) => {
|
|
|
4173
4459
|
};
|
|
4174
4460
|
|
|
4175
4461
|
// src/components/DatePicker/CalendarGrid.tsx
|
|
4176
|
-
import { Fragment, jsx as
|
|
4462
|
+
import { Fragment, jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4177
4463
|
var CALENDAR_ROWS = 5;
|
|
4178
4464
|
var CALENDAR_CELLS = CALENDAR_ROWS * 7;
|
|
4179
4465
|
var useCalendarDays = ({
|
|
@@ -4187,7 +4473,7 @@ var useCalendarDays = ({
|
|
|
4187
4473
|
maxDate,
|
|
4188
4474
|
unavailableDates = []
|
|
4189
4475
|
}) => {
|
|
4190
|
-
return
|
|
4476
|
+
return useMemo5(() => {
|
|
4191
4477
|
const days = [];
|
|
4192
4478
|
const firstDayOfMonth = new Date(year, month, 1);
|
|
4193
4479
|
const startDate = new Date(firstDayOfMonth);
|
|
@@ -4284,8 +4570,8 @@ var CalendarGrid = ({
|
|
|
4284
4570
|
if (day.isDisabled || day.isUnavailable) return;
|
|
4285
4571
|
onDateSelect?.(day.date);
|
|
4286
4572
|
};
|
|
4287
|
-
return /* @__PURE__ */
|
|
4288
|
-
/* @__PURE__ */
|
|
4573
|
+
return /* @__PURE__ */ jsxs23(Fragment, { children: [
|
|
4574
|
+
/* @__PURE__ */ jsx36(Box2, { className: calendarWeekdaysRow, children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx36(
|
|
4289
4575
|
Text2,
|
|
4290
4576
|
{
|
|
4291
4577
|
as: "span",
|
|
@@ -4296,9 +4582,9 @@ var CalendarGrid = ({
|
|
|
4296
4582
|
},
|
|
4297
4583
|
day
|
|
4298
4584
|
)) }),
|
|
4299
|
-
/* @__PURE__ */
|
|
4585
|
+
/* @__PURE__ */ jsx36(Box2, { className: calendarDaysGrid, children: calendarDays.map((day, index) => {
|
|
4300
4586
|
if (day.isOutsideMonth && !showOutsideDays) {
|
|
4301
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ jsx36(
|
|
4302
4588
|
CalendarDateButton,
|
|
4303
4589
|
{
|
|
4304
4590
|
label: "",
|
|
@@ -4335,7 +4621,7 @@ var CalendarGrid = ({
|
|
|
4335
4621
|
if (selection === "end" && prevInRange && columnIndex > 0) {
|
|
4336
4622
|
rangeExtends = "left";
|
|
4337
4623
|
}
|
|
4338
|
-
return /* @__PURE__ */
|
|
4624
|
+
return /* @__PURE__ */ jsx36(
|
|
4339
4625
|
CalendarDateButton,
|
|
4340
4626
|
{
|
|
4341
4627
|
label: day.day,
|
|
@@ -4355,7 +4641,7 @@ var CalendarGrid = ({
|
|
|
4355
4641
|
CalendarGrid.displayName = "CalendarGrid";
|
|
4356
4642
|
|
|
4357
4643
|
// src/components/DatePicker/Calendar.tsx
|
|
4358
|
-
import { jsx as
|
|
4644
|
+
import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4359
4645
|
var Calendar = ({
|
|
4360
4646
|
month,
|
|
4361
4647
|
year,
|
|
@@ -4374,9 +4660,9 @@ var Calendar = ({
|
|
|
4374
4660
|
showOutsideDays = true,
|
|
4375
4661
|
className
|
|
4376
4662
|
}) => {
|
|
4377
|
-
return /* @__PURE__ */
|
|
4378
|
-
/* @__PURE__ */
|
|
4379
|
-
/* @__PURE__ */
|
|
4663
|
+
return /* @__PURE__ */ jsxs24(Box2, { className: cn(calendarContainer, className), children: [
|
|
4664
|
+
/* @__PURE__ */ jsxs24(Box2, { className: calendarHeader, children: [
|
|
4665
|
+
/* @__PURE__ */ jsx37(
|
|
4380
4666
|
CalendarArrowButton,
|
|
4381
4667
|
{
|
|
4382
4668
|
direction: "previous",
|
|
@@ -4384,7 +4670,7 @@ var Calendar = ({
|
|
|
4384
4670
|
disabled: previousMonthDisabled
|
|
4385
4671
|
}
|
|
4386
4672
|
),
|
|
4387
|
-
/* @__PURE__ */
|
|
4673
|
+
/* @__PURE__ */ jsxs24(
|
|
4388
4674
|
Text2,
|
|
4389
4675
|
{
|
|
4390
4676
|
as: "span",
|
|
@@ -4397,7 +4683,7 @@ var Calendar = ({
|
|
|
4397
4683
|
]
|
|
4398
4684
|
}
|
|
4399
4685
|
),
|
|
4400
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsx37(
|
|
4401
4687
|
CalendarArrowButton,
|
|
4402
4688
|
{
|
|
4403
4689
|
direction: "next",
|
|
@@ -4406,7 +4692,7 @@ var Calendar = ({
|
|
|
4406
4692
|
}
|
|
4407
4693
|
)
|
|
4408
4694
|
] }),
|
|
4409
|
-
/* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsx37(
|
|
4410
4696
|
CalendarGrid,
|
|
4411
4697
|
{
|
|
4412
4698
|
month,
|
|
@@ -4428,36 +4714,35 @@ Calendar.displayName = "Calendar";
|
|
|
4428
4714
|
|
|
4429
4715
|
// src/components/TimePicker/TimePicker.tsx
|
|
4430
4716
|
import {
|
|
4431
|
-
forwardRef as
|
|
4717
|
+
forwardRef as forwardRef26,
|
|
4432
4718
|
useCallback as useCallback5,
|
|
4433
4719
|
useEffect as useEffect3,
|
|
4434
|
-
useMemo as
|
|
4435
|
-
useRef as
|
|
4720
|
+
useMemo as useMemo6,
|
|
4721
|
+
useRef as useRef4,
|
|
4436
4722
|
useState as useState5
|
|
4437
4723
|
} from "react";
|
|
4438
4724
|
|
|
4439
4725
|
// src/components/TimePicker/timePicker.css.ts
|
|
4440
|
-
import { createRuntimeFn as
|
|
4726
|
+
import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4441
4727
|
var columnLabel = "timePicker_columnLabel__1trbi7d4";
|
|
4442
4728
|
var columnSeparator = "timePicker_columnSeparator__1trbi7dh";
|
|
4443
|
-
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: [] });
|
|
4444
4730
|
var periodColumn = "timePicker_periodColumn__1trbi7df";
|
|
4445
4731
|
var periodLabel = "timePicker_periodLabel__1trbi7dg";
|
|
4446
4732
|
var presetButton = "timePicker_presetButton__1trbi7dj";
|
|
4447
|
-
var
|
|
4448
|
-
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: [] });
|
|
4449
4734
|
var timeColumn = "timePicker_timeColumn__1trbi7d3";
|
|
4450
4735
|
var timeDisplayPlaceholder = "timePicker_timeDisplayPlaceholder__1trbi7dp";
|
|
4451
4736
|
var timeDisplayText = "timePicker_timeDisplayText__1trbi7do";
|
|
4452
4737
|
var timeIconContainer = "timePicker_timeIconContainer__1trbi7dq";
|
|
4453
|
-
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: [] });
|
|
4454
4739
|
var timePickerContainer = "timePicker_timePickerContainer__1trbi7d0";
|
|
4455
4740
|
var timePickerFooter = "timePicker_timePickerFooter__1trbi7dr";
|
|
4456
4741
|
var timePickerHeader = "timePicker_timePickerHeader__1trbi7d1";
|
|
4457
4742
|
var timeScrollContainer = "timePicker_timeScrollContainer__1trbi7d5";
|
|
4458
4743
|
|
|
4459
4744
|
// src/components/TimePicker/TimePicker.tsx
|
|
4460
|
-
import { Fragment as Fragment2, jsx as
|
|
4745
|
+
import { Fragment as Fragment2, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4461
4746
|
var DEFAULT_PRESETS = [
|
|
4462
4747
|
{ label: "Now", time: { hours: -1, minutes: -1 } },
|
|
4463
4748
|
// Special marker for "now"
|
|
@@ -4503,7 +4788,7 @@ var isTimeDisabled = (time, minTime, maxTime) => {
|
|
|
4503
4788
|
}
|
|
4504
4789
|
return false;
|
|
4505
4790
|
};
|
|
4506
|
-
var TimePicker =
|
|
4791
|
+
var TimePicker = forwardRef26(
|
|
4507
4792
|
function TimePicker2(props, ref) {
|
|
4508
4793
|
const {
|
|
4509
4794
|
value,
|
|
@@ -4537,9 +4822,9 @@ var TimePicker = forwardRef25(
|
|
|
4537
4822
|
}
|
|
4538
4823
|
return "AM";
|
|
4539
4824
|
});
|
|
4540
|
-
const hoursRef =
|
|
4541
|
-
const minutesRef =
|
|
4542
|
-
const secondsRef =
|
|
4825
|
+
const hoursRef = useRef4(null);
|
|
4826
|
+
const minutesRef = useRef4(null);
|
|
4827
|
+
const secondsRef = useRef4(null);
|
|
4543
4828
|
useEffect3(() => {
|
|
4544
4829
|
if (value !== void 0) {
|
|
4545
4830
|
setSelectedTime(value);
|
|
@@ -4548,19 +4833,19 @@ var TimePicker = forwardRef25(
|
|
|
4548
4833
|
}
|
|
4549
4834
|
}
|
|
4550
4835
|
}, [value]);
|
|
4551
|
-
const hoursArray =
|
|
4836
|
+
const hoursArray = useMemo6(() => {
|
|
4552
4837
|
if (format === "12h") {
|
|
4553
4838
|
return Array.from({ length: 12 }, (_, i) => i + 1);
|
|
4554
4839
|
}
|
|
4555
4840
|
return Array.from({ length: 24 }, (_, i) => i);
|
|
4556
4841
|
}, [format]);
|
|
4557
|
-
const minutesArray =
|
|
4842
|
+
const minutesArray = useMemo6(() => {
|
|
4558
4843
|
return Array.from(
|
|
4559
4844
|
{ length: Math.ceil(60 / minuteStep) },
|
|
4560
4845
|
(_, i) => i * minuteStep
|
|
4561
4846
|
);
|
|
4562
4847
|
}, [minuteStep]);
|
|
4563
|
-
const secondsArray =
|
|
4848
|
+
const secondsArray = useMemo6(() => {
|
|
4564
4849
|
return Array.from({ length: 60 }, (_, i) => i);
|
|
4565
4850
|
}, []);
|
|
4566
4851
|
const getDisplayHours = useCallback5(
|
|
@@ -4679,13 +4964,13 @@ var TimePicker = forwardRef25(
|
|
|
4679
4964
|
}, 0);
|
|
4680
4965
|
}
|
|
4681
4966
|
}, [open, selectedTime, format, getDisplayHours, minuteStep, showSeconds]);
|
|
4682
|
-
const displayValue =
|
|
4967
|
+
const displayValue = useMemo6(() => {
|
|
4683
4968
|
return formatTime(selectedTime, format, showSeconds);
|
|
4684
4969
|
}, [selectedTime, format, showSeconds]);
|
|
4685
4970
|
const renderTriggerElement = () => {
|
|
4686
4971
|
if (renderTrigger) return renderTrigger(displayValue || placeholder);
|
|
4687
4972
|
if (trigger) return trigger;
|
|
4688
|
-
return /* @__PURE__ */
|
|
4973
|
+
return /* @__PURE__ */ jsxs25(
|
|
4689
4974
|
Box2,
|
|
4690
4975
|
{
|
|
4691
4976
|
ref,
|
|
@@ -4698,24 +4983,24 @@ var TimePicker = forwardRef25(
|
|
|
4698
4983
|
"aria-expanded": open,
|
|
4699
4984
|
"aria-disabled": disabled,
|
|
4700
4985
|
children: [
|
|
4701
|
-
displayValue ? /* @__PURE__ */
|
|
4702
|
-
/* @__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" }) })
|
|
4703
4988
|
]
|
|
4704
4989
|
}
|
|
4705
4990
|
);
|
|
4706
4991
|
};
|
|
4707
4992
|
const selectedDisplayHours = selectedTime ? getDisplayHours(selectedTime.hours) : null;
|
|
4708
|
-
return /* @__PURE__ */
|
|
4709
|
-
/* @__PURE__ */
|
|
4710
|
-
/* @__PURE__ */
|
|
4711
|
-
/* @__PURE__ */
|
|
4712
|
-
/* @__PURE__ */
|
|
4713
|
-
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 })
|
|
4714
4999
|
] }),
|
|
4715
|
-
/* @__PURE__ */
|
|
4716
|
-
/* @__PURE__ */
|
|
4717
|
-
/* @__PURE__ */
|
|
4718
|
-
/* @__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) => {
|
|
4719
5004
|
const isSelected = selectedDisplayHours === hour;
|
|
4720
5005
|
const hours24 = format === "12h" ? convertTo24Hour(hour, period) : hour;
|
|
4721
5006
|
const isDisabled = isTimeDisabled(
|
|
@@ -4723,7 +5008,7 @@ var TimePicker = forwardRef25(
|
|
|
4723
5008
|
minTime,
|
|
4724
5009
|
maxTime
|
|
4725
5010
|
);
|
|
4726
|
-
return /* @__PURE__ */
|
|
5011
|
+
return /* @__PURE__ */ jsx38(
|
|
4727
5012
|
"button",
|
|
4728
5013
|
{
|
|
4729
5014
|
type: "button",
|
|
@@ -4741,10 +5026,10 @@ var TimePicker = forwardRef25(
|
|
|
4741
5026
|
);
|
|
4742
5027
|
}) })
|
|
4743
5028
|
] }),
|
|
4744
|
-
/* @__PURE__ */
|
|
4745
|
-
/* @__PURE__ */
|
|
4746
|
-
/* @__PURE__ */
|
|
4747
|
-
/* @__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) => {
|
|
4748
5033
|
const isSelected = selectedTime?.minutes === minute;
|
|
4749
5034
|
const isDisabled = isTimeDisabled(
|
|
4750
5035
|
{
|
|
@@ -4754,7 +5039,7 @@ var TimePicker = forwardRef25(
|
|
|
4754
5039
|
minTime,
|
|
4755
5040
|
maxTime
|
|
4756
5041
|
);
|
|
4757
|
-
return /* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ jsx38(
|
|
4758
5043
|
"button",
|
|
4759
5044
|
{
|
|
4760
5045
|
type: "button",
|
|
@@ -4772,18 +5057,18 @@ var TimePicker = forwardRef25(
|
|
|
4772
5057
|
);
|
|
4773
5058
|
}) })
|
|
4774
5059
|
] }),
|
|
4775
|
-
showSeconds && /* @__PURE__ */
|
|
4776
|
-
/* @__PURE__ */
|
|
4777
|
-
/* @__PURE__ */
|
|
4778
|
-
/* @__PURE__ */
|
|
4779
|
-
/* @__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(
|
|
4780
5065
|
Box2,
|
|
4781
5066
|
{
|
|
4782
5067
|
ref: secondsRef,
|
|
4783
5068
|
className: timeScrollContainer,
|
|
4784
5069
|
children: secondsArray.map((second) => {
|
|
4785
5070
|
const isSelected = selectedTime?.seconds === second;
|
|
4786
|
-
return /* @__PURE__ */
|
|
5071
|
+
return /* @__PURE__ */ jsx38(
|
|
4787
5072
|
"button",
|
|
4788
5073
|
{
|
|
4789
5074
|
type: "button",
|
|
@@ -4802,10 +5087,10 @@ var TimePicker = forwardRef25(
|
|
|
4802
5087
|
)
|
|
4803
5088
|
] })
|
|
4804
5089
|
] }),
|
|
4805
|
-
format === "12h" && /* @__PURE__ */
|
|
4806
|
-
/* @__PURE__ */
|
|
4807
|
-
/* @__PURE__ */
|
|
4808
|
-
/* @__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(
|
|
4809
5094
|
"button",
|
|
4810
5095
|
{
|
|
4811
5096
|
type: "button",
|
|
@@ -4817,7 +5102,7 @@ var TimePicker = forwardRef25(
|
|
|
4817
5102
|
children: "AM"
|
|
4818
5103
|
}
|
|
4819
5104
|
),
|
|
4820
|
-
/* @__PURE__ */
|
|
5105
|
+
/* @__PURE__ */ jsx38(
|
|
4821
5106
|
"button",
|
|
4822
5107
|
{
|
|
4823
5108
|
type: "button",
|
|
@@ -4832,18 +5117,29 @@ var TimePicker = forwardRef25(
|
|
|
4832
5117
|
] })
|
|
4833
5118
|
] })
|
|
4834
5119
|
] }),
|
|
4835
|
-
showPresets && presets.length > 0 && /* @__PURE__ */
|
|
4836
|
-
|
|
5120
|
+
showPresets && presets.length > 0 && /* @__PURE__ */ jsx38(
|
|
5121
|
+
Inline2,
|
|
4837
5122
|
{
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
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(
|
|
4847
5143
|
Button,
|
|
4848
5144
|
{
|
|
4849
5145
|
variant: "ghost",
|
|
@@ -4853,7 +5149,7 @@ var TimePicker = forwardRef25(
|
|
|
4853
5149
|
children: "Cancel"
|
|
4854
5150
|
}
|
|
4855
5151
|
),
|
|
4856
|
-
/* @__PURE__ */
|
|
5152
|
+
/* @__PURE__ */ jsx38(Button, { size: "md", onClick: handleApply, disabled: !selectedTime, children: "Apply" })
|
|
4857
5153
|
] })
|
|
4858
5154
|
] }) })
|
|
4859
5155
|
] });
|
|
@@ -4862,13 +5158,13 @@ var TimePicker = forwardRef25(
|
|
|
4862
5158
|
TimePicker.displayName = "TimePicker";
|
|
4863
5159
|
|
|
4864
5160
|
// src/components/DateTimeInput/DateTimeInput.tsx
|
|
4865
|
-
import React23, { forwardRef as
|
|
5161
|
+
import React23, { forwardRef as forwardRef27, useCallback as useCallback6, useMemo as useMemo7, useState as useState6 } from "react";
|
|
4866
5162
|
|
|
4867
5163
|
// src/components/DateTimeInput/dateTimeInput.css.ts
|
|
4868
|
-
import { createRuntimeFn as
|
|
5164
|
+
import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
4869
5165
|
var clearButton = "dateTimeInput_clearButton__183d6ehd";
|
|
4870
|
-
var dateTimeFieldContainer =
|
|
4871
|
-
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: [] });
|
|
4872
5168
|
var dateTimeSegmentWithSeparator = "dateTimeInput_dateTimeSegmentWithSeparator__183d6eh9 dateTimeInput_dateTimeSegment__183d6eh8";
|
|
4873
5169
|
var inputWrapper2 = "dateTimeInput_inputWrapper__183d6eh3";
|
|
4874
5170
|
var segmentIcon = "dateTimeInput_segmentIcon__183d6ehc";
|
|
@@ -4877,7 +5173,7 @@ var segmentText = "dateTimeInput_segmentText__183d6eha";
|
|
|
4877
5173
|
var singleInputSegment = "dateTimeInput_singleInputSegment__183d6ehe";
|
|
4878
5174
|
|
|
4879
5175
|
// src/components/DateTimeInput/DateTimeInput.tsx
|
|
4880
|
-
import { Fragment as Fragment3, jsx as
|
|
5176
|
+
import { Fragment as Fragment3, jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4881
5177
|
var padZero2 = (num) => num.toString().padStart(2, "0");
|
|
4882
5178
|
var formatTimeDisplay = (time, format, showSeconds) => {
|
|
4883
5179
|
if (!time) return "";
|
|
@@ -4893,7 +5189,7 @@ var formatTimeDisplay = (time, format, showSeconds) => {
|
|
|
4893
5189
|
}
|
|
4894
5190
|
return parts.join(":") + period;
|
|
4895
5191
|
};
|
|
4896
|
-
var DateTimeInput =
|
|
5192
|
+
var DateTimeInput = forwardRef27(
|
|
4897
5193
|
function DateTimeInput2(props, ref) {
|
|
4898
5194
|
const {
|
|
4899
5195
|
mode = "datetime",
|
|
@@ -4916,12 +5212,12 @@ var DateTimeInput = forwardRef26(
|
|
|
4916
5212
|
showClear = true,
|
|
4917
5213
|
today: todayProp
|
|
4918
5214
|
} = props;
|
|
4919
|
-
const today =
|
|
4920
|
-
const derivedMinDate =
|
|
5215
|
+
const today = useMemo7(() => todayProp ?? /* @__PURE__ */ new Date(), [todayProp]);
|
|
5216
|
+
const derivedMinDate = useMemo7(
|
|
4921
5217
|
() => minDate ?? getDefaultMinDate(today),
|
|
4922
5218
|
[minDate, today]
|
|
4923
5219
|
);
|
|
4924
|
-
const derivedMaxDate =
|
|
5220
|
+
const derivedMaxDate = useMemo7(
|
|
4925
5221
|
() => maxDate ?? getDefaultMaxDate(today),
|
|
4926
5222
|
[maxDate, today]
|
|
4927
5223
|
);
|
|
@@ -5000,15 +5296,15 @@ var DateTimeInput = forwardRef26(
|
|
|
5000
5296
|
return newMonth;
|
|
5001
5297
|
});
|
|
5002
5298
|
}, [year]);
|
|
5003
|
-
const dateDisplayValue =
|
|
5299
|
+
const dateDisplayValue = useMemo7(() => {
|
|
5004
5300
|
return selectedDate ? formatDate(selectedDate) : null;
|
|
5005
5301
|
}, [selectedDate]);
|
|
5006
|
-
const timeDisplayValue =
|
|
5302
|
+
const timeDisplayValue = useMemo7(() => {
|
|
5007
5303
|
return formatTimeDisplay(selectedTime, timeFormat, showSeconds);
|
|
5008
5304
|
}, [selectedTime, timeFormat, showSeconds]);
|
|
5009
5305
|
const hasValue = mode === "date" && selectedDate || mode === "time" && selectedTime || mode === "datetime" && (selectedDate || selectedTime);
|
|
5010
|
-
const labelElement = label && /* @__PURE__ */
|
|
5011
|
-
/* @__PURE__ */
|
|
5306
|
+
const labelElement = label && /* @__PURE__ */ jsxs26(Inline2, { gap: "2xs", style: horizontal ? { padding: "9px 0px" } : void 0, children: [
|
|
5307
|
+
/* @__PURE__ */ jsx39(
|
|
5012
5308
|
Text2,
|
|
5013
5309
|
{
|
|
5014
5310
|
as: "label",
|
|
@@ -5018,10 +5314,10 @@ var DateTimeInput = forwardRef26(
|
|
|
5018
5314
|
children: label
|
|
5019
5315
|
}
|
|
5020
5316
|
),
|
|
5021
|
-
mandatory && /* @__PURE__ */
|
|
5317
|
+
mandatory && /* @__PURE__ */ jsx39(Text2, { fontVariant: "text-m-regular", color: "contentTertiary", as: "span", children: "*" })
|
|
5022
5318
|
] });
|
|
5023
|
-
const renderDateSegment = (withSeparator = false) => /* @__PURE__ */
|
|
5024
|
-
/* @__PURE__ */
|
|
5319
|
+
const renderDateSegment = (withSeparator = false) => /* @__PURE__ */ jsxs26(MenuRoot, { open: dateOpen, onOpenChange: setDateOpen, children: [
|
|
5320
|
+
/* @__PURE__ */ jsx39(MenuTrigger, { disabled, children: /* @__PURE__ */ jsxs26(
|
|
5025
5321
|
Box2,
|
|
5026
5322
|
{
|
|
5027
5323
|
className: withSeparator ? dateTimeSegmentWithSeparator : singleInputSegment,
|
|
@@ -5030,14 +5326,14 @@ var DateTimeInput = forwardRef26(
|
|
|
5030
5326
|
"aria-haspopup": "dialog",
|
|
5031
5327
|
"aria-expanded": dateOpen,
|
|
5032
5328
|
children: [
|
|
5033
|
-
/* @__PURE__ */
|
|
5034
|
-
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 })
|
|
5035
5331
|
]
|
|
5036
5332
|
}
|
|
5037
5333
|
) }),
|
|
5038
|
-
/* @__PURE__ */
|
|
5039
|
-
/* @__PURE__ */
|
|
5040
|
-
/* @__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(
|
|
5041
5337
|
Calendar,
|
|
5042
5338
|
{
|
|
5043
5339
|
month,
|
|
@@ -5053,8 +5349,8 @@ var DateTimeInput = forwardRef26(
|
|
|
5053
5349
|
)
|
|
5054
5350
|
] }) })
|
|
5055
5351
|
] });
|
|
5056
|
-
const renderTimeSegment = () => /* @__PURE__ */
|
|
5057
|
-
/* @__PURE__ */
|
|
5352
|
+
const renderTimeSegment = () => /* @__PURE__ */ jsxs26(MenuRoot, { open: timeOpen, onOpenChange: setTimeOpen, children: [
|
|
5353
|
+
/* @__PURE__ */ jsx39(MenuTrigger, { disabled, children: /* @__PURE__ */ jsxs26(
|
|
5058
5354
|
Box2,
|
|
5059
5355
|
{
|
|
5060
5356
|
className: singleInputSegment,
|
|
@@ -5063,12 +5359,12 @@ var DateTimeInput = forwardRef26(
|
|
|
5063
5359
|
"aria-haspopup": "dialog",
|
|
5064
5360
|
"aria-expanded": timeOpen,
|
|
5065
5361
|
children: [
|
|
5066
|
-
/* @__PURE__ */
|
|
5067
|
-
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 })
|
|
5068
5364
|
]
|
|
5069
5365
|
}
|
|
5070
5366
|
) }),
|
|
5071
|
-
/* @__PURE__ */
|
|
5367
|
+
/* @__PURE__ */ jsx39(MenuContent, { padding: "none", sideOffset: 8, align: "start", children: /* @__PURE__ */ jsx39(
|
|
5072
5368
|
TimePickerContent,
|
|
5073
5369
|
{
|
|
5074
5370
|
value: selectedTime,
|
|
@@ -5082,8 +5378,8 @@ var DateTimeInput = forwardRef26(
|
|
|
5082
5378
|
}
|
|
5083
5379
|
) })
|
|
5084
5380
|
] });
|
|
5085
|
-
const inputElement2 = /* @__PURE__ */
|
|
5086
|
-
/* @__PURE__ */
|
|
5381
|
+
const inputElement2 = /* @__PURE__ */ jsxs26(Box2, { className: inputWrapper2, children: [
|
|
5382
|
+
/* @__PURE__ */ jsxs26(
|
|
5087
5383
|
Box2,
|
|
5088
5384
|
{
|
|
5089
5385
|
ref,
|
|
@@ -5094,24 +5390,24 @@ var DateTimeInput = forwardRef26(
|
|
|
5094
5390
|
children: [
|
|
5095
5391
|
mode === "date" && renderDateSegment(false),
|
|
5096
5392
|
mode === "time" && renderTimeSegment(),
|
|
5097
|
-
mode === "datetime" && /* @__PURE__ */
|
|
5393
|
+
mode === "datetime" && /* @__PURE__ */ jsxs26(Fragment3, { children: [
|
|
5098
5394
|
renderDateSegment(true),
|
|
5099
5395
|
renderTimeSegment()
|
|
5100
5396
|
] }),
|
|
5101
|
-
showClear && hasValue && !disabled && /* @__PURE__ */
|
|
5397
|
+
showClear && hasValue && !disabled && /* @__PURE__ */ jsx39(
|
|
5102
5398
|
"button",
|
|
5103
5399
|
{
|
|
5104
5400
|
type: "button",
|
|
5105
5401
|
className: clearButton,
|
|
5106
5402
|
onClick: handleClear,
|
|
5107
5403
|
"aria-label": "Clear",
|
|
5108
|
-
children: /* @__PURE__ */
|
|
5404
|
+
children: /* @__PURE__ */ jsx39(Icon_exports.CloseIcon, { size: "16" })
|
|
5109
5405
|
}
|
|
5110
5406
|
)
|
|
5111
5407
|
]
|
|
5112
5408
|
}
|
|
5113
5409
|
),
|
|
5114
|
-
displayHelperText && /* @__PURE__ */
|
|
5410
|
+
displayHelperText && /* @__PURE__ */ jsx39(
|
|
5115
5411
|
Text2,
|
|
5116
5412
|
{
|
|
5117
5413
|
id: helperTextId,
|
|
@@ -5122,7 +5418,7 @@ var DateTimeInput = forwardRef26(
|
|
|
5122
5418
|
}
|
|
5123
5419
|
)
|
|
5124
5420
|
] });
|
|
5125
|
-
return /* @__PURE__ */
|
|
5421
|
+
return /* @__PURE__ */ jsxs26(
|
|
5126
5422
|
Box2,
|
|
5127
5423
|
{
|
|
5128
5424
|
className: dateTimeInputContainer({
|
|
@@ -5151,16 +5447,16 @@ var TimePickerContent = ({
|
|
|
5151
5447
|
}
|
|
5152
5448
|
return "AM";
|
|
5153
5449
|
});
|
|
5154
|
-
const hoursArray =
|
|
5450
|
+
const hoursArray = useMemo7(() => {
|
|
5155
5451
|
if (format === "12h") {
|
|
5156
5452
|
return Array.from({ length: 12 }, (_, i) => i + 1);
|
|
5157
5453
|
}
|
|
5158
5454
|
return Array.from({ length: 24 }, (_, i) => i);
|
|
5159
5455
|
}, [format]);
|
|
5160
|
-
const minutesArray =
|
|
5456
|
+
const minutesArray = useMemo7(() => {
|
|
5161
5457
|
return Array.from({ length: 60 }, (_, i) => i);
|
|
5162
5458
|
}, []);
|
|
5163
|
-
const secondsArray =
|
|
5459
|
+
const secondsArray = useMemo7(() => {
|
|
5164
5460
|
return Array.from({ length: 60 }, (_, i) => i);
|
|
5165
5461
|
}, []);
|
|
5166
5462
|
const pad = (num) => num.toString().padStart(2, "0");
|
|
@@ -5205,12 +5501,12 @@ var TimePickerContent = ({
|
|
|
5205
5501
|
}
|
|
5206
5502
|
};
|
|
5207
5503
|
const selectedDisplayHours = selectedTime ? getDisplayHours(selectedTime.hours) : null;
|
|
5208
|
-
return /* @__PURE__ */
|
|
5209
|
-
/* @__PURE__ */
|
|
5210
|
-
/* @__PURE__ */
|
|
5211
|
-
/* @__PURE__ */
|
|
5212
|
-
/* @__PURE__ */
|
|
5213
|
-
/* @__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(
|
|
5214
5510
|
"button",
|
|
5215
5511
|
{
|
|
5216
5512
|
type: "button",
|
|
@@ -5224,10 +5520,10 @@ var TimePickerContent = ({
|
|
|
5224
5520
|
hour
|
|
5225
5521
|
)) })
|
|
5226
5522
|
] }),
|
|
5227
|
-
/* @__PURE__ */
|
|
5228
|
-
/* @__PURE__ */
|
|
5229
|
-
/* @__PURE__ */
|
|
5230
|
-
/* @__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(
|
|
5231
5527
|
"button",
|
|
5232
5528
|
{
|
|
5233
5529
|
type: "button",
|
|
@@ -5241,11 +5537,11 @@ var TimePickerContent = ({
|
|
|
5241
5537
|
minute
|
|
5242
5538
|
)) })
|
|
5243
5539
|
] }),
|
|
5244
|
-
showSeconds && /* @__PURE__ */
|
|
5245
|
-
/* @__PURE__ */
|
|
5246
|
-
/* @__PURE__ */
|
|
5247
|
-
/* @__PURE__ */
|
|
5248
|
-
/* @__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(
|
|
5249
5545
|
"button",
|
|
5250
5546
|
{
|
|
5251
5547
|
type: "button",
|
|
@@ -5260,10 +5556,10 @@ var TimePickerContent = ({
|
|
|
5260
5556
|
)) })
|
|
5261
5557
|
] })
|
|
5262
5558
|
] }),
|
|
5263
|
-
format === "12h" && /* @__PURE__ */
|
|
5264
|
-
/* @__PURE__ */
|
|
5265
|
-
/* @__PURE__ */
|
|
5266
|
-
/* @__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(
|
|
5267
5563
|
"button",
|
|
5268
5564
|
{
|
|
5269
5565
|
type: "button",
|
|
@@ -5272,7 +5568,7 @@ var TimePickerContent = ({
|
|
|
5272
5568
|
children: "AM"
|
|
5273
5569
|
}
|
|
5274
5570
|
),
|
|
5275
|
-
/* @__PURE__ */
|
|
5571
|
+
/* @__PURE__ */ jsx39(
|
|
5276
5572
|
"button",
|
|
5277
5573
|
{
|
|
5278
5574
|
type: "button",
|
|
@@ -5284,9 +5580,9 @@ var TimePickerContent = ({
|
|
|
5284
5580
|
] })
|
|
5285
5581
|
] })
|
|
5286
5582
|
] }),
|
|
5287
|
-
/* @__PURE__ */
|
|
5288
|
-
/* @__PURE__ */
|
|
5289
|
-
/* @__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" })
|
|
5290
5586
|
] })
|
|
5291
5587
|
] });
|
|
5292
5588
|
};
|
|
@@ -5330,7 +5626,9 @@ export {
|
|
|
5330
5626
|
export_ArrowLeftIcon as ArrowLeftIcon,
|
|
5331
5627
|
export_ArrowRightIcon as ArrowRightIcon,
|
|
5332
5628
|
Avatar,
|
|
5629
|
+
AvatarGroup,
|
|
5333
5630
|
Badge,
|
|
5631
|
+
BadgeNumber,
|
|
5334
5632
|
Body,
|
|
5335
5633
|
Box2 as Box,
|
|
5336
5634
|
Breadcrumb,
|
|
@@ -5432,6 +5730,7 @@ export {
|
|
|
5432
5730
|
PopoverContent,
|
|
5433
5731
|
PopoverRoot,
|
|
5434
5732
|
PopoverTrigger,
|
|
5733
|
+
ProgressBar,
|
|
5435
5734
|
export_SearchIcon as SearchIcon,
|
|
5436
5735
|
Select,
|
|
5437
5736
|
SelectContent,
|