@optimum-intelligence/opti-ui 0.9.1 → 1.0.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 +99 -0
- package/README.md +5 -1
- package/dist/components/app-shell/AppShell.d.ts +30 -1
- package/dist/components/app-shell/AppShell.js +387 -236
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -1
- package/dist/components/avatar/Avatar.js +64 -52
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/calendar/Calendar.js +6 -4
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/calendar/date-utils.js +1 -1
- package/dist/components/calendar/date-utils.js.map +1 -1
- package/dist/components/card/Card.d.ts +24 -5
- package/dist/components/card/Card.js +36 -23
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/collapsible/Collapsible.d.ts +8 -1
- package/dist/components/collapsible/Collapsible.js +32 -25
- package/dist/components/collapsible/Collapsible.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +21 -4
- package/dist/components/data-table/DataTable.js +310 -100
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +1 -7
- package/dist/components/data-table/DataTableContent.js +209 -243
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.js +47 -57
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/DataTableRow.js +105 -90
- package/dist/components/data-table/DataTableRow.js.map +1 -1
- package/dist/components/data-table/layout.d.ts +0 -5
- package/dist/components/data-table/layout.js +1 -23
- package/dist/components/data-table/layout.js.map +1 -1
- package/dist/components/data-table/types.d.ts +5 -2
- package/dist/components/data-table/useDataTable.js +249 -221
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/date-picker/DateRangePicker.js +1 -0
- package/dist/components/date-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-picker/PickerField.js +98 -101
- package/dist/components/date-picker/PickerField.js.map +1 -1
- package/dist/components/description-list/DescriptionList.d.ts +3 -1
- package/dist/components/description-list/DescriptionList.js +3 -1
- package/dist/components/description-list/DescriptionList.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/Drawer.js +173 -87
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/file-upload/FileUpload.js +7 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -1
- package/dist/components/link/Link.d.ts +1 -1
- package/dist/components/link/Link.js +57 -74
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/map/Map.d.ts +14 -2
- package/dist/components/map/Map.js +194 -153
- package/dist/components/map/Map.js.map +1 -1
- package/dist/components/pagination/Pagination.js +2 -0
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/scroll-area/ScrollArea.d.ts +18 -2
- package/dist/components/scroll-area/ScrollArea.js +89 -61
- package/dist/components/scroll-area/ScrollArea.js.map +1 -1
- package/dist/components/spinner/Spinner.js +34 -26
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/stat-card/StatCard.js +36 -22
- package/dist/components/stat-card/StatCard.js.map +1 -1
- package/dist/components/table/Table.d.ts +9 -2
- package/dist/components/table/Table.js +87 -63
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/tag/Tag.js +79 -103
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +2 -1
- package/dist/components/toolbar/Toolbar.js +23 -15
- package/dist/components/toolbar/Toolbar.js.map +1 -1
- package/dist/components/typography/Typography.d.ts +7 -1
- package/dist/components/typography/Typography.js +21 -18
- package/dist/components/typography/Typography.js.map +1 -1
- package/dist/components.json +134 -26
- package/dist/fonts/Montserrat-OFL.txt +93 -0
- package/dist/fonts/Poppins-OFL.txt +93 -0
- package/dist/fonts/montserrat-latin-ext.woff2 +0 -0
- package/dist/fonts/montserrat-latin.woff2 +0 -0
- package/dist/fonts/poppins-latin-400.woff2 +0 -0
- package/dist/fonts/poppins-latin-500.woff2 +0 -0
- package/dist/fonts/poppins-latin-600.woff2 +0 -0
- package/dist/fonts/poppins-latin-700.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-400.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-500.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-600.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-700.woff2 +0 -0
- package/dist/fonts.css +104 -4
- package/dist/index.js +2 -2
- package/dist/labels/Labels.d.ts +12 -0
- package/dist/labels/Labels.js +6 -0
- package/dist/labels/Labels.js.map +1 -1
- package/dist/labels/hu.js +9 -3
- package/dist/labels/hu.js.map +1 -1
- package/dist/llms-full.txt +103 -20
- package/dist/llms.txt +15 -10
- package/dist/opti-ui.css +567 -197
- package/dist/reset.css +33 -0
- package/dist/utils/focus.d.ts +8 -0
- package/dist/utils/focus.js +39 -0
- package/dist/utils/focus.js.map +1 -0
- package/package.json +2 -1
package/dist/llms.txt
CHANGED
|
@@ -14,7 +14,8 @@ React 19 is a peer dependency; the build is precompiled with React Compiler. `@b
|
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
16
|
import '@optimum-intelligence/opti-ui/styles.css';
|
|
17
|
-
import '@optimum-intelligence/opti-ui/fonts.css'; // optional:
|
|
17
|
+
import '@optimum-intelligence/opti-ui/fonts.css'; // optional: Poppins, Montserrat and JetBrains Mono, bundled
|
|
18
|
+
import '@optimum-intelligence/opti-ui/reset.css'; // optional: box-sizing, no default margins, full-height html/body
|
|
18
19
|
import { Button, Card, CardTitle, ToastProvider, Tooltip } from '@optimum-intelligence/opti-ui';
|
|
19
20
|
|
|
20
21
|
export function App() {
|
|
@@ -31,6 +32,9 @@ export function App() {
|
|
|
31
32
|
}
|
|
32
33
|
```
|
|
33
34
|
|
|
35
|
+
The reset sits in its own `oui-reset` layer below the library's. If your app declares a layer order before
|
|
36
|
+
importing opti-ui (Tailwind does), put `oui-reset` first in it, or the reset would win over the components.
|
|
37
|
+
|
|
34
38
|
Add `class="oui-root"` to `<body>` for the library font, text color and background. Add `oui-isolate`
|
|
35
39
|
to your app root so portalled popups stack above app content. Every module has a `'use client'` banner,
|
|
36
40
|
so the components work in Next.js App Router.
|
|
@@ -84,23 +88,24 @@ so the components work in Next.js App Router.
|
|
|
84
88
|
|
|
85
89
|
- `AppShell` — Full-height layout with a fixed navbar and an internally scrolling main area. Below 900px the navbar moves into a slide-in drawer, and `NavbarItem`s marked `pinned` show in a tab bar (see `mobileNavPosition`). Customize width with `--oui-navbar-width` and `--oui-navbar-collapsed-width`.
|
|
86
90
|
- `Card` — Surface that groups related content. Compose with `CardHeader` (`CardTitle`, `CardDescription`, `CardActions`), `CardContent` and `CardFooter`.
|
|
87
|
-
- `CardActions` — Right-aligned slot inside CardHeader for icon buttons or menus. (parts: displayName)
|
|
91
|
+
- `CardActions` — Right-aligned slot inside CardHeader for icon buttons or menus. Small (`sm`) controls are centred on the title's first line and overhang into the card padding, so a touch-sized button doesn't push the content down. (parts: displayName)
|
|
88
92
|
- `CardContent` — Styled `<div>` (`.oui-card__content`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes. (parts: displayName)
|
|
89
93
|
- `CardDescription` — Styled `<p>` (`.oui-card__description`). Accepts `className`, `style`, the `render` prop and all `<p>` attributes. (parts: displayName)
|
|
90
94
|
- `CardFooter` — Styled `<div>` (`.oui-card__footer`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes. (parts: displayName)
|
|
91
|
-
- `CardHeader` —
|
|
95
|
+
- `CardHeader` — Top row of a Card. Wrap `CardTitle` and `CardDescription` in one element as the first child: it takes the free space, and `CardActions` or a Badge after it keeps its own width. (parts: displayName)
|
|
92
96
|
- `CardTitle` — Styled `<h3>` (`.oui-card__title`). Accepts `className`, `style`, the `render` prop and all `<h3>` attributes. (parts: displayName)
|
|
93
97
|
- `Grid` — Responsive dashboard grid: up to `columns` equal columns, fewer when its own width cannot fit them.
|
|
94
98
|
- `Navbar` — Collapsible side navigation. Use inside `AppShell`. Compose with `NavbarHeader` (`NavbarBrand`), `NavbarSection` (`NavbarSectionLabel`, `NavbarItem`) and `NavbarFooter`.
|
|
95
99
|
- `NavbarBrand` — Logo, title and subtitle block for the top of a `Navbar`.
|
|
96
100
|
- `NavbarFooter` — Styled `<div>` (`.oui-navbar__footer`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes. (parts: displayName)
|
|
97
|
-
- `NavbarGroup` — Expandable parent row in a `Navbar` with nested `NavbarItem` sub-links. Place it in a `NavbarSection` next to other items. On a collapsed rail the sub-links are hidden and the parent shows as active when one of them is; the hover peek shows the full tree.
|
|
101
|
+
- `NavbarGroup` — Expandable parent row in a `Navbar` with nested `NavbarItem` sub-links. Place it in a `NavbarSection` next to other items. On a collapsed rail the sub-links are hidden and the parent shows as active when one of them is; the hover peek shows the full tree, and pressing the parent expands the navbar with the group open, so keyboard users reach the sub-links too.
|
|
98
102
|
- `NavbarHeader` — Styled `<div>` (`.oui-navbar__header`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes. (parts: displayName)
|
|
99
103
|
- `NavbarItem` — Navigation link. Renders an `<a>`; use `render={<Link to="…" />}` for a router link or `render={<button />}` for an action. Inside a `NavbarGroup` it becomes an indented sub-link.
|
|
100
104
|
- `NavbarSection` — Styled `<div>` (`.oui-navbar__section`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes. (parts: displayName)
|
|
101
105
|
- `NavbarSectionLabel` — Styled `<div>` (`.oui-navbar__section-label`). Accepts `className`, `style`, the `render` prop and all `<div>` attributes. (parts: displayName)
|
|
106
|
+
- `Page` — Content column of a page inside `AppShell`: gutters, a maximum width and the gap between sections, all smaller on phones. Customize with `--oui-page-max-width` (80rem), `--oui-page-padding` and `--oui-page-gap`.
|
|
102
107
|
- `PageHeader` — Page title block with optional breadcrumbs, eyebrow, description and actions.
|
|
103
|
-
- `ScrollArea` — Scroll container with slim, themed overlay scrollbars. Set a height or max-height.
|
|
108
|
+
- `ScrollArea` — Scroll container with slim, themed overlay scrollbars. Set a height or max-height, or use `scrollbars="horizontal" fade` for a row that scrolls sideways.
|
|
104
109
|
- `Separator` — Thin divider line. Set `orientation="vertical"` for a vertical rule.
|
|
105
110
|
- `Stack` — Flex container that spaces its children evenly, in a column or a row.
|
|
106
111
|
- `StatCard` — KPI tile: label, large value, optional unit and trend. Below 640px it turns compact (smaller value, no icon) to sit two to a row.
|
|
@@ -121,7 +126,7 @@ so the components work in Next.js App Router.
|
|
|
121
126
|
- `SegmentedControl` — Single-choice switcher (e.g. Day / Week / Month). Always keeps one value selected.
|
|
122
127
|
- `Toggle` — Two-state button (bold, pin, favourite…). Inside a ToggleGroup it acts as a segment.
|
|
123
128
|
- `ToggleGroup` — Group of `Toggle` buttons that share selection state (single or multiple).
|
|
124
|
-
- `Toolbar` — Row of controls that is a single tab stop; arrow keys move between them. Other controls join through `render`: `<Toolbar.Button render={<Toggle />} />`, `<Toolbar.Button render={<Menu.Trigger />} />`. (parts: Root, Button, Link, Group, Separator, Input)
|
|
129
|
+
- `Toolbar` — Row of controls that is a single tab stop; arrow keys move between them. It stays on one line: wider than its container, it scrolls sideways with the cut-off edge faded. Other controls join through `render`: `<Toolbar.Button render={<Toggle />} />`, `<Toolbar.Button render={<Menu.Trigger />} />`. (parts: Root, Button, Link, Group, Separator, Input)
|
|
125
130
|
|
|
126
131
|
## Overlays
|
|
127
132
|
|
|
@@ -130,7 +135,7 @@ so the components work in Next.js App Router.
|
|
|
130
135
|
- `ConfirmDialog` — Asks before an action runs: title, description, cancel and confirm buttons, a pending state that keeps the dialog open, and room for the error. For other layouts compose `AlertDialog`.
|
|
131
136
|
- `createToastManager` — Base UI `Toast.createToastManager` re-exported unchanged. See https://base-ui.com/react/components/toast.
|
|
132
137
|
- `Dialog` — Modal dialog and side sheet. Compose: `Dialog.Root` › `Dialog.Trigger` + `Dialog.Content` › `Dialog.Header` (`Title`, `Description`), `Dialog.Body`, `Dialog.Footer`. Use `render={<Button />}` on `Dialog.Trigger` / `Dialog.Close` to style them as buttons. (parts: Root, Trigger, Content, Header, Title, Description, Body, Footer, Close, createHandle)
|
|
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`.
|
|
138
|
+
- `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; dragging its header down closes it. For a free-form sheet use `Dialog.Content` with `placement`.
|
|
134
139
|
- `Popover` — Floating panel anchored to a trigger, for small forms, filters and details. (parts: Root, Trigger, Content, Title, Description, Close)
|
|
135
140
|
- `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)
|
|
136
141
|
- `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.
|
|
@@ -154,9 +159,9 @@ so the components work in Next.js App Router.
|
|
|
154
159
|
- `Avatar` — User or entity picture with initials fallback.
|
|
155
160
|
- `AvatarGroup` — Overlapping row of `Avatar` children, with an optional "+N" overflow counter.
|
|
156
161
|
- `Badge` — Small status label.
|
|
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)
|
|
162
|
+
- `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, SelectionBar, Loading, Summary, Content, Pagination)
|
|
158
163
|
- `DescriptionItem` — One label and value pair inside a `DescriptionList`.
|
|
159
|
-
- `DescriptionList` — Label and value pairs, such as a record's details. Holds `DescriptionItem`s.
|
|
164
|
+
- `DescriptionList` — Label and value pairs, such as a record's details. Holds `DescriptionItem`s. Below 27.5rem of its own width (a phone, a drawer, a narrow column) `rows` puts each label above its value. It takes the width it is given, not its content's, so in a flex row give it `flex: 1` or a width.
|
|
160
165
|
- `EmptyState` — Placeholder for empty lists, searches without results and first-run screens.
|
|
161
166
|
- `Meter` — A measurement within a known range (quota, capacity, score).
|
|
162
167
|
- `Progress` — Task completion. Pass `value={null}` for an indeterminate bar.
|
|
@@ -166,7 +171,7 @@ so the components work in Next.js App Router.
|
|
|
166
171
|
- `Table` — Styled HTML table inside a horizontally scrolling wrapper, whose cut-off edge fades. Compose with `TableHeader`, `TableBody`, `TableFooter`, `TableRow`, `TableHead`, `TableCell` and `TableCaption`. For search, filters, sorting and pagination use `DataTable` instead.
|
|
167
172
|
- `TableBody` — Styled `<tbody>` (`.oui-table__body`). Accepts `className`, `style`, the `render` prop and all `<tbody>` attributes. (parts: displayName)
|
|
168
173
|
- `TableCaption` — Styled `<caption>` (`.oui-table__caption`). Accepts `className`, `style`, the `render` prop and all `<caption>` attributes. (parts: displayName)
|
|
169
|
-
- `TableCell` — Body cell (`<td>`). `numeric` right-aligns and uses tabular figures.
|
|
174
|
+
- `TableCell` — Body cell (`<td>`). `numeric` right-aligns and uses tabular figures; `mono` and `nowrap` keep codes and dates on one line. In a table under 40rem wide every cell stays on one line and the table scrolls sideways.
|
|
170
175
|
- `TableFooter` — Styled `<tfoot>` (`.oui-table__footer`). Accepts `className`, `style`, the `render` prop and all `<tfoot>` attributes. (parts: displayName)
|
|
171
176
|
- `TableHead` — Column header cell (`<th>`), optionally a sort button.
|
|
172
177
|
- `TableHeader` — Styled `<thead>` (`.oui-table__header`). Accepts `className`, `style`, the `render` prop and all `<thead>` attributes. (parts: displayName)
|