@actioneer/ads 1.0.1 → 1.0.2

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.
@@ -1,90 +1,84 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as l } from "react/jsx-runtime";
2
+ import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
3
  import * as j from "react";
4
4
  import { ChevronLeft as L, MoreHorizontal as k, ChevronRight as G } from "../lib/icons.js";
5
- import { cn as o } from "../lib/cn.js";
5
+ import { cn as u } from "../lib/cn.js";
6
6
  import { Select as M } from "./select.js";
7
7
  function p(t, s) {
8
8
  const e = [];
9
9
  for (let r = t; r <= s; r += 1) e.push(r);
10
10
  return e;
11
11
  }
12
- function E(t, s, e) {
12
+ function z(t, s, e) {
13
13
  if (e * 2 + 5 >= t)
14
14
  return p(1, t);
15
- const m = Math.max(s - e, 1), i = Math.min(s + e, t), d = m > 2, a = i < t - 1;
16
- if (!d && a) {
17
- const c = e * 2 + 3;
18
- return [...p(1, c), "end-ellipsis", t];
15
+ const m = Math.max(s - e, 1), a = Math.min(s + e, t), d = m > 2, i = a < t - 1;
16
+ if (!d && i) {
17
+ const l = e * 2 + 3;
18
+ return [...p(1, l), "end-ellipsis", t];
19
19
  }
20
- if (d && !a) {
21
- const c = e * 2 + 3;
22
- return [1, "start-ellipsis", ...p(t - c + 1, t)];
20
+ if (d && !i) {
21
+ const l = e * 2 + 3;
22
+ return [1, "start-ellipsis", ...p(t - l + 1, t)];
23
23
  }
24
24
  return [
25
25
  1,
26
26
  "start-ellipsis",
27
- ...p(m, i),
27
+ ...p(m, a),
28
28
  "end-ellipsis",
29
29
  t
30
30
  ];
31
31
  }
32
- const A = () => o(
32
+ const E = () => u(
33
33
  "inline-flex items-center justify-center rounded-md font-normal",
34
34
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
35
35
  "transition active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100",
36
36
  "disabled:pointer-events-none disabled:opacity-40",
37
37
  "size-6 text-xs"
38
- ), N = (t) => t === "sm" ? "w-auto gap-1.5 px-2" : "w-auto gap-1.5 px-2.5", F = j.forwardRef(
38
+ ), N = (t) => t === "sm" ? "w-auto gap-1.5 px-2" : "w-auto gap-1.5 px-2.5", A = j.forwardRef(
39
39
  ({
40
40
  className: t,
41
41
  total: s,
42
42
  page: e,
43
43
  onChange: r,
44
44
  siblings: m = 1,
45
- size: i = "md",
45
+ size: a = "md",
46
46
  summary: d,
47
- labels: a = !1,
48
- pageSize: c,
47
+ labels: i = !1,
48
+ pageSize: l,
49
49
  pageSizeOptions: w,
50
- onPageSizeChange: g,
50
+ onPageSizeChange: h,
51
51
  ...C
52
52
  }, y) => {
53
53
  if (s <= 0) return null;
54
- const P = E(s, e, m), R = e <= 1, S = e >= s, f = A(), x = i === "sm" ? "size-3.5" : "size-4", h = c != null && !!g, b = d != null || h;
55
- return /* @__PURE__ */ u(
54
+ const P = z(s, e, m), R = e <= 1, S = e >= s, f = E(), g = a === "sm" ? "size-3.5" : "size-4", x = l != null && !!h, b = d != null || x;
55
+ return /* @__PURE__ */ c(
56
56
  "nav",
57
57
  {
58
58
  ref: y,
59
59
  "aria-label": "Pagination",
60
- className: o(
60
+ className: u(
61
61
  "flex items-center",
62
62
  b ? "w-full justify-between gap-4" : "gap-1",
63
63
  t
64
64
  ),
65
65
  ...C,
66
66
  children: [
67
- b && /* @__PURE__ */ l(
67
+ b && /* @__PURE__ */ o(
68
68
  "span",
69
69
  {
70
- className: o(
71
- "text-muted-foreground",
72
- "text-xs"
73
- ),
70
+ className: "text-s text-muted-foreground",
74
71
  children: d
75
72
  }
76
73
  ),
77
- /* @__PURE__ */ u("div", { className: "flex items-center gap-4", children: [
78
- h && /* @__PURE__ */ u(
74
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-4", children: [
75
+ x && /* @__PURE__ */ c(
79
76
  "label",
80
77
  {
81
- className: o(
82
- "flex items-center gap-2 text-muted-foreground",
83
- "text-xs"
84
- ),
78
+ className: "flex items-center gap-2 text-s text-muted-foreground",
85
79
  children: [
86
80
  "Rows per page",
87
- /* @__PURE__ */ l(
81
+ /* @__PURE__ */ o(
88
82
  M,
89
83
  {
90
84
  size: "sm",
@@ -94,52 +88,52 @@ const A = () => o(
94
88
  label: String(n),
95
89
  value: String(n)
96
90
  })),
97
- value: String(c),
98
- onChange: (n) => g(Number(n))
91
+ value: String(l),
92
+ onChange: (n) => h(Number(n))
99
93
  }
100
94
  )
101
95
  ]
102
96
  }
103
97
  ),
104
- /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
105
- /* @__PURE__ */ u(
98
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-1", children: [
99
+ /* @__PURE__ */ c(
106
100
  "button",
107
101
  {
108
102
  type: "button",
109
103
  "aria-label": "Go to previous page",
110
104
  disabled: R,
111
105
  onClick: () => r(e - 1),
112
- className: o(
106
+ className: u(
113
107
  f,
114
108
  "text-foreground hover:bg-muted",
115
- a && N(i)
109
+ i && N(a)
116
110
  ),
117
111
  children: [
118
- /* @__PURE__ */ l(L, { className: x, "aria-hidden": !0 }),
119
- a && "Prev"
112
+ /* @__PURE__ */ o(L, { className: g, "aria-hidden": !0 }),
113
+ i && "Prev"
120
114
  ]
121
115
  }
122
116
  ),
123
117
  P.map((n) => {
124
118
  if (n === "start-ellipsis" || n === "end-ellipsis")
125
- return /* @__PURE__ */ l(
119
+ return /* @__PURE__ */ o(
126
120
  "span",
127
121
  {
128
122
  "aria-hidden": !0,
129
- className: o(f, "text-muted-foreground"),
130
- children: /* @__PURE__ */ l(k, { className: x })
123
+ className: u(f, "text-muted-foreground"),
124
+ children: /* @__PURE__ */ o(k, { className: g })
131
125
  },
132
126
  n
133
127
  );
134
128
  const v = n === e;
135
- return /* @__PURE__ */ l(
129
+ return /* @__PURE__ */ o(
136
130
  "button",
137
131
  {
138
132
  type: "button",
139
133
  "aria-label": `Go to page ${n}`,
140
134
  "aria-current": v ? "page" : void 0,
141
135
  onClick: () => r(n),
142
- className: o(
136
+ className: u(
143
137
  f,
144
138
  v ? "bg-wg10 text-brand-foreground" : "text-foreground hover:bg-muted"
145
139
  ),
@@ -148,21 +142,21 @@ const A = () => o(
148
142
  n
149
143
  );
150
144
  }),
151
- /* @__PURE__ */ u(
145
+ /* @__PURE__ */ c(
152
146
  "button",
153
147
  {
154
148
  type: "button",
155
149
  "aria-label": "Go to next page",
156
150
  disabled: S,
157
151
  onClick: () => r(e + 1),
158
- className: o(
152
+ className: u(
159
153
  f,
160
154
  "text-foreground hover:bg-muted",
161
- a && N(i)
155
+ i && N(a)
162
156
  ),
163
157
  children: [
164
- a && "Next",
165
- /* @__PURE__ */ l(G, { className: x, "aria-hidden": !0 })
158
+ i && "Next",
159
+ /* @__PURE__ */ o(G, { className: g, "aria-hidden": !0 })
166
160
  ]
167
161
  }
168
162
  )
@@ -173,7 +167,7 @@ const A = () => o(
173
167
  );
174
168
  }
175
169
  );
176
- F.displayName = "Pagination";
170
+ A.displayName = "Pagination";
177
171
  export {
178
- F as Pagination
172
+ A as Pagination
179
173
  };
package/llms.txt CHANGED
@@ -685,7 +685,7 @@ Before using any component below, preserve its built-in motion and apply the mot
685
685
  - [Breadcrumbs] — Use to show a page's location in a hierarchy as a trail of parent links ending in the current page. Keep item labels text-only; the component supplies right-chevron separators. Each drill-down level gets a full-width 48px bar with a subtle bottom stroke. [docs](https://ads.actioneer.dev/#/breadcrumbs)
686
686
  - [CollectionHeader] — Use for a top-level sidebar destination or collection. Supply the destination icon, keep search and secondary controls before one compact primary action, and place collection content below its built-in separator. [docs](https://ads.actioneer.dev/#/collection-header)
687
687
  - [PageHeader] — Use for detail, create, and edit page title rows; supply onBack to anchor an icon-only back arrow immediately before the title. Use CollectionHeader for top-level sidebar destinations and collections. [docs](https://ads.actioneer.dev/#/page-header)
688
- - [Pagination] — Use for navigating multi-page numbered content — table footers, search results, or any list too long for one screen. [docs](https://ads.actioneer.dev/#/pagination)
688
+ - [Pagination] — Use for navigating multi-page numbered content — table footers, search results, or any list too long for one screen. The results summary and rows-per-page label use text-s (12px). [docs](https://ads.actioneer.dev/#/pagination)
689
689
  - [Sidebar] — Use as an app's vertical navigation rail. The canonical Actioneer shell uses one collapsible Sidebar for product areas and the active area's grouped internal options. Compose SidebarBrand, grouped SidebarItems, optional SidebarHistory, and SidebarAccount as the area requires. [docs](https://ads.actioneer.dev/#/sidebar)
690
690
  - [SidebarAccount] — component [docs](https://ads.actioneer.dev/#/sidebar)
691
691
  - [SidebarAction] — component [docs](https://ads.actioneer.dev/#/sidebar)
package/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actioneer/ads",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "importPath": "@actioneer/ads",
5
5
  "styleImport": "@import \"@actioneer/ads/styles.css\";",
6
6
  "families": [
@@ -5519,7 +5519,7 @@
5519
5519
  "kind": "component",
5520
5520
  "importPath": "@actioneer/ads",
5521
5521
  "module": "pagination",
5522
- "description": "Use for navigating multi-page numbered content — table footers, search results, or any list too long for one screen.",
5522
+ "description": "Use for navigating multi-page numbered content — table footers, search results, or any list too long for one screen. The results summary and rows-per-page label use text-s (12px).",
5523
5523
  "showcaseUrl": "https://ads.actioneer.dev/#/pagination",
5524
5524
  "props": [
5525
5525
  "total",
@@ -14880,7 +14880,7 @@
14880
14880
  "family": "Navigation",
14881
14881
  "module": "pagination",
14882
14882
  "showcaseUrl": "https://ads.actioneer.dev/#/pagination",
14883
- "description": "Use for navigating multi-page numbered content — table footers, search results, or any list too long for one screen."
14883
+ "description": "Use for navigating multi-page numbered content — table footers, search results, or any list too long for one screen. The results summary and rows-per-page label use text-s (12px)."
14884
14884
  },
14885
14885
  {
14886
14886
  "id": "component:Sidebar",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actioneer/ads",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Actioneer Design System 1.0 — React 19 + Tailwind v4 component library.",
5
5
  "type": "module",
6
6
  "sideEffects": [