@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.
- package/DESIGN.md +134 -5
- package/README.md +24 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +58 -327
- package/dist/components/ui/core/accordion/accordion.js +79 -114
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +108 -176
- package/dist/components/ui/core/alert/alert.js +158 -206
- package/dist/components/ui/core/avatar/avatar.js +64 -90
- package/dist/components/ui/core/badge/badge.js +73 -108
- package/dist/components/ui/core/banner/banner.js +146 -215
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +105 -200
- package/dist/components/ui/core/button/button.js +47 -52
- package/dist/components/ui/core/button-group/button-group.js +40 -79
- package/dist/components/ui/core/card/card.js +102 -185
- package/dist/components/ui/core/chart/chart.js +116 -206
- package/dist/components/ui/core/chart/index.js +2 -8
- package/dist/components/ui/core/checkbox/checkbox.js +67 -132
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +7 -7
- package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
- package/dist/components/ui/core/code-block/code-block.js +179 -267
- package/dist/components/ui/core/collapsible/collapsible.js +29 -49
- package/dist/components/ui/core/combobox/combobox.js +41 -0
- package/dist/components/ui/core/command/command.js +85 -150
- package/dist/components/ui/core/count/count.js +21 -32
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +60 -72
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +36 -51
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -87
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +60 -68
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -174
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +104 -145
- package/dist/components/ui/core/date-time-pickers/index.js +5 -10
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +42 -56
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +66 -117
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +63 -93
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +64 -98
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +38 -67
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +23 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +52 -62
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +18 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +24 -31
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +24 -33
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +4 -7
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +17 -31
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +40 -40
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +33 -50
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +78 -99
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +41 -63
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +39 -52
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +7 -15
- package/dist/components/ui/core/dialog/dialog.js +82 -155
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -248
- package/dist/components/ui/core/empty-state/empty-state.context.js +5 -8
- package/dist/components/ui/core/empty-state/empty-state.js +86 -138
- package/dist/components/ui/core/helper-text/helper-text.js +37 -65
- package/dist/components/ui/core/hover-card/hover-card.js +54 -80
- package/dist/components/ui/core/inline-citation/inline-citation.js +98 -181
- package/dist/components/ui/core/input/input.js +12 -27
- package/dist/components/ui/core/input-group/input-group.js +76 -173
- package/dist/components/ui/core/kbd/kbd.js +20 -36
- package/dist/components/ui/core/label/label.js +26 -43
- package/dist/components/ui/core/loader/loader.js +80 -117
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +12 -12
- package/dist/components/ui/core/message/message.d.ts +2 -2
- package/dist/components/ui/core/message/message.js +316 -542
- package/dist/components/ui/core/pagination/pagination-size-context.js +5 -6
- package/dist/components/ui/core/pagination/pagination-teleport.js +86 -106
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination.js +231 -334
- package/dist/components/ui/core/popover/popover.js +90 -157
- package/dist/components/ui/core/progress/progress.js +36 -61
- package/dist/components/ui/core/prompt-input/prompt-input.js +274 -413
- package/dist/components/ui/core/radio-group/radio-group.js +58 -113
- package/dist/components/ui/core/reasoning/reasoning.js +55 -86
- package/dist/components/ui/core/scroll-area/scroll-area.js +41 -71
- package/dist/components/ui/core/search/search.js +77 -99
- package/dist/components/ui/core/segmented-control/segmented-control.js +110 -167
- package/dist/components/ui/core/select/select.js +168 -293
- package/dist/components/ui/core/separator/separator.js +13 -23
- package/dist/components/ui/core/shimmer/shimmer.d.ts +2 -4
- package/dist/components/ui/core/shimmer/shimmer.js +40 -107
- package/dist/components/ui/core/skeleton/skeleton.js +13 -18
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +54 -47
- package/dist/components/ui/core/sources/sources.d.ts +5 -1
- package/dist/components/ui/core/sources/sources.js +58 -79
- package/dist/components/ui/core/switch/switch.js +62 -0
- package/dist/components/ui/core/tabs/tabs.js +149 -223
- package/dist/components/ui/core/tabs/tabs.utils.js +6 -8
- package/dist/components/ui/core/textarea/textarea.js +13 -27
- package/dist/components/ui/core/toggle/toggle.js +55 -74
- package/dist/components/ui/core/tool/tool.js +127 -163
- package/dist/components/ui/core/tooltip/tooltip.js +47 -86
- package/dist/components/ui/core/topbar/topbar.js +106 -190
- package/dist/eslint/index.js +5 -10
- package/dist/eslint/no-overriding-styles.js +178 -237
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/lib/highlight-code.d.ts +9 -0
- package/dist/lib/highlight-code.js +42 -0
- package/dist/lib/portal-container-context.js +8 -9
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/use-controllable-state.js +21 -30
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +32 -112
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +23 -0
- package/package.json +23 -7
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
|
@@ -1,337 +1,234 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
);
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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 };
|