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
|
-
/** A create form in a Drawer opened from the primary action in
|
|
1
|
+
/** A create form in a Drawer opened from the primary action in its top bar: grouped fields, errors on submit with focus on the first invalid field, a loading submit, a toast and the new row in the list — `Drawer.Trigger`, `Drawer.Guard`. */
|
|
2
2
|
import {
|
|
3
|
-
AppHeader,
|
|
4
3
|
Badge,
|
|
5
4
|
Button,
|
|
6
5
|
Checkbox,
|
|
@@ -10,8 +9,7 @@ import {
|
|
|
10
9
|
Fieldset,
|
|
11
10
|
Icon,
|
|
12
11
|
Input,
|
|
13
|
-
|
|
14
|
-
PageToolbar,
|
|
12
|
+
Page,
|
|
15
13
|
Radio,
|
|
16
14
|
Select,
|
|
17
15
|
SmartFilter,
|
|
@@ -128,162 +126,141 @@ export default function DrawerScreenExample() {
|
|
|
128
126
|
const people = clients.filter((client) => client.kind === "person").length;
|
|
129
127
|
|
|
130
128
|
return (
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
<
|
|
129
|
+
<SmartFilter.Root fields={[]} search={search} onSearchChange={setSearch}>
|
|
130
|
+
<Page.Root>
|
|
131
|
+
{/* A work screen titles itself in its top bar: the only h1, the counts under it, the search
|
|
132
|
+
and the one primary action — the Drawer trigger. */}
|
|
133
|
+
<Page.TopBar>
|
|
134
|
+
<Page.Heading>
|
|
135
|
+
<Page.Title>Клиенты</Page.Title>
|
|
136
|
+
<Page.Description>
|
|
139
137
|
{plural(clients.length, CLIENT_WORDS)} ·{" "}
|
|
140
138
|
{plural(clients.length - people, COMPANY_WORDS)} и {people} ИП
|
|
141
|
-
</
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
139
|
+
</Page.Description>
|
|
140
|
+
</Page.Heading>
|
|
141
|
+
<Page.Tools aria-label="Клиенты">
|
|
142
|
+
<SmartFilter.Toolbar />
|
|
143
|
+
</Page.Tools>
|
|
144
|
+
<Page.Actions>
|
|
145
|
+
<Drawer.Root open={open} onOpenChange={changeOpen}>
|
|
146
|
+
<Drawer.Trigger>
|
|
147
|
+
<Button.Root>
|
|
148
|
+
<Button.Icon>
|
|
149
|
+
<Icon name="action.add" />
|
|
150
|
+
</Button.Icon>
|
|
151
|
+
Новый клиент
|
|
152
|
+
</Button.Root>
|
|
153
|
+
</Drawer.Trigger>
|
|
154
|
+
<Drawer.Content>
|
|
155
|
+
<Drawer.Header>
|
|
156
|
+
<Drawer.Title>Новый клиент</Drawer.Title>
|
|
157
|
+
<Drawer.Description>
|
|
158
|
+
Появится в списке и в выборе клиента при выставлении счёта.
|
|
159
|
+
</Drawer.Description>
|
|
160
|
+
</Drawer.Header>
|
|
161
|
+
<Drawer.Body>
|
|
162
|
+
<Drawer.Guard busy={saving} dirty={dirty} />
|
|
163
|
+
<form
|
|
164
|
+
id={formId}
|
|
165
|
+
className={styles.form}
|
|
166
|
+
noValidate
|
|
167
|
+
onSubmit={submit}
|
|
168
|
+
onChange={() => setDirty(true)}
|
|
169
|
+
>
|
|
170
|
+
<Fieldset label="Реквизиты" disabled={saving}>
|
|
171
|
+
<Radio.Group
|
|
172
|
+
name="kind"
|
|
173
|
+
label="Тип клиента"
|
|
174
|
+
defaultValue="company"
|
|
175
|
+
orientation="horizontal"
|
|
175
176
|
>
|
|
176
|
-
<
|
|
177
|
-
<Radio.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
<
|
|
200
|
-
<Input.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
</Checkbox.Root>
|
|
264
|
-
</Fieldset>
|
|
265
|
-
</form>
|
|
266
|
-
</Drawer.Body>
|
|
267
|
-
<Drawer.Footer>
|
|
268
|
-
<Drawer.Close>
|
|
269
|
-
<Button.Root variant="outline" tone="neutral">
|
|
270
|
-
Отмена
|
|
271
|
-
</Button.Root>
|
|
272
|
-
</Drawer.Close>
|
|
273
|
-
<Button.Root type="submit" form={formId} loading={saving}>
|
|
274
|
-
Добавить клиента
|
|
275
|
-
</Button.Root>
|
|
276
|
-
</Drawer.Footer>
|
|
277
|
-
</Drawer.Content>
|
|
278
|
-
</Drawer.Root>
|
|
279
|
-
</PageToolbar.Actions>
|
|
280
|
-
</PageToolbar.Root>
|
|
281
|
-
</SmartFilter.Root>
|
|
282
|
-
</AppHeader.Tools>
|
|
283
|
-
</AppHeader.Root>
|
|
284
|
-
|
|
285
|
-
<PageContent.Root>
|
|
286
|
-
<PageContent.Body>
|
|
177
|
+
<Radio.Root value="company">
|
|
178
|
+
<Radio.Label>Компания</Radio.Label>
|
|
179
|
+
</Radio.Root>
|
|
180
|
+
<Radio.Root value="person">
|
|
181
|
+
<Radio.Label>ИП</Radio.Label>
|
|
182
|
+
</Radio.Root>
|
|
183
|
+
</Radio.Group>
|
|
184
|
+
<Input.Root label="Название" error={errors.name}>
|
|
185
|
+
<Input.Wrapper>
|
|
186
|
+
<Input.Field
|
|
187
|
+
name="name"
|
|
188
|
+
placeholder="ООО «Ромашка»"
|
|
189
|
+
autoComplete="organization"
|
|
190
|
+
/>
|
|
191
|
+
</Input.Wrapper>
|
|
192
|
+
</Input.Root>
|
|
193
|
+
<div className={styles.pair}>
|
|
194
|
+
<Input.Root label="ИНН" error={errors.inn} reserveSupportRow>
|
|
195
|
+
<Input.Wrapper>
|
|
196
|
+
<Input.Field name="inn" inputMode="numeric" placeholder="7704512908" />
|
|
197
|
+
</Input.Wrapper>
|
|
198
|
+
</Input.Root>
|
|
199
|
+
<Input.Root label="КПП" optional reserveSupportRow>
|
|
200
|
+
<Input.Wrapper>
|
|
201
|
+
<Input.Field name="kpp" inputMode="numeric" placeholder="770401001" />
|
|
202
|
+
</Input.Wrapper>
|
|
203
|
+
</Input.Root>
|
|
204
|
+
</div>
|
|
205
|
+
</Fieldset>
|
|
206
|
+
<Fieldset label="Контакты" disabled={saving}>
|
|
207
|
+
<Input.Root
|
|
208
|
+
label="Почта для счетов"
|
|
209
|
+
error={errors.email}
|
|
210
|
+
hint="На неё уйдут счета и акты"
|
|
211
|
+
>
|
|
212
|
+
<Input.Wrapper>
|
|
213
|
+
<Input.Icon side="start">
|
|
214
|
+
<Icon name="field.email" />
|
|
215
|
+
</Input.Icon>
|
|
216
|
+
<Input.Field name="email" type="email" placeholder="billing@company.ru" />
|
|
217
|
+
</Input.Wrapper>
|
|
218
|
+
</Input.Root>
|
|
219
|
+
<Select.Root
|
|
220
|
+
label="Менеджер"
|
|
221
|
+
value={manager}
|
|
222
|
+
onValueChange={(next) => {
|
|
223
|
+
setManager(next);
|
|
224
|
+
setDirty(true);
|
|
225
|
+
}}
|
|
226
|
+
>
|
|
227
|
+
<Select.Trigger>
|
|
228
|
+
<Select.Value />
|
|
229
|
+
</Select.Trigger>
|
|
230
|
+
<Select.Content>
|
|
231
|
+
{MANAGERS.map((name) => (
|
|
232
|
+
<Select.Item key={name} value={name}>
|
|
233
|
+
{name}
|
|
234
|
+
</Select.Item>
|
|
235
|
+
))}
|
|
236
|
+
</Select.Content>
|
|
237
|
+
</Select.Root>
|
|
238
|
+
<Textarea.Root name="note" label="Комментарий" optional rows={2} />
|
|
239
|
+
<Checkbox.Root
|
|
240
|
+
name="invite"
|
|
241
|
+
defaultChecked
|
|
242
|
+
hint="Клиент увидит свои счета и акты онлайн"
|
|
243
|
+
>
|
|
244
|
+
<Checkbox.Label>Пригласить в личный кабинет</Checkbox.Label>
|
|
245
|
+
</Checkbox.Root>
|
|
246
|
+
</Fieldset>
|
|
247
|
+
</form>
|
|
248
|
+
</Drawer.Body>
|
|
249
|
+
<Drawer.Footer>
|
|
250
|
+
<Drawer.Close>
|
|
251
|
+
<Button.Root variant="outline" tone="neutral">
|
|
252
|
+
Отмена
|
|
253
|
+
</Button.Root>
|
|
254
|
+
</Drawer.Close>
|
|
255
|
+
<Button.Root type="submit" form={formId} loading={saving}>
|
|
256
|
+
Добавить клиента
|
|
257
|
+
</Button.Root>
|
|
258
|
+
</Drawer.Footer>
|
|
259
|
+
</Drawer.Content>
|
|
260
|
+
</Drawer.Root>
|
|
261
|
+
</Page.Actions>
|
|
262
|
+
</Page.TopBar>
|
|
263
|
+
<Page.Body>
|
|
287
264
|
<DataTable
|
|
288
265
|
columns={COLUMNS}
|
|
289
266
|
rows={shown}
|
|
@@ -291,8 +268,8 @@ export default function DrawerScreenExample() {
|
|
|
291
268
|
paging="none"
|
|
292
269
|
empty="Клиентов не найдено"
|
|
293
270
|
/>
|
|
294
|
-
</
|
|
295
|
-
</
|
|
296
|
-
|
|
271
|
+
</Page.Body>
|
|
272
|
+
</Page.Root>
|
|
273
|
+
</SmartFilter.Root>
|
|
297
274
|
);
|
|
298
275
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## When to use
|
|
9
9
|
- Secondary actions of a card, row or document behind a «⋯» or labelled button.
|
|
10
|
-
- An account / user menu
|
|
10
|
+
- An account / user menu behind the Sidebar account row (`Sidebar.Account`).
|
|
11
11
|
- A short list of commands (export formats, move to project) where picking one runs an action.
|
|
12
12
|
|
|
13
13
|
## When not to use
|
|
@@ -57,11 +57,11 @@ ExampleFrame frame: toolbar + the pane (a region swap between prev
|
|
|
57
57
|
| Value | Looks like | Use when | Default |
|
|
58
58
|
|---|---|---|---|
|
|
59
59
|
| `default` | single block centered in the stage | one component | yes |
|
|
60
|
-
| `stack` | centered column, gap 16, children capped at the stack measure (`10 × --prime-space-16`) so `width: 100%` blocks stay centered; a child with `fullWidth` or a table stretches | several blocks one under another | |
|
|
61
|
-
| `stack-narrow` | column, children capped at `7 × --prime-space-16` and centered | forms and narrow columns | |
|
|
60
|
+
| `stack` | centered column, gap 16, children capped at the stack measure (`10 × --prime-space-16`) so `width: 100%` blocks stay centered; a child with `fullWidth` or a table stretches, never past the stage, and a horizontal separator beside it stretches with it | several blocks one under another | |
|
|
61
|
+
| `stack-narrow` | column, children capped at `7 × --prime-space-16` and centered, full width unless a child sets its own (a cascade-layer default, so a fit-content SegmentedControl keeps hugging its segments); a child with a table may take the stage | forms and narrow columns | |
|
|
62
62
|
| `full` | column, gap 16, every child takes the whole stage width | page structure: app shells, page regions | |
|
|
63
63
|
| `row` | centered wrapping row, gap 12, extra vertical padding | a few buttons or controls side by side | |
|
|
64
|
-
| `matrix` | centered grid of labelled cells: each direct child is a row, its children are cells (specimen above its caption); columns (up to 12) line up across rows, are never narrower than their content and grow to 320 / 160 / 128px for 1 / 2 / 3+ columns, so width-less specimens (Slider, `width: 100%` blocks) get a real cell; centered vertically too; when the grid is wider than the stage (a phone frame) each row wraps its cells, centered (`data-matrix-wrap` on the stage) | variant, size and state matrices | |
|
|
64
|
+
| `matrix` | centered grid of labelled cells: each direct child is a row, its children are cells (specimen above its caption); columns (up to 12) line up across rows, are never narrower than their content and grow to 320 / 160 / 128px for 1 / 2 / 3+ columns, so width-less specimens (Slider, `width: 100%` blocks) get a real cell; centered vertically too; when the grid is wider than the stage (a phone frame) each row wraps its cells, centered (`data-matrix-wrap` on the stage), and a one-column matrix keeps its cells at the one-column measure (or the stage, when narrower) | variant, size and state matrices | |
|
|
65
65
|
| `matrix-wide` | the same rows of labelled cells, one cell under another, each as wide as the stage up to the stack measure (`10 × --prime-space-16`), the caption under the specimen | matrices of specimens as wide as their container: tabs, toolbars, tables | |
|
|
66
66
|
|
|
67
67
|
### viewport
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Icon,
|
|
10
10
|
type IconName,
|
|
11
11
|
Input,
|
|
12
|
-
|
|
12
|
+
Page,
|
|
13
13
|
Select,
|
|
14
14
|
Textarea,
|
|
15
15
|
} from "prime-ui-kit";
|
|
@@ -121,20 +121,20 @@ export default function FieldListScreenExample() {
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
return (
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
</
|
|
130
|
-
<
|
|
124
|
+
<Page.Root maxWidth="wide" aria-labelledby="plan-title">
|
|
125
|
+
<Page.Header>
|
|
126
|
+
<Page.Heading>
|
|
127
|
+
<Page.Title id="plan-title">Тариф «Команда»</Page.Title>
|
|
128
|
+
<Page.Description>Так тариф выглядит на странице цен и в счетах.</Page.Description>
|
|
129
|
+
</Page.Heading>
|
|
130
|
+
<Page.Actions>
|
|
131
131
|
<Button.Root type="submit" form={formId} loading={saving}>
|
|
132
132
|
{saved ? "Сохранено" : "Сохранить тариф"}
|
|
133
133
|
</Button.Root>
|
|
134
|
-
</
|
|
135
|
-
</
|
|
136
|
-
<
|
|
137
|
-
<
|
|
134
|
+
</Page.Actions>
|
|
135
|
+
</Page.Header>
|
|
136
|
+
<Page.Body>
|
|
137
|
+
<Page.Section layout="aside" label="Основное">
|
|
138
138
|
<form id={formId} noValidate onSubmit={save}>
|
|
139
139
|
<Card.Root variant="panel">
|
|
140
140
|
<Card.Body>
|
|
@@ -155,9 +155,9 @@ export default function FieldListScreenExample() {
|
|
|
155
155
|
</Card.Body>
|
|
156
156
|
</Card.Root>
|
|
157
157
|
</form>
|
|
158
|
-
</
|
|
158
|
+
</Page.Section>
|
|
159
159
|
|
|
160
|
-
<
|
|
160
|
+
<Page.Section layout="aside" label="Характеристики">
|
|
161
161
|
<Card.Root variant="panel">
|
|
162
162
|
<Card.Body>
|
|
163
163
|
<FieldList
|
|
@@ -230,9 +230,9 @@ export default function FieldListScreenExample() {
|
|
|
230
230
|
/>
|
|
231
231
|
</Card.Body>
|
|
232
232
|
</Card.Root>
|
|
233
|
-
</
|
|
233
|
+
</Page.Section>
|
|
234
234
|
|
|
235
|
-
<
|
|
235
|
+
<Page.Section layout="aside" label="Стоимость">
|
|
236
236
|
<Card.Root variant="panel">
|
|
237
237
|
<Card.Body className={styles.groups}>
|
|
238
238
|
<Fieldset label="За месяц" disabled={saving}>
|
|
@@ -309,8 +309,8 @@ export default function FieldListScreenExample() {
|
|
|
309
309
|
</Fieldset>
|
|
310
310
|
</Card.Body>
|
|
311
311
|
</Card.Root>
|
|
312
|
-
</
|
|
313
|
-
</
|
|
314
|
-
</
|
|
312
|
+
</Page.Section>
|
|
313
|
+
</Page.Body>
|
|
314
|
+
</Page.Root>
|
|
315
315
|
);
|
|
316
316
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
## When not to use
|
|
15
15
|
- One choice among options with a heading → [Radio](../radio/COMPONENT.md) `Radio.Group label`, a [SegmentedControl](../segmented-control/COMPONENT.md) or [ButtonGroup](../button-group/COMPONENT.md) `label`.
|
|
16
16
|
- A bounded block with a surface (a settings panel) → [Card](../card/COMPONENT.md) `Card.Root`; a Fieldset inside it groups the fields.
|
|
17
|
-
- A page section with a title and actions → [
|
|
17
|
+
- A page section with a title and actions → [Page](../../layout/page/COMPONENT.md) sections (`Page.Section`).
|
|
18
18
|
- A group of settings with a title and a trailing control (a «Сбросить» button, a master switch) → `Card.Root variant="panel"` with `Card.Header` (`Card.Title` + the control) and the Fieldset in `Card.Body`, named by the title (`aria-labelledby`).
|
|
19
19
|
- A single field's label → the field's own `label`.
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ export default function FieldsetStatesExample() {
|
|
|
14
14
|
<Fieldset label="Сделка" disabled={state.disabled}>
|
|
15
15
|
<Input.Root label="Название">
|
|
16
16
|
<Input.Wrapper>
|
|
17
|
-
<Input.Field defaultValue="
|
|
17
|
+
<Input.Field defaultValue="Лицензия, 40 мест" />
|
|
18
18
|
</Input.Wrapper>
|
|
19
19
|
</Input.Root>
|
|
20
20
|
<SegmentedControl.Root label="Тип" defaultValue="new">
|
|
@@ -424,7 +424,7 @@ Also `data-size`, `data-variant` on the zone, `data-size` on Item, `data-status`
|
|
|
424
424
|
| [controlled.tsx](examples/controlled.tsx) | Documents of a deal in one list: the files already on the server and new uploads after them, saved on every change, and a button brings back the saved set — `value`, `onValueChange`, `queue`. |
|
|
425
425
|
| [in-form.tsx](examples/in-form.tsx) | A contract upload form: submit checks the required scan, its error shakes in and leaves once a file is picked or removed — `required`, `error`, `name`, `value`. |
|
|
426
426
|
| [narrow.tsx](examples/narrow.tsx) | In a phone-width column the zone text wraps, a long file name truncates, and a gallery goes three across and then two, the cover keeping two columns and the remove buttons shown without hover — `layout`, `cover`. |
|
|
427
|
-
| [screen.tsx](examples/screen.tsx) | A media library of a catalog object as a work screen: the title, the object and a
|
|
427
|
+
| [screen.tsx](examples/screen.tsx) | A media library of a catalog object as a work screen: the title, the object and a toolbar with sections, search, order and upload in its top bar; uploads in FileUpload tiles through a queue; a grid of Thumbnails that open MediaViewer out of the tile or are picked for bulk download and delete; a Skeleton first load and a filtered empty state in a Crossfade — `trigger`, `layout`. |
|
|
428
428
|
|
|
429
429
|
## Mistakes
|
|
430
430
|
- A `Label` and a `Hint` placed around the zone by hand → pass `label`, `hint`, `error`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* Media library: a work screen — the
|
|
2
|
-
out the library block only, the page rhythm comes from
|
|
1
|
+
/* Media library: a work screen — the page top bar carries the title and the tools; this module lays
|
|
2
|
+
out the library block only, the page rhythm comes from Page. */
|
|
3
3
|
|
|
4
4
|
.bar {
|
|
5
5
|
display: flex;
|