@setsquare/ui 0.5.0 → 0.7.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.
Files changed (172) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +42 -4
  3. package/dist/index.d.ts +15 -9
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +2 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/cn.d.ts.map +1 -1
  8. package/dist/lib/cn.js +1 -0
  9. package/dist/lib/cn.js.map +1 -1
  10. package/dist/lib/english.d.ts +11 -0
  11. package/dist/lib/english.d.ts.map +1 -0
  12. package/dist/lib/english.js +67 -0
  13. package/dist/lib/english.js.map +1 -0
  14. package/dist/lib/labels.d.ts +38 -8
  15. package/dist/lib/labels.d.ts.map +1 -1
  16. package/dist/lib/labels.js +97 -9
  17. package/dist/lib/labels.js.map +1 -1
  18. package/dist/lib/locale.d.ts +108 -0
  19. package/dist/lib/locale.d.ts.map +1 -0
  20. package/dist/lib/locale.js +42 -0
  21. package/dist/lib/locale.js.map +1 -0
  22. package/dist/shell/app-header.d.ts +4 -1
  23. package/dist/shell/app-header.d.ts.map +1 -1
  24. package/dist/shell/app-header.js +6 -3
  25. package/dist/shell/app-header.js.map +1 -1
  26. package/dist/shell/dashboard-shell.d.ts +16 -2
  27. package/dist/shell/dashboard-shell.d.ts.map +1 -1
  28. package/dist/shell/dashboard-shell.js +7 -3
  29. package/dist/shell/dashboard-shell.js.map +1 -1
  30. package/dist/shell/landmarks.d.ts +33 -0
  31. package/dist/shell/landmarks.d.ts.map +1 -0
  32. package/dist/shell/landmarks.js +20 -0
  33. package/dist/shell/landmarks.js.map +1 -0
  34. package/dist/shell/nav-status.d.ts +46 -0
  35. package/dist/shell/nav-status.d.ts.map +1 -0
  36. package/dist/shell/nav-status.js +26 -0
  37. package/dist/shell/nav-status.js.map +1 -0
  38. package/dist/shell/rail.d.ts +73 -0
  39. package/dist/shell/rail.d.ts.map +1 -0
  40. package/dist/shell/rail.js +87 -0
  41. package/dist/shell/rail.js.map +1 -0
  42. package/dist/shell/right-panel.d.ts +7 -2
  43. package/dist/shell/right-panel.d.ts.map +1 -1
  44. package/dist/shell/right-panel.js +13 -7
  45. package/dist/shell/right-panel.js.map +1 -1
  46. package/dist/shell/sidebar.d.ts +41 -8
  47. package/dist/shell/sidebar.d.ts.map +1 -1
  48. package/dist/shell/sidebar.js +73 -19
  49. package/dist/shell/sidebar.js.map +1 -1
  50. package/dist/shell/site-menu.d.ts +11 -3
  51. package/dist/shell/site-menu.d.ts.map +1 -1
  52. package/dist/shell/site-menu.js +7 -1
  53. package/dist/shell/site-menu.js.map +1 -1
  54. package/dist/shell/site-nav.d.ts +4 -1
  55. package/dist/shell/site-nav.d.ts.map +1 -1
  56. package/dist/shell/site-nav.js +3 -3
  57. package/dist/shell/site-nav.js.map +1 -1
  58. package/dist/shell/site-shell.d.ts +4 -2
  59. package/dist/shell/site-shell.d.ts.map +1 -1
  60. package/dist/shell/site-shell.js +3 -2
  61. package/dist/shell/site-shell.js.map +1 -1
  62. package/dist/styles/theme.css +78 -0
  63. package/dist/styles/tokens.css +4 -4
  64. package/dist/tokens.json +4 -4
  65. package/dist/ui/alert.d.ts +2 -0
  66. package/dist/ui/alert.d.ts.map +1 -1
  67. package/dist/ui/alert.js +11 -9
  68. package/dist/ui/alert.js.map +1 -1
  69. package/dist/ui/breadcrumbs.d.ts +9 -1
  70. package/dist/ui/breadcrumbs.d.ts.map +1 -1
  71. package/dist/ui/breadcrumbs.js +5 -2
  72. package/dist/ui/breadcrumbs.js.map +1 -1
  73. package/dist/ui/calendar.d.ts +1 -0
  74. package/dist/ui/calendar.d.ts.map +1 -1
  75. package/dist/ui/calendar.js +7 -1
  76. package/dist/ui/calendar.js.map +1 -1
  77. package/dist/ui/checkbox.d.ts.map +1 -1
  78. package/dist/ui/checkbox.js +7 -7
  79. package/dist/ui/checkbox.js.map +1 -1
  80. package/dist/ui/code-block-parts.d.ts +30 -0
  81. package/dist/ui/code-block-parts.d.ts.map +1 -0
  82. package/dist/ui/code-block-parts.js +27 -0
  83. package/dist/ui/code-block-parts.js.map +1 -0
  84. package/dist/ui/code-block.d.ts +4 -10
  85. package/dist/ui/code-block.d.ts.map +1 -1
  86. package/dist/ui/code-block.js +4 -9
  87. package/dist/ui/code-block.js.map +1 -1
  88. package/dist/ui/combo-box.d.ts +7 -1
  89. package/dist/ui/combo-box.d.ts.map +1 -1
  90. package/dist/ui/combo-box.js +9 -2
  91. package/dist/ui/combo-box.js.map +1 -1
  92. package/dist/ui/copy-button.d.ts +7 -1
  93. package/dist/ui/copy-button.d.ts.map +1 -1
  94. package/dist/ui/copy-button.js +11 -10
  95. package/dist/ui/copy-button.js.map +1 -1
  96. package/dist/ui/date-field.d.ts +1 -0
  97. package/dist/ui/date-field.d.ts.map +1 -1
  98. package/dist/ui/date-field.js +20 -16
  99. package/dist/ui/date-field.js.map +1 -1
  100. package/dist/ui/dialog.d.ts +6 -1
  101. package/dist/ui/dialog.d.ts.map +1 -1
  102. package/dist/ui/dialog.js +11 -8
  103. package/dist/ui/dialog.js.map +1 -1
  104. package/dist/ui/error-state.d.ts +17 -2
  105. package/dist/ui/error-state.d.ts.map +1 -1
  106. package/dist/ui/error-state.js +32 -34
  107. package/dist/ui/error-state.js.map +1 -1
  108. package/dist/ui/feature-card.d.ts +18 -3
  109. package/dist/ui/feature-card.d.ts.map +1 -1
  110. package/dist/ui/feature-card.js +18 -3
  111. package/dist/ui/feature-card.js.map +1 -1
  112. package/dist/ui/field.d.ts +28 -9
  113. package/dist/ui/field.d.ts.map +1 -1
  114. package/dist/ui/field.js +22 -10
  115. package/dist/ui/field.js.map +1 -1
  116. package/dist/ui/file-upload.d.ts +23 -5
  117. package/dist/ui/file-upload.d.ts.map +1 -1
  118. package/dist/ui/file-upload.js +54 -36
  119. package/dist/ui/file-upload.js.map +1 -1
  120. package/dist/ui/form.d.ts +11 -1
  121. package/dist/ui/form.d.ts.map +1 -1
  122. package/dist/ui/form.js +7 -4
  123. package/dist/ui/form.js.map +1 -1
  124. package/dist/ui/number-field.d.ts.map +1 -1
  125. package/dist/ui/number-field.js +5 -3
  126. package/dist/ui/number-field.js.map +1 -1
  127. package/dist/ui/pagination.d.ts +11 -3
  128. package/dist/ui/pagination.d.ts.map +1 -1
  129. package/dist/ui/pagination.js +30 -23
  130. package/dist/ui/pagination.js.map +1 -1
  131. package/dist/ui/radio-group.d.ts.map +1 -1
  132. package/dist/ui/radio-group.js +4 -4
  133. package/dist/ui/radio-group.js.map +1 -1
  134. package/dist/ui/search.d.ts +3 -0
  135. package/dist/ui/search.d.ts.map +1 -1
  136. package/dist/ui/search.js +11 -10
  137. package/dist/ui/search.js.map +1 -1
  138. package/dist/ui/select.d.ts +7 -1
  139. package/dist/ui/select.d.ts.map +1 -1
  140. package/dist/ui/select.js +7 -3
  141. package/dist/ui/select.js.map +1 -1
  142. package/dist/ui/selection-bar.d.ts +17 -4
  143. package/dist/ui/selection-bar.d.ts.map +1 -1
  144. package/dist/ui/selection-bar.js +15 -11
  145. package/dist/ui/selection-bar.js.map +1 -1
  146. package/dist/ui/sheet.d.ts +1 -0
  147. package/dist/ui/sheet.d.ts.map +1 -1
  148. package/dist/ui/sheet.js +4 -1
  149. package/dist/ui/sheet.js.map +1 -1
  150. package/dist/ui/slider.d.ts +9 -2
  151. package/dist/ui/slider.d.ts.map +1 -1
  152. package/dist/ui/slider.js +13 -5
  153. package/dist/ui/slider.js.map +1 -1
  154. package/dist/ui/tabs.d.ts +1 -0
  155. package/dist/ui/tabs.d.ts.map +1 -1
  156. package/dist/ui/tabs.js +13 -12
  157. package/dist/ui/tabs.js.map +1 -1
  158. package/dist/ui/text-field.d.ts.map +1 -1
  159. package/dist/ui/text-field.js +7 -3
  160. package/dist/ui/text-field.js.map +1 -1
  161. package/dist/ui/theme-switcher.d.ts +1 -0
  162. package/dist/ui/theme-switcher.d.ts.map +1 -1
  163. package/dist/ui/theme-switcher.js +7 -7
  164. package/dist/ui/theme-switcher.js.map +1 -1
  165. package/dist/ui/toast.d.ts +1 -0
  166. package/dist/ui/toast.d.ts.map +1 -1
  167. package/dist/ui/toast.js +4 -1
  168. package/dist/ui/toast.js.map +1 -1
  169. package/dist/ui/tree.d.ts.map +1 -1
  170. package/dist/ui/tree.js +5 -5
  171. package/dist/ui/tree.js.map +1 -1
  172. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,121 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0 — 2026-10-13
4
+
5
+ - **`Rail`, new: layout option C's navigation.** A full-height rail, `--rail-width` wide (72px at AA, 88px at AAA),
6
+ used in a `DashboardShell` instead of `Sidebar`, for a product that needs every destination visible but can't give
7
+ up the sidebar's 256px. Each item shows its icon over its name, always; names are 13px and wrap inside the tile,
8
+ hyphenating where the browser can and breaking a word that still doesn't fit rather than cutting it off. It never
9
+ collapses or expands. Its parts mirror the Sidebar's: `Rail`, `RailHeader`, `RailContent` (a positioned scroller),
10
+ `RailGroup` (named by a visually hidden heading, with a rule above each one after the first), `RailList`,
11
+ `RailFooter` (pinned to the bottom) and `RailItem` (`href` or `onPress`, `icon`, its name, `isCurrent`). Items are
12
+ in three layers like `SidebarItem`. The current page has the `brand-subtle` fill, a 3px `sidebar-primary` edge along
13
+ the tile's start that follows its rounded corners, and its icon and name in `brand` at weight 700; in forced colours
14
+ a bar in `Highlight` takes the edge's place. Nothing in the rail transitions or animates, at AA or AAA. On phones it is the Sidebar's Sheet,
15
+ with the items as rows.
16
+ - **`DashboardShell` takes `navigation`**: `'sidebar'` (the default) or `'rail'`, and `useShell()` returns it. With
17
+ `'rail'`, `AppHeader` shows no collapse toggle and no rule after it, only the phone's menu button, which a container
18
+ query hides from `bp-md` up until the shell has measured itself. It's a prop rather than something the Rail
19
+ registers, so the server renders the right header. A `Rail` in a shell without it logs an error to the console.
20
+ - **Words:** `RailLabels` (`primary`, `navigation`), and `SetsquareLabels.rail`, laid over `SetsquareLabels.sidebar`,
21
+ so a product that switches keeps its translations.
22
+ - **Live status on `SidebarItem` and `RailItem`.** `status` (`'working'` or `'attention'`) puts a badge on the icon,
23
+ in the tab badges' language, with a cut-out in the row's own ground: working is a hollow `brand` ring, attention a
24
+ `destructive` dot inside a ring, so the two differ in shape as well as colour. Working pulses three times in 4.5s as
25
+ it appears and then holds still, inside the five seconds 2.2.2 allows for motion people can't stop; it never
26
+ pulses at AAA or under reduced motion. Attention never moves. `statusLabel` is required with `status` (a type
27
+ error without it, and a console error from plain JavaScript): it is said after the name and any count, and is in
28
+ the collapsed sidebar's tooltip. `detail` is a short value ("4/8", "$1.20"), right-aligned in the sidebar and under
29
+ the name in a rail, in tabular numbers and read as part of the name; `detailTone="warning"` adds a warning icon,
30
+ the `warning` colour and words in the name ("Spend, $1.20, warning"). In forced colours the badges are drawn in
31
+ `CanvasText` and `Highlight`. `count` works as before, and is read before the detail and status.
32
+ - **An item's icon can be a drawing of the product's own**, such as a progress ring: `IconProp` already took an
33
+ element, and the item now wraps the icon in a box that carries its colour, so a drawing in `currentColor` turns
34
+ `brand` on the current page even if it ignores `className`.
35
+ - **Words:** `SidebarLabels` gains `detail`, `detailWarning`, `status`, `tipDetail`, `tipDetailWarning` and
36
+ `tipStatus`; `RailLabels` gains `detail`, `detailWarning` and `status`. New types: `NavStatus`, `NavDetailTone`,
37
+ `NavItemLiveProps`; `SidebarItemProps` is exported, and it and `RailItemProps` are now type aliases (an
38
+ intersection with `NavItemLiveProps`), so code that `extends` either interface needs a `type` instead.
39
+ - **Contrast:** the audit promises the pairs the status uses: `brand`, `destructive` and `warning` on `sidebar` and
40
+ `sidebar-accent` at 3:1, `warning` on `brand-subtle` at 3:1, `warning` text on `sidebar`, `sidebar-accent` and
41
+ `brand-subtle`, and `muted-foreground` on `sidebar-accent` (a count or detail on the hovered row).
42
+ - **The Sidebar's current page is marked as the Rail's is.** `SidebarItem` and a `SidebarDisclosure`'s pages had a
43
+ rounded bar inset from the top and bottom and the name in `foreground`; they now have a 3px `sidebar-primary` edge
44
+ along the row's start, drawn as an inset shadow so it follows the rounded corners, and the icon and name in
45
+ `brand`. Hovered, a current item kept the hover ground before, which under brand text would be a pair the contrast
46
+ audit doesn't promise; in both components it now keeps its `brand-subtle` fill. In forced colours the Sidebar's
47
+ marker used to disappear (forced colours drop the background it was drawn with); like the Rail's, it is now a bar in
48
+ `Highlight`.
49
+ - **`brand-subtle` is stronger**, so a current nav item, a selected row or tab, an info alert or a brand badge stands
50
+ off its ground: against the sidebar it was 1.07:1 in light, 1.11:1 in light AAA, 1.19:1 in dark and 1.25:1 in dark
51
+ AAA, and is now 1.24, 1.22, 1.37 and 1.35 (`#dadef5`, `#dcdff0`, `#242c55`, `#20274f`). Every pair on it still clears
52
+ its floor; the tightest are muted text in light (4.64:1), warning text in light AAA (7.31:1) and brand text in dark
53
+ AAA (7.96:1). Everything that uses it looks a little deeper. A product with its own palette is unaffected.
54
+ - `w-rail` (`--spacing-rail`) is a utility, and `cn()` merges it.
55
+ - **Docs.** A Rail page on ui.setsquare.dev, and the DashboardShell page shows the shell with a Rail under the shell
56
+ with a Sidebar, at each size. The Sidebar and Rail pages' frames and cards show live status and details. Design-system cards: Rail, DashboardShellRail, DashboardShellRailTablet and
57
+ DashboardShellRailMobileNav.
58
+ - **Tests.** `test/browser/rail.mjs` and `test/browser/nav-status.mjs`, in all four themes and two brands, and unit
59
+ tests for what the server renders and for the collapsed sidebar's tooltip (see What is tested in the README).
60
+
61
+ ## 0.6.0 — 2026-10-13
62
+
63
+ Breaking: every word is an ICU MessageFormat template, and the package writes no sentence in code. None of 0.5's
64
+ defaults needed ICU quoting, but a product's template with an apostrophe before `{`, `}`, `#` or another
65
+ apostrophe now does, and some English defaults read differently (below).
66
+
67
+ - **`SetsquareLocale`**, new: sets the locale once for the whole product, and holds app-wide labels keyed by
68
+ component (`SetsquareLabels`). It wraps React Aria's `I18nProvider`, so React Aria's own words, numbers, dates
69
+ and lists follow the product's locale; without it they followed the server's default before hydration and the
70
+ browser's after. A component's own `labels` win over the app-wide ones; a nested provider lays its words over
71
+ the outer one's.
72
+ - **ICU MessageFormat.** Labels are formatted with `intl-messageformat` 12.1.3 (a new dependency, pinned; no
73
+ `eval` or `new Function`, so it runs under a CSP without `'unsafe-eval'`), constructed with `ignoreTag`, so `<b>`
74
+ is text. Plurals and `select` work in every language. A template with no holes formats to itself. A word that
75
+ can't be formatted throws in development; in production it shows the English default with the same values.
76
+ - **No sentence built in code:**
77
+ - Fields: the required message is `labels.enterValue` (`'Enter {label}'`) or `chooseValue` (`'Choose {label}'`),
78
+ with the label as written. In English it now reads "Enter Project name", not "Enter project name": give the
79
+ field `requiredMessage`, or the app a template of its own, where that reads badly.
80
+ - `SelectionBar`: the counts are ICU plurals. `noun` is optional (default `labels.item` and `labels.items`) and
81
+ fills `{singular}` and `{plural}`; `{noun}`, the plural, keeps 0.5 templates working for one release.
82
+ "All 1 project selected" is "1 project selected".
83
+ - `Pagination`: the noun is inside `range` (`'{from}–{to} of {total} {noun}'`), and counts reach ICU as numbers.
84
+ - `RightPanel`: the close button's `{title}` is the title as written, so "Close Details", not "Close details".
85
+ - `TreeItem`'s name, `SidebarSwitcher`'s name and `FileUpload`'s accepted types are lists through
86
+ `Intl.ListFormat` in the locale: "a PDF, PNG, or JPG file" in English.
87
+ - `Slider`'s range is `Intl.NumberFormat.formatRange`: "20–80", not "20 – 80".
88
+ - `FileUpload`'s announcements are labels, with plurals, each a sentence of its own in the live region.
89
+ - `CopyButton` is named by one template, `labels.name` (`'{word} {label}'`).
90
+ - **Words that had no way in** now come through `labels`: `FeatureCard`'s Show and Hide, its default label and the
91
+ toggle's names (`FeatureCardLabels`); `ErrorState`'s title and body for each kind; `FieldLabel`'s "(required)"
92
+ and "(optional)"; the checkbox messages; `Select`'s placeholder (`SelectLabels`); `ComboBox`'s empty list
93
+ (`ComboBoxLabels`); `CommandSearch`'s placeholder; `FileUpload`'s "or", its list's name, "Not added", "Not
94
+ uploaded" and the size and status line; `CodeBlock`'s scrolling name; `Sidebar` items' counts and tooltips.
95
+ `Alert`, `Calendar`, `Dialog`, `Sheet` and `Toaster` had their English as fallbacks in the JSX; it's in labels
96
+ defaults now, so the provider reaches it.
97
+ - **Loose props fold into `labels`**, and keep working for one release, winning over `labels`: `Breadcrumbs`'
98
+ `label` (`BreadcrumbsLabels.breadcrumbs`), `Sidebar`'s `label` (`primary`), `SiteNav`'s `label` and
99
+ `SiteMenu`'s `label` and `navLabel` (`SiteNavLabels`, `SiteMenuLabels`), both shells' `skipLinkLabel`
100
+ (`ShellLabels.skipLink`), `RangeSlider`'s `thumbLabels` (`RangeSliderLabels`), `PanelToggle`'s `label`
101
+ (`RightPanelLabels.toggle`) and `ConfirmDialog`'s `cancelLabel` (`cancel`). `Form` takes `labels` for its
102
+ `ErrorSummary` (`ErrorSummaryLabels`).
103
+ - **Numbers in the product's locale.** `Slider` and `formatBytes` formatted with `Intl.NumberFormat(undefined)`;
104
+ they use React Aria's locale. `formatBytes` takes the locale as an optional second argument. Sidebar counts are
105
+ formatted too.
106
+ - **Server-safe still.** `SiteShell`, `SiteNav` and `CodeBlock` keep no `'use client'`: their words are in small
107
+ client components (the skip link, SiteNav's landmark, CodeBlock's caption and scroller), so the provider reaches
108
+ them.
109
+ - **Tests.** `test/browser/labels.mjs` renders every design-system card inside `SetsquareLocale` at `locale="ar"`
110
+ with every word pseudo-translated, and fails on any of the package's English left in text, hidden text or names;
111
+ a control run with the English left in has to find it. A lint rule of this repository's
112
+ (`scripts/lint/words.mjs`, not shipped) fails English written into the components' JSX, a sentence built in a
113
+ template, a list joined in code and `Intl` in the runtime's locale; its tests fail each way 0.5.0 did it. Unit
114
+ tests cover the formatter and its fallbacks, the provider, and every count label in Polish.
115
+ - **Docs.** A Languages page on ui.setsquare.dev and a Languages section in the README. The Labels card sets its
116
+ French through `SetsquareLocale`, with an ICU plural.
117
+ - Developer-facing text stays English. Right-to-left layout is still to do.
118
+
3
119
  ## 0.5.0 — 2026-10-11
4
120
 
5
121
  Breaking: the `Tree` draws no box of its own. A tree that should stay framed goes in a `Card`.
package/README.md CHANGED
@@ -18,7 +18,7 @@ Controls are built in three layers, so the switch changes targets without changi
18
18
  pnpm add @setsquare/ui react-aria-components @internationalized/date
19
19
  ```
20
20
 
21
- It needs React 19.2 or later, React Aria Components 1.21 or later, and Tailwind CSS 4 in the app. A module is a client component (`'use client'`) only when it needs to be: React Aria, a hook, a context or an event handler. The rest — `StatusBadge`, `Avatar`, `ProductMark`, `Kbd`, `EmptyState`, `IconButton`, `PageHeader`, `PageContent`, the site shell's `SiteShell`, `SiteMain`, `SiteHeader`, `SiteNav`, `SiteFooter` and `SiteFooterGroup`, the content components `Section`, `SectionHeader`, `Container`, `Eyebrow`, `Hero`, `HeroHighlight`, `Card`, `CardGrid`, `Prose`, `Steps`, `Step`, `Split`, `Tag`, `StatList` and `Stat`, `CodeBlock`, `ThemeScript`, `buttonTargetStyles()` and `buttonVisualStyles()` — have no directive, so a server component uses them without shipping them to the browser. Server components can render either kind. A server component that gives a client component an icon (`Alert`, `MenuItem`, `SidebarItem`, a search item) passes the element, `icon={<Folder />}`: a component can't cross into a client component.
21
+ It needs React 19.2 or later, React Aria Components 1.21 or later, and Tailwind CSS 4 in the app. A module is a client component (`'use client'`) only when it needs to be: React Aria, a hook, a context or an event handler. The rest — `StatusBadge`, `Avatar`, `ProductMark`, `Kbd`, `EmptyState`, `IconButton`, `PageHeader`, `PageContent`, the site shell's `SiteShell`, `SiteMain`, `SiteHeader`, `SiteNav`, `SiteFooter` and `SiteFooterGroup`, the content components `Section`, `SectionHeader`, `Container`, `Eyebrow`, `Hero`, `HeroHighlight`, `Card`, `CardGrid`, `Prose`, `Steps`, `Step`, `Split`, `Tag`, `StatList` and `Stat`, `CodeBlock`, `ThemeScript`, `buttonTargetStyles()` and `buttonVisualStyles()` — have no directive, so a server component uses them without shipping them to the browser. Server components can render either kind. A server component that gives a client component an icon (`Alert`, `MenuItem`, `SidebarItem`, `RailItem`, a search item) passes the element, `icon={<Folder />}`: a component can't cross into a client component.
22
22
 
23
23
  In the app's global stylesheet, after Tailwind:
24
24
 
@@ -134,6 +134,39 @@ Every control that can paint smaller than its target — buttons, links, icon bu
134
134
  <p>Invite people by email, or share the <TextLink href="/settings/invite">workspace link</TextLink>.</p>
135
135
  ```
136
136
 
137
+ ## Languages
138
+
139
+ Every word a component shows or says comes in English, and a product replaces any of them with its own, in any language. Set the locale and the app-wide words once, high in the root layout:
140
+
141
+ ```tsx
142
+ import { SetsquareLocale } from '@setsquare/ui';
143
+
144
+ <html lang="de">
145
+ <body>
146
+ <SetsquareLocale
147
+ locale="de"
148
+ labels={{
149
+ alert: { dismiss: 'Schließen' },
150
+ selectionBar: {
151
+ selected: '{count, plural, one {# Projekt ausgewählt} other {# Projekte ausgewählt}}',
152
+ },
153
+ }}
154
+ >
155
+ {children}
156
+ </SetsquareLocale>
157
+ </body>
158
+ </html>
159
+ ```
160
+
161
+ - `locale` is a BCP 47 tag. React Aria's own words (a calendar's buttons, "Clear search", a table's "Select all"), numbers, dates and lists follow it; without it they follow the server's default while rendering there and the browser's after hydration. It wraps React Aria's `I18nProvider`, so a product doesn't import React Aria to set it.
162
+ - `labels` is keyed by component (`SetsquareLabels`): `pagination`, `fileUpload`, `field` for every field, and so on. A component's own `labels` prop wins, for one instance. Any word left out stays English. A nested `SetsquareLocale` lays its words over the outer one's.
163
+ - Every word is an ICU MessageFormat template, formatted by the package with `intl-messageformat` (no `eval`, so it runs under a CSP without `'unsafe-eval'`): `'Remove {name}'`, `'{count, plural, one {# file} few {# pliki} …}'`, `select`. A product passes its catalogue's lines through unformatted. `<b>` is text, as PHP's ICU reads it.
164
+ - No sentence is put together in code: no lowercasing, joining or plural logic. A field's required message is `'Enter {label}'` with the label as written; give a field `requiredMessage` where its own sentence reads better.
165
+ - A word that can't be formatted (malformed, or a value missing) throws in development. In production it shows the English default with the same values.
166
+ - Developer-facing text stays English: thrown errors, lint messages and the page checks' reports. Right-to-left layout isn't done yet: React Aria reads the direction from the locale, but the components' own classes are physical (`left-`, `ml-`).
167
+
168
+ The design system's README and the **Labels** card list every word and placeholder.
169
+
137
170
  ## Site layer
138
171
 
139
172
  For a public page — a marketing site, a privacy notice — the stylesheet also brings Tailwind 4 utilities built from the tokens. They work in any Tailwind 4 app, with or without React:
@@ -311,7 +344,8 @@ The positioning, target, link, reflow, text-spacing and motion scans run in the
311
344
 
312
345
  - **Types:** `tsc` on React 19.
313
346
  - **Lint rules:** ESLint's `RuleTester`, and oxlint loading the built plugin through `jsPlugins`.
314
- - **Unit:** the pagination window: seven slots on every page of an 8-, 20- and 239-page list, and a gap only where two or more pages are left out.
347
+ - **Unit:** the pagination window: seven slots on every page of an 8-, 20- and 239-page list, and a gap only where two or more pages are left out. The `Rail` and `AppHeader` as the server renders them: with `navigation="rail"`, no collapse toggle and no rule, only the phone's trigger (hidden by a container query until the shell measures, absent at a forced size wider than a phone), and the rail's words over the sidebar's app-wide ones. Live status on `SidebarItem` and `RailItem`: the status label, detail and warning words in the name (after a count), the badges hidden from it, a type error for `status` without `statusLabel`, a custom drawing as the icon, and the collapsed sidebar's tooltip in English and in a product's words.
348
+ - **Words:** a lint rule of this repository's (`scripts/lint/words.mjs`) fails English written into the components' JSX, a template that builds a sentence, a list joined in code, and `Intl` formatting in the runtime's locale; its tests fail each way 0.5.0 did it. Unit tests cover the ICU formatter, its development and production fallbacks, `SetsquareLocale`'s layering, and every count label in Polish (one, few, many).
315
349
  - **Contrast:** `scripts/check-contrast.mjs` computes every token pair the usage notes promise, in all four themes. It doesn't check colours a product adds.
316
350
  - **Browser (Chromium only):** the design-system previews on React 19, loaded as the design-system artifact loads them:
317
351
  - axe-core on every preview in all four themes;
@@ -326,12 +360,16 @@ The positioning, target, link, reflow, text-spacing and motion scans run in the
326
360
  - every control a keyboard reaches visibly changing when it takes focus, in two themes;
327
361
  - every link in running text underlined, and every target showing the cursor the rule gives it, across its whole area;
328
362
  - toasts measured against the focused control;
363
+ - the `Rail`, in all four themes and two brands: `--rail-width` at AA and AAA, every target at least `--target-min`, "Art direction" and "Brand kits" in two lines or fewer (in the system face the suites render with: they load no web fonts), no name cut off, the current page's weight, fill, edge, and icon and name in brand, groups named by hidden headings with a rule between them, the footer pinned while the items scroll, no transition or animation on hover or focus but a working badge's pulse, the current page's marker in `Highlight` under Chromium's emulated forced colours, no collapse toggle at 1280px and 768px, the phone's Sheet from the menu button with the items as rows and focus back on the button after Escape, and the Sidebar's shell keeping its toggle;
364
+ - the current page marked alike in a `Rail`, a `SidebarItem` and a `SidebarDisclosure`'s page: the fill, the 3px edge, and the name in brand at 700, the same when hovered, and a bar in `Highlight` under emulated forced colours;
365
+ - live status on nav items, in all four themes and two brands: working a hollow ring and attention a dot in a ring, each in its colour, with a cut-out that matches the ground at rest, hovered, current and current while hovered; working pulsing three times at AA and not at all at AAA or under reduced motion, attention never moving, and nothing on a badge moving after five seconds; names with the status, detail and warning words; details in tabular numbers, under the name in a rail and right-aligned with a count in the sidebar, the warning one with its icon and colour; a product's own drawing as the icon at 20px; the collapsed sidebar's tooltips and badges; and both badges in `CanvasText` and `Highlight` under Chromium's emulated forced colours;
329
366
  - tabs: the arrow keys in a row and a rail, Home and End, names with counts and badges, tooltips on hover (after 500ms, hoverable, closed by Escape and by a press) and on keyboard focus, the rail becoming a row below 480px, the three `hiddenPanels` modes (a draft surviving, a hidden panel's effects stopping, a Suspense read loading while pre-rendered), an important badge's pulse ending inside five seconds and replaying when its count rises, clear-on-open calling `onBadgeClear`, only opacity and colour changing at AAA, nothing animating under reduced motion, and no badge, ring or halo over any text in all three displays at full width and 360px;
330
367
  - pagination: the tiers at 1, 4, 7, 8, 20, 21 and 239 pages, a row that never changes length, the names of page links and arrows, hrefs that keep the query and never use `meta.links`, rows per page keeping the first row in view, focus after paging, the page field's validation and alert, the pending mark and its message after 400ms (and the mark stopping inside five seconds), and motion at AA, AAA and under reduced motion;
331
368
  - nothing on any preview running off its width, no text cut off or spilling with WCAG 1.4.12's spacing applied, and nothing but a loading indicator moving past five seconds, at AA and AAA;
369
+ - every preview inside `SetsquareLocale` at `locale="ar"` with every word pseudo-translated, failing on any of the package's English left in text, hidden text or names, with a control run that leaves the words in English and has to find them. It reads what a card shows as it loads, not what it shows after it's used;
332
370
  - the page checks above, each also run on a page built to fail.
333
- - **Packaging:** `pnpm package:verify` packs the tarball and installs it into a new Next.js app. It builds the app, loads it in both levels, and runs the page checks and the lint plugin from the installed package. It also follows a sidebar link on the freshly started app, to check the templates' page transition runs with its `nav-forward` type. The root layout's `ThemeScript` is checked to put a stored dark theme on `<html>` before any of the page's own JavaScript runs, and the footer's `ThemeSwitcher` to change it for the next page load. A route on the site templates is checked too: the current page, reflow at 320px, the Menu as a link to the footer's navigation with JavaScript off, and the swap to the Menu button when the page hydrates, in the same place and keeping focus.
334
- - **The docs site** (`apps/docs`): `pnpm test:site` loads every page of its production build in all four themes at 1280px, and at AA and AAA at 390px (and each component the Playground shows). Each run has axe, positioning, targets, underlined links, sideways overflow and console errors. Visible focus runs in three of them (light, dark AAA and 390px AAA: both themes, both levels, both layouts) and cursors in three (light, light AAA and 390px AAA), and both check the sidebar and header, which are the same on every page, on the home page only; a check fails if that selector ever leaves out a control in a page's content. It also fails on console errors, sideways overflow, and any internal link to a page it doesn't check, and it follows a sidebar link, in Chromium and in WebKit, to check that the navigation stays client-side, runs the page transition, and covers the old page while it leaves. It also tries a shadcn/ui theme from the Playground: that it reaches every page, lasts through a reload without a flash, resets, and that a paste can set nothing but valid token values. The findings it accepts are listed in `test/site/pages.mjs`, each with its reason. The site brings its own palette, so its build runs the contrast audit against those colours.
371
+ - **Packaging:** `pnpm package:verify` packs the tarball and installs it into a new Next.js app. It builds the app, loads it in both levels, and runs the page checks and the lint plugin from the installed package. It also follows a sidebar link on the freshly started app, to check the templates' page transition runs with its `nav-forward` type. The root layout's `ThemeScript` is checked to put a stored dark theme on `<html>` before any of the page's own JavaScript runs, and the footer's `ThemeSwitcher` to change it for the next page load. A route on the site templates is checked too: the current page, reflow at 320px, the Menu as a link to the footer's navigation with JavaScript off, and the swap to the Menu button when the page hydrates, in the same place and keeping focus. `@setsquare/ui-blocks`' `ContentBuilder` is rendered from a Next.js page and checked to hydrate with no console errors, with the browser on a different platform from the server's.
372
+ - **The docs site** (`apps/docs`): `pnpm test:site` loads every page of its production build in all four themes at 1280px, and at AA and AAA at 390px (and each component the Playground shows). Each run has axe, positioning, targets, underlined links, sideways overflow and console errors. The dark run puts the browser on a different platform from the server's (Windows beside a Mac server, a Mac beside any other), so anything rendered differently on the two shows up as a hydration error. Visible focus runs in three of them (light, dark AAA and 390px AAA: both themes, both levels, both layouts) and cursors in three (light, light AAA and 390px AAA), and both check the sidebar and header, which are the same on every page, on the home page only; a check fails if that selector ever leaves out a control in a page's content. It also fails on console errors, sideways overflow, and any internal link to a page it doesn't check, and it follows a sidebar link, in Chromium and in WebKit, to check that the navigation stays client-side, runs the page transition, and covers the old page while it leaves. It also tries a shadcn/ui theme from the Playground: that it reaches every page, lasts through a reload without a flash, resets, and that a paste can set nothing but valid token values. The findings it accepts are listed in `test/site/pages.mjs`, each with its reason. The site brings its own palette, so its build runs the contrast audit against those colours.
335
373
  - **Not tested:** other browsers; real screen readers (VoiceOver, NVDA and JAWS haven't been run on these components); Windows High Contrast; pasting files into the drop zone; everything that depends on a product's content.
336
374
 
337
375
  ## Developing
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@
6
6
  * to the browser. Import from here, and the styles from "@setsquare/ui/styles.css".
7
7
  */
8
8
  export { cn } from './lib/cn.js';
9
+ export { SetsquareLocale } from './lib/locale.js';
10
+ export type { SetsquareLocaleProps, SetsquareLabels } from './lib/locale.js';
9
11
  export { useElementWidth } from './lib/use-element-width.js';
10
12
  export { Button, LinkButton } from './ui/button.js';
11
13
  export type { ButtonProps, LinkButtonProps } from './ui/button.js';
@@ -23,7 +25,7 @@ export { StatusBadge } from './ui/badge.js';
23
25
  export type { StatusTone, StatusBadgeProps } from './ui/badge.js';
24
26
  export { Avatar, ProductMark } from './ui/avatar.js';
25
27
  export { Breadcrumbs } from './ui/breadcrumbs.js';
26
- export type { BreadcrumbItem, BreadcrumbsProps } from './ui/breadcrumbs.js';
28
+ export type { BreadcrumbItem, BreadcrumbsProps, BreadcrumbsLabels } from './ui/breadcrumbs.js';
27
29
  export { Pagination } from './ui/pagination.js';
28
30
  export type { PaginationProps, PaginationLabels, PaginationMeta } from './ui/pagination.js';
29
31
  export { Tabs, TabList, Tab, TabPanel } from './ui/tabs.js';
@@ -38,9 +40,13 @@ export type { SheetLabels } from './ui/sheet.js';
38
40
  export { AppSearch, CommandSearch, SearchTrigger } from './ui/search.js';
39
41
  export type { SearchItem, SearchSection, SearchLabels } from './ui/search.js';
40
42
  export { DashboardShell, ShellInset, ShellBody, ShellMain, useShell, useOptionalShell, } from './shell/dashboard-shell.js';
41
- export type { ShellSize, PanelMode, DashboardShellProps } from './shell/dashboard-shell.js';
43
+ export type { ShellSize, PanelMode, ShellNavigation, DashboardShellProps, } from './shell/dashboard-shell.js';
44
+ export type { ShellLabels, SiteNavLabels } from './shell/landmarks.js';
42
45
  export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarList, SidebarItem, SidebarDisclosure, SidebarSwitcher, SidebarTrigger, useSidebarCollapsed, } from './shell/sidebar.js';
43
- export type { SidebarLabels, SidebarTriggerLabels, SidebarDisclosureProps, SidebarSubItem, } from './shell/sidebar.js';
46
+ export type { SidebarItemProps, SidebarLabels, SidebarTriggerLabels, SidebarDisclosureProps, SidebarSubItem, } from './shell/sidebar.js';
47
+ export { Rail, RailHeader, RailContent, RailFooter, RailGroup, RailList, RailItem, } from './shell/rail.js';
48
+ export type { RailProps, RailLabels, RailItemProps } from './shell/rail.js';
49
+ export type { NavStatus, NavDetailTone, NavItemLiveProps } from './shell/nav-status.js';
44
50
  export { AppHeader } from './shell/app-header.js';
45
51
  export { SiteShell, SiteMain } from './shell/site-shell.js';
46
52
  export type { SiteShellProps, SiteMainProps } from './shell/site-shell.js';
@@ -51,7 +57,7 @@ export type { SiteNavProps } from './shell/site-nav.js';
51
57
  export { SiteNavLink, SitePathProvider } from './shell/site-nav-link.js';
52
58
  export type { SiteNavLinkProps, SiteNavLinkVariant } from './shell/site-nav-link.js';
53
59
  export { SiteMenu } from './shell/site-menu.js';
54
- export type { SiteMenuProps } from './shell/site-menu.js';
60
+ export type { SiteMenuProps, SiteMenuLabels } from './shell/site-menu.js';
55
61
  export { SiteFooter, SiteFooterGroup } from './shell/site-footer.js';
56
62
  export type { SiteFooterProps, SiteFooterGroupProps } from './shell/site-footer.js';
57
63
  export { samePath } from './shell/site-path.js';
@@ -66,7 +72,7 @@ export { LinkCard } from './ui/link-card.js';
66
72
  export { SettingsCard } from './ui/settings-card.js';
67
73
  export type { SettingsCardProps } from './ui/settings-card.js';
68
74
  export { FeatureCard, FeatureCardItem } from './ui/feature-card.js';
69
- export type { FeatureCardProps, FeatureCardItemProps } from './ui/feature-card.js';
75
+ export type { FeatureCardProps, FeatureCardItemProps, FeatureCardLabels, } from './ui/feature-card.js';
70
76
  export { TimeOfDayIcon, timeOfDay } from './ui/time-of-day-icon.js';
71
77
  export type { TimeOfDay, TimeOfDayIconProps } from './ui/time-of-day-icon.js';
72
78
  export type { LinkCardProps } from './ui/link-card.js';
@@ -103,9 +109,9 @@ export { SearchField } from './ui/search-field.js';
103
109
  export type { SearchFieldProps } from './ui/search-field.js';
104
110
  export { ListBox, Option, OptionSection } from './ui/list-box.js';
105
111
  export { Select } from './ui/select.js';
106
- export type { SelectProps } from './ui/select.js';
112
+ export type { SelectProps, SelectLabels } from './ui/select.js';
107
113
  export { ComboBox } from './ui/combo-box.js';
108
- export type { ComboBoxProps } from './ui/combo-box.js';
114
+ export type { ComboBoxProps, ComboBoxLabels } from './ui/combo-box.js';
109
115
  export { Checkbox, CheckboxGroup, SelectionCheckbox } from './ui/checkbox.js';
110
116
  export type { CheckboxProps, CheckboxGroupProps, SelectionCheckboxProps } from './ui/checkbox.js';
111
117
  export { RadioGroup, Radio } from './ui/radio-group.js';
@@ -113,7 +119,7 @@ export type { RadioGroupProps, RadioProps } from './ui/radio-group.js';
113
119
  export { Switch } from './ui/switch.js';
114
120
  export type { SwitchProps } from './ui/switch.js';
115
121
  export { Form, FormSection, FormActions, ErrorSummary, StatusMessage } from './ui/form.js';
116
- export type { FormProps, FormSectionProps, ErrorItem, ErrorSummaryProps } from './ui/form.js';
122
+ export type { FormProps, FormSectionProps, ErrorItem, ErrorSummaryProps, ErrorSummaryLabels, } from './ui/form.js';
117
123
  export { SpinnerIcon, Spinner, ProgressBar } from './ui/spinner.js';
118
124
  export type { SpinnerProps, ProgressBarProps } from './ui/spinner.js';
119
125
  export { Skeleton, SkeletonText, TableSkeleton, LoadingState } from './ui/skeleton.js';
@@ -129,7 +135,7 @@ export type { ToastContent, ToastTone, ToasterLabels } from './ui/toast.js';
129
135
  export { ErrorState, ErrorBoundary } from './ui/error-state.js';
130
136
  export type { ErrorStateProps, ErrorKind, ErrorBoundaryProps, ErrorStateLabels, } from './ui/error-state.js';
131
137
  export { Slider, RangeSlider } from './ui/slider.js';
132
- export type { SliderProps, RangeSliderProps } from './ui/slider.js';
138
+ export type { SliderProps, RangeSliderProps, RangeSliderLabels } from './ui/slider.js';
133
139
  export { Calendar, RangeCalendar } from './ui/calendar.js';
134
140
  export type { CalendarProps, RangeCalendarProps, CalendarLabels } from './ui/calendar.js';
135
141
  export { DateField, TimeField, DatePicker, DateRangePicker } from './ui/date-field.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAg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AE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@
6
6
  * to the browser. Import from here, and the styles from "@setsquare/ui/styles.css".
7
7
  */
8
8
  export { cn } from './lib/cn.js';
9
+ export { SetsquareLocale } from './lib/locale.js';
9
10
  export { useElementWidth } from './lib/use-element-width.js';
10
11
  export { Button, LinkButton } from './ui/button.js';
11
12
  // From their own module, which has no 'use client', so a server component can call them.
@@ -28,6 +29,7 @@ export { Sheet } from './ui/sheet.js';
28
29
  export { AppSearch, CommandSearch, SearchTrigger } from './ui/search.js';
29
30
  export { DashboardShell, ShellInset, ShellBody, ShellMain, useShell, useOptionalShell, } from './shell/dashboard-shell.js';
30
31
  export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarList, SidebarItem, SidebarDisclosure, SidebarSwitcher, SidebarTrigger, useSidebarCollapsed, } from './shell/sidebar.js';
32
+ export { Rail, RailHeader, RailContent, RailFooter, RailGroup, RailList, RailItem, } from './shell/rail.js';
31
33
  export { AppHeader } from './shell/app-header.js';
32
34
  // The site shell, for public pages. SiteShell, SiteMain, SiteHeader, SiteNav, SiteFooter and SiteFooterGroup
33
35
  // have no 'use client'; SiteMenu and SiteNavLink do.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEpD,yFAAyF;AACzF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAW5D,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,aAAa,EACb,WAAW,EACX,OAAO,EACP,SAAS,EACT,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI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gB,CAAC;AAOvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOhE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASvF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAQ9D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/lib/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAwD7C,4EAA4E;AAC5E,wBAAgB,EAAE,CAAC,GAAG,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,CAEjD"}
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/lib/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAyD7C,4EAA4E;AAC5E,wBAAgB,EAAE,CAAC,GAAG,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,CAEjD"}
package/dist/lib/cn.js CHANGED
@@ -18,6 +18,7 @@ const merge = extendTailwindMerge({
18
18
  'header',
19
19
  'sidebar',
20
20
  'sidebar-collapsed',
21
+ 'rail',
21
22
  'panel',
22
23
  'choice',
23
24
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"cn.js","sourceRoot":"","sources":["../../src/lib/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;GAGG;AACH,MAAM,KAAK,GAAG,mBAAmB,CAA6D;IAC5F,MAAM,EAAE;QACN,4FAA4F;QAC5F,KAAK,EAAE;YACL,OAAO,EAAE;gBACP,QAAQ;gBACR,gBAAgB;gBAChB,SAAS;gBACT,YAAY;gBACZ,YAAY;gBACZ,UAAU;gBACV,QAAQ;gBACR,SAAS;gBACT,mBAAmB;gBACnB,OAAO;gBACP,QAAQ;aACT;SACF;QACD,WAAW,EAAE;YACX,+FAA+F;YAC/F,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE;wBACJ,SAAS;wBACT,cAAc;wBACd,iBAAiB;wBACjB,MAAM;wBACN,OAAO;wBACP,SAAS;wBACT,YAAY;wBACZ,MAAM;wBACN,IAAI;wBACJ,WAAW;wBACX,SAAS;wBACT,gBAAgB;wBAChB,MAAM;qBACP;iBACF;aACF;YACD,YAAY,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;YAChD,+FAA+F;YAC/F,aAAa,EAAE,CAAC,aAAa,CAAC;YAC9B,aAAa,EAAE,CAAC,aAAa,CAAC;YAC9B,gGAAgG;YAChG,WAAW,EAAE,CAAC,WAAW,CAAC;SAC3B;KACF;CACF,CAAC,CAAC;AAEH,4EAA4E;AAC5E,MAAM,UAAU,EAAE,CAAC,GAAG,KAAmB;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC"}
1
+ {"version":3,"file":"cn.js","sourceRoot":"","sources":["../../src/lib/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;GAGG;AACH,MAAM,KAAK,GAAG,mBAAmB,CAA6D;IAC5F,MAAM,EAAE;QACN,4FAA4F;QAC5F,KAAK,EAAE;YACL,OAAO,EAAE;gBACP,QAAQ;gBACR,gBAAgB;gBAChB,SAAS;gBACT,YAAY;gBACZ,YAAY;gBACZ,UAAU;gBACV,QAAQ;gBACR,SAAS;gBACT,mBAAmB;gBACnB,MAAM;gBACN,OAAO;gBACP,QAAQ;aACT;SACF;QACD,WAAW,EAAE;YACX,+FAA+F;YAC/F,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE;wBACJ,SAAS;wBACT,cAAc;wBACd,iBAAiB;wBACjB,MAAM;wBACN,OAAO;wBACP,SAAS;wBACT,YAAY;wBACZ,MAAM;wBACN,IAAI;wBACJ,WAAW;wBACX,SAAS;wBACT,gBAAgB;wBAChB,MAAM;qBACP;iBACF;aACF;YACD,YAAY,EAAE,CAAC,YAAY,EAAE,kBAAkB,CAAC;YAChD,+FAA+F;YAC/F,aAAa,EAAE,CAAC,aAAa,CAAC;YAC9B,aAAa,EAAE,CAAC,aAAa,CAAC;YAC9B,gGAAgG;YAChG,WAAW,EAAE,CAAC,WAAW,CAAC;SAC3B;KACF;CACF,CAAC,CAAC;AAEH,4EAA4E;AAC5E,MAAM,UAAU,EAAE,CAAC,GAAG,KAAmB;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Every component's English words, keyed as `SetsquareLabels` is: the defaults a product's labels replace. Not
3
+ * exported from the package. The pseudo-locale sweep (test/browser/labels.mjs) reads it from the build, to
4
+ * replace every word with a marked pseudo-translation and find any English left.
5
+ */
6
+ import type { SetsquareLabels } from './locale.js';
7
+ /** Every key of `SetsquareLabels`, with every word: adding a component's labels to one and not here fails tsc. */
8
+ export declare const englishLabels: {
9
+ [K in keyof SetsquareLabels]-?: Required<NonNullable<SetsquareLabels[K]>>;
10
+ };
11
+ //# sourceMappingURL=english.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"english.d.ts","sourceRoot":"","sources":["../../src/lib/english.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6BnD,kHAAkH;AAClH,eAAO,MAAM,aAAa,EAAE;KACzB,CAAC,IAAI,MAAM,eAAe,CAAC,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;CAsC1E,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { shellLabels, siteNavLabels } from '../shell/landmarks.js';
2
+ import { railLabels } from '../shell/rail.js';
3
+ import { rightPanelLabels } from '../shell/right-panel.js';
4
+ import { sidebarLabels, sidebarTriggerLabels } from '../shell/sidebar.js';
5
+ import { siteMenuLabels } from '../shell/site-menu.js';
6
+ import { alertLabels, offlineAlertLabels } from '../ui/alert.js';
7
+ import { breadcrumbsLabels } from '../ui/breadcrumbs.js';
8
+ import { calendarLabels } from '../ui/calendar.js';
9
+ import { codeBlockLabels } from '../ui/code-block-parts.js';
10
+ import { comboBoxLabels } from '../ui/combo-box.js';
11
+ import { copyButtonLabels } from '../ui/copy-button.js';
12
+ import { dateFieldLabels } from '../ui/date-field.js';
13
+ import { confirmDialogLabels, dialogLabels } from '../ui/dialog.js';
14
+ import { errorStateLabels } from '../ui/error-state.js';
15
+ import { featureCardLabels } from '../ui/feature-card.js';
16
+ import { fieldLabels } from '../ui/field.js';
17
+ import { fileUploadLabels } from '../ui/file-upload.js';
18
+ import { errorSummaryLabels } from '../ui/form.js';
19
+ import { paginationLabels } from '../ui/pagination.js';
20
+ import { searchLabels } from '../ui/search.js';
21
+ import { selectLabels } from '../ui/select.js';
22
+ import { selectionBarLabels } from '../ui/selection-bar.js';
23
+ import { sheetLabels } from '../ui/sheet.js';
24
+ import { rangeSliderLabels } from '../ui/slider.js';
25
+ import { tabsLabels } from '../ui/tabs.js';
26
+ import { themeSwitcherLabels } from '../ui/theme-switcher.js';
27
+ import { toasterLabels } from '../ui/toast.js';
28
+ /** Every key of `SetsquareLabels`, with every word: adding a component's labels to one and not here fails tsc. */
29
+ export const englishLabels = {
30
+ alert: alertLabels,
31
+ breadcrumbs: breadcrumbsLabels,
32
+ calendar: calendarLabels,
33
+ codeBlock: codeBlockLabels,
34
+ comboBox: { noMatches: comboBoxLabels.noMatches },
35
+ confirmDialog: confirmDialogLabels,
36
+ copyButton: copyButtonLabels,
37
+ dashboardShell: shellLabels,
38
+ dateField: {
39
+ tooEarly: dateFieldLabels.tooEarly,
40
+ tooLate: dateFieldLabels.tooLate,
41
+ unavailable: dateFieldLabels.unavailable,
42
+ },
43
+ dialog: dialogLabels,
44
+ errorState: errorStateLabels,
45
+ errorSummary: errorSummaryLabels,
46
+ featureCard: featureCardLabels,
47
+ field: fieldLabels,
48
+ fileUpload: fileUploadLabels,
49
+ offlineAlert: offlineAlertLabels,
50
+ pagination: paginationLabels,
51
+ rail: railLabels,
52
+ rangeSlider: rangeSliderLabels,
53
+ rightPanel: rightPanelLabels,
54
+ search: searchLabels,
55
+ select: { placeholder: selectLabels.placeholder },
56
+ selectionBar: selectionBarLabels,
57
+ sheet: sheetLabels,
58
+ sidebar: sidebarLabels,
59
+ sidebarTrigger: sidebarTriggerLabels,
60
+ siteMenu: { menu: siteMenuLabels.menu },
61
+ siteNav: siteNavLabels,
62
+ siteShell: shellLabels,
63
+ tabs: tabsLabels,
64
+ themeSwitcher: themeSwitcherLabels,
65
+ toaster: toasterLabels,
66
+ };
67
+ //# sourceMappingURL=english.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"english.js","sourceRoot":"","sources":["../../src/lib/english.ts"],"names":[],"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AAE,WAAW;IACtB,IAAI,EAAE,UAAU;IAChB,aAAa,EAAE,mBAAmB;IAClC,OAAO,EAAE,aAAa;CACvB,CAAC"}
@@ -1,11 +1,41 @@
1
1
  /**
2
2
  * The words a component shows or says, which a product can replace one component at a time through its `labels`
3
- * prop: an object of strings, any of which can be left out to keep the English default. A word that carries a
4
- * value has a `{name}` placeholder in its string ("Remove {name}") rather than being a function, so `labels`
5
- * stays plain data that a server component can pass to a client one.
6
- */
7
- /** The English defaults with any of the product's words laid over them. */
8
- export declare function withLabels<T extends object>(defaults: T, labels: Partial<T> | undefined): T;
9
- /** Fills `{name}` placeholders: `fill('Remove {name}', { name: 'plan.pdf' })` is "Remove plan.pdf". */
10
- export declare function fill(template: string, values: Record<string, string | number>): string;
3
+ * prop, or for the whole app through `SetsquareLocale`: an object of strings, any of which can be left out to
4
+ * keep the English default. Each word is an ICU MessageFormat template, so a value goes in a placeholder
5
+ * ("Remove {name}") and a count chooses the words it needs ("{count, plural, one {# file} other {# files}}"),
6
+ * in any language. Templates stay strings rather than functions, so `labels` is plain data that a server
7
+ * component can pass to a client one.
8
+ */
9
+ /** The values a word's placeholders are filled with. */
10
+ export type LabelValues = Record<string, string | number>;
11
+ /** The English defaults with any of the product's words laid over them, later layers winning. */
12
+ export declare function withLabels<T extends object>(defaults: T, ...layers: (Partial<T> | undefined)[]): T;
13
+ /** Formats an ICU template in `locale`. Throws if it is malformed or a value it names is missing. */
14
+ export declare function formatLabel(template: string, values: LabelValues, locale: string): string;
15
+ /**
16
+ * Finished text as a template that formats to itself, for handing a word one component has formatted to another
17
+ * that formats its labels: an apostrophe is doubled and each brace quoted.
18
+ */
19
+ export declare function literal(text: string): string;
20
+ /** Replaces `{name}` with its value and nothing else. For a path (`/projects?page={page}`), not for words. */
21
+ export declare function substitute(template: string, values: LabelValues): string;
22
+ /**
23
+ * Formats a word: `fill('Remove {name}', { name: 'plan.pdf' }, 'en')` is "Remove plan.pdf". A word that can't
24
+ * be formatted throws in development. In production it shows `fallback` (the package's English default for the
25
+ * word) formatted with the same values, and if that fails too, `fallback` with its plain `{name}` placeholders
26
+ * replaced, so a page never breaks over a word.
27
+ */
28
+ export declare function fill(template: string, values?: LabelValues, locale?: string, fallback?: string): string;
29
+ /**
30
+ * Stands in for a value that a component draws itself (a bold figure, a page number), so a template can be
31
+ * formatted whole and then split around it with `splitMarkers`. Only for a plain `{name}` placeholder: a marked
32
+ * value isn't a number, so it can't choose a plural.
33
+ */
34
+ export declare function marker(name: string): string;
35
+ /** A formatted word in pieces: its text, and `{ marker }` where each `marker(name)` was. */
36
+ export declare function splitMarkers(text: string): (string | {
37
+ marker: string;
38
+ })[];
39
+ /** A list in `locale`'s words and punctuation, through `Intl.ListFormat`: "A, B, C"; "PDF, PNG or JPEG". */
40
+ export declare function formatList(items: string[], locale: string, options?: Intl.ListFormatOptions): string;
11
41
  //# sourceMappingURL=labels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/lib/labels.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,CAAC,CAE3F;AAED,uGAAuG;AACvG,wBAAgB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAItF"}
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/lib/labels.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,wDAAwD;AACxD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE1D,iGAAiG;AACjG,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EACzC,QAAQ,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