@umituz/atomic-next 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +82 -84
- package/dist/index.d.ts +82 -84
- package/dist/index.js +399 -537
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +399 -537
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -3
package/dist/index.js
CHANGED
|
@@ -39,12 +39,12 @@ var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
|
39
39
|
|
|
40
40
|
// src/tokens/colors/atomic-colors.ts
|
|
41
41
|
var colors = {
|
|
42
|
-
primary: "#
|
|
43
|
-
primaryLight: "#
|
|
44
|
-
primaryDark: "#
|
|
45
|
-
secondary: "#
|
|
46
|
-
secondaryLight: "#
|
|
47
|
-
secondaryDark: "#
|
|
42
|
+
primary: "#2563eb",
|
|
43
|
+
primaryLight: "#3b82f6",
|
|
44
|
+
primaryDark: "#1d4ed8",
|
|
45
|
+
secondary: "#0d9488",
|
|
46
|
+
secondaryLight: "#14b8a6",
|
|
47
|
+
secondaryDark: "#0f766e",
|
|
48
48
|
accent: "#F59E0B",
|
|
49
49
|
accentLight: "#FBBF24",
|
|
50
50
|
accentDark: "#D97706",
|
|
@@ -172,7 +172,15 @@ var AtomicSpacingCss = {
|
|
|
172
172
|
// src/tokens/typography/atomic-typography.ts
|
|
173
173
|
var typography = {
|
|
174
174
|
fontFamily: {
|
|
175
|
-
sans: [
|
|
175
|
+
sans: [
|
|
176
|
+
"Inter",
|
|
177
|
+
"system-ui",
|
|
178
|
+
"-apple-system",
|
|
179
|
+
"BlinkMacSystemFont",
|
|
180
|
+
"Segoe UI",
|
|
181
|
+
"Roboto",
|
|
182
|
+
"sans-serif"
|
|
183
|
+
],
|
|
176
184
|
serif: ["Charter", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
|
|
177
185
|
mono: ["JetBrains Mono", "Fira Code", "Consolas", "Monaco", "Courier New", "monospace"]
|
|
178
186
|
},
|
|
@@ -271,14 +279,14 @@ var AtomicShadows = {
|
|
|
271
279
|
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
272
280
|
xxl: "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
273
281
|
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
|
274
|
-
focusPrimary: "0 0 0 3px rgb(
|
|
275
|
-
focusSecondary: "0 0 0 3px rgb(
|
|
282
|
+
focusPrimary: "0 0 0 3px rgb(37 99 235 / 0.2)",
|
|
283
|
+
focusSecondary: "0 0 0 3px rgb(13 148 136 / 0.2)",
|
|
276
284
|
focusSuccess: "0 0 0 3px rgb(16 185 129 / 0.2)",
|
|
277
285
|
focusWarning: "0 0 0 3px rgb(245 158 11 / 0.2)",
|
|
278
286
|
focusError: "0 0 0 3px rgb(239 68 68 / 0.2)",
|
|
279
287
|
focusInfo: "0 0 0 3px rgb(59 130 246 / 0.2)",
|
|
280
|
-
glowPrimary: "0 0 20px rgb(
|
|
281
|
-
glowSecondary: "0 0 20px rgb(
|
|
288
|
+
glowPrimary: "0 0 20px rgb(37 99 235 / 0.3)",
|
|
289
|
+
glowSecondary: "0 0 20px rgb(13 148 136 / 0.3)",
|
|
282
290
|
glowSuccess: "0 0 20px rgb(16 185 129 / 0.3)",
|
|
283
291
|
glowWarning: "0 0 20px rgb(245 158 11 / 0.3)",
|
|
284
292
|
glowError: "0 0 20px rgb(239 68 68 / 0.3)",
|
|
@@ -300,10 +308,10 @@ var ShadowUtils = {
|
|
|
300
308
|
combine: (...shadows) => {
|
|
301
309
|
return shadows.map((shadow) => AtomicShadows[shadow]).join(", ");
|
|
302
310
|
},
|
|
303
|
-
focus: (color = "
|
|
311
|
+
focus: (color = "37 99 235", opacity = 0.2) => {
|
|
304
312
|
return `0 0 0 3px rgb(${color} / ${opacity})`;
|
|
305
313
|
},
|
|
306
|
-
glow: (size = 20, color = "
|
|
314
|
+
glow: (size = 20, color = "37 99 235", opacity = 0.3) => {
|
|
307
315
|
return `0 0 ${size}px rgb(${color} / ${opacity})`;
|
|
308
316
|
}
|
|
309
317
|
};
|
|
@@ -574,7 +582,7 @@ var AtomicAnimationPresets = {
|
|
|
574
582
|
duration: "normal",
|
|
575
583
|
easing: "smooth"
|
|
576
584
|
}),
|
|
577
|
-
transform: "translateY(
|
|
585
|
+
transform: "translateY(-100%)"
|
|
578
586
|
},
|
|
579
587
|
buttonHover: {
|
|
580
588
|
...AnimationUtils.transition({
|
|
@@ -855,11 +863,7 @@ var AtomicButton = React5__default.default.forwardRef(
|
|
|
855
863
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
856
864
|
Comp,
|
|
857
865
|
{
|
|
858
|
-
className: cn(
|
|
859
|
-
buttonVariants({ variant, size }),
|
|
860
|
-
fullWidth && "w-full",
|
|
861
|
-
className
|
|
862
|
-
),
|
|
866
|
+
className: cn(buttonVariants({ variant, size }), fullWidth && "w-full", className),
|
|
863
867
|
style: {
|
|
864
868
|
...variant === "brand" && {
|
|
865
869
|
background: "linear-gradient(to right, var(--atomic-primary), var(--atomic-secondary))"
|
|
@@ -880,17 +884,29 @@ var AtomicButton = React5__default.default.forwardRef(
|
|
|
880
884
|
)
|
|
881
885
|
}
|
|
882
886
|
),
|
|
883
|
-
!loading && leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
884
|
-
"
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
887
|
+
!loading && leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
888
|
+
"span",
|
|
889
|
+
{
|
|
890
|
+
className: cn(
|
|
891
|
+
"inline-flex items-center",
|
|
892
|
+
size === "sm" ? "mr-1" : "mr-2",
|
|
893
|
+
size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
|
|
894
|
+
),
|
|
895
|
+
children: leftIcon
|
|
896
|
+
}
|
|
897
|
+
),
|
|
888
898
|
children,
|
|
889
|
-
!loading && rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
890
|
-
"
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
899
|
+
!loading && rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
900
|
+
"span",
|
|
901
|
+
{
|
|
902
|
+
className: cn(
|
|
903
|
+
"inline-flex items-center",
|
|
904
|
+
size === "sm" ? "ml-1" : "ml-2",
|
|
905
|
+
size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
|
|
906
|
+
),
|
|
907
|
+
children: rightIcon
|
|
908
|
+
}
|
|
909
|
+
)
|
|
894
910
|
]
|
|
895
911
|
}
|
|
896
912
|
);
|
|
@@ -993,25 +1009,22 @@ var AtomicText = React5__default.default.forwardRef(
|
|
|
993
1009
|
}
|
|
994
1010
|
);
|
|
995
1011
|
AtomicText.displayName = "AtomicText";
|
|
996
|
-
var avatarVariants = classVarianceAuthority.cva(
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
xxl: "h-20 w-20",
|
|
1007
|
-
xxxl: "h-24 w-24"
|
|
1008
|
-
}
|
|
1009
|
-
},
|
|
1010
|
-
defaultVariants: {
|
|
1011
|
-
size: "default"
|
|
1012
|
+
var avatarVariants = classVarianceAuthority.cva("relative flex shrink-0 overflow-hidden rounded-full", {
|
|
1013
|
+
variants: {
|
|
1014
|
+
size: {
|
|
1015
|
+
xs: "h-6 w-6",
|
|
1016
|
+
sm: "h-8 w-8",
|
|
1017
|
+
default: "h-10 w-10",
|
|
1018
|
+
lg: "h-12 w-12",
|
|
1019
|
+
xl: "h-16 w-16",
|
|
1020
|
+
xxl: "h-20 w-20",
|
|
1021
|
+
xxxl: "h-24 w-24"
|
|
1012
1022
|
}
|
|
1023
|
+
},
|
|
1024
|
+
defaultVariants: {
|
|
1025
|
+
size: "default"
|
|
1013
1026
|
}
|
|
1014
|
-
);
|
|
1027
|
+
});
|
|
1015
1028
|
var avatarImageVariants = classVarianceAuthority.cva("aspect-square h-full w-full object-cover");
|
|
1016
1029
|
var avatarFallbackVariants = classVarianceAuthority.cva(
|
|
1017
1030
|
"flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",
|
|
@@ -1067,21 +1080,8 @@ var AtomicAvatar = React5__default.default.forwardRef(
|
|
|
1067
1080
|
className: cn(avatarVariants({ size }), className),
|
|
1068
1081
|
...props,
|
|
1069
1082
|
children: [
|
|
1070
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1071
|
-
|
|
1072
|
-
{
|
|
1073
|
-
className: avatarImageVariants(),
|
|
1074
|
-
src,
|
|
1075
|
-
alt
|
|
1076
|
-
}
|
|
1077
|
-
),
|
|
1078
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1079
|
-
AvatarPrimitive__namespace.Fallback,
|
|
1080
|
-
{
|
|
1081
|
-
className: avatarFallbackVariants({ size }),
|
|
1082
|
-
children: fallbackElement || initials
|
|
1083
|
-
}
|
|
1084
|
-
)
|
|
1083
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { className: avatarImageVariants(), src, alt }),
|
|
1084
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Fallback, { className: avatarFallbackVariants({ size }), children: fallbackElement || initials })
|
|
1085
1085
|
]
|
|
1086
1086
|
}
|
|
1087
1087
|
),
|
|
@@ -1100,14 +1100,7 @@ var AtomicAvatar = React5__default.default.forwardRef(
|
|
|
1100
1100
|
}
|
|
1101
1101
|
);
|
|
1102
1102
|
AtomicAvatar.displayName = "AtomicAvatar";
|
|
1103
|
-
var AtomicAvatarImage = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1104
|
-
AvatarPrimitive__namespace.Image,
|
|
1105
|
-
{
|
|
1106
|
-
ref,
|
|
1107
|
-
className: cn(avatarImageVariants(), className),
|
|
1108
|
-
...props
|
|
1109
|
-
}
|
|
1110
|
-
));
|
|
1103
|
+
var AtomicAvatarImage = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { ref, className: cn(avatarImageVariants(), className), ...props }));
|
|
1111
1104
|
AtomicAvatarImage.displayName = "AtomicAvatarImage";
|
|
1112
1105
|
var AtomicAvatarFallback = React5__default.default.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
1106
|
AvatarPrimitive__namespace.Fallback,
|
|
@@ -1161,112 +1154,108 @@ var imageVariants = classVarianceAuthority.cva("transition-all duration-200", {
|
|
|
1161
1154
|
objectPosition: "center"
|
|
1162
1155
|
}
|
|
1163
1156
|
});
|
|
1164
|
-
var AtomicImage = React5__default.default.forwardRef(
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
variants: {
|
|
1203
|
-
variant: {
|
|
1204
|
-
default: "border-border bg-card shadow-sm",
|
|
1205
|
-
elevated: "border-0 bg-card shadow-lg",
|
|
1206
|
-
outlined: "border-2 border-border bg-card shadow-none",
|
|
1207
|
-
filled: "border-0 bg-muted shadow-none"
|
|
1208
|
-
},
|
|
1209
|
-
size: {
|
|
1210
|
-
sm: "p-4",
|
|
1211
|
-
md: "p-6",
|
|
1212
|
-
lg: "p-8",
|
|
1213
|
-
xl: "p-10"
|
|
1157
|
+
var AtomicImage = React5__default.default.forwardRef(
|
|
1158
|
+
({
|
|
1159
|
+
className,
|
|
1160
|
+
containerClassName,
|
|
1161
|
+
rounded,
|
|
1162
|
+
aspectRatio,
|
|
1163
|
+
objectFit,
|
|
1164
|
+
objectPosition,
|
|
1165
|
+
enableBlur = false,
|
|
1166
|
+
placeholderSrc,
|
|
1167
|
+
...props
|
|
1168
|
+
}, ref) => {
|
|
1169
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
|
+
"div",
|
|
1171
|
+
{
|
|
1172
|
+
className: cn(
|
|
1173
|
+
"relative overflow-hidden",
|
|
1174
|
+
aspectRatio && imageVariants({ aspectRatio }),
|
|
1175
|
+
containerClassName
|
|
1176
|
+
),
|
|
1177
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1178
|
+
Image2__default.default,
|
|
1179
|
+
{
|
|
1180
|
+
ref,
|
|
1181
|
+
className: cn(
|
|
1182
|
+
imageVariants({
|
|
1183
|
+
rounded,
|
|
1184
|
+
objectFit,
|
|
1185
|
+
objectPosition,
|
|
1186
|
+
aspectRatio: void 0
|
|
1187
|
+
}),
|
|
1188
|
+
className
|
|
1189
|
+
),
|
|
1190
|
+
placeholder: enableBlur || placeholderSrc ? "blur" : "empty",
|
|
1191
|
+
blurDataURL: placeholderSrc,
|
|
1192
|
+
...props
|
|
1193
|
+
}
|
|
1194
|
+
)
|
|
1214
1195
|
}
|
|
1215
|
-
|
|
1216
|
-
defaultVariants: {
|
|
1217
|
-
variant: "default",
|
|
1218
|
-
size: "md"
|
|
1219
|
-
}
|
|
1196
|
+
);
|
|
1220
1197
|
}
|
|
1221
1198
|
);
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
{
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
xl: "pb-8"
|
|
1231
|
-
}
|
|
1199
|
+
AtomicImage.displayName = "AtomicImage";
|
|
1200
|
+
var cardVariants = classVarianceAuthority.cva("rounded-lg border text-card-foreground", {
|
|
1201
|
+
variants: {
|
|
1202
|
+
variant: {
|
|
1203
|
+
default: "border-border bg-card shadow-sm",
|
|
1204
|
+
elevated: "border-0 bg-card shadow-lg",
|
|
1205
|
+
outlined: "border-2 border-border bg-card shadow-none",
|
|
1206
|
+
filled: "border-0 bg-muted shadow-none"
|
|
1232
1207
|
},
|
|
1233
|
-
|
|
1234
|
-
|
|
1208
|
+
size: {
|
|
1209
|
+
sm: "p-4",
|
|
1210
|
+
md: "p-6",
|
|
1211
|
+
lg: "p-8",
|
|
1212
|
+
xl: "p-10"
|
|
1235
1213
|
}
|
|
1214
|
+
},
|
|
1215
|
+
defaultVariants: {
|
|
1216
|
+
variant: "default",
|
|
1217
|
+
size: "md"
|
|
1236
1218
|
}
|
|
1237
|
-
);
|
|
1238
|
-
var
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
lg: "text-2xl",
|
|
1246
|
-
xl: "text-3xl"
|
|
1247
|
-
}
|
|
1248
|
-
},
|
|
1249
|
-
defaultVariants: {
|
|
1250
|
-
size: "md"
|
|
1219
|
+
});
|
|
1220
|
+
var cardHeaderVariants = classVarianceAuthority.cva("flex flex-col space-y-1.5", {
|
|
1221
|
+
variants: {
|
|
1222
|
+
size: {
|
|
1223
|
+
sm: "pb-3",
|
|
1224
|
+
md: "pb-4",
|
|
1225
|
+
lg: "pb-6",
|
|
1226
|
+
xl: "pb-8"
|
|
1251
1227
|
}
|
|
1228
|
+
},
|
|
1229
|
+
defaultVariants: {
|
|
1230
|
+
size: "md"
|
|
1252
1231
|
}
|
|
1253
|
-
);
|
|
1254
|
-
var
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1232
|
+
});
|
|
1233
|
+
var cardTitleVariants = classVarianceAuthority.cva("font-semibold leading-none tracking-tight", {
|
|
1234
|
+
variants: {
|
|
1235
|
+
size: {
|
|
1236
|
+
sm: "text-lg",
|
|
1237
|
+
md: "text-xl",
|
|
1238
|
+
lg: "text-2xl",
|
|
1239
|
+
xl: "text-3xl"
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
defaultVariants: {
|
|
1243
|
+
size: "md"
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
var cardDescriptionVariants = classVarianceAuthority.cva("text-muted-foreground", {
|
|
1247
|
+
variants: {
|
|
1248
|
+
size: {
|
|
1249
|
+
sm: "text-sm",
|
|
1250
|
+
md: "text-sm",
|
|
1251
|
+
lg: "text-base",
|
|
1252
|
+
xl: "text-lg"
|
|
1267
1253
|
}
|
|
1254
|
+
},
|
|
1255
|
+
defaultVariants: {
|
|
1256
|
+
size: "md"
|
|
1268
1257
|
}
|
|
1269
|
-
);
|
|
1258
|
+
});
|
|
1270
1259
|
var cardContentVariants = classVarianceAuthority.cva("", {
|
|
1271
1260
|
variants: {
|
|
1272
1261
|
size: {
|
|
@@ -1280,22 +1269,19 @@ var cardContentVariants = classVarianceAuthority.cva("", {
|
|
|
1280
1269
|
size: "md"
|
|
1281
1270
|
}
|
|
1282
1271
|
});
|
|
1283
|
-
var cardFooterVariants = classVarianceAuthority.cva(
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
lg: "pt-6",
|
|
1291
|
-
xl: "pt-8"
|
|
1292
|
-
}
|
|
1293
|
-
},
|
|
1294
|
-
defaultVariants: {
|
|
1295
|
-
size: "md"
|
|
1272
|
+
var cardFooterVariants = classVarianceAuthority.cva("flex items-center", {
|
|
1273
|
+
variants: {
|
|
1274
|
+
size: {
|
|
1275
|
+
sm: "pt-3",
|
|
1276
|
+
md: "pt-4",
|
|
1277
|
+
lg: "pt-6",
|
|
1278
|
+
xl: "pt-8"
|
|
1296
1279
|
}
|
|
1280
|
+
},
|
|
1281
|
+
defaultVariants: {
|
|
1282
|
+
size: "md"
|
|
1297
1283
|
}
|
|
1298
|
-
);
|
|
1284
|
+
});
|
|
1299
1285
|
var AtomicCard = React5__default.default.forwardRef(
|
|
1300
1286
|
({ className, variant, size, interactive = false, fullWidth = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1301
1287
|
"div",
|
|
@@ -1313,58 +1299,23 @@ var AtomicCard = React5__default.default.forwardRef(
|
|
|
1313
1299
|
);
|
|
1314
1300
|
AtomicCard.displayName = "AtomicCard";
|
|
1315
1301
|
var AtomicCardHeader = React5__default.default.forwardRef(
|
|
1316
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1317
|
-
"div",
|
|
1318
|
-
{
|
|
1319
|
-
ref,
|
|
1320
|
-
className: cn(cardHeaderVariants({ size }), className),
|
|
1321
|
-
...props
|
|
1322
|
-
}
|
|
1323
|
-
)
|
|
1302
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cardHeaderVariants({ size }), className), ...props })
|
|
1324
1303
|
);
|
|
1325
1304
|
AtomicCardHeader.displayName = "AtomicCardHeader";
|
|
1326
1305
|
var AtomicCardTitle = React5__default.default.forwardRef(
|
|
1327
|
-
({ className, size, as: Component = "h3", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1328
|
-
Component,
|
|
1329
|
-
{
|
|
1330
|
-
ref,
|
|
1331
|
-
className: cn(cardTitleVariants({ size }), className),
|
|
1332
|
-
...props
|
|
1333
|
-
}
|
|
1334
|
-
)
|
|
1306
|
+
({ className, size, as: Component = "h3", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(cardTitleVariants({ size }), className), ...props })
|
|
1335
1307
|
);
|
|
1336
1308
|
AtomicCardTitle.displayName = "AtomicCardTitle";
|
|
1337
1309
|
var AtomicCardDescription = React5__default.default.forwardRef(
|
|
1338
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1339
|
-
"p",
|
|
1340
|
-
{
|
|
1341
|
-
ref,
|
|
1342
|
-
className: cn(cardDescriptionVariants({ size }), className),
|
|
1343
|
-
...props
|
|
1344
|
-
}
|
|
1345
|
-
)
|
|
1310
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn(cardDescriptionVariants({ size }), className), ...props })
|
|
1346
1311
|
);
|
|
1347
1312
|
AtomicCardDescription.displayName = "AtomicCardDescription";
|
|
1348
1313
|
var AtomicCardContent = React5__default.default.forwardRef(
|
|
1349
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1350
|
-
"div",
|
|
1351
|
-
{
|
|
1352
|
-
ref,
|
|
1353
|
-
className: cn(cardContentVariants({ size }), className),
|
|
1354
|
-
...props
|
|
1355
|
-
}
|
|
1356
|
-
)
|
|
1314
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cardContentVariants({ size }), className), ...props })
|
|
1357
1315
|
);
|
|
1358
1316
|
AtomicCardContent.displayName = "AtomicCardContent";
|
|
1359
1317
|
var AtomicCardFooter = React5__default.default.forwardRef(
|
|
1360
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1361
|
-
"div",
|
|
1362
|
-
{
|
|
1363
|
-
ref,
|
|
1364
|
-
className: cn(cardFooterVariants({ size }), className),
|
|
1365
|
-
...props
|
|
1366
|
-
}
|
|
1367
|
-
)
|
|
1318
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cardFooterVariants({ size }), className), ...props })
|
|
1368
1319
|
);
|
|
1369
1320
|
AtomicCardFooter.displayName = "AtomicCardFooter";
|
|
1370
1321
|
var getSpacingClass = (spacing2, prefix) => {
|
|
@@ -1531,18 +1482,30 @@ var AtomicInput = React5__default.default.forwardRef(
|
|
|
1531
1482
|
const messageText = error || success || warning || helperText;
|
|
1532
1483
|
const messageColor = error ? "text-destructive" : success ? "text-green-600 dark:text-green-400" : warning ? "text-amber-600 dark:text-amber-400" : "text-muted-foreground";
|
|
1533
1484
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", containerClassName), children: [
|
|
1534
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1535
|
-
"
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1485
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1486
|
+
"label",
|
|
1487
|
+
{
|
|
1488
|
+
className: cn(
|
|
1489
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1490
|
+
disabled && "opacity-50",
|
|
1491
|
+
labelClassName
|
|
1492
|
+
),
|
|
1493
|
+
children: label
|
|
1494
|
+
}
|
|
1495
|
+
),
|
|
1539
1496
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1540
|
-
leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1541
|
-
"
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1497
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1498
|
+
"div",
|
|
1499
|
+
{
|
|
1500
|
+
className: cn(
|
|
1501
|
+
"absolute left-0 top-0 h-full flex items-center justify-center",
|
|
1502
|
+
size === "sm" ? "w-8 pl-2" : size === "lg" ? "w-12 pl-4" : "w-10 pl-3",
|
|
1503
|
+
"text-muted-foreground pointer-events-none",
|
|
1504
|
+
"[&>*]:h-4 [&>*]:w-4"
|
|
1505
|
+
),
|
|
1506
|
+
children: leftIcon
|
|
1507
|
+
}
|
|
1508
|
+
),
|
|
1546
1509
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1547
1510
|
"input",
|
|
1548
1511
|
{
|
|
@@ -1560,38 +1523,40 @@ var AtomicInput = React5__default.default.forwardRef(
|
|
|
1560
1523
|
...props
|
|
1561
1524
|
}
|
|
1562
1525
|
),
|
|
1563
|
-
(rightIcon || showClearButton || showPasswordToggleButton) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1564
|
-
"
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1526
|
+
(rightIcon || showClearButton || showPasswordToggleButton) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1527
|
+
"div",
|
|
1528
|
+
{
|
|
1529
|
+
className: cn(
|
|
1530
|
+
"absolute right-0 top-0 h-full flex items-center justify-center gap-1",
|
|
1531
|
+
size === "sm" ? "w-8 pr-2" : size === "lg" ? "w-12 pr-4" : "w-10 pr-3"
|
|
1532
|
+
),
|
|
1533
|
+
children: [
|
|
1534
|
+
rightIcon && !showClearButton && !showPasswordToggleButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground [&>*]:h-4 [&>*]:w-4", children: rightIcon }),
|
|
1535
|
+
showClearButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1536
|
+
"button",
|
|
1537
|
+
{
|
|
1538
|
+
type: "button",
|
|
1539
|
+
onClick: handleClear,
|
|
1540
|
+
className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
|
|
1541
|
+
tabIndex: -1,
|
|
1542
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
|
|
1543
|
+
}
|
|
1544
|
+
),
|
|
1545
|
+
showPasswordToggleButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1546
|
+
"button",
|
|
1547
|
+
{
|
|
1548
|
+
type: "button",
|
|
1549
|
+
onClick: () => setShowPassword(!showPassword),
|
|
1550
|
+
className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
|
|
1551
|
+
tabIndex: -1,
|
|
1552
|
+
children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, {})
|
|
1553
|
+
}
|
|
1554
|
+
)
|
|
1555
|
+
]
|
|
1556
|
+
}
|
|
1557
|
+
)
|
|
1589
1558
|
] }),
|
|
1590
|
-
messageText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
1591
|
-
"text-xs",
|
|
1592
|
-
messageColor,
|
|
1593
|
-
helperClassName
|
|
1594
|
-
), children: messageText })
|
|
1559
|
+
messageText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs", messageColor, helperClassName), children: messageText })
|
|
1595
1560
|
] });
|
|
1596
1561
|
}
|
|
1597
1562
|
);
|
|
@@ -1675,7 +1640,8 @@ var AtomicCheckbox = React5__default.default.forwardRef(
|
|
|
1675
1640
|
id,
|
|
1676
1641
|
...rest
|
|
1677
1642
|
}, ref) => {
|
|
1678
|
-
const
|
|
1643
|
+
const generatedId = React5__default.default.useId();
|
|
1644
|
+
const checkboxId = id || `checkbox-${generatedId}`;
|
|
1679
1645
|
const sizeClasses = getSizeClasses(size);
|
|
1680
1646
|
const colorClasses = getColorClasses(color, error);
|
|
1681
1647
|
const handleChange = (event) => {
|
|
@@ -1755,10 +1721,7 @@ var AtomicCheckbox = React5__default.default.forwardRef(
|
|
|
1755
1721
|
children: label
|
|
1756
1722
|
}
|
|
1757
1723
|
),
|
|
1758
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
1759
|
-
"text-sm leading-5",
|
|
1760
|
-
error ? "text-red-600" : "text-gray-500"
|
|
1761
|
-
), children: description }),
|
|
1724
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm leading-5", error ? "text-red-600" : "text-gray-500"), children: description }),
|
|
1762
1725
|
error && errorMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-red-600", children: errorMessage })
|
|
1763
1726
|
] })
|
|
1764
1727
|
] });
|
|
@@ -1847,7 +1810,8 @@ var AtomicSwitch = React5__default.default.forwardRef(
|
|
|
1847
1810
|
id,
|
|
1848
1811
|
...rest
|
|
1849
1812
|
}, ref) => {
|
|
1850
|
-
const
|
|
1813
|
+
const generatedId = React5__default.default.useId();
|
|
1814
|
+
const switchId = id || `switch-${generatedId}`;
|
|
1851
1815
|
const sizeClasses = getSizeClasses2(size);
|
|
1852
1816
|
const colorClasses = getColorClasses2(color, checked);
|
|
1853
1817
|
const handleChange = (event) => {
|
|
@@ -1920,10 +1884,7 @@ var AtomicSwitch = React5__default.default.forwardRef(
|
|
|
1920
1884
|
}
|
|
1921
1885
|
) })
|
|
1922
1886
|
] });
|
|
1923
|
-
const labelElement = (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
1924
|
-
"flex-1",
|
|
1925
|
-
labelPosition === "left" ? "mr-3" : "ml-3"
|
|
1926
|
-
), children: [
|
|
1887
|
+
const labelElement = (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex-1", labelPosition === "left" ? "mr-3" : "ml-3"), children: [
|
|
1927
1888
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1928
1889
|
"label",
|
|
1929
1890
|
{
|
|
@@ -1972,71 +1933,34 @@ var spinnerVariants = classVarianceAuthority.cva("animate-spin", {
|
|
|
1972
1933
|
}
|
|
1973
1934
|
});
|
|
1974
1935
|
var AtomicSpinner = React5__default.default.forwardRef(
|
|
1975
|
-
({
|
|
1976
|
-
className,
|
|
1977
|
-
size,
|
|
1978
|
-
color,
|
|
1979
|
-
label,
|
|
1980
|
-
inline = false,
|
|
1981
|
-
icon: Icon = lucideReact.Loader2,
|
|
1982
|
-
...props
|
|
1983
|
-
}, ref) => {
|
|
1984
|
-
const spinner = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1985
|
-
Icon,
|
|
1986
|
-
{
|
|
1987
|
-
ref,
|
|
1988
|
-
className: cn(spinnerVariants({ size, color }), className),
|
|
1989
|
-
...props
|
|
1990
|
-
}
|
|
1991
|
-
);
|
|
1936
|
+
({ className, size, color, label, inline = false, icon: Icon = lucideReact.Loader2, ...props }, ref) => {
|
|
1937
|
+
const spinner = /* @__PURE__ */ jsxRuntime.jsx(Icon, { ref, className: cn(spinnerVariants({ size, color }), className), ...props });
|
|
1992
1938
|
if (!label) {
|
|
1993
1939
|
return spinner;
|
|
1994
1940
|
}
|
|
1995
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
1996
|
-
"flex items-center gap-2",
|
|
1997
|
-
inline ? "inline-flex" : "flex"
|
|
1998
|
-
), children: [
|
|
1941
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", inline ? "inline-flex" : "flex"), children: [
|
|
1999
1942
|
spinner,
|
|
2000
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2001
|
-
"
|
|
2002
|
-
|
|
2003
|
-
|
|
1943
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1944
|
+
"span",
|
|
1945
|
+
{
|
|
1946
|
+
className: cn(
|
|
1947
|
+
"text-sm",
|
|
1948
|
+
color === "muted" ? "text-muted-foreground" : color === "white" ? "text-white" : color === "primary" ? "text-primary" : "text-foreground"
|
|
1949
|
+
),
|
|
1950
|
+
children: label
|
|
1951
|
+
}
|
|
1952
|
+
)
|
|
2004
1953
|
] });
|
|
2005
1954
|
}
|
|
2006
1955
|
);
|
|
2007
1956
|
AtomicSpinner.displayName = "AtomicSpinner";
|
|
2008
|
-
var AtomicButtonSpinner = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2009
|
-
AtomicSpinner,
|
|
2010
|
-
{
|
|
2011
|
-
ref,
|
|
2012
|
-
size: "sm",
|
|
2013
|
-
color: "white",
|
|
2014
|
-
className: cn("mr-2", className),
|
|
2015
|
-
...props
|
|
2016
|
-
}
|
|
2017
|
-
));
|
|
1957
|
+
var AtomicButtonSpinner = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AtomicSpinner, { ref, size: "sm", color: "white", className: cn("mr-2", className), ...props }));
|
|
2018
1958
|
AtomicButtonSpinner.displayName = "AtomicButtonSpinner";
|
|
2019
|
-
var AtomicPageSpinner = React5__default.default.forwardRef(
|
|
2020
|
-
AtomicSpinner,
|
|
2021
|
-
|
|
2022
|
-
ref,
|
|
2023
|
-
size: "lg",
|
|
2024
|
-
className,
|
|
2025
|
-
...props
|
|
2026
|
-
}
|
|
2027
|
-
) }));
|
|
1959
|
+
var AtomicPageSpinner = React5__default.default.forwardRef(
|
|
1960
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsxRuntime.jsx(AtomicSpinner, { ref, size: "lg", className, ...props }) })
|
|
1961
|
+
);
|
|
2028
1962
|
AtomicPageSpinner.displayName = "AtomicPageSpinner";
|
|
2029
|
-
var AtomicInlineSpinner = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2030
|
-
AtomicSpinner,
|
|
2031
|
-
{
|
|
2032
|
-
ref,
|
|
2033
|
-
inline: true,
|
|
2034
|
-
size: "sm",
|
|
2035
|
-
color: "muted",
|
|
2036
|
-
className,
|
|
2037
|
-
...props
|
|
2038
|
-
}
|
|
2039
|
-
));
|
|
1963
|
+
var AtomicInlineSpinner = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AtomicSpinner, { ref, inline: true, size: "sm", color: "muted", className, ...props }));
|
|
2040
1964
|
AtomicInlineSpinner.displayName = "AtomicInlineSpinner";
|
|
2041
1965
|
var badgeVariants = classVarianceAuthority.cva(
|
|
2042
1966
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
@@ -2087,59 +2011,52 @@ var AtomicBadge = React5__default.default.forwardRef(
|
|
|
2087
2011
|
...props
|
|
2088
2012
|
}, ref) => {
|
|
2089
2013
|
const iconSize = size === "sm" ? "h-3 w-3" : size === "lg" ? "h-4 w-4" : "h-3.5 w-3.5";
|
|
2014
|
+
const iconClasses = size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-4 [&>*]:w-4" : "[&>*]:h-3.5 [&>*]:w-3.5";
|
|
2090
2015
|
const dotSize = size === "sm" ? "h-1.5 w-1.5" : size === "lg" ? "h-2.5 w-2.5" : "h-2 w-2";
|
|
2091
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
"span",
|
|
2100
|
-
{
|
|
2101
|
-
className: cn(
|
|
2102
|
-
"mr-1.5 rounded-full",
|
|
2103
|
-
dotSize,
|
|
2104
|
-
!dotColor && (variant === "success" ? "bg-green-600" : variant === "warning" ? "bg-amber-600" : variant === "info" ? "bg-blue-600" : variant === "destructive" ? "bg-red-600" : variant === "gray" ? "bg-gray-600" : "bg-current")
|
|
2105
|
-
),
|
|
2106
|
-
style: dotColor ? { backgroundColor: dotColor } : void 0
|
|
2107
|
-
}
|
|
2016
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn(badgeVariants({ variant, size, shape }), className), ...props, children: [
|
|
2017
|
+
dot && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2018
|
+
"span",
|
|
2019
|
+
{
|
|
2020
|
+
className: cn(
|
|
2021
|
+
"mr-1.5 rounded-full",
|
|
2022
|
+
dotSize,
|
|
2023
|
+
!dotColor && (variant === "success" ? "bg-green-600" : variant === "warning" ? "bg-amber-600" : variant === "info" ? "bg-blue-600" : variant === "destructive" ? "bg-red-600" : variant === "gray" ? "bg-gray-600" : "bg-current")
|
|
2108
2024
|
),
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2025
|
+
style: dotColor ? { backgroundColor: dotColor } : void 0
|
|
2026
|
+
}
|
|
2027
|
+
),
|
|
2028
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("mr-1 flex items-center", iconClasses), children: leftIcon }),
|
|
2029
|
+
children,
|
|
2030
|
+
rightIcon && !removable && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("ml-1 flex items-center", iconClasses), children: rightIcon }),
|
|
2031
|
+
removable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2032
|
+
"button",
|
|
2033
|
+
{
|
|
2034
|
+
type: "button",
|
|
2035
|
+
onClick: onRemove,
|
|
2036
|
+
className: cn(
|
|
2037
|
+
"ml-1 flex items-center rounded-full hover:bg-black/10 dark:hover:bg-white/10",
|
|
2038
|
+
"transition-colors focus:outline-none focus:ring-1 focus:ring-current",
|
|
2039
|
+
size === "sm" ? "p-0.5" : "p-1"
|
|
2040
|
+
),
|
|
2041
|
+
children: removeIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex items-center", iconClasses), children: removeIcon }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2042
|
+
"svg",
|
|
2114
2043
|
{
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
children:
|
|
2123
|
-
"
|
|
2124
|
-
{
|
|
2125
|
-
|
|
2126
|
-
viewBox: "0 0 24 24",
|
|
2127
|
-
fill: "none",
|
|
2128
|
-
stroke: "currentColor",
|
|
2129
|
-
strokeWidth: "2",
|
|
2130
|
-
strokeLinecap: "round",
|
|
2131
|
-
strokeLinejoin: "round",
|
|
2132
|
-
children: [
|
|
2133
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2134
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2135
|
-
]
|
|
2136
|
-
}
|
|
2137
|
-
)
|
|
2044
|
+
className: iconSize,
|
|
2045
|
+
viewBox: "0 0 24 24",
|
|
2046
|
+
fill: "none",
|
|
2047
|
+
stroke: "currentColor",
|
|
2048
|
+
strokeWidth: "2",
|
|
2049
|
+
strokeLinecap: "round",
|
|
2050
|
+
strokeLinejoin: "round",
|
|
2051
|
+
children: [
|
|
2052
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2053
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2054
|
+
]
|
|
2138
2055
|
}
|
|
2139
2056
|
)
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
);
|
|
2057
|
+
}
|
|
2058
|
+
)
|
|
2059
|
+
] });
|
|
2143
2060
|
}
|
|
2144
2061
|
);
|
|
2145
2062
|
AtomicBadge.displayName = "AtomicBadge";
|
|
@@ -2151,31 +2068,13 @@ var AtomicStatusBadge = React5__default.default.forwardRef(({ status, variant, .
|
|
|
2151
2068
|
away: { variant: "warning", dot: true, children: "Away" }
|
|
2152
2069
|
};
|
|
2153
2070
|
const config = statusConfig[status];
|
|
2154
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2155
|
-
AtomicBadge,
|
|
2156
|
-
{
|
|
2157
|
-
ref,
|
|
2158
|
-
variant: variant || config.variant,
|
|
2159
|
-
dot: config.dot,
|
|
2160
|
-
...props,
|
|
2161
|
-
children: props.children || config.children
|
|
2162
|
-
}
|
|
2163
|
-
);
|
|
2071
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AtomicBadge, { ref, variant: variant || config.variant, dot: config.dot, ...props, children: props.children || config.children });
|
|
2164
2072
|
});
|
|
2165
2073
|
AtomicStatusBadge.displayName = "AtomicStatusBadge";
|
|
2166
2074
|
var AtomicCountBadge = React5__default.default.forwardRef(({ count, max = 99, ...props }, ref) => {
|
|
2167
2075
|
const displayCount = count > max ? `${max}+` : count.toString();
|
|
2168
2076
|
if (count <= 0) return null;
|
|
2169
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2170
|
-
AtomicBadge,
|
|
2171
|
-
{
|
|
2172
|
-
ref,
|
|
2173
|
-
variant: "destructive",
|
|
2174
|
-
size: "sm",
|
|
2175
|
-
...props,
|
|
2176
|
-
children: displayCount
|
|
2177
|
-
}
|
|
2178
|
-
);
|
|
2077
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AtomicBadge, { ref, variant: "destructive", size: "sm", ...props, children: displayCount });
|
|
2179
2078
|
});
|
|
2180
2079
|
AtomicCountBadge.displayName = "AtomicCountBadge";
|
|
2181
2080
|
var getSpacingClass4 = (spacing2, prefix) => {
|
|
@@ -2281,27 +2180,9 @@ var AtomicTag = React5__default.default.forwardRef(
|
|
|
2281
2180
|
className
|
|
2282
2181
|
);
|
|
2283
2182
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2284
|
-
LeftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2285
|
-
LeftIcon,
|
|
2286
|
-
{
|
|
2287
|
-
size: iconSize,
|
|
2288
|
-
className: cn(
|
|
2289
|
-
"flex-shrink-0",
|
|
2290
|
-
children ? "mr-1.5" : ""
|
|
2291
|
-
)
|
|
2292
|
-
}
|
|
2293
|
-
),
|
|
2183
|
+
LeftIcon && /* @__PURE__ */ jsxRuntime.jsx(LeftIcon, { size: iconSize, className: cn("flex-shrink-0", children ? "mr-1.5" : "") }),
|
|
2294
2184
|
children && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
|
|
2295
|
-
RightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2296
|
-
RightIcon,
|
|
2297
|
-
{
|
|
2298
|
-
size: iconSize,
|
|
2299
|
-
className: cn(
|
|
2300
|
-
"flex-shrink-0",
|
|
2301
|
-
children ? "ml-1.5" : ""
|
|
2302
|
-
)
|
|
2303
|
-
}
|
|
2304
|
-
),
|
|
2185
|
+
RightIcon && /* @__PURE__ */ jsxRuntime.jsx(RightIcon, { size: iconSize, className: cn("flex-shrink-0", children ? "ml-1.5" : "") }),
|
|
2305
2186
|
removable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2306
2187
|
"button",
|
|
2307
2188
|
{
|
|
@@ -2318,24 +2199,15 @@ var AtomicTag = React5__default.default.forwardRef(
|
|
|
2318
2199
|
},
|
|
2319
2200
|
disabled,
|
|
2320
2201
|
"aria-label": "Remove",
|
|
2321
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2322
|
-
"
|
|
2202
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2203
|
+
"path",
|
|
2323
2204
|
{
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2329
|
-
"path",
|
|
2330
|
-
{
|
|
2331
|
-
strokeLinecap: "round",
|
|
2332
|
-
strokeLinejoin: "round",
|
|
2333
|
-
strokeWidth: 2,
|
|
2334
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
2335
|
-
}
|
|
2336
|
-
)
|
|
2205
|
+
strokeLinecap: "round",
|
|
2206
|
+
strokeLinejoin: "round",
|
|
2207
|
+
strokeWidth: 2,
|
|
2208
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
2337
2209
|
}
|
|
2338
|
-
)
|
|
2210
|
+
) })
|
|
2339
2211
|
}
|
|
2340
2212
|
)
|
|
2341
2213
|
] });
|
|
@@ -2344,114 +2216,102 @@ var AtomicTag = React5__default.default.forwardRef(
|
|
|
2344
2216
|
onClick?.(e);
|
|
2345
2217
|
}
|
|
2346
2218
|
};
|
|
2347
|
-
return
|
|
2219
|
+
return React5__default.default.createElement(
|
|
2348
2220
|
Component,
|
|
2349
2221
|
{
|
|
2350
2222
|
ref,
|
|
2351
2223
|
className: classes,
|
|
2352
2224
|
onClick: clickable ? handleClick : void 0,
|
|
2353
|
-
...rest
|
|
2354
|
-
|
|
2355
|
-
|
|
2225
|
+
...rest
|
|
2226
|
+
},
|
|
2227
|
+
content
|
|
2356
2228
|
);
|
|
2357
2229
|
}
|
|
2358
2230
|
);
|
|
2359
2231
|
AtomicTag.displayName = "AtomicTag";
|
|
2360
|
-
var linkVariants = classVarianceAuthority.cva(
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2232
|
+
var linkVariants = classVarianceAuthority.cva(
|
|
2233
|
+
"transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2234
|
+
{
|
|
2235
|
+
variants: {
|
|
2236
|
+
variant: {
|
|
2237
|
+
default: "text-foreground hover:text-foreground/80",
|
|
2238
|
+
primary: "text-primary hover:text-primary/80",
|
|
2239
|
+
secondary: "text-secondary-foreground hover:text-secondary-foreground/80",
|
|
2240
|
+
muted: "text-muted-foreground hover:text-foreground",
|
|
2241
|
+
destructive: "text-destructive hover:text-destructive/80",
|
|
2242
|
+
ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
2243
|
+
underline: "text-primary underline underline-offset-4 hover:text-primary/80",
|
|
2244
|
+
button: "inline-flex items-center justify-center rounded-md text-sm font-medium h-10 px-4 py-2 bg-primary text-primary-foreground hover:bg-primary/90"
|
|
2245
|
+
},
|
|
2246
|
+
size: {
|
|
2247
|
+
default: "",
|
|
2248
|
+
sm: "text-sm",
|
|
2249
|
+
lg: "text-lg",
|
|
2250
|
+
xl: "text-xl"
|
|
2251
|
+
},
|
|
2252
|
+
weight: {
|
|
2253
|
+
normal: "font-normal",
|
|
2254
|
+
medium: "font-medium",
|
|
2255
|
+
semibold: "font-semibold",
|
|
2256
|
+
bold: "font-bold"
|
|
2257
|
+
}
|
|
2377
2258
|
},
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
bold: "font-bold"
|
|
2259
|
+
defaultVariants: {
|
|
2260
|
+
variant: "default",
|
|
2261
|
+
size: "default",
|
|
2262
|
+
weight: "normal"
|
|
2383
2263
|
}
|
|
2384
|
-
},
|
|
2385
|
-
defaultVariants: {
|
|
2386
|
-
variant: "default",
|
|
2387
|
-
size: "default",
|
|
2388
|
-
weight: "normal"
|
|
2389
2264
|
}
|
|
2390
|
-
|
|
2391
|
-
var AtomicLink = React5__default.default.forwardRef(
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
href,
|
|
2402
|
-
...props
|
|
2403
|
-
}, ref) => {
|
|
2404
|
-
const isExternalUrl = typeof href === "string" && (href.startsWith("http") || href.startsWith("//"));
|
|
2405
|
-
const shouldBeExternal = external || isExternalUrl;
|
|
2406
|
-
const linkProps = {
|
|
2407
|
-
className: cn(linkVariants({ variant, size, weight }), className),
|
|
2408
|
-
ref,
|
|
2409
|
-
...props
|
|
2410
|
-
};
|
|
2411
|
-
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2265
|
+
);
|
|
2266
|
+
var AtomicLink = React5__default.default.forwardRef(
|
|
2267
|
+
({
|
|
2268
|
+
className,
|
|
2269
|
+
variant,
|
|
2270
|
+
size,
|
|
2271
|
+
weight,
|
|
2272
|
+
external = false,
|
|
2273
|
+
showExternalIcon = false,
|
|
2274
|
+
prefetch = true,
|
|
2275
|
+
externalIcon,
|
|
2412
2276
|
children,
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
{
|
|
2448
|
-
href,
|
|
2449
|
-
prefetch,
|
|
2450
|
-
...linkProps,
|
|
2451
|
-
children: content
|
|
2277
|
+
href,
|
|
2278
|
+
...props
|
|
2279
|
+
}, ref) => {
|
|
2280
|
+
const isExternalUrl = typeof href === "string" && (href.startsWith("http") || href.startsWith("//"));
|
|
2281
|
+
const shouldBeExternal = external || isExternalUrl;
|
|
2282
|
+
const linkProps = {
|
|
2283
|
+
className: cn(linkVariants({ variant, size, weight }), className),
|
|
2284
|
+
ref,
|
|
2285
|
+
...props
|
|
2286
|
+
};
|
|
2287
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2288
|
+
children,
|
|
2289
|
+
shouldBeExternal && showExternalIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-block", children: externalIcon || /* @__PURE__ */ jsxRuntime.jsx(
|
|
2290
|
+
"svg",
|
|
2291
|
+
{
|
|
2292
|
+
className: "h-3 w-3",
|
|
2293
|
+
fill: "none",
|
|
2294
|
+
stroke: "currentColor",
|
|
2295
|
+
viewBox: "0 0 24 24",
|
|
2296
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2297
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2298
|
+
"path",
|
|
2299
|
+
{
|
|
2300
|
+
strokeLinecap: "round",
|
|
2301
|
+
strokeLinejoin: "round",
|
|
2302
|
+
strokeWidth: 2,
|
|
2303
|
+
d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
2304
|
+
}
|
|
2305
|
+
)
|
|
2306
|
+
}
|
|
2307
|
+
) })
|
|
2308
|
+
] });
|
|
2309
|
+
if (shouldBeExternal) {
|
|
2310
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, target: "_blank", rel: "noopener noreferrer", ...linkProps, children: content });
|
|
2452
2311
|
}
|
|
2453
|
-
|
|
2454
|
-
}
|
|
2312
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href, prefetch, ...linkProps, children: content });
|
|
2313
|
+
}
|
|
2314
|
+
);
|
|
2455
2315
|
AtomicLink.displayName = "AtomicLink";
|
|
2456
2316
|
var getSpacingClass5 = (spacing2, prefix) => {
|
|
2457
2317
|
if (!spacing2) return "";
|
|
@@ -2503,10 +2363,10 @@ var AtomicDiv = React5__default.default.forwardRef(
|
|
|
2503
2363
|
...rest
|
|
2504
2364
|
}, ref) => {
|
|
2505
2365
|
const classes = cn(
|
|
2506
|
-
d
|
|
2507
|
-
align && `items-${align
|
|
2508
|
-
justify && `justify-${justify
|
|
2509
|
-
flexDir && `flex-${flexDir
|
|
2366
|
+
d,
|
|
2367
|
+
align && `items-${align}`,
|
|
2368
|
+
justify && `justify-${justify}`,
|
|
2369
|
+
flexDir && `flex-${flexDir}`,
|
|
2510
2370
|
flexWrap && `flex-${flexWrap}`,
|
|
2511
2371
|
flexGrow !== void 0 && `flex-grow-${flexGrow}`,
|
|
2512
2372
|
flexShrink !== void 0 && `flex-shrink-${flexShrink}`,
|
|
@@ -2524,9 +2384,9 @@ var AtomicDiv = React5__default.default.forwardRef(
|
|
|
2524
2384
|
border === true && "border",
|
|
2525
2385
|
typeof border === "string" && border,
|
|
2526
2386
|
borderColor && `border-${borderColor}`,
|
|
2527
|
-
rounded && `rounded
|
|
2528
|
-
shadow && `shadow
|
|
2529
|
-
position
|
|
2387
|
+
rounded && `rounded-${rounded}`,
|
|
2388
|
+
shadow && `shadow-${shadow}`,
|
|
2389
|
+
position,
|
|
2530
2390
|
top !== void 0 && `top-${top}`,
|
|
2531
2391
|
right !== void 0 && `right-${right}`,
|
|
2532
2392
|
bottom !== void 0 && `bottom-${bottom}`,
|
|
@@ -2546,7 +2406,13 @@ var AtomicDiv = React5__default.default.forwardRef(
|
|
|
2546
2406
|
}
|
|
2547
2407
|
);
|
|
2548
2408
|
AtomicDiv.displayName = "AtomicDiv";
|
|
2549
|
-
var AtomicThemeProviderContext = React5.createContext(
|
|
2409
|
+
var AtomicThemeProviderContext = React5.createContext(
|
|
2410
|
+
void 0
|
|
2411
|
+
);
|
|
2412
|
+
var getSystemTheme = () => {
|
|
2413
|
+
if (typeof window === "undefined") return "light";
|
|
2414
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2415
|
+
};
|
|
2550
2416
|
var AtomicThemeProvider = ({
|
|
2551
2417
|
children,
|
|
2552
2418
|
defaultTheme = "system",
|
|
@@ -2567,10 +2433,6 @@ var AtomicThemeProvider = ({
|
|
|
2567
2433
|
return defaultTheme;
|
|
2568
2434
|
});
|
|
2569
2435
|
const [actualTheme, setActualTheme] = React5.useState("light");
|
|
2570
|
-
const getSystemTheme = () => {
|
|
2571
|
-
if (typeof window === "undefined") return "light";
|
|
2572
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2573
|
-
};
|
|
2574
2436
|
const setTheme = (newTheme) => {
|
|
2575
2437
|
try {
|
|
2576
2438
|
localStorage.setItem(storageKey, newTheme);
|
|
@@ -2630,7 +2492,7 @@ var useAtomicTheme = () => {
|
|
|
2630
2492
|
};
|
|
2631
2493
|
|
|
2632
2494
|
// src/index.ts
|
|
2633
|
-
var VERSION = "2.0
|
|
2495
|
+
var VERSION = "2.1.0";
|
|
2634
2496
|
|
|
2635
2497
|
exports.AnimationUtils = AnimationUtils;
|
|
2636
2498
|
exports.AtomicAlertType = AtomicAlertType;
|