trc-ui 0.1.0 → 0.5.0
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/CHANGELOG.md +58 -0
- package/README.md +8 -2
- package/dist/index.cjs +2125 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +724 -3
- package/dist/index.d.ts +724 -3
- package/dist/index.js +2097 -159
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +15 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
Covers releases 0.2 to 0.5 of the roadmap: 33 new components, each with its documentation page in English and French at [ui.theringconcept.com](https://ui.theringconcept.com).
|
|
6
|
+
|
|
7
|
+
### Overlays and feedback
|
|
8
|
+
|
|
9
|
+
- `Dialog`: modal window with title, description and actions; focus kept inside, Escape and overlay to close, focus returned.
|
|
10
|
+
- `Drawer`: side panel from the left or right, on the same modal layer; the `SiteHeader` mobile menu now uses it.
|
|
11
|
+
- `DropdownMenu`: menu of actions with full keyboard support (arrows, Home, End, typeahead), disabled and destructive items, links.
|
|
12
|
+
- `Popover`: non-modal floating panel, focus moved inside, Escape and outside click to close; controlled or not.
|
|
13
|
+
- `Tooltip`: on hover and keyboard focus, tied with `aria-describedby`, hoverable and dismissable with Escape.
|
|
14
|
+
- `toast()` and `Toaster`: global queue, polite announcements and immediate ones for errors, pause on hover and focus, one action.
|
|
15
|
+
- `Alert`: inline message with a thin colored edge.
|
|
16
|
+
- Floating elements are portaled and placed against their trigger, flipping when there is no room.
|
|
17
|
+
|
|
18
|
+
### Navigation
|
|
19
|
+
|
|
20
|
+
- `Tabs`: thin labels underlined with the accent, roving tabindex, automatic or manual activation.
|
|
21
|
+
- `SegmentedControl`: pill switch built on native radio buttons.
|
|
22
|
+
- `Accordion`: single or multiple, animated height, closed content out of the accessibility tree, arrow keys between titles.
|
|
23
|
+
- `Breadcrumbs`: trail to the current page.
|
|
24
|
+
- `Pagination`: constant-width range with ellipses, buttons or links (`href` function or `"/page/{page}"` pattern, usable from server components).
|
|
25
|
+
- `LanguageSwitcher`: the EN | FR pill, as links (with `lang` and `hreflang`) or buttons.
|
|
26
|
+
- `Steps`: vertical timeline with large thin numbers and the current step.
|
|
27
|
+
|
|
28
|
+
### Forms
|
|
29
|
+
|
|
30
|
+
- `RadioGroup`: native radio buttons in a fieldset, hint and error tied to the group, vertical or horizontal.
|
|
31
|
+
- `PasswordInput`: Show / Hide button whose accessible name includes its visible text.
|
|
32
|
+
- `PinInput`: one box per character, paste and text-message autofill, Backspace and arrow keys.
|
|
33
|
+
- `Combobox`: search with suggestions, case and accent insensitive, `aria-activedescendant` keyboard navigation.
|
|
34
|
+
- `FileInput` and `Dropzone`: native file input, drag and drop, validation by type, size and count, announced rejections; `formatBytes`, `acceptsFile` and `validateFiles` helpers.
|
|
35
|
+
- `Slider`: native range input filled with the accent, formatted and announced value.
|
|
36
|
+
- `DatePicker`: calendar dialog with full keyboard support, `Intl` month and day names, min and max dates.
|
|
37
|
+
|
|
38
|
+
### Data display
|
|
39
|
+
|
|
40
|
+
- `Avatar` and `AvatarGroup`: picture or initials, overlapping group with a counter.
|
|
41
|
+
- `Tag`: small label, accent tone, optional remove button.
|
|
42
|
+
- `Stat`: key figure in a large thin number, with its change.
|
|
43
|
+
- `Table`: captioned data table, sortable columns announced with `aria-sort`, keyboard-scrollable region.
|
|
44
|
+
- `Skeleton`, `Spinner` and `Progress`: loading placeholders, status spinner, determinate or indeterminate progress bar.
|
|
45
|
+
- `Kbd` and `Divider`: keyboard keys, hairlines with an optional label.
|
|
46
|
+
- `CodeBlock`: file tab and copy button; bring your own highlighting.
|
|
47
|
+
|
|
48
|
+
### Tooling
|
|
49
|
+
|
|
50
|
+
- Unit and accessibility tests (Vitest, Testing Library, axe) for every component.
|
|
51
|
+
- Label props that took a function (`moreLabel`, `pageLabel`, `charLabel`, `countLabel`, `removeLabel`, `rejectionLabel`) also accept string templates such as `"{count} more"`, usable from server components.
|
|
52
|
+
|
|
53
|
+
### Fixes
|
|
54
|
+
|
|
55
|
+
- Header dropdowns opened by hovering no longer close on the click that follows.
|
|
56
|
+
|
|
57
|
+
### Changes to note
|
|
58
|
+
|
|
59
|
+
- The `SiteHeader` mobile menu is now a `Drawer`: if you styled its panel through the internal `.trc-drawer` classes, use the new `.trc-layer` and `.trc-drawer` structure.
|
|
60
|
+
|
|
3
61
|
## 0.1.0
|
|
4
62
|
|
|
5
63
|
First public release.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
React components with a deep black design: near-black backgrounds, graphite cards, thin headings, a single accent color and pill buttons whose dot stretches on hover.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/trc-ui)
|
|
6
|
-
[](https://github.com/aa404/trc-ui/blob/main/LICENSE)
|
|
7
7
|
|
|
8
8
|
- **Sober.** Near-black backgrounds, graphite cards, one accent color. Depth comes from shades of grey, not shadows.
|
|
9
9
|
- **Thin.** Light Montserrat headings carry the page, with one accent word per title.
|
|
@@ -11,10 +11,16 @@ React components with a deep black design: near-black backgrounds, graphite card
|
|
|
11
11
|
- **Accessible.** Native form controls, labels and messages wired automatically, keyboard focus everywhere, reduced motion respected.
|
|
12
12
|
- **Light.** No runtime dependency besides React. One stylesheet, themable with CSS variables.
|
|
13
13
|
|
|
14
|
+
**Documentation and live demos: [ui.theringconcept.com](https://ui.theringconcept.com)**
|
|
15
|
+
|
|
14
16
|
## Installation
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
19
|
npm install trc-ui
|
|
20
|
+
# or
|
|
21
|
+
yarn add trc-ui
|
|
22
|
+
pnpm add trc-ui
|
|
23
|
+
bun add trc-ui
|
|
18
24
|
```
|
|
19
25
|
|
|
20
26
|
React 18 or later is required.
|
|
@@ -110,7 +116,7 @@ Every color, radius and motion setting is a CSS variable prefixed with `--trc-`.
|
|
|
110
116
|
|
|
111
117
|
Variables cascade, so you can also theme a single area: `<div style={{ "--trc-accent": "#d41367" }}>`.
|
|
112
118
|
|
|
113
|
-
The documentation includes a colors generator that builds a 10-shade scale from your brand color, checks WCAG contrast on deep black and gives you the code.
|
|
119
|
+
The documentation includes a [colors generator](https://ui.theringconcept.com/docs/colors-generator/) that builds a 10-shade scale from your brand color, checks WCAG contrast on deep black and gives you the code.
|
|
114
120
|
|
|
115
121
|
## Browser support
|
|
116
122
|
|