@optimum-intelligence/opti-ui 0.7.6 → 0.8.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 (87) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +20 -10
  3. package/dist/components/alert/Alert.d.ts +5 -2
  4. package/dist/components/alert/Alert.js +67 -65
  5. package/dist/components/alert/Alert.js.map +1 -1
  6. package/dist/components/app-shell/AppShell.d.ts +19 -7
  7. package/dist/components/app-shell/AppShell.js +329 -303
  8. package/dist/components/app-shell/AppShell.js.map +1 -1
  9. package/dist/components/calendar/Calendar.js +140 -136
  10. package/dist/components/calendar/Calendar.js.map +1 -1
  11. package/dist/components/combobox/Combobox.d.ts +8 -2
  12. package/dist/components/combobox/Combobox.js +182 -202
  13. package/dist/components/combobox/Combobox.js.map +1 -1
  14. package/dist/components/data-table/DataTable.d.ts +23 -11
  15. package/dist/components/data-table/DataTable.js +148 -88
  16. package/dist/components/data-table/DataTable.js.map +1 -1
  17. package/dist/components/data-table/DataTableContent.js +1 -1
  18. package/dist/components/data-table/DataTableFilters.d.ts +56 -4
  19. package/dist/components/data-table/DataTableFilters.js +492 -77
  20. package/dist/components/data-table/DataTableFilters.js.map +1 -1
  21. package/dist/components/data-table/types.d.ts +13 -2
  22. package/dist/components/data-table/useDataTable.d.ts +1 -1
  23. package/dist/components/data-table/useDataTable.js +251 -229
  24. package/dist/components/data-table/useDataTable.js.map +1 -1
  25. package/dist/components/date-picker/DatePicker.d.ts +5 -0
  26. package/dist/components/date-picker/DatePicker.js +148 -140
  27. package/dist/components/date-picker/DatePicker.js.map +1 -1
  28. package/dist/components/date-picker/DateRangePicker.d.ts +2 -0
  29. package/dist/components/date-picker/DateRangePicker.js +171 -164
  30. package/dist/components/date-picker/DateRangePicker.js.map +1 -1
  31. package/dist/components/date-picker/PickerField.d.ts +6 -3
  32. package/dist/components/date-picker/PickerField.js +166 -159
  33. package/dist/components/date-picker/PickerField.js.map +1 -1
  34. package/dist/components/dialog/ConfirmDialog.d.ts +5 -2
  35. package/dist/components/dialog/ConfirmDialog.js +79 -77
  36. package/dist/components/dialog/ConfirmDialog.js.map +1 -1
  37. package/dist/components/dialog/Dialog.d.ts +5 -2
  38. package/dist/components/dialog/Dialog.js +65 -63
  39. package/dist/components/dialog/Dialog.js.map +1 -1
  40. package/dist/components/drawer/Drawer.d.ts +13 -4
  41. package/dist/components/drawer/Drawer.js +122 -164
  42. package/dist/components/drawer/Drawer.js.map +1 -1
  43. package/dist/components/field/Field.d.ts +38 -9
  44. package/dist/components/field/Field.js +66 -1
  45. package/dist/components/field/Field.js.map +1 -1
  46. package/dist/components/file-upload/FileUpload.js +2 -0
  47. package/dist/components/file-upload/FileUpload.js.map +1 -1
  48. package/dist/components/input/Input.d.ts +9 -16
  49. package/dist/components/input/Input.js +124 -206
  50. package/dist/components/input/Input.js.map +1 -1
  51. package/dist/components/map/colors.d.ts +2 -2
  52. package/dist/components/map/colors.js +12 -3
  53. package/dist/components/map/colors.js.map +1 -1
  54. package/dist/components/number-field/NumberField.d.ts +12 -3
  55. package/dist/components/number-field/NumberField.js +109 -130
  56. package/dist/components/number-field/NumberField.js.map +1 -1
  57. package/dist/components/pagination/Pagination.js +135 -186
  58. package/dist/components/pagination/Pagination.js.map +1 -1
  59. package/dist/components/search-input/SearchInput.d.ts +5 -2
  60. package/dist/components/search-input/SearchInput.js +47 -45
  61. package/dist/components/search-input/SearchInput.js.map +1 -1
  62. package/dist/components/select/Select.d.ts +13 -3
  63. package/dist/components/select/Select.js +144 -139
  64. package/dist/components/select/Select.js.map +1 -1
  65. package/dist/components/spinner/Spinner.d.ts +6 -2
  66. package/dist/components/spinner/Spinner.js +42 -40
  67. package/dist/components/spinner/Spinner.js.map +1 -1
  68. package/dist/components/stepper/Stepper.js +44 -40
  69. package/dist/components/stepper/Stepper.js.map +1 -1
  70. package/dist/components/toast/Toast.d.ts +17 -1
  71. package/dist/components/toast/Toast.js +65 -33
  72. package/dist/components/toast/Toast.js.map +1 -1
  73. package/dist/components.json +377 -57
  74. package/dist/index.d.ts +2 -0
  75. package/dist/index.js +5 -3
  76. package/dist/labels/Labels.d.ts +85 -0
  77. package/dist/labels/Labels.js +92 -0
  78. package/dist/labels/Labels.js.map +1 -0
  79. package/dist/llms-full.txt +224 -37
  80. package/dist/llms.txt +10 -4
  81. package/dist/opti-ui.css +210 -18
  82. package/dist/theme/ThemeProvider.d.ts +8 -4
  83. package/dist/theme/ThemeProvider.js.map +1 -1
  84. package/dist/utils/media.d.ts +9 -2
  85. package/dist/utils/media.js +10 -3
  86. package/dist/utils/media.js.map +1 -1
  87. package/package.json +5 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,69 @@
3
3
  All notable changes to `@optimum-intelligence/opti-ui`. Versions follow [semver](https://semver.org/); while
4
4
  the version is `0.x`, minor releases may contain breaking changes, which are marked **Breaking**.
5
5
 
6
+ ## 0.8.0
7
+
8
+ ### Added
9
+
10
+ - `DataTable` quick filters: `quick: true` on a filter keeps it in the toolbar. The other filters sit behind a
11
+ "Filters (n)" button (`DataTable.FilterPanel`) whose panel stacks them, and show as removable tags under the
12
+ toolbar once set (`DataTable.ActiveFilters`). Also new: `DataTable.Loading` (the spinner slot), the
13
+ `setFilterValues` instance method and the `removeFilter` label.
14
+ - `DataTable.Filters` takes `quick` to render only the quick filters (`true`) or only the others (`false`).
15
+ - `DataTable.ClearFilters` takes `keepSpace`: hidden but still taking its space while no filter is set.
16
+
17
+ - `--oui-color-border-control-hover` token, and `--oui-toast-offset-bottom` to lift bottom toasts above a bottom
18
+ bar. AppShell sets it on phones while its tab bar is at the bottom.
19
+ - `LabelsProvider` and `useLabels`: translate every built-in text once for a subtree. This includes texts that
20
+ had no prop before: the toast close button, the Combobox list, clear, chip-remove and `+N` names, and the
21
+ AppShell tab bar and drawer names. Props on a component still win.
22
+ - `FormField`: the label, description and error shell that `TextField`, `Select`, `Combobox` and `NumberField`
23
+ are now built on, for wrapping your own controls the same way.
24
+ - `fieldProps` on `Select`, `Combobox` and `NumberField`, as `TextField` already had.
25
+ - `ThemeProvider mode="system"` and `data-oui-theme="system"` follow the OS colour scheme, in CSS only (no
26
+ flash on load). Maps follow it too.
27
+ - `useMediaQuery`, `NARROW_SCREEN` and `SHELL_COLLAPSED` are exported. The styles share two breakpoint
28
+ variables (640px narrow, 900px AppShell) instead of repeating the numbers.
29
+ - `Drawer`: `header` replaces the built-in header (`null` drops it), and `title` is optional when you do.
30
+ - Toasts: `data: { icon, content }` sets a per-toast icon (`null` for none) and custom content under the
31
+ description. `toast.promise()` toasts get the loading spinner and danger styling for errors.
32
+ - `DatePickerLabels` gains `selectYear`, `selectMonth`, `selectDate` and `selectDateTime` (the placeholders),
33
+ and `DateRangePickerLabels` gains `selectDates`.
34
+
35
+ ### Changed
36
+
37
+ - `DataTable`: the toolbar no longer moves while filtering. Selects and date ranges in a filter row have a fixed
38
+ width (`--oui-data-table-filter-width`, 12rem) and cut long values short; the clear button sits after the
39
+ filters and keeps its space; the "Filters" button keeps its width. The row count moved from the toolbar to
40
+ the footer: paginated tables show the pagination's range, unpaginated ones a count, and "n selected" while
41
+ rows are selected. `DataTable.Summary` no longer includes the loading spinner (see `DataTable.Loading`).
42
+ - Control borders (fields, toggles, checkboxes, file upload, secondary buttons) are darker and now reach 3:1
43
+ against the surface in light and dark mode. Checkboxes use the control border instead of the hover border.
44
+ - Disabled primary, accent and danger buttons have a neutral fill instead of a faded one, so they no longer
45
+ look like an enabled accent button.
46
+ - `PageHeader`: the actions sit on the title's row and the description runs below at full width. The
47
+ breadcrumbs and description moved out of `.oui-page-header__text`, which now holds only the eyebrow and title.
48
+ - `ThemeTokenName` accepts any name, so component variables such as `card-padding`, `dialog-width`,
49
+ `navbar-width` and `space-*` type-check in a `Theme`.
50
+ - **Breaking** `DataTable`: "Clear filters" moved out of `DataTable.Filters` into a new `DataTable.ClearFilters`
51
+ part, which the default toolbar places before the count and which renders only while a filter is set, so the
52
+ filters never shift or wrap for it. Composed toolbars add `<DataTable.ClearFilters />` to keep the button.
53
+ - `DataTable`: chip filters whose label is a `Badge` show their count inside the badge.
54
+ - `package.json` declares `engines.node` (`^20.19.0 || >=22.12.0`, the same as Vite).
55
+
56
+ - Date and range pickers open in a bottom sheet on phones instead of a cramped popover; the range picker shows
57
+ one month there. `contentProps` applies only to the popover.
58
+ - `Select`'s label shows the same required marker as the other fields (`Select.Label` takes `required`).
59
+
60
+ ### Fixed
61
+
62
+ - `DataTable`: re-renders (opening the filter panel, selecting a row) no longer filter and sort every row again;
63
+ React Compiler now memoizes the row processing. Large tables stuttered on every such change.
64
+ - A `data-oui-theme="light"` scope inside a dark page now gets the light status and tone colours instead of
65
+ inheriting the dark ones.
66
+ - Toasts at the bottom no longer cover AppShell's mobile tab bar or the phone's home indicator.
67
+ - `DataTable`: on phones, inline editors are at least 8rem wide; the columns grow while a row is edited.
68
+
6
69
  ## 0.7.6 (2026-11-05)
7
70
 
8
71
  ### Added
package/README.md CHANGED
@@ -74,12 +74,12 @@ so the components work in Next.js App Router.
74
74
  | --- | --- |
75
75
  | Layout | `AppShell`, `Navbar` (+ `NavbarHeader/Brand/Section/SectionLabel/Item/Group/Footer`), `PageHeader`, `Grid`, `Stack`, `Card` (+ parts), `StatCard`, `Separator`, `ScrollArea` |
76
76
  | Actions | `Button`, `IconButton`, `Toggle`, `ToggleGroup`, `SegmentedControl`, `Menu.*`, `ContextMenu.*`, `Toolbar.*` |
77
- | Forms | `Field.*`, `Fieldset.*`, `Form`, `Input`, `TextField`, `PasswordInput`, `PasswordField`, `Textarea`, `TextareaField`, `Select` (+ parts), `Combobox` (+ parts), `Checkbox`, `CheckboxGroup`, `Radio`, `RadioGroup`, `Switch`, `NumberField`, `Slider`, `SearchInput`, `DatePicker`, `DateTimePicker`, `DateRangePicker`, `Calendar`, `RangeCalendar`, `FileUpload`, `Dropzone`, `FileItem` |
77
+ | Forms | `Field.*`, `FormField`, `Fieldset.*`, `Form`, `Input`, `TextField`, `PasswordInput`, `PasswordField`, `Textarea`, `TextareaField`, `Select` (+ parts), `Combobox` (+ parts), `Checkbox`, `CheckboxGroup`, `Radio`, `RadioGroup`, `Switch`, `NumberField`, `Slider`, `SearchInput`, `DatePicker`, `DateTimePicker`, `DateRangePicker`, `Calendar`, `RangeCalendar`, `FileUpload`, `Dropzone`, `FileItem` |
78
78
  | Overlays | `Dialog.*` (modal, or a sheet with `placement`), `AlertDialog.*`, `Drawer` (detail side panel), `Popover.*`, `PreviewCard.*`, `Tooltip`, `ToastProvider` + `useToast()`, `CommandPalette` |
79
79
  | Disclosure & navigation | `Tabs.*`, `Accordion.*`, `Collapsible.*`, `Breadcrumbs` + `Breadcrumb`, `Pagination`, `Stepper` |
80
80
  | Feedback & data | `Alert`, `Badge`, `Tag`, `Avatar`, `AvatarGroup`, `Progress`, `Meter`, `Skeleton`, `SkeletonText`, `Spinner`, `Table` (+ parts), `DataTable`, `EmptyState`, `Heading`, `Text`, `Eyebrow`, `Link` |
81
81
  | Maps (`/map` entry) | `Map.Root`, `Map.Routes`, `Map.Areas`, `Map.Points`, `Map.Marker`, `Map.Popup`, `Map.Tooltip`, `Map.Overlay`, `Map.Legend`, `Map.BaseLayerSwitch`, `rasterStyle`, `useResolvedColors` (see [Maps](#maps)) |
82
- | Theme | `ThemeProvider`, `createTheme`, `themeToStyle`, `seriesColor`, `DateConfigProvider`, `useDateConfig`, icons (`CheckIcon`, `ChevronDownIcon`, …) |
82
+ | Theme | `ThemeProvider`, `createTheme`, `themeToStyle`, `seriesColor`, `DateConfigProvider`, `useDateConfig`, `LabelsProvider`, `useLabels`, `useMediaQuery`, icons (`CheckIcon`, `ChevronDownIcon`, …) |
83
83
 
84
84
  Components with a common one-line form can be called directly, and their parts are attached for full
85
85
  control: `<Select items={…} />` or `<Select.Root>…<Select.Trigger/>…</Select.Root>`; the same applies to
@@ -94,6 +94,10 @@ Display is ISO-style on a 24-hour clock (`2026-03-09 14:30`) unless you pass a `
94
94
  (`"DD.MM.YYYY"`, `"MMMM YYYY"`). `formatDate` formats values the same way outside the pickers, and
95
95
  `DateConfigProvider` sets app-wide defaults for locale, time zone, week start and formats.
96
96
 
97
+ Built-in texts (close buttons, placeholders, table and calendar texts) are English. `LabelsProvider`
98
+ replaces them for everything inside it, so an app translates them once; a component's own label props still
99
+ win.
100
+
97
101
  `DataTable` handles search, filters, sorting, pagination, selection, row actions and inline editing for
98
102
  rows held in memory. Columns declare what they take part in:
99
103
 
@@ -101,7 +105,7 @@ rows held in memory. Columns declare what they take part in:
101
105
  const columns: DataTableColumn<Driver>[] = [
102
106
  { id: 'badge', header: 'Badge', mono: true, searchMode: 'exact' },
103
107
  { id: 'name', header: 'Name', edit: 'text' },
104
- { id: 'depot', header: 'Depot', filter: 'select', edit: { type: 'select', options: depots } },
108
+ { id: 'depot', header: 'Depot', filter: { type: 'select', quick: true }, edit: { type: 'select', options: depots } },
105
109
  { id: 'active', header: 'Active', filter: 'toggle', edit: 'checkbox', cell: (row) => <StatusBadge on={row.active} /> },
106
110
  { id: 'hired', header: 'Hired', filter: 'dateRange' },
107
111
  { id: 'notes', header: 'Notes', hidden: true }, // searched, not shown
@@ -120,7 +124,9 @@ const columns: DataTableColumn<Driver>[] = [
120
124
  ```
121
125
 
122
126
  A `select` filter collects its options from the rows unless you pass `options`; a `toggle` keeps truthy
123
- values, or the rows passing its `match`; a `dateRange` includes both of its days. `onRowSave` adds the
127
+ values, or the rows passing its `match`; a `dateRange` includes both of its days. Filters with `quick: true`
128
+ stay in the toolbar at a fixed width; the others open from a "Filters" button and show as removable tags
129
+ once set, so the toolbar never moves. On phones every filter is in a bottom sheet. `onRowSave` adds the
124
130
  edit action and receives the edited row: return a promise to keep the row open while it saves, and reject
125
131
  it to leave the row open for another try.
126
132
 
@@ -182,20 +188,24 @@ const table = useDataTable({ data, columns });
182
188
 
183
189
  <DataTable.Root table={table}>
184
190
  <DataTable.Toolbar>
185
- <DataTable.Search />
186
- <DataTable.Filter id="depot" />
191
+ <DataTable.Controls>
192
+ <DataTable.Search />
193
+ <DataTable.Filters quick />
194
+ <DataTable.FilterPanel />
195
+ <DataTable.ClearFilters keepSpace />
196
+ </DataTable.Controls>
187
197
  <DataTable.Actions>
188
- <DataTable.Summary />
189
198
  <Button onClick={() => exportCsv(table.rows.map(({ row }) => row))}>Export</Button>
190
199
  </DataTable.Actions>
191
200
  </DataTable.Toolbar>
201
+ <DataTable.ActiveFilters />
192
202
  <DataTable.Content density="compact" maxHeight={480} />
193
203
  <DataTable.Pagination />
194
204
  </DataTable.Root>
195
205
  ```
196
206
 
197
- `DataTable.Filters` renders every filter with a clear button, and `useDataTableContext()` gives your own
198
- components the same table.
207
+ `DataTable.Filters` renders every filter (`quick` picks the quick ones or the others), `DataTable.Filter` a
208
+ single one, and `useDataTableContext()` gives your own components the same table.
199
209
 
200
210
  `FileUpload` collects `File` objects and leaves the upload to you; report its progress per file through
201
211
  `fileState`. Components with built-in text (`DataTable`, `Pagination`, `DatePicker`, `DateRangePicker`,
@@ -266,7 +276,7 @@ Start with the simplest option that does what you need:
266
276
 
267
277
  2. **Scoped themes.** `<ThemeProvider theme={{ 'color-accent': '#1f8fd6' }} mode="dark">` applies tokens to a
268
278
  subtree. Popups opened inside are portalled into the provider, so they inherit the same theme. For
269
- dark mode across the whole app, set `data-oui-theme="dark"` on `<html>`.
279
+ dark mode across the whole app, set `data-oui-theme="dark"` on `<html>`, or `"system"` to follow the OS.
270
280
  3. **Component variables.** Use these per instance or globally, e.g. `--oui-button-radius`,
271
281
  `--oui-button-height`, `--oui-input-height`, `--oui-card-padding`, `--oui-card-radius`,
272
282
  `--oui-dialog-width`, `--oui-navbar-width`, `--oui-navbar-collapsed-width`, `--oui-switch-width`, `--oui-progress-height`.
@@ -15,8 +15,11 @@ export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
15
15
  actions?: React.ReactNode;
16
16
  /** Shows a dismiss button. */
17
17
  onDismiss?: () => void;
18
- /** Accessible name of the dismiss button. */
18
+ /**
19
+ * Accessible name of the dismiss button. Set app-wide with `LabelsProvider` (`dismiss`).
20
+ * @default 'Dismiss'
21
+ */
19
22
  dismissLabel?: string;
20
23
  }
21
24
  /** Inline message for page- or section-level feedback. */
22
- export declare function Alert({ tone, variant, title, icon, actions, onDismiss, dismissLabel, className, children, ref, ...props }: AlertProps): React.JSX.Element;
25
+ export declare function Alert({ tone, variant, title, icon, actions, onDismiss, dismissLabel: dismissLabelProp, className, children, ref, ...props }: AlertProps): React.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { cx } from "../../utils/cx.js";
3
+ import { useLabels } from "../../labels/Labels.js";
3
4
  import { CircleCheckIcon, CircleXIcon, InfoIcon, TriangleAlertIcon, XIcon } from "../../icons/index.js";
4
5
  import { IconButton } from "../button/Button.js";
5
6
  import { c } from "react/compiler-runtime";
@@ -19,107 +20,108 @@ function Alert(t0) {
19
20
  let actions;
20
21
  let children;
21
22
  let className;
23
+ let dismissLabelProp;
22
24
  let icon;
23
25
  let onDismiss;
24
26
  let props;
25
27
  let ref;
26
28
  let t1;
27
29
  let t2;
28
- let t3;
29
30
  let title;
30
31
  if ($[0] !== t0) {
31
- ({tone: t1, variant: t2, title, icon, actions, onDismiss, dismissLabel: t3, className, children, ref, ...props} = t0);
32
+ ({tone: t1, variant: t2, title, icon, actions, onDismiss, dismissLabel: dismissLabelProp, className, children, ref, ...props} = t0);
32
33
  $[0] = t0;
33
34
  $[1] = actions;
34
35
  $[2] = children;
35
36
  $[3] = className;
36
- $[4] = icon;
37
- $[5] = onDismiss;
38
- $[6] = props;
39
- $[7] = ref;
40
- $[8] = t1;
41
- $[9] = t2;
42
- $[10] = t3;
37
+ $[4] = dismissLabelProp;
38
+ $[5] = icon;
39
+ $[6] = onDismiss;
40
+ $[7] = props;
41
+ $[8] = ref;
42
+ $[9] = t1;
43
+ $[10] = t2;
43
44
  $[11] = title;
44
45
  } else {
45
46
  actions = $[1];
46
47
  children = $[2];
47
48
  className = $[3];
48
- icon = $[4];
49
- onDismiss = $[5];
50
- props = $[6];
51
- ref = $[7];
52
- t1 = $[8];
53
- t2 = $[9];
54
- t3 = $[10];
49
+ dismissLabelProp = $[4];
50
+ icon = $[5];
51
+ onDismiss = $[6];
52
+ props = $[7];
53
+ ref = $[8];
54
+ t1 = $[9];
55
+ t2 = $[10];
55
56
  title = $[11];
56
57
  }
57
58
  const tone = t1 === void 0 ? "info" : t1;
58
59
  const variant = t2 === void 0 ? "soft" : t2;
59
- const dismissLabel = t3 === void 0 ? "Dismiss" : t3;
60
+ const text = useLabels();
61
+ const dismissLabel = dismissLabelProp ?? text.dismiss;
60
62
  const urgent = tone === "danger" || tone === "warning";
61
63
  const iconNode = icon === false ? null : icon ?? defaultIcons[tone];
62
- const t4 = urgent ? "alert" : "status";
63
- let t5;
64
+ const t3 = urgent ? "alert" : "status";
65
+ let t4;
64
66
  if ($[12] !== className) {
65
- t5 = cx("oui-alert", className);
67
+ t4 = cx("oui-alert", className);
66
68
  $[12] = className;
67
- $[13] = t5;
68
- } else t5 = $[13];
69
- let t6;
69
+ $[13] = t4;
70
+ } else t4 = $[13];
71
+ let t5;
70
72
  if ($[14] !== iconNode) {
71
- t6 = iconNode && /* @__PURE__ */ jsx("span", {
73
+ t5 = iconNode && /* @__PURE__ */ jsx("span", {
72
74
  className: "oui-alert__icon",
73
75
  children: iconNode
74
76
  });
75
77
  $[14] = iconNode;
76
- $[15] = t6;
77
- } else t6 = $[15];
78
- let t7;
78
+ $[15] = t5;
79
+ } else t5 = $[15];
80
+ let t6;
79
81
  if ($[16] !== title) {
80
- t7 = title && /* @__PURE__ */ jsx("p", {
82
+ t6 = title && /* @__PURE__ */ jsx("p", {
81
83
  className: "oui-alert__title",
82
84
  children: title
83
85
  });
84
86
  $[16] = title;
85
- $[17] = t7;
86
- } else t7 = $[17];
87
- let t8;
87
+ $[17] = t6;
88
+ } else t6 = $[17];
89
+ let t7;
88
90
  if ($[18] !== children) {
89
- t8 = children && /* @__PURE__ */ jsx("div", {
91
+ t7 = children && /* @__PURE__ */ jsx("div", {
90
92
  className: "oui-alert__message",
91
93
  children
92
94
  });
93
95
  $[18] = children;
94
- $[19] = t8;
95
- } else t8 = $[19];
96
- let t9;
96
+ $[19] = t7;
97
+ } else t7 = $[19];
98
+ let t8;
97
99
  if ($[20] !== actions) {
98
- t9 = actions && /* @__PURE__ */ jsx("div", {
100
+ t8 = actions && /* @__PURE__ */ jsx("div", {
99
101
  className: "oui-alert__actions",
100
102
  children: actions
101
103
  });
102
104
  $[20] = actions;
103
- $[21] = t9;
104
- } else t9 = $[21];
105
- let t10;
106
- if ($[22] !== t7 || $[23] !== t8 || $[24] !== t9) {
107
- t10 = /* @__PURE__ */ jsxs("div", {
105
+ $[21] = t8;
106
+ } else t8 = $[21];
107
+ let t9;
108
+ if ($[22] !== t6 || $[23] !== t7 || $[24] !== t8) {
109
+ t9 = /* @__PURE__ */ jsxs("div", {
108
110
  className: "oui-alert__body",
109
111
  children: [
112
+ t6,
110
113
  t7,
111
- t8,
112
- t9
114
+ t8
113
115
  ]
114
116
  });
115
- $[22] = t7;
116
- $[23] = t8;
117
- $[24] = t9;
118
- $[25] = t10;
119
- } else t10 = $[25];
120
- let t11;
117
+ $[22] = t6;
118
+ $[23] = t7;
119
+ $[24] = t8;
120
+ $[25] = t9;
121
+ } else t9 = $[25];
122
+ let t10;
121
123
  if ($[26] !== dismissLabel || $[27] !== onDismiss) {
122
- t11 = onDismiss && /* @__PURE__ */ jsx(IconButton, {
124
+ t10 = onDismiss && /* @__PURE__ */ jsx(IconButton, {
123
125
  className: "oui-alert__dismiss",
124
126
  size: "sm",
125
127
  "aria-label": dismissLabel,
@@ -128,35 +130,35 @@ function Alert(t0) {
128
130
  });
129
131
  $[26] = dismissLabel;
130
132
  $[27] = onDismiss;
131
- $[28] = t11;
132
- } else t11 = $[28];
133
- let t12;
134
- if ($[29] !== props || $[30] !== ref || $[31] !== t10 || $[32] !== t11 || $[33] !== t4 || $[34] !== t5 || $[35] !== t6 || $[36] !== tone || $[37] !== variant) {
135
- t12 = /* @__PURE__ */ jsxs("div", {
133
+ $[28] = t10;
134
+ } else t10 = $[28];
135
+ let t11;
136
+ if ($[29] !== props || $[30] !== ref || $[31] !== t10 || $[32] !== t3 || $[33] !== t4 || $[34] !== t5 || $[35] !== t9 || $[36] !== tone || $[37] !== variant) {
137
+ t11 = /* @__PURE__ */ jsxs("div", {
136
138
  ref,
137
- role: t4,
138
- className: t5,
139
+ role: t3,
140
+ className: t4,
139
141
  "data-tone": tone,
140
142
  "data-variant": variant,
141
143
  ...props,
142
144
  children: [
143
- t6,
144
- t10,
145
- t11
145
+ t5,
146
+ t9,
147
+ t10
146
148
  ]
147
149
  });
148
150
  $[29] = props;
149
151
  $[30] = ref;
150
152
  $[31] = t10;
151
- $[32] = t11;
153
+ $[32] = t3;
152
154
  $[33] = t4;
153
155
  $[34] = t5;
154
- $[35] = t6;
156
+ $[35] = t9;
155
157
  $[36] = tone;
156
158
  $[37] = variant;
157
- $[38] = t12;
158
- } else t12 = $[38];
159
- return t12;
159
+ $[38] = t11;
160
+ } else t11 = $[38];
161
+ return t11;
160
162
  }
161
163
  //#endregion
162
164
  export { Alert };
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","names":["React","cx","CircleCheckIcon","CircleXIcon","InfoIcon","TriangleAlertIcon","XIcon","IconButton","AlertTone","AlertProps","Omit","HTMLAttributes","HTMLDivElement","ref","Ref","tone","variant","title","ReactNode","icon","actions","onDismiss","dismissLabel","defaultIcons","Record","info","neutral","success","warning","danger","Alert","t0","$","_c","children","className","props","t1","t2","t3","undefined","urgent","iconNode","t4","t5","t6","t7","t8","t9","t10","t11","t12","_c"],"sources":["../../../src/components/alert/Alert.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { CircleCheckIcon, CircleXIcon, InfoIcon, TriangleAlertIcon, XIcon } from '../../icons';\nimport { IconButton } from '../button/Button';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';\n\nexport interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Ref to the alert element. */\n ref?: React.Ref<HTMLDivElement>;\n /** Semantic color and default icon. `danger` and `warning` announce as an alert role. */\n tone?: AlertTone;\n /** `soft` (tinted, default) or `outline`. */\n variant?: 'soft' | 'outline';\n /** Bold first line above the message. */\n title?: React.ReactNode;\n /** Custom icon, or `false` to hide it. */\n icon?: React.ReactNode | false;\n /** Buttons rendered after the message. */\n actions?: React.ReactNode;\n /** Shows a dismiss button. */\n onDismiss?: () => void;\n /** Accessible name of the dismiss button. */\n dismissLabel?: string;\n}\n\nconst defaultIcons: Record<AlertTone, React.ReactNode> = {\n info: <InfoIcon />,\n neutral: <InfoIcon />,\n success: <CircleCheckIcon />,\n warning: <TriangleAlertIcon />,\n danger: <CircleXIcon />,\n};\n\n/** Inline message for page- or section-level feedback. */\nexport function Alert({\n tone = 'info',\n variant = 'soft',\n title,\n icon,\n actions,\n onDismiss,\n dismissLabel = 'Dismiss',\n className,\n children,\n ref,\n ...props\n}: AlertProps) {\n const urgent = tone === 'danger' || tone === 'warning';\n const iconNode = icon === false ? null : (icon ?? defaultIcons[tone]);\n return (\n <div\n ref={ref}\n role={urgent ? 'alert' : 'status'}\n className={cx('oui-alert', className)}\n data-tone={tone}\n data-variant={variant}\n {...props}\n >\n {iconNode && <span className=\"oui-alert__icon\">{iconNode}</span>}\n <div className=\"oui-alert__body\">\n {title && <p className=\"oui-alert__title\">{title}</p>}\n {children && <div className=\"oui-alert__message\">{children}</div>}\n {actions && <div className=\"oui-alert__actions\">{actions}</div>}\n </div>\n {onDismiss && (\n <IconButton className=\"oui-alert__dismiss\" size=\"sm\" aria-label={dismissLabel} onClick={onDismiss}>\n <XIcon />\n </IconButton>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AA0BA,IAAMuB,eAAmD;CACvDE,MAAM,oBAAC,UAAD,CAAS,CAAA;CACfC,SAAS,oBAAC,UAAD,CAAS,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,MAAAjB,EAAA;CAAA,IAAAkB;CAAA,IAAAlB,EAAA,QAAAV,gBAAAU,EAAA,QAAAX,WAAA;EACL6B,MAAA7B,aACC,oBAAC,YAAD;GAAsB,WAAA;GAA0B,MAAA;GAAiBC,cAAAA;GAAuBD,SAAAA;GACtF,UAAA,oBAAC,OAAD,CAAM,CAAA;EADG,CAAA;EAGZW,EAAA,MAAAV;EAAAU,EAAA,MAAAX;EAAAW,EAAA,MAAAkB;CAAA,OAAAA,MAAAlB,EAAA;CAAA,IAAAmB;CAAA,IAAAnB,EAAA,QAAAI,SAAAJ,EAAA,QAAAnB,OAAAmB,EAAA,QAAAiB,OAAAjB,EAAA,QAAAkB,OAAAlB,EAAA,QAAAW,MAAAX,EAAA,QAAAY,MAAAZ,EAAA,QAAAa,MAAAb,EAAA,QAAAjB,QAAAiB,EAAA,QAAAhB,SAAA;EAlBHmC,MAAA,qBAAA,OAAA;GACOtC;GACC,MAAA8B;GACK,WAAAC;GACA7B,aAAAA;GACGC,gBAAAA;GAAO,GACjBoB;GANN,UAAA;IAQGS;IACDI;IAKCC;GAKG;;EAAAlB,EAAA,MAAAI;EAAAJ,EAAA,MAAAnB;EAAAmB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;EAAAb,EAAA,MAAAjB;EAAAiB,EAAA,MAAAhB;EAAAgB,EAAA,MAAAmB;CAAA,OAAAA,MAAAnB,EAAA;CAAA,OAnBNmB;AAmBM"}
1
+ {"version":3,"file":"Alert.js","names":["React","cx","CircleCheckIcon","CircleXIcon","InfoIcon","TriangleAlertIcon","XIcon","IconButton","useLabels","AlertTone","AlertProps","Omit","HTMLAttributes","HTMLDivElement","ref","Ref","tone","variant","title","ReactNode","icon","actions","onDismiss","dismissLabel","defaultIcons","Record","info","neutral","success","warning","danger","Alert","t0","$","_c","children","className","dismissLabelProp","props","t1","t2","undefined","text","dismiss","urgent","iconNode","t3","t4","t5","t6","t7","t8","t9","t10","t11","_c"],"sources":["../../../src/components/alert/Alert.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { CircleCheckIcon, CircleXIcon, InfoIcon, TriangleAlertIcon, XIcon } from '../../icons';\nimport { IconButton } from '../button/Button';\nimport { useLabels } from '../../labels/Labels';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';\n\nexport interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Ref to the alert element. */\n ref?: React.Ref<HTMLDivElement>;\n /** Semantic color and default icon. `danger` and `warning` announce as an alert role. */\n tone?: AlertTone;\n /** `soft` (tinted, default) or `outline`. */\n variant?: 'soft' | 'outline';\n /** Bold first line above the message. */\n title?: React.ReactNode;\n /** Custom icon, or `false` to hide it. */\n icon?: React.ReactNode | false;\n /** Buttons rendered after the message. */\n actions?: React.ReactNode;\n /** Shows a dismiss button. */\n onDismiss?: () => void;\n /**\n * Accessible name of the dismiss button. Set app-wide with `LabelsProvider` (`dismiss`).\n * @default 'Dismiss'\n */\n dismissLabel?: string;\n}\n\nconst defaultIcons: Record<AlertTone, React.ReactNode> = {\n info: <InfoIcon />,\n neutral: <InfoIcon />,\n success: <CircleCheckIcon />,\n warning: <TriangleAlertIcon />,\n danger: <CircleXIcon />,\n};\n\n/** Inline message for page- or section-level feedback. */\nexport function Alert({\n tone = 'info',\n variant = 'soft',\n title,\n icon,\n actions,\n onDismiss,\n dismissLabel: dismissLabelProp,\n className,\n children,\n ref,\n ...props\n}: AlertProps) {\n const text = useLabels();\n const dismissLabel = dismissLabelProp ?? text.dismiss;\n const urgent = tone === 'danger' || tone === 'warning';\n const iconNode = icon === false ? null : (icon ?? defaultIcons[tone]);\n return (\n <div\n ref={ref}\n role={urgent ? 'alert' : 'status'}\n className={cx('oui-alert', className)}\n data-tone={tone}\n data-variant={variant}\n {...props}\n >\n {iconNode && <span className=\"oui-alert__icon\">{iconNode}</span>}\n <div className=\"oui-alert__body\">\n {title && <p className=\"oui-alert__title\">{title}</p>}\n {children && <div className=\"oui-alert__message\">{children}</div>}\n {actions && <div className=\"oui-alert__actions\">{actions}</div>}\n </div>\n {onDismiss && (\n <IconButton className=\"oui-alert__dismiss\" size=\"sm\" aria-label={dismissLabel} onClick={onDismiss}>\n <XIcon />\n </IconButton>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AA8BA,IAAMwB,eAAmD;CACvDE,MAAM,oBAAC,UAAD,CAAS,CAAA;CACfC,SAAS,oBAAC,UAAD,CAAS,CAAA;CAClBC,SAAS,oBAAC,iBAAD,CAAgB,CAAA;CACzBC,SAAS,oBAAC,mBAAD,CAAkB,CAAA;CAC3BC,QAAQ,oBAAC,aAAD,CAAY,CAAA;AACtB;;AAGA,SAAOC,MAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAb;CAAA,IAAAc;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAjB;CAAA,IAAAE;CAAA,IAAAgB;CAAA,IAAAxB;CAAA,IAAAyB;CAAA,IAAAC;CAAA,IAAAtB;CAAA,IAAAe,EAAA,OAAAD,IAAA;EAAe,CAAA,CAAAhB,MAAAuB,IAAAtB,SAAAuB,IAAAtB,OAAAE,MAAAC,SAAAC,WAAAC,cAAAc,kBAAAD,WAAAD,UAAArB,KAAA,GAAAwB,SAAAN;EAYTC,EAAA,KAAAD;EAAAC,EAAA,KAAAZ;EAAAY,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAb;EAAAa,EAAA,KAAAX;EAAAW,EAAA,KAAAK;EAAAL,EAAA,KAAAnB;EAAAmB,EAAA,KAAAM;EAAAN,EAAA,MAAAO;EAAAP,EAAA,MAAAf;CAAA,OAAA;EAAAG,UAAAY,EAAA;EAAAE,WAAAF,EAAA;EAAAG,YAAAH,EAAA;EAAAI,mBAAAJ,EAAA;EAAAb,OAA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,EAAA,MAAAjB;EAAAiB,EAAA,MAAAhB;EAAAgB,EAAA,MAAAqB;CAAA,OAAAA,MAAArB,EAAA;CAAA,OAnBNqB;AAmBM"}
@@ -19,16 +19,22 @@ export interface NavbarProps extends useRender.ComponentProps<'nav', NavbarState
19
19
  onCollapsedChange?: (collapsed: boolean) => void;
20
20
  /** Temporarily opens a collapsed navbar while the mouse is over it. Defaults to `true`. */
21
21
  expandOnHover?: boolean;
22
- /** Accessible names for the icon-only toggle. */
22
+ /**
23
+ * Accessible names for the icon-only toggle. Set app-wide with `LabelsProvider` (`collapseNavbar`).
24
+ * @default 'Collapse'
25
+ */
23
26
  collapseLabel?: string;
24
- /** Accessible name of the toggle while collapsed. */
27
+ /**
28
+ * Accessible name of the toggle while collapsed. Set app-wide with `LabelsProvider` (`expandNavbar`).
29
+ * @default 'Expand'
30
+ */
25
31
  expandLabel?: string;
26
32
  }
27
33
  /**
28
34
  * Collapsible side navigation. Use inside `AppShell`. Compose with `NavbarHeader` (`NavbarBrand`),
29
35
  * `NavbarSection` (`NavbarSectionLabel`, `NavbarItem`) and `NavbarFooter`.
30
36
  */
31
- export declare function Navbar({ variant, collapsible, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, expandOnHover, collapseLabel, expandLabel, render, children, ref, ...props }: NavbarProps): React.JSX.Element;
37
+ export declare function Navbar({ variant, collapsible, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, expandOnHover, collapseLabel: collapseLabelProp, expandLabel: expandLabelProp, render, children, ref, ...props }: NavbarProps): React.JSX.Element;
32
38
  export declare const NavbarHeader: {
33
39
  (props: import("../../utils/primitive").PrimitiveProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
34
40
  displayName: string;
@@ -129,9 +135,15 @@ export interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {
129
135
  * button is shown instead.
130
136
  */
131
137
  mobileNavPosition?: MobileNavPosition;
132
- /** Accessible name of the button that opens the navigation drawer on small screens. */
138
+ /**
139
+ * Accessible name of the button that opens the navigation drawer on small screens. Set app-wide with `LabelsProvider` (`openNavigation`).
140
+ * @default 'Open navigation'
141
+ */
133
142
  menuLabel?: string;
134
- /** Label of the tab-bar slot that opens the navigation drawer. */
143
+ /**
144
+ * Label of the tab-bar slot that opens the navigation drawer. Set app-wide with `LabelsProvider` (`more`).
145
+ * @default 'More'
146
+ */
135
147
  moreLabel?: string;
136
148
  /** Whether the "More" slot comes before or after the pinned items in the tab bar. */
137
149
  moreTabPosition?: MoreTabPosition;
@@ -159,7 +171,7 @@ export interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {
159
171
  * <PageHeader title="Overview" />
160
172
  * </AppShell>
161
173
  */
162
- export declare function AppShell({ navbar, mobileBrand, mobileActions, mobileNavPosition, menuLabel, moreLabel, moreTabPosition, mainProps, className, children, ref, ...props }: AppShellProps): React.JSX.Element;
174
+ export declare function AppShell({ navbar, mobileBrand, mobileActions, mobileNavPosition, menuLabel: menuLabelProp, moreLabel: moreLabelProp, moreTabPosition, mainProps, className, children, ref, ...props }: AppShellProps): React.JSX.Element;
163
175
  export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
164
176
  /** Ref to the `<header>` element. */
165
177
  ref?: React.Ref<HTMLElement>;
@@ -171,7 +183,7 @@ export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>,
171
183
  title: React.ReactNode;
172
184
  /** Supporting text under the title. */
173
185
  description?: React.ReactNode;
174
- /** Buttons or controls aligned to the right of the title. */
186
+ /** Buttons or controls on the title's row, at the right; they wrap below the title when the row is too narrow. */
175
187
  actions?: React.ReactNode;
176
188
  }
177
189
  /** Page title block with optional breadcrumbs, eyebrow, description and actions. */