@optimum-intelligence/opti-ui 0.7.6 → 0.8.1
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 +121 -0
- package/README.md +20 -10
- 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 +25 -8
- package/dist/components/app-shell/AppShell.js +428 -397
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +6 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +42 -40
- package/dist/components/breadcrumbs/Breadcrumbs.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 +9 -3
- package/dist/components/combobox/Combobox.js +220 -231
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +13 -4
- package/dist/components/command-palette/CommandPalette.js +91 -89
- package/dist/components/command-palette/CommandPalette.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +51 -17
- package/dist/components/data-table/DataTable.js +489 -278
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +7 -1
- package/dist/components/data-table/DataTableContent.js +247 -211
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +56 -4
- package/dist/components/data-table/DataTableFilters.js +493 -77
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/layout.d.ts +5 -0
- package/dist/components/data-table/layout.js +23 -1
- package/dist/components/data-table/layout.js.map +1 -1
- package/dist/components/data-table/types.d.ts +35 -2
- package/dist/components/data-table/useDataTable.d.ts +1 -1
- package/dist/components/data-table/useDataTable.js +386 -332
- 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/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/progress/Progress.d.ts +2 -1
- package/dist/components/progress/Progress.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/stat-card/StatCard.d.ts +7 -2
- package/dist/components/stat-card/StatCard.js +1 -1
- package/dist/components/stat-card/StatCard.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 +475 -68
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +12 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -4
- package/dist/labels/Labels.d.ts +93 -0
- package/dist/labels/Labels.js +96 -0
- package/dist/labels/Labels.js.map +1 -0
- package/dist/labels/hu.d.ts +17 -0
- package/dist/labels/hu.js +124 -0
- package/dist/labels/hu.js.map +1 -0
- package/dist/llms-full.txt +274 -48
- package/dist/llms.txt +11 -4
- package/dist/opti-ui.css +370 -47
- 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/dist/llms.txt
CHANGED
|
@@ -38,9 +38,12 @@ so the components work in Next.js App Router.
|
|
|
38
38
|
## Theme
|
|
39
39
|
|
|
40
40
|
- `createTheme` — Builds a theme from a base, applying overrides on top.
|
|
41
|
+
- `huLabels` — Hungarian texts for every built-in label of the library, in the formal register (magázás). Pass it to `LabelsProvider` once at the app root; spread it to change single texts. Dates also need `locale="hu"` (or `DateConfigProvider`) for month and weekday names. Map texts are separate: see `MapLabels`.
|
|
42
|
+
- `LabelsProvider` — Replaces the library's built-in English texts (button names, placeholders, table and calendar texts) for everything inside it, so an app translates them once instead of per component.
|
|
41
43
|
- `seriesColor` — Colour for the `index`-th data series: `var(--oui-color-chart-N)`, cycling through the eight chart tokens. Use it for chart series, legend swatches and map routes so the same index gets the same hue everywhere, in light and dark mode.
|
|
42
44
|
- `ThemeProvider` — Scopes a theme to its children. Popups opened inside are portalled into the provider so they pick up the same tokens.
|
|
43
45
|
- `themeToStyle` — Converts a theme object into CSS custom properties for a `style` prop.
|
|
46
|
+
- `useLabels` — The texts from the nearest `LabelsProvider`, with English defaults for the rest.
|
|
44
47
|
|
|
45
48
|
## Forms
|
|
46
49
|
|
|
@@ -60,6 +63,7 @@ so the components work in Next.js App Router.
|
|
|
60
63
|
- `Form` — Form with Base UI validation wiring and vertical field spacing.
|
|
61
64
|
- `formatDate` — Formats a date or date-time the way the date pickers show it: ISO-style (`2026-03-09 14:30`) on a 24-hour clock by default, or with a custom `format`. Instants (`"2026-03-09T13:30:00Z"`) are shown in `timeZone`. Returns `""` for an invalid value.
|
|
62
65
|
- `formatFileSize` — `1536` → `"1.5 KB"`.
|
|
66
|
+
- `FormField` — Label, control, description and error in one: the shell every labelled control (`TextField`, `Select`, `Combobox`, `NumberField`) is built on. Use it to give your own control the same layout and wiring.
|
|
63
67
|
- `Input` — Text input, optionally with `startAdornment` / `endAdornment` inside the box. Use `TextField` for a labelled one.
|
|
64
68
|
- `NumberField` — Numeric input with stepper buttons, locale formatting and keyboard stepping.
|
|
65
69
|
- `PasswordField` — Labelled password input with description and error message.
|
|
@@ -129,9 +133,9 @@ so the components work in Next.js App Router.
|
|
|
129
133
|
- `Drawer` — Side panel for inspecting or editing a record without leaving the page: pinned header, scrolling body, optional pinned footer. `side="bottom"` makes it a bottom sheet, for filters and actions on phones. For a free-form sheet use `Dialog.Content` with `placement`.
|
|
130
134
|
- `Popover` — Floating panel anchored to a trigger, for small forms, filters and details. (parts: Root, Trigger, Content, Title, Description, Close)
|
|
131
135
|
- `PreviewCard` — Card that appears when a link is hovered or focused, previewing what is behind it. `PreviewCard.Trigger` is the link itself. Keep the content supplementary: touch users never see it. (parts: Root, Trigger, Content)
|
|
132
|
-
- `ToastProvider` — Mount once near the app root. Then call `useToast()` anywhere below, or pass a `toastManager` from `createToastManager()` to trigger toasts outside React.
|
|
136
|
+
- `ToastProvider` — Mount once near the app root. Then call `useToast()` anywhere below, or pass a `toastManager` from `createToastManager()` to trigger toasts outside React. Bottom toasts sit `--oui-toast-offset-bottom` above the screen edge; AppShell sets it for its mobile tab bar.
|
|
133
137
|
- `Tooltip` — `<Tooltip content="Export"><IconButton … /></Tooltip>`. Wrap the app in `Tooltip.Provider` so adjacent tooltips open instantly. (parts: Provider, Root, Trigger, Content)
|
|
134
|
-
- `useToast` — Toast API with tone shortcuts: `toast.success({ title })`.
|
|
138
|
+
- `useToast` — Toast API with tone shortcuts: `toast.success({ title })`. `data` takes a custom `icon` and `content` (`ToastData`), and `toast.promise()` shows a loading toast that turns into success or error.
|
|
135
139
|
|
|
136
140
|
## Disclosure & navigation
|
|
137
141
|
|
|
@@ -150,7 +154,7 @@ so the components work in Next.js App Router.
|
|
|
150
154
|
- `Avatar` — User or entity picture with initials fallback.
|
|
151
155
|
- `AvatarGroup` — Overlapping row of `Avatar` children, with an optional "+N" overflow counter.
|
|
152
156
|
- `Badge` — Small status label.
|
|
153
|
-
- `DataTable` — `<DataTable data={…} columns={…} />` renders a complete table with search, filters, sorting, pagination, row selection, row actions and inline editing; columns declare what they take part in. Every piece of state works uncontrolled or controlled (`search` / `filterValues` / `sort` / `page` / `selection`), and with `mode="server"` the same state drives an API. (parts: Root, Toolbar, Controls, Search, Filters, Filter, FilterSheet, Actions, Summary, Content, Pagination)
|
|
157
|
+
- `DataTable` — `<DataTable data={…} columns={…} />` renders a complete table with search, filters, sorting, pagination, row selection, row actions and inline editing; columns declare what they take part in. Every piece of state works uncontrolled or controlled (`search` / `filterValues` / `sort` / `page` / `selection`), and with `mode="server"` the same state drives an API. (parts: Root, Toolbar, Controls, Search, Filters, Filter, FilterSheet, FilterPanel, ActiveFilters, Actions, ClearFilters, ColumnsMenu, Loading, Summary, Content, Pagination)
|
|
154
158
|
- `DescriptionItem` — One label and value pair inside a `DescriptionList`.
|
|
155
159
|
- `DescriptionList` — Label and value pairs, such as a record's details. Holds `DescriptionItem`s.
|
|
156
160
|
- `EmptyState` — Placeholder for empty lists, searches without results and first-run screens.
|
|
@@ -176,7 +180,10 @@ so the components work in Next.js App Router.
|
|
|
176
180
|
- `cx` — Joins truthy class names.
|
|
177
181
|
- `Icons` — Small built-in stroke icon set. Every icon renders an `<svg>` that follows the font size and `currentColor`.
|
|
178
182
|
- `matchesQuery` — True when every whitespace-separated term of `query` occurs in `text`. An empty query matches.
|
|
183
|
+
- `NARROW_SCREEN` — Media query for phones, which get their own layout at and below 640px. Pass it to `useMediaQuery`.
|
|
179
184
|
- `normalizeText` — Lower-cases and strips diacritics, so "gyor" matches "Győr".
|
|
185
|
+
- `SHELL_COLLAPSED` — Media query for screens where `AppShell` moves its navbar into a drawer and shows the tab bar (900px and below).
|
|
186
|
+
- `useMediaQuery` — Whether a media query matches, following changes. `false` during server rendering.
|
|
180
187
|
- `usePortalContainer` — Returns the element popups should portal into: the nearest `ThemeProvider`, or `undefined` for the document body. Pass it as `container` when building a custom portalled popup.
|
|
181
188
|
- `withClass` — Prepends a library class to a Base UI `className` prop, preserving the function form so consumers can still derive classes from component state.
|
|
182
189
|
|
|
@@ -184,4 +191,4 @@ so the components work in Next.js App Router.
|
|
|
184
191
|
|
|
185
192
|
- `Map` — Map components on MapLibre, from `@optimum-intelligence/opti-ui/map`. `Map.Root` holds the map; inside it, `Map.Areas`, `Map.Routes` and `Map.Points` draw arrays of items as single GeoJSON layers, `Map.Marker` adds HTML pins, `Map.Popup` and `Map.Tooltip` show content at a position, and `Map.Overlay` floats `Map.Legend`, `Map.BaseLayerSwitch` or cards over a corner. (parts: Root, Routes, Areas, Points, Marker, Popup, Tooltip, Overlay, Legend, BaseLayerSwitch)
|
|
186
193
|
- `rasterStyle` — Builds a MapLibre style from a raster tile URL template (`{z}`, `{x}`, `{y}`), for `MapBaseLayer.style`. The style gets a `glyphs` URL (OpenFreeMap's font server by default) so `Map.Points` labels can render; pass your own `glyphs` URL to use another font server.
|
|
187
|
-
- `useResolvedColors` — Resolves `--oui-*` colour tokens to `rgba()` strings inside `element`, for MapLibre paint properties, which accept no `var()` or `color-mix()`. It re-reads them when `data-oui-theme`, `class` or `style` changes on the element or an ancestor (theme switches, `ThemeProvider`). `Map.Root` calls it for you; use it for your own `Source`/`Layer` children.
|
|
194
|
+
- `useResolvedColors` — Resolves `--oui-*` colour tokens to `rgba()` strings inside `element`, for MapLibre paint properties, which accept no `var()` or `color-mix()`. It re-reads them when `data-oui-theme`, `class` or `style` changes on the element or an ancestor (theme switches, `ThemeProvider`), and when the OS colour scheme changes. `Map.Root` calls it for you; use it for your own `Source`/`Layer` children.
|