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
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** Screen states: the title and the date of the statement in
|
|
1
|
+
/** Screen states: the title and the date of the statement in its top bar, a page-level error in a Banner with a retry, a region loading with a Skeleton of its rows and a table skeleton, the table error in place and a first-run EmptyPage; regions cross-fade between states — `state`. */
|
|
2
2
|
import {
|
|
3
|
-
AppHeader,
|
|
4
3
|
Banner,
|
|
5
4
|
Button,
|
|
6
5
|
Card,
|
|
@@ -10,7 +9,7 @@ import {
|
|
|
10
9
|
DescriptionList,
|
|
11
10
|
EmptyPage,
|
|
12
11
|
Icon,
|
|
13
|
-
|
|
12
|
+
Page,
|
|
14
13
|
Skeleton,
|
|
15
14
|
Typography,
|
|
16
15
|
useNotifications,
|
|
@@ -68,119 +67,115 @@ export default function CrossfadeScreenExample() {
|
|
|
68
67
|
};
|
|
69
68
|
|
|
70
69
|
return (
|
|
71
|
-
|
|
72
|
-
{/*
|
|
73
|
-
statement — it moves on once the statement arrives.
|
|
74
|
-
<AppHeader.Root>
|
|
75
|
-
<AppHeader.Start>
|
|
76
|
-
<AppHeader.Title>
|
|
77
|
-
Сверка с банком
|
|
78
|
-
<AppHeader.Description>
|
|
79
|
-
2 счёта · выписка на {status === "ready" ? "7" : "6"} октября
|
|
80
|
-
</AppHeader.Description>
|
|
81
|
-
</AppHeader.Title>
|
|
82
|
-
</AppHeader.Start>
|
|
83
|
-
</AppHeader.Root>
|
|
70
|
+
<Page.Root>
|
|
71
|
+
{/* A work screen titles itself in its top bar: the only h1 and a line of data, here the date of
|
|
72
|
+
the last statement — it moves on once the statement arrives. */}
|
|
84
73
|
|
|
85
|
-
<
|
|
86
|
-
<
|
|
87
|
-
|
|
74
|
+
<Page.TopBar>
|
|
75
|
+
<Page.Heading>
|
|
76
|
+
<Page.Title>Сверка с банком</Page.Title>
|
|
77
|
+
<Page.Description>
|
|
78
|
+
2 счёта · выписка на {status === "ready" ? "7" : "6"} октября
|
|
79
|
+
</Page.Description>
|
|
80
|
+
</Page.Heading>
|
|
81
|
+
</Page.TopBar>
|
|
82
|
+
<Page.Body>
|
|
83
|
+
{/* The page banner and the panels are one block: the banner, with the 40 below it, comes and
|
|
88
84
|
goes inside a Crossfade, so the panels glide instead of jumping. */}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
85
|
+
<div className={styles.lead}>
|
|
86
|
+
<Crossfade state={status === "error" ? "error" : "ok"}>
|
|
87
|
+
{status === "error" ? (
|
|
88
|
+
<div className={styles.bannerSlot}>
|
|
89
|
+
<Banner.Root tone="danger">
|
|
90
|
+
<Banner.Content>
|
|
91
|
+
<Banner.Icon>
|
|
92
|
+
<Icon name="status.danger" />
|
|
93
|
+
</Banner.Icon>
|
|
94
|
+
<Banner.Title>Выписка за 7 октября не получена</Banner.Title>
|
|
95
|
+
<Banner.Description>
|
|
96
|
+
Т-Банк не ответил на запрос. Остатки показаны на 6 октября.
|
|
97
|
+
</Banner.Description>
|
|
98
|
+
<Banner.Actions>
|
|
99
|
+
<Button.Root tone="danger" onClick={retry}>
|
|
100
|
+
Повторить
|
|
101
|
+
</Button.Root>
|
|
102
|
+
</Banner.Actions>
|
|
103
|
+
</Banner.Content>
|
|
104
|
+
</Banner.Root>
|
|
105
|
+
</div>
|
|
106
|
+
) : null}
|
|
107
|
+
</Crossfade>
|
|
112
108
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
109
|
+
<Page.Grid>
|
|
110
|
+
<Page.Cell span={6}>
|
|
111
|
+
<Card.Root variant="panel" aria-busy={status === "loading"}>
|
|
112
|
+
<Card.Header>
|
|
113
|
+
<Card.Title as="h2">Остатки</Card.Title>
|
|
114
|
+
<Typography as="span" variant="caption" tone="muted">
|
|
115
|
+
{status === "ready" ? "на 7 октября" : "на 6 октября"}
|
|
116
|
+
</Typography>
|
|
117
|
+
</Card.Header>
|
|
118
|
+
<Card.Body>
|
|
119
|
+
{/* Loading ↔ data cross-fade in place; the table below swaps its body the same way. */}
|
|
120
|
+
<Crossfade state={status === "loading" ? "loading" : "ready"}>
|
|
121
|
+
{/* The accounts are known: only their balances wait, as bars of the value. */}
|
|
122
|
+
<DescriptionList.Root>
|
|
123
|
+
{ACCOUNTS.map((account) => (
|
|
124
|
+
<DescriptionList.Item key={account.name} label={account.name}>
|
|
125
|
+
{status === "loading" ? (
|
|
126
|
+
<Skeleton className={styles.balanceBar} />
|
|
127
|
+
) : (
|
|
128
|
+
account.balance
|
|
129
|
+
)}
|
|
130
|
+
</DescriptionList.Item>
|
|
131
|
+
))}
|
|
132
|
+
</DescriptionList.Root>
|
|
133
|
+
</Crossfade>
|
|
134
|
+
</Card.Body>
|
|
135
|
+
</Card.Root>
|
|
136
|
+
</Page.Cell>
|
|
141
137
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
138
|
+
<Page.Cell span={6}>
|
|
139
|
+
<Card.Root variant="panel">
|
|
140
|
+
<Card.Header>
|
|
141
|
+
<Card.Title as="h2">Правила разнесения</Card.Title>
|
|
142
|
+
</Card.Header>
|
|
143
|
+
<Card.Body>
|
|
144
|
+
<EmptyPage.Root size="s" aria-labelledby="rules-empty">
|
|
145
|
+
<EmptyPage.Icon tone="accent">
|
|
146
|
+
<Icon name="action.filter" />
|
|
147
|
+
</EmptyPage.Icon>
|
|
148
|
+
<EmptyPage.Title as="h3" id="rules-empty">
|
|
149
|
+
Правил пока нет
|
|
150
|
+
</EmptyPage.Title>
|
|
151
|
+
<EmptyPage.Description>
|
|
152
|
+
Правило свяжет платёж со счётом по ИНН или назначению.
|
|
153
|
+
</EmptyPage.Description>
|
|
154
|
+
<EmptyPage.Actions>
|
|
155
|
+
<Button.Root variant="soft" tone="neutral">
|
|
156
|
+
Создать правило
|
|
157
|
+
</Button.Root>
|
|
158
|
+
</EmptyPage.Actions>
|
|
159
|
+
</EmptyPage.Root>
|
|
160
|
+
</Card.Body>
|
|
161
|
+
</Card.Root>
|
|
162
|
+
</Page.Cell>
|
|
163
|
+
</Page.Grid>
|
|
164
|
+
</div>
|
|
169
165
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
</>
|
|
166
|
+
<Page.Section label="Неразнесённые платежи">
|
|
167
|
+
<DataTable
|
|
168
|
+
columns={COLUMNS}
|
|
169
|
+
rows={status === "ready" ? PAYMENTS : []}
|
|
170
|
+
getRowKey={(row) => row.id}
|
|
171
|
+
paging="none"
|
|
172
|
+
loading={status === "loading"}
|
|
173
|
+
loadingRows={3}
|
|
174
|
+
loadError={status === "error" ? "Платежи появятся после загрузки выписки" : undefined}
|
|
175
|
+
empty="Все платежи разнесены"
|
|
176
|
+
/>
|
|
177
|
+
</Page.Section>
|
|
178
|
+
</Page.Body>
|
|
179
|
+
</Page.Root>
|
|
185
180
|
);
|
|
186
181
|
}
|
|
@@ -98,7 +98,7 @@ Generic `DataTable<Row>`; `ref` → `HTMLDivElement`. A card-fill block with an
|
|
|
98
98
|
| `stickyHeader` | `boolean` | `false` | The head sticks while the body scrolls (with `scrollHeight`); on screens lower than 480px it scrolls with the rows. |
|
|
99
99
|
| `stickyFirstColumn` | `boolean` | `false` | The first visible column (with the selection and toggle columns) sticks while scrolling sideways; the start edge shadow falls from its end edge. |
|
|
100
100
|
| `showHeader` | `boolean` | `true` | Render `<thead>`. |
|
|
101
|
-
| `fullWidth` | `boolean` | `true` | The table spans its container; `false` sizes
|
|
101
|
+
| `fullWidth` | `boolean` | `true` | The table spans its container; `false` sizes the table and its surface by its content (up to the container's width, then it scrolls). |
|
|
102
102
|
| `rowDividers` | `boolean` | `true` | Hairlines between rows. |
|
|
103
103
|
| `columnDividers` | `boolean` | `true` | Hairlines between content columns. |
|
|
104
104
|
| `striped` | `boolean` | `false` | Every second row one opaque step off the table fill. |
|
|
@@ -193,7 +193,7 @@ on screen.
|
|
|
193
193
|
| Value | Looks like | Use when | Default |
|
|
194
194
|
|---|---|---|---|
|
|
195
195
|
| a number / a CSS length | the viewport grows with the rows up to that height, then scrolls | a table inside a card or a dashboard block | 360 with `paging="infinite"`, else none |
|
|
196
|
-
| `"fill"` | the table takes the height of its flex / grid parent (or a sized block); toolbar and footer keep theirs, the rows scroll | a log or a register that takes the rest of the page (`
|
|
196
|
+
| `"fill"` | the table takes the height of its flex / grid parent (or a sized block); toolbar and footer keep theirs, the rows scroll | a log or a register that takes the rest of the page (`Page.Root fill`), a pane | |
|
|
197
197
|
|
|
198
198
|
### Opening a row
|
|
199
199
|
| Value | Looks like | Use when | Default |
|
|
@@ -275,7 +275,7 @@ Root attributes: `data-size`, `data-row-dividers`, `data-column-dividers`, `data
|
|
|
275
275
|
- The empty and error content stands in a sticky box of the visible width: a wide table centres it in the viewport, and it stays there while the table scrolls sideways.
|
|
276
276
|
- A trend per row: a compact [Sparkline](../sparkline/COMPONENT.md) (`layout="compact"`) in a cell fits the row height; its pointer and keys never open the row.
|
|
277
277
|
- Long data needs no slicing: past 100 rows a body in a bounded viewport (`scrollHeight`, `"fill"`, `paging="infinite"`) renders only the rows around the view; spacer rows keep the scrollbar exact, the focused row stays rendered, rows carry `aria-rowindex` and the table `aria-rowcount`. Grouped (`getRowGroup`), reorderable (`onReorder`) and `renderExpanded` bodies, and a table the page scrolls, render every row. The browser's find-in-page sees only rendered rows: give a long table a search in `toolbar`.
|
|
278
|
-
- `scrollHeight="fill"` needs a parent with a height: a flex or grid column with `min-height: 0`, `
|
|
278
|
+
- `scrollHeight="fill"` needs a parent with a height: a flex or grid column with `min-height: 0`, `Page.Root fill` in an `AppShell.Root fillViewport`, or a sized pane.
|
|
279
279
|
- The sticky head stops sticking on screens lower than 480px (landscape phones), so it never takes a large share of the height.
|
|
280
280
|
- Cell content: text, two-line text (title + `caption`), an Avatar with text, a Badge, or a control one tier down (`s` in an `m` table). Toolbar controls use `s` in an `m` table.
|
|
281
281
|
- Column widths: `width` / `minWidth` / `maxWidth` strings; never size cells with custom CSS.
|
|
@@ -358,7 +358,7 @@ Root attributes: `data-size`, `data-row-dividers`, `data-column-dividers`, `data
|
|
|
358
358
|
| [states.tsx](examples/states.tsx) | Loading skeleton, an empty period and a load error with a retry: the head stays, only the body changes — `loading`, `loadingRows`, `empty`, `loadError`. |
|
|
359
359
|
| [controlled.tsx](examples/controlled.tsx) | Sort, page and the column choice owned by the parent (a URL or a store): a header click goes asc → desc → none, a new sort returns to page 1 — `sort`, `onSortChange`, `page`, `onPageChange`, `hiddenColumns`, `onHiddenColumnsChange`. |
|
|
360
360
|
| [narrow.tsx](examples/narrow.tsx) | A 320 px support queue: columns scroll inside the table with the first one pinned, the toolbar and footer reflow and the pager turns compact — `stickyFirstColumn`, `size`. |
|
|
361
|
-
| [screen.tsx](examples/screen.tsx) | A list page: the title, a line of figures, search, filters and the one primary action in
|
|
361
|
+
| [screen.tsx](examples/screen.tsx) | A list page: the title, a line of figures, search, filters and the one primary action in its top bar, a DataTable of invoices with statuses, row actions, pages and a filtered empty state — `empty`, `pageSize`, `stickyFirstColumn`. |
|
|
362
362
|
|
|
363
363
|
## Mistakes
|
|
364
364
|
- No `getRowKey` with `selectable`, expansion or sorting → selection follows positions, not records.
|
|
@@ -389,4 +389,4 @@ Root attributes: `data-size`, `data-row-dividers`, `data-column-dividers`, `data
|
|
|
389
389
|
|
|
390
390
|
## Related
|
|
391
391
|
- **Built from:** [Checkbox](../checkbox/COMPONENT.md), [Button](../button/COMPONENT.md), [Dropdown](../dropdown/COMPONENT.md) (`DataTable.ColumnsMenu`), [Pagination](../pagination/COMPONENT.md), [ScrollContainer](../scroll-container/COMPONENT.md), [EmptyPage](../empty-page/COMPONENT.md), [VisuallyHidden](../visually-hidden/COMPONENT.md) (loading status, selection announcement), [Skeleton](../skeleton/COMPONENT.md) (loading rows, in the table tier), [Dnd](../dnd/COMPONENT.md) (`onReorder`: `Dnd.Sortable as="tbody"`, `Dnd.Handle`), [Tooltip](../tooltip/COMPONENT.md) (handle hint), Icon (sort arrows, the expand chevron, the `DataTable.ColumnsMenu` trigger); `useVirtualRows` (the window of a long body)
|
|
392
|
-
- **See also:** [Sparkline](../sparkline/COMPONENT.md) (`layout="compact"` in a cell), [SmartFilter](../smart-filter/COMPONENT.md), [
|
|
392
|
+
- **See also:** [Sparkline](../sparkline/COMPONENT.md) (`layout="compact"` in a cell), [SmartFilter](../smart-filter/COMPONENT.md), [Page](../../layout/page/COMPONENT.md) (`Page.Tools`, `Page.Chips`), [Gantt](../gantt/COMPONENT.md), [Kanban](../kanban/COMPONENT.md), [Badge](../badge/COMPONENT.md), [Avatar](../avatar/COMPONENT.md), [Card](../card/COMPONENT.md)
|
|
@@ -11,6 +11,15 @@
|
|
|
11
11
|
min-width: 0;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
/* A SmartFilter in the toolbar: the search and filter row over the applied filters. */
|
|
15
|
+
.filterColumn {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex: 1 1 auto;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: var(--prime-space-3);
|
|
20
|
+
min-width: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
.filters {
|
|
15
24
|
display: flex;
|
|
16
25
|
flex: 1 1 auto;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** A list page: the title, a line of figures, search, filters and the one primary action in
|
|
1
|
+
/** A list page: the title, a line of figures, search, filters and the one primary action in its top bar, a DataTable of invoices with statuses, row actions, pages and a filtered empty state — `empty`, `pageSize`, `stickyFirstColumn`. */
|
|
2
2
|
import {
|
|
3
|
-
AppHeader,
|
|
4
3
|
Avatar,
|
|
5
4
|
Badge,
|
|
6
5
|
Button,
|
|
@@ -10,8 +9,7 @@ import {
|
|
|
10
9
|
EmptyPage,
|
|
11
10
|
Icon,
|
|
12
11
|
matchesSmartFilter,
|
|
13
|
-
|
|
14
|
-
PageToolbar,
|
|
12
|
+
Page,
|
|
15
13
|
SmartFilter,
|
|
16
14
|
type SmartFilterField,
|
|
17
15
|
type SmartFilterValue,
|
|
@@ -278,51 +276,43 @@ export default function DataTableScreenExample() {
|
|
|
278
276
|
};
|
|
279
277
|
|
|
280
278
|
return (
|
|
281
|
-
|
|
282
|
-
{
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
<
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
>
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
</PageToolbar.Chips>
|
|
319
|
-
</PageToolbar.Root>
|
|
320
|
-
</SmartFilter.Root>
|
|
321
|
-
</AppHeader.Tools>
|
|
322
|
-
</AppHeader.Root>
|
|
323
|
-
|
|
324
|
-
<PageContent.Root>
|
|
325
|
-
<PageContent.Body>
|
|
279
|
+
<SmartFilter.Root
|
|
280
|
+
fields={FIELDS}
|
|
281
|
+
value={filter}
|
|
282
|
+
onValueChange={setFilter}
|
|
283
|
+
search={search}
|
|
284
|
+
onSearchChange={setSearch}
|
|
285
|
+
>
|
|
286
|
+
<Page.Root>
|
|
287
|
+
{/* A work screen titles itself in its top bar: the only h1, a line of figures under it, the
|
|
288
|
+
page's search and filters, then export and the one primary action. */}
|
|
289
|
+
<Page.TopBar>
|
|
290
|
+
<Page.Heading>
|
|
291
|
+
<Page.Title>Счета</Page.Title>
|
|
292
|
+
<Page.Description>{SUMMARY}</Page.Description>
|
|
293
|
+
</Page.Heading>
|
|
294
|
+
<Page.Tools aria-label="Счета">
|
|
295
|
+
<SmartFilter.Toolbar />
|
|
296
|
+
</Page.Tools>
|
|
297
|
+
<Page.Actions>
|
|
298
|
+
<Button.Root variant="soft" tone="neutral">
|
|
299
|
+
<Button.Icon>
|
|
300
|
+
<Icon name="action.download" />
|
|
301
|
+
</Button.Icon>
|
|
302
|
+
Экспорт
|
|
303
|
+
</Button.Root>
|
|
304
|
+
<Button.Root>
|
|
305
|
+
<Button.Icon>
|
|
306
|
+
<Icon name="action.add" />
|
|
307
|
+
</Button.Icon>
|
|
308
|
+
Новый счёт
|
|
309
|
+
</Button.Root>
|
|
310
|
+
</Page.Actions>
|
|
311
|
+
<Page.Chips>
|
|
312
|
+
<SmartFilter.Chips />
|
|
313
|
+
</Page.Chips>
|
|
314
|
+
</Page.TopBar>
|
|
315
|
+
<Page.Body>
|
|
326
316
|
<DataTable
|
|
327
317
|
columns={COLUMNS}
|
|
328
318
|
rows={rows}
|
|
@@ -348,8 +338,8 @@ export default function DataTableScreenExample() {
|
|
|
348
338
|
</EmptyPage.Root>
|
|
349
339
|
}
|
|
350
340
|
/>
|
|
351
|
-
</
|
|
352
|
-
</
|
|
353
|
-
|
|
341
|
+
</Page.Body>
|
|
342
|
+
</Page.Root>
|
|
343
|
+
</SmartFilter.Root>
|
|
354
344
|
);
|
|
355
345
|
}
|
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
} from "prime-ui-kit";
|
|
12
12
|
import * as React from "react";
|
|
13
13
|
|
|
14
|
+
import styles from "./examples.module.css";
|
|
15
|
+
|
|
14
16
|
type Stage = "new" | "talks" | "won" | "lost";
|
|
15
17
|
type Deal = { id: number; client: string; manager: string; stage: Stage; amount: number };
|
|
16
18
|
type DealsRequest = {
|
|
@@ -172,8 +174,10 @@ export default function DataTableServerExample() {
|
|
|
172
174
|
search={search}
|
|
173
175
|
onSearchChange={changeSearch}
|
|
174
176
|
>
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
+
<div className={styles.filterColumn}>
|
|
178
|
+
<SmartFilter.Toolbar />
|
|
179
|
+
<SmartFilter.Chips />
|
|
180
|
+
</div>
|
|
177
181
|
</SmartFilter.Root>
|
|
178
182
|
}
|
|
179
183
|
/>
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
import { Card, Datepicker, type DatepickerRange } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
|
+
import styles from "./examples.module.css";
|
|
6
|
+
|
|
5
7
|
export default function DatepickerInlinePanelExample() {
|
|
6
8
|
const [stay, setStay] = React.useState<DatepickerRange>({ from: null, to: null });
|
|
7
9
|
return (
|
|
8
|
-
<Card.Root>
|
|
10
|
+
<Card.Root className={styles.booking}>
|
|
9
11
|
<Card.Body>
|
|
10
12
|
<Datepicker.Panel mode="range" value={stay} onValueChange={setStay} months={2} prompt />
|
|
11
13
|
</Card.Body>
|
|
@@ -134,7 +134,7 @@ No motion: the list is static text; a row action has the Button's own press and
|
|
|
134
134
|
| [vertical.tsx](examples/vertical.tsx) | Labels above their values at any width, for a side panel of a record — `orientation`. |
|
|
135
135
|
| [totals.tsx](examples/totals.tsx) | The totals of an invoice: every amount at the end of its row in tabular figures, the amount due a step larger — `align`. |
|
|
136
136
|
| [narrow.tsx](examples/narrow.tsx) | In a 320 px card the list is narrower than 24rem: each label moves above its value and long values wrap — `DescriptionList.Item`, `label`. |
|
|
137
|
-
| [screen.tsx](examples/screen.tsx) | A nested record: the path, the title with its status and due date and the record's actions by weight in
|
|
137
|
+
| [screen.tsx](examples/screen.tsx) | A nested record: the path, the title with its status and due date and the record's actions by weight in its top bar, a main column with the line items and their totals and a side column with the client's details and the history — `align`, `orientation`. |
|
|
138
138
|
|
|
139
139
|
## Mistakes
|
|
140
140
|
- A grid of `Typography` pairs or a two-column table for record details → `DescriptionList`: the `<dl>` semantics and the stacking come with it.
|