@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.
Files changed (109) hide show
  1. package/CHANGELOG.md +121 -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 +25 -8
  7. package/dist/components/app-shell/AppShell.js +428 -397
  8. package/dist/components/app-shell/AppShell.js.map +1 -1
  9. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +6 -1
  10. package/dist/components/breadcrumbs/Breadcrumbs.js +42 -40
  11. package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
  12. package/dist/components/calendar/Calendar.js +140 -136
  13. package/dist/components/calendar/Calendar.js.map +1 -1
  14. package/dist/components/combobox/Combobox.d.ts +9 -3
  15. package/dist/components/combobox/Combobox.js +220 -231
  16. package/dist/components/combobox/Combobox.js.map +1 -1
  17. package/dist/components/command-palette/CommandPalette.d.ts +13 -4
  18. package/dist/components/command-palette/CommandPalette.js +91 -89
  19. package/dist/components/command-palette/CommandPalette.js.map +1 -1
  20. package/dist/components/data-table/DataTable.d.ts +51 -17
  21. package/dist/components/data-table/DataTable.js +489 -278
  22. package/dist/components/data-table/DataTable.js.map +1 -1
  23. package/dist/components/data-table/DataTableContent.d.ts +7 -1
  24. package/dist/components/data-table/DataTableContent.js +247 -211
  25. package/dist/components/data-table/DataTableContent.js.map +1 -1
  26. package/dist/components/data-table/DataTableFilters.d.ts +56 -4
  27. package/dist/components/data-table/DataTableFilters.js +493 -77
  28. package/dist/components/data-table/DataTableFilters.js.map +1 -1
  29. package/dist/components/data-table/layout.d.ts +5 -0
  30. package/dist/components/data-table/layout.js +23 -1
  31. package/dist/components/data-table/layout.js.map +1 -1
  32. package/dist/components/data-table/types.d.ts +35 -2
  33. package/dist/components/data-table/useDataTable.d.ts +1 -1
  34. package/dist/components/data-table/useDataTable.js +386 -332
  35. package/dist/components/data-table/useDataTable.js.map +1 -1
  36. package/dist/components/date-picker/DatePicker.d.ts +5 -0
  37. package/dist/components/date-picker/DatePicker.js +148 -140
  38. package/dist/components/date-picker/DatePicker.js.map +1 -1
  39. package/dist/components/date-picker/DateRangePicker.d.ts +2 -0
  40. package/dist/components/date-picker/DateRangePicker.js +171 -164
  41. package/dist/components/date-picker/DateRangePicker.js.map +1 -1
  42. package/dist/components/date-picker/PickerField.d.ts +6 -3
  43. package/dist/components/date-picker/PickerField.js +166 -159
  44. package/dist/components/date-picker/PickerField.js.map +1 -1
  45. package/dist/components/dialog/ConfirmDialog.d.ts +5 -2
  46. package/dist/components/dialog/ConfirmDialog.js +79 -77
  47. package/dist/components/dialog/ConfirmDialog.js.map +1 -1
  48. package/dist/components/dialog/Dialog.d.ts +5 -2
  49. package/dist/components/dialog/Dialog.js +65 -63
  50. package/dist/components/dialog/Dialog.js.map +1 -1
  51. package/dist/components/drawer/Drawer.d.ts +13 -4
  52. package/dist/components/drawer/Drawer.js +122 -164
  53. package/dist/components/drawer/Drawer.js.map +1 -1
  54. package/dist/components/field/Field.d.ts +38 -9
  55. package/dist/components/field/Field.js +66 -1
  56. package/dist/components/field/Field.js.map +1 -1
  57. package/dist/components/file-upload/FileUpload.js +2 -0
  58. package/dist/components/file-upload/FileUpload.js.map +1 -1
  59. package/dist/components/input/Input.d.ts +9 -16
  60. package/dist/components/input/Input.js +124 -206
  61. package/dist/components/input/Input.js.map +1 -1
  62. package/dist/components/map/colors.d.ts +2 -2
  63. package/dist/components/map/colors.js +12 -3
  64. package/dist/components/map/colors.js.map +1 -1
  65. package/dist/components/number-field/NumberField.d.ts +12 -3
  66. package/dist/components/number-field/NumberField.js +109 -130
  67. package/dist/components/number-field/NumberField.js.map +1 -1
  68. package/dist/components/pagination/Pagination.js +135 -186
  69. package/dist/components/pagination/Pagination.js.map +1 -1
  70. package/dist/components/progress/Progress.d.ts +2 -1
  71. package/dist/components/progress/Progress.js.map +1 -1
  72. package/dist/components/search-input/SearchInput.d.ts +5 -2
  73. package/dist/components/search-input/SearchInput.js +47 -45
  74. package/dist/components/search-input/SearchInput.js.map +1 -1
  75. package/dist/components/select/Select.d.ts +13 -3
  76. package/dist/components/select/Select.js +144 -139
  77. package/dist/components/select/Select.js.map +1 -1
  78. package/dist/components/spinner/Spinner.d.ts +6 -2
  79. package/dist/components/spinner/Spinner.js +42 -40
  80. package/dist/components/spinner/Spinner.js.map +1 -1
  81. package/dist/components/stat-card/StatCard.d.ts +7 -2
  82. package/dist/components/stat-card/StatCard.js +1 -1
  83. package/dist/components/stat-card/StatCard.js.map +1 -1
  84. package/dist/components/stepper/Stepper.js +44 -40
  85. package/dist/components/stepper/Stepper.js.map +1 -1
  86. package/dist/components/toast/Toast.d.ts +17 -1
  87. package/dist/components/toast/Toast.js +65 -33
  88. package/dist/components/toast/Toast.js.map +1 -1
  89. package/dist/components.json +475 -68
  90. package/dist/icons/index.d.ts +4 -0
  91. package/dist/icons/index.js +12 -1
  92. package/dist/icons/index.js.map +1 -1
  93. package/dist/index.d.ts +3 -0
  94. package/dist/index.js +7 -4
  95. package/dist/labels/Labels.d.ts +93 -0
  96. package/dist/labels/Labels.js +96 -0
  97. package/dist/labels/Labels.js.map +1 -0
  98. package/dist/labels/hu.d.ts +17 -0
  99. package/dist/labels/hu.js +124 -0
  100. package/dist/labels/hu.js.map +1 -0
  101. package/dist/llms-full.txt +274 -48
  102. package/dist/llms.txt +11 -4
  103. package/dist/opti-ui.css +370 -47
  104. package/dist/theme/ThemeProvider.d.ts +8 -4
  105. package/dist/theme/ThemeProvider.js.map +1 -1
  106. package/dist/utils/media.d.ts +9 -2
  107. package/dist/utils/media.js +10 -3
  108. package/dist/utils/media.js.map +1 -1
  109. 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.