prime-ui-kit 0.14.0 → 0.15.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 +13 -14
- package/dist/chunks/{chunk-P6ZO37JM.js → chunk-2IKH55MI.js} +1 -1
- package/dist/chunks/{chunk-SYEX7OVT.js → chunk-THFZIHKU.js} +276 -263
- package/dist/chunks/{chunk-WXKRUVSE.js → chunk-XJAVS6FH.js} +49 -48
- package/dist/color-picker.js +2 -2
- package/dist/components/dnd/Dnd.d.ts +1 -1
- package/dist/components/login-form/LoginForm.d.ts +5 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/internal/swatch.d.ts +6 -2
- package/dist/layout/app-header/AppHeader.d.ts +9 -28
- package/dist/layout/index.d.ts +1 -1
- package/dist/skill/SKILL.md +9 -7
- package/dist/skill/api-contract.md +2 -2
- package/dist/skill/cheatsheet.md +9 -2
- package/dist/skill/checklist.md +9 -5
- package/dist/skill/choosing.md +7 -9
- package/dist/skill/components.md +5 -12
- package/dist/skill/composition.md +281 -54
- package/dist/skill/foundations.md +1 -1
- package/dist/skill/layouts.md +70 -37
- package/dist/skill/reference/components/avatar/examples/states.tsx +4 -4
- package/dist/skill/reference/components/badge/examples/applied-filters.tsx +13 -19
- package/dist/skill/reference/components/badge/examples/examples.module.css +1 -8
- package/dist/skill/reference/components/badge/examples/server-tags.tsx +2 -6
- package/dist/skill/reference/components/banner/examples/examples.module.css +1 -5
- package/dist/skill/reference/components/banner/examples/page-strip.tsx +16 -22
- package/dist/skill/reference/components/breadcrumb/COMPONENT.md +4 -3
- package/dist/skill/reference/components/breadcrumb/examples/ellipsis.tsx +2 -2
- package/dist/skill/reference/components/button-group/COMPONENT.md +2 -2
- package/dist/skill/reference/components/button-group/examples/in-form.tsx +22 -2
- package/dist/skill/reference/components/button-group/examples/states.tsx +10 -1
- package/dist/skill/reference/components/card/COMPONENT.md +2 -1
- package/dist/skill/reference/components/card/examples/screen.tsx +362 -0
- package/dist/skill/reference/components/card/examples/variants.tsx +15 -1
- package/dist/skill/reference/components/chart-frame/COMPONENT.md +2 -1
- package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +119 -0
- package/dist/skill/reference/components/chart-frame/examples/states.tsx +3 -1
- package/dist/skill/reference/components/chat/COMPONENT.md +3 -1
- package/dist/skill/reference/components/chat/examples/group-chat.tsx +15 -2
- package/dist/skill/reference/components/chat/examples/reactions.tsx +121 -0
- package/dist/skill/reference/components/chat/examples/screen.module.css +9 -0
- package/dist/skill/{patterns/chat.tsx → reference/components/chat/examples/screen.tsx} +170 -351
- package/dist/skill/reference/components/chat-list/COMPONENT.md +1 -0
- package/dist/skill/reference/components/chat-list/examples/links.tsx +72 -0
- package/dist/skill/reference/components/checkbox/COMPONENT.md +1 -1
- package/dist/skill/reference/components/checkbox/examples/examples.module.css +5 -1
- package/dist/skill/reference/components/checkbox/examples/indicator.tsx +13 -7
- package/dist/skill/reference/components/checkbox/examples/states.tsx +6 -1
- package/dist/skill/reference/components/color-field/COMPONENT.md +1 -1
- package/dist/skill/reference/components/color-picker/COMPONENT.md +4 -3
- package/dist/skill/reference/components/color-picker/examples/controlled-open.tsx +37 -0
- package/dist/skill/reference/components/color-picker/examples/presets.tsx +2 -2
- package/dist/skill/reference/components/color-picker/examples/states.tsx +23 -14
- package/dist/skill/reference/components/composer/COMPONENT.md +2 -1
- package/dist/skill/reference/components/composer/examples/attach-menu.tsx +78 -0
- package/dist/skill/reference/components/composer/examples/attachments.tsx +2 -2
- package/dist/skill/reference/components/crossfade/COMPONENT.md +1 -0
- package/dist/skill/reference/components/crossfade/examples/screen.tsx +197 -0
- package/dist/skill/reference/components/data-table/COMPONENT.md +3 -2
- package/dist/skill/reference/components/data-table/examples/detail-panel.tsx +36 -37
- package/dist/skill/reference/components/data-table/examples/examples.module.css +0 -12
- package/dist/skill/reference/components/data-table/examples/numeric.tsx +36 -4
- package/dist/skill/reference/components/data-table/examples/overview.tsx +1 -0
- package/dist/skill/reference/components/data-table/examples/row-open.tsx +7 -36
- package/dist/skill/{patterns/list-page.module.css → reference/components/data-table/examples/screen.module.css} +1 -7
- package/dist/skill/{patterns/list-page.tsx → reference/components/data-table/examples/screen.tsx} +84 -64
- package/dist/skill/reference/components/datepicker/COMPONENT.md +5 -4
- package/dist/skill/reference/components/datepicker/examples/examples.module.css +2 -6
- package/dist/skill/reference/components/datepicker/examples/in-form.tsx +47 -55
- package/dist/skill/reference/components/datepicker/examples/locale.tsx +35 -0
- package/dist/skill/reference/components/datepicker/examples/range-presets.tsx +11 -2
- package/dist/skill/reference/components/datepicker/examples/states.tsx +9 -1
- package/dist/skill/reference/components/description-list/COMPONENT.md +1 -0
- package/dist/skill/{patterns/detail-page.module.css → reference/components/description-list/examples/screen.module.css} +2 -9
- package/dist/skill/reference/components/description-list/examples/screen.tsx +214 -0
- package/dist/skill/reference/components/description-list/examples/structure.tsx +1 -1
- package/dist/skill/reference/components/digit-input/COMPONENT.md +3 -1
- package/dist/skill/reference/components/digit-input/examples/states.tsx +3 -1
- package/dist/skill/reference/components/digit-input/examples/without-focus-ring.tsx +13 -0
- package/dist/skill/reference/components/divider/examples/with-icon.tsx +2 -2
- package/dist/skill/reference/components/dnd/COMPONENT.md +4 -2
- package/dist/skill/reference/components/dnd/examples/drop-zones.tsx +82 -49
- package/dist/skill/reference/components/dnd/examples/examples.module.css +50 -0
- package/dist/skill/reference/components/dnd/examples/states.tsx +54 -0
- package/dist/skill/reference/components/dnd/examples/table.tsx +113 -0
- package/dist/skill/reference/components/drawer/COMPONENT.md +1 -0
- package/dist/skill/reference/components/drawer/examples/dismiss.tsx +5 -3
- package/dist/skill/reference/components/drawer/examples/examples.module.css +0 -13
- package/dist/skill/reference/components/drawer/examples/header-actions.tsx +5 -9
- package/dist/skill/reference/components/drawer/examples/overview.tsx +6 -18
- package/dist/skill/reference/components/drawer/examples/screen.tsx +298 -0
- package/dist/skill/reference/components/dropdown/examples/examples.module.css +1 -5
- package/dist/skill/reference/components/empty-page/COMPONENT.md +1 -1
- package/dist/skill/reference/components/empty-page/examples/region-error.tsx +8 -2
- package/dist/skill/reference/components/example-frame/COMPONENT.md +3 -2
- package/dist/skill/reference/components/example-frame/examples/initial-view.tsx +44 -0
- package/dist/skill/reference/components/field-list/COMPONENT.md +2 -1
- package/dist/skill/reference/components/field-list/examples/errors.tsx +5 -2
- package/dist/skill/{patterns/record-editor.tsx → reference/components/field-list/examples/screen.tsx} +3 -43
- package/dist/skill/reference/components/file-upload/COMPONENT.md +7 -6
- package/dist/skill/reference/components/file-upload/examples/custom-body.tsx +2 -1
- package/dist/skill/reference/components/file-upload/examples/examples.module.css +1 -7
- package/dist/skill/reference/components/file-upload/examples/file-cards.tsx +10 -1
- package/dist/skill/reference/components/file-upload/examples/gallery.tsx +2 -2
- package/dist/skill/reference/components/file-upload/examples/in-form.tsx +4 -9
- package/dist/skill/reference/components/file-upload/examples/overview.tsx +5 -1
- package/dist/skill/reference/components/file-upload/examples/row-parts.tsx +24 -1
- package/dist/skill/{patterns/media-library.module.css → reference/components/file-upload/examples/screen.module.css} +2 -1
- package/dist/skill/reference/components/file-upload/examples/screen.tsx +646 -0
- package/dist/skill/reference/components/file-upload/examples/states.tsx +6 -2
- package/dist/skill/reference/components/file-upload/examples/validation.tsx +11 -2
- package/dist/skill/reference/components/file-upload/examples/variants.tsx +3 -20
- package/dist/skill/reference/components/gantt/COMPONENT.md +2 -1
- package/dist/skill/reference/components/gantt/examples/screen.module.css +14 -0
- package/dist/skill/{patterns/schedule.tsx → reference/components/gantt/examples/screen.tsx} +174 -170
- package/dist/skill/reference/components/gantt/examples/states.tsx +6 -2
- package/dist/skill/reference/components/input/COMPONENT.md +2 -2
- package/dist/skill/reference/components/input/examples/examples.module.css +0 -6
- package/dist/skill/reference/components/input/examples/in-form.tsx +1 -9
- package/dist/skill/reference/components/input/examples/password-strength.tsx +34 -8
- package/dist/skill/reference/components/input/examples/states.tsx +6 -1
- package/dist/skill/reference/components/kanban/COMPONENT.md +3 -2
- package/dist/skill/reference/components/kanban/examples/columns.tsx +8 -5
- package/dist/skill/reference/components/kanban/examples/screen.module.css +17 -0
- package/dist/skill/{patterns/kanban-board.tsx → reference/components/kanban/examples/screen.tsx} +130 -172
- package/dist/skill/reference/components/kanban/examples/states.tsx +17 -6
- package/dist/skill/reference/components/login-form/COMPONENT.md +6 -5
- package/dist/skill/reference/components/login-form/examples/examples.module.css +2 -21
- package/dist/skill/reference/components/login-form/examples/forgot-password.tsx +28 -32
- package/dist/skill/reference/components/login-form/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/login-form/examples/overview.tsx +45 -47
- package/dist/skill/reference/components/login-form/examples/register.tsx +64 -68
- package/dist/skill/reference/components/login-form/examples/reset-password.tsx +50 -47
- package/dist/skill/reference/components/login-form/examples/sizes.tsx +4 -6
- package/dist/skill/reference/components/login-form/examples/states.tsx +53 -57
- package/dist/skill/reference/components/login-form/examples/structure.tsx +18 -22
- package/dist/skill/reference/components/login-form/examples/verification-code.tsx +41 -45
- package/dist/skill/reference/components/media-viewer/COMPONENT.md +1 -1
- package/dist/skill/reference/components/media-viewer/examples/dismiss.tsx +5 -1
- package/dist/skill/reference/components/message/COMPONENT.md +4 -3
- package/dist/skill/reference/components/message/examples/file.tsx +5 -1
- package/dist/skill/reference/components/message/examples/media-open.tsx +48 -0
- package/dist/skill/reference/components/message/examples/status.tsx +21 -3
- package/dist/skill/reference/components/message/examples/text-formatting.tsx +7 -1
- package/dist/skill/reference/components/modal/COMPONENT.md +2 -1
- package/dist/skill/reference/components/modal/examples/custom-container.tsx +20 -20
- package/dist/skill/reference/components/modal/examples/dismiss.tsx +5 -3
- package/dist/skill/reference/components/modal/examples/enter-key.tsx +116 -0
- package/dist/skill/reference/components/modal/examples/examples.module.css +7 -13
- package/dist/skill/reference/components/modal/examples/structure.tsx +5 -2
- package/dist/skill/reference/components/native-select/COMPONENT.md +1 -1
- package/dist/skill/reference/components/native-select/examples/states.tsx +5 -1
- package/dist/skill/reference/components/notification/COMPONENT.md +1 -1
- package/dist/skill/reference/components/notification/examples/dismiss.tsx +2 -2
- package/dist/skill/reference/components/page-content/COMPONENT.md +1 -0
- package/dist/skill/reference/components/page-content/examples/list-detail.tsx +0 -3
- package/dist/skill/{patterns/settings-page.tsx → reference/components/page-content/examples/screen.tsx} +3 -3
- package/dist/skill/reference/components/page-content/examples/variants.tsx +4 -11
- package/dist/skill/reference/components/page-toolbar/COMPONENT.md +17 -15
- package/dist/skill/reference/components/page-toolbar/examples/narrow.tsx +6 -3
- package/dist/skill/reference/components/pagination/examples/controlled.tsx +29 -29
- package/dist/skill/reference/components/pagination/examples/examples.module.css +0 -2
- package/dist/skill/reference/components/progress-bar/COMPONENT.md +1 -1
- package/dist/skill/reference/components/progress-bar/examples/segments.tsx +2 -2
- package/dist/skill/reference/components/progress-circle/COMPONENT.md +1 -1
- package/dist/skill/reference/components/progress-circle/examples/segments.tsx +8 -3
- package/dist/skill/reference/components/radio/COMPONENT.md +1 -0
- package/dist/skill/reference/components/radio/examples/examples.module.css +14 -0
- package/dist/skill/reference/components/radio/examples/in-form.tsx +45 -0
- package/dist/skill/reference/components/scroll-container/COMPONENT.md +1 -0
- package/dist/skill/reference/components/scroll-container/examples/auto-scroll.tsx +3 -3
- package/dist/skill/reference/components/scroll-container/examples/chat.tsx +3 -3
- package/dist/skill/reference/components/scroll-container/examples/edges.tsx +6 -3
- package/dist/skill/reference/components/scroll-container/examples/examples.module.css +4 -17
- package/dist/skill/reference/components/scroll-container/examples/load-more.tsx +51 -0
- package/dist/skill/reference/components/scroll-container/examples/lock.tsx +3 -5
- package/dist/skill/reference/components/scroll-container/examples/overscroll.tsx +3 -3
- package/dist/skill/reference/components/scroll-container/examples/overview.tsx +3 -3
- package/dist/skill/reference/components/scroll-container/examples/scrollbar.tsx +13 -7
- package/dist/skill/reference/components/scroll-container/examples/variants.tsx +13 -7
- package/dist/skill/reference/components/segmented-control/COMPONENT.md +2 -2
- package/dist/skill/reference/components/segmented-control/examples/in-form.tsx +5 -1
- package/dist/skill/reference/components/segmented-control/examples/states.tsx +10 -1
- package/dist/skill/reference/components/select/COMPONENT.md +1 -1
- package/dist/skill/reference/components/select/examples/examples.module.css +2 -7
- package/dist/skill/reference/components/select/examples/states.tsx +13 -1
- package/dist/skill/reference/components/sheet/COMPONENT.md +2 -0
- package/dist/skill/reference/components/sheet/examples/guard.tsx +72 -0
- package/dist/skill/reference/components/sheet/examples/header-actions.tsx +56 -0
- package/dist/skill/reference/components/slider/COMPONENT.md +2 -1
- package/dist/skill/reference/components/slider/examples/examples.module.css +8 -0
- package/dist/skill/reference/components/slider/examples/in-form.tsx +47 -0
- package/dist/skill/reference/components/slider/examples/states.tsx +4 -1
- package/dist/skill/reference/components/smart-filter/COMPONENT.md +1 -1
- package/dist/skill/reference/components/smart-filter/examples/controlled.tsx +3 -3
- package/dist/skill/reference/components/smart-filter/examples/ranges.tsx +44 -10
- package/dist/skill/reference/components/sparkline/COMPONENT.md +1 -1
- package/dist/skill/reference/components/sparkline/examples/reference.tsx +2 -1
- package/dist/skill/reference/components/tabs/COMPONENT.md +1 -1
- package/dist/skill/reference/components/tabs/examples/sizes.tsx +1 -1
- package/dist/skill/reference/components/tag-select/COMPONENT.md +1 -1
- package/dist/skill/reference/components/tag-select/examples/states.tsx +8 -1
- package/dist/skill/reference/components/textarea/COMPONENT.md +1 -1
- package/dist/skill/reference/components/textarea/examples/examples.module.css +0 -6
- package/dist/skill/reference/components/textarea/examples/in-form.tsx +1 -9
- package/dist/skill/reference/components/textarea/examples/states.tsx +2 -1
- package/dist/skill/reference/components/thumbnail/COMPONENT.md +2 -1
- package/dist/skill/reference/components/thumbnail/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/thumbnail/examples/fit.tsx +24 -0
- package/dist/skill/reference/components/thumbnail/examples/video.tsx +20 -1
- package/dist/skill/reference/components/timeline/COMPONENT.md +1 -1
- package/dist/skill/reference/components/timeline/examples/links.tsx +55 -14
- package/dist/skill/reference/components/tooltip/COMPONENT.md +1 -1
- package/dist/skill/reference/components/tooltip/examples/toolbar.tsx +2 -2
- package/dist/skill/reference/components/typography/examples/weights.tsx +3 -0
- package/dist/skill/reference/components/video-note/COMPONENT.md +2 -2
- package/dist/skill/reference/components/video-note/examples/controlled.tsx +19 -2
- package/dist/skill/reference/components/video-note/examples/in-message.tsx +5 -2
- package/dist/skill/reference/components/visually-hidden/COMPONENT.md +2 -1
- package/dist/skill/reference/components/visually-hidden/examples/assertive.tsx +39 -0
- package/dist/skill/reference/components/voice-player/COMPONENT.md +2 -2
- package/dist/skill/reference/components/voice-player/examples/call-recording.tsx +19 -9
- package/dist/skill/reference/components/voice-player/examples/controlled.tsx +20 -3
- package/dist/skill/reference/layout/app-header/COMPONENT.md +46 -63
- package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +10 -9
- package/dist/skill/reference/layout/app-header/examples/examples.module.css +1 -1
- package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -1
- package/dist/skill/reference/layout/app-header/examples/narrow.tsx +4 -5
- package/dist/skill/reference/layout/app-header/examples/overview.tsx +8 -10
- package/dist/skill/reference/layout/app-header/examples/page-title.tsx +3 -10
- package/dist/skill/reference/layout/app-shell/COMPONENT.md +4 -3
- package/dist/skill/reference/layout/app-shell/examples/overview.tsx +15 -30
- package/dist/skill/reference/layout/app-shell/examples/screen.tsx +262 -0
- package/dist/skill/reference/layout/app-shell/examples/template.tsx +29 -9
- package/dist/skill/reference/layout/sidebar/COMPONENT.md +7 -4
- package/dist/skill/reference/layout/sidebar/examples/account.tsx +2 -2
- package/dist/skill/reference/layout/sidebar/examples/collapsible-groups.tsx +12 -4
- package/dist/skill/reference/layout/sidebar/examples/custom-part.tsx +53 -0
- package/dist/skill/reference/layout/sidebar/examples/examples.module.css +5 -0
- package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +53 -0
- package/dist/skill/reference/layout/sidebar/examples/persist.tsx +57 -0
- package/dist/skill/reference/layout/sidebar/examples/router.tsx +14 -2
- package/dist/skill/reference/layout/sidebar/examples/structure.tsx +7 -2
- package/dist/skill/responsive.md +2 -2
- package/package.json +1 -1
- package/src/components/avatar/examples/states.tsx +4 -4
- package/src/components/badge/examples/applied-filters.tsx +13 -19
- package/src/components/badge/examples/examples.module.css +1 -8
- package/src/components/badge/examples/server-tags.tsx +2 -6
- package/src/components/banner/examples/examples.module.css +1 -5
- package/src/components/banner/examples/page-strip.tsx +16 -22
- package/src/components/breadcrumb/COMPONENT.md +4 -3
- package/src/components/breadcrumb/examples/ellipsis.tsx +2 -2
- package/src/components/button-group/COMPONENT.md +2 -2
- package/src/components/button-group/examples/in-form.tsx +22 -2
- package/src/components/button-group/examples/states.tsx +10 -1
- package/src/components/card/COMPONENT.md +2 -1
- package/src/components/card/examples/screen.module.css +14 -0
- package/src/components/card/examples/screen.tsx +362 -0
- package/src/components/card/examples/variants.tsx +15 -1
- package/src/components/chart-frame/COMPONENT.md +2 -1
- package/src/components/chart-frame/examples/fill-height.tsx +119 -0
- package/src/components/chart-frame/examples/states.tsx +3 -1
- package/src/components/chat/COMPONENT.md +3 -1
- package/src/components/chat/examples/group-chat.tsx +15 -2
- package/src/components/chat/examples/reactions.tsx +121 -0
- package/src/components/chat/examples/screen.module.css +9 -0
- package/src/components/chat/examples/screen.tsx +718 -0
- package/src/components/chat-list/COMPONENT.md +1 -0
- package/src/components/chat-list/examples/links.tsx +72 -0
- package/src/components/checkbox/COMPONENT.md +1 -1
- package/src/components/checkbox/examples/examples.module.css +5 -1
- package/src/components/checkbox/examples/indicator.tsx +13 -7
- package/src/components/checkbox/examples/states.tsx +6 -1
- package/src/components/color-field/COMPONENT.md +1 -1
- package/src/components/color-picker/COMPONENT.md +4 -3
- package/src/components/color-picker/examples/controlled-open.tsx +37 -0
- package/src/components/color-picker/examples/presets.tsx +2 -2
- package/src/components/color-picker/examples/states.tsx +23 -14
- package/src/components/composer/COMPONENT.md +2 -1
- package/src/components/composer/examples/attach-menu.tsx +78 -0
- package/src/components/composer/examples/attachments.tsx +2 -2
- package/src/components/crossfade/COMPONENT.md +1 -0
- package/src/components/crossfade/examples/screen.module.css +40 -0
- package/src/components/crossfade/examples/screen.tsx +197 -0
- package/src/components/data-table/COMPONENT.md +3 -2
- package/src/components/data-table/examples/detail-panel.tsx +36 -37
- package/src/components/data-table/examples/examples.module.css +0 -12
- package/src/components/data-table/examples/numeric.tsx +36 -4
- package/src/components/data-table/examples/overview.tsx +1 -0
- package/src/components/data-table/examples/row-open.tsx +7 -36
- package/src/components/data-table/examples/screen.module.css +13 -0
- package/src/components/data-table/examples/screen.tsx +354 -0
- package/src/components/datepicker/COMPONENT.md +5 -4
- package/src/components/datepicker/examples/examples.module.css +2 -6
- package/src/components/datepicker/examples/in-form.tsx +47 -55
- package/src/components/datepicker/examples/locale.tsx +35 -0
- package/src/components/datepicker/examples/range-presets.tsx +11 -2
- package/src/components/datepicker/examples/states.tsx +9 -1
- package/src/components/description-list/COMPONENT.md +1 -0
- package/src/components/description-list/examples/screen.module.css +64 -0
- package/src/components/description-list/examples/screen.tsx +214 -0
- package/src/components/description-list/examples/structure.tsx +1 -1
- package/src/components/digit-input/COMPONENT.md +3 -1
- package/src/components/digit-input/examples/states.tsx +3 -1
- package/src/components/digit-input/examples/without-focus-ring.tsx +13 -0
- package/src/components/divider/examples/with-icon.tsx +2 -2
- package/src/components/dnd/COMPONENT.md +4 -2
- package/src/components/dnd/examples/drop-zones.tsx +82 -49
- package/src/components/dnd/examples/examples.module.css +50 -0
- package/src/components/dnd/examples/states.tsx +54 -0
- package/src/components/dnd/examples/table.tsx +113 -0
- package/src/components/drawer/COMPONENT.md +1 -0
- package/src/components/drawer/examples/dismiss.tsx +5 -3
- package/src/components/drawer/examples/examples.module.css +0 -13
- package/src/components/drawer/examples/header-actions.tsx +5 -9
- package/src/components/drawer/examples/overview.tsx +6 -18
- package/src/components/drawer/examples/screen.module.css +14 -0
- package/src/components/drawer/examples/screen.tsx +298 -0
- package/src/components/dropdown/examples/examples.module.css +1 -5
- package/src/components/empty-page/COMPONENT.md +1 -1
- package/src/components/empty-page/examples/region-error.tsx +8 -2
- package/src/components/example-frame/COMPONENT.md +3 -2
- package/src/components/example-frame/examples/initial-view.tsx +44 -0
- package/src/components/field-list/COMPONENT.md +2 -1
- package/src/components/field-list/examples/errors.tsx +5 -2
- package/src/components/field-list/examples/screen.module.css +18 -0
- package/src/components/field-list/examples/screen.tsx +316 -0
- package/src/components/file-upload/COMPONENT.md +7 -6
- package/src/components/file-upload/examples/custom-body.tsx +2 -1
- package/src/components/file-upload/examples/examples.module.css +1 -7
- package/src/components/file-upload/examples/file-cards.tsx +10 -1
- package/src/components/file-upload/examples/gallery.tsx +2 -2
- package/src/components/file-upload/examples/in-form.tsx +4 -9
- package/src/components/file-upload/examples/overview.tsx +5 -1
- package/src/components/file-upload/examples/row-parts.tsx +24 -1
- package/src/components/file-upload/examples/screen.module.css +45 -0
- package/src/components/file-upload/examples/screen.tsx +646 -0
- package/src/components/file-upload/examples/states.tsx +6 -2
- package/src/components/file-upload/examples/validation.tsx +11 -2
- package/src/components/file-upload/examples/variants.tsx +3 -20
- package/src/components/gantt/COMPONENT.md +2 -1
- package/src/components/gantt/examples/screen.module.css +14 -0
- package/src/components/gantt/examples/screen.tsx +726 -0
- package/src/components/gantt/examples/states.tsx +6 -2
- package/src/components/input/COMPONENT.md +2 -2
- package/src/components/input/examples/examples.module.css +0 -6
- package/src/components/input/examples/in-form.tsx +1 -9
- package/src/components/input/examples/password-strength.tsx +34 -8
- package/src/components/input/examples/states.tsx +6 -1
- package/src/components/kanban/COMPONENT.md +3 -2
- package/src/components/kanban/examples/columns.tsx +8 -5
- package/src/components/kanban/examples/screen.module.css +17 -0
- package/src/components/kanban/examples/screen.tsx +572 -0
- package/src/components/kanban/examples/states.tsx +17 -6
- package/src/components/login-form/COMPONENT.md +6 -5
- package/src/components/login-form/examples/examples.module.css +2 -21
- package/src/components/login-form/examples/forgot-password.tsx +28 -32
- package/src/components/login-form/examples/narrow.tsx +1 -1
- package/src/components/login-form/examples/overview.tsx +45 -47
- package/src/components/login-form/examples/register.tsx +64 -68
- package/src/components/login-form/examples/reset-password.tsx +50 -47
- package/src/components/login-form/examples/sizes.tsx +4 -6
- package/src/components/login-form/examples/states.tsx +53 -57
- package/src/components/login-form/examples/structure.tsx +18 -22
- package/src/components/login-form/examples/verification-code.tsx +41 -45
- package/src/components/media-viewer/COMPONENT.md +1 -1
- package/src/components/media-viewer/examples/dismiss.tsx +5 -1
- package/src/components/message/COMPONENT.md +4 -3
- package/src/components/message/examples/file.tsx +5 -1
- package/src/components/message/examples/media-open.tsx +48 -0
- package/src/components/message/examples/status.tsx +21 -3
- package/src/components/message/examples/text-formatting.tsx +7 -1
- package/src/components/modal/COMPONENT.md +2 -1
- package/src/components/modal/examples/custom-container.tsx +20 -20
- package/src/components/modal/examples/dismiss.tsx +5 -3
- package/src/components/modal/examples/enter-key.tsx +116 -0
- package/src/components/modal/examples/examples.module.css +7 -13
- package/src/components/modal/examples/structure.tsx +5 -2
- package/src/components/native-select/COMPONENT.md +1 -1
- package/src/components/native-select/examples/states.tsx +5 -1
- package/src/components/notification/COMPONENT.md +1 -1
- package/src/components/notification/examples/dismiss.tsx +2 -2
- package/src/components/page-content/COMPONENT.md +1 -0
- package/src/components/page-content/examples/list-detail.tsx +0 -3
- package/src/components/page-content/examples/screen.module.css +27 -0
- package/src/components/page-content/examples/screen.tsx +196 -0
- package/src/components/page-content/examples/variants.tsx +4 -11
- package/src/components/page-toolbar/COMPONENT.md +17 -15
- package/src/components/page-toolbar/examples/narrow.tsx +6 -3
- package/src/components/pagination/examples/controlled.tsx +29 -29
- package/src/components/pagination/examples/examples.module.css +0 -2
- package/src/components/progress-bar/COMPONENT.md +1 -1
- package/src/components/progress-bar/examples/segments.tsx +2 -2
- package/src/components/progress-circle/COMPONENT.md +1 -1
- package/src/components/progress-circle/examples/segments.tsx +8 -3
- package/src/components/radio/COMPONENT.md +1 -0
- package/src/components/radio/examples/examples.module.css +14 -0
- package/src/components/radio/examples/in-form.tsx +45 -0
- package/src/components/scroll-container/COMPONENT.md +1 -0
- package/src/components/scroll-container/examples/auto-scroll.tsx +3 -3
- package/src/components/scroll-container/examples/chat.tsx +3 -3
- package/src/components/scroll-container/examples/edges.tsx +6 -3
- package/src/components/scroll-container/examples/examples.module.css +4 -17
- package/src/components/scroll-container/examples/load-more.tsx +51 -0
- package/src/components/scroll-container/examples/lock.tsx +3 -5
- package/src/components/scroll-container/examples/overscroll.tsx +3 -3
- package/src/components/scroll-container/examples/overview.tsx +3 -3
- package/src/components/scroll-container/examples/scrollbar.tsx +13 -7
- package/src/components/scroll-container/examples/variants.tsx +13 -7
- package/src/components/segmented-control/COMPONENT.md +2 -2
- package/src/components/segmented-control/examples/in-form.tsx +5 -1
- package/src/components/segmented-control/examples/states.tsx +10 -1
- package/src/components/select/COMPONENT.md +1 -1
- package/src/components/select/examples/examples.module.css +2 -7
- package/src/components/select/examples/states.tsx +13 -1
- package/src/components/sheet/COMPONENT.md +2 -0
- package/src/components/sheet/examples/guard.tsx +72 -0
- package/src/components/sheet/examples/header-actions.tsx +56 -0
- package/src/components/slider/COMPONENT.md +2 -1
- package/src/components/slider/examples/examples.module.css +8 -0
- package/src/components/slider/examples/in-form.tsx +47 -0
- package/src/components/slider/examples/states.tsx +4 -1
- package/src/components/smart-filter/COMPONENT.md +1 -1
- package/src/components/smart-filter/examples/controlled.tsx +3 -3
- package/src/components/smart-filter/examples/ranges.tsx +44 -10
- package/src/components/sparkline/COMPONENT.md +1 -1
- package/src/components/sparkline/examples/reference.tsx +2 -1
- package/src/components/tabs/COMPONENT.md +1 -1
- package/src/components/tabs/examples/sizes.tsx +1 -1
- package/src/components/tag-select/COMPONENT.md +1 -1
- package/src/components/tag-select/examples/states.tsx +8 -1
- package/src/components/textarea/COMPONENT.md +1 -1
- package/src/components/textarea/examples/examples.module.css +0 -6
- package/src/components/textarea/examples/in-form.tsx +1 -9
- package/src/components/textarea/examples/states.tsx +2 -1
- package/src/components/thumbnail/COMPONENT.md +2 -1
- package/src/components/thumbnail/examples/examples.module.css +1 -1
- package/src/components/thumbnail/examples/fit.tsx +24 -0
- package/src/components/thumbnail/examples/video.tsx +20 -1
- package/src/components/timeline/COMPONENT.md +1 -1
- package/src/components/timeline/examples/links.tsx +55 -14
- package/src/components/tooltip/COMPONENT.md +1 -1
- package/src/components/tooltip/examples/toolbar.tsx +2 -2
- package/src/components/typography/examples/weights.tsx +3 -0
- package/src/components/video-note/COMPONENT.md +2 -2
- package/src/components/video-note/examples/controlled.tsx +19 -2
- package/src/components/video-note/examples/in-message.tsx +5 -2
- package/src/components/visually-hidden/COMPONENT.md +2 -1
- package/src/components/visually-hidden/examples/assertive.tsx +39 -0
- package/src/components/voice-player/COMPONENT.md +2 -2
- package/src/components/voice-player/examples/call-recording.tsx +19 -9
- package/src/components/voice-player/examples/controlled.tsx +20 -3
- package/src/layout/app-header/COMPONENT.md +46 -63
- package/src/layout/app-header/examples/breadcrumbs.tsx +10 -9
- package/src/layout/app-header/examples/examples.module.css +1 -1
- package/src/layout/app-header/examples/in-app-shell.tsx +0 -1
- package/src/layout/app-header/examples/narrow.tsx +4 -5
- package/src/layout/app-header/examples/overview.tsx +8 -10
- package/src/layout/app-header/examples/page-title.tsx +3 -10
- package/src/layout/app-shell/COMPONENT.md +4 -3
- package/src/layout/app-shell/examples/overview.tsx +15 -30
- package/src/layout/app-shell/examples/screen.module.css +11 -0
- package/src/layout/app-shell/examples/screen.tsx +262 -0
- package/src/layout/app-shell/examples/template.tsx +29 -9
- package/src/layout/sidebar/COMPONENT.md +7 -4
- package/src/layout/sidebar/examples/account.tsx +2 -2
- package/src/layout/sidebar/examples/collapsible-groups.tsx +12 -4
- package/src/layout/sidebar/examples/custom-part.tsx +53 -0
- package/src/layout/sidebar/examples/examples.module.css +5 -0
- package/src/layout/sidebar/examples/narrow.tsx +53 -0
- package/src/layout/sidebar/examples/persist.tsx +57 -0
- package/src/layout/sidebar/examples/router.tsx +14 -2
- package/src/layout/sidebar/examples/structure.tsx +7 -2
- package/dist/skill/patterns/app-shell.tsx +0 -303
- package/dist/skill/patterns/chat.module.css +0 -8
- package/dist/skill/patterns/dashboard.tsx +0 -340
- package/dist/skill/patterns/detail-page.tsx +0 -206
- package/dist/skill/patterns/form-drawer.tsx +0 -240
- package/dist/skill/patterns/kanban-board.module.css +0 -28
- package/dist/skill/patterns/media-library.tsx +0 -637
- package/dist/skill/patterns/schedule.module.css +0 -22
- package/dist/skill/patterns/screen-states.tsx +0 -187
- /package/dist/skill/{patterns/dashboard.module.css → reference/components/card/examples/screen.module.css} +0 -0
- /package/dist/skill/{patterns/screen-states.module.css → reference/components/crossfade/examples/screen.module.css} +0 -0
- /package/dist/skill/{patterns/form-drawer.module.css → reference/components/drawer/examples/screen.module.css} +0 -0
- /package/dist/skill/{patterns/record-editor.module.css → reference/components/field-list/examples/screen.module.css} +0 -0
- /package/dist/skill/{patterns/settings-page.module.css → reference/components/page-content/examples/screen.module.css} +0 -0
- /package/dist/skill/{patterns/app-shell.module.css → reference/layout/app-shell/examples/screen.module.css} +0 -0
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/** The app frame: Sidebar in the nav column,
|
|
2
|
-
import {
|
|
3
|
-
AppHeader,
|
|
4
|
-
AppShell,
|
|
5
|
-
Breadcrumb,
|
|
6
|
-
Button,
|
|
7
|
-
Icon,
|
|
8
|
-
PageContent,
|
|
9
|
-
Sidebar,
|
|
10
|
-
Typography,
|
|
11
|
-
} from "prime-ui-kit";
|
|
1
|
+
/** The app frame: Sidebar in the nav column, the page title and its action in the AppHeader, the page in main; only main scrolls — `fillViewport`. */
|
|
2
|
+
import { AppHeader, AppShell, Button, Icon, PageContent, Sidebar, Typography } from "prime-ui-kit";
|
|
12
3
|
|
|
13
4
|
import styles from "./examples.module.css";
|
|
14
5
|
|
|
@@ -48,31 +39,25 @@ export default function AppShellOverviewExample() {
|
|
|
48
39
|
</AppShell.Nav>
|
|
49
40
|
<AppHeader.Root>
|
|
50
41
|
<AppHeader.Start>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
</
|
|
42
|
+
<AppHeader.Title>
|
|
43
|
+
Обзор
|
|
44
|
+
<AppHeader.Description>Октябрь · 37 сделок в работе</AppHeader.Description>
|
|
45
|
+
</AppHeader.Title>
|
|
55
46
|
</AppHeader.Start>
|
|
47
|
+
<AppHeader.Actions>
|
|
48
|
+
<Button.Root>
|
|
49
|
+
<Button.Icon>
|
|
50
|
+
<Icon name="action.add" />
|
|
51
|
+
</Button.Icon>
|
|
52
|
+
Новая сделка
|
|
53
|
+
</Button.Root>
|
|
54
|
+
</AppHeader.Actions>
|
|
56
55
|
</AppHeader.Root>
|
|
57
56
|
<AppShell.Main>
|
|
58
57
|
<PageContent.Page>
|
|
59
|
-
<PageContent.Header>
|
|
60
|
-
{/* In a real app this is PageContent.Title (the page h1). */}
|
|
61
|
-
<Typography as="h2" variant="heading-m">
|
|
62
|
-
Обзор
|
|
63
|
-
</Typography>
|
|
64
|
-
<PageContent.Actions>
|
|
65
|
-
<Button.Root>
|
|
66
|
-
<Button.Icon>
|
|
67
|
-
<Icon name="action.add" />
|
|
68
|
-
</Button.Icon>
|
|
69
|
-
Новая сделка
|
|
70
|
-
</Button.Root>
|
|
71
|
-
</PageContent.Actions>
|
|
72
|
-
</PageContent.Header>
|
|
73
58
|
<PageContent.Body>
|
|
74
59
|
<Typography variant="body-m" tone="secondary">
|
|
75
|
-
Выручка за месяц — 4,8 млн ₽,
|
|
60
|
+
Выручка за месяц — 4,8 млн ₽, на 12% больше, чем в сентябре.
|
|
76
61
|
</Typography>
|
|
77
62
|
</PageContent.Body>
|
|
78
63
|
</PageContent.Page>
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/** The app frame for desktop and phone: the Sidebar rail on a wide screen, the floating BottomNav in the footer on a phone, the AppHeader with the menu button, the page title with a line of data, and a simple home page that swaps with the current section — `fillViewport`, `scrollResetKey`. */
|
|
2
|
+
import {
|
|
3
|
+
AppHeader,
|
|
4
|
+
AppShell,
|
|
5
|
+
BottomNav,
|
|
6
|
+
Card,
|
|
7
|
+
Checkbox,
|
|
8
|
+
Crossfade,
|
|
9
|
+
Icon,
|
|
10
|
+
type IconName,
|
|
11
|
+
PageContent,
|
|
12
|
+
Sidebar,
|
|
13
|
+
Typography,
|
|
14
|
+
} from "prime-ui-kit";
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
|
|
17
|
+
import styles from "./screen.module.css";
|
|
18
|
+
|
|
19
|
+
type SectionId = "today" | "deals" | "clients" | "tasks" | "reports" | "settings";
|
|
20
|
+
type Section = { id: SectionId; label: string; icon: IconName };
|
|
21
|
+
type Row = { id: string; title: string; meta: string };
|
|
22
|
+
|
|
23
|
+
/** The main sections: the Sidebar's first group on a wide screen, the bar on a phone. */
|
|
24
|
+
const MAIN: Section[] = [
|
|
25
|
+
{ id: "today", label: "Сегодня", icon: "nav.home" },
|
|
26
|
+
{ id: "deals", label: "Сделки", icon: "object.funnel" },
|
|
27
|
+
{ id: "clients", label: "Клиенты", icon: "object.users" },
|
|
28
|
+
{ id: "tasks", label: "Задачи", icon: "object.tasks" },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
/** The rest of the map: in the Sidebar footer; on a phone «Ещё» opens the Sidebar panel. */
|
|
32
|
+
const MORE: Section[] = [
|
|
33
|
+
{ id: "reports", label: "Отчёты", icon: "object.chart" },
|
|
34
|
+
{ id: "settings", label: "Настройки", icon: "action.settings" },
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const SECTIONS = [...MAIN, ...MORE];
|
|
38
|
+
|
|
39
|
+
/** Open deals: an informational count, plain in the Sidebar. */
|
|
40
|
+
const OPEN_DEALS = 12;
|
|
41
|
+
|
|
42
|
+
const KPIS = [
|
|
43
|
+
{ label: "Сделки в работе", value: "37", delta: "+4 за неделю", tone: "success" },
|
|
44
|
+
{ label: "Выручка за октябрь", value: "4,8 млн ₽", delta: "+12% к сентябрю", tone: "success" },
|
|
45
|
+
{ label: "Ждут ответа", value: "5 клиентов", delta: "2 дольше суток", tone: "danger" },
|
|
46
|
+
] as const;
|
|
47
|
+
|
|
48
|
+
const TASKS: Row[] = [
|
|
49
|
+
{ id: "t1", title: "Позвонить в ООО «Север» по договору поставки", meta: "10:30" },
|
|
50
|
+
{ id: "t2", title: "Отправить КП для АО «Меридиан»", meta: "12:00" },
|
|
51
|
+
{ id: "t3", title: "Согласовать скидку для ИП Котова", meta: "15:00" },
|
|
52
|
+
{ id: "t4", title: "Подготовить отчёт по воронке за неделю", meta: "17:30" },
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
/** What every section other than «Сегодня» lists. */
|
|
56
|
+
const PAGES: Record<Exclude<SectionId, "today">, { description: string; rows: Row[] }> = {
|
|
57
|
+
deals: {
|
|
58
|
+
description: "12 сделок в работе · 9,6 млн ₽",
|
|
59
|
+
rows: [
|
|
60
|
+
{ id: "d1", title: "ООО «Север» · поставка оборудования", meta: "2 400 000 ₽" },
|
|
61
|
+
{ id: "d2", title: "АО «Меридиан» · годовой сервис", meta: "1 180 000 ₽" },
|
|
62
|
+
{ id: "d3", title: "ООО «Вектор» · внедрение CRM", meta: "860 000 ₽" },
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
clients: {
|
|
66
|
+
description: "248 клиентов · 5 ждут ответа",
|
|
67
|
+
rows: [
|
|
68
|
+
{ id: "c1", title: "ООО «Север»", meta: "4 сделки" },
|
|
69
|
+
{ id: "c2", title: "АО «Меридиан»", meta: "2 сделки" },
|
|
70
|
+
{ id: "c3", title: "ИП Котов", meta: "1 сделка" },
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
tasks: {
|
|
74
|
+
description: "4 задачи на сегодня",
|
|
75
|
+
rows: TASKS.map((task) => ({ ...task, meta: `сегодня, ${task.meta}` })),
|
|
76
|
+
},
|
|
77
|
+
reports: {
|
|
78
|
+
description: "2 отчёта · обновлены сегодня",
|
|
79
|
+
rows: [
|
|
80
|
+
{ id: "r1", title: "Воронка продаж", meta: "обновлён сегодня" },
|
|
81
|
+
{ id: "r2", title: "План и факт по менеджерам", meta: "октябрь" },
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
settings: {
|
|
85
|
+
description: "8 человек в команде · 2 интеграции",
|
|
86
|
+
rows: [
|
|
87
|
+
{ id: "s1", title: "Команда и роли", meta: "8 человек" },
|
|
88
|
+
{ id: "s2", title: "Почта и телефония", meta: "подключены" },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const isMore = (id: SectionId) => MORE.some((section) => section.id === id);
|
|
94
|
+
|
|
95
|
+
export default function AppShellScreenExample() {
|
|
96
|
+
const [current, setCurrent] = React.useState<SectionId>("today");
|
|
97
|
+
const [menuOpen, setMenuOpen] = React.useState(false);
|
|
98
|
+
const [done, setDone] = React.useState<ReadonlySet<string>>(() => new Set(["t1"]));
|
|
99
|
+
|
|
100
|
+
const openTasks = TASKS.length - done.size;
|
|
101
|
+
const section = SECTIONS.find((item) => item.id === current) ?? SECTIONS[0];
|
|
102
|
+
|
|
103
|
+
// One handler for every way into a section: the Sidebar and the bar.
|
|
104
|
+
const go = (id: SectionId) => {
|
|
105
|
+
setCurrent(id);
|
|
106
|
+
setMenuOpen(false);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const toggleTask = (id: string, checked: boolean) =>
|
|
110
|
+
setDone((prev) => {
|
|
111
|
+
const next = new Set(prev);
|
|
112
|
+
if (checked) next.add(id);
|
|
113
|
+
else next.delete(id);
|
|
114
|
+
return next;
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const countOf = (id: SectionId) => {
|
|
118
|
+
if (id === "deals") return <Sidebar.ItemCount>{OPEN_DEALS}</Sidebar.ItemCount>;
|
|
119
|
+
if (id === "tasks" && openTasks > 0) {
|
|
120
|
+
return <Sidebar.ItemCount color="red">{openTasks}</Sidebar.ItemCount>;
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const sidebarItem = (item: Section) => (
|
|
126
|
+
<Sidebar.Item key={item.id} current={item.id === current} onClick={() => go(item.id)}>
|
|
127
|
+
<Sidebar.ItemIcon>
|
|
128
|
+
<Icon name={item.icon} />
|
|
129
|
+
</Sidebar.ItemIcon>
|
|
130
|
+
{item.label}
|
|
131
|
+
{countOf(item.id)}
|
|
132
|
+
</Sidebar.Item>
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<AppShell.Template
|
|
137
|
+
fillViewport
|
|
138
|
+
scrollResetKey={current}
|
|
139
|
+
nav={
|
|
140
|
+
<Sidebar.Root open={menuOpen} onOpenChange={setMenuOpen}>
|
|
141
|
+
<Sidebar.Header>
|
|
142
|
+
<Sidebar.Brand description="Отдел продаж">
|
|
143
|
+
<Sidebar.BrandLogo>
|
|
144
|
+
<Icon name="object.funnel" />
|
|
145
|
+
</Sidebar.BrandLogo>
|
|
146
|
+
Acme CRM
|
|
147
|
+
</Sidebar.Brand>
|
|
148
|
+
<Sidebar.Toggle variant="header" />
|
|
149
|
+
</Sidebar.Header>
|
|
150
|
+
<Sidebar.Content>
|
|
151
|
+
<Sidebar.Group>{MAIN.map(sidebarItem)}</Sidebar.Group>
|
|
152
|
+
</Sidebar.Content>
|
|
153
|
+
<Sidebar.Footer>{MORE.map(sidebarItem)}</Sidebar.Footer>
|
|
154
|
+
</Sidebar.Root>
|
|
155
|
+
}
|
|
156
|
+
header={
|
|
157
|
+
<AppHeader.Root>
|
|
158
|
+
<AppHeader.Start>
|
|
159
|
+
<AppHeader.MenuButton aria-expanded={menuOpen} onClick={() => setMenuOpen(true)} />
|
|
160
|
+
{/* Every page titles itself here: the only h1 and a line of data under it. */}
|
|
161
|
+
<AppHeader.Title>
|
|
162
|
+
{section.label}
|
|
163
|
+
<AppHeader.Description>
|
|
164
|
+
{current === "today"
|
|
165
|
+
? `Среда, 14 октября · открытых задач: ${openTasks}`
|
|
166
|
+
: PAGES[current].description}
|
|
167
|
+
</AppHeader.Description>
|
|
168
|
+
</AppHeader.Title>
|
|
169
|
+
</AppHeader.Start>
|
|
170
|
+
</AppHeader.Root>
|
|
171
|
+
}
|
|
172
|
+
footer={
|
|
173
|
+
<BottomNav.Root floating>
|
|
174
|
+
{MAIN.map((item) => (
|
|
175
|
+
<BottomNav.Item key={item.id} current={item.id === current} onClick={() => go(item.id)}>
|
|
176
|
+
<BottomNav.ItemIcon>
|
|
177
|
+
<Icon name={item.icon} />
|
|
178
|
+
</BottomNav.ItemIcon>
|
|
179
|
+
{item.id === "tasks" && openTasks > 0 ? (
|
|
180
|
+
<BottomNav.ItemCount>{openTasks}</BottomNav.ItemCount>
|
|
181
|
+
) : null}
|
|
182
|
+
{item.label}
|
|
183
|
+
</BottomNav.Item>
|
|
184
|
+
))}
|
|
185
|
+
{/* The rest of the map lives in the Sidebar: «Ещё» opens it as a panel. */}
|
|
186
|
+
<BottomNav.Item
|
|
187
|
+
current={isMore(current)}
|
|
188
|
+
aria-expanded={menuOpen}
|
|
189
|
+
onClick={() => setMenuOpen(true)}
|
|
190
|
+
>
|
|
191
|
+
<BottomNav.ItemIcon>
|
|
192
|
+
<Icon name="action.more" />
|
|
193
|
+
</BottomNav.ItemIcon>
|
|
194
|
+
Ещё
|
|
195
|
+
</BottomNav.Item>
|
|
196
|
+
</BottomNav.Root>
|
|
197
|
+
}
|
|
198
|
+
>
|
|
199
|
+
{/* Another section is another page: it cross-fades instead of flipping. */}
|
|
200
|
+
<Crossfade state={current}>
|
|
201
|
+
<PageContent.Page>
|
|
202
|
+
<PageContent.Body>
|
|
203
|
+
{current === "today" ? (
|
|
204
|
+
<>
|
|
205
|
+
<PageContent.Grid>
|
|
206
|
+
{KPIS.map((kpi) => (
|
|
207
|
+
<PageContent.Cell key={kpi.label} span={4}>
|
|
208
|
+
<Card.Root variant="stat-trend">
|
|
209
|
+
<Card.Label>{kpi.label}</Card.Label>
|
|
210
|
+
<Card.Value>{kpi.value}</Card.Value>
|
|
211
|
+
<Card.Delta tone={kpi.tone}>{kpi.delta}</Card.Delta>
|
|
212
|
+
</Card.Root>
|
|
213
|
+
</PageContent.Cell>
|
|
214
|
+
))}
|
|
215
|
+
</PageContent.Grid>
|
|
216
|
+
<Card.Root variant="list">
|
|
217
|
+
<Card.Header>
|
|
218
|
+
<Card.Title as="h2">Задачи на сегодня</Card.Title>
|
|
219
|
+
</Card.Header>
|
|
220
|
+
<Card.List>
|
|
221
|
+
{TASKS.map((task) => (
|
|
222
|
+
<Card.ListItem key={task.id}>
|
|
223
|
+
<span className={styles.row}>
|
|
224
|
+
<Checkbox.Root
|
|
225
|
+
checked={done.has(task.id)}
|
|
226
|
+
onCheckedChange={(checked) => toggleTask(task.id, checked)}
|
|
227
|
+
>
|
|
228
|
+
<Checkbox.Label>{task.title}</Checkbox.Label>
|
|
229
|
+
</Checkbox.Root>
|
|
230
|
+
<Typography as="span" variant="caption" tone="muted">
|
|
231
|
+
{task.meta}
|
|
232
|
+
</Typography>
|
|
233
|
+
</span>
|
|
234
|
+
</Card.ListItem>
|
|
235
|
+
))}
|
|
236
|
+
</Card.List>
|
|
237
|
+
</Card.Root>
|
|
238
|
+
</>
|
|
239
|
+
) : (
|
|
240
|
+
<Card.Root variant="list">
|
|
241
|
+
<Card.List>
|
|
242
|
+
{PAGES[current].rows.map((row) => (
|
|
243
|
+
<Card.ListItem key={row.id}>
|
|
244
|
+
<span className={styles.row}>
|
|
245
|
+
<Typography as="span" variant="body-m" truncate>
|
|
246
|
+
{row.title}
|
|
247
|
+
</Typography>
|
|
248
|
+
<Typography as="span" variant="caption" tone="muted">
|
|
249
|
+
{row.meta}
|
|
250
|
+
</Typography>
|
|
251
|
+
</span>
|
|
252
|
+
</Card.ListItem>
|
|
253
|
+
))}
|
|
254
|
+
</Card.List>
|
|
255
|
+
</Card.Root>
|
|
256
|
+
)}
|
|
257
|
+
</PageContent.Body>
|
|
258
|
+
</PageContent.Page>
|
|
259
|
+
</Crossfade>
|
|
260
|
+
</AppShell.Template>
|
|
261
|
+
);
|
|
262
|
+
}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
/** Root, nav, header and main in one component; main scrolls back to the top whenever the page changes — `AppShell.Template` with `scrollResetKey`. */
|
|
2
|
-
import { AppShell, Icon, PageContent, Sidebar, Typography } from "prime-ui-kit";
|
|
2
|
+
import { AppHeader, AppShell, Icon, PageContent, Sidebar, Typography } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import styles from "./examples.module.css";
|
|
6
6
|
|
|
7
7
|
const PAGES = [
|
|
8
|
-
{
|
|
9
|
-
|
|
8
|
+
{
|
|
9
|
+
id: "mailings",
|
|
10
|
+
label: "Рассылки",
|
|
11
|
+
icon: "field.email",
|
|
12
|
+
text: "3 активные кампании",
|
|
13
|
+
note: "Последняя рассылка ушла вчера в 10:00, её открыли 42% получателей.",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "calendar",
|
|
17
|
+
label: "Календарь",
|
|
18
|
+
icon: "field.calendar",
|
|
19
|
+
text: "5 событий на неделе",
|
|
20
|
+
note: "Ближайшее — созвон с ООО «Север» сегодня в 15:00.",
|
|
21
|
+
},
|
|
10
22
|
] as const;
|
|
11
23
|
|
|
12
24
|
export default function AppShellTemplateExample() {
|
|
@@ -38,15 +50,23 @@ export default function AppShellTemplateExample() {
|
|
|
38
50
|
</Sidebar.Content>
|
|
39
51
|
</Sidebar.Root>
|
|
40
52
|
}
|
|
53
|
+
header={
|
|
54
|
+
<AppHeader.Root>
|
|
55
|
+
<AppHeader.Start>
|
|
56
|
+
<AppHeader.Title>
|
|
57
|
+
{page.label}
|
|
58
|
+
<AppHeader.Description>{page.text}</AppHeader.Description>
|
|
59
|
+
</AppHeader.Title>
|
|
60
|
+
</AppHeader.Start>
|
|
61
|
+
</AppHeader.Root>
|
|
62
|
+
}
|
|
41
63
|
>
|
|
42
64
|
<PageContent.Page>
|
|
43
|
-
<PageContent.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{page.label}
|
|
65
|
+
<PageContent.Body>
|
|
66
|
+
<Typography variant="body-m" tone="secondary">
|
|
67
|
+
{page.note}
|
|
47
68
|
</Typography>
|
|
48
|
-
|
|
49
|
-
</PageContent.Header>
|
|
69
|
+
</PageContent.Body>
|
|
50
70
|
</PageContent.Page>
|
|
51
71
|
</AppShell.Template>
|
|
52
72
|
</div>
|
|
@@ -372,14 +372,17 @@ Leaving the narrow viewport closes the off-canvas panel; navigating from an `hre
|
|
|
372
372
|
|---|---|
|
|
373
373
|
| [overview.tsx](examples/overview.tsx) | Everything the app navigation holds: brand and collapse toggle, groups that fold, a nested list, counts, the footer and the account — `Sidebar.Brand`, `Sidebar.Group`, `Sidebar.Sub`, `Sidebar.ItemCount`, `Sidebar.Account`, `Sidebar.Toggle`. |
|
|
374
374
|
| [sizes.tsx](examples/sizes.tsx) | Every size tier: item height, text, icon and counter follow the tier; the rail width stays — `size`. |
|
|
375
|
-
| [structure.tsx](examples/structure.tsx) | Labelled groups and the optional item parts: a plain count,
|
|
375
|
+
| [structure.tsx](examples/structure.tsx) | Labelled groups and the optional item parts: a plain count, coloured and solid badges, a key hint, a trailing icon, row actions with the default and an own glyph and a disabled section — `Sidebar.Group`, `Sidebar.ItemCount`, `color`, `variant`, `Sidebar.ItemShortcut`, `Sidebar.ItemAction`, `disabled`. |
|
|
376
376
|
| [brand-header.tsx](examples/brand-header.tsx) | A brand block with the collapse toggle at the end of the header; in compact mode the logo stays and the toggle moves onto the rail edge — `Sidebar.Brand`, `Sidebar.BrandLogo`, `description`, `variant`. |
|
|
377
|
-
| [collapsible-groups.tsx](examples/collapsible-groups.tsx) | Group headings that fold their items away, with a chevron at the end of the heading; on the compact rail a folded group becomes one row whose items open in a flyout — `collapsible`, `
|
|
377
|
+
| [collapsible-groups.tsx](examples/collapsible-groups.tsx) | Group headings that fold their items away, one group open at a time, with a chevron at the end of the heading; on the compact rail a folded group becomes one row whose items open in a flyout — `collapsible`, `open`, `onOpenChange`. |
|
|
378
378
|
| [nested-items.tsx](examples/nested-items.tsx) | A parent item with child items on a guide line: a current child opens it and marks the parent; on the compact rail the children open in a flyout — `Sidebar.Sub`, `Sidebar.SubTrigger`, `Sidebar.SubContent`. |
|
|
379
|
-
| [account.tsx](examples/account.tsx) | Footer items above the signed-in person: avatar, name and email open the account menu; collapse the rail and only the avatar stays, on the icon axis — `Sidebar.Footer`, `Sidebar.Account`, `description`, `Sidebar.Toggle`. |
|
|
380
|
-
| [router.tsx](examples/router.tsx) |
|
|
379
|
+
| [account.tsx](examples/account.tsx) | Footer items and the collapse row above the signed-in person: avatar, name and email open the account menu; collapse the rail from that row and only the avatar stays, on the icon axis — `Sidebar.Footer`, `Sidebar.Account`, `description`, `Sidebar.Toggle`. |
|
|
380
|
+
| [router.tsx](examples/router.tsx) | Router links as the brand and the items: the router sets `aria-current` and the item shows as current; render it inside a router — `asChild`. |
|
|
381
|
+
| [persist.tsx](examples/persist.tsx) | The first visit opens on the icon rail; the mode and the folded groups are remembered and come back after a reload — `persistKey`, `defaultMode`. |
|
|
382
|
+
| [custom-part.tsx](examples/custom-part.tsx) | A part of your own in the footer reads the rail state: the storage meter shows on the full rail and in the off-canvas panel and steps aside on the icon rail — `useSidebar`. |
|
|
381
383
|
| [controlled.tsx](examples/controlled.tsx) | The parent owns the rail mode: expanded, an icon rail with tooltips, or hidden; every switch is one synchronous movement — `mode`, `onModeChange`. |
|
|
382
384
|
| [controlled-open.tsx](examples/controlled-open.tsx) | Navigation behind a menu button at any width: the parent opens the off-canvas panel, the scrim, Escape, the header toggle or a navigation closes it — `offCanvas`, `open`, `onOpenChange`. |
|
|
385
|
+
| [narrow.tsx](examples/narrow.tsx) | Below 768px the rail leaves the layout and slides in over the page from the menu button; from 768px it is the rail again, and the button leaves — `offCanvas`, `labels`. |
|
|
383
386
|
|
|
384
387
|
## Mistakes
|
|
385
388
|
- `icon={…}` / `badge={…}` props → use the `Sidebar.ItemIcon` and `Sidebar.ItemCount` parts.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Footer items above the signed-in person: avatar, name and email open the account menu; collapse the rail and only the avatar stays, on the icon axis — `Sidebar.Footer`, `Sidebar.Account`, `description`, `Sidebar.Toggle`. */
|
|
1
|
+
/** Footer items and the collapse row above the signed-in person: avatar, name and email open the account menu; collapse the rail from that row and only the avatar stays, on the icon axis — `Sidebar.Footer`, `Sidebar.Account`, `description`, `Sidebar.Toggle`. */
|
|
2
2
|
import { Avatar, Dropdown, Icon, Sidebar } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
@@ -16,7 +16,6 @@ export default function SidebarAccountExample() {
|
|
|
16
16
|
</Sidebar.BrandLogo>
|
|
17
17
|
Прайм CRM
|
|
18
18
|
</Sidebar.Brand>
|
|
19
|
-
<Sidebar.Toggle variant="header" />
|
|
20
19
|
</Sidebar.Header>
|
|
21
20
|
<Sidebar.Content>
|
|
22
21
|
<Sidebar.Item current>
|
|
@@ -54,6 +53,7 @@ export default function SidebarAccountExample() {
|
|
|
54
53
|
</Sidebar.ItemIcon>
|
|
55
54
|
Пригласить команду
|
|
56
55
|
</Sidebar.Item>
|
|
56
|
+
<Sidebar.Toggle />
|
|
57
57
|
<Dropdown.Root>
|
|
58
58
|
<Dropdown.Trigger>
|
|
59
59
|
<Sidebar.Account description="anna@company.ru">
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
/** Group headings that fold their items away, with a chevron at the end of the heading; on the compact rail a folded group becomes one row whose items open in a flyout — `collapsible`, `
|
|
1
|
+
/** Group headings that fold their items away, one group open at a time, with a chevron at the end of the heading; on the compact rail a folded group becomes one row whose items open in a flyout — `collapsible`, `open`, `onOpenChange`. */
|
|
2
2
|
import { Icon, Sidebar } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
|
|
4
5
|
import styles from "./examples.module.css";
|
|
5
6
|
|
|
6
7
|
export default function SidebarCollapsibleGroupsExample() {
|
|
8
|
+
const [openGroup, setOpenGroup] = React.useState<string | null>("overview");
|
|
9
|
+
const groupProps = (id: string) => ({
|
|
10
|
+
collapsible: true,
|
|
11
|
+
open: openGroup === id,
|
|
12
|
+
onOpenChange: (open: boolean) => setOpenGroup(open ? id : null),
|
|
13
|
+
});
|
|
14
|
+
|
|
7
15
|
return (
|
|
8
16
|
<div className={`${styles.stage} ${styles.stageTall}`}>
|
|
9
17
|
<Sidebar.Root offCanvas="never">
|
|
@@ -19,7 +27,7 @@ export default function SidebarCollapsibleGroupsExample() {
|
|
|
19
27
|
<Sidebar.Toggle variant="header" />
|
|
20
28
|
</Sidebar.Header>
|
|
21
29
|
<Sidebar.Content>
|
|
22
|
-
<Sidebar.Group label="Обзор"
|
|
30
|
+
<Sidebar.Group label="Обзор" {...groupProps("overview")}>
|
|
23
31
|
<Sidebar.Item current>
|
|
24
32
|
<Sidebar.ItemIcon>
|
|
25
33
|
<Icon name="nav.home" />
|
|
@@ -34,7 +42,7 @@ export default function SidebarCollapsibleGroupsExample() {
|
|
|
34
42
|
<Sidebar.ItemCount color="red">7</Sidebar.ItemCount>
|
|
35
43
|
</Sidebar.Item>
|
|
36
44
|
</Sidebar.Group>
|
|
37
|
-
<Sidebar.Group label="Инструменты"
|
|
45
|
+
<Sidebar.Group label="Инструменты" {...groupProps("tools")}>
|
|
38
46
|
<Sidebar.Item>
|
|
39
47
|
<Sidebar.ItemIcon>
|
|
40
48
|
<Icon name="object.tasks" />
|
|
@@ -55,7 +63,7 @@ export default function SidebarCollapsibleGroupsExample() {
|
|
|
55
63
|
Клиенты
|
|
56
64
|
</Sidebar.Item>
|
|
57
65
|
</Sidebar.Group>
|
|
58
|
-
<Sidebar.Group label="Метрики"
|
|
66
|
+
<Sidebar.Group label="Метрики" {...groupProps("metrics")}>
|
|
59
67
|
<Sidebar.Item>
|
|
60
68
|
<Sidebar.ItemIcon>
|
|
61
69
|
<Icon name="object.chart" />
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** A part of your own in the footer reads the rail state: the storage meter shows on the full rail and in the off-canvas panel and steps aside on the icon rail — `useSidebar`. */
|
|
2
|
+
import { Icon, ProgressBar, Sidebar, useSidebar } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
/** Calls `useSidebar`, so it must render inside `Sidebar.Root`. */
|
|
7
|
+
function StorageUsage() {
|
|
8
|
+
const { mode, offCanvas } = useSidebar();
|
|
9
|
+
if (mode === "compact" && !offCanvas) return null;
|
|
10
|
+
return (
|
|
11
|
+
<div className={styles.footerBlock}>
|
|
12
|
+
<ProgressBar value={72} label="Хранилище · 7,2 из 10 ГБ" />
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function SidebarCustomPartExample() {
|
|
18
|
+
return (
|
|
19
|
+
<div className={styles.stage}>
|
|
20
|
+
<Sidebar.Root offCanvas="never">
|
|
21
|
+
<Sidebar.Header>
|
|
22
|
+
<Sidebar.Brand href="#home" description="Отдел продаж">
|
|
23
|
+
<Sidebar.BrandLogo>
|
|
24
|
+
<span className={styles.logo}>
|
|
25
|
+
<Icon name="nav.layoutGrid" />
|
|
26
|
+
</span>
|
|
27
|
+
</Sidebar.BrandLogo>
|
|
28
|
+
Прайм CRM
|
|
29
|
+
</Sidebar.Brand>
|
|
30
|
+
<Sidebar.Toggle variant="header" />
|
|
31
|
+
</Sidebar.Header>
|
|
32
|
+
<Sidebar.Content>
|
|
33
|
+
<Sidebar.Item current>
|
|
34
|
+
<Sidebar.ItemIcon>
|
|
35
|
+
<Icon name="object.file" />
|
|
36
|
+
</Sidebar.ItemIcon>
|
|
37
|
+
Документы
|
|
38
|
+
</Sidebar.Item>
|
|
39
|
+
<Sidebar.Item>
|
|
40
|
+
<Sidebar.ItemIcon>
|
|
41
|
+
<Icon name="object.image" />
|
|
42
|
+
</Sidebar.ItemIcon>
|
|
43
|
+
Медиатека
|
|
44
|
+
</Sidebar.Item>
|
|
45
|
+
</Sidebar.Content>
|
|
46
|
+
<Sidebar.Footer>
|
|
47
|
+
<StorageUsage />
|
|
48
|
+
</Sidebar.Footer>
|
|
49
|
+
</Sidebar.Root>
|
|
50
|
+
<div className={styles.content} />
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
color: var(--prime-color-accent-fg);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/* custom-part.tsx: an own block in the footer, inset like the item labels. */
|
|
46
|
+
.footerBlock {
|
|
47
|
+
padding: var(--prime-space-2);
|
|
48
|
+
}
|
|
49
|
+
|
|
45
50
|
.sizes {
|
|
46
51
|
display: grid;
|
|
47
52
|
grid-template-columns: repeat(auto-fit, minmax(calc(var(--prime-space-24) * 2.5), 1fr));
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Below 768px the rail leaves the layout and slides in over the page from the menu button; from 768px it is the rail again, and the button leaves — `offCanvas`, `labels`. */
|
|
2
|
+
import { AppHeader, Icon, Sidebar } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import styles from "./examples.module.css";
|
|
6
|
+
|
|
7
|
+
const LABELS = { close: "Закрыть меню" };
|
|
8
|
+
|
|
9
|
+
export default function SidebarNarrowExample() {
|
|
10
|
+
const [open, setOpen] = React.useState(false);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={styles.stage}>
|
|
14
|
+
<Sidebar.Root open={open} onOpenChange={setOpen} labels={LABELS}>
|
|
15
|
+
<Sidebar.Header>
|
|
16
|
+
<Sidebar.Brand href="#home" description="Отдел продаж">
|
|
17
|
+
<Sidebar.BrandLogo>
|
|
18
|
+
<span className={styles.logo}>
|
|
19
|
+
<Icon name="nav.layoutGrid" />
|
|
20
|
+
</span>
|
|
21
|
+
</Sidebar.BrandLogo>
|
|
22
|
+
Прайм CRM
|
|
23
|
+
</Sidebar.Brand>
|
|
24
|
+
<Sidebar.Toggle variant="header" />
|
|
25
|
+
</Sidebar.Header>
|
|
26
|
+
<Sidebar.Content>
|
|
27
|
+
<Sidebar.Item href="#deals" current>
|
|
28
|
+
<Sidebar.ItemIcon>
|
|
29
|
+
<Icon name="object.document" />
|
|
30
|
+
</Sidebar.ItemIcon>
|
|
31
|
+
Сделки
|
|
32
|
+
</Sidebar.Item>
|
|
33
|
+
<Sidebar.Item href="#clients">
|
|
34
|
+
<Sidebar.ItemIcon>
|
|
35
|
+
<Icon name="object.users" />
|
|
36
|
+
</Sidebar.ItemIcon>
|
|
37
|
+
Клиенты
|
|
38
|
+
</Sidebar.Item>
|
|
39
|
+
<Sidebar.Item href="#tasks">
|
|
40
|
+
<Sidebar.ItemIcon>
|
|
41
|
+
<Icon name="object.tasks" />
|
|
42
|
+
</Sidebar.ItemIcon>
|
|
43
|
+
Задачи
|
|
44
|
+
<Sidebar.ItemCount>5</Sidebar.ItemCount>
|
|
45
|
+
</Sidebar.Item>
|
|
46
|
+
</Sidebar.Content>
|
|
47
|
+
</Sidebar.Root>
|
|
48
|
+
<div className={styles.content}>
|
|
49
|
+
<AppHeader.MenuButton aria-expanded={open} onClick={() => setOpen(true)} />
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** The first visit opens on the icon rail; the mode and the folded groups are remembered and come back after a reload — `persistKey`, `defaultMode`. */
|
|
2
|
+
import { Icon, Sidebar } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
export default function SidebarPersistExample() {
|
|
7
|
+
return (
|
|
8
|
+
<div className={`${styles.stage} ${styles.stageTall}`}>
|
|
9
|
+
<Sidebar.Root offCanvas="never" defaultMode="compact" persistKey="crm-navigation">
|
|
10
|
+
<Sidebar.Header>
|
|
11
|
+
<Sidebar.Brand href="#home" description="Отдел продаж">
|
|
12
|
+
<Sidebar.BrandLogo>
|
|
13
|
+
<span className={styles.logo}>
|
|
14
|
+
<Icon name="nav.layoutGrid" />
|
|
15
|
+
</span>
|
|
16
|
+
</Sidebar.BrandLogo>
|
|
17
|
+
Прайм CRM
|
|
18
|
+
</Sidebar.Brand>
|
|
19
|
+
<Sidebar.Toggle variant="header" />
|
|
20
|
+
</Sidebar.Header>
|
|
21
|
+
<Sidebar.Content>
|
|
22
|
+
<Sidebar.Group label="Продажи" collapsible>
|
|
23
|
+
<Sidebar.Item current>
|
|
24
|
+
<Sidebar.ItemIcon>
|
|
25
|
+
<Icon name="object.document" />
|
|
26
|
+
</Sidebar.ItemIcon>
|
|
27
|
+
Сделки
|
|
28
|
+
<Sidebar.ItemCount>24</Sidebar.ItemCount>
|
|
29
|
+
</Sidebar.Item>
|
|
30
|
+
<Sidebar.Item>
|
|
31
|
+
<Sidebar.ItemIcon>
|
|
32
|
+
<Icon name="object.users" />
|
|
33
|
+
</Sidebar.ItemIcon>
|
|
34
|
+
Клиенты
|
|
35
|
+
</Sidebar.Item>
|
|
36
|
+
</Sidebar.Group>
|
|
37
|
+
<Sidebar.Group label="Финансы" collapsible defaultOpen={false}>
|
|
38
|
+
<Sidebar.Item>
|
|
39
|
+
<Sidebar.ItemIcon>
|
|
40
|
+
<Icon name="object.receipt" />
|
|
41
|
+
</Sidebar.ItemIcon>
|
|
42
|
+
Счета
|
|
43
|
+
<Sidebar.ItemCount color="orange">2</Sidebar.ItemCount>
|
|
44
|
+
</Sidebar.Item>
|
|
45
|
+
<Sidebar.Item>
|
|
46
|
+
<Sidebar.ItemIcon>
|
|
47
|
+
<Icon name="object.wallet" />
|
|
48
|
+
</Sidebar.ItemIcon>
|
|
49
|
+
Платежи
|
|
50
|
+
</Sidebar.Item>
|
|
51
|
+
</Sidebar.Group>
|
|
52
|
+
</Sidebar.Content>
|
|
53
|
+
</Sidebar.Root>
|
|
54
|
+
<div className={styles.content} />
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|