@cognite/aura 0.3.2 → 0.3.3

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.
Files changed (108) hide show
  1. package/DESIGN.md +134 -5
  2. package/README.md +24 -3
  3. package/dist/components/index.d.ts +2 -0
  4. package/dist/components/index.js +58 -327
  5. package/dist/components/ui/core/accordion/accordion.js +79 -114
  6. package/dist/components/ui/core/action-toolbar/action-toolbar.js +108 -176
  7. package/dist/components/ui/core/alert/alert.js +158 -206
  8. package/dist/components/ui/core/avatar/avatar.js +64 -90
  9. package/dist/components/ui/core/badge/badge.js +73 -108
  10. package/dist/components/ui/core/banner/banner.js +146 -215
  11. package/dist/components/ui/core/breadcrumb/breadcrumb.js +105 -200
  12. package/dist/components/ui/core/button/button.js +47 -52
  13. package/dist/components/ui/core/button-group/button-group.js +40 -79
  14. package/dist/components/ui/core/card/card.js +102 -185
  15. package/dist/components/ui/core/chart/chart.js +116 -206
  16. package/dist/components/ui/core/chart/index.js +2 -8
  17. package/dist/components/ui/core/checkbox/checkbox.js +67 -132
  18. package/dist/components/ui/core/checkbox/checkbox.metadata.js +7 -7
  19. package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
  20. package/dist/components/ui/core/code-block/code-block.js +179 -267
  21. package/dist/components/ui/core/collapsible/collapsible.js +29 -49
  22. package/dist/components/ui/core/combobox/combobox.js +41 -0
  23. package/dist/components/ui/core/command/command.js +85 -150
  24. package/dist/components/ui/core/count/count.js +21 -32
  25. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +60 -72
  26. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +36 -51
  27. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -87
  28. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +60 -68
  29. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -174
  30. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +104 -145
  31. package/dist/components/ui/core/date-time-pickers/index.js +5 -10
  32. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +42 -56
  33. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +66 -117
  34. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +63 -93
  35. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +64 -98
  36. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +38 -67
  37. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +23 -23
  38. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +52 -62
  39. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +18 -18
  40. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +24 -31
  41. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +24 -33
  42. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +4 -7
  43. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +17 -31
  44. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +40 -40
  45. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +33 -50
  46. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +78 -99
  47. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +41 -63
  48. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +39 -52
  49. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +7 -15
  50. package/dist/components/ui/core/dialog/dialog.js +82 -155
  51. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +2 -2
  52. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -248
  53. package/dist/components/ui/core/empty-state/empty-state.context.js +5 -8
  54. package/dist/components/ui/core/empty-state/empty-state.js +86 -138
  55. package/dist/components/ui/core/helper-text/helper-text.js +37 -65
  56. package/dist/components/ui/core/hover-card/hover-card.js +54 -80
  57. package/dist/components/ui/core/inline-citation/inline-citation.js +98 -181
  58. package/dist/components/ui/core/input/input.js +12 -27
  59. package/dist/components/ui/core/input-group/input-group.js +76 -173
  60. package/dist/components/ui/core/kbd/kbd.js +20 -36
  61. package/dist/components/ui/core/label/label.js +26 -43
  62. package/dist/components/ui/core/loader/loader.js +80 -117
  63. package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +12 -12
  64. package/dist/components/ui/core/message/message.d.ts +2 -2
  65. package/dist/components/ui/core/message/message.js +316 -542
  66. package/dist/components/ui/core/pagination/pagination-size-context.js +5 -6
  67. package/dist/components/ui/core/pagination/pagination-teleport.js +86 -106
  68. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
  69. package/dist/components/ui/core/pagination/pagination.js +231 -334
  70. package/dist/components/ui/core/popover/popover.js +90 -157
  71. package/dist/components/ui/core/progress/progress.js +36 -61
  72. package/dist/components/ui/core/prompt-input/prompt-input.js +274 -413
  73. package/dist/components/ui/core/radio-group/radio-group.js +58 -113
  74. package/dist/components/ui/core/reasoning/reasoning.js +55 -86
  75. package/dist/components/ui/core/scroll-area/scroll-area.js +41 -71
  76. package/dist/components/ui/core/search/search.js +77 -99
  77. package/dist/components/ui/core/segmented-control/segmented-control.js +110 -167
  78. package/dist/components/ui/core/select/select.js +168 -293
  79. package/dist/components/ui/core/separator/separator.js +13 -23
  80. package/dist/components/ui/core/shimmer/shimmer.d.ts +2 -4
  81. package/dist/components/ui/core/shimmer/shimmer.js +40 -107
  82. package/dist/components/ui/core/skeleton/skeleton.js +13 -18
  83. package/dist/components/ui/core/sonner-toast/sonner-toast.js +54 -47
  84. package/dist/components/ui/core/sources/sources.d.ts +5 -1
  85. package/dist/components/ui/core/sources/sources.js +58 -79
  86. package/dist/components/ui/core/switch/switch.js +62 -0
  87. package/dist/components/ui/core/tabs/tabs.js +149 -223
  88. package/dist/components/ui/core/tabs/tabs.utils.js +6 -8
  89. package/dist/components/ui/core/textarea/textarea.js +13 -27
  90. package/dist/components/ui/core/toggle/toggle.js +55 -74
  91. package/dist/components/ui/core/tool/tool.js +127 -163
  92. package/dist/components/ui/core/tooltip/tooltip.js +47 -86
  93. package/dist/components/ui/core/topbar/topbar.js +106 -190
  94. package/dist/eslint/index.js +5 -10
  95. package/dist/eslint/no-overriding-styles.js +178 -237
  96. package/dist/icons/index.d.ts +1 -0
  97. package/dist/icons/index.js +1 -0
  98. package/dist/lib/highlight-code.d.ts +9 -0
  99. package/dist/lib/highlight-code.js +42 -0
  100. package/dist/lib/portal-container-context.js +8 -9
  101. package/dist/lib/style-scope.js +6 -6
  102. package/dist/lib/use-controllable-state.js +21 -30
  103. package/dist/lib/utils.d.ts +0 -2
  104. package/dist/lib/utils.js +32 -112
  105. package/dist/styles.css +1 -1
  106. package/dist/styles.source.css +23 -0
  107. package/package.json +23 -7
  108. package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
@@ -1,337 +1,234 @@
1
- import { jsx as i, jsxs as L } from "react/jsx-runtime";
2
- import { forwardRef as r } from "react";
3
- import { IconChevronsLeft as I, IconChevronLeft as w, IconChevronRight as C, IconChevronsRight as T, IconDots as B } from "@tabler/icons-react";
4
- import { cva as x } from "class-variance-authority";
5
- import { cn as l } from "../../../../lib/utils.js";
6
- import { Button as z } from "../button/button.js";
7
- import { SelectTrigger as _ } from "../select/select.js";
8
- import { PaginationSizeContext as k, usePaginationSize as g } from "./pagination-size-context.js";
9
- import { PaginationTeleport as ra } from "./pagination-teleport.js";
10
- const y = x(
11
- "text-base font-normal leading-5 tracking-tightest text-secondary-foreground hover:bg-active-muted-background-hover hover:text-active-foreground focus-visible:bg-active-muted-background focus-visible:text-active-foreground focus-visible:shadow-focus-ring",
12
- {
13
- variants: {
14
- size: {
15
- default: "",
16
- small: "text-sm leading-4.5 tracking-tight"
17
- },
18
- active: {
19
- true: "bg-active-muted-background text-active-foreground",
20
- false: ""
21
- }
22
- },
23
- defaultVariants: {
24
- size: "default",
25
- active: !1
26
- }
27
- }
28
- ), R = x(
29
- "flex items-center justify-center text-secondary-foreground",
30
- {
31
- variants: {
32
- size: {
33
- default: "h-9 w-9",
34
- small: "h-7 w-7"
35
- }
36
- },
37
- defaultVariants: {
38
- size: "default"
39
- }
40
- }
41
- ), W = x(
42
- [
43
- "w-auto whitespace-nowrap min-h-0 py-1.75 text-sm leading-4.5 tracking-normal font-medium",
44
- "bg-background text-foreground border-border-emphasized",
45
- "hover:bg-accent-background hover:border-border-emphasized",
46
- "focus-visible:bg-background focus-visible:text-foreground focus-visible:border-border-emphasized",
47
- "dark:bg-background dark:hover:bg-accent-background"
48
- ],
49
- {
50
- variants: {
51
- size: {
52
- default: "h-9 gap-2 rounded-lg px-3 min-w-19",
53
- sm: "h-7 gap-1.5 rounded-md px-2 min-w-16"
54
- }
55
- },
56
- defaultVariants: {
57
- size: "default"
58
- }
59
- }
60
- ), E = {
61
- small: "max-w-7",
62
- default: "max-w-9"
63
- }, V = {
64
- small: "min-w-7",
65
- default: "min-w-9"
66
- }, N = (a = "default") => {
67
- const t = a === "small" ? "sm" : "default", e = a === "small" ? "rounded-md" : "rounded-lg", n = E[a], o = V[a];
68
- return {
69
- buttonSize: t,
70
- radiusClass: e,
71
- iconButtonWidth: n,
72
- textLinkWidth: o
73
- };
74
- }, j = r(({ className: a, size: t = "default", ...e }, n) => /* @__PURE__ */ i(k.Provider, { value: t, children: /* @__PURE__ */ i(
75
- "nav",
76
- {
77
- ref: n,
78
- "aria-label": "pagination",
79
- "data-slot": "pagination",
80
- className: l("mx-auto flex w-full justify-center gap-2", a),
81
- ...e
82
- }
83
- ) }));
84
- j.displayName = "Pagination";
85
- const G = r(({ className: a, size: t, ...e }, n) => {
86
- const o = g(), s = t ?? o;
87
- return /* @__PURE__ */ i(k.Provider, { value: s, children: /* @__PURE__ */ i(
88
- "ul",
89
- {
90
- ref: n,
91
- "data-slot": "pagination-content",
92
- "data-size": s,
93
- className: l("flex flex-row items-center gap-1", a),
94
- ...e
95
- }
96
- ) });
1
+ import { cn as e } from "../../../../lib/utils.js";
2
+ import { Button as t } from "../button/button.js";
3
+ import { SelectTrigger as n } from "../select/select.js";
4
+ import { PaginationSizeContext as r, usePaginationSize as i } from "./pagination-size-context.js";
5
+ import { PaginationTeleport as a } from "./pagination-teleport.js";
6
+ import { forwardRef as o } from "react";
7
+ import { IconChevronLeft as s, IconChevronRight as c, IconChevronsLeft as l, IconChevronsRight as u, IconDots as d } from "@tabler/icons-react";
8
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
+ import { cva as m } from "class-variance-authority";
10
+ //#region libs/aura/src/components/ui/core/pagination/pagination.tsx
11
+ var h = m("text-base font-normal leading-5 tracking-tightest text-secondary-foreground hover:bg-active-muted-background-hover hover:text-active-foreground focus-visible:bg-active-muted-background focus-visible:text-active-foreground focus-visible:shadow-focus-ring", {
12
+ variants: {
13
+ size: {
14
+ default: "",
15
+ small: "text-sm leading-4.5 tracking-tight"
16
+ },
17
+ active: {
18
+ true: "bg-active-muted-background text-active-foreground",
19
+ false: ""
20
+ }
21
+ },
22
+ defaultVariants: {
23
+ size: "default",
24
+ active: !1
25
+ }
26
+ }), g = m("flex items-center justify-center text-secondary-foreground", {
27
+ variants: { size: {
28
+ default: "h-9 w-9",
29
+ small: "h-7 w-7"
30
+ } },
31
+ defaultVariants: { size: "default" }
32
+ }), _ = m([
33
+ "w-auto whitespace-nowrap min-h-0 py-1.75 text-sm leading-4.5 tracking-normal font-medium",
34
+ "bg-background text-foreground border-border-emphasized",
35
+ "hover:bg-accent-background hover:border-border-emphasized",
36
+ "focus-visible:bg-background focus-visible:text-foreground focus-visible:border-border-emphasized",
37
+ "dark:bg-background dark:hover:bg-accent-background"
38
+ ], {
39
+ variants: { size: {
40
+ default: "h-9 gap-2 rounded-lg px-3 min-w-19",
41
+ sm: "h-7 gap-1.5 rounded-md px-2 min-w-16"
42
+ } },
43
+ defaultVariants: { size: "default" }
44
+ }), v = {
45
+ small: "max-w-7",
46
+ default: "max-w-9"
47
+ }, y = {
48
+ small: "min-w-7",
49
+ default: "min-w-9"
50
+ }, b = (e = "default") => ({
51
+ buttonSize: e === "small" ? "sm" : "default",
52
+ radiusClass: e === "small" ? "rounded-md" : "rounded-lg",
53
+ iconButtonWidth: v[e],
54
+ textLinkWidth: y[e]
55
+ }), x = o(({ className: t, size: n = "default", ...i }, a) => /* @__PURE__ */ f(r.Provider, {
56
+ value: n,
57
+ children: /* @__PURE__ */ f("nav", {
58
+ ref: a,
59
+ "aria-label": "pagination",
60
+ "data-slot": "pagination",
61
+ className: e("mx-auto flex w-full justify-center gap-2", t),
62
+ ...i
63
+ })
64
+ }));
65
+ x.displayName = "Pagination";
66
+ var S = o(({ className: t, size: n, ...a }, o) => {
67
+ let s = i(), c = n ?? s;
68
+ return /* @__PURE__ */ f(r.Provider, {
69
+ value: c,
70
+ children: /* @__PURE__ */ f("ul", {
71
+ ref: o,
72
+ "data-slot": "pagination-content",
73
+ "data-size": c,
74
+ className: e("flex flex-row items-center gap-1", t),
75
+ ...a
76
+ })
77
+ });
97
78
  });
98
- G.displayName = "PaginationContent";
99
- const F = r((a, t) => /* @__PURE__ */ i("li", { ref: t, "data-slot": "pagination-item", ...a }));
100
- F.displayName = "PaginationItem";
101
- const H = r(
102
- ({ className: a, ...t }, e) => /* @__PURE__ */ i(
103
- "output",
104
- {
105
- ref: e,
106
- "data-slot": "pagination-status",
107
- className: l(
108
- "flex items-center text-sm leading-4.5 tracking-tight font-normal text-muted-foreground",
109
- a
110
- ),
111
- ...t
112
- }
113
- )
114
- );
115
- H.displayName = "PaginationStatus";
116
- const O = r(({ className: a, size: t, style: e, ...n }, o) => {
117
- const d = g() === "small" && t === void 0, c = t ?? (d ? "sm" : "default");
118
- return /* @__PURE__ */ i(
119
- _,
120
- {
121
- ref: o,
122
- size: c,
123
- "data-slot": "pagination-select-trigger",
124
- style: e,
125
- className: l(
126
- W({ size: c }),
127
- a
128
- ),
129
- ...n
130
- }
131
- );
79
+ S.displayName = "PaginationContent";
80
+ var C = o((e, t) => /* @__PURE__ */ f("li", {
81
+ ref: t,
82
+ "data-slot": "pagination-item",
83
+ ...e
84
+ }));
85
+ C.displayName = "PaginationItem";
86
+ var w = o(({ className: t, ...n }, r) => /* @__PURE__ */ f("output", {
87
+ ref: r,
88
+ "data-slot": "pagination-status",
89
+ className: e("flex items-center text-sm leading-4.5 tracking-tight font-normal text-muted-foreground", t),
90
+ ...n
91
+ }));
92
+ w.displayName = "PaginationStatus";
93
+ var T = o(({ className: t, size: r, style: a, ...o }, s) => {
94
+ let c = i() === "small" && r === void 0, l = r ?? (c ? "sm" : "default");
95
+ return /* @__PURE__ */ f(n, {
96
+ ref: s,
97
+ size: l,
98
+ "data-slot": "pagination-select-trigger",
99
+ style: a,
100
+ className: e(_({ size: l }), t),
101
+ ...o
102
+ });
132
103
  });
133
- O.displayName = "PaginationSelectTrigger";
134
- const Y = r(
135
- ({ children: a, className: t, isActive: e, isDisabled: n, onClick: o, size: s, ...d }, c) => {
136
- const v = g(), m = s ?? v, { buttonSize: p, radiusClass: h, textLinkWidth: P } = N(m), b = (f) => {
137
- if (n) {
138
- f.preventDefault();
139
- return;
140
- }
141
- o?.(f);
142
- };
143
- return /* @__PURE__ */ i(
144
- z,
145
- {
146
- variant: "ghost",
147
- size: p,
148
- "data-slot": "pagination-link",
149
- "data-active": e,
150
- className: l(
151
- h,
152
- P,
153
- y({ size: m, active: e }),
154
- n && "pointer-events-none opacity-50",
155
- t
156
- ),
157
- render: /* @__PURE__ */ i(
158
- "a",
159
- {
160
- ref: c,
161
- "aria-current": e ? "page" : void 0,
162
- "aria-disabled": n || void 0,
163
- onClick: b,
164
- tabIndex: n ? -1 : void 0,
165
- ...d,
166
- children: a
167
- }
168
- )
169
- }
170
- );
171
- }
172
- );
173
- Y.displayName = "PaginationLink";
174
- const u = r(
175
- ({
176
- ariaLabel: a,
177
- className: t,
178
- dataSlot: e,
179
- icon: n,
180
- isDisabled: o,
181
- onClick: s,
182
- size: d,
183
- ...c
184
- }, v) => {
185
- const m = g(), p = d ?? m, { buttonSize: h, radiusClass: P, iconButtonWidth: b } = N(p), f = (S) => {
186
- if (o) {
187
- S.preventDefault();
188
- return;
189
- }
190
- s?.(S);
191
- };
192
- return /* @__PURE__ */ i(
193
- z,
194
- {
195
- variant: "ghost",
196
- size: h,
197
- "data-slot": e,
198
- className: l(
199
- P,
200
- b,
201
- y({ size: p, active: !1 }),
202
- o && "pointer-events-none opacity-50",
203
- t
204
- ),
205
- render: /* @__PURE__ */ i(
206
- "a",
207
- {
208
- ref: v,
209
- "aria-label": a,
210
- "aria-disabled": o || void 0,
211
- onClick: f,
212
- tabIndex: o ? -1 : void 0,
213
- ...c,
214
- children: n
215
- }
216
- )
217
- }
218
- );
219
- }
220
- );
221
- u.displayName = "PaginationIconLink";
222
- const Z = r(({ className: a, size: t, label: e = "Go to first page", ...n }, o) => /* @__PURE__ */ i(
223
- u,
224
- {
225
- ref: o,
226
- dataSlot: "pagination-first",
227
- ariaLabel: e,
228
- icon: /* @__PURE__ */ i(I, {}),
229
- className: a,
230
- size: t,
231
- ...n
232
- }
233
- ));
234
- Z.displayName = "PaginationFirst";
235
- const K = r(({ className: a, size: t, label: e = "Go to previous page", ...n }, o) => /* @__PURE__ */ i(
236
- u,
237
- {
238
- ref: o,
239
- dataSlot: "pagination-previous",
240
- ariaLabel: e,
241
- icon: /* @__PURE__ */ i(w, {}),
242
- className: a,
243
- size: t,
244
- ...n
245
- }
246
- ));
247
- K.displayName = "PaginationPrevious";
248
- const M = r(({ className: a, size: t, label: e = "Go to next page", ...n }, o) => /* @__PURE__ */ i(
249
- u,
250
- {
251
- ref: o,
252
- dataSlot: "pagination-next",
253
- ariaLabel: e,
254
- icon: /* @__PURE__ */ i(C, {}),
255
- className: a,
256
- size: t,
257
- ...n
258
- }
259
- ));
260
- M.displayName = "PaginationNext";
261
- const U = r(({ className: a, size: t, label: e = "Go to last page", ...n }, o) => /* @__PURE__ */ i(
262
- u,
263
- {
264
- ref: o,
265
- dataSlot: "pagination-last",
266
- ariaLabel: e,
267
- icon: /* @__PURE__ */ i(T, {}),
268
- className: a,
269
- size: t,
270
- ...n
271
- }
272
- ));
273
- U.displayName = "PaginationLast";
274
- const X = r(({ className: a, size: t, label: e = "More pages", ...n }, o) => {
275
- const s = g(), d = t ?? s, { iconButtonWidth: c } = N(d);
276
- return /* @__PURE__ */ L(
277
- "span",
278
- {
279
- ref: o,
280
- "data-slot": "pagination-ellipsis",
281
- className: l(
282
- c,
283
- R({ size: d }),
284
- a
285
- ),
286
- ...n,
287
- children: [
288
- /* @__PURE__ */ i(B, { "aria-hidden": "true", className: "h-4 w-4" }),
289
- /* @__PURE__ */ i("span", { className: "sr-only", children: e })
290
- ]
291
- }
292
- );
104
+ T.displayName = "PaginationSelectTrigger";
105
+ var E = o(({ children: n, className: r, isActive: a, isDisabled: o, onClick: s, size: c, ...l }, u) => {
106
+ let d = i(), p = c ?? d, { buttonSize: m, radiusClass: g, textLinkWidth: _ } = b(p);
107
+ return /* @__PURE__ */ f(t, {
108
+ variant: "ghost",
109
+ size: m,
110
+ "data-slot": "pagination-link",
111
+ "data-active": a,
112
+ className: e(g, _, h({
113
+ size: p,
114
+ active: a
115
+ }), o && "pointer-events-none opacity-50", r),
116
+ render: /* @__PURE__ */ f("a", {
117
+ ref: u,
118
+ "aria-current": a ? "page" : void 0,
119
+ "aria-disabled": o || void 0,
120
+ onClick: (e) => {
121
+ if (o) {
122
+ e.preventDefault();
123
+ return;
124
+ }
125
+ s?.(e);
126
+ },
127
+ tabIndex: o ? -1 : void 0,
128
+ ...l,
129
+ children: n
130
+ })
131
+ });
293
132
  });
294
- X.displayName = "PaginationEllipsis";
295
- const q = r(
296
- ({ className: a, ...t }, e) => /* @__PURE__ */ i(
297
- "li",
298
- {
299
- ref: e,
300
- "data-slot": "pagination-results-per-page",
301
- className: l("flex items-center gap-2 pl-3", a),
302
- ...t
303
- }
304
- )
305
- );
306
- q.displayName = "PaginationResultsPerPage";
307
- const J = r(
308
- ({ className: a, ...t }, e) => /* @__PURE__ */ i(
309
- "span",
310
- {
311
- ref: e,
312
- "data-slot": "pagination-results-per-page-label",
313
- className: l(
314
- "text-sm leading-4.5 tracking-tight font-normal text-muted-foreground",
315
- a
316
- ),
317
- ...t
318
- }
319
- )
320
- );
321
- J.displayName = "PaginationResultsPerPageLabel";
322
- export {
323
- j as Pagination,
324
- G as PaginationContent,
325
- X as PaginationEllipsis,
326
- Z as PaginationFirst,
327
- F as PaginationItem,
328
- U as PaginationLast,
329
- Y as PaginationLink,
330
- M as PaginationNext,
331
- K as PaginationPrevious,
332
- q as PaginationResultsPerPage,
333
- J as PaginationResultsPerPageLabel,
334
- O as PaginationSelectTrigger,
335
- H as PaginationStatus,
336
- ra as PaginationTeleport
337
- };
133
+ E.displayName = "PaginationLink";
134
+ var D = o(({ ariaLabel: n, className: r, dataSlot: a, icon: o, isDisabled: s, onClick: c, size: l, ...u }, d) => {
135
+ let p = i(), m = l ?? p, { buttonSize: g, radiusClass: _, iconButtonWidth: v } = b(m);
136
+ return /* @__PURE__ */ f(t, {
137
+ variant: "ghost",
138
+ size: g,
139
+ "data-slot": a,
140
+ className: e(_, v, h({
141
+ size: m,
142
+ active: !1
143
+ }), s && "pointer-events-none opacity-50", r),
144
+ render: /* @__PURE__ */ f("a", {
145
+ ref: d,
146
+ "aria-label": n,
147
+ "aria-disabled": s || void 0,
148
+ onClick: (e) => {
149
+ if (s) {
150
+ e.preventDefault();
151
+ return;
152
+ }
153
+ c?.(e);
154
+ },
155
+ tabIndex: s ? -1 : void 0,
156
+ ...u,
157
+ children: o
158
+ })
159
+ });
160
+ });
161
+ D.displayName = "PaginationIconLink";
162
+ var O = o(({ className: e, size: t, label: n = "Go to first page", ...r }, i) => /* @__PURE__ */ f(D, {
163
+ ref: i,
164
+ dataSlot: "pagination-first",
165
+ ariaLabel: n,
166
+ icon: /* @__PURE__ */ f(l, {}),
167
+ className: e,
168
+ size: t,
169
+ ...r
170
+ }));
171
+ O.displayName = "PaginationFirst";
172
+ var k = o(({ className: e, size: t, label: n = "Go to previous page", ...r }, i) => /* @__PURE__ */ f(D, {
173
+ ref: i,
174
+ dataSlot: "pagination-previous",
175
+ ariaLabel: n,
176
+ icon: /* @__PURE__ */ f(s, {}),
177
+ className: e,
178
+ size: t,
179
+ ...r
180
+ }));
181
+ k.displayName = "PaginationPrevious";
182
+ var A = o(({ className: e, size: t, label: n = "Go to next page", ...r }, i) => /* @__PURE__ */ f(D, {
183
+ ref: i,
184
+ dataSlot: "pagination-next",
185
+ ariaLabel: n,
186
+ icon: /* @__PURE__ */ f(c, {}),
187
+ className: e,
188
+ size: t,
189
+ ...r
190
+ }));
191
+ A.displayName = "PaginationNext";
192
+ var j = o(({ className: e, size: t, label: n = "Go to last page", ...r }, i) => /* @__PURE__ */ f(D, {
193
+ ref: i,
194
+ dataSlot: "pagination-last",
195
+ ariaLabel: n,
196
+ icon: /* @__PURE__ */ f(u, {}),
197
+ className: e,
198
+ size: t,
199
+ ...r
200
+ }));
201
+ j.displayName = "PaginationLast";
202
+ var M = o(({ className: t, size: n, label: r = "More pages", ...a }, o) => {
203
+ let s = i(), c = n ?? s, { iconButtonWidth: l } = b(c);
204
+ return /* @__PURE__ */ p("span", {
205
+ ref: o,
206
+ "data-slot": "pagination-ellipsis",
207
+ className: e(l, g({ size: c }), t),
208
+ ...a,
209
+ children: [/* @__PURE__ */ f(d, {
210
+ "aria-hidden": "true",
211
+ className: "h-4 w-4"
212
+ }), /* @__PURE__ */ f("span", {
213
+ className: "sr-only",
214
+ children: r
215
+ })]
216
+ });
217
+ });
218
+ M.displayName = "PaginationEllipsis";
219
+ var N = o(({ className: t, ...n }, r) => /* @__PURE__ */ f("li", {
220
+ ref: r,
221
+ "data-slot": "pagination-results-per-page",
222
+ className: e("flex items-center gap-2 pl-3", t),
223
+ ...n
224
+ }));
225
+ N.displayName = "PaginationResultsPerPage";
226
+ var P = o(({ className: t, ...n }, r) => /* @__PURE__ */ f("span", {
227
+ ref: r,
228
+ "data-slot": "pagination-results-per-page-label",
229
+ className: e("text-sm leading-4.5 tracking-tight font-normal text-muted-foreground", t),
230
+ ...n
231
+ }));
232
+ P.displayName = "PaginationResultsPerPageLabel";
233
+ //#endregion
234
+ export { x as Pagination, S as PaginationContent, M as PaginationEllipsis, O as PaginationFirst, C as PaginationItem, j as PaginationLast, E as PaginationLink, A as PaginationNext, k as PaginationPrevious, N as PaginationResultsPerPage, P as PaginationResultsPerPageLabel, T as PaginationSelectTrigger, w as PaginationStatus, a as PaginationTeleport };