prime-ui-kit 0.16.0 → 0.17.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/README.md +14 -18
- package/dist/chunks/{chunk-4PSQ64S4.js → chunk-7WWZYGRC.js} +3697 -3738
- package/dist/chunks/{chunk-6TPHKCUJ.js → chunk-A4WE3UNC.js} +27340 -26893
- package/dist/chunks/{chunk-A7OQWH6R.js → chunk-PRP4B6OG.js} +1 -1
- package/dist/chunks/{chunk-HDBQICPW.js → chunk-SVFWPLNW.js} +49 -20
- package/dist/color-picker.d.ts +1 -1
- package/dist/color-picker.js +3 -3
- package/dist/components/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/chart-frame/ChartFrame.d.ts +1 -1
- package/dist/components/chat/ChatRows.d.ts +5 -1
- package/dist/components/color-picker/ColorPicker.d.ts +18 -1
- package/dist/components/data-table/DataTable.d.ts +1 -1
- package/dist/components/index.d.ts +0 -4
- package/dist/components/pagination/Pagination.d.ts +5 -1
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/slider/Slider.d.ts +1 -1
- package/dist/components/smart-filter/SmartFilter.d.ts +4 -5
- package/dist/icon-set.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +5 -9
- package/dist/internal/barPlan.d.ts +44 -0
- package/dist/internal/overlay/FloatingPanel.d.ts +1 -1
- package/dist/internal/overlay/focus.d.ts +3 -2
- package/dist/internal/parts.d.ts +1 -1
- package/dist/internal/slot.d.ts +0 -30
- package/dist/layout/app-shell/AppShell.d.ts +19 -38
- package/dist/layout/index.d.ts +3 -3
- package/dist/layout/page/Page.d.ts +263 -0
- package/dist/layout/sidebar/Sidebar.d.ts +1 -1
- package/dist/skill/SKILL.md +10 -10
- package/dist/skill/anti-slop.md +101 -5
- package/dist/skill/api-contract.md +1 -1
- package/dist/skill/cheatsheet.md +27 -22
- package/dist/skill/checklist.md +7 -3
- package/dist/skill/choosing.md +9 -8
- package/dist/skill/components.md +3 -5
- package/dist/skill/composition.md +177 -152
- package/dist/skill/foundations.md +9 -9
- package/dist/skill/layouts.md +39 -98
- package/dist/skill/reference/components/avatar/COMPONENT.md +2 -2
- package/dist/skill/reference/components/avatar/examples/team-group.tsx +1 -1
- package/dist/skill/reference/components/banner/COMPONENT.md +4 -4
- package/dist/skill/reference/components/banner/examples/examples.module.css +6 -1
- package/dist/skill/reference/components/banner/examples/page-strip.tsx +24 -22
- package/dist/skill/reference/components/breadcrumb/COMPONENT.md +9 -8
- package/dist/skill/reference/components/button/COMPONENT.md +1 -0
- package/dist/skill/reference/components/button/examples/hold-to-confirm.tsx +1 -1
- package/dist/skill/reference/components/button/examples/on-colored-host.tsx +8 -8
- package/dist/skill/reference/components/card/COMPONENT.md +7 -7
- package/dist/skill/reference/components/card/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/card/examples/screen.tsx +184 -198
- package/dist/skill/reference/components/chart-frame/COMPONENT.md +1 -1
- package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +9 -9
- package/dist/skill/reference/components/chat/COMPONENT.md +4 -4
- package/dist/skill/reference/components/chat/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/chat/examples/screen.tsx +110 -117
- package/dist/skill/reference/components/chat-list/COMPONENT.md +2 -2
- package/dist/skill/reference/components/chat-list/examples/controlled.tsx +2 -2
- package/dist/skill/reference/components/chat-list/examples/examples.module.css +8 -0
- package/dist/skill/reference/components/checkbox/examples/examples.module.css +3 -2
- package/dist/skill/reference/components/code-block/COMPONENT.md +1 -1
- package/dist/skill/reference/components/code-block/examples/color-scheme.tsx +2 -4
- package/dist/skill/reference/components/code-block/examples/examples.module.css +0 -11
- package/dist/skill/reference/components/color-picker/COMPONENT.md +18 -7
- package/dist/skill/reference/components/color-picker/examples/examples.module.css +2 -5
- package/dist/skill/reference/components/color-picker/examples/overview.tsx +5 -10
- package/dist/skill/reference/components/color-picker/examples/sizes.tsx +4 -8
- package/dist/skill/reference/components/crossfade/COMPONENT.md +2 -2
- package/dist/skill/reference/components/crossfade/examples/screen.tsx +107 -112
- package/dist/skill/reference/components/data-table/COMPONENT.md +5 -5
- package/dist/skill/reference/components/data-table/examples/examples.module.css +9 -0
- package/dist/skill/reference/components/data-table/examples/screen.tsx +42 -52
- package/dist/skill/reference/components/data-table/examples/server.tsx +6 -2
- package/dist/skill/reference/components/datepicker/examples/examples.module.css +6 -0
- package/dist/skill/reference/components/datepicker/examples/inline-panel.tsx +3 -1
- package/dist/skill/reference/components/description-list/COMPONENT.md +1 -1
- package/dist/skill/reference/components/description-list/examples/screen.tsx +120 -127
- package/dist/skill/reference/components/digit-input/examples/grouped.tsx +4 -4
- package/dist/skill/reference/components/digit-input/examples/validation.tsx +1 -1
- package/dist/skill/reference/components/divider/COMPONENT.md +2 -2
- package/dist/skill/reference/components/divider/examples/examples.module.css +4 -1
- package/dist/skill/reference/components/divider/examples/vertical.tsx +22 -9
- package/dist/skill/reference/components/dnd/examples/examples.module.css +3 -1
- package/dist/skill/reference/components/drawer/COMPONENT.md +1 -1
- package/dist/skill/reference/components/drawer/examples/placement.tsx +26 -31
- package/dist/skill/reference/components/drawer/examples/screen.tsx +137 -160
- package/dist/skill/reference/components/dropdown/COMPONENT.md +1 -1
- package/dist/skill/reference/components/example-frame/COMPONENT.md +3 -3
- package/dist/skill/reference/components/field-list/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/field-list/examples/screen.tsx +19 -19
- package/dist/skill/reference/components/fieldset/COMPONENT.md +1 -1
- package/dist/skill/reference/components/fieldset/examples/states.tsx +1 -1
- package/dist/skill/reference/components/file-upload/COMPONENT.md +1 -1
- package/dist/skill/reference/components/file-upload/examples/screen.module.css +2 -2
- package/dist/skill/reference/components/file-upload/examples/screen.tsx +65 -81
- package/dist/skill/reference/components/gallery/COMPONENT.md +1 -0
- package/dist/skill/reference/components/gantt/COMPONENT.md +1 -1
- package/dist/skill/reference/components/gantt/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/gantt/examples/screen.tsx +55 -73
- package/dist/skill/reference/components/hint/examples/examples.module.css +10 -1
- package/dist/skill/reference/components/hint/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/kanban/COMPONENT.md +1 -1
- package/dist/skill/reference/components/kanban/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/kanban/examples/screen.tsx +50 -65
- package/dist/skill/reference/components/kbd/COMPONENT.md +1 -1
- package/dist/skill/reference/components/label/examples/examples.module.css +12 -1
- package/dist/skill/reference/components/label/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/list/COMPONENT.md +3 -3
- package/dist/skill/reference/components/media-viewer/examples/controlled.tsx +16 -16
- package/dist/skill/reference/components/media-viewer/examples/examples.module.css +1 -3
- package/dist/skill/reference/components/pagination/COMPONENT.md +11 -3
- package/dist/skill/reference/components/pagination/examples/controlled.tsx +2 -1
- package/dist/skill/reference/components/popover/COMPONENT.md +3 -2
- package/dist/skill/reference/components/popover/examples/width.tsx +13 -1
- package/dist/skill/reference/components/slider/COMPONENT.md +3 -3
- package/dist/skill/reference/components/slider/examples/states.tsx +14 -10
- package/dist/skill/reference/components/smart-filter/COMPONENT.md +13 -13
- package/dist/skill/reference/components/smart-filter/examples/examples.module.css +3 -0
- package/dist/skill/reference/components/smart-filter/examples/many-values.tsx +12 -8
- package/dist/skill/reference/components/smart-filter/examples/sizes.tsx +7 -3
- package/dist/skill/reference/components/sparkline/COMPONENT.md +1 -0
- package/dist/skill/reference/components/sparkline/examples/curve.tsx +16 -11
- package/dist/skill/reference/components/sparkline/examples/states.tsx +14 -10
- package/dist/skill/reference/components/switch/COMPONENT.md +1 -1
- package/dist/skill/reference/components/tabs/COMPONENT.md +1 -1
- package/dist/skill/reference/components/typography/COMPONENT.md +2 -2
- package/dist/skill/reference/foundation.md +15 -11
- package/dist/skill/reference/layout/app-shell/COMPONENT.md +25 -38
- package/dist/skill/reference/layout/app-shell/examples/footer.tsx +10 -10
- package/dist/skill/reference/layout/app-shell/examples/overview.tsx +20 -22
- package/dist/skill/reference/layout/app-shell/examples/screen.module.css +2 -2
- package/dist/skill/reference/layout/app-shell/examples/screen.tsx +25 -30
- package/dist/skill/reference/layout/app-shell/examples/template.tsx +13 -17
- package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +3 -3
- package/dist/skill/reference/layout/bottom-nav/examples/floating-action.tsx +10 -19
- package/dist/skill/reference/layout/bottom-nav/examples/floating.tsx +10 -19
- package/dist/skill/reference/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
- package/dist/skill/reference/layout/page/COMPONENT.md +353 -0
- package/dist/skill/reference/layout/page/examples/actions-collapse.tsx +45 -0
- package/dist/skill/reference/layout/page/examples/collapse.tsx +68 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/examples.module.css +33 -4
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/grid.tsx +15 -15
- package/dist/skill/reference/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
- package/dist/skill/reference/layout/page/examples/narrow.tsx +75 -0
- package/dist/skill/reference/layout/page/examples/overview.tsx +57 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/screen.module.css +1 -1
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx +29 -19
- package/dist/skill/reference/{components/page-content → layout/page}/examples/sections.tsx +17 -24
- package/dist/skill/reference/layout/page/examples/structure.tsx +41 -0
- package/dist/skill/reference/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
- package/dist/skill/reference/layout/page/examples/top-bar.tsx +85 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/variants.tsx +7 -7
- package/dist/skill/reference/layout/sidebar/COMPONENT.md +5 -4
- package/dist/skill/reference/layout/sidebar/examples/dismiss.tsx +10 -7
- package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +11 -8
- package/dist/skill/responsive.md +88 -74
- package/dist/tokens/layers.d.ts +2 -0
- package/dist/tokens/primitives.d.ts +12 -2
- package/dist/tokens/semantic.d.ts +7 -0
- package/dist/tokens/themes/dark.d.ts +7 -2
- package/package.json +2 -2
- package/src/components/avatar/COMPONENT.md +2 -2
- package/src/components/avatar/examples/team-group.tsx +1 -1
- package/src/components/banner/COMPONENT.md +4 -4
- package/src/components/banner/examples/examples.module.css +6 -1
- package/src/components/banner/examples/page-strip.tsx +24 -22
- package/src/components/breadcrumb/COMPONENT.md +9 -8
- package/src/components/button/COMPONENT.md +1 -0
- package/src/components/button/examples/hold-to-confirm.tsx +1 -1
- package/src/components/button/examples/on-colored-host.tsx +8 -8
- package/src/components/card/COMPONENT.md +7 -7
- package/src/components/card/examples/screen.module.css +1 -1
- package/src/components/card/examples/screen.tsx +184 -198
- package/src/components/chart-frame/COMPONENT.md +1 -1
- package/src/components/chart-frame/examples/fill-height.tsx +9 -9
- package/src/components/chat/COMPONENT.md +4 -4
- package/src/components/chat/examples/screen.module.css +1 -1
- package/src/components/chat/examples/screen.tsx +110 -117
- package/src/components/chat-list/COMPONENT.md +2 -2
- package/src/components/chat-list/examples/controlled.tsx +2 -2
- package/src/components/chat-list/examples/examples.module.css +8 -0
- package/src/components/checkbox/examples/examples.module.css +3 -2
- package/src/components/code-block/COMPONENT.md +1 -1
- package/src/components/code-block/examples/color-scheme.tsx +2 -4
- package/src/components/code-block/examples/examples.module.css +0 -11
- package/src/components/color-picker/COMPONENT.md +18 -7
- package/src/components/color-picker/examples/examples.module.css +2 -5
- package/src/components/color-picker/examples/overview.tsx +5 -10
- package/src/components/color-picker/examples/sizes.tsx +4 -8
- package/src/components/crossfade/COMPONENT.md +2 -2
- package/src/components/crossfade/examples/screen.tsx +107 -112
- package/src/components/data-table/COMPONENT.md +5 -5
- package/src/components/data-table/examples/examples.module.css +9 -0
- package/src/components/data-table/examples/screen.tsx +42 -52
- package/src/components/data-table/examples/server.tsx +6 -2
- package/src/components/datepicker/examples/examples.module.css +6 -0
- package/src/components/datepicker/examples/inline-panel.tsx +3 -1
- package/src/components/description-list/COMPONENT.md +1 -1
- package/src/components/description-list/examples/screen.tsx +120 -127
- package/src/components/digit-input/examples/grouped.tsx +4 -4
- package/src/components/digit-input/examples/validation.tsx +1 -1
- package/src/components/divider/COMPONENT.md +2 -2
- package/src/components/divider/examples/examples.module.css +4 -1
- package/src/components/divider/examples/vertical.tsx +22 -9
- package/src/components/dnd/examples/examples.module.css +3 -1
- package/src/components/drawer/COMPONENT.md +1 -1
- package/src/components/drawer/examples/placement.tsx +26 -31
- package/src/components/drawer/examples/screen.tsx +137 -160
- package/src/components/dropdown/COMPONENT.md +1 -1
- package/src/components/example-frame/COMPONENT.md +3 -3
- package/src/components/field-list/examples/screen.module.css +1 -1
- package/src/components/field-list/examples/screen.tsx +19 -19
- package/src/components/fieldset/COMPONENT.md +1 -1
- package/src/components/fieldset/examples/states.tsx +1 -1
- package/src/components/file-upload/COMPONENT.md +1 -1
- package/src/components/file-upload/examples/screen.module.css +2 -2
- package/src/components/file-upload/examples/screen.tsx +65 -81
- package/src/components/gallery/COMPONENT.md +1 -0
- package/src/components/gantt/COMPONENT.md +1 -1
- package/src/components/gantt/examples/screen.module.css +1 -1
- package/src/components/gantt/examples/screen.tsx +55 -73
- package/src/components/hint/examples/examples.module.css +10 -1
- package/src/components/hint/examples/overview.tsx +1 -1
- package/src/components/kanban/COMPONENT.md +1 -1
- package/src/components/kanban/examples/screen.module.css +1 -1
- package/src/components/kanban/examples/screen.tsx +50 -65
- package/src/components/kbd/COMPONENT.md +1 -1
- package/src/components/label/examples/examples.module.css +12 -1
- package/src/components/label/examples/overview.tsx +1 -1
- package/src/components/list/COMPONENT.md +3 -3
- package/src/components/media-viewer/examples/controlled.tsx +16 -16
- package/src/components/media-viewer/examples/examples.module.css +1 -3
- package/src/components/pagination/COMPONENT.md +11 -3
- package/src/components/pagination/examples/controlled.tsx +2 -1
- package/src/components/popover/COMPONENT.md +3 -2
- package/src/components/popover/examples/width.tsx +13 -1
- package/src/components/slider/COMPONENT.md +3 -3
- package/src/components/slider/examples/states.tsx +14 -10
- package/src/components/smart-filter/COMPONENT.md +13 -13
- package/src/components/smart-filter/examples/examples.module.css +3 -0
- package/src/components/smart-filter/examples/many-values.tsx +12 -8
- package/src/components/smart-filter/examples/sizes.tsx +7 -3
- package/src/components/sparkline/COMPONENT.md +1 -0
- package/src/components/sparkline/examples/curve.tsx +16 -11
- package/src/components/sparkline/examples/states.tsx +14 -10
- package/src/components/switch/COMPONENT.md +1 -1
- package/src/components/tabs/COMPONENT.md +1 -1
- package/src/components/typography/COMPONENT.md +2 -2
- package/src/layout/app-shell/COMPONENT.md +25 -38
- package/src/layout/app-shell/examples/footer.tsx +10 -10
- package/src/layout/app-shell/examples/overview.tsx +20 -22
- package/src/layout/app-shell/examples/screen.module.css +2 -2
- package/src/layout/app-shell/examples/screen.tsx +25 -30
- package/src/layout/app-shell/examples/template.tsx +13 -17
- package/src/layout/bottom-nav/COMPONENT.md +3 -3
- package/src/layout/bottom-nav/examples/floating-action.tsx +10 -19
- package/src/layout/bottom-nav/examples/floating.tsx +10 -19
- package/src/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
- package/src/layout/page/COMPONENT.md +353 -0
- package/src/layout/page/examples/actions-collapse.tsx +45 -0
- package/src/layout/page/examples/collapse.tsx +68 -0
- package/src/{components/page-content → layout/page}/examples/examples.module.css +33 -4
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/grid.tsx +15 -15
- package/src/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
- package/src/layout/page/examples/narrow.tsx +75 -0
- package/src/layout/page/examples/overview.tsx +57 -0
- package/src/{components/page-content → layout/page}/examples/screen.module.css +1 -1
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.tsx +29 -19
- package/src/{components/page-content → layout/page}/examples/sections.tsx +17 -24
- package/src/layout/page/examples/structure.tsx +41 -0
- package/src/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
- package/src/layout/page/examples/top-bar.tsx +85 -0
- package/src/{components/page-content → layout/page}/examples/variants.tsx +7 -7
- package/src/layout/sidebar/COMPONENT.md +5 -4
- package/src/layout/sidebar/examples/dismiss.tsx +10 -7
- package/src/layout/sidebar/examples/narrow.tsx +11 -8
- package/src/styles/theme-dark.css +12 -10
- package/src/styles/theme-light.css +3 -0
- package/src/styles/tokens.css +3 -1
- package/dist/components/page-content/PageContent.d.ts +0 -192
- package/dist/components/page-toolbar/PageToolbar.d.ts +0 -55
- package/dist/layout/app-header/AppHeader.d.ts +0 -118
- package/dist/skill/reference/components/page-content/COMPONENT.md +0 -264
- package/dist/skill/reference/components/page-content/examples/narrow.tsx +0 -25
- package/dist/skill/reference/components/page-content/examples/overview.tsx +0 -41
- package/dist/skill/reference/components/page-toolbar/COMPONENT.md +0 -147
- package/dist/skill/reference/components/page-toolbar/examples/examples.module.css +0 -16
- package/dist/skill/reference/components/page-toolbar/examples/overview.tsx +0 -113
- package/dist/skill/reference/components/page-toolbar/examples/save-changes.tsx +0 -43
- package/dist/skill/reference/components/page-toolbar/examples/without-search.tsx +0 -60
- package/dist/skill/reference/layout/app-header/COMPONENT.md +0 -187
- package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/dist/skill/reference/layout/app-header/examples/examples.module.css +0 -28
- package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -67
- package/dist/skill/reference/layout/app-header/examples/narrow.tsx +0 -66
- package/dist/skill/reference/layout/app-header/examples/overview.tsx +0 -34
- package/dist/skill/reference/layout/app-header/examples/page-title.tsx +0 -78
- package/dist/skill/reference/layout/app-shell/examples/contained.tsx +0 -30
- package/src/components/page-content/COMPONENT.md +0 -264
- package/src/components/page-content/examples/narrow.tsx +0 -25
- package/src/components/page-content/examples/overview.tsx +0 -41
- package/src/components/page-toolbar/COMPONENT.md +0 -147
- package/src/components/page-toolbar/examples/examples.module.css +0 -16
- package/src/components/page-toolbar/examples/overview.tsx +0 -113
- package/src/components/page-toolbar/examples/save-changes.tsx +0 -43
- package/src/components/page-toolbar/examples/without-search.tsx +0 -60
- package/src/layout/app-header/COMPONENT.md +0 -187
- package/src/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/src/layout/app-header/examples/examples.module.css +0 -28
- package/src/layout/app-header/examples/in-app-shell.tsx +0 -67
- package/src/layout/app-header/examples/narrow.tsx +0 -66
- package/src/layout/app-header/examples/overview.tsx +0 -34
- package/src/layout/app-header/examples/page-title.tsx +0 -78
- package/src/layout/app-shell/examples/contained.tsx +0 -30
- package/dist/chunks/{chunk-U3Q2I3MY.js → chunk-2ODXLPW3.js} +2 -2
package/dist/skill/anti-slop.md
CHANGED
|
@@ -55,13 +55,13 @@ Text colour is not CSS: [foundations.md → Text colour](foundations.md#text-col
|
|
|
55
55
|
```tsx good
|
|
56
56
|
// good — DataTable already is a filled block; a titled section is enough
|
|
57
57
|
// declare: const payments: { id: string; client: string }[]
|
|
58
|
-
<
|
|
58
|
+
<Page.Section label="Последние оплаты">
|
|
59
59
|
<DataTable
|
|
60
60
|
columns={[{ id: "client", header: "Клиент", accessor: "client" }]}
|
|
61
61
|
rows={payments}
|
|
62
62
|
getRowKey={(row) => row.id}
|
|
63
63
|
/>
|
|
64
|
-
</
|
|
64
|
+
</Page.Section>
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
## 3a. Hover that merges with the neighbour
|
|
@@ -225,7 +225,7 @@ The same for one value in several units — one heading, the fields in a row, th
|
|
|
225
225
|
/* good — proximity scale */
|
|
226
226
|
.form { display: grid; gap: var(--prime-space-8); } /* group → group 32 */
|
|
227
227
|
.group { display: grid; gap: var(--prime-space-5); } /* field → field 20 */
|
|
228
|
-
/* block → block 24 and section → section 40 come from
|
|
228
|
+
/* block → block 24 and section → section 40 come from Page.Body / Page.Section */
|
|
229
229
|
```
|
|
230
230
|
|
|
231
231
|
## 7. `div` instead of a ready component
|
|
@@ -242,7 +242,7 @@ The same for one value in several units — one heading, the fields in a row, th
|
|
|
242
242
|
| `<Button.Root onClick={() => location.assign(url)}>` | `<Button.Root asChild><a href={url}>…</a></Button.Root>` or `LinkButton` |
|
|
243
243
|
| a hand-built spinner, shimmer, grey placeholder box or «Loading…» text | `loading` on Button / Select / DataTable; a region: `Skeleton` of its content inside `Crossfade`; no shape to hold: `Spinner` |
|
|
244
244
|
| `{loading ? <Spinner /> : <List />}` — a state that flips | `<Crossfade state={status}>` around the region, `Skeleton` while loading |
|
|
245
|
-
| a search Input + a row of filter Selects above a table | `SmartFilter` in the page's `
|
|
245
|
+
| a search Input + a row of filter Selects above a table | `SmartFilter` in the page's top bar: its toolbar in `Page.Tools`, its chips in `Page.Chips` ([where the filters go](composition.md#where-the-filters-go)) |
|
|
246
246
|
| a grid of «label: value» text pairs for one record | `DescriptionList.Root` + `DescriptionList.Item` |
|
|
247
247
|
| a Modal hand-built as «Удалить?» with your own pending flag | `ConfirmDialog.Root` with an async `onConfirm` |
|
|
248
248
|
| a `<fieldset>` reset by hand, or `disabled` on every field while saving | `<Fieldset label disabled={saving}>` |
|
|
@@ -254,7 +254,7 @@ The same for one value in several units — one heading, the fields in a row, th
|
|
|
254
254
|
| an `<img>` with your own radius and loading box | `Thumbnail.Root` / `Avatar.Root` |
|
|
255
255
|
| a lightbox, or a Modal with an `<img>` | `Gallery` (opens `MediaViewer` itself) or `MediaViewer` |
|
|
256
256
|
| a `position: fixed` bottom tab bar | `BottomNav` in `AppShell.Footer` |
|
|
257
|
-
| a menu state and a menu button wired by hand to open the phone Sidebar | nothing: the `
|
|
257
|
+
| a menu state and a menu button wired by hand to open the phone Sidebar | nothing: the page's `Page.TopBar` draws the menu button; another trigger reads `useAppShellNav()` ([the app frame](layouts.md#app-frame-once-per-app)) |
|
|
258
258
|
| a bottom panel built from a Drawer or a `div` | `Sheet` |
|
|
259
259
|
|
|
260
260
|
## 7a. Fighting the table
|
|
@@ -287,6 +287,102 @@ The same for one value in several units — one heading, the fields in a row, th
|
|
|
287
287
|
/>
|
|
288
288
|
```
|
|
289
289
|
|
|
290
|
+
## 7b. A top bar out of its groups
|
|
291
|
+
|
|
292
|
+
The bar lays itself out only from its four groups ([the top bar](composition.md#the-top-bar)); a
|
|
293
|
+
bar assembled any other way cannot give way on a narrow panel.
|
|
294
|
+
|
|
295
|
+
The title as a row of its own under the path:
|
|
296
|
+
|
|
297
|
+
```tsx partial
|
|
298
|
+
// bad — the path, then the title on a second line; the path repeats the title
|
|
299
|
+
<Page.Heading>
|
|
300
|
+
<Breadcrumb.Root>
|
|
301
|
+
<Breadcrumb.Item href="/invoices">Счета</Breadcrumb.Item>
|
|
302
|
+
<Breadcrumb.Item current>Счёт № 1042</Breadcrumb.Item>
|
|
303
|
+
</Breadcrumb.Root>
|
|
304
|
+
</Page.Heading>
|
|
305
|
+
<Typography as="h1" variant="heading-m">Счёт № 1042</Typography>
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
```tsx good
|
|
309
|
+
// good — the path ends in the title: the levels above, then Page.Title, on one line
|
|
310
|
+
<Page.TopBar>
|
|
311
|
+
<Page.Heading>
|
|
312
|
+
<Breadcrumb.Root>
|
|
313
|
+
<Breadcrumb.Item href="/invoices">Счета</Breadcrumb.Item>
|
|
314
|
+
</Breadcrumb.Root>
|
|
315
|
+
<Page.Title>Счёт № 1042</Page.Title>
|
|
316
|
+
<Page.Description>Отправлен · оплатить до 14 октября</Page.Description>
|
|
317
|
+
</Page.Heading>
|
|
318
|
+
</Page.TopBar>
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Buttons in two places, buttons with only text:
|
|
322
|
+
|
|
323
|
+
```tsx partial
|
|
324
|
+
// bad — export beside the title, the primary among the tools; no icons, so nothing can collapse
|
|
325
|
+
<Page.Heading>
|
|
326
|
+
<Page.Title>Заказы</Page.Title>
|
|
327
|
+
<Button.Root variant="soft" tone="neutral">Экспорт</Button.Root>
|
|
328
|
+
</Page.Heading>
|
|
329
|
+
<Page.Tools aria-label="Заказы">
|
|
330
|
+
<SmartFilter.Toolbar />
|
|
331
|
+
<Button.Root>Новый заказ</Button.Root>
|
|
332
|
+
</Page.Tools>
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
```tsx good
|
|
336
|
+
// good — every button in one Page.Actions, each with an icon, the primary last
|
|
337
|
+
<Page.Actions>
|
|
338
|
+
<Button.Root variant="soft" tone="neutral">
|
|
339
|
+
<Button.Icon>
|
|
340
|
+
<Icon name="action.download" />
|
|
341
|
+
</Button.Icon>
|
|
342
|
+
Экспорт
|
|
343
|
+
</Button.Root>
|
|
344
|
+
<Button.Root>
|
|
345
|
+
<Button.Icon>
|
|
346
|
+
<Icon name="action.add" />
|
|
347
|
+
</Button.Icon>
|
|
348
|
+
Новый заказ
|
|
349
|
+
</Button.Root>
|
|
350
|
+
</Page.Actions>
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
`SmartFilter.Root` inside the bar:
|
|
354
|
+
|
|
355
|
+
```tsx partial
|
|
356
|
+
// bad — the filter's state wraps one group, its chips land outside it
|
|
357
|
+
<Page.TopBar>
|
|
358
|
+
<SmartFilter.Root fields={FIELDS}>
|
|
359
|
+
<Page.Tools aria-label="Заказы">
|
|
360
|
+
<SmartFilter.Toolbar />
|
|
361
|
+
</Page.Tools>
|
|
362
|
+
</SmartFilter.Root>
|
|
363
|
+
</Page.TopBar>
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
```tsx good
|
|
367
|
+
// good — SmartFilter.Root draws nothing and wraps the page; toolbar and chips sit in their groups
|
|
368
|
+
// declare: const FIELDS: Parameters<typeof SmartFilter.Root>[0]["fields"]
|
|
369
|
+
<SmartFilter.Root fields={FIELDS}>
|
|
370
|
+
<Page.Root>
|
|
371
|
+
<Page.TopBar>
|
|
372
|
+
<Page.Heading>
|
|
373
|
+
<Page.Title>Заказы</Page.Title>
|
|
374
|
+
</Page.Heading>
|
|
375
|
+
<Page.Tools aria-label="Заказы">
|
|
376
|
+
<SmartFilter.Toolbar />
|
|
377
|
+
</Page.Tools>
|
|
378
|
+
<Page.Chips>
|
|
379
|
+
<SmartFilter.Chips />
|
|
380
|
+
</Page.Chips>
|
|
381
|
+
</Page.TopBar>
|
|
382
|
+
</Page.Root>
|
|
383
|
+
</SmartFilter.Root>
|
|
384
|
+
```
|
|
385
|
+
|
|
290
386
|
## 8. Decoration and filler
|
|
291
387
|
|
|
292
388
|
- No emoji in UI. No icon next to every label — an icon earns its place when it speeds recognition
|
|
@@ -25,7 +25,7 @@ import type { ControlSize, PaletteColor, TextTone, Tone, Variant } from "prime-u
|
|
|
25
25
|
| Text value | native `value` / `onChange` + `onValueChange(string)` | Input (`Input.Field`), Textarea. |
|
|
26
26
|
| Other state | `x` / `defaultX` / `onXChange(x)` | Badge `pressed`; Button `pressed`; ChartFrame `hiddenSeries`; Chat `selected`, `search`; ChatList `search`; ColorPicker `format`; CommandMenu `search`; Composer `recordMode`; DataTable `hiddenColumns`, `page`, `sort`, `selected`, `expanded`, `collapsedGroups`; ExampleFrame `viewport`, `colorScheme`; Gallery `index`; Gantt `scale`; Kanban `columnOrder`; MediaViewer `index`; Message.Media `index`; Select `search`; SmartFilter `search`; VideoNote `playing`, `transcriptExpanded`; VoicePlayer `rate`, `playing`, `transcriptExpanded`; Sidebar `mode`. |
|
|
27
27
|
| Checked | `checked` / `defaultChecked` / `onCheckedChange(checked)` | Checkbox, Dropdown.CheckboxItem, Switch, Thumbnail. |
|
|
28
|
-
| Open | `open` / `defaultOpen` / `onOpenChange(open)` | ColorPresets, CommandMenu, ConfirmDialog, Datepicker, Drawer, Dropdown, Gallery, MediaViewer, Message.Media, Modal,
|
|
28
|
+
| Open | `open` / `defaultOpen` / `onOpenChange(open)` | ColorPresets, CommandMenu, ConfirmDialog, Datepicker, Drawer, Dropdown, Gallery, MediaViewer, Message.Media, Modal, Popover, Select, Sheet, TagSelect, Tooltip, Page.Split, Sidebar, Sidebar.Group, Sidebar.Sub. |
|
|
29
29
|
| Dismiss | `closeOnOutsideClick` (default `true`), `closeOnEscape` (default `true`) | Both on every overlay that opens a layer: the dialogs, the floating panels, the panels of Select, TagSelect, Datepicker and ColorPresets, the off-canvas Sidebar and the reaction bar of a message. `ConfirmDialog` takes both with `closeOnOutsideClick` default `false` (Escape is held while `onConfirm` runs). Tooltip and Notification take neither. A form holds closing with `Modal.Guard` / `Drawer.Guard` / `Sheet.Guard`. |
|
|
30
30
|
| Selection mode | `multiple` | One vs many (Select, Accordion) — never `type`. `mode` only for structurally different values (Datepicker `single \| range`). |
|
|
31
31
|
| Status words | `selected`, `current`, `pressed` | `current` marks a navigation location (`Sidebar.Item`, `Breadcrumb.Item`) and sets `aria-current`; `pressed` a toggle button. |
|
package/dist/skill/cheatsheet.md
CHANGED
|
@@ -78,24 +78,28 @@ reference is each component's `COMPONENT.md` ([components.md](components.md)), t
|
|
|
78
78
|
|
|
79
79
|
## Page title and header
|
|
80
80
|
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
- A
|
|
81
|
+
- The app is navigation and the page: everything at the top belongs to the page's `<Page.Root>` — not an app-wide header, a global search or notifications above every page.
|
|
82
|
+
- A work screen (a list, a board, a chat, a record) titles itself in `<Page.TopBar>`: `<Page.Heading>` with `<Page.Title>` + `<Page.Description>` carrying a line of data («128 в работе · 6 ждут оплаты») — not a sentence about the page.
|
|
83
|
+
- The bar holds only its four groups: `<Page.Heading>`, `<Page.Tools aria-label>` (sections, `<SmartFilter.Toolbar />`, the view — in reading order), `<Page.Actions>`, `<Page.Chips>` (`<SmartFilter.Chips />`) — not a hand-made flex row of title, tabs, search and buttons ([the top bar](composition.md#the-top-bar)).
|
|
84
|
+
- A nested record: `<Breadcrumb.Root>` first in `<Page.Heading>`, then `<Page.Title>` with the record's name — the path ends in the title on one line; not a title row under the path, not a breadcrumb in the body.
|
|
85
|
+
- Every button of the page goes into one `<Page.Actions>`, secondary first, the primary last, each with a `<Button.Icon>` beside its label — not buttons split between two places, not a button with only text.
|
|
86
|
+
- A filtered page: `<SmartFilter.Root>` wraps `<Page.Root>` — it draws nothing; not `SmartFilter.Root` inside the bar.
|
|
87
|
+
- No size knob on the title: the bar sizes the heading and gives way by width itself ([the five steps](responsive.md#the-pages-top-bar--pagetopbar)).
|
|
88
|
+
- A document page (settings, a long form, help) and an overview (a dashboard) put `<Page.Header>` with its `<Page.Heading>` in the flow — the large title — with an optional `<Page.TopBar collapse>` above it that repeats the title once it scrolls away. One `<Page.Title>` per page — never two titles, never no `<h1>`.
|
|
85
89
|
|
|
86
90
|
## Cards and surfaces
|
|
87
91
|
|
|
88
92
|
- `Card.Root` only for a bounded block with its own title: a KPI tile (`variant="stat-trend"`), a settings panel (`variant="panel"`), side facts — not around a whole section, a form field or a page.
|
|
89
93
|
- Never a `DataTable` inside a Card — the table is already a filled block; a card in a card only sparingly ([the rule](foundations.md#card-in-a-card)).
|
|
90
|
-
- Section without a card: `<
|
|
91
|
-
- The tiles of a screen (KPI cards, charts, panels): one `<
|
|
94
|
+
- Section without a card: `<Page.Section label="…">` + the content (a link or button beside the heading in `Page.Actions`) — not a hand-made `<section>` + `Typography as="h2"` + own gap.
|
|
95
|
+
- The tiles of a screen (KPI cards, charts, panels): one `<Page.Grid>` with a `<Page.Cell span>` per tile — not a grid per row (the rows would stand 24 apart instead of 16).
|
|
92
96
|
- Depth from fill, not lines: no borders around blocks; `<Divider />` only inside a block.
|
|
93
97
|
- Every scroll region is a `ScrollContainer` — never `overflow: auto` on a `div`: its hidden edges fade by themselves (`edges="shadow"` on a filled surface, `"none"` only for a page column), `scrollbar="hidden"` on strips, `snap` on strips of cards, `lock` to hold a list still, `anchor="end"` for a log. Kit components already scroll through it; do not wrap them again.
|
|
94
98
|
- Tabs are a bar, not a container: `Tabs.Root` stands in the host's padding and the panel content goes straight into `Tabs.Panel` — never a Card or a padded `div` around the tabs or inside a panel. In a Modal / Drawer, `Tabs.Root` wraps `X.Header` + `X.Body` and `Tabs.List` goes last into the header — not a tab strip at the top of the body.
|
|
95
99
|
|
|
96
100
|
## Tables
|
|
97
101
|
|
|
98
|
-
- A list page is a `<DataTable columns rows getRowKey>` under the page's `<SmartFilter.Root fields value onValueChange>` with `<SmartFilter.Toolbar />`
|
|
102
|
+
- A list page is a `<DataTable columns rows getRowKey>` under the page's `<SmartFilter.Root fields value onValueChange>` with `<SmartFilter.Toolbar />` in its `Page.Tools` and `<SmartFilter.Chips />` in its `Page.Chips` ([where the filters go](composition.md#where-the-filters-go)); filter rows with `matchesSmartFilter` — not a search Input and a row of Selects above the table.
|
|
99
103
|
- Search over a table or a list page is always SmartFilter, even with no filter fields yet (`fields={[]}` is a plain search that grows into filters). A search `Input` only outside a filtered list: inside a picker, a settings section, a panel.
|
|
100
104
|
- Paging is built in: `paging="pages"` (default) with `pageSize`, `paging="infinite"` for feeds, `paging="none"` for short lists — not a separate `<Pagination>` under a DataTable.
|
|
101
105
|
- Long lists are virtualized inside the kit: pass the whole array to `DataTable` (with `scrollHeight` or `paging="infinite"`; over 100 rows — grouped, `onReorder` and `renderExpanded` bodies render every row, keep those short or paged), `TagSelect options`, `Chat.Messages items`, `Gantt rows` — never slice it by hand, never wrap a kit list in react-window / react-virtual or your own windowing. Big remote data is still paged or loaded on scroll by the server (`source="server"`, `onLoadMore`).
|
|
@@ -167,12 +171,12 @@ State change is continuous in the whole kit: every region that changes what it s
|
|
|
167
171
|
- Refreshing data already on screen: keep it, set `aria-busy` — not back to a skeleton on every refetch.
|
|
168
172
|
- Table states in place: `loading` (+ `loadingRows`), `empty`, `loadError` on `DataTable` — the head and toolbar stay.
|
|
169
173
|
- First run of a page or region: `EmptyPage.Root` + `EmptyPage.Icon` + `EmptyPage.Title` + `EmptyPage.Description` + `EmptyPage.Actions` with one action — not «Здесь пока ничего нет».
|
|
170
|
-
- Page-level persistent problem: `<Banner.Root tone="danger">` first in `
|
|
174
|
+
- Page-level persistent problem: `<Banner.Root tone="danger">` first in `Page.Body`; the result of an action: `useNotifications().notify({ tone, title })`.
|
|
171
175
|
|
|
172
176
|
## Sidebar
|
|
173
177
|
|
|
174
178
|
- Brand header: `Sidebar.Header` > `Sidebar.Brand href description` (with `Sidebar.BrandLogo`) + `<Sidebar.Toggle variant="header" />` — not a Toggle in the footer when the rail has a brand.
|
|
175
|
-
- Off-canvas: `offCanvas="auto"` (default, below 768px), `"always"` for navigation behind a menu at any width, `"never"` for a rail that always stays; the
|
|
179
|
+
- Off-canvas: `offCanvas="auto"` (default, below 768px), `"always"` for navigation behind a menu at any width, `"never"` for a rail that always stays; the page's `Page.TopBar` draws the menu button that opens it — no menu state of your own; another trigger reads `useAppShellNav()`.
|
|
176
180
|
- Every item is a link (`href` or `asChild` with the router `NavLink`; `current` marks the page), with a `Sidebar.ItemIcon` on the [top-level items and sub-list parents](layouts.md#sidebar-icons).
|
|
177
181
|
- The signed-in user: `Sidebar.Account` inside `Dropdown.Trigger` at the end of `Sidebar.Footer`.
|
|
178
182
|
- Structure: everyday places on top without a label, categories as `Sidebar.Group label collapsible` (one short word, 3–7 items), views of one section as `Sidebar.Sub` (one level, the parent only discloses) — not every group folded, not a sub-list inside a sub-list.
|
|
@@ -183,20 +187,19 @@ State change is continuous in the whole kit: every region that changes what it s
|
|
|
183
187
|
|
|
184
188
|
Full rules: [responsive.md](responsive.md).
|
|
185
189
|
|
|
186
|
-
- The page panel is `<PageToolbar.Root>` with `Tools` (`SmartFilter.Toolbar`), `Sections` (a `fullWidth` SegmentedControl), `View`, `Actions`, `Chips` — it orders and wraps them itself ([the page panel](responsive.md#page-panel--pagetoolbar)); not a hand-made flex row of tabs, search and buttons.
|
|
187
190
|
- Rearrange, never hide: every desktop function is on the phone, in another place or a menu — not `display: none` below a breakpoint.
|
|
188
191
|
- Breakpoints only in [their scope](responsive.md#breakpoints); inside a page — [intrinsic grids](responsive.md#intrinsic-grids) and container queries.
|
|
189
192
|
- A wide table scrolls inside itself; offer `DataTable.ColumnsMenu` in its `toolbar` — never drop columns by breakpoint, never hand-build the chooser.
|
|
190
193
|
- A row that opens a record page is `getRowHref` (a real link: ⌘-click, new tab), a row that opens a drawer is `onRowClick` — never `navigate()` in `onRowClick`, never your own `event.target` checks for buttons in the row.
|
|
191
|
-
- A list + detail screen is `
|
|
194
|
+
- A list + detail screen is `Page.Split` (`Page.List`, `Page.Detail`) in a `Page.Root fill` page, its records a `List` (`current` on the open one) — never ghost Buttons with a soft current; a full-height table is `scrollHeight="fill"` — never a height computed from `100vh`.
|
|
192
195
|
- App sections on phones: `BottomNav` in `AppShell.Footer` — not in Main, not `position: fixed`, no own media query: the shell hides the footer while the Sidebar rail is on screen; a short task from the bottom edge: `Sheet` — Select, Dropdown, Popover and Modal become sheets below 640 by themselves.
|
|
193
196
|
- Your hover styles inside `@media (hover: hover)`; nothing hover-only. Do not wrap kit fields to raise their text for iOS — they keep 16px on touch already.
|
|
194
197
|
- A long form saves through the panel action with a count («Сохранить 3 изменения») — not a sticky bar at the bottom of a phone.
|
|
195
|
-
- Sticky comes from the kit (`
|
|
198
|
+
- Sticky comes from the kit (`Page.TopBar`, the DataTable head, `stickyFirstColumn`, the Gantt header) — not your own `position: sticky` bar.
|
|
196
199
|
|
|
197
200
|
## Spacing and values
|
|
198
201
|
|
|
199
|
-
- Gaps are `gap` on the parent with `--prime-space-N` (N × 4px): 8 in a row of buttons, 16 tile → tile, 20 field → field, 32 group → group; `
|
|
202
|
+
- Gaps are `gap` on the parent with `--prime-space-N` (N × 4px): 8 in a row of buttons, 16 tile → tile, 20 field → field, 32 group → group; `Page` already spaces blocks 24 and sections 40 — not margins, not outer padding.
|
|
200
203
|
- Tokens only: `var(--prime-space-4)`, `var(--prime-color-text-secondary)`, `var(--prime-radius-m)` — never raw `px` / `rem` / hex, never `--prime-ref-*`, never inline `style`.
|
|
201
204
|
- Text through `Typography` roles (`title-m`, `title-s`, `body-m`, `caption`) and its `tone` — not `font-size` or `color` in CSS ([text colour](foundations.md#text-colour)).
|
|
202
205
|
|
|
@@ -231,19 +234,21 @@ applyTheme("light");
|
|
|
231
234
|
The frame itself (providers, `AppShell` with the `Sidebar`) is built once too: copy it from
|
|
232
235
|
[layouts.md](layouts.md#app-frame-once-per-app).
|
|
233
236
|
|
|
234
|
-
A document page (a form) — its title
|
|
237
|
+
A document page (a form) — its large title stands in the flow:
|
|
235
238
|
|
|
236
239
|
```tsx
|
|
237
|
-
import { Button, Icon, Input,
|
|
240
|
+
import { Button, Icon, Input, Page } from "prime-ui-kit";
|
|
238
241
|
import styles from "./ProfilePage.module.css"; // .form { display: grid; gap: var(--prime-space-5); }
|
|
239
242
|
|
|
240
243
|
export function ProfilePage() {
|
|
241
244
|
return (
|
|
242
|
-
<
|
|
243
|
-
<
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
<Page.Root maxWidth="readable">
|
|
246
|
+
<Page.Header>
|
|
247
|
+
<Page.Heading>
|
|
248
|
+
<Page.Title>Профиль</Page.Title>
|
|
249
|
+
</Page.Heading>
|
|
250
|
+
</Page.Header>
|
|
251
|
+
<Page.Body>
|
|
247
252
|
<form className={styles.form} noValidate onSubmit={(event) => event.preventDefault()}>
|
|
248
253
|
<Input.Root label="Рабочая почта" hint="На неё придут счета" required>
|
|
249
254
|
<Input.Wrapper>
|
|
@@ -255,8 +260,8 @@ export function ProfilePage() {
|
|
|
255
260
|
</Input.Root>
|
|
256
261
|
<Button.Root type="submit">Сохранить</Button.Root>
|
|
257
262
|
</form>
|
|
258
|
-
</
|
|
259
|
-
</
|
|
263
|
+
</Page.Body>
|
|
264
|
+
</Page.Root>
|
|
260
265
|
);
|
|
261
266
|
}
|
|
262
267
|
```
|
package/dist/skill/checklist.md
CHANGED
|
@@ -5,8 +5,11 @@ checks.
|
|
|
5
5
|
|
|
6
6
|
## Composition
|
|
7
7
|
- [ ] The screen starts from the closest working screen and keeps its skeleton ([screens](composition.md#screens)).
|
|
8
|
-
- [ ]
|
|
9
|
-
- [ ] The
|
|
8
|
+
- [ ] One `Page.Title` per page, always an `<h1>`: a work screen titles itself in the `Page.Heading` of its `Page.TopBar`, a document page or an overview in a `Page.Header` in the flow ([page skeleton](composition.md#1-page-skeleton)).
|
|
9
|
+
- [ ] The top bar holds only this page's groups — `Page.Heading`, `Page.Tools`, `Page.Actions`, `Page.Chips` — no app-wide header or global search ([the top bar](composition.md#the-top-bar)).
|
|
10
|
+
- [ ] A nested record's path ends in its title on one line inside `Page.Heading`; no title row under the path ([the top bar](composition.md#the-top-bar)).
|
|
11
|
+
- [ ] Every button of the page is in one `Page.Actions`, the primary last, each with a `Button.Icon` ([the top bar](composition.md#the-top-bar)).
|
|
12
|
+
- [ ] `SmartFilter.Root` wraps `Page.Root`; its toolbar is in `Page.Tools`, its chips in `Page.Chips` ([the top bar](composition.md#the-top-bar)).
|
|
10
13
|
- [ ] A Card only for a standalone titled block — never around a table, a single field or the page ([surfaces](composition.md#4-surfaces)).
|
|
11
14
|
|
|
12
15
|
## UX ([ux.md](ux.md))
|
|
@@ -72,7 +75,8 @@ checks.
|
|
|
72
75
|
|
|
73
76
|
## Themes and widths
|
|
74
77
|
- [ ] The screen passes the responsive checklist in both themes ([responsive](responsive.md#checklist-before-handing-a-screen-over)).
|
|
75
|
-
- [ ] On a phone the Sidebar opens from the menu button the
|
|
78
|
+
- [ ] On a phone the Sidebar opens from the menu button the top bar draws; the page title stays in the bar ([app frame](layouts.md#app-frame-once-per-app)).
|
|
79
|
+
- [ ] At every width the bar fits: tools on their own line, then icon-only buttons, then «⋯», the primary always on screen ([the page's top bar](responsive.md#the-pages-top-bar--pagetopbar)).
|
|
76
80
|
|
|
77
81
|
## Keyboard and a11y
|
|
78
82
|
- [ ] Every action is reachable by Tab in reading order and works with Enter / Space ([interaction](responsive.md#interaction-and-accessibility)).
|
package/dist/skill/choosing.md
CHANGED
|
@@ -15,7 +15,7 @@ confuse. Links: [components.md](components.md). Whole screens: [composition.md](
|
|
|
15
15
|
| learn what happened, how far along it is, or watch a region load and change state; say it to a screen reader | Status and loading — Banner, Notification, ProgressBar, ProgressCircle, Spinner, Skeleton, Crossfade, EmptyPage, VisuallyHidden |
|
|
16
16
|
| move between places: app sections, panels of a screen, the records of a list, the path, pages, steps | Navigation — Tabs, Breadcrumb, Pagination, List, Stepper, Sidebar, BottomNav |
|
|
17
17
|
| see something on top of the page, or a photo or video full screen | Overlays — Tooltip, Popover, Dropdown, Modal, ConfirmDialog, Drawer, Sheet, CommandMenu, MediaViewer |
|
|
18
|
-
| get the app frame and the structure of a page, or a whole ready-made screen block (sign-in, sign-up, password reset, code) | Page — AppShell,
|
|
18
|
+
| get the app frame and the structure of a page, or a whole ready-made screen block (sign-in, sign-up, password reset, code) | Page — AppShell, Page, Divider, ScrollContainer, LoginForm |
|
|
19
19
|
| drag things by hand | Interaction — Dnd (a status board: Kanban in Data display) |
|
|
20
20
|
| style text | Foundations — Typography |
|
|
21
21
|
|
|
@@ -122,12 +122,13 @@ Drawer menu.
|
|
|
122
122
|
`Sidebar.Header` — at the header's end while expanded, a small round button on the rail's edge while
|
|
123
123
|
compact (the default for a branded rail); `Sidebar.Toggle` (`variant="item"`) in `Sidebar.Footer` when
|
|
124
124
|
the rail has no brand header. On phones the off-canvas Sidebar opens from the menu button the
|
|
125
|
-
`
|
|
126
|
-
panel is the page's `
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
`
|
|
125
|
+
page's `Page.TopBar` draws by itself; a trigger of your own reads `useAppShellNav()`. There is no
|
|
126
|
+
app-wide header: the bar at the top of the panel is the page's `Page.TopBar` — on a work screen the
|
|
127
|
+
title group (`Page.Heading`), the page's tools (`Page.Tools`), its buttons (`Page.Actions`) and the
|
|
128
|
+
active filters (`Page.Chips`) — [the top bar](composition.md#the-top-bar). A document
|
|
129
|
+
page (settings, a long form, help) or an overview has its large title in the flow (`Page.Header`
|
|
130
|
+
outside the bar), with an optional `Page.TopBar collapse` that repeats it once it scrolls away. A record opened from a table: its own page → DataTable `getRowHref`; in place →
|
|
131
|
+
`onRowClick` + Drawer; a list worked through record by record → `Page.Split` with a `List` of
|
|
131
132
|
the records (tickets, letters, invoices; `current` on the open one) or a `ChatList` of the
|
|
132
133
|
conversations. Sections of a long rail → `Sidebar.Group collapsible`; a section with sub-pages →
|
|
133
134
|
`Sidebar.Sub`; the signed-in user → `Sidebar.Account` in a `Dropdown.Trigger` at the bottom of
|
|
@@ -152,7 +153,7 @@ conversations. Sections of a long rail → `Sidebar.Group collapsible`; a sectio
|
|
|
152
153
|
| Gallery / MediaViewer / Thumbnail | Thumbnail: one picture or video of an object in a list, card or picker (selectable with `checked`). Gallery: an album of 1–10 photos and videos laid out by their ratios; it opens MediaViewer itself. MediaViewer: the full-screen viewer on its own, opened from your own thumbnails or a button (`getOrigin` for the zoom out of the tile). A grid of many images to browse → a CSS grid of Thumbnails, not a Gallery. |
|
|
153
154
|
| Sparkline / ChartFrame | Sparkline: one series as a headline number with its change and a small line or bars you can scrub (`variant="bars"` for signed values). ChartFrame: a panel around a real chart (axes, several series, legend, tooltip, states) drawn by a library or your SVG. Rows to compare → DataTable. |
|
|
154
155
|
| VoicePlayer / VideoNote | The same player props (`src`, `duration`, `playing`, transcript, `transfer`). VoicePlayer: audio, a waveform seek slider and a playback rate. VideoNote: a round face-to-camera video with a `poster`; alone in `Message.Root` it is the message. A video with controls → `Thumbnail.Video` / `Message.Media`. |
|
|
155
|
-
| Card / plain section / Grid | Card for a bounded block of related content that stands out (metric, settings panel, side facts). A page section that is the only thing in its region needs no card: `
|
|
156
|
+
| Card / plain section / Grid | Card for a bounded block of related content that stands out (metric, settings panel, side facts). A page section that is the only thing in its region needs no card: `Page.Section label` and the content. Several tiles of one screen → one `Page.Grid` with a `Page.Cell span` each; a grid inside one block (thumbnails, fields) is the block's own CSS. Never wrap a single field, a DataTable or a whole page in a Card. |
|
|
156
157
|
| EmptyPage / empty DataTable | Empty table (no rows yet or nothing matches the filter): the DataTable `empty` prop — headers and toolbar stay. Whole page or region with no data at all (first run): EmptyPage with one action. |
|
|
157
158
|
| Accordion / Tabs | Accordion when the user may need several sections open or reads them in order (FAQ, settings groups). Tabs when sections are alternatives viewed one at a time. |
|
|
158
159
|
| Divider / gap | Divider inside a block between rows or a form and its footer. Between blocks and groups use air (`gap`), not lines. |
|
package/dist/skill/components.md
CHANGED
|
@@ -145,14 +145,12 @@ Floating layers above the page, from tooltip to modal.
|
|
|
145
145
|
|
|
146
146
|
## Page (`page`)
|
|
147
147
|
|
|
148
|
-
The frame and structure of a screen: app shell,
|
|
148
|
+
The frame and structure of a screen: app shell, the page (its top bar, header, tools, sections, grid, list and detail), separators, scroll regions, and ready-made screen blocks (sign-in).
|
|
149
149
|
|
|
150
150
|
| Component | Purpose | Docs |
|
|
151
151
|
|---|---|---|
|
|
152
|
-
| AppShell | The app frame: a content panel that is the page itself and a navigation rail one layer above it. | [COMPONENT.md](reference/layout/app-shell/COMPONENT.md) · [examples](reference/layout/app-shell/examples/) |
|
|
153
|
-
|
|
|
154
|
-
| PageContent | Page structure inside the main column: title, page actions and content blocks, titled sections and the tile grid of a dashboard; a page as high as the panel and the list + detail layout. | [COMPONENT.md](reference/components/page-content/COMPONENT.md) · [examples](reference/components/page-content/examples/) |
|
|
155
|
-
| PageToolbar | The panel at the top of a page — sections, filter and search, view options and the primary action — laid out from its own width: one row when wide, stacked rows when narrow, search and filter always first with the active filters under the top row. | [COMPONENT.md](reference/components/page-toolbar/COMPONENT.md) · [examples](reference/components/page-toolbar/examples/) |
|
|
152
|
+
| AppShell | The app frame — navigation and the page: a content panel that is the page itself and a navigation rail one layer above it. | [COMPONENT.md](reference/layout/app-shell/COMPONENT.md) · [examples](reference/layout/app-shell/examples/) |
|
|
153
|
+
| Page | The page inside the app frame: everything at the top belongs to it — a top bar with the title, tools and buttons, the large document title in the flow — then sections, the tile grid and the list + detail layout. | [COMPONENT.md](reference/layout/page/COMPONENT.md) · [examples](reference/layout/page/examples/) |
|
|
156
154
|
| Divider | A hairline separator inside one surface, horizontal or vertical, with or without a label. | [COMPONENT.md](reference/components/divider/COMPONENT.md) · [examples](reference/components/divider/examples/) |
|
|
157
155
|
| ScrollContainer | The kit's one scroll region: a thin scrollbar, soft edges wherever content is hidden, and correct shrinking inside flex and grid parents. | [COMPONENT.md](reference/components/scroll-container/COMPONENT.md) · [examples](reference/components/scroll-container/examples/) |
|
|
158
156
|
| LoginForm | A sign-in card with a logo, title, provider buttons and a form; covers sign-in, sign-up, password reset and code confirmation. | [COMPONENT.md](reference/components/login-form/COMPONENT.md) · [examples](reference/components/login-form/examples/) |
|