@umituz/atomic-next 2.0.2 → 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 +400 -543
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +400 -543
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -4
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var clsx = require('clsx');
|
|
@@ -36,20 +37,14 @@ var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive)
|
|
|
36
37
|
var Image2__default = /*#__PURE__*/_interopDefault(Image2);
|
|
37
38
|
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
38
39
|
|
|
39
|
-
/**
|
|
40
|
-
* @umituz/atomic-next
|
|
41
|
-
* Atomic design system for Next.js
|
|
42
|
-
* https://umituz.com/opensource/atomic-next
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
40
|
// src/tokens/colors/atomic-colors.ts
|
|
46
41
|
var colors = {
|
|
47
|
-
primary: "#
|
|
48
|
-
primaryLight: "#
|
|
49
|
-
primaryDark: "#
|
|
50
|
-
secondary: "#
|
|
51
|
-
secondaryLight: "#
|
|
52
|
-
secondaryDark: "#
|
|
42
|
+
primary: "#2563eb",
|
|
43
|
+
primaryLight: "#3b82f6",
|
|
44
|
+
primaryDark: "#1d4ed8",
|
|
45
|
+
secondary: "#0d9488",
|
|
46
|
+
secondaryLight: "#14b8a6",
|
|
47
|
+
secondaryDark: "#0f766e",
|
|
53
48
|
accent: "#F59E0B",
|
|
54
49
|
accentLight: "#FBBF24",
|
|
55
50
|
accentDark: "#D97706",
|
|
@@ -177,7 +172,15 @@ var AtomicSpacingCss = {
|
|
|
177
172
|
// src/tokens/typography/atomic-typography.ts
|
|
178
173
|
var typography = {
|
|
179
174
|
fontFamily: {
|
|
180
|
-
sans: [
|
|
175
|
+
sans: [
|
|
176
|
+
"Inter",
|
|
177
|
+
"system-ui",
|
|
178
|
+
"-apple-system",
|
|
179
|
+
"BlinkMacSystemFont",
|
|
180
|
+
"Segoe UI",
|
|
181
|
+
"Roboto",
|
|
182
|
+
"sans-serif"
|
|
183
|
+
],
|
|
181
184
|
serif: ["Charter", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
|
|
182
185
|
mono: ["JetBrains Mono", "Fira Code", "Consolas", "Monaco", "Courier New", "monospace"]
|
|
183
186
|
},
|
|
@@ -276,14 +279,14 @@ var AtomicShadows = {
|
|
|
276
279
|
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
277
280
|
xxl: "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
278
281
|
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
|
279
|
-
focusPrimary: "0 0 0 3px rgb(
|
|
280
|
-
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)",
|
|
281
284
|
focusSuccess: "0 0 0 3px rgb(16 185 129 / 0.2)",
|
|
282
285
|
focusWarning: "0 0 0 3px rgb(245 158 11 / 0.2)",
|
|
283
286
|
focusError: "0 0 0 3px rgb(239 68 68 / 0.2)",
|
|
284
287
|
focusInfo: "0 0 0 3px rgb(59 130 246 / 0.2)",
|
|
285
|
-
glowPrimary: "0 0 20px rgb(
|
|
286
|
-
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)",
|
|
287
290
|
glowSuccess: "0 0 20px rgb(16 185 129 / 0.3)",
|
|
288
291
|
glowWarning: "0 0 20px rgb(245 158 11 / 0.3)",
|
|
289
292
|
glowError: "0 0 20px rgb(239 68 68 / 0.3)",
|
|
@@ -305,10 +308,10 @@ var ShadowUtils = {
|
|
|
305
308
|
combine: (...shadows) => {
|
|
306
309
|
return shadows.map((shadow) => AtomicShadows[shadow]).join(", ");
|
|
307
310
|
},
|
|
308
|
-
focus: (color = "
|
|
311
|
+
focus: (color = "37 99 235", opacity = 0.2) => {
|
|
309
312
|
return `0 0 0 3px rgb(${color} / ${opacity})`;
|
|
310
313
|
},
|
|
311
|
-
glow: (size = 20, color = "
|
|
314
|
+
glow: (size = 20, color = "37 99 235", opacity = 0.3) => {
|
|
312
315
|
return `0 0 ${size}px rgb(${color} / ${opacity})`;
|
|
313
316
|
}
|
|
314
317
|
};
|
|
@@ -579,7 +582,7 @@ var AtomicAnimationPresets = {
|
|
|
579
582
|
duration: "normal",
|
|
580
583
|
easing: "smooth"
|
|
581
584
|
}),
|
|
582
|
-
transform: "translateY(
|
|
585
|
+
transform: "translateY(-100%)"
|
|
583
586
|
},
|
|
584
587
|
buttonHover: {
|
|
585
588
|
...AnimationUtils.transition({
|
|
@@ -860,11 +863,7 @@ var AtomicButton = React5__default.default.forwardRef(
|
|
|
860
863
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
861
864
|
Comp,
|
|
862
865
|
{
|
|
863
|
-
className: cn(
|
|
864
|
-
buttonVariants({ variant, size }),
|
|
865
|
-
fullWidth && "w-full",
|
|
866
|
-
className
|
|
867
|
-
),
|
|
866
|
+
className: cn(buttonVariants({ variant, size }), fullWidth && "w-full", className),
|
|
868
867
|
style: {
|
|
869
868
|
...variant === "brand" && {
|
|
870
869
|
background: "linear-gradient(to right, var(--atomic-primary), var(--atomic-secondary))"
|
|
@@ -885,17 +884,29 @@ var AtomicButton = React5__default.default.forwardRef(
|
|
|
885
884
|
)
|
|
886
885
|
}
|
|
887
886
|
),
|
|
888
|
-
!loading && leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
889
|
-
"
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
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
|
+
),
|
|
893
898
|
children,
|
|
894
|
-
!loading && rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
895
|
-
"
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
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
|
+
)
|
|
899
910
|
]
|
|
900
911
|
}
|
|
901
912
|
);
|
|
@@ -998,25 +1009,22 @@ var AtomicText = React5__default.default.forwardRef(
|
|
|
998
1009
|
}
|
|
999
1010
|
);
|
|
1000
1011
|
AtomicText.displayName = "AtomicText";
|
|
1001
|
-
var avatarVariants = classVarianceAuthority.cva(
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
xxl: "h-20 w-20",
|
|
1012
|
-
xxxl: "h-24 w-24"
|
|
1013
|
-
}
|
|
1014
|
-
},
|
|
1015
|
-
defaultVariants: {
|
|
1016
|
-
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"
|
|
1017
1022
|
}
|
|
1023
|
+
},
|
|
1024
|
+
defaultVariants: {
|
|
1025
|
+
size: "default"
|
|
1018
1026
|
}
|
|
1019
|
-
);
|
|
1027
|
+
});
|
|
1020
1028
|
var avatarImageVariants = classVarianceAuthority.cva("aspect-square h-full w-full object-cover");
|
|
1021
1029
|
var avatarFallbackVariants = classVarianceAuthority.cva(
|
|
1022
1030
|
"flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",
|
|
@@ -1072,21 +1080,8 @@ var AtomicAvatar = React5__default.default.forwardRef(
|
|
|
1072
1080
|
className: cn(avatarVariants({ size }), className),
|
|
1073
1081
|
...props,
|
|
1074
1082
|
children: [
|
|
1075
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1076
|
-
|
|
1077
|
-
{
|
|
1078
|
-
className: avatarImageVariants(),
|
|
1079
|
-
src,
|
|
1080
|
-
alt
|
|
1081
|
-
}
|
|
1082
|
-
),
|
|
1083
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1084
|
-
AvatarPrimitive__namespace.Fallback,
|
|
1085
|
-
{
|
|
1086
|
-
className: avatarFallbackVariants({ size }),
|
|
1087
|
-
children: fallbackElement || initials
|
|
1088
|
-
}
|
|
1089
|
-
)
|
|
1083
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { className: avatarImageVariants(), src, alt }),
|
|
1084
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Fallback, { className: avatarFallbackVariants({ size }), children: fallbackElement || initials })
|
|
1090
1085
|
]
|
|
1091
1086
|
}
|
|
1092
1087
|
),
|
|
@@ -1105,14 +1100,7 @@ var AtomicAvatar = React5__default.default.forwardRef(
|
|
|
1105
1100
|
}
|
|
1106
1101
|
);
|
|
1107
1102
|
AtomicAvatar.displayName = "AtomicAvatar";
|
|
1108
|
-
var AtomicAvatarImage = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1109
|
-
AvatarPrimitive__namespace.Image,
|
|
1110
|
-
{
|
|
1111
|
-
ref,
|
|
1112
|
-
className: cn(avatarImageVariants(), className),
|
|
1113
|
-
...props
|
|
1114
|
-
}
|
|
1115
|
-
));
|
|
1103
|
+
var AtomicAvatarImage = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Image, { ref, className: cn(avatarImageVariants(), className), ...props }));
|
|
1116
1104
|
AtomicAvatarImage.displayName = "AtomicAvatarImage";
|
|
1117
1105
|
var AtomicAvatarFallback = React5__default.default.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1118
1106
|
AvatarPrimitive__namespace.Fallback,
|
|
@@ -1166,112 +1154,108 @@ var imageVariants = classVarianceAuthority.cva("transition-all duration-200", {
|
|
|
1166
1154
|
objectPosition: "center"
|
|
1167
1155
|
}
|
|
1168
1156
|
});
|
|
1169
|
-
var AtomicImage = React5__default.default.forwardRef(
|
|
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
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
variants: {
|
|
1208
|
-
variant: {
|
|
1209
|
-
default: "border-border bg-card shadow-sm",
|
|
1210
|
-
elevated: "border-0 bg-card shadow-lg",
|
|
1211
|
-
outlined: "border-2 border-border bg-card shadow-none",
|
|
1212
|
-
filled: "border-0 bg-muted shadow-none"
|
|
1213
|
-
},
|
|
1214
|
-
size: {
|
|
1215
|
-
sm: "p-4",
|
|
1216
|
-
md: "p-6",
|
|
1217
|
-
lg: "p-8",
|
|
1218
|
-
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
|
+
)
|
|
1219
1195
|
}
|
|
1220
|
-
|
|
1221
|
-
defaultVariants: {
|
|
1222
|
-
variant: "default",
|
|
1223
|
-
size: "md"
|
|
1224
|
-
}
|
|
1196
|
+
);
|
|
1225
1197
|
}
|
|
1226
1198
|
);
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
{
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
xl: "pb-8"
|
|
1236
|
-
}
|
|
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"
|
|
1237
1207
|
},
|
|
1238
|
-
|
|
1239
|
-
|
|
1208
|
+
size: {
|
|
1209
|
+
sm: "p-4",
|
|
1210
|
+
md: "p-6",
|
|
1211
|
+
lg: "p-8",
|
|
1212
|
+
xl: "p-10"
|
|
1240
1213
|
}
|
|
1214
|
+
},
|
|
1215
|
+
defaultVariants: {
|
|
1216
|
+
variant: "default",
|
|
1217
|
+
size: "md"
|
|
1241
1218
|
}
|
|
1242
|
-
);
|
|
1243
|
-
var
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
lg: "text-2xl",
|
|
1251
|
-
xl: "text-3xl"
|
|
1252
|
-
}
|
|
1253
|
-
},
|
|
1254
|
-
defaultVariants: {
|
|
1255
|
-
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"
|
|
1256
1227
|
}
|
|
1228
|
+
},
|
|
1229
|
+
defaultVariants: {
|
|
1230
|
+
size: "md"
|
|
1257
1231
|
}
|
|
1258
|
-
);
|
|
1259
|
-
var
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
lg: "text-base",
|
|
1267
|
-
xl: "text-lg"
|
|
1268
|
-
}
|
|
1269
|
-
},
|
|
1270
|
-
defaultVariants: {
|
|
1271
|
-
size: "md"
|
|
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"
|
|
1272
1240
|
}
|
|
1241
|
+
},
|
|
1242
|
+
defaultVariants: {
|
|
1243
|
+
size: "md"
|
|
1273
1244
|
}
|
|
1274
|
-
);
|
|
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"
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
defaultVariants: {
|
|
1256
|
+
size: "md"
|
|
1257
|
+
}
|
|
1258
|
+
});
|
|
1275
1259
|
var cardContentVariants = classVarianceAuthority.cva("", {
|
|
1276
1260
|
variants: {
|
|
1277
1261
|
size: {
|
|
@@ -1285,22 +1269,19 @@ var cardContentVariants = classVarianceAuthority.cva("", {
|
|
|
1285
1269
|
size: "md"
|
|
1286
1270
|
}
|
|
1287
1271
|
});
|
|
1288
|
-
var cardFooterVariants = classVarianceAuthority.cva(
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
lg: "pt-6",
|
|
1296
|
-
xl: "pt-8"
|
|
1297
|
-
}
|
|
1298
|
-
},
|
|
1299
|
-
defaultVariants: {
|
|
1300
|
-
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"
|
|
1301
1279
|
}
|
|
1280
|
+
},
|
|
1281
|
+
defaultVariants: {
|
|
1282
|
+
size: "md"
|
|
1302
1283
|
}
|
|
1303
|
-
);
|
|
1284
|
+
});
|
|
1304
1285
|
var AtomicCard = React5__default.default.forwardRef(
|
|
1305
1286
|
({ className, variant, size, interactive = false, fullWidth = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1306
1287
|
"div",
|
|
@@ -1318,58 +1299,23 @@ var AtomicCard = React5__default.default.forwardRef(
|
|
|
1318
1299
|
);
|
|
1319
1300
|
AtomicCard.displayName = "AtomicCard";
|
|
1320
1301
|
var AtomicCardHeader = React5__default.default.forwardRef(
|
|
1321
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1322
|
-
"div",
|
|
1323
|
-
{
|
|
1324
|
-
ref,
|
|
1325
|
-
className: cn(cardHeaderVariants({ size }), className),
|
|
1326
|
-
...props
|
|
1327
|
-
}
|
|
1328
|
-
)
|
|
1302
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cardHeaderVariants({ size }), className), ...props })
|
|
1329
1303
|
);
|
|
1330
1304
|
AtomicCardHeader.displayName = "AtomicCardHeader";
|
|
1331
1305
|
var AtomicCardTitle = React5__default.default.forwardRef(
|
|
1332
|
-
({ className, size, as: Component = "h3", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1333
|
-
Component,
|
|
1334
|
-
{
|
|
1335
|
-
ref,
|
|
1336
|
-
className: cn(cardTitleVariants({ size }), className),
|
|
1337
|
-
...props
|
|
1338
|
-
}
|
|
1339
|
-
)
|
|
1306
|
+
({ className, size, as: Component = "h3", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(cardTitleVariants({ size }), className), ...props })
|
|
1340
1307
|
);
|
|
1341
1308
|
AtomicCardTitle.displayName = "AtomicCardTitle";
|
|
1342
1309
|
var AtomicCardDescription = React5__default.default.forwardRef(
|
|
1343
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1344
|
-
"p",
|
|
1345
|
-
{
|
|
1346
|
-
ref,
|
|
1347
|
-
className: cn(cardDescriptionVariants({ size }), className),
|
|
1348
|
-
...props
|
|
1349
|
-
}
|
|
1350
|
-
)
|
|
1310
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn(cardDescriptionVariants({ size }), className), ...props })
|
|
1351
1311
|
);
|
|
1352
1312
|
AtomicCardDescription.displayName = "AtomicCardDescription";
|
|
1353
1313
|
var AtomicCardContent = React5__default.default.forwardRef(
|
|
1354
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1355
|
-
"div",
|
|
1356
|
-
{
|
|
1357
|
-
ref,
|
|
1358
|
-
className: cn(cardContentVariants({ size }), className),
|
|
1359
|
-
...props
|
|
1360
|
-
}
|
|
1361
|
-
)
|
|
1314
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cardContentVariants({ size }), className), ...props })
|
|
1362
1315
|
);
|
|
1363
1316
|
AtomicCardContent.displayName = "AtomicCardContent";
|
|
1364
1317
|
var AtomicCardFooter = React5__default.default.forwardRef(
|
|
1365
|
-
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1366
|
-
"div",
|
|
1367
|
-
{
|
|
1368
|
-
ref,
|
|
1369
|
-
className: cn(cardFooterVariants({ size }), className),
|
|
1370
|
-
...props
|
|
1371
|
-
}
|
|
1372
|
-
)
|
|
1318
|
+
({ className, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(cardFooterVariants({ size }), className), ...props })
|
|
1373
1319
|
);
|
|
1374
1320
|
AtomicCardFooter.displayName = "AtomicCardFooter";
|
|
1375
1321
|
var getSpacingClass = (spacing2, prefix) => {
|
|
@@ -1536,18 +1482,30 @@ var AtomicInput = React5__default.default.forwardRef(
|
|
|
1536
1482
|
const messageText = error || success || warning || helperText;
|
|
1537
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";
|
|
1538
1484
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-2", containerClassName), children: [
|
|
1539
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1540
|
-
"
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
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
|
+
),
|
|
1544
1496
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1545
|
-
leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1546
|
-
"
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
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
|
+
),
|
|
1551
1509
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1552
1510
|
"input",
|
|
1553
1511
|
{
|
|
@@ -1565,38 +1523,40 @@ var AtomicInput = React5__default.default.forwardRef(
|
|
|
1565
1523
|
...props
|
|
1566
1524
|
}
|
|
1567
1525
|
),
|
|
1568
|
-
(rightIcon || showClearButton || showPasswordToggleButton) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1569
|
-
"
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
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
|
+
)
|
|
1594
1558
|
] }),
|
|
1595
|
-
messageText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
1596
|
-
"text-xs",
|
|
1597
|
-
messageColor,
|
|
1598
|
-
helperClassName
|
|
1599
|
-
), children: messageText })
|
|
1559
|
+
messageText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs", messageColor, helperClassName), children: messageText })
|
|
1600
1560
|
] });
|
|
1601
1561
|
}
|
|
1602
1562
|
);
|
|
@@ -1680,7 +1640,8 @@ var AtomicCheckbox = React5__default.default.forwardRef(
|
|
|
1680
1640
|
id,
|
|
1681
1641
|
...rest
|
|
1682
1642
|
}, ref) => {
|
|
1683
|
-
const
|
|
1643
|
+
const generatedId = React5__default.default.useId();
|
|
1644
|
+
const checkboxId = id || `checkbox-${generatedId}`;
|
|
1684
1645
|
const sizeClasses = getSizeClasses(size);
|
|
1685
1646
|
const colorClasses = getColorClasses(color, error);
|
|
1686
1647
|
const handleChange = (event) => {
|
|
@@ -1760,10 +1721,7 @@ var AtomicCheckbox = React5__default.default.forwardRef(
|
|
|
1760
1721
|
children: label
|
|
1761
1722
|
}
|
|
1762
1723
|
),
|
|
1763
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
|
|
1764
|
-
"text-sm leading-5",
|
|
1765
|
-
error ? "text-red-600" : "text-gray-500"
|
|
1766
|
-
), children: description }),
|
|
1724
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm leading-5", error ? "text-red-600" : "text-gray-500"), children: description }),
|
|
1767
1725
|
error && errorMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-red-600", children: errorMessage })
|
|
1768
1726
|
] })
|
|
1769
1727
|
] });
|
|
@@ -1852,7 +1810,8 @@ var AtomicSwitch = React5__default.default.forwardRef(
|
|
|
1852
1810
|
id,
|
|
1853
1811
|
...rest
|
|
1854
1812
|
}, ref) => {
|
|
1855
|
-
const
|
|
1813
|
+
const generatedId = React5__default.default.useId();
|
|
1814
|
+
const switchId = id || `switch-${generatedId}`;
|
|
1856
1815
|
const sizeClasses = getSizeClasses2(size);
|
|
1857
1816
|
const colorClasses = getColorClasses2(color, checked);
|
|
1858
1817
|
const handleChange = (event) => {
|
|
@@ -1925,10 +1884,7 @@ var AtomicSwitch = React5__default.default.forwardRef(
|
|
|
1925
1884
|
}
|
|
1926
1885
|
) })
|
|
1927
1886
|
] });
|
|
1928
|
-
const labelElement = (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
1929
|
-
"flex-1",
|
|
1930
|
-
labelPosition === "left" ? "mr-3" : "ml-3"
|
|
1931
|
-
), children: [
|
|
1887
|
+
const labelElement = (label || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex-1", labelPosition === "left" ? "mr-3" : "ml-3"), children: [
|
|
1932
1888
|
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1933
1889
|
"label",
|
|
1934
1890
|
{
|
|
@@ -1977,71 +1933,34 @@ var spinnerVariants = classVarianceAuthority.cva("animate-spin", {
|
|
|
1977
1933
|
}
|
|
1978
1934
|
});
|
|
1979
1935
|
var AtomicSpinner = React5__default.default.forwardRef(
|
|
1980
|
-
({
|
|
1981
|
-
className,
|
|
1982
|
-
size,
|
|
1983
|
-
color,
|
|
1984
|
-
label,
|
|
1985
|
-
inline = false,
|
|
1986
|
-
icon: Icon = lucideReact.Loader2,
|
|
1987
|
-
...props
|
|
1988
|
-
}, ref) => {
|
|
1989
|
-
const spinner = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1990
|
-
Icon,
|
|
1991
|
-
{
|
|
1992
|
-
ref,
|
|
1993
|
-
className: cn(spinnerVariants({ size, color }), className),
|
|
1994
|
-
...props
|
|
1995
|
-
}
|
|
1996
|
-
);
|
|
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 });
|
|
1997
1938
|
if (!label) {
|
|
1998
1939
|
return spinner;
|
|
1999
1940
|
}
|
|
2000
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
2001
|
-
"flex items-center gap-2",
|
|
2002
|
-
inline ? "inline-flex" : "flex"
|
|
2003
|
-
), children: [
|
|
1941
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", inline ? "inline-flex" : "flex"), children: [
|
|
2004
1942
|
spinner,
|
|
2005
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2006
|
-
"
|
|
2007
|
-
|
|
2008
|
-
|
|
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
|
+
)
|
|
2009
1953
|
] });
|
|
2010
1954
|
}
|
|
2011
1955
|
);
|
|
2012
1956
|
AtomicSpinner.displayName = "AtomicSpinner";
|
|
2013
|
-
var AtomicButtonSpinner = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2014
|
-
AtomicSpinner,
|
|
2015
|
-
{
|
|
2016
|
-
ref,
|
|
2017
|
-
size: "sm",
|
|
2018
|
-
color: "white",
|
|
2019
|
-
className: cn("mr-2", className),
|
|
2020
|
-
...props
|
|
2021
|
-
}
|
|
2022
|
-
));
|
|
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 }));
|
|
2023
1958
|
AtomicButtonSpinner.displayName = "AtomicButtonSpinner";
|
|
2024
|
-
var AtomicPageSpinner = React5__default.default.forwardRef(
|
|
2025
|
-
AtomicSpinner,
|
|
2026
|
-
|
|
2027
|
-
ref,
|
|
2028
|
-
size: "lg",
|
|
2029
|
-
className,
|
|
2030
|
-
...props
|
|
2031
|
-
}
|
|
2032
|
-
) }));
|
|
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
|
+
);
|
|
2033
1962
|
AtomicPageSpinner.displayName = "AtomicPageSpinner";
|
|
2034
|
-
var AtomicInlineSpinner = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2035
|
-
AtomicSpinner,
|
|
2036
|
-
{
|
|
2037
|
-
ref,
|
|
2038
|
-
inline: true,
|
|
2039
|
-
size: "sm",
|
|
2040
|
-
color: "muted",
|
|
2041
|
-
className,
|
|
2042
|
-
...props
|
|
2043
|
-
}
|
|
2044
|
-
));
|
|
1963
|
+
var AtomicInlineSpinner = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AtomicSpinner, { ref, inline: true, size: "sm", color: "muted", className, ...props }));
|
|
2045
1964
|
AtomicInlineSpinner.displayName = "AtomicInlineSpinner";
|
|
2046
1965
|
var badgeVariants = classVarianceAuthority.cva(
|
|
2047
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",
|
|
@@ -2092,59 +2011,52 @@ var AtomicBadge = React5__default.default.forwardRef(
|
|
|
2092
2011
|
...props
|
|
2093
2012
|
}, ref) => {
|
|
2094
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";
|
|
2095
2015
|
const dotSize = size === "sm" ? "h-1.5 w-1.5" : size === "lg" ? "h-2.5 w-2.5" : "h-2 w-2";
|
|
2096
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
"span",
|
|
2105
|
-
{
|
|
2106
|
-
className: cn(
|
|
2107
|
-
"mr-1.5 rounded-full",
|
|
2108
|
-
dotSize,
|
|
2109
|
-
!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")
|
|
2110
|
-
),
|
|
2111
|
-
style: dotColor ? { backgroundColor: dotColor } : void 0
|
|
2112
|
-
}
|
|
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")
|
|
2113
2024
|
),
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
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",
|
|
2119
2043
|
{
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
children:
|
|
2128
|
-
"
|
|
2129
|
-
{
|
|
2130
|
-
|
|
2131
|
-
viewBox: "0 0 24 24",
|
|
2132
|
-
fill: "none",
|
|
2133
|
-
stroke: "currentColor",
|
|
2134
|
-
strokeWidth: "2",
|
|
2135
|
-
strokeLinecap: "round",
|
|
2136
|
-
strokeLinejoin: "round",
|
|
2137
|
-
children: [
|
|
2138
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2139
|
-
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2140
|
-
]
|
|
2141
|
-
}
|
|
2142
|
-
)
|
|
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
|
+
]
|
|
2143
2055
|
}
|
|
2144
2056
|
)
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
);
|
|
2057
|
+
}
|
|
2058
|
+
)
|
|
2059
|
+
] });
|
|
2148
2060
|
}
|
|
2149
2061
|
);
|
|
2150
2062
|
AtomicBadge.displayName = "AtomicBadge";
|
|
@@ -2156,31 +2068,13 @@ var AtomicStatusBadge = React5__default.default.forwardRef(({ status, variant, .
|
|
|
2156
2068
|
away: { variant: "warning", dot: true, children: "Away" }
|
|
2157
2069
|
};
|
|
2158
2070
|
const config = statusConfig[status];
|
|
2159
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2160
|
-
AtomicBadge,
|
|
2161
|
-
{
|
|
2162
|
-
ref,
|
|
2163
|
-
variant: variant || config.variant,
|
|
2164
|
-
dot: config.dot,
|
|
2165
|
-
...props,
|
|
2166
|
-
children: props.children || config.children
|
|
2167
|
-
}
|
|
2168
|
-
);
|
|
2071
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AtomicBadge, { ref, variant: variant || config.variant, dot: config.dot, ...props, children: props.children || config.children });
|
|
2169
2072
|
});
|
|
2170
2073
|
AtomicStatusBadge.displayName = "AtomicStatusBadge";
|
|
2171
2074
|
var AtomicCountBadge = React5__default.default.forwardRef(({ count, max = 99, ...props }, ref) => {
|
|
2172
2075
|
const displayCount = count > max ? `${max}+` : count.toString();
|
|
2173
2076
|
if (count <= 0) return null;
|
|
2174
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2175
|
-
AtomicBadge,
|
|
2176
|
-
{
|
|
2177
|
-
ref,
|
|
2178
|
-
variant: "destructive",
|
|
2179
|
-
size: "sm",
|
|
2180
|
-
...props,
|
|
2181
|
-
children: displayCount
|
|
2182
|
-
}
|
|
2183
|
-
);
|
|
2077
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AtomicBadge, { ref, variant: "destructive", size: "sm", ...props, children: displayCount });
|
|
2184
2078
|
});
|
|
2185
2079
|
AtomicCountBadge.displayName = "AtomicCountBadge";
|
|
2186
2080
|
var getSpacingClass4 = (spacing2, prefix) => {
|
|
@@ -2286,27 +2180,9 @@ var AtomicTag = React5__default.default.forwardRef(
|
|
|
2286
2180
|
className
|
|
2287
2181
|
);
|
|
2288
2182
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2289
|
-
LeftIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2290
|
-
LeftIcon,
|
|
2291
|
-
{
|
|
2292
|
-
size: iconSize,
|
|
2293
|
-
className: cn(
|
|
2294
|
-
"flex-shrink-0",
|
|
2295
|
-
children ? "mr-1.5" : ""
|
|
2296
|
-
)
|
|
2297
|
-
}
|
|
2298
|
-
),
|
|
2183
|
+
LeftIcon && /* @__PURE__ */ jsxRuntime.jsx(LeftIcon, { size: iconSize, className: cn("flex-shrink-0", children ? "mr-1.5" : "") }),
|
|
2299
2184
|
children && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
|
|
2300
|
-
RightIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2301
|
-
RightIcon,
|
|
2302
|
-
{
|
|
2303
|
-
size: iconSize,
|
|
2304
|
-
className: cn(
|
|
2305
|
-
"flex-shrink-0",
|
|
2306
|
-
children ? "ml-1.5" : ""
|
|
2307
|
-
)
|
|
2308
|
-
}
|
|
2309
|
-
),
|
|
2185
|
+
RightIcon && /* @__PURE__ */ jsxRuntime.jsx(RightIcon, { size: iconSize, className: cn("flex-shrink-0", children ? "ml-1.5" : "") }),
|
|
2310
2186
|
removable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2311
2187
|
"button",
|
|
2312
2188
|
{
|
|
@@ -2323,24 +2199,15 @@ var AtomicTag = React5__default.default.forwardRef(
|
|
|
2323
2199
|
},
|
|
2324
2200
|
disabled,
|
|
2325
2201
|
"aria-label": "Remove",
|
|
2326
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2327
|
-
"
|
|
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",
|
|
2328
2204
|
{
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2334
|
-
"path",
|
|
2335
|
-
{
|
|
2336
|
-
strokeLinecap: "round",
|
|
2337
|
-
strokeLinejoin: "round",
|
|
2338
|
-
strokeWidth: 2,
|
|
2339
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
2340
|
-
}
|
|
2341
|
-
)
|
|
2205
|
+
strokeLinecap: "round",
|
|
2206
|
+
strokeLinejoin: "round",
|
|
2207
|
+
strokeWidth: 2,
|
|
2208
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
2342
2209
|
}
|
|
2343
|
-
)
|
|
2210
|
+
) })
|
|
2344
2211
|
}
|
|
2345
2212
|
)
|
|
2346
2213
|
] });
|
|
@@ -2349,114 +2216,102 @@ var AtomicTag = React5__default.default.forwardRef(
|
|
|
2349
2216
|
onClick?.(e);
|
|
2350
2217
|
}
|
|
2351
2218
|
};
|
|
2352
|
-
return
|
|
2219
|
+
return React5__default.default.createElement(
|
|
2353
2220
|
Component,
|
|
2354
2221
|
{
|
|
2355
2222
|
ref,
|
|
2356
2223
|
className: classes,
|
|
2357
2224
|
onClick: clickable ? handleClick : void 0,
|
|
2358
|
-
...rest
|
|
2359
|
-
|
|
2360
|
-
|
|
2225
|
+
...rest
|
|
2226
|
+
},
|
|
2227
|
+
content
|
|
2361
2228
|
);
|
|
2362
2229
|
}
|
|
2363
2230
|
);
|
|
2364
2231
|
AtomicTag.displayName = "AtomicTag";
|
|
2365
|
-
var linkVariants = classVarianceAuthority.cva(
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
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
|
+
}
|
|
2382
2258
|
},
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
bold: "font-bold"
|
|
2259
|
+
defaultVariants: {
|
|
2260
|
+
variant: "default",
|
|
2261
|
+
size: "default",
|
|
2262
|
+
weight: "normal"
|
|
2388
2263
|
}
|
|
2389
|
-
},
|
|
2390
|
-
defaultVariants: {
|
|
2391
|
-
variant: "default",
|
|
2392
|
-
size: "default",
|
|
2393
|
-
weight: "normal"
|
|
2394
2264
|
}
|
|
2395
|
-
|
|
2396
|
-
var AtomicLink = React5__default.default.forwardRef(
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
href,
|
|
2407
|
-
...props
|
|
2408
|
-
}, ref) => {
|
|
2409
|
-
const isExternalUrl = typeof href === "string" && (href.startsWith("http") || href.startsWith("//"));
|
|
2410
|
-
const shouldBeExternal = external || isExternalUrl;
|
|
2411
|
-
const linkProps = {
|
|
2412
|
-
className: cn(linkVariants({ variant, size, weight }), className),
|
|
2413
|
-
ref,
|
|
2414
|
-
...props
|
|
2415
|
-
};
|
|
2416
|
-
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,
|
|
2417
2276
|
children,
|
|
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
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
{
|
|
2453
|
-
href,
|
|
2454
|
-
prefetch,
|
|
2455
|
-
...linkProps,
|
|
2456
|
-
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 });
|
|
2457
2311
|
}
|
|
2458
|
-
|
|
2459
|
-
}
|
|
2312
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href, prefetch, ...linkProps, children: content });
|
|
2313
|
+
}
|
|
2314
|
+
);
|
|
2460
2315
|
AtomicLink.displayName = "AtomicLink";
|
|
2461
2316
|
var getSpacingClass5 = (spacing2, prefix) => {
|
|
2462
2317
|
if (!spacing2) return "";
|
|
@@ -2508,10 +2363,10 @@ var AtomicDiv = React5__default.default.forwardRef(
|
|
|
2508
2363
|
...rest
|
|
2509
2364
|
}, ref) => {
|
|
2510
2365
|
const classes = cn(
|
|
2511
|
-
d
|
|
2512
|
-
align && `items-${align
|
|
2513
|
-
justify && `justify-${justify
|
|
2514
|
-
flexDir && `flex-${flexDir
|
|
2366
|
+
d,
|
|
2367
|
+
align && `items-${align}`,
|
|
2368
|
+
justify && `justify-${justify}`,
|
|
2369
|
+
flexDir && `flex-${flexDir}`,
|
|
2515
2370
|
flexWrap && `flex-${flexWrap}`,
|
|
2516
2371
|
flexGrow !== void 0 && `flex-grow-${flexGrow}`,
|
|
2517
2372
|
flexShrink !== void 0 && `flex-shrink-${flexShrink}`,
|
|
@@ -2529,9 +2384,9 @@ var AtomicDiv = React5__default.default.forwardRef(
|
|
|
2529
2384
|
border === true && "border",
|
|
2530
2385
|
typeof border === "string" && border,
|
|
2531
2386
|
borderColor && `border-${borderColor}`,
|
|
2532
|
-
rounded && `rounded
|
|
2533
|
-
shadow && `shadow
|
|
2534
|
-
position
|
|
2387
|
+
rounded && `rounded-${rounded}`,
|
|
2388
|
+
shadow && `shadow-${shadow}`,
|
|
2389
|
+
position,
|
|
2535
2390
|
top !== void 0 && `top-${top}`,
|
|
2536
2391
|
right !== void 0 && `right-${right}`,
|
|
2537
2392
|
bottom !== void 0 && `bottom-${bottom}`,
|
|
@@ -2551,7 +2406,13 @@ var AtomicDiv = React5__default.default.forwardRef(
|
|
|
2551
2406
|
}
|
|
2552
2407
|
);
|
|
2553
2408
|
AtomicDiv.displayName = "AtomicDiv";
|
|
2554
|
-
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
|
+
};
|
|
2555
2416
|
var AtomicThemeProvider = ({
|
|
2556
2417
|
children,
|
|
2557
2418
|
defaultTheme = "system",
|
|
@@ -2572,10 +2433,6 @@ var AtomicThemeProvider = ({
|
|
|
2572
2433
|
return defaultTheme;
|
|
2573
2434
|
});
|
|
2574
2435
|
const [actualTheme, setActualTheme] = React5.useState("light");
|
|
2575
|
-
const getSystemTheme = () => {
|
|
2576
|
-
if (typeof window === "undefined") return "light";
|
|
2577
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2578
|
-
};
|
|
2579
2436
|
const setTheme = (newTheme) => {
|
|
2580
2437
|
try {
|
|
2581
2438
|
localStorage.setItem(storageKey, newTheme);
|
|
@@ -2635,7 +2492,7 @@ var useAtomicTheme = () => {
|
|
|
2635
2492
|
};
|
|
2636
2493
|
|
|
2637
2494
|
// src/index.ts
|
|
2638
|
-
var VERSION = "2.
|
|
2495
|
+
var VERSION = "2.1.0";
|
|
2639
2496
|
|
|
2640
2497
|
exports.AnimationUtils = AnimationUtils;
|
|
2641
2498
|
exports.AtomicAlertType = AtomicAlertType;
|