@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/pagination.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/pagination.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAmD5C,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BASlE;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAE1D,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAEhF;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEvD,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAExD;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAa,EAAE,GAAG,KA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CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAa,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,+BAM1F;AAED,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAE7D,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,+BAOlF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PaginationContentProps, type PaginationEllipsisProps, type PaginationItemProps, type PaginationLinkProps, type PaginationNextProps, type PaginationPreviousProps, type PaginationProps, } from './pagination.js';
|
|
1
|
+
export { Pagination, PaginationButton, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextButton, PaginationPrevious, PaginationPreviousButton, type PaginationButtonProps, type PaginationContentProps, type PaginationEllipsisProps, type PaginationItemProps, type PaginationLinkProps, type PaginationNextButtonProps, type PaginationNextProps, type PaginationPreviousButtonProps, type PaginationPreviousProps, type PaginationProps, } from './pagination.js';
|
|
2
2
|
//# sourceMappingURL=public.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC"}
|
|
@@ -72,7 +72,7 @@ export interface SidebarProps extends Omit<ComponentProps<'div'>, 'className'> {
|
|
|
72
72
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
73
73
|
}
|
|
74
74
|
export declare function Sidebar({ side, variant, collapsible, className, children, ...props }: SidebarProps): import("react").JSX.Element;
|
|
75
|
-
export interface SidebarTriggerProps extends Omit<ButtonProps, 'icon' | 'children'> {
|
|
75
|
+
export interface SidebarTriggerProps extends Omit<ButtonProps, 'icon' | 'end' | 'children'> {
|
|
76
76
|
/** Accessible name for the icon-only button. @default 'Toggle Sidebar' */
|
|
77
77
|
label?: string;
|
|
78
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/sidebar.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAQL,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAa,KAAK,cAAc,EA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EAAE,yBAAyB,8FAW3B"}
|
|
@@ -15,6 +15,16 @@ export interface SpinnerProps extends ComponentProps<'svg'> {
|
|
|
15
15
|
* @default false
|
|
16
16
|
*/
|
|
17
17
|
compact?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The glyph step. `lg` is the large one: 32 on a bare spinner, and in the
|
|
20
|
+
* composed block a 64 indicator around a 32 glyph (the same 2:1 the
|
|
21
|
+
* 36/18 and 28/14 steps draw). Wins over `compact` when both are passed,
|
|
22
|
+
* so a caller computing either from state never gets a half-and-half.
|
|
23
|
+
* Named `size` and kept to a literal union rather than lucide's
|
|
24
|
+
* number-or-string `size`, which this prop intercepts and never forwards.
|
|
25
|
+
* @default 'default'
|
|
26
|
+
*/
|
|
27
|
+
size?: 'default' | 'lg';
|
|
18
28
|
}
|
|
19
|
-
export declare function Spinner({ className, label, description, compact, ...props }: SpinnerProps): import("react").JSX.Element;
|
|
29
|
+
export declare function Spinner({ className, label, description, compact, size, ...props }: SpinnerProps): import("react").JSX.Element;
|
|
20
30
|
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2BvD,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,KAAK,CAAC;IACzD;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;qDACiD;IACjD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2BvD,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,KAAK,CAAC;IACzD;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;qDACiD;IACjD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB;AAED,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,+BAsD/F"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ComponentProps, CSSProperties } from 'react';
|
|
2
|
+
import { ComponentProps, CSSProperties, Ref } from 'react';
|
|
3
3
|
declare const tableVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "collection" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -24,8 +24,24 @@ export interface TableProps extends ComponentProps<'table'>, VariantProps<typeof
|
|
|
24
24
|
containerClassName?: string;
|
|
25
25
|
/** Inline style for the same scroll wrapper, e.g. `{ maxHeight: 320 }`. */
|
|
26
26
|
containerStyle?: CSSProperties;
|
|
27
|
+
/**
|
|
28
|
+
* Ref to the scroll wrapper `div`, for a caller that measures it or drives
|
|
29
|
+
* its scroll position (`ref` itself lands on the `<table>`, as for every
|
|
30
|
+
* other prop). Both a ref object and a callback ref work.
|
|
31
|
+
*/
|
|
32
|
+
containerRef?: Ref<HTMLDivElement>;
|
|
33
|
+
/**
|
|
34
|
+
* Pins the header cells to the top of the scroll wrapper on an opaque
|
|
35
|
+
* fill, so the rows scroll under them. Needs a bounded wrapper height
|
|
36
|
+
* (`containerClassName` / `containerStyle`) to have anything to scroll
|
|
37
|
+
* within. Independent of `variant`: it carries no layout, row height or
|
|
38
|
+
* minimum width, only the pinning, and switches the table to separated
|
|
39
|
+
* borders so the rule under the header stays with it.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
stickyHeader?: boolean;
|
|
27
43
|
}
|
|
28
|
-
export declare function Table({ className, label, density, variant, containerClassName, containerStyle, ...props }: TableProps): import("react").JSX.Element;
|
|
44
|
+
export declare function Table({ className, label, density, variant, containerClassName, containerStyle, containerRef, stickyHeader, ...props }: TableProps): import("react").JSX.Element;
|
|
29
45
|
export type TableHeaderProps = ComponentProps<'thead'>;
|
|
30
46
|
export declare function TableHeader({ className, ...props }: TableHeaderProps): import("react").JSX.Element;
|
|
31
47
|
export type TableBodyProps = ComponentProps<'tbody'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAGlB,KAAK,GAAG,EAKT,MAAM,OAAO,CAAC;AAyVf,QAAA,MAAM,aAAa;;8EAejB,CAAC;AAEH,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC7F;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B;;;;OAIG;IAC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AE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAEhE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;AAE1D,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAEtE"}
|
package/dist/docs/button.md
CHANGED
|
@@ -27,6 +27,7 @@ polymorphism, correct disabled/focus behavior, `type="button"` by default
|
|
|
27
27
|
| `variant` | `default` \| `destructive` \| `outline` \| `secondary` \| `ghost` \| `link` \| `navigation` \| `avatar` \| `utility` - `destructive` is a tint of `--destructive` under a `--destructive` label; `navigation` is a card-filled row with a hairline whose current location is marked by a `data-current` attribute; `avatar` has no box of its own and wears a `--primary` ring while hovered or while it owns an open popup; `utility` is a borderless action with an 18px glyph | `default` |
|
|
28
28
|
| `size` | `default` \| `sm` \| `lg` (the F-mockups' md/sm/lg scale; `default` is md) | `default` |
|
|
29
29
|
| `icon` | `ReactNode` — leading icon slot, marked decorative (`aria-hidden`); the ONLY right place for a button icon | — |
|
|
30
|
+
| `end` | `ReactNode` — trailing slot after the label (a chevron, a sort arrow), same sizing, spacing and `loading` handling as `icon`, but not marked decorative: its content is part of the accessible name, so a count is announced, and a glyph hides itself with `aria-hidden` (lucide icons carry it by default) | — |
|
|
30
31
|
| `loading` | `boolean` — centered spinner, disables the button, sets `aria-busy`; content keeps its space and the button keeps its accessible name | `false` |
|
|
31
32
|
| `render` | `ReactElement` — replaces the root element, button semantics are applied to it | — |
|
|
32
33
|
| `nativeButton` | `boolean` — set to `false` whenever `render` is not a native `<button>` | `true` |
|
|
@@ -73,8 +74,18 @@ sitting in an Input's `end` slot inside that container, for instance. Use
|
|
|
73
74
|
container-level scoping deliberately, or scope to the button itself to
|
|
74
75
|
avoid the surprise.
|
|
75
76
|
|
|
76
|
-
Icon-only is derived, not a size: `icon` with no children
|
|
77
|
-
button of the current `size`. There is no `size="icon"`.
|
|
77
|
+
Icon-only is derived, not a size: `icon` with no children and no `end`
|
|
78
|
+
renders a square button of the current `size`. There is no `size="icon"`.
|
|
79
|
+
|
|
80
|
+
`end` is the same slot on the other side of the label, for what follows it:
|
|
81
|
+
a chevron on a button that opens a menu, an arrow that shows a sort
|
|
82
|
+
direction, a count. Unlike `icon` it is not marked decorative: its content
|
|
83
|
+
joins the accessible name, so a count (`<Button end={3}>Filters</Button>`)
|
|
84
|
+
is read out with the label. A glyph is hidden from assistive tech by its
|
|
85
|
+
own `aria-hidden="true"`, which lucide icons carry by default; pass it
|
|
86
|
+
yourself on a hand-written svg. It holds no control of its own (a button
|
|
87
|
+
inside a button is invalid HTML); a clear button next to a text field is
|
|
88
|
+
Input's `end`, not this one.
|
|
78
89
|
|
|
79
90
|
`loading` keeps the button focusable instead of setting the native
|
|
80
91
|
`disabled` attribute (so `aria-busy` has somewhere to be announced to,
|
|
@@ -102,6 +113,9 @@ import { Button } from '@gears-frontx/ui-kit';
|
|
|
102
113
|
// Icon next to the label goes in the icon slot, never in children
|
|
103
114
|
<Button icon={<PlusIcon />} onClick={create}>New project</Button>
|
|
104
115
|
|
|
116
|
+
// A trailing glyph after the label goes in the end slot
|
|
117
|
+
<Button variant="outline" end={<ChevronDownIcon />}>Sort by</Button>
|
|
118
|
+
|
|
105
119
|
// Icon-only (icon slot + no children): always label it
|
|
106
120
|
<Button icon={<CrossIcon />} aria-label="Close" />
|
|
107
121
|
|
|
@@ -130,8 +144,14 @@ import { Button } from '@gears-frontx/ui-kit';
|
|
|
130
144
|
- Do not put an icon in `children` next to text — it lands in the `icon`
|
|
131
145
|
slot, which is what sizes it, spaces it, hides it during `loading`, and
|
|
132
146
|
keeps it out of the accessible name.
|
|
133
|
-
- Do not
|
|
134
|
-
|
|
147
|
+
- Do not put a trailing chevron in `children` — it lands in the `end` slot,
|
|
148
|
+
which sizes and spaces it and hides it during `loading`. A hand-written svg
|
|
149
|
+
in `end` needs its own `aria-hidden="true"`: the slot does not mark it
|
|
150
|
+
decorative, because a count in `end` is meant to be announced.
|
|
151
|
+
- Do not render a button with an icon slot and no children without
|
|
152
|
+
`aria-label` — the icon is decorative and carries no name, and `end` only
|
|
153
|
+
names the button if it holds text that is announced (a glyph is
|
|
154
|
+
`aria-hidden`). It is squared icon-only only when `end` is absent too.
|
|
135
155
|
- Do not emulate `loading` by swapping children for a spinner — the button
|
|
136
156
|
loses its accessible name and jumps in width; pass `loading`.
|
|
137
157
|
- Do not emulate disabled with CSS/`onClick` guards — pass `disabled`
|
package/dist/docs/combobox.md
CHANGED
|
@@ -20,6 +20,12 @@ container of `ComboboxChip` pills plus a trailing `ComboboxChipsInput`),
|
|
|
20
20
|
and anchor the popup to the chips instead of a single-line field with
|
|
21
21
|
`useComboboxAnchor()`.
|
|
22
22
|
|
|
23
|
+
Composition, select-style: a field that looks like a `Select` but filters like
|
|
24
|
+
a combobox. `ComboboxTrigger variant="select"` is the visible field (the
|
|
25
|
+
chosen value or a placeholder, then a chevron), and the search input moves
|
|
26
|
+
into the popup as `<ComboboxInput showTrigger={false} />`, the first child
|
|
27
|
+
of `ComboboxContent`. See "Select-style trigger" below.
|
|
28
|
+
|
|
23
29
|
## When to use
|
|
24
30
|
|
|
25
31
|
- A single value from a long or unbounded list, filterable by typing —
|
|
@@ -55,6 +61,16 @@ Both trailing buttons are icon-only, so those two labels ARE their
|
|
|
55
61
|
accessible names — override them for any language but English, the same
|
|
56
62
|
way `Dialog`'s `closeLabel` and `SidebarTrigger`'s `label` work.
|
|
57
63
|
|
|
64
|
+
`ComboboxTrigger`:
|
|
65
|
+
|
|
66
|
+
| Prop | Type | Default |
|
|
67
|
+
|------|------|---------|
|
|
68
|
+
| `variant` | `default` \| `select` — `default` is the compact chevron button `ComboboxInput` places in its corner; `select` is a field of its own that looks like `SelectTrigger`: its children (the chosen value or a placeholder), then a chevron it adds itself | `default` |
|
|
69
|
+
| `className` | `string` — merged after the kit class | — |
|
|
70
|
+
|
|
71
|
+
Every other prop is Base UI's `Combobox.Trigger` (`render`, `nativeButton`,
|
|
72
|
+
`disabled`, `aria-*`, ...).
|
|
73
|
+
|
|
58
74
|
`ComboboxContent` accepts positioning props (`side`, `sideOffset`,
|
|
59
75
|
`align`, `alignOffset`, `anchor`, plus the escape hatch for fields inside a
|
|
60
76
|
`transform`/`filter` container: `positionMethod="fixed"`,
|
|
@@ -72,6 +88,53 @@ default `'Remove'`) for that button's accessible name — worth naming the
|
|
|
72
88
|
chip itself (`removeLabel={`Remove ${label}`}`) once a form carries
|
|
73
89
|
several.
|
|
74
90
|
|
|
91
|
+
## Select-style trigger
|
|
92
|
+
|
|
93
|
+
`ComboboxTrigger variant="select"` draws the trigger as a field of its own,
|
|
94
|
+
the same height, border, radius, type and states as `SelectTrigger`: the
|
|
95
|
+
children read in the foreground tone once something is chosen and in
|
|
96
|
+
`--muted-foreground` until then (Base UI flags the empty state, so a
|
|
97
|
+
`ComboboxValue placeholder` is enough), a long text value is cut with an
|
|
98
|
+
ellipsis before the chevron, and `aria-invalid` / `disabled` draw the same
|
|
99
|
+
invalid and dimmed looks. The ellipsis needs the value to be inline content
|
|
100
|
+
(text, a `ComboboxValue`, an inline icon in front of it): a block element of
|
|
101
|
+
your own in there is not cut. A multiple select's chips wrap onto further
|
|
102
|
+
lines instead. There is no text field in the trigger: the query is typed into a
|
|
103
|
+
`ComboboxInput showTrigger={false}` placed first in `ComboboxContent`.
|
|
104
|
+
Inside the popup that input fills the popup's width, inset by the same step
|
|
105
|
+
the list pads its items by, with no width floor of its own; anywhere else it
|
|
106
|
+
is only as wide as the field. The popup is anchored to the trigger and as
|
|
107
|
+
wide as it (at least 9rem, like every combobox popup). `ComboboxInput`'s
|
|
108
|
+
`children` are rendered inside the field's
|
|
109
|
+
wrapper, so an adornment such as a search icon can be composed there.
|
|
110
|
+
|
|
111
|
+
The trigger's role is `combobox`, which takes no name from its content, so
|
|
112
|
+
name it: `aria-labelledby` pointing at a visible label, or an `aria-label`.
|
|
113
|
+
A `<label for>` (`FieldLabel htmlFor`) names only the button form; the
|
|
114
|
+
multiple form below renders its trigger as a `div`, which `<label for>`
|
|
115
|
+
cannot name, so there it has to be `aria-labelledby` or `aria-label`. The
|
|
116
|
+
same goes for the search input in the popup.
|
|
117
|
+
|
|
118
|
+
For a multiple select, render the trigger as a `div` and put
|
|
119
|
+
`ComboboxChips` among its children:
|
|
120
|
+
`<ComboboxTrigger variant="select" render={<div />} nativeButton={false}>`.
|
|
121
|
+
A button may not contain the chips' `div`, so `nativeButton={false}` with a
|
|
122
|
+
`div` is what keeps the markup valid. The chips drop their own border, fill
|
|
123
|
+
and padding there, since the trigger already is the field, and the trigger
|
|
124
|
+
grows to hold chips that wrap instead of holding one fixed row. Pressing a
|
|
125
|
+
chip's remove button removes the chip and does not open the popup.
|
|
126
|
+
|
|
127
|
+
The keyboard path to a chip is different here. In the chips-field form the
|
|
128
|
+
search input sits among the chips, so ArrowLeft from it reaches a chip and
|
|
129
|
+
Backspace on an empty query removes the last one. In the select-style form
|
|
130
|
+
the input lives in the popup, outside the chips: ArrowLeft never reaches a
|
|
131
|
+
chip and Backspace on an empty query removes nothing. A chosen value is removed
|
|
132
|
+
by toggling its option off in the list instead (a chosen option is highlighted
|
|
133
|
+
when the popup opens, other options are reached with the arrow keys, and Enter
|
|
134
|
+
toggles the highlighted one). The remove buttons stay out of the tab order on
|
|
135
|
+
purpose: interactive content inside an element with `role="combobox"` is its
|
|
136
|
+
own accessibility anti-pattern, so they are a pointer affordance here.
|
|
137
|
+
|
|
75
138
|
## Examples
|
|
76
139
|
|
|
77
140
|
Single-select, filterable, with groups:
|
|
@@ -155,6 +218,80 @@ function FrameworkPicker() {
|
|
|
155
218
|
}
|
|
156
219
|
```
|
|
157
220
|
|
|
221
|
+
Select-style, single (the search input is in the popup):
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
import {
|
|
225
|
+
Combobox,
|
|
226
|
+
ComboboxContent,
|
|
227
|
+
ComboboxEmpty,
|
|
228
|
+
ComboboxInput,
|
|
229
|
+
ComboboxItem,
|
|
230
|
+
ComboboxList,
|
|
231
|
+
ComboboxTrigger,
|
|
232
|
+
ComboboxValue,
|
|
233
|
+
} from '@gears-frontx/ui-kit';
|
|
234
|
+
|
|
235
|
+
<Combobox items={REGIONS}>
|
|
236
|
+
<ComboboxTrigger variant="select" aria-label="Region">
|
|
237
|
+
<ComboboxValue placeholder="Select a region" />
|
|
238
|
+
</ComboboxTrigger>
|
|
239
|
+
<ComboboxContent>
|
|
240
|
+
<ComboboxInput showTrigger={false} aria-label="Search regions" placeholder="Search…" />
|
|
241
|
+
<ComboboxEmpty>No regions found.</ComboboxEmpty>
|
|
242
|
+
<ComboboxList>
|
|
243
|
+
{(region: Region) => (
|
|
244
|
+
<ComboboxItem key={region.value} value={region}>
|
|
245
|
+
{region.label}
|
|
246
|
+
</ComboboxItem>
|
|
247
|
+
)}
|
|
248
|
+
</ComboboxList>
|
|
249
|
+
</ComboboxContent>
|
|
250
|
+
</Combobox>;
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Select-style, multiple (chips inside a trigger rendered as a `div`, named by
|
|
254
|
+
its visible label through `aria-labelledby`, since a `<label for>` cannot name
|
|
255
|
+
a `div`):
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
<>
|
|
259
|
+
<span id="frameworks-label">Frameworks</span>
|
|
260
|
+
<Combobox multiple items={FRAMEWORKS}>
|
|
261
|
+
<ComboboxTrigger
|
|
262
|
+
variant="select"
|
|
263
|
+
render={<div />}
|
|
264
|
+
nativeButton={false}
|
|
265
|
+
aria-labelledby="frameworks-label"
|
|
266
|
+
>
|
|
267
|
+
<ComboboxChips>
|
|
268
|
+
<ComboboxValue>
|
|
269
|
+
{(values: string[]) =>
|
|
270
|
+
values.length === 0
|
|
271
|
+
? 'Select frameworks'
|
|
272
|
+
: values.map((value) => (
|
|
273
|
+
<ComboboxChip key={value} removeLabel={`Remove ${value}`}>
|
|
274
|
+
{value}
|
|
275
|
+
</ComboboxChip>
|
|
276
|
+
))
|
|
277
|
+
}
|
|
278
|
+
</ComboboxValue>
|
|
279
|
+
</ComboboxChips>
|
|
280
|
+
</ComboboxTrigger>
|
|
281
|
+
<ComboboxContent>
|
|
282
|
+
<ComboboxInput showTrigger={false} aria-label="Search frameworks" />
|
|
283
|
+
<ComboboxList>
|
|
284
|
+
{(item: string) => (
|
|
285
|
+
<ComboboxItem key={item} value={item}>
|
|
286
|
+
{item}
|
|
287
|
+
</ComboboxItem>
|
|
288
|
+
)}
|
|
289
|
+
</ComboboxList>
|
|
290
|
+
</ComboboxContent>
|
|
291
|
+
</Combobox>
|
|
292
|
+
</>
|
|
293
|
+
```
|
|
294
|
+
|
|
158
295
|
## Not ported from upstream
|
|
159
296
|
|
|
160
297
|
Upstream's own `combobox.tsx` (the shadcn/ui base-variant registry file
|
|
@@ -190,3 +327,13 @@ button-based triggers (which never had the zoom problem to begin with).
|
|
|
190
327
|
- Do not use a combobox for navigation — that is a menu/link pattern.
|
|
191
328
|
- Do not omit `items` — without it, object-shaped values render as
|
|
192
329
|
`[object Object]` in the field instead of their label.
|
|
330
|
+
- Do not use `variant="select"` without the search input in the popup — the
|
|
331
|
+
trigger holds no text field, so there is nowhere to type the query.
|
|
332
|
+
- Do not put `ComboboxChips` in a select-style trigger that is still a
|
|
333
|
+
button — render it as a `div` (`render={<div />}`, `nativeButton={false}`).
|
|
334
|
+
- Do not name that `div` trigger with a `<label for>` / `FieldLabel htmlFor` —
|
|
335
|
+
a `div` is not labelable, so the combobox ends up with no name. Give it
|
|
336
|
+
`aria-labelledby` or `aria-label`.
|
|
337
|
+
- Do not make a chip's remove button tabbable to give keyboard users a way to
|
|
338
|
+
remove a value in the select-style form — remove it by toggling its option
|
|
339
|
+
in the list.
|
package/dist/docs/pagination.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Pagination
|
|
2
2
|
|
|
3
|
-
Page-number navigation built from real anchors
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Page-number navigation built from real anchors, with button twins of the
|
|
4
|
+
same parts for paging held in state. No Base UI primitive backs it: pure
|
|
5
|
+
styling over semantic markup (`nav` > `ul` > `li`), the same shape as
|
|
6
|
+
`Table`/`Breadcrumb`.
|
|
6
7
|
|
|
7
8
|
An item is a 28px square at a 6px radius, transparent, with a centred 12/16
|
|
8
9
|
label in `--muted-foreground` and a 4px gap between items. The active page
|
|
@@ -15,6 +16,8 @@ an icon and a label side by side.
|
|
|
15
16
|
|
|
16
17
|
- Navigating between server-rendered pages of a result set, where each page
|
|
17
18
|
is a real URL (`<PaginationLink href="?page=2">`).
|
|
19
|
+
- Paging a list held in component state, where changing the page is a state
|
|
20
|
+
update and leaves the URL alone (`<PaginationButton onClick={...}>`).
|
|
18
21
|
|
|
19
22
|
## When not to use
|
|
20
23
|
|
|
@@ -32,6 +35,9 @@ an icon and a label side by side.
|
|
|
32
35
|
| `PaginationLink` | `<a>` | A page number; square by default |
|
|
33
36
|
| `PaginationPrevious` | `<a>` | Chevron + "Previous" (hidden below 640px) |
|
|
34
37
|
| `PaginationNext` | `<a>` | "Next" + chevron (hidden below 640px) |
|
|
38
|
+
| `PaginationButton` | `<button type="button">` | A page number for state-driven paging; the button twin of `PaginationLink` |
|
|
39
|
+
| `PaginationPreviousButton` | `<button type="button">` | The button twin of `PaginationPrevious`; `disabled` at the first page |
|
|
40
|
+
| `PaginationNextButton` | `<button type="button">` | The button twin of `PaginationNext`; `disabled` at the last page |
|
|
35
41
|
| `PaginationEllipsis` | `<span>` | Collapsed-pages indicator |
|
|
36
42
|
|
|
37
43
|
## Props (kit level)
|
|
@@ -46,12 +52,45 @@ an icon and a label side by side.
|
|
|
46
52
|
`PaginationPrevious`/`PaginationNext` accept the same props minus `square`
|
|
47
53
|
(fixed to `false`), plus `text` to relabel the link.
|
|
48
54
|
|
|
55
|
+
Their accessible name follows `text`. With the default text it is "Go to
|
|
56
|
+
previous page" / "Go to next page"; a custom `text` is the name instead,
|
|
57
|
+
because the label is hidden below 640px and the chevron is decorative, so a
|
|
58
|
+
fixed name would leave the words on screen out of it and a voice-control user
|
|
59
|
+
could not say them to press the link. An empty or whitespace-only `text`
|
|
60
|
+
(the icon-only form) keeps the default name. An `aria-label` of your own replaces either; keep the
|
|
61
|
+
visible words in it. The button forms below name themselves the same way.
|
|
62
|
+
|
|
63
|
+
`PaginationButton` takes the same `isActive` and `square`, and every native
|
|
64
|
+
button prop (`onClick`, `disabled`, ...); `type` defaults to `"button"`, so
|
|
65
|
+
it never submits a form it sits in. `PaginationPreviousButton` /
|
|
66
|
+
`PaginationNextButton` mirror `PaginationPrevious` / `PaginationNext`: no
|
|
67
|
+
`square`, no `isActive`, and `text` to relabel them. A disabled button is
|
|
68
|
+
dimmed and inert, which is how a pager marks the ends of its range.
|
|
69
|
+
|
|
70
|
+
| Prop | Type | Default |
|
|
71
|
+
|------|------|---------|
|
|
72
|
+
| `focusableWhenDisabled` | `boolean` — keep the button in the tab order while `disabled`, reported through `aria-disabled` instead of the native attribute (the same prop `Button` has) | `false` |
|
|
73
|
+
|
|
74
|
+
A natively disabled button cannot hold focus, so a keyboard user who pages
|
|
75
|
+
with Previous until page 1 sees focus fall to the page behind it the moment
|
|
76
|
+
the button disables. Pass `focusableWhenDisabled` on Previous and Next in a
|
|
77
|
+
pager that is driven from the keyboard: the button stays where focus is, paints
|
|
78
|
+
the same dimmed look and still runs no click. It is no longer natively
|
|
79
|
+
disabled then, so read `aria-disabled` (or `data-disabled`) rather than the
|
|
80
|
+
`disabled` property to tell.
|
|
81
|
+
|
|
82
|
+
The Previous / Next chevrons mirror under a right-to-left direction, on the
|
|
83
|
+
anchor and the button forms alike.
|
|
84
|
+
|
|
49
85
|
## Implementation note
|
|
50
86
|
|
|
51
87
|
Pagination carries its own geometry rather than a `Button` size: the drawn
|
|
52
88
|
item is 28px with a paint inversion on the active page that no Button
|
|
53
|
-
variant renders. The parts are real `<a>` elements, so pagination items
|
|
54
|
-
crawlable and cmd-clickable
|
|
89
|
+
variant renders. The link parts are real `<a>` elements, so pagination items
|
|
90
|
+
stay crawlable and cmd-clickable; the button parts paint identically but are
|
|
91
|
+
native `<button>`s, because `PaginationLink` always renders an anchor (it has
|
|
92
|
+
no `render` prop). Pick by what a page change is: a navigation to a URL is a
|
|
93
|
+
link, a state update is a button.
|
|
55
94
|
|
|
56
95
|
## Examples
|
|
57
96
|
|
|
@@ -89,11 +128,51 @@ import {
|
|
|
89
128
|
</Pagination>
|
|
90
129
|
```
|
|
91
130
|
|
|
131
|
+
A state-driven pager, with the ends of the range disabled and focus kept on
|
|
132
|
+
a button that has just reached one:
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
<Pagination>
|
|
136
|
+
<PaginationContent>
|
|
137
|
+
<PaginationItem>
|
|
138
|
+
<PaginationPreviousButton
|
|
139
|
+
disabled={page === 1}
|
|
140
|
+
focusableWhenDisabled
|
|
141
|
+
onClick={() => setPage(page - 1)}
|
|
142
|
+
/>
|
|
143
|
+
</PaginationItem>
|
|
144
|
+
{pages.map((n) => (
|
|
145
|
+
<PaginationItem key={n}>
|
|
146
|
+
<PaginationButton isActive={n === page} onClick={() => setPage(n)}>
|
|
147
|
+
{n}
|
|
148
|
+
</PaginationButton>
|
|
149
|
+
</PaginationItem>
|
|
150
|
+
))}
|
|
151
|
+
<PaginationItem>
|
|
152
|
+
<PaginationNextButton
|
|
153
|
+
disabled={page === pages.length}
|
|
154
|
+
focusableWhenDisabled
|
|
155
|
+
onClick={() => setPage(page + 1)}
|
|
156
|
+
/>
|
|
157
|
+
</PaginationItem>
|
|
158
|
+
</PaginationContent>
|
|
159
|
+
</Pagination>
|
|
160
|
+
```
|
|
161
|
+
|
|
92
162
|
## Anti-patterns
|
|
93
163
|
|
|
94
164
|
- Do not wrap a client-side handler in `href="#"` and call
|
|
95
165
|
`preventDefault()` as the only navigation mechanism — a real `href` keeps
|
|
96
166
|
the page crawlable and cmd/middle-click-able, matching a genuine link's
|
|
97
167
|
semantics.
|
|
168
|
+
- Do not use `PaginationButton` for a page that has its own URL — it cannot
|
|
169
|
+
be opened in a new tab or crawled; use `PaginationLink` with the real
|
|
170
|
+
`href`.
|
|
98
171
|
- Do not set `isActive` on more than one `PaginationLink` at a time — only
|
|
99
172
|
one page is "current".
|
|
173
|
+
- Do not pass an `aria-label` to `PaginationPrevious`/`PaginationNext` that
|
|
174
|
+
leaves out the words of a custom `text`; leave it off and the name follows
|
|
175
|
+
the text.
|
|
176
|
+
- Do not disable Previous or Next at the end of a range that is paged from the
|
|
177
|
+
keyboard without `focusableWhenDisabled`; the focused button would drop focus
|
|
178
|
+
to the page.
|
package/dist/docs/spinner.md
CHANGED
|
@@ -4,7 +4,7 @@ A spinning loading indicator — lucide's `loader-circle` icon rotating
|
|
|
4
4
|
continuously via CSS. No Base UI primitive and no variant axis.
|
|
5
5
|
|
|
6
6
|
Two shapes. Bare, it is that icon and nothing else, at the kit's small icon
|
|
7
|
-
step. Given a `label` or a `description`, it becomes the drawn loading
|
|
7
|
+
step (or the large one, `size="lg"`). Given a `label` or a `description`, it becomes the drawn loading
|
|
8
8
|
block: the glyph centred in a 36 indicator box with its text beneath it.
|
|
9
9
|
|
|
10
10
|
## When to use
|
|
@@ -29,6 +29,7 @@ block: the glyph centred in a 36 indicator box with its text beneath it.
|
|
|
29
29
|
| `label` | `ReactNode` - the state, written under the indicator in the drawn monospace micro type; its presence is what composes the block | - |
|
|
30
30
|
| `description` | `ReactNode` - a second line under the label: what is being waited on, or how long it usually takes | - |
|
|
31
31
|
| `compact` | `boolean` - the drawn tighter block, a 28 indicator around a 14 glyph instead of 36 around 18; on a bare spinner it takes the glyph to that same 14 | `false` |
|
|
32
|
+
| `size` | `default` \| `lg` - `lg` is the large step: a 32 glyph on a bare spinner, and in the block a 64 indicator around a 32 glyph (the same 2:1 the other steps draw). Wins over `compact` when both are passed | `default` |
|
|
32
33
|
|
|
33
34
|
Every other prop is the indicator `<svg>`'s, `className` included, at both
|
|
34
35
|
shapes - the layout block the kit adds around it is the kit's own, not a
|
|
@@ -70,6 +71,9 @@ import { Spinner } from '@gears-frontx/ui-kit';
|
|
|
70
71
|
|
|
71
72
|
// Compact, for a panel that cannot give up 36px
|
|
72
73
|
<Spinner compact label="Loading" />
|
|
74
|
+
|
|
75
|
+
// Large, centred over a region that is loading as a whole
|
|
76
|
+
<Spinner size="lg" />
|
|
73
77
|
```
|
|
74
78
|
|
|
75
79
|
## Anti-patterns
|