@still-void/ui 3.1.0 → 3.2.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.
@@ -45,6 +45,11 @@ __export(react_exports, {
45
45
  CardSkeleton: () => CardSkeleton,
46
46
  CardTitle: () => CardTitle,
47
47
  CategoryPill: () => CategoryPill,
48
+ ChartAxis: () => ChartAxis,
49
+ ChartBar: () => ChartBar,
50
+ ChartContainer: () => ChartContainer,
51
+ ChartGrid: () => ChartGrid,
52
+ ChartLine: () => ChartLine,
48
53
  Checkbox: () => Checkbox,
49
54
  CodeBlock: () => CodeBlock,
50
55
  DEFAULT_ACCENT: () => DEFAULT_ACCENT,
@@ -60,12 +65,21 @@ __export(react_exports, {
60
65
  Lead: () => Lead,
61
66
  Logo: () => Logo,
62
67
  NativeSelect: () => NativeSelect,
68
+ Pagination: () => Pagination,
69
+ PaginationContent: () => PaginationContent,
70
+ PaginationEllipsis: () => PaginationEllipsis,
71
+ PaginationItem: () => PaginationItem,
72
+ PaginationLink: () => PaginationLink,
73
+ PaginationNext: () => PaginationNext,
74
+ PaginationPrevious: () => PaginationPrevious,
63
75
  PostCard: () => PostCard,
64
76
  PostGrid: () => PostGrid,
77
+ Progress: () => Progress,
65
78
  Prose: () => Prose,
66
79
  READING_PROGRESS_VAR: () => READING_PROGRESS_VAR,
67
80
  RadioGroup: () => RadioGroup,
68
81
  RadioGroupItem: () => RadioGroupItem,
82
+ Separator: () => Separator,
69
83
  Sidebar: () => Sidebar,
70
84
  SidebarSection: () => SidebarSection,
71
85
  Skeleton: () => Skeleton,
@@ -168,7 +182,10 @@ var ICON_GLYPHS = {
168
182
  sun: import_outline.SunIcon,
169
183
  moon: import_outline.MoonIcon,
170
184
  search: import_outline.MagnifyingGlassIcon,
171
- menu: import_outline.Bars3Icon
185
+ menu: import_outline.Bars3Icon,
186
+ camera: import_outline.CameraIcon,
187
+ blocked: import_outline.NoSymbolIcon,
188
+ pending: import_outline.ClockIcon
172
189
  };
173
190
  var ICON_NAMES = Object.keys(ICON_GLYPHS);
174
191
  var ICON_FALLBACK_NAME = "alert-circle";
@@ -889,12 +906,239 @@ var Checkbox = React11.forwardRef(
889
906
  );
890
907
  Checkbox.displayName = "Checkbox";
891
908
 
892
- // src/components/ui/radio-group.tsx
909
+ // src/components/ui/separator.tsx
893
910
  var React12 = __toESM(require("react"), 1);
894
911
  var import_jsx_runtime15 = require("react/jsx-runtime");
895
- var RadioGroupItem = React12.forwardRef(
896
- ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: fieldClasses.choice, children: [
897
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
912
+ var Separator = React12.forwardRef(
913
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
914
+ "div",
915
+ {
916
+ ...props,
917
+ ref,
918
+ role: decorative ? void 0 : "separator",
919
+ "aria-orientation": !decorative && orientation === "vertical" ? "vertical" : void 0,
920
+ className: cn(
921
+ "sv-separator",
922
+ orientation === "vertical" && "sv-separator--vertical",
923
+ className
924
+ )
925
+ }
926
+ )
927
+ );
928
+ Separator.displayName = "Separator";
929
+
930
+ // src/components/ui/progress.tsx
931
+ var React13 = __toESM(require("react"), 1);
932
+ var import_jsx_runtime16 = require("react/jsx-runtime");
933
+ function clamp(value, max) {
934
+ return Math.min(Math.max(value, 0), max);
935
+ }
936
+ function normalizeMax(max) {
937
+ return Number.isFinite(max) && max > 0 ? max : 0;
938
+ }
939
+ var Progress = React13.forwardRef(
940
+ ({ className, value = 0, max = 100, ...props }, ref) => {
941
+ const safeMax = normalizeMax(max);
942
+ const clamped = clamp(value, safeMax);
943
+ const percent = safeMax === 0 ? 0 : clamped / safeMax * 100;
944
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
945
+ "div",
946
+ {
947
+ ...props,
948
+ ref,
949
+ role: "progressbar",
950
+ "aria-valuenow": clamped,
951
+ "aria-valuemin": 0,
952
+ "aria-valuemax": safeMax,
953
+ className: cn("sv-progress", className),
954
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "sv-progress__indicator", style: { width: `${percent}%` } })
955
+ }
956
+ );
957
+ }
958
+ );
959
+ Progress.displayName = "Progress";
960
+
961
+ // src/components/ui/pagination.tsx
962
+ var React14 = __toESM(require("react"), 1);
963
+ var import_jsx_runtime17 = require("react/jsx-runtime");
964
+ var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { ...props, "aria-label": "pagination", className: cn("sv-pagination", className) });
965
+ Pagination.displayName = "Pagination";
966
+ var PaginationContent = React14.forwardRef(
967
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { ref, className: cn("sv-pagination__content", className), ...props })
968
+ );
969
+ PaginationContent.displayName = "PaginationContent";
970
+ var PaginationItem = React14.forwardRef(
971
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { ref, className: cn("sv-pagination__item", className), ...props })
972
+ );
973
+ PaginationItem.displayName = "PaginationItem";
974
+ var PaginationLink = React14.forwardRef(
975
+ ({ className, isActive = false, href, ...props }, ref) => {
976
+ const sharedClassName = cn(
977
+ "sv-pagination__link",
978
+ isActive && "sv-pagination__link--active",
979
+ className
980
+ );
981
+ const sharedAria = isActive ? { "aria-current": "page" } : {};
982
+ if (href !== void 0) {
983
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
984
+ "a",
985
+ {
986
+ ref,
987
+ href,
988
+ className: sharedClassName,
989
+ ...sharedAria,
990
+ ...props
991
+ }
992
+ );
993
+ }
994
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
995
+ "button",
996
+ {
997
+ ref,
998
+ type: "button",
999
+ className: sharedClassName,
1000
+ ...sharedAria,
1001
+ ...props
1002
+ }
1003
+ );
1004
+ }
1005
+ );
1006
+ PaginationLink.displayName = "PaginationLink";
1007
+ var PaginationPrevious = React14.forwardRef(({ className, label = "Previous", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1008
+ PaginationLink,
1009
+ {
1010
+ ref,
1011
+ "aria-label": label,
1012
+ className: cn("sv-pagination__link--previous", className),
1013
+ ...props,
1014
+ children: [
1015
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "chevron-left" }),
1016
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: label })
1017
+ ]
1018
+ }
1019
+ ));
1020
+ PaginationPrevious.displayName = "PaginationPrevious";
1021
+ var PaginationNext = React14.forwardRef(
1022
+ ({ className, label = "Next", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1023
+ PaginationLink,
1024
+ {
1025
+ ref,
1026
+ "aria-label": label,
1027
+ className: cn("sv-pagination__link--next", className),
1028
+ ...props,
1029
+ children: [
1030
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: label }),
1031
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { name: "chevron-right" })
1032
+ ]
1033
+ }
1034
+ )
1035
+ );
1036
+ PaginationNext.displayName = "PaginationNext";
1037
+ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { "aria-hidden": "true", className: cn("sv-pagination__ellipsis", className), ...props, children: "\u2026" });
1038
+ PaginationEllipsis.displayName = "PaginationEllipsis";
1039
+
1040
+ // src/components/ui/chart.tsx
1041
+ var React15 = __toESM(require("react"), 1);
1042
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1043
+ var ChartContainer = React15.forwardRef(
1044
+ ({ width, height, className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1045
+ "svg",
1046
+ {
1047
+ ref,
1048
+ role: "img",
1049
+ viewBox: `0 0 ${width} ${height}`,
1050
+ width,
1051
+ height,
1052
+ className: cn("sv-chart", className),
1053
+ ...props,
1054
+ children
1055
+ }
1056
+ )
1057
+ );
1058
+ ChartContainer.displayName = "ChartContainer";
1059
+ var ChartGrid = ({ orientation, positions, width, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: positions.map(
1060
+ (position) => orientation === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1061
+ "line",
1062
+ {
1063
+ x1: 0,
1064
+ y1: position,
1065
+ x2: width,
1066
+ y2: position,
1067
+ className: cn("sv-chart__grid-line", className)
1068
+ },
1069
+ position
1070
+ ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1071
+ "line",
1072
+ {
1073
+ x1: position,
1074
+ y1: 0,
1075
+ x2: position,
1076
+ y2: width,
1077
+ className: cn("sv-chart__grid-line", className)
1078
+ },
1079
+ position
1080
+ )
1081
+ ) });
1082
+ ChartGrid.displayName = "ChartGrid";
1083
+ var ChartAxis = ({ orientation, ticks, length, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
1084
+ orientation === "bottom" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: 0, y1: 0, x2: length, y2: 0, className: cn("sv-chart__axis", className) }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("line", { x1: 0, y1: 0, x2: 0, y2: length, className: cn("sv-chart__axis", className) }),
1085
+ ticks.map(
1086
+ (tick) => orientation === "bottom" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1087
+ "text",
1088
+ {
1089
+ x: tick.position,
1090
+ y: 16,
1091
+ textAnchor: "middle",
1092
+ className: "sv-chart__axis-label",
1093
+ children: tick.label
1094
+ },
1095
+ tick.position
1096
+ ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1097
+ "text",
1098
+ {
1099
+ x: -8,
1100
+ y: tick.position,
1101
+ textAnchor: "end",
1102
+ dominantBaseline: "middle",
1103
+ className: "sv-chart__axis-label",
1104
+ children: tick.label
1105
+ },
1106
+ tick.position
1107
+ )
1108
+ )
1109
+ ] });
1110
+ ChartAxis.displayName = "ChartAxis";
1111
+ var ChartLine = ({ points, color, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1112
+ "polyline",
1113
+ {
1114
+ points: points.map(({ x, y }) => `${x},${y}`).join(" "),
1115
+ fill: "none",
1116
+ stroke: color,
1117
+ strokeWidth: 2,
1118
+ className: cn("sv-chart__line", className)
1119
+ }
1120
+ );
1121
+ ChartLine.displayName = "ChartLine";
1122
+ var ChartBar = ({ bars, color, className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: bars.map((bar) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1123
+ "rect",
1124
+ {
1125
+ x: bar.x,
1126
+ y: bar.y,
1127
+ width: bar.width,
1128
+ height: bar.height,
1129
+ fill: color,
1130
+ className: cn("sv-chart__bar", className)
1131
+ },
1132
+ `${bar.x},${bar.y}`
1133
+ )) });
1134
+ ChartBar.displayName = "ChartBar";
1135
+
1136
+ // src/components/ui/radio-group.tsx
1137
+ var React16 = __toESM(require("react"), 1);
1138
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1139
+ var RadioGroupItem = React16.forwardRef(
1140
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: fieldClasses.choice, children: [
1141
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
898
1142
  "input",
899
1143
  {
900
1144
  className: cn("sv-radio", className),
@@ -907,19 +1151,19 @@ var RadioGroupItem = React12.forwardRef(
907
1151
  ] })
908
1152
  );
909
1153
  RadioGroupItem.displayName = "RadioGroupItem";
910
- var RadioGroup = React12.forwardRef(
1154
+ var RadioGroup = React16.forwardRef(
911
1155
  ({ className, legend, legendHidden, orientation = "vertical", name, children, ...props }, ref) => {
912
- const items = React12.Children.map(children, (child) => {
913
- if (!React12.isValidElement(child) || child.type !== RadioGroupItem) {
1156
+ const items = React16.Children.map(children, (child) => {
1157
+ if (!React16.isValidElement(child) || child.type !== RadioGroupItem) {
914
1158
  return child;
915
1159
  }
916
1160
  const itemProps = child.props;
917
1161
  if (itemProps.name !== void 0) {
918
1162
  return child;
919
1163
  }
920
- return React12.cloneElement(child, { name });
1164
+ return React16.cloneElement(child, { name });
921
1165
  });
922
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1166
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
923
1167
  "fieldset",
924
1168
  {
925
1169
  className: cn(
@@ -930,7 +1174,7 @@ var RadioGroup = React12.forwardRef(
930
1174
  ref,
931
1175
  ...props,
932
1176
  children: [
933
- legend !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("legend", { className: cn("sv-radio-group__legend", legendHidden && fieldClasses.srOnly), children: legend }),
1177
+ legend !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("legend", { className: cn("sv-radio-group__legend", legendHidden && fieldClasses.srOnly), children: legend }),
934
1178
  items
935
1179
  ]
936
1180
  }
@@ -940,7 +1184,7 @@ var RadioGroup = React12.forwardRef(
940
1184
  RadioGroup.displayName = "RadioGroup";
941
1185
 
942
1186
  // src/components/ui/table.tsx
943
- var React13 = __toESM(require("react"), 1);
1187
+ var React17 = __toESM(require("react"), 1);
944
1188
 
945
1189
  // src/recipes/table.ts
946
1190
  function table() {
@@ -958,37 +1202,37 @@ var tableClasses = {
958
1202
  };
959
1203
 
960
1204
  // src/components/ui/table.tsx
961
- var import_jsx_runtime16 = require("react/jsx-runtime");
962
- var Table = React13.forwardRef(
963
- ({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn(tableClasses.container, containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("table", { className: cn(table(), className), ref, ...props }) })
1205
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1206
+ var Table = React17.forwardRef(
1207
+ ({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn(tableClasses.container, containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("table", { className: cn(table(), className), ref, ...props }) })
964
1208
  );
965
1209
  Table.displayName = "Table";
966
- var TableHeader = React13.forwardRef(
967
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("thead", { className: cn(tableClasses.head, className), ref, ...props })
1210
+ var TableHeader = React17.forwardRef(
1211
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("thead", { className: cn(tableClasses.head, className), ref, ...props })
968
1212
  );
969
1213
  TableHeader.displayName = "TableHeader";
970
- var TableBody = React13.forwardRef(
971
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tbody", { className: cn(tableClasses.body, className), ref, ...props })
1214
+ var TableBody = React17.forwardRef(
1215
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tbody", { className: cn(tableClasses.body, className), ref, ...props })
972
1216
  );
973
1217
  TableBody.displayName = "TableBody";
974
- var TableFooter = React13.forwardRef(
975
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tfoot", { className: cn(tableClasses.foot, className), ref, ...props })
1218
+ var TableFooter = React17.forwardRef(
1219
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tfoot", { className: cn(tableClasses.foot, className), ref, ...props })
976
1220
  );
977
1221
  TableFooter.displayName = "TableFooter";
978
- var TableRow = React13.forwardRef(
979
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: cn(tableClasses.row, className), ref, ...props })
1222
+ var TableRow = React17.forwardRef(
1223
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { className: cn(tableClasses.row, className), ref, ...props })
980
1224
  );
981
1225
  TableRow.displayName = "TableRow";
982
- var TableHead = React13.forwardRef(
983
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("th", { className: cn(tableClasses.th, className), ref, ...props })
1226
+ var TableHead = React17.forwardRef(
1227
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("th", { className: cn(tableClasses.th, className), ref, ...props })
984
1228
  );
985
1229
  TableHead.displayName = "TableHead";
986
- var TableCell = React13.forwardRef(
987
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: cn(tableClasses.td, className), ref, ...props })
1230
+ var TableCell = React17.forwardRef(
1231
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { className: cn(tableClasses.td, className), ref, ...props })
988
1232
  );
989
1233
  TableCell.displayName = "TableCell";
990
- var TableCaption = React13.forwardRef(
991
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("caption", { className: cn(tableClasses.caption, className), ref, ...props })
1234
+ var TableCaption = React17.forwardRef(
1235
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("caption", { className: cn(tableClasses.caption, className), ref, ...props })
992
1236
  );
993
1237
  TableCaption.displayName = "TableCaption";
994
1238
 
@@ -1096,6 +1340,11 @@ var zIndex = {
1096
1340
  CardSkeleton,
1097
1341
  CardTitle,
1098
1342
  CategoryPill,
1343
+ ChartAxis,
1344
+ ChartBar,
1345
+ ChartContainer,
1346
+ ChartGrid,
1347
+ ChartLine,
1099
1348
  Checkbox,
1100
1349
  CodeBlock,
1101
1350
  DEFAULT_ACCENT,
@@ -1111,12 +1360,21 @@ var zIndex = {
1111
1360
  Lead,
1112
1361
  Logo,
1113
1362
  NativeSelect,
1363
+ Pagination,
1364
+ PaginationContent,
1365
+ PaginationEllipsis,
1366
+ PaginationItem,
1367
+ PaginationLink,
1368
+ PaginationNext,
1369
+ PaginationPrevious,
1114
1370
  PostCard,
1115
1371
  PostGrid,
1372
+ Progress,
1116
1373
  Prose,
1117
1374
  READING_PROGRESS_VAR,
1118
1375
  RadioGroup,
1119
1376
  RadioGroupItem,
1377
+ Separator,
1120
1378
  Sidebar,
1121
1379
  SidebarSection,
1122
1380
  Skeleton,