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/reference/{components/page-content → layout/page}/examples/list-detail.tsx
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** A ticket queue as list + detail on a full-height page: side by side on a wide panel, one pane at a time with a back button on a narrow one; the chosen ticket cross-fades in — `
|
|
2
|
-
import { Card, Crossfade, List,
|
|
1
|
+
/** A ticket queue as list + detail on a full-height page: side by side on a wide panel, one pane at a time with a back button on a narrow one; the chosen ticket cross-fades in — `Page.Split`, `Page.List`, `Page.Detail`, `Page.BackButton`, `fill`. */
|
|
2
|
+
import { Card, Crossfade, List, Page, ScrollContainer, Typography } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import styles from "./examples.module.css";
|
|
@@ -35,7 +35,7 @@ const TICKETS: Ticket[] = [
|
|
|
35
35
|
},
|
|
36
36
|
];
|
|
37
37
|
|
|
38
|
-
export default function
|
|
38
|
+
export default function PageListDetailExample() {
|
|
39
39
|
const [ticketId, setTicketId] = React.useState<string | null>(null);
|
|
40
40
|
// The last opened ticket stays in the detail while the narrow split goes back to the list.
|
|
41
41
|
const [shown, setShown] = React.useState<Ticket | null>(null);
|
|
@@ -47,15 +47,15 @@ export default function PageContentListDetailExample() {
|
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
49
|
<div className={styles.fillMain}>
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
50
|
+
<Page.Root fill>
|
|
51
|
+
<Page.Body>
|
|
52
|
+
<Page.Split
|
|
53
53
|
open={ticketId !== null}
|
|
54
54
|
onOpenChange={(next) => {
|
|
55
55
|
if (!next) setTicketId(null);
|
|
56
56
|
}}
|
|
57
57
|
>
|
|
58
|
-
<
|
|
58
|
+
<Page.List aria-label="Обращения">
|
|
59
59
|
<Card.Root className={styles.paneCard}>
|
|
60
60
|
<ScrollContainer className={styles.pane}>
|
|
61
61
|
<List.Root className={styles.tickets}>
|
|
@@ -75,12 +75,12 @@ export default function PageContentListDetailExample() {
|
|
|
75
75
|
</List.Root>
|
|
76
76
|
</ScrollContainer>
|
|
77
77
|
</Card.Root>
|
|
78
|
-
</
|
|
78
|
+
</Page.List>
|
|
79
79
|
|
|
80
|
-
<
|
|
80
|
+
<Page.Detail aria-label="Обращение">
|
|
81
81
|
<Card.Root className={styles.paneCard}>
|
|
82
82
|
<div className={styles.threadHeader}>
|
|
83
|
-
<
|
|
83
|
+
<Page.BackButton />
|
|
84
84
|
<Typography as="h2" variant="title-s">
|
|
85
85
|
{shown ? `${shown.id} · ${shown.subject}` : "Выберите обращение"}
|
|
86
86
|
</Typography>
|
|
@@ -103,10 +103,10 @@ export default function PageContentListDetailExample() {
|
|
|
103
103
|
</Crossfade>
|
|
104
104
|
</ScrollContainer>
|
|
105
105
|
</Card.Root>
|
|
106
|
-
</
|
|
107
|
-
</
|
|
108
|
-
</
|
|
109
|
-
</
|
|
106
|
+
</Page.Detail>
|
|
107
|
+
</Page.Split>
|
|
108
|
+
</Page.Body>
|
|
109
|
+
</Page.Root>
|
|
110
110
|
</div>
|
|
111
111
|
);
|
|
112
112
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** On a phone the top bar leads with the menu button that opens the navigation by itself, the primary button gives way to its icon and the secondary ones fold into «⋯» — `offCanvas`, `Page.Actions`. */
|
|
2
|
+
import { AppShell, Button, Icon, Page, Sidebar, Typography } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
const ORDERS = [
|
|
7
|
+
"№ 4821 · ООО «Север» · 84 000 ₽",
|
|
8
|
+
"№ 4820 · ИП Котов · 12 500 ₽",
|
|
9
|
+
"№ 4819 · ООО «Вектор» · 230 000 ₽",
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export default function PageNarrowExample() {
|
|
13
|
+
return (
|
|
14
|
+
<div className={`${styles.window} ${styles.phone}`}>
|
|
15
|
+
<AppShell.Root fillViewport className={styles.shell}>
|
|
16
|
+
<AppShell.Nav>
|
|
17
|
+
{/* `always`: this window is phone-wide on any screen; in an app keep the default `auto`. */}
|
|
18
|
+
<Sidebar.Root offCanvas="always">
|
|
19
|
+
<Sidebar.Content>
|
|
20
|
+
<Sidebar.Item href="#overview">
|
|
21
|
+
<Sidebar.ItemIcon>
|
|
22
|
+
<Icon name="nav.home" />
|
|
23
|
+
</Sidebar.ItemIcon>
|
|
24
|
+
Обзор
|
|
25
|
+
</Sidebar.Item>
|
|
26
|
+
<Sidebar.Item href="#orders" current>
|
|
27
|
+
<Sidebar.ItemIcon>
|
|
28
|
+
<Icon name="object.package" />
|
|
29
|
+
</Sidebar.ItemIcon>
|
|
30
|
+
Заказы
|
|
31
|
+
</Sidebar.Item>
|
|
32
|
+
</Sidebar.Content>
|
|
33
|
+
</Sidebar.Root>
|
|
34
|
+
</AppShell.Nav>
|
|
35
|
+
<AppShell.Main>
|
|
36
|
+
<Page.Root>
|
|
37
|
+
<Page.TopBar>
|
|
38
|
+
<Page.Heading>
|
|
39
|
+
<Page.Title>Заказы покупателей</Page.Title>
|
|
40
|
+
<Page.Description>128 в работе · 6 ждут оплаты · 2 возврата</Page.Description>
|
|
41
|
+
</Page.Heading>
|
|
42
|
+
<Page.Actions>
|
|
43
|
+
<Button.Root variant="soft" tone="neutral">
|
|
44
|
+
<Button.Icon>
|
|
45
|
+
<Icon name="action.download" />
|
|
46
|
+
</Button.Icon>
|
|
47
|
+
Экспорт
|
|
48
|
+
</Button.Root>
|
|
49
|
+
<Button.Root variant="soft" tone="neutral">
|
|
50
|
+
<Button.Icon>
|
|
51
|
+
<Icon name="action.refresh" />
|
|
52
|
+
</Button.Icon>
|
|
53
|
+
Обновить
|
|
54
|
+
</Button.Root>
|
|
55
|
+
<Button.Root>
|
|
56
|
+
<Button.Icon>
|
|
57
|
+
<Icon name="action.add" />
|
|
58
|
+
</Button.Icon>
|
|
59
|
+
Новый заказ
|
|
60
|
+
</Button.Root>
|
|
61
|
+
</Page.Actions>
|
|
62
|
+
</Page.TopBar>
|
|
63
|
+
<Page.Body>
|
|
64
|
+
{ORDERS.map((order) => (
|
|
65
|
+
<Typography key={order} variant="body-m">
|
|
66
|
+
{order}
|
|
67
|
+
</Typography>
|
|
68
|
+
))}
|
|
69
|
+
</Page.Body>
|
|
70
|
+
</Page.Root>
|
|
71
|
+
</AppShell.Main>
|
|
72
|
+
</AppShell.Root>
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** A work page in an app window: the top bar with the title, its line of data and the page's buttons, the body under it — `Page.TopBar`, `Page.Heading`, `Page.Actions`. */
|
|
2
|
+
import { AppShell, Button, Card, Icon, Page, Typography } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
const ORDERS = [
|
|
7
|
+
{ id: "№ 4821", client: "ООО «Север»", sum: "84 000 ₽" },
|
|
8
|
+
{ id: "№ 4820", client: "ИП Котов", sum: "12 500 ₽" },
|
|
9
|
+
{ id: "№ 4819", client: "ООО «Вектор»", sum: "230 000 ₽" },
|
|
10
|
+
{ id: "№ 4818", client: "АО «Техностиль»", sum: "47 900 ₽" },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export default function PageOverviewExample() {
|
|
14
|
+
return (
|
|
15
|
+
<div className={styles.window}>
|
|
16
|
+
<AppShell.Root fillViewport className={styles.shell}>
|
|
17
|
+
<AppShell.Main>
|
|
18
|
+
<Page.Root>
|
|
19
|
+
<Page.TopBar>
|
|
20
|
+
<Page.Heading>
|
|
21
|
+
<Page.Title>Заказы</Page.Title>
|
|
22
|
+
<Page.Description>128 в работе · 6 ждут оплаты</Page.Description>
|
|
23
|
+
</Page.Heading>
|
|
24
|
+
<Page.Actions>
|
|
25
|
+
<Button.Root variant="soft" tone="neutral">
|
|
26
|
+
<Button.Icon>
|
|
27
|
+
<Icon name="action.download" />
|
|
28
|
+
</Button.Icon>
|
|
29
|
+
Экспорт
|
|
30
|
+
</Button.Root>
|
|
31
|
+
<Button.Root>
|
|
32
|
+
<Button.Icon>
|
|
33
|
+
<Icon name="action.add" />
|
|
34
|
+
</Button.Icon>
|
|
35
|
+
Новый заказ
|
|
36
|
+
</Button.Root>
|
|
37
|
+
</Page.Actions>
|
|
38
|
+
</Page.TopBar>
|
|
39
|
+
<Page.Body>
|
|
40
|
+
<Card.Root variant="list">
|
|
41
|
+
<Card.List>
|
|
42
|
+
{ORDERS.map((order) => (
|
|
43
|
+
<Card.ListItem key={order.id}>
|
|
44
|
+
<Typography as="span" variant="body-m">
|
|
45
|
+
{order.id} · {order.client} · {order.sum}
|
|
46
|
+
</Typography>
|
|
47
|
+
</Card.ListItem>
|
|
48
|
+
))}
|
|
49
|
+
</Card.List>
|
|
50
|
+
</Card.Root>
|
|
51
|
+
</Page.Body>
|
|
52
|
+
</Page.Root>
|
|
53
|
+
</AppShell.Main>
|
|
54
|
+
</AppShell.Root>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
/** A settings page: sections with a heading column and a panel, a form saved by its own button, switches that apply at once and a danger zone with a confirm — `layout`, `maxWidth`. */
|
|
1
|
+
/** A settings page as a document: the path in the top bar that repeats the title once it scrolls away, the large title in the flow, sections with a heading column and a panel, a form saved by its own button, switches that apply at once and a danger zone with a confirm — `collapse`, `layout`, `maxWidth`. */
|
|
2
2
|
import {
|
|
3
|
+
Breadcrumb,
|
|
3
4
|
Button,
|
|
4
5
|
Card,
|
|
5
6
|
ConfirmDialog,
|
|
6
7
|
Fieldset,
|
|
7
8
|
Input,
|
|
8
|
-
|
|
9
|
+
Page,
|
|
9
10
|
Select,
|
|
10
11
|
Switch,
|
|
11
12
|
Textarea,
|
|
@@ -45,7 +46,7 @@ const ALERTS = [
|
|
|
45
46
|
},
|
|
46
47
|
];
|
|
47
48
|
|
|
48
|
-
export default function
|
|
49
|
+
export default function PageScreenExample() {
|
|
49
50
|
const [innError, setInnError] = React.useState<string>();
|
|
50
51
|
const [saving, setSaving] = React.useState(false);
|
|
51
52
|
const [saved, setSaved] = React.useState(false);
|
|
@@ -70,15 +71,24 @@ export default function PageContentScreenExample() {
|
|
|
70
71
|
const removeWorkspace = () => new Promise<void>((resolve) => window.setTimeout(resolve, 1200));
|
|
71
72
|
|
|
72
73
|
return (
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
<Page.Root maxWidth="wide">
|
|
75
|
+
<Page.TopBar collapse>
|
|
76
|
+
<Page.Heading>
|
|
77
|
+
<Breadcrumb.Root>
|
|
78
|
+
<Breadcrumb.Item href="#workspace">Прайм Софт</Breadcrumb.Item>
|
|
79
|
+
</Breadcrumb.Root>
|
|
80
|
+
</Page.Heading>
|
|
81
|
+
</Page.TopBar>
|
|
82
|
+
<Page.Header>
|
|
83
|
+
<Page.Heading>
|
|
84
|
+
<Page.Title>Настройки</Page.Title>
|
|
85
|
+
<Page.Description>
|
|
86
|
+
Реквизиты компании, уведомления и управление рабочим пространством.
|
|
87
|
+
</Page.Description>
|
|
88
|
+
</Page.Heading>
|
|
89
|
+
</Page.Header>
|
|
90
|
+
<Page.Body>
|
|
91
|
+
<Page.Section
|
|
82
92
|
layout="aside"
|
|
83
93
|
label="Компания"
|
|
84
94
|
description="Попадают в счета, акты и письма клиентам."
|
|
@@ -135,9 +145,9 @@ export default function PageContentScreenExample() {
|
|
|
135
145
|
</Card.Footer>
|
|
136
146
|
</Card.Root>
|
|
137
147
|
</form>
|
|
138
|
-
</
|
|
148
|
+
</Page.Section>
|
|
139
149
|
|
|
140
|
-
<
|
|
150
|
+
<Page.Section
|
|
141
151
|
layout="aside"
|
|
142
152
|
label="Уведомления"
|
|
143
153
|
description="Включаются сразу, без сохранения."
|
|
@@ -158,9 +168,9 @@ export default function PageContentScreenExample() {
|
|
|
158
168
|
</Fieldset>
|
|
159
169
|
</Card.Body>
|
|
160
170
|
</Card.Root>
|
|
161
|
-
</
|
|
171
|
+
</Page.Section>
|
|
162
172
|
|
|
163
|
-
<
|
|
173
|
+
<Page.Section
|
|
164
174
|
layout="aside"
|
|
165
175
|
label="Рабочее пространство"
|
|
166
176
|
description="Действия, которые нельзя отменить."
|
|
@@ -189,8 +199,8 @@ export default function PageContentScreenExample() {
|
|
|
189
199
|
</div>
|
|
190
200
|
</Card.Body>
|
|
191
201
|
</Card.Root>
|
|
192
|
-
</
|
|
193
|
-
</
|
|
194
|
-
</
|
|
202
|
+
</Page.Section>
|
|
203
|
+
</Page.Body>
|
|
204
|
+
</Page.Root>
|
|
195
205
|
);
|
|
196
206
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/** A page with titled sections: tiles of one screen close together, a new topic set off by air, a link at the end of the heading, a heading column beside a panel — `
|
|
2
|
-
import {
|
|
3
|
-
Card,
|
|
4
|
-
DataTable,
|
|
5
|
-
type DataTableColumn,
|
|
6
|
-
LinkButton,
|
|
7
|
-
PageContent,
|
|
8
|
-
Typography,
|
|
9
|
-
} from "prime-ui-kit";
|
|
1
|
+
/** A page with titled sections: tiles of one screen close together, a new topic set off by air, a link at the end of the heading, a heading column beside a panel — `Page.Section`, `label`, `description`, `Page.Actions`, `layout`. */
|
|
2
|
+
import { Card, DataTable, type DataTableColumn, LinkButton, Page, Typography } from "prime-ui-kit";
|
|
10
3
|
|
|
11
4
|
import styles from "./examples.module.css";
|
|
12
5
|
|
|
@@ -36,33 +29,33 @@ const COLUMNS: DataTableColumn<Invoice>[] = [
|
|
|
36
29
|
},
|
|
37
30
|
];
|
|
38
31
|
|
|
39
|
-
export default function
|
|
32
|
+
export default function PageSectionsExample() {
|
|
40
33
|
return (
|
|
41
34
|
<div className={styles.main}>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
35
|
+
<Page.Body>
|
|
36
|
+
<Page.Grid>
|
|
37
|
+
<Page.Cell span={6}>
|
|
45
38
|
<Card.Root variant="stat-trend">
|
|
46
39
|
<Card.Label>Выставлено</Card.Label>
|
|
47
40
|
<Card.Value>2,4 млн ₽</Card.Value>
|
|
48
41
|
<Card.Delta tone="success">+9% к сентябрю</Card.Delta>
|
|
49
42
|
</Card.Root>
|
|
50
|
-
</
|
|
51
|
-
<
|
|
43
|
+
</Page.Cell>
|
|
44
|
+
<Page.Cell span={6}>
|
|
52
45
|
<Card.Root variant="stat-trend">
|
|
53
46
|
<Card.Label>Оплачено</Card.Label>
|
|
54
47
|
<Card.Value>1,9 млн ₽</Card.Value>
|
|
55
48
|
<Card.Delta tone="neutral">79% выставленного</Card.Delta>
|
|
56
49
|
</Card.Root>
|
|
57
|
-
</
|
|
58
|
-
</
|
|
59
|
-
<
|
|
60
|
-
<
|
|
50
|
+
</Page.Cell>
|
|
51
|
+
</Page.Grid>
|
|
52
|
+
<Page.Section label="Последние счета" description="Три последних за октябрь">
|
|
53
|
+
<Page.Actions>
|
|
61
54
|
<LinkButton href="#invoices">Все счета</LinkButton>
|
|
62
|
-
</
|
|
55
|
+
</Page.Actions>
|
|
63
56
|
<DataTable columns={COLUMNS} rows={INVOICES} getRowKey={(row) => row.id} paging="none" />
|
|
64
|
-
</
|
|
65
|
-
<
|
|
57
|
+
</Page.Section>
|
|
58
|
+
<Page.Section
|
|
66
59
|
layout="aside"
|
|
67
60
|
label="Реквизиты в счетах"
|
|
68
61
|
description="Попадают в каждый новый счёт."
|
|
@@ -74,8 +67,8 @@ export default function PageContentSectionsExample() {
|
|
|
74
67
|
</Typography>
|
|
75
68
|
</Card.Body>
|
|
76
69
|
</Card.Root>
|
|
77
|
-
</
|
|
78
|
-
</
|
|
70
|
+
</Page.Section>
|
|
71
|
+
</Page.Body>
|
|
79
72
|
</div>
|
|
80
73
|
);
|
|
81
74
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** A document page in the flow: the path over the large title, its line of data and the page's buttons beside them, then the body with a section — `Page.Header`, `Page.Heading`, `Page.Description`, `Page.Section`. */
|
|
2
|
+
import { Breadcrumb, Button, Card, Page, Typography } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
export default function PageStructureExample() {
|
|
7
|
+
return (
|
|
8
|
+
<div className={styles.main}>
|
|
9
|
+
<Page.Root>
|
|
10
|
+
<Page.Header>
|
|
11
|
+
<Page.Heading>
|
|
12
|
+
<Breadcrumb.Root>
|
|
13
|
+
<Breadcrumb.Item href="#settings">Настройки</Breadcrumb.Item>
|
|
14
|
+
</Breadcrumb.Root>
|
|
15
|
+
<Page.Title>Уведомления</Page.Title>
|
|
16
|
+
<Page.Description>
|
|
17
|
+
Письма и сообщения, которые получает команда продаж.
|
|
18
|
+
</Page.Description>
|
|
19
|
+
</Page.Heading>
|
|
20
|
+
<Page.Actions>
|
|
21
|
+
<Button.Root variant="soft" tone="neutral">
|
|
22
|
+
Сбросить
|
|
23
|
+
</Button.Root>
|
|
24
|
+
<Button.Root>Сохранить</Button.Root>
|
|
25
|
+
</Page.Actions>
|
|
26
|
+
</Page.Header>
|
|
27
|
+
<Page.Body>
|
|
28
|
+
<Page.Section label="Новые заказы" description="Сразу после оформления.">
|
|
29
|
+
<Card.Root variant="panel">
|
|
30
|
+
<Card.Body>
|
|
31
|
+
<Typography variant="body-m" tone="secondary">
|
|
32
|
+
Письмо ответственному менеджеру и сводка в канал отдела продаж.
|
|
33
|
+
</Typography>
|
|
34
|
+
</Card.Body>
|
|
35
|
+
</Card.Root>
|
|
36
|
+
</Page.Section>
|
|
37
|
+
</Page.Body>
|
|
38
|
+
</Page.Root>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** The orders page's tools in its top bar: sections with counts, search and filter, the period, in the order written; the active filters on a line under everything — `Page.Tools`, `Page.Chips`. */
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
Icon,
|
|
5
|
-
|
|
5
|
+
Page,
|
|
6
6
|
SegmentedControl,
|
|
7
7
|
Select,
|
|
8
8
|
SmartFilter,
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
} from "prime-ui-kit";
|
|
12
12
|
import * as React from "react";
|
|
13
13
|
|
|
14
|
-
import styles from "./examples.module.css";
|
|
15
|
-
|
|
16
14
|
const SECTIONS = [
|
|
17
15
|
{ value: "all", label: "Все", count: 128 },
|
|
18
16
|
{ value: "active", label: "В работе", count: 12 },
|
|
19
17
|
{ value: "done", label: "Доставлены", count: 96 },
|
|
18
|
+
{ value: "cancelled", label: "Отменены", count: 20 },
|
|
20
19
|
];
|
|
21
20
|
|
|
22
21
|
const PERIODS = [
|
|
23
22
|
{ value: "7d", label: "7 дней" },
|
|
24
23
|
{ value: "30d", label: "30 дней" },
|
|
24
|
+
{ value: "quarter", label: "Квартал" },
|
|
25
25
|
];
|
|
26
26
|
|
|
27
27
|
const FIELDS: SmartFilterField[] = [
|
|
@@ -31,38 +31,42 @@ const FIELDS: SmartFilterField[] = [
|
|
|
31
31
|
options: [
|
|
32
32
|
{ value: "msk", label: "Москва" },
|
|
33
33
|
{ value: "spb", label: "Санкт-Петербург" },
|
|
34
|
+
{ value: "kzn", label: "Казань" },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
key: "payment",
|
|
39
|
+
label: "Оплата",
|
|
40
|
+
options: [
|
|
41
|
+
{ value: "card", label: "Картой" },
|
|
42
|
+
{ value: "invoice", label: "По счёту" },
|
|
34
43
|
],
|
|
35
44
|
},
|
|
36
45
|
];
|
|
37
46
|
|
|
38
|
-
export default function
|
|
47
|
+
export default function PageToolsExample() {
|
|
39
48
|
const [section, setSection] = React.useState("all");
|
|
40
|
-
const [period, setPeriod] = React.useState("
|
|
49
|
+
const [period, setPeriod] = React.useState("30d");
|
|
41
50
|
const [filter, setFilter] = React.useState<SmartFilterValue>({
|
|
42
51
|
city: { include: ["msk"], exclude: [] },
|
|
43
52
|
});
|
|
44
53
|
const [search, setSearch] = React.useState("");
|
|
45
54
|
|
|
46
55
|
return (
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
>
|
|
55
|
-
<
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
</
|
|
59
|
-
<
|
|
60
|
-
<SegmentedControl.Root
|
|
61
|
-
fullWidth
|
|
62
|
-
value={section}
|
|
63
|
-
onValueChange={setSection}
|
|
64
|
-
aria-label="Раздел"
|
|
65
|
-
>
|
|
56
|
+
<SmartFilter.Root
|
|
57
|
+
fields={FIELDS}
|
|
58
|
+
value={filter}
|
|
59
|
+
onValueChange={setFilter}
|
|
60
|
+
search={search}
|
|
61
|
+
onSearchChange={setSearch}
|
|
62
|
+
>
|
|
63
|
+
<Page.Root>
|
|
64
|
+
<Page.TopBar sticky={false}>
|
|
65
|
+
<Page.Heading>
|
|
66
|
+
<Page.Title>Заказы</Page.Title>
|
|
67
|
+
</Page.Heading>
|
|
68
|
+
<Page.Tools aria-label="Заказы">
|
|
69
|
+
<SegmentedControl.Root value={section} onValueChange={setSection} aria-label="Раздел">
|
|
66
70
|
{SECTIONS.map((item) => (
|
|
67
71
|
<SegmentedControl.Item key={item.value} value={item.value}>
|
|
68
72
|
{item.label}
|
|
@@ -70,8 +74,7 @@ export default function PageToolbarNarrowExample() {
|
|
|
70
74
|
</SegmentedControl.Item>
|
|
71
75
|
))}
|
|
72
76
|
</SegmentedControl.Root>
|
|
73
|
-
|
|
74
|
-
<PageToolbar.View>
|
|
77
|
+
<SmartFilter.Toolbar />
|
|
75
78
|
<Select.Root value={period} onValueChange={setPeriod}>
|
|
76
79
|
<Select.Trigger aria-label="Период">
|
|
77
80
|
<Select.TriggerIcon>
|
|
@@ -87,20 +90,20 @@ export default function PageToolbarNarrowExample() {
|
|
|
87
90
|
))}
|
|
88
91
|
</Select.Content>
|
|
89
92
|
</Select.Root>
|
|
90
|
-
</
|
|
91
|
-
<
|
|
93
|
+
</Page.Tools>
|
|
94
|
+
<Page.Actions>
|
|
92
95
|
<Button.Root>
|
|
93
96
|
<Button.Icon>
|
|
94
97
|
<Icon name="action.add" />
|
|
95
98
|
</Button.Icon>
|
|
96
99
|
Новый заказ
|
|
97
100
|
</Button.Root>
|
|
98
|
-
</
|
|
99
|
-
<
|
|
101
|
+
</Page.Actions>
|
|
102
|
+
<Page.Chips>
|
|
100
103
|
<SmartFilter.Chips />
|
|
101
|
-
</
|
|
102
|
-
</
|
|
103
|
-
</
|
|
104
|
-
</
|
|
104
|
+
</Page.Chips>
|
|
105
|
+
</Page.TopBar>
|
|
106
|
+
</Page.Root>
|
|
107
|
+
</SmartFilter.Root>
|
|
105
108
|
);
|
|
106
109
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/** A nested record in the top bar: the path ending in the title, a line of data, the page's tools and its buttons — `Page.TopBar`, `Page.Heading`, `Page.Tools`, `Page.Actions`. */
|
|
2
|
+
import { Breadcrumb, Button, Icon, Input, Page, SegmentedControl } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
const SECTIONS = [
|
|
6
|
+
{ value: "all", label: "Все" },
|
|
7
|
+
{ value: "mine", label: "Мои" },
|
|
8
|
+
{ value: "overdue", label: "Просрочены" },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const VIEWS = [
|
|
12
|
+
{ value: "board", label: "Доска" },
|
|
13
|
+
{ value: "list", label: "Список" },
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export default function PageTopBarExample() {
|
|
17
|
+
const [section, setSection] = React.useState("all");
|
|
18
|
+
const [view, setView] = React.useState("board");
|
|
19
|
+
const [query, setQuery] = React.useState("");
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Page.Root>
|
|
23
|
+
<Page.TopBar sticky={false}>
|
|
24
|
+
<Page.Heading>
|
|
25
|
+
<Breadcrumb.Root>
|
|
26
|
+
<Breadcrumb.Item href="#clients">Клиенты</Breadcrumb.Item>
|
|
27
|
+
<Breadcrumb.Item href="#north">ООО «Север»</Breadcrumb.Item>
|
|
28
|
+
</Breadcrumb.Root>
|
|
29
|
+
<Page.Title>Сделка № 2026-418</Page.Title>
|
|
30
|
+
<Page.Description>7 в работе · 6,5 млн ₽ · обновлено 9:40</Page.Description>
|
|
31
|
+
</Page.Heading>
|
|
32
|
+
<Page.Tools aria-label="Сделка № 2026-418">
|
|
33
|
+
<SegmentedControl.Root value={section} onValueChange={setSection} aria-label="Раздел">
|
|
34
|
+
{SECTIONS.map((item) => (
|
|
35
|
+
<SegmentedControl.Item key={item.value} value={item.value}>
|
|
36
|
+
{item.label}
|
|
37
|
+
</SegmentedControl.Item>
|
|
38
|
+
))}
|
|
39
|
+
</SegmentedControl.Root>
|
|
40
|
+
<Input.Root>
|
|
41
|
+
<Input.Wrapper>
|
|
42
|
+
<Input.Icon side="start">
|
|
43
|
+
<Icon name="action.search" tone="secondary" />
|
|
44
|
+
</Input.Icon>
|
|
45
|
+
<Input.Field
|
|
46
|
+
type="search"
|
|
47
|
+
aria-label="Поиск по задачам"
|
|
48
|
+
placeholder="Поиск"
|
|
49
|
+
value={query}
|
|
50
|
+
onValueChange={setQuery}
|
|
51
|
+
/>
|
|
52
|
+
</Input.Wrapper>
|
|
53
|
+
</Input.Root>
|
|
54
|
+
<SegmentedControl.Root value={view} onValueChange={setView} aria-label="Вид">
|
|
55
|
+
{VIEWS.map((item) => (
|
|
56
|
+
<SegmentedControl.Item key={item.value} value={item.value}>
|
|
57
|
+
{item.label}
|
|
58
|
+
</SegmentedControl.Item>
|
|
59
|
+
))}
|
|
60
|
+
</SegmentedControl.Root>
|
|
61
|
+
</Page.Tools>
|
|
62
|
+
<Page.Actions>
|
|
63
|
+
<Button.Root variant="soft" tone="neutral">
|
|
64
|
+
<Button.Icon>
|
|
65
|
+
<Icon name="action.forward" />
|
|
66
|
+
</Button.Icon>
|
|
67
|
+
Поделиться
|
|
68
|
+
</Button.Root>
|
|
69
|
+
<Button.Root variant="soft" tone="neutral">
|
|
70
|
+
<Button.Icon>
|
|
71
|
+
<Icon name="action.download" />
|
|
72
|
+
</Button.Icon>
|
|
73
|
+
Экспорт
|
|
74
|
+
</Button.Root>
|
|
75
|
+
<Button.Root>
|
|
76
|
+
<Button.Icon>
|
|
77
|
+
<Icon name="action.add" />
|
|
78
|
+
</Button.Icon>
|
|
79
|
+
Новая сделка
|
|
80
|
+
</Button.Root>
|
|
81
|
+
</Page.Actions>
|
|
82
|
+
</Page.TopBar>
|
|
83
|
+
</Page.Root>
|
|
84
|
+
);
|
|
85
|
+
}
|