@gears-frontx/ui-kit 0.4.0-alpha.5 → 0.4.0-alpha.7
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/button.js +60 -57
- package/dist/button.js.map +1 -1
- package/dist/carousel.js.map +1 -1
- package/dist/chart.js +184 -122
- package/dist/chart.js.map +1 -1
- package/dist/chunks/button.BWdRnIvz.css +1 -0
- package/dist/chunks/combobox.CKhQGu5a.css +1 -0
- package/dist/chunks/pagination.CKDEuWt6.css +1 -0
- package/dist/chunks/spinner.CLQsj9Ky.css +1 -0
- package/dist/chunks/table.CMm41tvy.css +1 -0
- package/dist/combobox.js +135 -116
- package/dist/combobox.js.map +1 -1
- package/dist/components/button/button.d.ts +18 -5
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/carousel/carousel.d.ts +2 -2
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/chart/chart.d.ts +7 -6
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/combobox/combobox.d.ts +12 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/pagination/pagination.d.ts +33 -2
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/public.d.ts +1 -1
- package/dist/components/pagination/public.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.d.ts +1 -1
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/spinner/spinner.d.ts +11 -1
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +18 -2
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/docs/button.md +24 -4
- package/dist/docs/combobox.md +147 -0
- package/dist/docs/pagination.md +84 -5
- package/dist/docs/spinner.md +5 -1
- package/dist/docs/table.md +95 -11
- package/dist/index.js +198 -195
- package/dist/pagination.js +96 -52
- package/dist/pagination.js.map +1 -1
- package/dist/sidebar.js.map +1 -1
- package/dist/spinner.js +30 -27
- package/dist/spinner.js.map +1 -1
- package/dist/table.js +106 -97
- package/dist/table.js.map +1 -1
- package/llms.txt +27 -9
- package/package.json +1 -1
- package/dist/chunks/button.DgUTlW0_.css +0 -1
- package/dist/chunks/combobox.DZZ3tHP_.css +0 -1
- package/dist/chunks/pagination.bFb5us_w.css +0 -1
- package/dist/chunks/spinner.sH6x_1Uf.css +0 -1
- package/dist/chunks/table.DR2nFT0x.css +0 -1
package/dist/combobox.js
CHANGED
|
@@ -1,159 +1,178 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Combobox as
|
|
4
|
-
import { cx as
|
|
5
|
-
import { XIcon as
|
|
6
|
-
import { useRef as
|
|
7
|
-
import './chunks/combobox.
|
|
8
|
-
inputWrap:
|
|
9
|
-
input:
|
|
2
|
+
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { Combobox as r } from "@base-ui/react/combobox";
|
|
4
|
+
import { cx as c } from "class-variance-authority";
|
|
5
|
+
import { XIcon as g, CheckIcon as f, ChevronDownIcon as _ } from "lucide-react";
|
|
6
|
+
import { useRef as w } from "react";
|
|
7
|
+
import './chunks/combobox.CKhQGu5a.css';const x = "_inputWrap_1w5u7_15", N = "_input_1w5u7_15", v = "_hasTrailingControl_1w5u7_110", T = "_inputTrigger_1w5u7_15", d = "_inputClear_1w5u7_15", R = "_selectTrigger_1w5u7_177", L = "_selectValue_1w5u7_177", y = "_selectTriggerIcon_1w5u7_177", V = "_popup_1w5u7_294", P = "_positioner_1w5u7_306", W = "_list_1w5u7_322", G = "_empty_1w5u7_381", j = "_group_1w5u7_389", D = "_groupLabel_1w5u7_393", E = "_item_1w5u7_400", S = "_itemIndicator_1w5u7_406", k = "_separator_1w5u7_452", A = "_chips_1w5u7_463", M = "_chip_1w5u7_463", X = "_chipRemove_1w5u7_463", $ = "_chipRemoveIcon_1w5u7_565", q = "_chipsInput_1w5u7_463", z = "_svgIcon_1w5u7_620", e = {
|
|
8
|
+
inputWrap: x,
|
|
9
|
+
input: N,
|
|
10
10
|
hasTrailingControl: v,
|
|
11
|
-
inputTrigger:
|
|
11
|
+
inputTrigger: T,
|
|
12
12
|
inputClear: d,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */ n(
|
|
34
|
-
}
|
|
35
|
-
function B({
|
|
36
|
-
return /* @__PURE__ */ n(e.Clear, { className: r(t.inputClear, o), ...i, children: /* @__PURE__ */ n(_, { className: t.svgIcon }) });
|
|
37
|
-
}
|
|
38
|
-
function U({
|
|
13
|
+
selectTrigger: R,
|
|
14
|
+
selectValue: L,
|
|
15
|
+
selectTriggerIcon: y,
|
|
16
|
+
popup: V,
|
|
17
|
+
positioner: P,
|
|
18
|
+
list: W,
|
|
19
|
+
empty: G,
|
|
20
|
+
group: j,
|
|
21
|
+
groupLabel: D,
|
|
22
|
+
item: E,
|
|
23
|
+
itemIndicator: S,
|
|
24
|
+
separator: k,
|
|
25
|
+
chips: A,
|
|
26
|
+
chip: M,
|
|
27
|
+
chipRemove: X,
|
|
28
|
+
chipRemoveIcon: $,
|
|
29
|
+
chipsInput: q,
|
|
30
|
+
svgIcon: z
|
|
31
|
+
}, U = r.Root;
|
|
32
|
+
function Y(o) {
|
|
33
|
+
return /* @__PURE__ */ n(r.Value, { ...o });
|
|
34
|
+
}
|
|
35
|
+
function B({
|
|
39
36
|
className: o,
|
|
40
|
-
children:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
children: t,
|
|
38
|
+
variant: s = "default",
|
|
39
|
+
...i
|
|
40
|
+
}) {
|
|
41
|
+
return s === "select" ? /* @__PURE__ */ p(r.Trigger, { className: c(e.selectTrigger, o), ...i, children: [
|
|
42
|
+
/* @__PURE__ */ n("span", { className: e.selectValue, children: t }),
|
|
43
|
+
/* @__PURE__ */ n(_, { className: c(e.svgIcon, e.selectTriggerIcon) })
|
|
44
|
+
] }) : /* @__PURE__ */ n(r.Trigger, { className: c(e.inputTrigger, o), ...i, children: t ?? /* @__PURE__ */ n(_, { className: e.svgIcon }) });
|
|
45
|
+
}
|
|
46
|
+
function F({ className: o, ...t }) {
|
|
47
|
+
return /* @__PURE__ */ n(r.Clear, { className: c(e.inputClear, o), ...t, children: /* @__PURE__ */ n(g, { className: e.svgIcon }) });
|
|
48
|
+
}
|
|
49
|
+
function Z({
|
|
50
|
+
className: o,
|
|
51
|
+
children: t,
|
|
52
|
+
disabled: s = !1,
|
|
53
|
+
showTrigger: i = !0,
|
|
54
|
+
showClear: a = !1,
|
|
55
|
+
toggleLabel: u = "Toggle options",
|
|
56
|
+
clearLabel: l = "Clear value",
|
|
46
57
|
...m
|
|
47
58
|
}) {
|
|
48
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ p("span", { className: e.inputWrap, children: [
|
|
49
60
|
/* @__PURE__ */ n(
|
|
50
|
-
|
|
61
|
+
r.Input,
|
|
51
62
|
{
|
|
52
|
-
className:
|
|
53
|
-
|
|
54
|
-
(
|
|
63
|
+
className: c(
|
|
64
|
+
e.input,
|
|
65
|
+
(i || a) && e.hasTrailingControl,
|
|
55
66
|
o
|
|
56
67
|
),
|
|
57
|
-
disabled:
|
|
68
|
+
disabled: s,
|
|
58
69
|
...m
|
|
59
70
|
}
|
|
60
71
|
),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
72
|
+
i && /* @__PURE__ */ n(B, { disabled: s, "aria-label": u }),
|
|
73
|
+
a && /* @__PURE__ */ n(F, { disabled: s, "aria-label": l }),
|
|
74
|
+
t
|
|
64
75
|
] });
|
|
65
76
|
}
|
|
66
|
-
function
|
|
77
|
+
function oo({
|
|
67
78
|
className: o,
|
|
68
|
-
children:
|
|
69
|
-
container:
|
|
70
|
-
anchor:
|
|
71
|
-
side:
|
|
72
|
-
sideOffset:
|
|
73
|
-
align:
|
|
79
|
+
children: t,
|
|
80
|
+
container: s,
|
|
81
|
+
anchor: i,
|
|
82
|
+
side: a = "bottom",
|
|
83
|
+
sideOffset: u = 6,
|
|
84
|
+
align: l = "start",
|
|
74
85
|
alignOffset: m = 0,
|
|
75
86
|
positionMethod: b,
|
|
76
|
-
collisionBoundary:
|
|
77
|
-
collisionPadding:
|
|
78
|
-
...
|
|
87
|
+
collisionBoundary: h,
|
|
88
|
+
collisionPadding: C,
|
|
89
|
+
...I
|
|
79
90
|
}) {
|
|
80
|
-
return /* @__PURE__ */ n(
|
|
81
|
-
|
|
91
|
+
return /* @__PURE__ */ n(r.Portal, { container: s, children: /* @__PURE__ */ n(
|
|
92
|
+
r.Positioner,
|
|
82
93
|
{
|
|
83
|
-
anchor:
|
|
84
|
-
side:
|
|
85
|
-
sideOffset:
|
|
86
|
-
align:
|
|
94
|
+
anchor: i,
|
|
95
|
+
side: a,
|
|
96
|
+
sideOffset: u,
|
|
97
|
+
align: l,
|
|
87
98
|
alignOffset: m,
|
|
88
99
|
positionMethod: b,
|
|
89
|
-
collisionBoundary:
|
|
90
|
-
collisionPadding:
|
|
91
|
-
className:
|
|
92
|
-
children: /* @__PURE__ */ n(
|
|
100
|
+
collisionBoundary: h,
|
|
101
|
+
collisionPadding: C,
|
|
102
|
+
className: e.positioner,
|
|
103
|
+
children: /* @__PURE__ */ n(r.Popup, { className: c(e.popup, o), ...I, children: t })
|
|
93
104
|
}
|
|
94
105
|
) });
|
|
95
106
|
}
|
|
96
|
-
function
|
|
97
|
-
return /* @__PURE__ */ n(
|
|
107
|
+
function eo({ className: o, ...t }) {
|
|
108
|
+
return /* @__PURE__ */ n(r.List, { className: c(e.list, o), ...t });
|
|
98
109
|
}
|
|
99
|
-
function
|
|
100
|
-
return /* @__PURE__ */ n(
|
|
110
|
+
function to({ className: o, ...t }) {
|
|
111
|
+
return /* @__PURE__ */ n(r.Empty, { className: c(e.empty, o), ...t });
|
|
101
112
|
}
|
|
102
|
-
function
|
|
103
|
-
return /* @__PURE__ */ n(
|
|
113
|
+
function no({ className: o, ...t }) {
|
|
114
|
+
return /* @__PURE__ */ n(r.Group, { className: c(e.group, o), ...t });
|
|
104
115
|
}
|
|
105
|
-
function
|
|
106
|
-
return /* @__PURE__ */ n(
|
|
116
|
+
function ro({ className: o, ...t }) {
|
|
117
|
+
return /* @__PURE__ */ n(r.GroupLabel, { className: c(e.groupLabel, o), ...t });
|
|
107
118
|
}
|
|
108
|
-
function
|
|
109
|
-
return /* @__PURE__ */ n(
|
|
119
|
+
function co(o) {
|
|
120
|
+
return /* @__PURE__ */ n(r.Collection, { ...o });
|
|
110
121
|
}
|
|
111
|
-
function
|
|
112
|
-
return /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
/* @__PURE__ */ n(
|
|
122
|
+
function so({ className: o, children: t, ...s }) {
|
|
123
|
+
return /* @__PURE__ */ p(r.Item, { className: c(e.item, o), ...s, children: [
|
|
124
|
+
t,
|
|
125
|
+
/* @__PURE__ */ n(r.ItemIndicator, { render: /* @__PURE__ */ n("span", { className: e.itemIndicator }), children: /* @__PURE__ */ n(f, { className: e.svgIcon }) })
|
|
115
126
|
] });
|
|
116
127
|
}
|
|
117
|
-
function
|
|
118
|
-
return /* @__PURE__ */ n(
|
|
128
|
+
function io({ className: o, ...t }) {
|
|
129
|
+
return /* @__PURE__ */ n(r.Separator, { className: c(e.separator, o), ...t });
|
|
119
130
|
}
|
|
120
|
-
function
|
|
121
|
-
return /* @__PURE__ */ n(
|
|
131
|
+
function ao({ className: o, ...t }) {
|
|
132
|
+
return /* @__PURE__ */ n(r.Chips, { className: c(e.chips, o), ...t });
|
|
122
133
|
}
|
|
123
|
-
function
|
|
134
|
+
function uo({
|
|
124
135
|
className: o,
|
|
125
|
-
children:
|
|
126
|
-
showRemove:
|
|
127
|
-
removeLabel:
|
|
128
|
-
...
|
|
136
|
+
children: t,
|
|
137
|
+
showRemove: s = !0,
|
|
138
|
+
removeLabel: i = "Remove",
|
|
139
|
+
...a
|
|
129
140
|
}) {
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
return /* @__PURE__ */ p(r.Chip, { className: c(e.chip, o), ...a, children: [
|
|
142
|
+
t,
|
|
143
|
+
s && /* @__PURE__ */ n(
|
|
144
|
+
r.ChipRemove,
|
|
145
|
+
{
|
|
146
|
+
className: e.chipRemove,
|
|
147
|
+
"aria-label": i,
|
|
148
|
+
onMouseDown: (u) => u.stopPropagation(),
|
|
149
|
+
children: /* @__PURE__ */ n(g, { className: c(e.svgIcon, e.chipRemoveIcon) })
|
|
150
|
+
}
|
|
151
|
+
)
|
|
133
152
|
] });
|
|
134
153
|
}
|
|
135
|
-
function
|
|
136
|
-
return /* @__PURE__ */ n(
|
|
154
|
+
function po({ className: o, ...t }) {
|
|
155
|
+
return /* @__PURE__ */ n(r.Input, { className: c(e.chipsInput, o), ...t });
|
|
137
156
|
}
|
|
138
|
-
function
|
|
139
|
-
return
|
|
157
|
+
function lo() {
|
|
158
|
+
return w(null);
|
|
140
159
|
}
|
|
141
160
|
export {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
U as Combobox,
|
|
162
|
+
uo as ComboboxChip,
|
|
163
|
+
ao as ComboboxChips,
|
|
164
|
+
po as ComboboxChipsInput,
|
|
165
|
+
co as ComboboxCollection,
|
|
166
|
+
oo as ComboboxContent,
|
|
167
|
+
to as ComboboxEmpty,
|
|
168
|
+
no as ComboboxGroup,
|
|
169
|
+
Z as ComboboxInput,
|
|
170
|
+
so as ComboboxItem,
|
|
171
|
+
ro as ComboboxLabel,
|
|
172
|
+
eo as ComboboxList,
|
|
173
|
+
io as ComboboxSeparator,
|
|
174
|
+
B as ComboboxTrigger,
|
|
175
|
+
Y as ComboboxValue,
|
|
176
|
+
lo as useComboboxAnchor
|
|
158
177
|
};
|
|
159
178
|
//# sourceMappingURL=combobox.js.map
|
package/dist/combobox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","sources":["../src/components/combobox/combobox.tsx"],"sourcesContent":["// Load-bearing: useComboboxAnchor calls useRef directly in its own body, so\n// this can't be dropped. Coupled to CLIENT_COMPONENTS in\n// scripts/verify-consumer.sh — keep both in sync if this ever changes.\n'use client';\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';\nimport { cx } from 'class-variance-authority';\nimport { CheckIcon, ChevronDownIcon, XIcon } from 'lucide-react';\nimport { type ComponentPropsWithRef, type ReactNode, useRef } from 'react';\n\nimport styles from './combobox.module.css';\n\nexport const Combobox = ComboboxPrimitive.Root;\n/**\n * Base UI pass-through; props type re-exported (see dialog.tsx). Generic\n * like the root itself: `Value` is the item value's type, `Multiple` widens\n * `value`/`onValueChange` (and the input's typed selection) to arrays when\n * true — same idiom as select.tsx's `SelectProps<Value, Multiple>`.\n */\nexport type ComboboxProps<\n Value,\n Multiple extends boolean | undefined = false,\n> = ComboboxPrimitive.Root.Props<Value, Multiple>;\n\n/*\n * Unlike Select — which always needs a separate SelectValue to render the\n * chosen label next to its button-only trigger — a single-select Combobox's\n * own <input> already displays the current value as editable text, so\n * ComboboxValue is normally unused there. It exists for the cases upstream\n * demonstrates it for: formatting a multi-select's array of values inside\n * ComboboxChips (see the combobox.md example). It renders no element of its\n * own (verified against the Base UI source), hence no className to merge —\n * matching upstream's own wrapper exactly.\n */\nexport type ComboboxValueProps = ComboboxPrimitive.Value.Props;\n\nexport function ComboboxValue(props: ComboboxValueProps) {\n return <ComboboxPrimitive.Value {...props} />;\n}\n\nexport interface ComboboxTriggerProps\n extends Omit<ComponentPropsWithRef<typeof ComboboxPrimitive.Trigger>, 'className'> {\n className?: string;\n children?: ReactNode;\n}\n\n/*\n * Exported standalone (upstream exports it too), but also reused below by\n * ComboboxInput's own `showTrigger` — the two are the same button, upstream\n * just composes it inline via `render={<ComboboxTrigger/>}` where this kit\n * has no InputGroup primitive to render it into (see ComboboxInput).\n */\nexport function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger className={cx(styles.inputTrigger, className)} {...props}>\n {children ?? <ChevronDownIcon className={styles.svgIcon} />}\n </ComboboxPrimitive.Trigger>\n );\n}\n\n/*\n * NOT exported (upstream defines it but only exports Combobox/Combobox\n * Input/…/ComboboxTrigger/ComboboxValue/useComboboxAnchor at the bottom of\n * its file — Clear is missing from that list) — it only ever appears\n * composed into ComboboxInput via `showClear`, never as a kit-level part a\n * consumer reaches for on its own.\n */\ninterface ComboboxClearProps\n extends Omit<ComponentPropsWithRef<typeof ComboboxPrimitive.Clear>, 'className'> {\n className?: string;\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear className={cx(styles.inputClear, className)} {...props}>\n <XIcon className={styles.svgIcon} />\n </ComboboxPrimitive.Clear>\n );\n}\n\nexport interface ComboboxInputProps extends Omit<ComboboxPrimitive.Input.Props, 'className'> {\n className?: string;\n /**\n * Renders the chevron button that opens the popup, trailing the field.\n * @default true\n */\n showTrigger?: boolean;\n /**\n * Renders a clear button trailing the field once a value is chosen. Base\n * UI's Clear part only mounts while there's something to clear (default\n * `keepMounted={false}`), and while it's mounted it visually replaces the\n * trigger in the same inline-end slot (see combobox.module.css's\n * `:has()` rule) rather than the two ever stacking.\n * @default false\n */\n showClear?: boolean;\n /**\n * Accessible name for the chevron button `showTrigger` renders. It is an\n * icon-only control, so this string IS its name — override it to ship a\n * combobox in any language but English, the same way `Dialog`'s\n * `closeLabel` and `SidebarTrigger`'s `label` work.\n * @default 'Toggle options'\n */\n toggleLabel?: string;\n /**\n * Accessible name for the clear button `showClear` renders.\n * @default 'Clear value'\n */\n clearLabel?: string;\n children?: ReactNode;\n}\n\n/*\n * Upstream composes this from a separate InputGroup/InputGroupAddon\n * registry component (its own generic field-plus-adornments primitive,\n * shared with other shadcn components) — this kit has no such primitive, so\n * the trailing trigger/clear are laid out here directly as an absolutely\n * positioned overlay instead, the same idiom input.tsx already uses for its\n * own icon/end slots.\n */\nexport function ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n toggleLabel = 'Toggle options',\n clearLabel = 'Clear value',\n ...props\n}: ComboboxInputProps) {\n return (\n <span className={styles.inputWrap}>\n <ComboboxPrimitive.Input\n className={cx(\n styles.input,\n (showTrigger || showClear) && styles.hasTrailingControl,\n className,\n )}\n disabled={disabled}\n {...props}\n />\n {showTrigger && <ComboboxTrigger disabled={disabled} aria-label={toggleLabel} />}\n {showClear && <ComboboxClear disabled={disabled} aria-label={clearLabel} />}\n {children}\n </span>\n );\n}\n\nexport interface ComboboxContentProps\n extends Omit<ComboboxPrimitive.Popup.Props, 'className'>,\n Pick<\n ComboboxPrimitive.Positioner.Props,\n // positionMethod/collision*: see dropdown-menu.tsx — the escape hatch\n // for anchors inside a transform/filter container. `anchor`: lets a\n // multi-select point the popup at ComboboxChips instead of the\n // (nonexistent, in that mode) single-line input — see\n // useComboboxAnchor below.\n | 'anchor'\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'positionMethod'\n | 'collisionBoundary'\n | 'collisionPadding'\n > {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a section rather\n * than <html>) so the popup inherits its tokens and font.\n */\n container?: ComboboxPrimitive.Portal.Props['container'];\n}\n\n/*\n * Deliberately thinner than SelectContent: Select always fuses its content\n * with a List (plus scroll arrows) because every Select popup shows the\n * same shape. Combobox's own popup can hold a List, an Empty message, or\n * both side by side (see combobox.md) — upstream places List/Empty as\n * ComboboxContent's own children rather than having Content wrap them, and\n * there is no scroll-arrow pair to port (Base UI's Combobox has no\n * ScrollUp/DownArrow parts — the List just scrolls itself, see .list below).\n */\nexport function ComboboxContent({\n className,\n children,\n container,\n anchor,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n positionMethod,\n collisionBoundary,\n collisionPadding,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal container={container}>\n <ComboboxPrimitive.Positioner\n anchor={anchor}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n positionMethod={positionMethod}\n collisionBoundary={collisionBoundary}\n collisionPadding={collisionPadding}\n className={styles.positioner}\n >\n <ComboboxPrimitive.Popup className={cx(styles.popup, className)} {...props}>\n {children}\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\nexport interface ComboboxListProps extends Omit<ComboboxPrimitive.List.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxList({ className, ...props }: ComboboxListProps) {\n return <ComboboxPrimitive.List className={cx(styles.list, className)} {...props} />;\n}\n\nexport interface ComboboxEmptyProps extends Omit<ComboboxPrimitive.Empty.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return <ComboboxPrimitive.Empty className={cx(styles.empty, className)} {...props} />;\n}\n\nexport interface ComboboxGroupProps extends Omit<ComboboxPrimitive.Group.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return <ComboboxPrimitive.Group className={cx(styles.group, className)} {...props} />;\n}\n\nexport interface ComboboxLabelProps extends Omit<ComboboxPrimitive.GroupLabel.Props, 'className'> {\n className?: string;\n}\n\n/* Kit name follows Select's own convention (SelectLabel wraps\n * SelectPrimitive.GroupLabel, not the unrelated standalone Label part) —\n * and matches what upstream itself calls this same wrapper. */\nexport function ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return <ComboboxPrimitive.GroupLabel className={cx(styles.groupLabel, className)} {...props} />;\n}\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props;\n\n/** Renders no element of its own — a render-prop pass-through for grouped\n * or virtualized lists, same as the Base UI part it wraps. */\nexport function ComboboxCollection(props: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection {...props} />;\n}\n\nexport interface ComboboxItemProps extends Omit<ComboboxPrimitive.Item.Props, 'className'> {\n className?: string;\n children?: ReactNode;\n}\n\nexport function ComboboxItem({ className, children, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item className={cx(styles.item, className)} {...props}>\n {children}\n <ComboboxPrimitive.ItemIndicator render={<span className={styles.itemIndicator} />}>\n <CheckIcon className={styles.svgIcon} />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n}\n\nexport interface ComboboxSeparatorProps\n extends Omit<ComboboxPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\n return <ComboboxPrimitive.Separator className={cx(styles.separator, className)} {...props} />;\n}\n\nexport interface ComboboxChipsProps\n extends Omit<ComponentPropsWithRef<typeof ComboboxPrimitive.Chips>, 'className'> {\n className?: string;\n}\n\n/*\n * `ComponentPropsWithRef`, not `Omit<Chips.Props, 'className'>` like every\n * other part above: this is the one part a consumer forwards a ref INTO\n * (see useComboboxAnchor below), so its props type has to carry `ref`\n * itself — matching upstream's own identical typing for this one export.\n */\nexport function ComboboxChips({ className, ...props }: ComboboxChipsProps) {\n return <ComboboxPrimitive.Chips className={cx(styles.chips, className)} {...props} />;\n}\n\nexport interface ComboboxChipProps extends Omit<ComboboxPrimitive.Chip.Props, 'className'> {\n className?: string;\n children?: ReactNode;\n /**\n * Renders a remove button trailing the chip's label.\n * @default true\n */\n showRemove?: boolean;\n /**\n * Accessible name for that remove button. Reads better naming the chip\n * it removes (`removeLabel={`Remove ${label}`}`) once a form has several\n * of them.\n * @default 'Remove'\n */\n removeLabel?: string;\n}\n\nexport function ComboboxChip({\n className,\n children,\n showRemove = true,\n removeLabel = 'Remove',\n ...props\n}: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip className={cx(styles.chip, className)} {...props}>\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove className={styles.chipRemove} aria-label={removeLabel}>\n <XIcon className={cx(styles.svgIcon, styles.chipRemoveIcon)} />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n );\n}\n\nexport interface ComboboxChipsInputProps extends Omit<ComboboxPrimitive.Input.Props, 'className'> {\n className?: string;\n}\n\n/** The same Combobox.Input part as ComboboxInput above, styled bare instead\n * of field-bordered — it sits inline among the chips, which already carry\n * the field's own border. */\nexport function ComboboxChipsInput({ className, ...props }: ComboboxChipsInputProps) {\n return <ComboboxPrimitive.Input className={cx(styles.chipsInput, className)} {...props} />;\n}\n\n/**\n * A ref to anchor ComboboxContent's popup to ComboboxChips instead of the\n * single-line input a multi-select combobox no longer has room for — pass\n * the same ref to both `<ComboboxChips ref={...}>` and\n * `<ComboboxContent anchor={...}>` (see combobox.md's multi-select\n * example). Exported by upstream as a small convenience over\n * `useRef<HTMLDivElement>(null)`; this is the one call in this module that\n * invokes a hook directly in its own body, which is why the module carries\n * 'use client' — see the top-of-file comment.\n */\nexport function useComboboxAnchor() {\n return useRef<HTMLDivElement | null>(null);\n}\n"],"names":["Combobox","ComboboxPrimitive","ComboboxValue","props","jsx","ComboboxTrigger","className","children","cx","styles","ChevronDownIcon","ComboboxClear","XIcon","ComboboxInput","disabled","showTrigger","showClear","toggleLabel","clearLabel","jsxs","ComboboxContent","container","anchor","side","sideOffset","align","alignOffset","positionMethod","collisionBoundary","collisionPadding","ComboboxList","ComboboxEmpty","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxItem","CheckIcon","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","removeLabel","ComboboxChipsInput","useComboboxAnchor","useRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAYaA,IAAWC,EAAkB;AAwBnC,SAASC,EAAcC,GAA2B;AACvD,SAAO,gBAAAC,EAACH,EAAkB,OAAlB,EAAyB,GAAGE,EAAA,CAAO;AAC7C;AAcO,SAASE,EAAgB,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGJ,KAA+B;AACvF,2BACGF,EAAkB,SAAlB,EAA0B,WAAWO,EAAGC,EAAO,cAAcH,CAAS,GAAI,GAAGH,GAC3E,UAAAI,KAAY,gBAAAH,EAACM,KAAgB,WAAWD,EAAO,SAAS,GAC3D;AAEJ;AAcA,SAASE,EAAc,EAAE,WAAAL,GAAW,GAAGH,KAA6B;AAClE,2BACGF,EAAkB,OAAlB,EAAwB,WAAWO,EAAGC,EAAO,YAAYH,CAAS,GAAI,GAAGH,GACxE,UAAA,gBAAAC,EAACQ,KAAM,WAAWH,EAAO,SAAS,GACpC;AAEJ;AA0CO,SAASI,EAAc;AAAA,EAC5B,WAAAP;AAAA,EACA,UAAAC;AAAA,EACA,UAAAO,IAAW;AAAA,EACX,aAAAC,IAAc;AAAA,EACd,WAAAC,IAAY;AAAA,EACZ,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AAAA,EACb,GAAGf;AACL,GAAuB;AACrB,SACE,gBAAAgB,EAAC,QAAA,EAAK,WAAWV,EAAO,WACtB,UAAA;AAAA,IAAA,gBAAAL;AAAA,MAACH,EAAkB;AAAA,MAAlB;AAAA,QACC,WAAWO;AAAA,UACTC,EAAO;AAAA,WACNM,KAAeC,MAAcP,EAAO;AAAA,UACrCH;AAAA,QAAA;AAAA,QAEF,UAAAQ;AAAA,QACC,GAAGX;AAAA,MAAA;AAAA,IAAA;AAAA,IAELY,KAAe,gBAAAX,EAACC,GAAA,EAAgB,UAAAS,GAAo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AGtC;AACL,GAAsB;AACpB,SACE,gBAAAgB,EAAClB,EAAkB,MAAlB,EAAuB,WAAWO,EAAGC,EAAO,MAAMH,CAAS,GAAI,GAAGH,GAChE,UAAA;AAAA,IAAAI;AAAA,IACAiC,KACC,gBAAApC,EAACH,EAAkB,YAAlB,EAA6B,WAAWQ,EAAO,YAAY,cAAYgC,GACtE,UAAA,gBAAArC,EAACQ,GAAA,EAAM,WAAWJ,EAAGC,EAAO,SAASA,EAAO,cAAc,GAAG,EAAA,CAC/D;AAAA,EAAA,GAEJ;AAEJ;AASO,SAASiC,GAAmB,EAAE,WAAApC,GAAW,GAAGH,KAAkC;AACnF,SAAO,gBAAAC,EAACH,EAAkB,OAAlB,EAAwB,WAAWO,EAAGC,EAAO,YAAYH,CAAS,GAAI,GAAGH,EAAA,CAAO;AAC1F;AAYO,SAASwC,KAAoB;AAClC,SAAOC,EAA8B,IAAI;AAC3C;"}
|
|
1
|
+
{"version":3,"file":"combobox.js","sources":["../src/components/combobox/combobox.tsx"],"sourcesContent":["// Load-bearing: useComboboxAnchor calls useRef directly in its own body, so\n// this can't be dropped. Coupled to CLIENT_COMPONENTS in\n// scripts/verify-consumer.sh — keep both in sync if this ever changes.\n'use client';\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';\nimport { cx } from 'class-variance-authority';\nimport { CheckIcon, ChevronDownIcon, XIcon } from 'lucide-react';\nimport { type ComponentPropsWithRef, type ReactNode, useRef } from 'react';\n\nimport styles from './combobox.module.css';\n\nexport const Combobox = ComboboxPrimitive.Root;\n/**\n * Base UI pass-through; props type re-exported (see dialog.tsx). Generic\n * like the root itself: `Value` is the item value's type, `Multiple` widens\n * `value`/`onValueChange` (and the input's typed selection) to arrays when\n * true — same idiom as select.tsx's `SelectProps<Value, Multiple>`.\n */\nexport type ComboboxProps<\n Value,\n Multiple extends boolean | undefined = false,\n> = ComboboxPrimitive.Root.Props<Value, Multiple>;\n\n/*\n * Unlike Select — which always needs a separate SelectValue to render the\n * chosen label next to its button-only trigger — a single-select Combobox's\n * own <input> already displays the current value as editable text, so\n * ComboboxValue is normally unused there. It exists for the cases upstream\n * demonstrates it for: formatting a multi-select's array of values inside\n * ComboboxChips (see the combobox.md example). It renders no element of its\n * own (verified against the Base UI source), hence no className to merge —\n * matching upstream's own wrapper exactly.\n */\nexport type ComboboxValueProps = ComboboxPrimitive.Value.Props;\n\nexport function ComboboxValue(props: ComboboxValueProps) {\n return <ComboboxPrimitive.Value {...props} />;\n}\n\nexport interface ComboboxTriggerProps\n extends Omit<ComponentPropsWithRef<typeof ComboboxPrimitive.Trigger>, 'className'> {\n className?: string;\n children?: ReactNode;\n /**\n * `default` is the compact chevron button ComboboxInput composes into the\n * trailing corner of its field. `select` is a field of its own that looks\n * like SelectTrigger: the children (the chosen value, or a placeholder)\n * and then a chevron the trigger adds itself. Pair `select` with the\n * search input INSIDE ComboboxContent (`<ComboboxInput showTrigger={false} />`)\n * and give the trigger an `aria-label`: its role is `combobox`, which takes\n * no name from its content.\n * @default 'default'\n */\n variant?: 'default' | 'select';\n}\n\n/*\n * Exported standalone (upstream exports it too), but also reused below by\n * ComboboxInput's own `showTrigger` — the two are the same button, upstream\n * just composes it inline via `render={<ComboboxTrigger/>}` where this kit\n * has no InputGroup primitive to render it into (see ComboboxInput).\n *\n * `variant=\"select\"` is the same primitive dressed as a Select trigger, for a\n * combobox whose search field lives in the popup. Its children sit in a span\n * so a long value ellipsises instead of pushing the chevron out; that span\n * is also what holds ComboboxChips for a multiple select, which is why the\n * trigger is then rendered as a div (`render={<div />}` with\n * `nativeButton={false}`): a button may not contain the chips' div.\n */\nexport function ComboboxTrigger({\n className,\n children,\n variant = 'default',\n ...props\n}: ComboboxTriggerProps) {\n if (variant === 'select') {\n return (\n <ComboboxPrimitive.Trigger className={cx(styles.selectTrigger, className)} {...props}>\n <span className={styles.selectValue}>{children}</span>\n <ChevronDownIcon className={cx(styles.svgIcon, styles.selectTriggerIcon)} />\n </ComboboxPrimitive.Trigger>\n );\n }\n return (\n <ComboboxPrimitive.Trigger className={cx(styles.inputTrigger, className)} {...props}>\n {children ?? <ChevronDownIcon className={styles.svgIcon} />}\n </ComboboxPrimitive.Trigger>\n );\n}\n\n/*\n * NOT exported (upstream defines it but only exports Combobox/Combobox\n * Input/…/ComboboxTrigger/ComboboxValue/useComboboxAnchor at the bottom of\n * its file — Clear is missing from that list) — it only ever appears\n * composed into ComboboxInput via `showClear`, never as a kit-level part a\n * consumer reaches for on its own.\n */\ninterface ComboboxClearProps\n extends Omit<ComponentPropsWithRef<typeof ComboboxPrimitive.Clear>, 'className'> {\n className?: string;\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear className={cx(styles.inputClear, className)} {...props}>\n <XIcon className={styles.svgIcon} />\n </ComboboxPrimitive.Clear>\n );\n}\n\nexport interface ComboboxInputProps extends Omit<ComboboxPrimitive.Input.Props, 'className'> {\n className?: string;\n /**\n * Renders the chevron button that opens the popup, trailing the field.\n * @default true\n */\n showTrigger?: boolean;\n /**\n * Renders a clear button trailing the field once a value is chosen. Base\n * UI's Clear part only mounts while there's something to clear (default\n * `keepMounted={false}`), and while it's mounted it visually replaces the\n * trigger in the same inline-end slot (see combobox.module.css's\n * `:has()` rule) rather than the two ever stacking.\n * @default false\n */\n showClear?: boolean;\n /**\n * Accessible name for the chevron button `showTrigger` renders. It is an\n * icon-only control, so this string IS its name — override it to ship a\n * combobox in any language but English, the same way `Dialog`'s\n * `closeLabel` and `SidebarTrigger`'s `label` work.\n * @default 'Toggle options'\n */\n toggleLabel?: string;\n /**\n * Accessible name for the clear button `showClear` renders.\n * @default 'Clear value'\n */\n clearLabel?: string;\n children?: ReactNode;\n}\n\n/*\n * Upstream composes this from a separate InputGroup/InputGroupAddon\n * registry component (its own generic field-plus-adornments primitive,\n * shared with other shadcn components) — this kit has no such primitive, so\n * the trailing trigger/clear are laid out here directly as an absolutely\n * positioned overlay instead, the same idiom input.tsx already uses for its\n * own icon/end slots.\n */\nexport function ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n toggleLabel = 'Toggle options',\n clearLabel = 'Clear value',\n ...props\n}: ComboboxInputProps) {\n return (\n <span className={styles.inputWrap}>\n <ComboboxPrimitive.Input\n className={cx(\n styles.input,\n (showTrigger || showClear) && styles.hasTrailingControl,\n className,\n )}\n disabled={disabled}\n {...props}\n />\n {showTrigger && <ComboboxTrigger disabled={disabled} aria-label={toggleLabel} />}\n {showClear && <ComboboxClear disabled={disabled} aria-label={clearLabel} />}\n {children}\n </span>\n );\n}\n\nexport interface ComboboxContentProps\n extends Omit<ComboboxPrimitive.Popup.Props, 'className'>,\n Pick<\n ComboboxPrimitive.Positioner.Props,\n // positionMethod/collision*: see dropdown-menu.tsx — the escape hatch\n // for anchors inside a transform/filter container. `anchor`: lets a\n // multi-select point the popup at ComboboxChips instead of the\n // (nonexistent, in that mode) single-line input — see\n // useComboboxAnchor below.\n | 'anchor'\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'positionMethod'\n | 'collisionBoundary'\n | 'collisionPadding'\n > {\n className?: string;\n /**\n * Where to portal the popup. Defaults to <body>. Pass a themed container\n * when the theme is scoped to a subtree (data-theme on a section rather\n * than <html>) so the popup inherits its tokens and font.\n */\n container?: ComboboxPrimitive.Portal.Props['container'];\n}\n\n/*\n * Deliberately thinner than SelectContent: Select always fuses its content\n * with a List (plus scroll arrows) because every Select popup shows the\n * same shape. Combobox's own popup can hold a List, an Empty message, or\n * both side by side (see combobox.md) — upstream places List/Empty as\n * ComboboxContent's own children rather than having Content wrap them, and\n * there is no scroll-arrow pair to port (Base UI's Combobox has no\n * ScrollUp/DownArrow parts — the List just scrolls itself, see .list below).\n */\nexport function ComboboxContent({\n className,\n children,\n container,\n anchor,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n positionMethod,\n collisionBoundary,\n collisionPadding,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal container={container}>\n <ComboboxPrimitive.Positioner\n anchor={anchor}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n positionMethod={positionMethod}\n collisionBoundary={collisionBoundary}\n collisionPadding={collisionPadding}\n className={styles.positioner}\n >\n <ComboboxPrimitive.Popup className={cx(styles.popup, className)} {...props}>\n {children}\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\nexport interface ComboboxListProps extends Omit<ComboboxPrimitive.List.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxList({ className, ...props }: ComboboxListProps) {\n return <ComboboxPrimitive.List className={cx(styles.list, className)} {...props} />;\n}\n\nexport interface ComboboxEmptyProps extends Omit<ComboboxPrimitive.Empty.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return <ComboboxPrimitive.Empty className={cx(styles.empty, className)} {...props} />;\n}\n\nexport interface ComboboxGroupProps extends Omit<ComboboxPrimitive.Group.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return <ComboboxPrimitive.Group className={cx(styles.group, className)} {...props} />;\n}\n\nexport interface ComboboxLabelProps extends Omit<ComboboxPrimitive.GroupLabel.Props, 'className'> {\n className?: string;\n}\n\n/* Kit name follows Select's own convention (SelectLabel wraps\n * SelectPrimitive.GroupLabel, not the unrelated standalone Label part) —\n * and matches what upstream itself calls this same wrapper. */\nexport function ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return <ComboboxPrimitive.GroupLabel className={cx(styles.groupLabel, className)} {...props} />;\n}\n\nexport type ComboboxCollectionProps = ComboboxPrimitive.Collection.Props;\n\n/** Renders no element of its own — a render-prop pass-through for grouped\n * or virtualized lists, same as the Base UI part it wraps. */\nexport function ComboboxCollection(props: ComboboxCollectionProps) {\n return <ComboboxPrimitive.Collection {...props} />;\n}\n\nexport interface ComboboxItemProps extends Omit<ComboboxPrimitive.Item.Props, 'className'> {\n className?: string;\n children?: ReactNode;\n}\n\nexport function ComboboxItem({ className, children, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item className={cx(styles.item, className)} {...props}>\n {children}\n <ComboboxPrimitive.ItemIndicator render={<span className={styles.itemIndicator} />}>\n <CheckIcon className={styles.svgIcon} />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n}\n\nexport interface ComboboxSeparatorProps\n extends Omit<ComboboxPrimitive.Separator.Props, 'className'> {\n className?: string;\n}\n\nexport function ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\n return <ComboboxPrimitive.Separator className={cx(styles.separator, className)} {...props} />;\n}\n\nexport interface ComboboxChipsProps\n extends Omit<ComponentPropsWithRef<typeof ComboboxPrimitive.Chips>, 'className'> {\n className?: string;\n}\n\n/*\n * `ComponentPropsWithRef`, not `Omit<Chips.Props, 'className'>` like every\n * other part above: this is the one part a consumer forwards a ref INTO\n * (see useComboboxAnchor below), so its props type has to carry `ref`\n * itself — matching upstream's own identical typing for this one export.\n */\nexport function ComboboxChips({ className, ...props }: ComboboxChipsProps) {\n return <ComboboxPrimitive.Chips className={cx(styles.chips, className)} {...props} />;\n}\n\nexport interface ComboboxChipProps extends Omit<ComboboxPrimitive.Chip.Props, 'className'> {\n className?: string;\n children?: ReactNode;\n /**\n * Renders a remove button trailing the chip's label.\n * @default true\n */\n showRemove?: boolean;\n /**\n * Accessible name for that remove button. Reads better naming the chip\n * it removes (`removeLabel={`Remove ${label}`}`) once a form has several\n * of them.\n * @default 'Remove'\n */\n removeLabel?: string;\n}\n\nexport function ComboboxChip({\n className,\n children,\n showRemove = true,\n removeLabel = 'Remove',\n ...props\n}: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip className={cx(styles.chip, className)} {...props}>\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n className={styles.chipRemove}\n aria-label={removeLabel}\n // A chip inside a select-style trigger sits in the trigger's React\n // tree, and the trigger opens the popup on mousedown: without this\n // the press that removes a chip also opens the list. pointerdown is\n // left alone, so outside-press dismissal elsewhere still sees it.\n onMouseDown={(event) => event.stopPropagation()}\n >\n <XIcon className={cx(styles.svgIcon, styles.chipRemoveIcon)} />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n );\n}\n\nexport interface ComboboxChipsInputProps extends Omit<ComboboxPrimitive.Input.Props, 'className'> {\n className?: string;\n}\n\n/** The same Combobox.Input part as ComboboxInput above, styled bare instead\n * of field-bordered — it sits inline among the chips, which already carry\n * the field's own border. */\nexport function ComboboxChipsInput({ className, ...props }: ComboboxChipsInputProps) {\n return <ComboboxPrimitive.Input className={cx(styles.chipsInput, className)} {...props} />;\n}\n\n/**\n * A ref to anchor ComboboxContent's popup to ComboboxChips instead of the\n * single-line input a multi-select combobox no longer has room for — pass\n * the same ref to both `<ComboboxChips ref={...}>` and\n * `<ComboboxContent anchor={...}>` (see combobox.md's multi-select\n * example). Exported by upstream as a small convenience over\n * `useRef<HTMLDivElement>(null)`; this is the one call in this module that\n * invokes a hook directly in its own body, which is why the module carries\n * 'use client' — see the top-of-file comment.\n */\nexport function useComboboxAnchor() {\n return useRef<HTMLDivElement | null>(null);\n}\n"],"names":["Combobox","ComboboxPrimitive","ComboboxValue","props","jsx","ComboboxTrigger","className","children","variant","jsxs","cx","styles","ChevronDownIcon","ComboboxClear","XIcon","ComboboxInput","disabled","showTrigger","showClear","toggleLabel","clearLabel","ComboboxContent","container","anchor","side","sideOffset","align","alignOffset","positionMethod","collisionBoundary","collisionPadding","ComboboxList","ComboboxEmpty","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxItem","CheckIcon","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","removeLabel","event","ComboboxChipsInput","useComboboxAnchor","useRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYaA,IAAWC,EAAkB;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AO,OAAOL,CAAS,GAAI,GAAGH,EAAA,CAAO;AACrF;AAmBO,SAASqC,GAAa;AAAA,EAC3B,WAAAlC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAkC,IAAa;AAAA,EACb,aAAAC,IAAc;AAAA,EACd,GAAGvC;AACL,GAAsB;AACpB,SACE,gBAAAM,EAACR,EAAkB,MAAlB,EAAuB,WAAWS,EAAGC,EAAO,MAAML,CAAS,GAAI,GAAGH,GAChE,UAAA;AAAA,IAAAI;AAAA,IACAkC,KACC,gBAAArC;AAAA,MAACH,EAAkB;AAAA,MAAlB;AAAA,QACC,WAAWU,EAAO;AAAA,QAClB,cAAY+B;AAAA,QAKZ,aAAa,CAACC,MAAUA,EAAM,gBAAA;AAAA,QAE9B,UAAA,gBAAAvC,EAACU,KAAM,WAAWJ,EAAGC,EAAO,SAASA,EAAO,cAAc,EAAA,CAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EAC/D,GAEJ;AAEJ;AASO,SAASiC,GAAmB,EAAE,WAAAtC,GAAW,GAAGH,KAAkC;AACnF,SAAO,gBAAAC,EAACH,EAAkB,OAAlB,EAAwB,WAAWS,EAAGC,EAAO,YAAYL,CAAS,GAAI,GAAGH,EAAA,CAAO;AAC1F;AAYO,SAAS0C,KAAoB;AAClC,SAAOC,EAA8B,IAAI;AAC3C;"}
|
|
@@ -10,12 +10,25 @@ export interface ButtonProps extends Omit<ButtonPrimitive.Props, 'className'>, V
|
|
|
10
10
|
/**
|
|
11
11
|
* Leading icon slot — the one right way to put an icon in a Button (never
|
|
12
12
|
* via children; the slot is what gets sized, spaced, hidden during
|
|
13
|
-
* `loading`, and marked decorative). With no children the button
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* `loading`, and marked decorative). With no children the button has no
|
|
14
|
+
* accessible name of its own — pass `aria-label` — unless `end` holds
|
|
15
|
+
* announced content, since the icon is decorative. With no `end` either it
|
|
16
|
+
* also turns square icon-only.
|
|
17
17
|
*/
|
|
18
18
|
icon?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Trailing slot, rendered after the children — a chevron that opens a
|
|
21
|
+
* menu, a sort-direction arrow, a count. Sized, spaced and hidden during
|
|
22
|
+
* `loading` like `icon`, but NOT marked decorative: its content is part
|
|
23
|
+
* of the button's accessible name, so a count is announced with the label.
|
|
24
|
+
* A glyph hides itself from assistive tech when it carries
|
|
25
|
+
* `aria-hidden="true"`, which lucide icons do by default; hand-written
|
|
26
|
+
* svgs need it passed. A button is itself interactive, so a nested control
|
|
27
|
+
* has no place here (it would be invalid HTML); for a clear button next to
|
|
28
|
+
* a field use Input's `end`. Passing `end` stops the button turning
|
|
29
|
+
* icon-only, since there is then more than one glyph to square up.
|
|
30
|
+
*/
|
|
31
|
+
end?: ReactNode;
|
|
19
32
|
/**
|
|
20
33
|
* Shows a centered spinner and reports `aria-busy`. Content is hidden
|
|
21
34
|
* with opacity, not visibility: it keeps painting the button's size (no
|
|
@@ -45,5 +58,5 @@ export interface ButtonProps extends Omit<ButtonPrimitive.Props, 'className'>, V
|
|
|
45
58
|
*/
|
|
46
59
|
focusableWhenDisabled?: boolean;
|
|
47
60
|
}
|
|
48
|
-
export declare function Button({ className, variant, size, icon, loading, disabled, focusableWhenDisabled, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
61
|
+
export declare function Button({ className, variant, size, icon, end, loading, disabled, focusableWhenDisabled, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
49
62
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQjD,eAAO,MAA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EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,+BAkEb"}
|
|
@@ -35,9 +35,9 @@ export interface CarouselItemProps extends Omit<ComponentProps<'div'>, 'classNam
|
|
|
35
35
|
className?: string;
|
|
36
36
|
}
|
|
37
37
|
export declare function CarouselItem({ className, ...props }: CarouselItemProps): import("react").JSX.Element;
|
|
38
|
-
export type CarouselPreviousProps = Omit<ButtonProps, 'icon'>;
|
|
38
|
+
export type CarouselPreviousProps = Omit<ButtonProps, 'icon' | 'end'>;
|
|
39
39
|
export declare function CarouselPrevious({ className, variant, size, 'aria-label': ariaLabel, disabled, onClick, ...props }: CarouselPreviousProps): import("react").JSX.Element;
|
|
40
|
-
export type CarouselNextProps = Omit<ButtonProps, 'icon'>;
|
|
40
|
+
export type CarouselNextProps = Omit<ButtonProps, 'icon' | 'end'>;
|
|
41
41
|
export declare function CarouselNext({ className, variant, size, 'aria-label': ariaLabel, disabled, onClick, ...props }: CarouselNextProps): import("react").JSX.Element;
|
|
42
42
|
export {};
|
|
43
43
|
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/components/carousel/carousel.tsx"],"names":[],"mappings":"AAQA,OAAO,gBAAgB,EAAE,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAML,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAW/D,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAClD,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,qBAAqB,C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,4 @@
|
|
|
1
|
-
import { ComponentProps, ComponentType, ReactNode } from 'react';
|
|
1
|
+
import { ComponentProps, ComponentType, DOMAttributes, ReactNode } from 'react';
|
|
2
2
|
import { DefaultLegendContentProps, DefaultTooltipContentProps, TooltipValueType } from 'recharts';
|
|
3
3
|
import * as RechartsPrimitive from 'recharts';
|
|
4
4
|
type TooltipNameType = number | string;
|
|
@@ -28,7 +28,8 @@ export interface ChartStyleProps {
|
|
|
28
28
|
}
|
|
29
29
|
export declare function ChartStyle({ id, config }: ChartStyleProps): import("react").JSX.Element | null;
|
|
30
30
|
export declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
31
|
-
|
|
31
|
+
type ContentRootAttributes = Omit<ComponentProps<'div'>, 'className' | 'content' | keyof DOMAttributes<HTMLDivElement>>;
|
|
32
|
+
export type ChartTooltipContentProps = ComponentProps<typeof RechartsPrimitive.Tooltip> & ContentRootAttributes & {
|
|
32
33
|
className?: string;
|
|
33
34
|
hideLabel?: boolean;
|
|
34
35
|
hideIndicator?: boolean;
|
|
@@ -36,13 +37,13 @@ export type ChartTooltipContentProps = ComponentProps<typeof RechartsPrimitive.T
|
|
|
36
37
|
nameKey?: string;
|
|
37
38
|
labelKey?: string;
|
|
38
39
|
} & Omit<DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>;
|
|
39
|
-
export declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: ChartTooltipContentProps): import("react").JSX.Element | null;
|
|
40
|
+
export declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, ...props }: ChartTooltipContentProps): import("react").JSX.Element | null;
|
|
40
41
|
export declare const ChartLegend: import('react').MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => import('react').ReactPortal | null>;
|
|
41
|
-
export type ChartLegendContentProps =
|
|
42
|
+
export type ChartLegendContentProps = ContentRootAttributes & {
|
|
42
43
|
className?: string;
|
|
43
44
|
hideIcon?: boolean;
|
|
44
45
|
nameKey?: string;
|
|
45
|
-
} & DefaultLegendContentProps
|
|
46
|
-
export declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): import("react").JSX.Element | null;
|
|
46
|
+
} & Omit<DefaultLegendContentProps, keyof DOMAttributes<HTMLDivElement> | Extract<keyof DefaultLegendContentProps, `on${Capitalize<string>}`>>;
|
|
47
|
+
export declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, ...props }: ChartLegendContentProps): import("react").JSX.Element | null;
|
|
47
48
|
export {};
|
|
48
49
|
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/components/chart/chart.tsx"],"names":[],"mappings":"AAkCA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAyBxG,KAAK,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,MAAM,CAC9B,MAAM,EACN;IACE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,GAAG,CACA;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACjC;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAC7D,CACF,CAAC;AAkBF,MAAM,MAAM,mBAAmB,GA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O,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,IAAI,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,EAAE,oBAAoB,CAAC,CAAC;AAuChG,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,SAAS,EACT,SAAiB,EACjB,SAAiB,EACjB,aAAqB,EACrB,KAAK,EACL,cAAc,EACd,cAAc,EACd,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,sCA0G1B;AAED,eAAO,MAAM,WAAW,0HAA2B,CAAC;AAEpD,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,GAAG;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,CACJ,yBAAyB,EACzB,MAAM,aAAa,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,MAAM,yBAAyB,EAAE,KAAK,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAC1G,CAAC;AA+BJ,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,QAAgB,EAChB,OAAO,EACP,aAAwB,EACxB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,uBAAuB,sCAmCzB"}
|
|
@@ -13,8 +13,19 @@ export declare function ComboboxValue(props: ComboboxValueProps): import("react"
|
|
|
13
13
|
export interface ComboboxTriggerProps extends Omit<ComponentPropsWithRef<typeof ComboboxPrimitive.Trigger>, 'className'> {
|
|
14
14
|
className?: string;
|
|
15
15
|
children?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* `default` is the compact chevron button ComboboxInput composes into the
|
|
18
|
+
* trailing corner of its field. `select` is a field of its own that looks
|
|
19
|
+
* like SelectTrigger: the children (the chosen value, or a placeholder)
|
|
20
|
+
* and then a chevron the trigger adds itself. Pair `select` with the
|
|
21
|
+
* search input INSIDE ComboboxContent (`<ComboboxInput showTrigger={false} />`)
|
|
22
|
+
* and give the trigger an `aria-label`: its role is `combobox`, which takes
|
|
23
|
+
* no name from its content.
|
|
24
|
+
* @default 'default'
|
|
25
|
+
*/
|
|
26
|
+
variant?: 'default' | 'select';
|
|
16
27
|
}
|
|
17
|
-
export declare function ComboboxTrigger({ className, children, ...props }: ComboboxTriggerProps): import("react").JSX.Element;
|
|
28
|
+
export declare function ComboboxTrigger({ className, children, variant, ...props }: ComboboxTriggerProps): import("react").JSX.Element;
|
|
18
29
|
export interface ComboboxInputProps extends Omit<ComboboxPrimitive.Input.Props, 'className'> {
|
|
19
30
|
className?: string;
|
|
20
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/combobox.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGxE,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAI3E,eAAO,MAAM,QAAQ,+BAAyB,CAAC;AAC/C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CACvB,KAAK,EACL,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,KAAK,IAC1C,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAYlD,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC;AAE/D,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAEtD;AAED,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,iBAAiB,CAAC,OAAO,CAAC,E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,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,iBAAiB,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAExE;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,UAAiB,EACjB,WAAsB,EACtB,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAmBnB;AAED,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;6BAE6B;AAC7B,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,+BAElF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,qDAEhC"}
|
|
@@ -21,15 +21,46 @@ export interface PaginationLinkProps extends Omit<ComponentProps<'a'>, 'classNam
|
|
|
21
21
|
export declare function PaginationLink({ className, isActive, square, ...props }: PaginationLinkProps): import("react").JSX.Element;
|
|
22
22
|
export interface PaginationPreviousProps extends Omit<PaginationLinkProps, 'square'> {
|
|
23
23
|
/** Label text, hidden below the `sm` breakpoint (640px) — matching
|
|
24
|
-
* upstream's `hidden sm:block`.
|
|
24
|
+
* upstream's `hidden sm:block`. Also the accessible name when given, since
|
|
25
|
+
* the label is hidden at that width. @default 'Previous' */
|
|
25
26
|
text?: string;
|
|
26
27
|
}
|
|
27
28
|
export declare function PaginationPrevious({ className, text, ...props }: PaginationPreviousProps): import("react").JSX.Element;
|
|
28
29
|
export interface PaginationNextProps extends Omit<PaginationLinkProps, 'square'> {
|
|
29
|
-
/** @default 'Next' */
|
|
30
|
+
/** Also the accessible name when given. @default 'Next' */
|
|
30
31
|
text?: string;
|
|
31
32
|
}
|
|
32
33
|
export declare function PaginationNext({ className, text, ...props }: PaginationNextProps): import("react").JSX.Element;
|
|
34
|
+
export interface PaginationButtonProps extends Omit<ComponentProps<'button'>, 'className'> {
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Marks the page in view: sets `aria-current="page"` and the active
|
|
37
|
+
* paint, same as PaginationLink's. */
|
|
38
|
+
isActive?: boolean;
|
|
39
|
+
/** Same square footprint as PaginationLink's. @default true */
|
|
40
|
+
square?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Keep the button in the tab order while `disabled`, reporting
|
|
43
|
+
* `aria-disabled` instead of the native attribute. Without it a button that
|
|
44
|
+
* holds keyboard focus when it becomes disabled (Previous, paged down to the
|
|
45
|
+
* first page) is blurred by the browser and focus falls to the page. Same
|
|
46
|
+
* name and meaning as Button's, which this renders through the same Base UI
|
|
47
|
+
* primitive.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
focusableWhenDisabled?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export declare function PaginationButton({ className, isActive, square, type, ...props }: PaginationButtonProps): import("react").JSX.Element;
|
|
53
|
+
export interface PaginationPreviousButtonProps extends Omit<PaginationButtonProps, 'square' | 'isActive'> {
|
|
54
|
+
/** Label text, hidden below the `sm` breakpoint (640px). Also the
|
|
55
|
+
* accessible name when given. @default 'Previous' */
|
|
56
|
+
text?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare function PaginationPreviousButton({ text, ...props }: PaginationPreviousButtonProps): import("react").JSX.Element;
|
|
59
|
+
export interface PaginationNextButtonProps extends Omit<PaginationButtonProps, 'square' | 'isActive'> {
|
|
60
|
+
/** Also the accessible name when given. @default 'Next' */
|
|
61
|
+
text?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare function PaginationNextButton({ text, ...props }: PaginationNextButtonProps): import("react").JSX.Element;
|
|
33
64
|
export type PaginationEllipsisProps = ComponentProps<'span'>;
|
|
34
65
|
export declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): import("react").JSX.Element;
|
|
35
66
|
//# sourceMappingURL=pagination.d.ts.map
|