@optimum-intelligence/opti-ui 0.7.5 → 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.
- package/CHANGELOG.md +77 -0
- package/README.md +24 -11
- package/dist/components/alert/Alert.d.ts +5 -2
- package/dist/components/alert/Alert.js +67 -65
- package/dist/components/alert/Alert.js.map +1 -1
- package/dist/components/app-shell/AppShell.d.ts +19 -7
- package/dist/components/app-shell/AppShell.js +329 -303
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/calendar/Calendar.js +140 -136
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/combobox/Combobox.d.ts +8 -2
- package/dist/components/combobox/Combobox.js +182 -202
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +23 -11
- package/dist/components/data-table/DataTable.js +148 -88
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.js +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +56 -4
- package/dist/components/data-table/DataTableFilters.js +492 -77
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/types.d.ts +13 -2
- package/dist/components/data-table/useDataTable.d.ts +1 -1
- package/dist/components/data-table/useDataTable.js +251 -229
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +5 -0
- package/dist/components/date-picker/DatePicker.js +148 -140
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/date-picker/DateRangePicker.d.ts +2 -0
- package/dist/components/date-picker/DateRangePicker.js +171 -164
- package/dist/components/date-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-picker/PickerField.d.ts +6 -3
- package/dist/components/date-picker/PickerField.js +166 -159
- package/dist/components/date-picker/PickerField.js.map +1 -1
- package/dist/components/dialog/ConfirmDialog.d.ts +5 -2
- package/dist/components/dialog/ConfirmDialog.js +79 -77
- package/dist/components/dialog/ConfirmDialog.js.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +5 -2
- package/dist/components/dialog/Dialog.js +65 -63
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +13 -4
- package/dist/components/drawer/Drawer.js +122 -164
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/field/Field.d.ts +38 -9
- package/dist/components/field/Field.js +66 -1
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/file-upload/FileUpload.js +2 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -1
- package/dist/components/input/Input.d.ts +9 -16
- package/dist/components/input/Input.js +124 -206
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/map/Map.d.ts +29 -3
- package/dist/components/map/Map.js +332 -160
- package/dist/components/map/Map.js.map +1 -1
- package/dist/components/map/colors.d.ts +2 -2
- package/dist/components/map/colors.js +12 -3
- package/dist/components/map/colors.js.map +1 -1
- package/dist/components/number-field/NumberField.d.ts +12 -3
- package/dist/components/number-field/NumberField.js +109 -130
- package/dist/components/number-field/NumberField.js.map +1 -1
- package/dist/components/pagination/Pagination.js +135 -186
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/search-input/SearchInput.d.ts +5 -2
- package/dist/components/search-input/SearchInput.js +47 -45
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/select/Select.d.ts +13 -3
- package/dist/components/select/Select.js +144 -139
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/spinner/Spinner.d.ts +6 -2
- package/dist/components/spinner/Spinner.js +42 -40
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/stepper/Stepper.js +44 -40
- package/dist/components/stepper/Stepper.js.map +1 -1
- package/dist/components/toast/Toast.d.ts +17 -1
- package/dist/components/toast/Toast.js +65 -33
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components.json +393 -59
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -3
- package/dist/labels/Labels.d.ts +85 -0
- package/dist/labels/Labels.js +92 -0
- package/dist/labels/Labels.js.map +1 -0
- package/dist/llms-full.txt +231 -45
- package/dist/llms.txt +10 -4
- package/dist/opti-ui.css +212 -18
- package/dist/theme/ThemeProvider.d.ts +8 -4
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/utils/media.d.ts +9 -2
- package/dist/utils/media.js +10 -3
- package/dist/utils/media.js.map +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,83 @@
|
|
|
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
|
+
|
|
69
|
+
## 0.7.6 (2026-11-05)
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- `Map.Points`: `labelMinZoom` (default 12). Below it labelled points draw as plain dots and the label layer
|
|
74
|
+
is skipped, so wide views of thousands of numbered stops stay readable and pan smoothly.
|
|
75
|
+
- `Map.Points`: optional `cluster` (`true` or `{ radius, maxZoom }`, off by default) merges nearby points into
|
|
76
|
+
count bubbles that split as you zoom in; clicking one zooms to where it splits. Bubbles never reach
|
|
77
|
+
`onItemClick`/`onItemHover`. New tokens `--oui-map-cluster-color` and `--oui-map-cluster-text-color`.
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- `Map.Points`: labels are hidden below zoom 12 by default. Pass `labelMinZoom={0}` to always show them.
|
|
82
|
+
|
|
6
83
|
## 0.7.5 (2026-11-05)
|
|
7
84
|
|
|
8
85
|
### Fixed
|
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. `
|
|
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.
|
|
186
|
-
|
|
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
|
|
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`,
|
|
@@ -245,7 +255,10 @@ the satellite layer in the showcase is for the demo only. Data parts (`Map.Route
|
|
|
245
255
|
`Map.Points`) take arrays and draw each array as one layer set, so thousands of items are fine; their
|
|
246
256
|
colours follow the `--oui-*` tokens and dark mode. `Map.Points` items with a `label` (such as stop numbers)
|
|
247
257
|
draw it in the point; text needs a style with a `glyphs` URL, which OpenFreeMap styles and `rasterStyle()`
|
|
248
|
-
provide (`rasterStyle` points at OpenFreeMap's font server unless you pass your own `glyphs` URL).
|
|
258
|
+
provide (`rasterStyle` points at OpenFreeMap's font server unless you pass your own `glyphs` URL). Labels
|
|
259
|
+
show from `labelMinZoom` (12 by default); below it the points are plain dots, so wide views stay readable
|
|
260
|
+
and fast. For dense data, `cluster` merges nearby points into count bubbles (`--oui-map-cluster-color`)
|
|
261
|
+
that split as you zoom in or click them.
|
|
249
262
|
|
|
250
263
|
## Customization
|
|
251
264
|
|
|
@@ -263,7 +276,7 @@ Start with the simplest option that does what you need:
|
|
|
263
276
|
|
|
264
277
|
2. **Scoped themes.** `<ThemeProvider theme={{ 'color-accent': '#1f8fd6' }} mode="dark">` applies tokens to a
|
|
265
278
|
subtree. Popups opened inside are portalled into the provider, so they inherit the same theme. For
|
|
266
|
-
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.
|
|
267
280
|
3. **Component variables.** Use these per instance or globally, e.g. `--oui-button-radius`,
|
|
268
281
|
`--oui-button-height`, `--oui-input-height`, `--oui-card-padding`, `--oui-card-radius`,
|
|
269
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
|
-
/**
|
|
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:
|
|
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] =
|
|
37
|
-
$[5] =
|
|
38
|
-
$[6] =
|
|
39
|
-
$[7] =
|
|
40
|
-
$[8] =
|
|
41
|
-
$[9] =
|
|
42
|
-
$[10] =
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
|
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
|
|
63
|
-
let
|
|
64
|
+
const t3 = urgent ? "alert" : "status";
|
|
65
|
+
let t4;
|
|
64
66
|
if ($[12] !== className) {
|
|
65
|
-
|
|
67
|
+
t4 = cx("oui-alert", className);
|
|
66
68
|
$[12] = className;
|
|
67
|
-
$[13] =
|
|
68
|
-
} else
|
|
69
|
-
let
|
|
69
|
+
$[13] = t4;
|
|
70
|
+
} else t4 = $[13];
|
|
71
|
+
let t5;
|
|
70
72
|
if ($[14] !== iconNode) {
|
|
71
|
-
|
|
73
|
+
t5 = iconNode && /* @__PURE__ */ jsx("span", {
|
|
72
74
|
className: "oui-alert__icon",
|
|
73
75
|
children: iconNode
|
|
74
76
|
});
|
|
75
77
|
$[14] = iconNode;
|
|
76
|
-
$[15] =
|
|
77
|
-
} else
|
|
78
|
-
let
|
|
78
|
+
$[15] = t5;
|
|
79
|
+
} else t5 = $[15];
|
|
80
|
+
let t6;
|
|
79
81
|
if ($[16] !== title) {
|
|
80
|
-
|
|
82
|
+
t6 = title && /* @__PURE__ */ jsx("p", {
|
|
81
83
|
className: "oui-alert__title",
|
|
82
84
|
children: title
|
|
83
85
|
});
|
|
84
86
|
$[16] = title;
|
|
85
|
-
$[17] =
|
|
86
|
-
} else
|
|
87
|
-
let
|
|
87
|
+
$[17] = t6;
|
|
88
|
+
} else t6 = $[17];
|
|
89
|
+
let t7;
|
|
88
90
|
if ($[18] !== children) {
|
|
89
|
-
|
|
91
|
+
t7 = children && /* @__PURE__ */ jsx("div", {
|
|
90
92
|
className: "oui-alert__message",
|
|
91
93
|
children
|
|
92
94
|
});
|
|
93
95
|
$[18] = children;
|
|
94
|
-
$[19] =
|
|
95
|
-
} else
|
|
96
|
-
let
|
|
96
|
+
$[19] = t7;
|
|
97
|
+
} else t7 = $[19];
|
|
98
|
+
let t8;
|
|
97
99
|
if ($[20] !== actions) {
|
|
98
|
-
|
|
100
|
+
t8 = actions && /* @__PURE__ */ jsx("div", {
|
|
99
101
|
className: "oui-alert__actions",
|
|
100
102
|
children: actions
|
|
101
103
|
});
|
|
102
104
|
$[20] = actions;
|
|
103
|
-
$[21] =
|
|
104
|
-
} else
|
|
105
|
-
let
|
|
106
|
-
if ($[22] !==
|
|
107
|
-
|
|
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] =
|
|
116
|
-
$[23] =
|
|
117
|
-
$[24] =
|
|
118
|
-
$[25] =
|
|
119
|
-
} else
|
|
120
|
-
let
|
|
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
|
-
|
|
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] =
|
|
132
|
-
} else
|
|
133
|
-
let
|
|
134
|
-
if ($[29] !== props || $[30] !== ref || $[31] !== t10 || $[32] !==
|
|
135
|
-
|
|
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:
|
|
138
|
-
className:
|
|
139
|
+
role: t3,
|
|
140
|
+
className: t4,
|
|
139
141
|
"data-tone": tone,
|
|
140
142
|
"data-variant": variant,
|
|
141
143
|
...props,
|
|
142
144
|
children: [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
t5,
|
|
146
|
+
t9,
|
|
147
|
+
t10
|
|
146
148
|
]
|
|
147
149
|
});
|
|
148
150
|
$[29] = props;
|
|
149
151
|
$[30] = ref;
|
|
150
152
|
$[31] = t10;
|
|
151
|
-
$[32] =
|
|
153
|
+
$[32] = t3;
|
|
152
154
|
$[33] = t4;
|
|
153
155
|
$[34] = t5;
|
|
154
|
-
$[35] =
|
|
156
|
+
$[35] = t9;
|
|
155
157
|
$[36] = tone;
|
|
156
158
|
$[37] = variant;
|
|
157
|
-
$[38] =
|
|
158
|
-
} else
|
|
159
|
-
return
|
|
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","
|
|
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,OAAAa,EAAA;EAAAX,YAAAW,EAAA;EAAAK,QAAAL,EAAA;EAAAnB,MAAAmB,EAAA;EAAAM,KAAAN,EAAA;EAAAO,KAAAP,EAAA;EAAAf,QAAAe,EAAA;CAAA;CAXX,MAAAjB,OAAAuB,OAAAE,KAAAA,IAAA,SAAAF;CACA,MAAAtB,UAAAuB,OAAAC,KAAAA,IAAA,SAAAD;CAWA,MAAAE,OAAalC,UAAU;CACvB,MAAAe,eAAqBc,oBAAoBK,KAAIC;CAC7C,MAAAC,SAAe5B,SAAS,YAAYA,SAAS;CAC7C,MAAA6B,WAAiBzB,SAAS,QAAT,OAAyBA,QAAQI,aAAaR;CAIrD,MAAA8B,KAAAF,SAAA,UAAA;CAA2B,IAAAG;CAAA,IAAAd,EAAA,QAAAG,WAAA;EACtBW,KAAA9C,GAAG,aAAamC,SAAS;EAACH,EAAA,MAAAG;EAAAH,EAAA,MAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,QAAAY,UAAA;EAKpCG,KAAAH,YAAY,oBAAA,QAAA;GAAgB,WAAA;GAAmBA,UAAAA;EAAgB,CAAA;EAAAZ,EAAA,MAAAY;EAAAZ,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,QAAAf,OAAA;EAE7D+B,KAAA/B,SAAS,oBAAA,KAAA;GAAa,WAAA;GAAoBA,UAAAA;EAAU,CAAA;EAAAe,EAAA,MAAAf;EAAAe,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,IAAAiB;CAAA,IAAAjB,EAAA,QAAAE,UAAA;EACpDe,KAAAf,YAAY,oBAAA,OAAA;GAAe,WAAA;GAAsBA;EAAe,CAAA;EAAAF,EAAA,MAAAE;EAAAF,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,IAAAkB;CAAA,IAAAlB,EAAA,QAAAZ,SAAA;EAChE8B,KAAA9B,WAAW,oBAAA,OAAA;GAAe,WAAA;GAAsBA,UAAAA;EAAc,CAAA;EAAAY,EAAA,MAAAZ;EAAAY,EAAA,MAAAkB;CAAA,OAAAA,KAAAlB,EAAA;CAAA,IAAAmB;CAAA,IAAAnB,EAAA,QAAAgB,MAAAhB,EAAA,QAAAiB,MAAAjB,EAAA,QAAAkB,IAAA;EAHjEC,KAAA,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA;IACGH;IACAC;IACAC;GACG;;EAAAlB,EAAA,MAAAgB;EAAAhB,EAAA,MAAAiB;EAAAjB,EAAA,MAAAkB;EAAAlB,EAAA,MAAAmB;CAAA,OAAAA,KAAAnB,EAAA;CAAA,IAAAoB;CAAA,IAAApB,EAAA,QAAAV,gBAAAU,EAAA,QAAAX,WAAA;EACL+B,MAAA/B,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,MAAAoB;CAAA,OAAAA,MAAApB,EAAA;CAAA,IAAAqB;CAAA,IAAArB,EAAA,QAAAK,SAAAL,EAAA,QAAAnB,OAAAmB,EAAA,QAAAoB,OAAApB,EAAA,QAAAa,MAAAb,EAAA,QAAAc,MAAAd,EAAA,QAAAe,MAAAf,EAAA,QAAAmB,MAAAnB,EAAA,QAAAjB,QAAAiB,EAAA,QAAAhB,SAAA;EAlBHqC,MAAA,qBAAA,OAAA;GACOxC;GACC,MAAAgC;GACK,WAAAC;GACA/B,aAAAA;GACGC,gBAAAA;GAAO,GACjBqB;GANN,UAAA;IAQGU;IACDI;IAKCC;GAKG;;EAAApB,EAAA,MAAAK;EAAAL,EAAA,MAAAnB;EAAAmB,EAAA,MAAAoB;EAAApB,EAAA,MAAAa;EAAAb,EAAA,MAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAmB;EAAAnB,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
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Accessible names for the icon-only toggle. Set app-wide with `LabelsProvider` (`collapseNavbar`).
|
|
24
|
+
* @default 'Collapse'
|
|
25
|
+
*/
|
|
23
26
|
collapseLabel?: string;
|
|
24
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
|
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. */
|