@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.mjs CHANGED
@@ -12,12 +12,12 @@ import Link from 'next/link';
12
12
 
13
13
  // src/tokens/colors/atomic-colors.ts
14
14
  var colors = {
15
- primary: "#9333EA",
16
- primaryLight: "#A855F7",
17
- primaryDark: "#7C3AED",
18
- secondary: "#EC4899",
19
- secondaryLight: "#F472B6",
20
- secondaryDark: "#DB2777",
15
+ primary: "#2563eb",
16
+ primaryLight: "#3b82f6",
17
+ primaryDark: "#1d4ed8",
18
+ secondary: "#0d9488",
19
+ secondaryLight: "#14b8a6",
20
+ secondaryDark: "#0f766e",
21
21
  accent: "#F59E0B",
22
22
  accentLight: "#FBBF24",
23
23
  accentDark: "#D97706",
@@ -145,7 +145,15 @@ var AtomicSpacingCss = {
145
145
  // src/tokens/typography/atomic-typography.ts
146
146
  var typography = {
147
147
  fontFamily: {
148
- sans: ["Inter", "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "sans-serif"],
148
+ sans: [
149
+ "Inter",
150
+ "system-ui",
151
+ "-apple-system",
152
+ "BlinkMacSystemFont",
153
+ "Segoe UI",
154
+ "Roboto",
155
+ "sans-serif"
156
+ ],
149
157
  serif: ["Charter", "Georgia", "Cambria", "Times New Roman", "Times", "serif"],
150
158
  mono: ["JetBrains Mono", "Fira Code", "Consolas", "Monaco", "Courier New", "monospace"]
151
159
  },
@@ -244,14 +252,14 @@ var AtomicShadows = {
244
252
  xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
245
253
  xxl: "0 25px 50px -12px rgb(0 0 0 / 0.25)",
246
254
  inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
247
- focusPrimary: "0 0 0 3px rgb(139 92 246 / 0.2)",
248
- focusSecondary: "0 0 0 3px rgb(236 72 153 / 0.2)",
255
+ focusPrimary: "0 0 0 3px rgb(37 99 235 / 0.2)",
256
+ focusSecondary: "0 0 0 3px rgb(13 148 136 / 0.2)",
249
257
  focusSuccess: "0 0 0 3px rgb(16 185 129 / 0.2)",
250
258
  focusWarning: "0 0 0 3px rgb(245 158 11 / 0.2)",
251
259
  focusError: "0 0 0 3px rgb(239 68 68 / 0.2)",
252
260
  focusInfo: "0 0 0 3px rgb(59 130 246 / 0.2)",
253
- glowPrimary: "0 0 20px rgb(139 92 246 / 0.3)",
254
- glowSecondary: "0 0 20px rgb(236 72 153 / 0.3)",
261
+ glowPrimary: "0 0 20px rgb(37 99 235 / 0.3)",
262
+ glowSecondary: "0 0 20px rgb(13 148 136 / 0.3)",
255
263
  glowSuccess: "0 0 20px rgb(16 185 129 / 0.3)",
256
264
  glowWarning: "0 0 20px rgb(245 158 11 / 0.3)",
257
265
  glowError: "0 0 20px rgb(239 68 68 / 0.3)",
@@ -273,10 +281,10 @@ var ShadowUtils = {
273
281
  combine: (...shadows) => {
274
282
  return shadows.map((shadow) => AtomicShadows[shadow]).join(", ");
275
283
  },
276
- focus: (color = "139 92 246", opacity = 0.2) => {
284
+ focus: (color = "37 99 235", opacity = 0.2) => {
277
285
  return `0 0 0 3px rgb(${color} / ${opacity})`;
278
286
  },
279
- glow: (size = 20, color = "139 92 246", opacity = 0.3) => {
287
+ glow: (size = 20, color = "37 99 235", opacity = 0.3) => {
280
288
  return `0 0 ${size}px rgb(${color} / ${opacity})`;
281
289
  }
282
290
  };
@@ -547,7 +555,7 @@ var AtomicAnimationPresets = {
547
555
  duration: "normal",
548
556
  easing: "smooth"
549
557
  }),
550
- transform: "translateY(0)"
558
+ transform: "translateY(-100%)"
551
559
  },
552
560
  buttonHover: {
553
561
  ...AnimationUtils.transition({
@@ -828,11 +836,7 @@ var AtomicButton = React5.forwardRef(
828
836
  return /* @__PURE__ */ jsxs(
829
837
  Comp,
830
838
  {
831
- className: cn(
832
- buttonVariants({ variant, size }),
833
- fullWidth && "w-full",
834
- className
835
- ),
839
+ className: cn(buttonVariants({ variant, size }), fullWidth && "w-full", className),
836
840
  style: {
837
841
  ...variant === "brand" && {
838
842
  background: "linear-gradient(to right, var(--atomic-primary), var(--atomic-secondary))"
@@ -853,17 +857,29 @@ var AtomicButton = React5.forwardRef(
853
857
  )
854
858
  }
855
859
  ),
856
- !loading && leftIcon && /* @__PURE__ */ jsx("span", { className: cn(
857
- "inline-flex items-center",
858
- size === "sm" ? "mr-1" : "mr-2",
859
- size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
860
- ), children: leftIcon }),
860
+ !loading && leftIcon && /* @__PURE__ */ jsx(
861
+ "span",
862
+ {
863
+ className: cn(
864
+ "inline-flex items-center",
865
+ size === "sm" ? "mr-1" : "mr-2",
866
+ size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
867
+ ),
868
+ children: leftIcon
869
+ }
870
+ ),
861
871
  children,
862
- !loading && rightIcon && /* @__PURE__ */ jsx("span", { className: cn(
863
- "inline-flex items-center",
864
- size === "sm" ? "ml-1" : "ml-2",
865
- size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
866
- ), children: rightIcon })
872
+ !loading && rightIcon && /* @__PURE__ */ jsx(
873
+ "span",
874
+ {
875
+ className: cn(
876
+ "inline-flex items-center",
877
+ size === "sm" ? "ml-1" : "ml-2",
878
+ size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-5 [&>*]:w-5" : "[&>*]:h-4 [&>*]:w-4"
879
+ ),
880
+ children: rightIcon
881
+ }
882
+ )
867
883
  ]
868
884
  }
869
885
  );
@@ -966,25 +982,22 @@ var AtomicText = React5.forwardRef(
966
982
  }
967
983
  );
968
984
  AtomicText.displayName = "AtomicText";
969
- var avatarVariants = cva(
970
- "relative flex shrink-0 overflow-hidden rounded-full",
971
- {
972
- variants: {
973
- size: {
974
- xs: "h-6 w-6",
975
- sm: "h-8 w-8",
976
- default: "h-10 w-10",
977
- lg: "h-12 w-12",
978
- xl: "h-16 w-16",
979
- xxl: "h-20 w-20",
980
- xxxl: "h-24 w-24"
981
- }
982
- },
983
- defaultVariants: {
984
- size: "default"
985
+ var avatarVariants = cva("relative flex shrink-0 overflow-hidden rounded-full", {
986
+ variants: {
987
+ size: {
988
+ xs: "h-6 w-6",
989
+ sm: "h-8 w-8",
990
+ default: "h-10 w-10",
991
+ lg: "h-12 w-12",
992
+ xl: "h-16 w-16",
993
+ xxl: "h-20 w-20",
994
+ xxxl: "h-24 w-24"
985
995
  }
996
+ },
997
+ defaultVariants: {
998
+ size: "default"
986
999
  }
987
- );
1000
+ });
988
1001
  var avatarImageVariants = cva("aspect-square h-full w-full object-cover");
989
1002
  var avatarFallbackVariants = cva(
990
1003
  "flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",
@@ -1040,21 +1053,8 @@ var AtomicAvatar = React5.forwardRef(
1040
1053
  className: cn(avatarVariants({ size }), className),
1041
1054
  ...props,
1042
1055
  children: [
1043
- /* @__PURE__ */ jsx(
1044
- AvatarPrimitive.Image,
1045
- {
1046
- className: avatarImageVariants(),
1047
- src,
1048
- alt
1049
- }
1050
- ),
1051
- /* @__PURE__ */ jsx(
1052
- AvatarPrimitive.Fallback,
1053
- {
1054
- className: avatarFallbackVariants({ size }),
1055
- children: fallbackElement || initials
1056
- }
1057
- )
1056
+ /* @__PURE__ */ jsx(AvatarPrimitive.Image, { className: avatarImageVariants(), src, alt }),
1057
+ /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, { className: avatarFallbackVariants({ size }), children: fallbackElement || initials })
1058
1058
  ]
1059
1059
  }
1060
1060
  ),
@@ -1073,14 +1073,7 @@ var AtomicAvatar = React5.forwardRef(
1073
1073
  }
1074
1074
  );
1075
1075
  AtomicAvatar.displayName = "AtomicAvatar";
1076
- var AtomicAvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1077
- AvatarPrimitive.Image,
1078
- {
1079
- ref,
1080
- className: cn(avatarImageVariants(), className),
1081
- ...props
1082
- }
1083
- ));
1076
+ var AtomicAvatarImage = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn(avatarImageVariants(), className), ...props }));
1084
1077
  AtomicAvatarImage.displayName = "AtomicAvatarImage";
1085
1078
  var AtomicAvatarFallback = React5.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1086
1079
  AvatarPrimitive.Fallback,
@@ -1134,112 +1127,108 @@ var imageVariants = cva("transition-all duration-200", {
1134
1127
  objectPosition: "center"
1135
1128
  }
1136
1129
  });
1137
- var AtomicImage = React5.forwardRef(({
1138
- className,
1139
- containerClassName,
1140
- rounded,
1141
- aspectRatio,
1142
- objectFit,
1143
- objectPosition,
1144
- enableBlur = false,
1145
- placeholderSrc,
1146
- ...props
1147
- }, ref) => {
1148
- return /* @__PURE__ */ jsx("div", { className: cn(
1149
- "relative overflow-hidden",
1150
- aspectRatio && imageVariants({ aspectRatio }),
1151
- containerClassName
1152
- ), children: /* @__PURE__ */ jsx(
1153
- Image2,
1154
- {
1155
- ref,
1156
- className: cn(
1157
- imageVariants({
1158
- rounded,
1159
- objectFit,
1160
- objectPosition,
1161
- aspectRatio: void 0
1162
- }),
1163
- className
1164
- ),
1165
- placeholder: enableBlur || placeholderSrc ? "blur" : "empty",
1166
- blurDataURL: placeholderSrc,
1167
- ...props
1168
- }
1169
- ) });
1170
- });
1171
- AtomicImage.displayName = "AtomicImage";
1172
- var cardVariants = cva(
1173
- "rounded-lg border text-card-foreground",
1174
- {
1175
- variants: {
1176
- variant: {
1177
- default: "border-border bg-card shadow-sm",
1178
- elevated: "border-0 bg-card shadow-lg",
1179
- outlined: "border-2 border-border bg-card shadow-none",
1180
- filled: "border-0 bg-muted shadow-none"
1181
- },
1182
- size: {
1183
- sm: "p-4",
1184
- md: "p-6",
1185
- lg: "p-8",
1186
- xl: "p-10"
1130
+ var AtomicImage = React5.forwardRef(
1131
+ ({
1132
+ className,
1133
+ containerClassName,
1134
+ rounded,
1135
+ aspectRatio,
1136
+ objectFit,
1137
+ objectPosition,
1138
+ enableBlur = false,
1139
+ placeholderSrc,
1140
+ ...props
1141
+ }, ref) => {
1142
+ return /* @__PURE__ */ jsx(
1143
+ "div",
1144
+ {
1145
+ className: cn(
1146
+ "relative overflow-hidden",
1147
+ aspectRatio && imageVariants({ aspectRatio }),
1148
+ containerClassName
1149
+ ),
1150
+ children: /* @__PURE__ */ jsx(
1151
+ Image2,
1152
+ {
1153
+ ref,
1154
+ className: cn(
1155
+ imageVariants({
1156
+ rounded,
1157
+ objectFit,
1158
+ objectPosition,
1159
+ aspectRatio: void 0
1160
+ }),
1161
+ className
1162
+ ),
1163
+ placeholder: enableBlur || placeholderSrc ? "blur" : "empty",
1164
+ blurDataURL: placeholderSrc,
1165
+ ...props
1166
+ }
1167
+ )
1187
1168
  }
1188
- },
1189
- defaultVariants: {
1190
- variant: "default",
1191
- size: "md"
1192
- }
1169
+ );
1193
1170
  }
1194
1171
  );
1195
- var cardHeaderVariants = cva(
1196
- "flex flex-col space-y-1.5",
1197
- {
1198
- variants: {
1199
- size: {
1200
- sm: "pb-3",
1201
- md: "pb-4",
1202
- lg: "pb-6",
1203
- xl: "pb-8"
1204
- }
1172
+ AtomicImage.displayName = "AtomicImage";
1173
+ var cardVariants = cva("rounded-lg border text-card-foreground", {
1174
+ variants: {
1175
+ variant: {
1176
+ default: "border-border bg-card shadow-sm",
1177
+ elevated: "border-0 bg-card shadow-lg",
1178
+ outlined: "border-2 border-border bg-card shadow-none",
1179
+ filled: "border-0 bg-muted shadow-none"
1205
1180
  },
1206
- defaultVariants: {
1207
- size: "md"
1181
+ size: {
1182
+ sm: "p-4",
1183
+ md: "p-6",
1184
+ lg: "p-8",
1185
+ xl: "p-10"
1208
1186
  }
1187
+ },
1188
+ defaultVariants: {
1189
+ variant: "default",
1190
+ size: "md"
1209
1191
  }
1210
- );
1211
- var cardTitleVariants = cva(
1212
- "font-semibold leading-none tracking-tight",
1213
- {
1214
- variants: {
1215
- size: {
1216
- sm: "text-lg",
1217
- md: "text-xl",
1218
- lg: "text-2xl",
1219
- xl: "text-3xl"
1220
- }
1221
- },
1222
- defaultVariants: {
1223
- size: "md"
1192
+ });
1193
+ var cardHeaderVariants = cva("flex flex-col space-y-1.5", {
1194
+ variants: {
1195
+ size: {
1196
+ sm: "pb-3",
1197
+ md: "pb-4",
1198
+ lg: "pb-6",
1199
+ xl: "pb-8"
1224
1200
  }
1201
+ },
1202
+ defaultVariants: {
1203
+ size: "md"
1225
1204
  }
1226
- );
1227
- var cardDescriptionVariants = cva(
1228
- "text-muted-foreground",
1229
- {
1230
- variants: {
1231
- size: {
1232
- sm: "text-sm",
1233
- md: "text-sm",
1234
- lg: "text-base",
1235
- xl: "text-lg"
1236
- }
1237
- },
1238
- defaultVariants: {
1239
- size: "md"
1205
+ });
1206
+ var cardTitleVariants = cva("font-semibold leading-none tracking-tight", {
1207
+ variants: {
1208
+ size: {
1209
+ sm: "text-lg",
1210
+ md: "text-xl",
1211
+ lg: "text-2xl",
1212
+ xl: "text-3xl"
1213
+ }
1214
+ },
1215
+ defaultVariants: {
1216
+ size: "md"
1217
+ }
1218
+ });
1219
+ var cardDescriptionVariants = cva("text-muted-foreground", {
1220
+ variants: {
1221
+ size: {
1222
+ sm: "text-sm",
1223
+ md: "text-sm",
1224
+ lg: "text-base",
1225
+ xl: "text-lg"
1240
1226
  }
1227
+ },
1228
+ defaultVariants: {
1229
+ size: "md"
1241
1230
  }
1242
- );
1231
+ });
1243
1232
  var cardContentVariants = cva("", {
1244
1233
  variants: {
1245
1234
  size: {
@@ -1253,22 +1242,19 @@ var cardContentVariants = cva("", {
1253
1242
  size: "md"
1254
1243
  }
1255
1244
  });
1256
- var cardFooterVariants = cva(
1257
- "flex items-center",
1258
- {
1259
- variants: {
1260
- size: {
1261
- sm: "pt-3",
1262
- md: "pt-4",
1263
- lg: "pt-6",
1264
- xl: "pt-8"
1265
- }
1266
- },
1267
- defaultVariants: {
1268
- size: "md"
1245
+ var cardFooterVariants = cva("flex items-center", {
1246
+ variants: {
1247
+ size: {
1248
+ sm: "pt-3",
1249
+ md: "pt-4",
1250
+ lg: "pt-6",
1251
+ xl: "pt-8"
1269
1252
  }
1253
+ },
1254
+ defaultVariants: {
1255
+ size: "md"
1270
1256
  }
1271
- );
1257
+ });
1272
1258
  var AtomicCard = React5.forwardRef(
1273
1259
  ({ className, variant, size, interactive = false, fullWidth = false, ...props }, ref) => /* @__PURE__ */ jsx(
1274
1260
  "div",
@@ -1286,58 +1272,23 @@ var AtomicCard = React5.forwardRef(
1286
1272
  );
1287
1273
  AtomicCard.displayName = "AtomicCard";
1288
1274
  var AtomicCardHeader = React5.forwardRef(
1289
- ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1290
- "div",
1291
- {
1292
- ref,
1293
- className: cn(cardHeaderVariants({ size }), className),
1294
- ...props
1295
- }
1296
- )
1275
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(cardHeaderVariants({ size }), className), ...props })
1297
1276
  );
1298
1277
  AtomicCardHeader.displayName = "AtomicCardHeader";
1299
1278
  var AtomicCardTitle = React5.forwardRef(
1300
- ({ className, size, as: Component = "h3", ...props }, ref) => /* @__PURE__ */ jsx(
1301
- Component,
1302
- {
1303
- ref,
1304
- className: cn(cardTitleVariants({ size }), className),
1305
- ...props
1306
- }
1307
- )
1279
+ ({ className, size, as: Component = "h3", ...props }, ref) => /* @__PURE__ */ jsx(Component, { ref, className: cn(cardTitleVariants({ size }), className), ...props })
1308
1280
  );
1309
1281
  AtomicCardTitle.displayName = "AtomicCardTitle";
1310
1282
  var AtomicCardDescription = React5.forwardRef(
1311
- ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1312
- "p",
1313
- {
1314
- ref,
1315
- className: cn(cardDescriptionVariants({ size }), className),
1316
- ...props
1317
- }
1318
- )
1283
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn(cardDescriptionVariants({ size }), className), ...props })
1319
1284
  );
1320
1285
  AtomicCardDescription.displayName = "AtomicCardDescription";
1321
1286
  var AtomicCardContent = React5.forwardRef(
1322
- ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1323
- "div",
1324
- {
1325
- ref,
1326
- className: cn(cardContentVariants({ size }), className),
1327
- ...props
1328
- }
1329
- )
1287
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(cardContentVariants({ size }), className), ...props })
1330
1288
  );
1331
1289
  AtomicCardContent.displayName = "AtomicCardContent";
1332
1290
  var AtomicCardFooter = React5.forwardRef(
1333
- ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(
1334
- "div",
1335
- {
1336
- ref,
1337
- className: cn(cardFooterVariants({ size }), className),
1338
- ...props
1339
- }
1340
- )
1291
+ ({ className, size, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(cardFooterVariants({ size }), className), ...props })
1341
1292
  );
1342
1293
  AtomicCardFooter.displayName = "AtomicCardFooter";
1343
1294
  var getSpacingClass = (spacing2, prefix) => {
@@ -1504,18 +1455,30 @@ var AtomicInput = React5.forwardRef(
1504
1455
  const messageText = error || success || warning || helperText;
1505
1456
  const messageColor = error ? "text-destructive" : success ? "text-green-600 dark:text-green-400" : warning ? "text-amber-600 dark:text-amber-400" : "text-muted-foreground";
1506
1457
  return /* @__PURE__ */ jsxs("div", { className: cn("space-y-2", containerClassName), children: [
1507
- label && /* @__PURE__ */ jsx("label", { className: cn(
1508
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
1509
- disabled && "opacity-50",
1510
- labelClassName
1511
- ), children: label }),
1458
+ label && /* @__PURE__ */ jsx(
1459
+ "label",
1460
+ {
1461
+ className: cn(
1462
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
1463
+ disabled && "opacity-50",
1464
+ labelClassName
1465
+ ),
1466
+ children: label
1467
+ }
1468
+ ),
1512
1469
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1513
- leftIcon && /* @__PURE__ */ jsx("div", { className: cn(
1514
- "absolute left-0 top-0 h-full flex items-center justify-center",
1515
- size === "sm" ? "w-8 pl-2" : size === "lg" ? "w-12 pl-4" : "w-10 pl-3",
1516
- "text-muted-foreground pointer-events-none",
1517
- "[&>*]:h-4 [&>*]:w-4"
1518
- ), children: leftIcon }),
1470
+ leftIcon && /* @__PURE__ */ jsx(
1471
+ "div",
1472
+ {
1473
+ className: cn(
1474
+ "absolute left-0 top-0 h-full flex items-center justify-center",
1475
+ size === "sm" ? "w-8 pl-2" : size === "lg" ? "w-12 pl-4" : "w-10 pl-3",
1476
+ "text-muted-foreground pointer-events-none",
1477
+ "[&>*]:h-4 [&>*]:w-4"
1478
+ ),
1479
+ children: leftIcon
1480
+ }
1481
+ ),
1519
1482
  /* @__PURE__ */ jsx(
1520
1483
  "input",
1521
1484
  {
@@ -1533,38 +1496,40 @@ var AtomicInput = React5.forwardRef(
1533
1496
  ...props
1534
1497
  }
1535
1498
  ),
1536
- (rightIcon || showClearButton || showPasswordToggleButton) && /* @__PURE__ */ jsxs("div", { className: cn(
1537
- "absolute right-0 top-0 h-full flex items-center justify-center gap-1",
1538
- size === "sm" ? "w-8 pr-2" : size === "lg" ? "w-12 pr-4" : "w-10 pr-3"
1539
- ), children: [
1540
- rightIcon && !showClearButton && !showPasswordToggleButton && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground [&>*]:h-4 [&>*]:w-4", children: rightIcon }),
1541
- showClearButton && /* @__PURE__ */ jsx(
1542
- "button",
1543
- {
1544
- type: "button",
1545
- onClick: handleClear,
1546
- className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
1547
- tabIndex: -1,
1548
- children: /* @__PURE__ */ jsx(X, {})
1549
- }
1550
- ),
1551
- showPasswordToggleButton && /* @__PURE__ */ jsx(
1552
- "button",
1553
- {
1554
- type: "button",
1555
- onClick: () => setShowPassword(!showPassword),
1556
- className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
1557
- tabIndex: -1,
1558
- children: showPassword ? /* @__PURE__ */ jsx(EyeOff, {}) : /* @__PURE__ */ jsx(Eye, {})
1559
- }
1560
- )
1561
- ] })
1499
+ (rightIcon || showClearButton || showPasswordToggleButton) && /* @__PURE__ */ jsxs(
1500
+ "div",
1501
+ {
1502
+ className: cn(
1503
+ "absolute right-0 top-0 h-full flex items-center justify-center gap-1",
1504
+ size === "sm" ? "w-8 pr-2" : size === "lg" ? "w-12 pr-4" : "w-10 pr-3"
1505
+ ),
1506
+ children: [
1507
+ rightIcon && !showClearButton && !showPasswordToggleButton && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground [&>*]:h-4 [&>*]:w-4", children: rightIcon }),
1508
+ showClearButton && /* @__PURE__ */ jsx(
1509
+ "button",
1510
+ {
1511
+ type: "button",
1512
+ onClick: handleClear,
1513
+ className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
1514
+ tabIndex: -1,
1515
+ children: /* @__PURE__ */ jsx(X, {})
1516
+ }
1517
+ ),
1518
+ showPasswordToggleButton && /* @__PURE__ */ jsx(
1519
+ "button",
1520
+ {
1521
+ type: "button",
1522
+ onClick: () => setShowPassword(!showPassword),
1523
+ className: "text-muted-foreground hover:text-foreground transition-colors [&>*]:h-4 [&>*]:w-4",
1524
+ tabIndex: -1,
1525
+ children: showPassword ? /* @__PURE__ */ jsx(EyeOff, {}) : /* @__PURE__ */ jsx(Eye, {})
1526
+ }
1527
+ )
1528
+ ]
1529
+ }
1530
+ )
1562
1531
  ] }),
1563
- messageText && /* @__PURE__ */ jsx("p", { className: cn(
1564
- "text-xs",
1565
- messageColor,
1566
- helperClassName
1567
- ), children: messageText })
1532
+ messageText && /* @__PURE__ */ jsx("p", { className: cn("text-xs", messageColor, helperClassName), children: messageText })
1568
1533
  ] });
1569
1534
  }
1570
1535
  );
@@ -1648,7 +1613,8 @@ var AtomicCheckbox = React5.forwardRef(
1648
1613
  id,
1649
1614
  ...rest
1650
1615
  }, ref) => {
1651
- const checkboxId = id || `checkbox-${React5.useId()}`;
1616
+ const generatedId = React5.useId();
1617
+ const checkboxId = id || `checkbox-${generatedId}`;
1652
1618
  const sizeClasses = getSizeClasses(size);
1653
1619
  const colorClasses = getColorClasses(color, error);
1654
1620
  const handleChange = (event) => {
@@ -1728,10 +1694,7 @@ var AtomicCheckbox = React5.forwardRef(
1728
1694
  children: label
1729
1695
  }
1730
1696
  ),
1731
- description && /* @__PURE__ */ jsx("p", { className: cn(
1732
- "text-sm leading-5",
1733
- error ? "text-red-600" : "text-gray-500"
1734
- ), children: description }),
1697
+ description && /* @__PURE__ */ jsx("p", { className: cn("text-sm leading-5", error ? "text-red-600" : "text-gray-500"), children: description }),
1735
1698
  error && errorMessage && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-red-600", children: errorMessage })
1736
1699
  ] })
1737
1700
  ] });
@@ -1820,7 +1783,8 @@ var AtomicSwitch = React5.forwardRef(
1820
1783
  id,
1821
1784
  ...rest
1822
1785
  }, ref) => {
1823
- const switchId = id || `switch-${React5.useId()}`;
1786
+ const generatedId = React5.useId();
1787
+ const switchId = id || `switch-${generatedId}`;
1824
1788
  const sizeClasses = getSizeClasses2(size);
1825
1789
  const colorClasses = getColorClasses2(color, checked);
1826
1790
  const handleChange = (event) => {
@@ -1893,10 +1857,7 @@ var AtomicSwitch = React5.forwardRef(
1893
1857
  }
1894
1858
  ) })
1895
1859
  ] });
1896
- const labelElement = (label || description) && /* @__PURE__ */ jsxs("div", { className: cn(
1897
- "flex-1",
1898
- labelPosition === "left" ? "mr-3" : "ml-3"
1899
- ), children: [
1860
+ const labelElement = (label || description) && /* @__PURE__ */ jsxs("div", { className: cn("flex-1", labelPosition === "left" ? "mr-3" : "ml-3"), children: [
1900
1861
  label && /* @__PURE__ */ jsx(
1901
1862
  "label",
1902
1863
  {
@@ -1945,71 +1906,34 @@ var spinnerVariants = cva("animate-spin", {
1945
1906
  }
1946
1907
  });
1947
1908
  var AtomicSpinner = React5.forwardRef(
1948
- ({
1949
- className,
1950
- size,
1951
- color,
1952
- label,
1953
- inline = false,
1954
- icon: Icon = Loader2,
1955
- ...props
1956
- }, ref) => {
1957
- const spinner = /* @__PURE__ */ jsx(
1958
- Icon,
1959
- {
1960
- ref,
1961
- className: cn(spinnerVariants({ size, color }), className),
1962
- ...props
1963
- }
1964
- );
1909
+ ({ className, size, color, label, inline = false, icon: Icon = Loader2, ...props }, ref) => {
1910
+ const spinner = /* @__PURE__ */ jsx(Icon, { ref, className: cn(spinnerVariants({ size, color }), className), ...props });
1965
1911
  if (!label) {
1966
1912
  return spinner;
1967
1913
  }
1968
- return /* @__PURE__ */ jsxs("div", { className: cn(
1969
- "flex items-center gap-2",
1970
- inline ? "inline-flex" : "flex"
1971
- ), children: [
1914
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", inline ? "inline-flex" : "flex"), children: [
1972
1915
  spinner,
1973
- /* @__PURE__ */ jsx("span", { className: cn(
1974
- "text-sm",
1975
- color === "muted" ? "text-muted-foreground" : color === "white" ? "text-white" : color === "primary" ? "text-primary" : "text-foreground"
1976
- ), children: label })
1916
+ /* @__PURE__ */ jsx(
1917
+ "span",
1918
+ {
1919
+ className: cn(
1920
+ "text-sm",
1921
+ color === "muted" ? "text-muted-foreground" : color === "white" ? "text-white" : color === "primary" ? "text-primary" : "text-foreground"
1922
+ ),
1923
+ children: label
1924
+ }
1925
+ )
1977
1926
  ] });
1978
1927
  }
1979
1928
  );
1980
1929
  AtomicSpinner.displayName = "AtomicSpinner";
1981
- var AtomicButtonSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1982
- AtomicSpinner,
1983
- {
1984
- ref,
1985
- size: "sm",
1986
- color: "white",
1987
- className: cn("mr-2", className),
1988
- ...props
1989
- }
1990
- ));
1930
+ var AtomicButtonSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AtomicSpinner, { ref, size: "sm", color: "white", className: cn("mr-2", className), ...props }));
1991
1931
  AtomicButtonSpinner.displayName = "AtomicButtonSpinner";
1992
- var AtomicPageSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx(
1993
- AtomicSpinner,
1994
- {
1995
- ref,
1996
- size: "lg",
1997
- className,
1998
- ...props
1999
- }
2000
- ) }));
1932
+ var AtomicPageSpinner = React5.forwardRef(
1933
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx(AtomicSpinner, { ref, size: "lg", className, ...props }) })
1934
+ );
2001
1935
  AtomicPageSpinner.displayName = "AtomicPageSpinner";
2002
- var AtomicInlineSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2003
- AtomicSpinner,
2004
- {
2005
- ref,
2006
- inline: true,
2007
- size: "sm",
2008
- color: "muted",
2009
- className,
2010
- ...props
2011
- }
2012
- ));
1936
+ var AtomicInlineSpinner = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AtomicSpinner, { ref, inline: true, size: "sm", color: "muted", className, ...props }));
2013
1937
  AtomicInlineSpinner.displayName = "AtomicInlineSpinner";
2014
1938
  var badgeVariants = cva(
2015
1939
  "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",
@@ -2060,59 +1984,52 @@ var AtomicBadge = React5.forwardRef(
2060
1984
  ...props
2061
1985
  }, ref) => {
2062
1986
  const iconSize = size === "sm" ? "h-3 w-3" : size === "lg" ? "h-4 w-4" : "h-3.5 w-3.5";
1987
+ const iconClasses = size === "sm" ? "[&>*]:h-3 [&>*]:w-3" : size === "lg" ? "[&>*]:h-4 [&>*]:w-4" : "[&>*]:h-3.5 [&>*]:w-3.5";
2063
1988
  const dotSize = size === "sm" ? "h-1.5 w-1.5" : size === "lg" ? "h-2.5 w-2.5" : "h-2 w-2";
2064
- return /* @__PURE__ */ jsxs(
2065
- "div",
2066
- {
2067
- ref,
2068
- className: cn(badgeVariants({ variant, size, shape }), className),
2069
- ...props,
2070
- children: [
2071
- dot && /* @__PURE__ */ jsx(
2072
- "span",
2073
- {
2074
- className: cn(
2075
- "mr-1.5 rounded-full",
2076
- dotSize,
2077
- !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")
2078
- ),
2079
- style: dotColor ? { backgroundColor: dotColor } : void 0
2080
- }
1989
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn(badgeVariants({ variant, size, shape }), className), ...props, children: [
1990
+ dot && /* @__PURE__ */ jsx(
1991
+ "span",
1992
+ {
1993
+ className: cn(
1994
+ "mr-1.5 rounded-full",
1995
+ dotSize,
1996
+ !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")
2081
1997
  ),
2082
- leftIcon && /* @__PURE__ */ jsx("span", { className: cn("mr-1 flex items-center", `[&>*]:${iconSize}`), children: leftIcon }),
2083
- children,
2084
- rightIcon && !removable && /* @__PURE__ */ jsx("span", { className: cn("ml-1 flex items-center", `[&>*]:${iconSize}`), children: rightIcon }),
2085
- removable && /* @__PURE__ */ jsx(
2086
- "button",
1998
+ style: dotColor ? { backgroundColor: dotColor } : void 0
1999
+ }
2000
+ ),
2001
+ leftIcon && /* @__PURE__ */ jsx("span", { className: cn("mr-1 flex items-center", iconClasses), children: leftIcon }),
2002
+ children,
2003
+ rightIcon && !removable && /* @__PURE__ */ jsx("span", { className: cn("ml-1 flex items-center", iconClasses), children: rightIcon }),
2004
+ removable && /* @__PURE__ */ jsx(
2005
+ "button",
2006
+ {
2007
+ type: "button",
2008
+ onClick: onRemove,
2009
+ className: cn(
2010
+ "ml-1 flex items-center rounded-full hover:bg-black/10 dark:hover:bg-white/10",
2011
+ "transition-colors focus:outline-none focus:ring-1 focus:ring-current",
2012
+ size === "sm" ? "p-0.5" : "p-1"
2013
+ ),
2014
+ children: removeIcon ? /* @__PURE__ */ jsx("span", { className: cn("flex items-center", iconClasses), children: removeIcon }) : /* @__PURE__ */ jsxs(
2015
+ "svg",
2087
2016
  {
2088
- type: "button",
2089
- onClick: onRemove,
2090
- className: cn(
2091
- "ml-1 flex items-center rounded-full hover:bg-black/10 dark:hover:bg-white/10",
2092
- "transition-colors focus:outline-none focus:ring-1 focus:ring-current",
2093
- size === "sm" ? "p-0.5" : "p-1"
2094
- ),
2095
- children: removeIcon ? /* @__PURE__ */ jsx("span", { className: cn("flex items-center", `[&>*]:${iconSize}`), children: removeIcon }) : /* @__PURE__ */ jsxs(
2096
- "svg",
2097
- {
2098
- className: iconSize,
2099
- viewBox: "0 0 24 24",
2100
- fill: "none",
2101
- stroke: "currentColor",
2102
- strokeWidth: "2",
2103
- strokeLinecap: "round",
2104
- strokeLinejoin: "round",
2105
- children: [
2106
- /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2107
- /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2108
- ]
2109
- }
2110
- )
2017
+ className: iconSize,
2018
+ viewBox: "0 0 24 24",
2019
+ fill: "none",
2020
+ stroke: "currentColor",
2021
+ strokeWidth: "2",
2022
+ strokeLinecap: "round",
2023
+ strokeLinejoin: "round",
2024
+ children: [
2025
+ /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2026
+ /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2027
+ ]
2111
2028
  }
2112
2029
  )
2113
- ]
2114
- }
2115
- );
2030
+ }
2031
+ )
2032
+ ] });
2116
2033
  }
2117
2034
  );
2118
2035
  AtomicBadge.displayName = "AtomicBadge";
@@ -2124,31 +2041,13 @@ var AtomicStatusBadge = React5.forwardRef(({ status, variant, ...props }, ref) =
2124
2041
  away: { variant: "warning", dot: true, children: "Away" }
2125
2042
  };
2126
2043
  const config = statusConfig[status];
2127
- return /* @__PURE__ */ jsx(
2128
- AtomicBadge,
2129
- {
2130
- ref,
2131
- variant: variant || config.variant,
2132
- dot: config.dot,
2133
- ...props,
2134
- children: props.children || config.children
2135
- }
2136
- );
2044
+ return /* @__PURE__ */ jsx(AtomicBadge, { ref, variant: variant || config.variant, dot: config.dot, ...props, children: props.children || config.children });
2137
2045
  });
2138
2046
  AtomicStatusBadge.displayName = "AtomicStatusBadge";
2139
2047
  var AtomicCountBadge = React5.forwardRef(({ count, max = 99, ...props }, ref) => {
2140
2048
  const displayCount = count > max ? `${max}+` : count.toString();
2141
2049
  if (count <= 0) return null;
2142
- return /* @__PURE__ */ jsx(
2143
- AtomicBadge,
2144
- {
2145
- ref,
2146
- variant: "destructive",
2147
- size: "sm",
2148
- ...props,
2149
- children: displayCount
2150
- }
2151
- );
2050
+ return /* @__PURE__ */ jsx(AtomicBadge, { ref, variant: "destructive", size: "sm", ...props, children: displayCount });
2152
2051
  });
2153
2052
  AtomicCountBadge.displayName = "AtomicCountBadge";
2154
2053
  var getSpacingClass4 = (spacing2, prefix) => {
@@ -2254,27 +2153,9 @@ var AtomicTag = React5.forwardRef(
2254
2153
  className
2255
2154
  );
2256
2155
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2257
- LeftIcon && /* @__PURE__ */ jsx(
2258
- LeftIcon,
2259
- {
2260
- size: iconSize,
2261
- className: cn(
2262
- "flex-shrink-0",
2263
- children ? "mr-1.5" : ""
2264
- )
2265
- }
2266
- ),
2156
+ LeftIcon && /* @__PURE__ */ jsx(LeftIcon, { size: iconSize, className: cn("flex-shrink-0", children ? "mr-1.5" : "") }),
2267
2157
  children && /* @__PURE__ */ jsx("span", { className: "truncate", children }),
2268
- RightIcon && /* @__PURE__ */ jsx(
2269
- RightIcon,
2270
- {
2271
- size: iconSize,
2272
- className: cn(
2273
- "flex-shrink-0",
2274
- children ? "ml-1.5" : ""
2275
- )
2276
- }
2277
- ),
2158
+ RightIcon && /* @__PURE__ */ jsx(RightIcon, { size: iconSize, className: cn("flex-shrink-0", children ? "ml-1.5" : "") }),
2278
2159
  removable && /* @__PURE__ */ jsx(
2279
2160
  "button",
2280
2161
  {
@@ -2291,24 +2172,15 @@ var AtomicTag = React5.forwardRef(
2291
2172
  },
2292
2173
  disabled,
2293
2174
  "aria-label": "Remove",
2294
- children: /* @__PURE__ */ jsx(
2295
- "svg",
2175
+ children: /* @__PURE__ */ jsx("svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx(
2176
+ "path",
2296
2177
  {
2297
- className: "w-3 h-3",
2298
- fill: "none",
2299
- stroke: "currentColor",
2300
- viewBox: "0 0 24 24",
2301
- children: /* @__PURE__ */ jsx(
2302
- "path",
2303
- {
2304
- strokeLinecap: "round",
2305
- strokeLinejoin: "round",
2306
- strokeWidth: 2,
2307
- d: "M6 18L18 6M6 6l12 12"
2308
- }
2309
- )
2178
+ strokeLinecap: "round",
2179
+ strokeLinejoin: "round",
2180
+ strokeWidth: 2,
2181
+ d: "M6 18L18 6M6 6l12 12"
2310
2182
  }
2311
- )
2183
+ ) })
2312
2184
  }
2313
2185
  )
2314
2186
  ] });
@@ -2317,114 +2189,102 @@ var AtomicTag = React5.forwardRef(
2317
2189
  onClick?.(e);
2318
2190
  }
2319
2191
  };
2320
- return /* @__PURE__ */ jsx(
2192
+ return React5.createElement(
2321
2193
  Component,
2322
2194
  {
2323
2195
  ref,
2324
2196
  className: classes,
2325
2197
  onClick: clickable ? handleClick : void 0,
2326
- ...rest,
2327
- children: content
2328
- }
2198
+ ...rest
2199
+ },
2200
+ content
2329
2201
  );
2330
2202
  }
2331
2203
  );
2332
2204
  AtomicTag.displayName = "AtomicTag";
2333
- var linkVariants = cva("transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", {
2334
- variants: {
2335
- variant: {
2336
- default: "text-foreground hover:text-foreground/80",
2337
- primary: "text-primary hover:text-primary/80",
2338
- secondary: "text-secondary-foreground hover:text-secondary-foreground/80",
2339
- muted: "text-muted-foreground hover:text-foreground",
2340
- destructive: "text-destructive hover:text-destructive/80",
2341
- ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
2342
- underline: "text-primary underline underline-offset-4 hover:text-primary/80",
2343
- 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"
2344
- },
2345
- size: {
2346
- default: "",
2347
- sm: "text-sm",
2348
- lg: "text-lg",
2349
- xl: "text-xl"
2205
+ var linkVariants = cva(
2206
+ "transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2207
+ {
2208
+ variants: {
2209
+ variant: {
2210
+ default: "text-foreground hover:text-foreground/80",
2211
+ primary: "text-primary hover:text-primary/80",
2212
+ secondary: "text-secondary-foreground hover:text-secondary-foreground/80",
2213
+ muted: "text-muted-foreground hover:text-foreground",
2214
+ destructive: "text-destructive hover:text-destructive/80",
2215
+ ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
2216
+ underline: "text-primary underline underline-offset-4 hover:text-primary/80",
2217
+ 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"
2218
+ },
2219
+ size: {
2220
+ default: "",
2221
+ sm: "text-sm",
2222
+ lg: "text-lg",
2223
+ xl: "text-xl"
2224
+ },
2225
+ weight: {
2226
+ normal: "font-normal",
2227
+ medium: "font-medium",
2228
+ semibold: "font-semibold",
2229
+ bold: "font-bold"
2230
+ }
2350
2231
  },
2351
- weight: {
2352
- normal: "font-normal",
2353
- medium: "font-medium",
2354
- semibold: "font-semibold",
2355
- bold: "font-bold"
2232
+ defaultVariants: {
2233
+ variant: "default",
2234
+ size: "default",
2235
+ weight: "normal"
2356
2236
  }
2357
- },
2358
- defaultVariants: {
2359
- variant: "default",
2360
- size: "default",
2361
- weight: "normal"
2362
2237
  }
2363
- });
2364
- var AtomicLink = React5.forwardRef(({
2365
- className,
2366
- variant,
2367
- size,
2368
- weight,
2369
- external = false,
2370
- showExternalIcon = false,
2371
- prefetch = true,
2372
- externalIcon,
2373
- children,
2374
- href,
2375
- ...props
2376
- }, ref) => {
2377
- const isExternalUrl = typeof href === "string" && (href.startsWith("http") || href.startsWith("//"));
2378
- const shouldBeExternal = external || isExternalUrl;
2379
- const linkProps = {
2380
- className: cn(linkVariants({ variant, size, weight }), className),
2381
- ref,
2382
- ...props
2383
- };
2384
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2238
+ );
2239
+ var AtomicLink = React5.forwardRef(
2240
+ ({
2241
+ className,
2242
+ variant,
2243
+ size,
2244
+ weight,
2245
+ external = false,
2246
+ showExternalIcon = false,
2247
+ prefetch = true,
2248
+ externalIcon,
2385
2249
  children,
2386
- shouldBeExternal && showExternalIcon && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-block", children: externalIcon || /* @__PURE__ */ jsx(
2387
- "svg",
2388
- {
2389
- className: "h-3 w-3",
2390
- fill: "none",
2391
- stroke: "currentColor",
2392
- viewBox: "0 0 24 24",
2393
- xmlns: "http://www.w3.org/2000/svg",
2394
- children: /* @__PURE__ */ jsx(
2395
- "path",
2396
- {
2397
- strokeLinecap: "round",
2398
- strokeLinejoin: "round",
2399
- strokeWidth: 2,
2400
- d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
2401
- }
2402
- )
2403
- }
2404
- ) })
2405
- ] });
2406
- if (shouldBeExternal) {
2407
- return /* @__PURE__ */ jsx(
2408
- "a",
2409
- {
2410
- href,
2411
- target: "_blank",
2412
- rel: "noopener noreferrer",
2413
- ...linkProps,
2414
- children: content
2415
- }
2416
- );
2417
- }
2418
- return /* @__PURE__ */ jsx(
2419
- Link,
2420
- {
2421
- href,
2422
- prefetch,
2423
- ...linkProps,
2424
- children: content
2250
+ href,
2251
+ ...props
2252
+ }, ref) => {
2253
+ const isExternalUrl = typeof href === "string" && (href.startsWith("http") || href.startsWith("//"));
2254
+ const shouldBeExternal = external || isExternalUrl;
2255
+ const linkProps = {
2256
+ className: cn(linkVariants({ variant, size, weight }), className),
2257
+ ref,
2258
+ ...props
2259
+ };
2260
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2261
+ children,
2262
+ shouldBeExternal && showExternalIcon && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-block", children: externalIcon || /* @__PURE__ */ jsx(
2263
+ "svg",
2264
+ {
2265
+ className: "h-3 w-3",
2266
+ fill: "none",
2267
+ stroke: "currentColor",
2268
+ viewBox: "0 0 24 24",
2269
+ xmlns: "http://www.w3.org/2000/svg",
2270
+ children: /* @__PURE__ */ jsx(
2271
+ "path",
2272
+ {
2273
+ strokeLinecap: "round",
2274
+ strokeLinejoin: "round",
2275
+ strokeWidth: 2,
2276
+ d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
2277
+ }
2278
+ )
2279
+ }
2280
+ ) })
2281
+ ] });
2282
+ if (shouldBeExternal) {
2283
+ return /* @__PURE__ */ jsx("a", { href, target: "_blank", rel: "noopener noreferrer", ...linkProps, children: content });
2425
2284
  }
2426
- );
2427
- });
2285
+ return /* @__PURE__ */ jsx(Link, { href, prefetch, ...linkProps, children: content });
2286
+ }
2287
+ );
2428
2288
  AtomicLink.displayName = "AtomicLink";
2429
2289
  var getSpacingClass5 = (spacing2, prefix) => {
2430
2290
  if (!spacing2) return "";
@@ -2476,10 +2336,10 @@ var AtomicDiv = React5.forwardRef(
2476
2336
  ...rest
2477
2337
  }, ref) => {
2478
2338
  const classes = cn(
2479
- d && `${d === "flex" ? "flex" : d === "inline-flex" ? "inline-flex" : d === "grid" ? "grid" : d === "hidden" ? "hidden" : d === "inline" ? "inline" : d === "inline-block" ? "inline-block" : "block"}`,
2480
- align && `items-${align === "start" ? "start" : align === "end" ? "end" : align === "center" ? "center" : align === "baseline" ? "baseline" : "stretch"}`,
2481
- justify && `justify-${justify === "start" ? "start" : justify === "end" ? "end" : justify === "center" ? "center" : justify === "between" ? "between" : justify === "around" ? "around" : "evenly"}`,
2482
- flexDir && `flex-${flexDir === "col" ? "col" : flexDir === "col-reverse" ? "col-reverse" : flexDir === "row-reverse" ? "row-reverse" : "row"}`,
2339
+ d,
2340
+ align && `items-${align}`,
2341
+ justify && `justify-${justify}`,
2342
+ flexDir && `flex-${flexDir}`,
2483
2343
  flexWrap && `flex-${flexWrap}`,
2484
2344
  flexGrow !== void 0 && `flex-grow-${flexGrow}`,
2485
2345
  flexShrink !== void 0 && `flex-shrink-${flexShrink}`,
@@ -2497,9 +2357,9 @@ var AtomicDiv = React5.forwardRef(
2497
2357
  border === true && "border",
2498
2358
  typeof border === "string" && border,
2499
2359
  borderColor && `border-${borderColor}`,
2500
- rounded && `rounded${rounded === "none" ? "-none" : rounded === "full" ? "-full" : rounded === "sm" ? "-sm" : rounded === "md" ? "" : `-${rounded}`}`,
2501
- shadow && `shadow${shadow === "none" ? "-none" : shadow === "sm" ? "-sm" : shadow === "md" ? "" : shadow === "inner" ? "-inner" : `-${shadow}`}`,
2502
- position && `${position}`,
2360
+ rounded && `rounded-${rounded}`,
2361
+ shadow && `shadow-${shadow}`,
2362
+ position,
2503
2363
  top !== void 0 && `top-${top}`,
2504
2364
  right !== void 0 && `right-${right}`,
2505
2365
  bottom !== void 0 && `bottom-${bottom}`,
@@ -2519,7 +2379,13 @@ var AtomicDiv = React5.forwardRef(
2519
2379
  }
2520
2380
  );
2521
2381
  AtomicDiv.displayName = "AtomicDiv";
2522
- var AtomicThemeProviderContext = createContext(void 0);
2382
+ var AtomicThemeProviderContext = createContext(
2383
+ void 0
2384
+ );
2385
+ var getSystemTheme = () => {
2386
+ if (typeof window === "undefined") return "light";
2387
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
2388
+ };
2523
2389
  var AtomicThemeProvider = ({
2524
2390
  children,
2525
2391
  defaultTheme = "system",
@@ -2540,10 +2406,6 @@ var AtomicThemeProvider = ({
2540
2406
  return defaultTheme;
2541
2407
  });
2542
2408
  const [actualTheme, setActualTheme] = useState("light");
2543
- const getSystemTheme = () => {
2544
- if (typeof window === "undefined") return "light";
2545
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
2546
- };
2547
2409
  const setTheme = (newTheme) => {
2548
2410
  try {
2549
2411
  localStorage.setItem(storageKey, newTheme);
@@ -2603,7 +2465,7 @@ var useAtomicTheme = () => {
2603
2465
  };
2604
2466
 
2605
2467
  // src/index.ts
2606
- var VERSION = "2.0.2";
2468
+ var VERSION = "2.1.0";
2607
2469
 
2608
2470
  export { AnimationUtils, AtomicAlertType, AtomicAlignment, AtomicAnimationPresets, AtomicAnimationState, AtomicAnimations, AtomicAnimationsCss, AtomicAvatar, AtomicAvatarFallback, AtomicAvatarImage, AtomicBadge, AtomicBorders, AtomicBordersCss, AtomicBreakpoint, AtomicButton, AtomicButtonSpinner, AtomicButtonVariant, AtomicCard, AtomicCardContent, AtomicCardDescription, AtomicCardFooter, AtomicCardHeader, AtomicCardTitle, AtomicCardVariant, AtomicCheckbox, AtomicColorVariant, AtomicColorsCss, AtomicCountBadge, AtomicDesignTokensCss, AtomicDirection, AtomicDiv, AtomicEnumUtils, AtomicFormFieldState, AtomicIcon, AtomicImage, AtomicInlineSpinner, AtomicInput, AtomicInputVariant, AtomicLink, AtomicLoadingState, AtomicModalSize, AtomicOrientation, AtomicPageSpinner, AtomicPosition, AtomicShadows, AtomicShadowsCss, AtomicSize, AtomicSpacingCss, AtomicSpinner, AtomicStatus, AtomicStatusBadge, AtomicSwitch, AtomicTag, AtomicText, AtomicTextVariant, AtomicThemeMode, AtomicThemeProvider, AtomicTypographyCss, BorderUtils, ShadowUtils, VERSION, avatarImageVariants, avatarVariants, badgeVariants, buttonVariants, cardDescriptionVariants, cardHeaderVariants, cardTitleVariants, cardVariants, cn, inputVariants, linkVariants, spinnerVariants, textVariants, useAtomicTheme };
2609
2471
  //# sourceMappingURL=index.mjs.map