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
|
@@ -178,7 +178,7 @@ Collapsed stacks show up to 3 cards peeking behind each other. Hover or keyboard
|
|
|
178
178
|
| [tones.tsx](examples/tones.tsx) | The four tones: the icon carries the meaning; danger and warning are announced at once — `tone`. |
|
|
179
179
|
| [stacking.tsx](examples/stacking.tsx) | Toasts of one position and tone stack; hover expands the stack and pauses the timers — `max`, `items`, `dismissAll`. |
|
|
180
180
|
| [undo.tsx](examples/undo.tsx) | Delete at once and offer to undo: the row leaves the list, the toast brings it back, and the deletion is sent only when the toast leaves without an undo — `onDismiss`, `action`. |
|
|
181
|
-
| [dismiss.tsx](examples/dismiss.tsx) | A short timer, a toast that stays until closed, and one without a close button — `duration`, `persistent`, `closable`. |
|
|
181
|
+
| [dismiss.tsx](examples/dismiss.tsx) | A short timer, a toast that stays until closed, and one without a close button; the close button's name comes from labels — `duration`, `persistent`, `closable`, `labels`. |
|
|
182
182
|
| [in-form.tsx](examples/in-form.tsx) | Saving a form: the button shows loading, then a success toast or an error toast with a retry action — `notify`, `action`. |
|
|
183
183
|
|
|
184
184
|
## Mistakes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** A short timer, a toast that stays until closed, and one without a close button — `duration`, `persistent`, `closable`. */
|
|
1
|
+
/** A short timer, a toast that stays until closed, and one without a close button; the close button's name comes from labels — `duration`, `persistent`, `closable`, `labels`. */
|
|
2
2
|
import { Button, NotificationProvider, useNotifications } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
@@ -43,7 +43,7 @@ function DismissButtons() {
|
|
|
43
43
|
export default function NotificationDismissExample() {
|
|
44
44
|
// In an app NotificationProvider wraps the root once; here it keeps the example self-contained.
|
|
45
45
|
return (
|
|
46
|
-
<NotificationProvider>
|
|
46
|
+
<NotificationProvider labels={{ close: "Скрыть уведомление" }}>
|
|
47
47
|
<DismissButtons />
|
|
48
48
|
</NotificationProvider>
|
|
49
49
|
);
|
|
@@ -254,6 +254,7 @@ One `PageContent.Title` (`<h1>`) per page; a topic inside Body is a `PageContent
|
|
|
254
254
|
| [sections.tsx](examples/sections.tsx) | 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 — `PageContent.Section`, `label`, `description`, `PageContent.Actions`, `layout`. |
|
|
255
255
|
| [list-detail.tsx](examples/list-detail.tsx) | A support inbox 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 — `PageContent.Split`, `PageContent.BackButton`, `fill`. |
|
|
256
256
|
| [narrow.tsx](examples/narrow.tsx) | In a phone-width column the page actions wrap under the heading instead of squeezing it. |
|
|
257
|
+
| [screen.tsx](examples/screen.tsx) | 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`. |
|
|
257
258
|
|
|
258
259
|
## Mistakes
|
|
259
260
|
- Padding on `PageContent.Root` to imitate gutters → gutters come from `AppShell.Main`.
|
|
@@ -45,9 +45,6 @@ export default function PageContentListDetailExample() {
|
|
|
45
45
|
return (
|
|
46
46
|
<div className={styles.fillMain}>
|
|
47
47
|
<PageContent.Root fill>
|
|
48
|
-
<PageContent.Header>
|
|
49
|
-
<PageContent.Title>Обращения</PageContent.Title>
|
|
50
|
-
</PageContent.Header>
|
|
51
48
|
<PageContent.Body>
|
|
52
49
|
<PageContent.Split
|
|
53
50
|
open={dialogId !== null}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* Settings page: each section is a PageContent.Section layout="aside"; here only the panels' insides. */
|
|
2
|
+
|
|
3
|
+
/* Field → field 20. */
|
|
4
|
+
|
|
5
|
+
/* Two short related fields side by side when there is room; tops aligned. */
|
|
6
|
+
.pair {
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--prime-space-16) * 3)), 1fr));
|
|
9
|
+
align-items: start;
|
|
10
|
+
gap: var(--prime-space-5);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Danger zone row: text takes the room, the button stays at the end and wraps under it. */
|
|
14
|
+
.danger {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
gap: var(--prime-space-4);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dangerText {
|
|
23
|
+
display: grid;
|
|
24
|
+
flex: 1 1 calc(var(--prime-space-16) * 4);
|
|
25
|
+
gap: var(--prime-space-1);
|
|
26
|
+
min-width: 0;
|
|
27
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
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`. */
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Card,
|
|
5
|
+
ConfirmDialog,
|
|
6
|
+
Fieldset,
|
|
7
|
+
Input,
|
|
8
|
+
PageContent,
|
|
9
|
+
Select,
|
|
10
|
+
Switch,
|
|
11
|
+
Textarea,
|
|
12
|
+
Typography,
|
|
13
|
+
} from "prime-ui-kit";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
|
|
16
|
+
import styles from "./screen.module.css";
|
|
17
|
+
|
|
18
|
+
const TIMEZONES = [
|
|
19
|
+
{ value: "Europe/Kaliningrad", label: "Калининград (UTC+2)" },
|
|
20
|
+
{ value: "Europe/Moscow", label: "Москва (UTC+3)" },
|
|
21
|
+
{ value: "Europe/Samara", label: "Самара (UTC+4)" },
|
|
22
|
+
{ value: "Asia/Yekaterinburg", label: "Екатеринбург (UTC+5)" },
|
|
23
|
+
{ value: "Asia/Novosibirsk", label: "Новосибирск (UTC+7)" },
|
|
24
|
+
{ value: "Asia/Vladivostok", label: "Владивосток (UTC+10)" },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const ALERTS = [
|
|
28
|
+
{
|
|
29
|
+
name: "payments",
|
|
30
|
+
label: "Оплата счетов",
|
|
31
|
+
hint: "Письмо, когда клиент оплатил счёт.",
|
|
32
|
+
defaultChecked: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "overdue",
|
|
36
|
+
label: "Просрочка",
|
|
37
|
+
hint: "Напоминание менеджеру на следующий день после срока.",
|
|
38
|
+
defaultChecked: true,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "digest",
|
|
42
|
+
label: "Еженедельная сводка",
|
|
43
|
+
hint: "По понедельникам в 09:00: выручка, долги, новые клиенты.",
|
|
44
|
+
defaultChecked: false,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
export default function PageContentScreenExample() {
|
|
49
|
+
const [innError, setInnError] = React.useState<string>();
|
|
50
|
+
const [saving, setSaving] = React.useState(false);
|
|
51
|
+
const [saved, setSaved] = React.useState(false);
|
|
52
|
+
|
|
53
|
+
const save = (event: React.FormEvent<HTMLFormElement>) => {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
const inn = String(new FormData(event.currentTarget).get("inn") ?? "").replace(/\s/g, "");
|
|
56
|
+
if (!/^\d{10}(\d{2})?$/.test(inn)) {
|
|
57
|
+
setInnError("ИНН — 10 цифр для компании или 12 для ИП");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
setInnError(undefined);
|
|
61
|
+
setSaving(true);
|
|
62
|
+
setSaved(false);
|
|
63
|
+
window.setTimeout(() => {
|
|
64
|
+
setSaving(false);
|
|
65
|
+
setSaved(true);
|
|
66
|
+
window.setTimeout(() => setSaved(false), 2000);
|
|
67
|
+
}, 900);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const removeWorkspace = () => new Promise<void>((resolve) => window.setTimeout(resolve, 1200));
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<PageContent.Root maxWidth="wide" aria-labelledby="settings-title">
|
|
74
|
+
<PageContent.Header>
|
|
75
|
+
<PageContent.Title id="settings-title">Настройки</PageContent.Title>
|
|
76
|
+
<PageContent.Description>
|
|
77
|
+
Реквизиты компании, уведомления и управление рабочим пространством.
|
|
78
|
+
</PageContent.Description>
|
|
79
|
+
</PageContent.Header>
|
|
80
|
+
<PageContent.Body>
|
|
81
|
+
<PageContent.Section
|
|
82
|
+
layout="aside"
|
|
83
|
+
label="Компания"
|
|
84
|
+
description="Попадают в счета, акты и письма клиентам."
|
|
85
|
+
>
|
|
86
|
+
<form noValidate onSubmit={save} onReset={() => setInnError(undefined)}>
|
|
87
|
+
<Card.Root variant="panel">
|
|
88
|
+
<Card.Body>
|
|
89
|
+
<Fieldset disabled={saving}>
|
|
90
|
+
<Input.Root label="Название">
|
|
91
|
+
<Input.Wrapper>
|
|
92
|
+
<Input.Field name="name" defaultValue="ООО «Прайм Софт»" />
|
|
93
|
+
</Input.Wrapper>
|
|
94
|
+
</Input.Root>
|
|
95
|
+
<div className={styles.pair}>
|
|
96
|
+
<Input.Root
|
|
97
|
+
label="ИНН"
|
|
98
|
+
error={innError}
|
|
99
|
+
hint="10 или 12 цифр"
|
|
100
|
+
reserveSupportRow
|
|
101
|
+
>
|
|
102
|
+
<Input.Wrapper>
|
|
103
|
+
<Input.Field name="inn" inputMode="numeric" defaultValue="7704512908" />
|
|
104
|
+
</Input.Wrapper>
|
|
105
|
+
</Input.Root>
|
|
106
|
+
<Select.Root label="Часовой пояс" defaultValue="Europe/Moscow">
|
|
107
|
+
<Select.Trigger>
|
|
108
|
+
<Select.Value />
|
|
109
|
+
</Select.Trigger>
|
|
110
|
+
<Select.Content searchable>
|
|
111
|
+
{TIMEZONES.map((zone) => (
|
|
112
|
+
<Select.Item key={zone.value} value={zone.value}>
|
|
113
|
+
{zone.label}
|
|
114
|
+
</Select.Item>
|
|
115
|
+
))}
|
|
116
|
+
</Select.Content>
|
|
117
|
+
</Select.Root>
|
|
118
|
+
</div>
|
|
119
|
+
<Textarea.Root
|
|
120
|
+
name="address"
|
|
121
|
+
label="Юридический адрес"
|
|
122
|
+
optional
|
|
123
|
+
rows={2}
|
|
124
|
+
defaultValue="125009, Москва, ул. Тверская, д. 7, офис 412"
|
|
125
|
+
/>
|
|
126
|
+
</Fieldset>
|
|
127
|
+
</Card.Body>
|
|
128
|
+
<Card.Footer>
|
|
129
|
+
<Button.Root type="reset" variant="ghost" tone="neutral" disabled={saving}>
|
|
130
|
+
Отменить изменения
|
|
131
|
+
</Button.Root>
|
|
132
|
+
<Button.Root type="submit" loading={saving}>
|
|
133
|
+
{saved ? "Сохранено" : "Сохранить"}
|
|
134
|
+
</Button.Root>
|
|
135
|
+
</Card.Footer>
|
|
136
|
+
</Card.Root>
|
|
137
|
+
</form>
|
|
138
|
+
</PageContent.Section>
|
|
139
|
+
|
|
140
|
+
<PageContent.Section
|
|
141
|
+
layout="aside"
|
|
142
|
+
label="Уведомления"
|
|
143
|
+
description="Включаются сразу, без сохранения."
|
|
144
|
+
>
|
|
145
|
+
<Card.Root variant="panel">
|
|
146
|
+
<Card.Body>
|
|
147
|
+
<Fieldset aria-label="Уведомления">
|
|
148
|
+
{ALERTS.map((alert) => (
|
|
149
|
+
<Switch.Root
|
|
150
|
+
key={alert.name}
|
|
151
|
+
name={alert.name}
|
|
152
|
+
defaultChecked={alert.defaultChecked}
|
|
153
|
+
hint={alert.hint}
|
|
154
|
+
>
|
|
155
|
+
<Switch.Label>{alert.label}</Switch.Label>
|
|
156
|
+
</Switch.Root>
|
|
157
|
+
))}
|
|
158
|
+
</Fieldset>
|
|
159
|
+
</Card.Body>
|
|
160
|
+
</Card.Root>
|
|
161
|
+
</PageContent.Section>
|
|
162
|
+
|
|
163
|
+
<PageContent.Section
|
|
164
|
+
layout="aside"
|
|
165
|
+
label="Рабочее пространство"
|
|
166
|
+
description="Действия, которые нельзя отменить."
|
|
167
|
+
>
|
|
168
|
+
<Card.Root variant="panel">
|
|
169
|
+
<Card.Body>
|
|
170
|
+
<div className={styles.danger}>
|
|
171
|
+
<div className={styles.dangerText}>
|
|
172
|
+
<Typography variant="title-s">Удалить пространство</Typography>
|
|
173
|
+
<Typography variant="body-s" tone="secondary">
|
|
174
|
+
Счета, клиенты и история будут удалены для всех участников.
|
|
175
|
+
</Typography>
|
|
176
|
+
</div>
|
|
177
|
+
<ConfirmDialog.Root
|
|
178
|
+
title="Удалить «Прайм Софт»?"
|
|
179
|
+
description="312 счетов, 48 клиентов и вся история удалятся без возможности восстановления."
|
|
180
|
+
confirmLabel="Удалить пространство"
|
|
181
|
+
onConfirm={removeWorkspace}
|
|
182
|
+
>
|
|
183
|
+
<ConfirmDialog.Trigger>
|
|
184
|
+
<Button.Root variant="outline" tone="danger">
|
|
185
|
+
Удалить
|
|
186
|
+
</Button.Root>
|
|
187
|
+
</ConfirmDialog.Trigger>
|
|
188
|
+
</ConfirmDialog.Root>
|
|
189
|
+
</div>
|
|
190
|
+
</Card.Body>
|
|
191
|
+
</Card.Root>
|
|
192
|
+
</PageContent.Section>
|
|
193
|
+
</PageContent.Body>
|
|
194
|
+
</PageContent.Root>
|
|
195
|
+
);
|
|
196
|
+
}
|
|
@@ -4,24 +4,17 @@ import { Card, PageContent, Typography } from "prime-ui-kit";
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
5
5
|
|
|
6
6
|
const WIDTHS = [
|
|
7
|
-
{ value: "full",
|
|
8
|
-
{ value: "wide",
|
|
9
|
-
{
|
|
10
|
-
value: "readable",
|
|
11
|
-
title: "Условия использования",
|
|
12
|
-
text: "Не шире колонки для чтения, по центру.",
|
|
13
|
-
},
|
|
7
|
+
{ value: "full", text: "Сделки: колонка занимает всю ширину main." },
|
|
8
|
+
{ value: "wide", text: "Дашборд продаж: не шире ширины контента, по центру." },
|
|
9
|
+
{ value: "readable", text: "Условия использования: не шире колонки для чтения, по центру." },
|
|
14
10
|
] as const;
|
|
15
11
|
|
|
16
12
|
export default function PageContentVariantsExample() {
|
|
17
13
|
return (
|
|
18
14
|
<div className={styles.main}>
|
|
19
15
|
<div className={styles.stack}>
|
|
20
|
-
{WIDTHS.map(({ value,
|
|
16
|
+
{WIDTHS.map(({ value, text }) => (
|
|
21
17
|
<PageContent.Root key={value} maxWidth={value}>
|
|
22
|
-
<PageContent.Header>
|
|
23
|
-
<PageContent.Title>{title}</PageContent.Title>
|
|
24
|
-
</PageContent.Header>
|
|
25
18
|
<PageContent.Body>
|
|
26
19
|
<Card.Root>
|
|
27
20
|
<Card.Body>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**Category:** page
|
|
4
4
|
**Kind:** layout
|
|
5
5
|
|
|
6
|
-
> The panel at the top of a page — sections, filter and search, view options and the primary action — laid out from its own width: one row when wide, stacked rows when narrow, search and filter always first with the active filters under
|
|
6
|
+
> The panel at the top of a page — sections, filter and search, view options and the primary action — laid out from its own width: one row when wide, stacked rows when narrow, search and filter always first with the active filters under the top row.
|
|
7
7
|
|
|
8
8
|
## When to use
|
|
9
9
|
- A list, registry or dashboard page whose top holds several of: sections with counts, a filter and search, a period or view switch, the primary action.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
- Any page that has to work from 320px with the same controls as on desktop — nothing is hidden, the slots only move.
|
|
12
12
|
|
|
13
13
|
## When not to use
|
|
14
|
-
-
|
|
14
|
+
- One or two buttons of the page and nothing else → `AppHeader.Actions` in the [AppHeader](../../layout/app-header/COMPONENT.md) title row.
|
|
15
15
|
- Tools that belong to one table → the DataTable `toolbar` slot.
|
|
16
16
|
- Switching panels inside a card or a section → [Tabs](../tabs/COMPONENT.md).
|
|
17
17
|
- App-level navigation → [Sidebar](../../layout/sidebar/COMPONENT.md).
|
|
@@ -28,7 +28,7 @@ PageToolbar.Root container: its own width picks the layout
|
|
|
28
28
|
├─ PageToolbar.Sections sections of the page: a fullWidth SegmentedControl with counts
|
|
29
29
|
├─ PageToolbar.View period, table / cards, columns
|
|
30
30
|
├─ PageToolbar.Actions the primary action (and its secondary twin, e.g. «Отменить»)
|
|
31
|
-
└─ PageToolbar.Chips active filters: SmartFilter.Chips, a row
|
|
31
|
+
└─ PageToolbar.Chips active filters: SmartFilter.Chips, a row under the top row
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## API
|
|
@@ -50,7 +50,7 @@ PageToolbar.Root container: its own width picks the layout
|
|
|
50
50
|
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
|
|
51
51
|
|
|
52
52
|
### PageToolbar.Tools
|
|
53
|
-
`ref` → `HTMLDivElement`. Search and filter button (`SmartFilter.Toolbar`): always the first slot and the stretchy one
|
|
53
|
+
`ref` → `HTMLDivElement`. Search and filter button (`SmartFilter.Toolbar`): always the first slot and the stretchy one; it gives way first when the row runs short.
|
|
54
54
|
|
|
55
55
|
| Prop | Type | Default | Description |
|
|
56
56
|
|---|---|---|---|
|
|
@@ -64,14 +64,14 @@ PageToolbar.Root container: its own width picks the layout
|
|
|
64
64
|
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
|
|
65
65
|
|
|
66
66
|
### PageToolbar.Actions
|
|
67
|
-
`ref` → `HTMLDivElement`. The primary action of the page: at the end of the top row
|
|
67
|
+
`ref` → `HTMLDivElement`. The primary action of the page: at the end of the top row; on a phone, when the search would get less than 18rem beside it, its own full row right under the search.
|
|
68
68
|
|
|
69
69
|
| Prop | Type | Default | Description |
|
|
70
70
|
|---|---|---|---|
|
|
71
71
|
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
|
|
72
72
|
|
|
73
73
|
### PageToolbar.Chips
|
|
74
|
-
`ref` → `HTMLDivElement`. Active filters (`SmartFilter.Chips`) in their own row
|
|
74
|
+
`ref` → `HTMLDivElement`. Active filters (`SmartFilter.Chips`) in their own row under the top row; the row takes no space while it is empty.
|
|
75
75
|
|
|
76
76
|
| Prop | Type | Default | Description |
|
|
77
77
|
|---|---|---|---|
|
|
@@ -83,26 +83,28 @@ PageToolbar has no variants: the layout follows the toolbar's width.
|
|
|
83
83
|
### Layout by width
|
|
84
84
|
| Toolbar width | Looks like | Default |
|
|
85
85
|
|---|---|---|
|
|
86
|
-
| `≥ 56rem` | one row that never wraps: Tools (stretch
|
|
86
|
+
| `≥ 56rem` | one row that never wraps: Tools (stretch) · Sections (content width) · View (content width) · Actions; Chips under it; short of room the Tools give way first, down to 12rem, so the Sections keep their items and counts whole; only then the Sections shrink and scroll inside | |
|
|
87
87
|
| `< 56rem` | rows: Tools (stretch) + Actions; Chips; Sections (full row); View (full row) | yes (mobile first) |
|
|
88
|
-
|
|
|
88
|
+
| phone (Tools would get < 18rem beside the Actions) | rows: Tools (full row); Actions (full row, its buttons share it); Chips; Sections; View — the search is never squeezed; an icon-only action still fits beside the Tools | |
|
|
89
|
+
| any | Chips under the top row, only while there are chips | |
|
|
89
90
|
|
|
90
91
|
## States
|
|
91
92
|
| State | Driven by | DOM |
|
|
92
93
|
|---|---|---|
|
|
93
94
|
| wide | container ≥ 56rem | one flex row, no wrapping; Chips rendered under the bar |
|
|
94
|
-
| narrow | container < 56rem |
|
|
95
|
-
|
|
|
95
|
+
| narrow | container < 56rem | one wrapping flex line of real rows only (`order` + full-row slots): a missing slot makes no row, every row is 12 from the next |
|
|
96
|
+
| action on its own row | narrow, and the Tools (or the Sections in their place) would get less than 18rem beside the Actions | the Actions wrap under them and stretch across the row; an Actions slot alone in the toolbar keeps its buttons at the end |
|
|
97
|
+
| no Tools | Sections without Tools; View without Tools and Sections | that slot takes the Tools' place: first and stretchy, beside the action, so the action stays at the top row's end |
|
|
96
98
|
| alone in a row | Tools or Sections without Actions; View when narrow | that slot stretches to the full row; the View's controls share it equally |
|
|
97
99
|
| no chips | `PageToolbar.Chips` empty (`SmartFilter.Chips` renders nothing) | the chips row takes no space |
|
|
98
100
|
|
|
99
101
|
## Layout & spacing
|
|
100
|
-
- 8 inside a slot. No padding or fill of its own: it
|
|
101
|
-
- The order is fixed: search and filter first, then the sections, the view and the primary action; the active filters
|
|
102
|
+
- 8 inside a slot. No padding or fill of its own: on an app page it is the page's tools row in `AppHeader.Tools`, under the page title; tools of one table go into that table's `toolbar`.
|
|
103
|
+
- The order is fixed: search and filter first, then the sections, the view and the primary action; the active filters sit under the top row, never under the sections. The primary action is at the end of the top row; on a phone, where the search would get less than 18rem beside it, it takes its own row right under the search — still above the sections and the view.
|
|
102
104
|
- Every gap is one step: 12 between slots and between every pair of rows, at any width — no row is ever further from the next.
|
|
103
105
|
- Sections take a `fullWidth` SegmentedControl: the toolbar decides when it stretches (content width when wide, the full row when narrow), its items tend to equal width and it scrolls inside itself when they do not fit.
|
|
104
106
|
- All controls share one tier, so they share one height and wrapped rows stay level: leave `size` off the controls (default `m`); for a denser page wrap the toolbar in `<ControlSizeProvider value="s">`.
|
|
105
|
-
- On a phone the primary action
|
|
107
|
+
- On a phone the primary action takes its own row by itself; an icon-only action with `aria-label` stays beside the search instead. Never remove it.
|
|
106
108
|
- The toolbar breaks by its own width, so it behaves the same with the sidebar open or closed.
|
|
107
109
|
|
|
108
110
|
## Accessibility
|
|
@@ -113,7 +115,7 @@ No keyboard interaction.
|
|
|
113
115
|
### ARIA
|
|
114
116
|
- A plain `<div>`: when a page has more than one panel, give each `role="group"` and an `aria-label` (a name on a `<div>` without a role is ignored by assistive tech).
|
|
115
117
|
- Slots move only visually (`order`); the Tab order is the JSX order. Write the slots in the reading order of the wide layout — Tools, Sections, View, Actions, Chips. In the narrow layout the action is shown beside the tools but reached after the view.
|
|
116
|
-
- An icon-only primary action
|
|
118
|
+
- An icon-only primary action carries `aria-label`.
|
|
117
119
|
|
|
118
120
|
### Labels
|
|
119
121
|
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
@@ -126,7 +128,7 @@ No `labels`.
|
|
|
126
128
|
| [overview.tsx](examples/overview.tsx) | The panel of an orders page: search and filter, sections with counts, the period and the primary action in one row; active filters right under the search — `PageToolbar.Tools`, `PageToolbar.Sections`, `PageToolbar.View`, `PageToolbar.Actions`, `PageToolbar.Chips`. |
|
|
127
129
|
| [without-search.tsx](examples/without-search.tsx) | A dashboard panel without search on a tablet-width column: the sections fill the top row, the period selector alone in the bottom row stretches to the full width — `PageToolbar.Sections`, `PageToolbar.View`. |
|
|
128
130
|
| [save-changes.tsx](examples/save-changes.tsx) | A settings page: sections of the form on the left, the save action with the number of changes at the end of the top row — never a sticky bar at the bottom of a phone screen — `PageToolbar.Actions`. |
|
|
129
|
-
| [narrow.tsx](examples/narrow.tsx) | A phone-width column: search
|
|
131
|
+
| [narrow.tsx](examples/narrow.tsx) | A phone-width column: search and filter on top, the primary action on its own row under them, then the active filters, the sections and the period, every row 12 apart — `PageToolbar.Root`. |
|
|
130
132
|
|
|
131
133
|
## Mistakes
|
|
132
134
|
- A hand-built flex row of tabs, search and buttons with `flex-wrap` → rows wrap «as they come», the action drifts down; use `PageToolbar`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** A phone-width column: search
|
|
1
|
+
/** A phone-width column: search and filter on top, the primary action on its own row under them, then the active filters, the sections and the period, every row 12 apart — `PageToolbar.Root`. */
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
4
|
Icon,
|
|
@@ -38,7 +38,9 @@ const FIELDS: SmartFilterField[] = [
|
|
|
38
38
|
export default function PageToolbarNarrowExample() {
|
|
39
39
|
const [section, setSection] = React.useState("all");
|
|
40
40
|
const [period, setPeriod] = React.useState("7d");
|
|
41
|
-
const [filter, setFilter] = React.useState<SmartFilterValue>({
|
|
41
|
+
const [filter, setFilter] = React.useState<SmartFilterValue>({
|
|
42
|
+
city: { include: ["msk"], exclude: [] },
|
|
43
|
+
});
|
|
42
44
|
const [search, setSearch] = React.useState("");
|
|
43
45
|
|
|
44
46
|
return (
|
|
@@ -87,10 +89,11 @@ export default function PageToolbarNarrowExample() {
|
|
|
87
89
|
</Select.Root>
|
|
88
90
|
</PageToolbar.View>
|
|
89
91
|
<PageToolbar.Actions>
|
|
90
|
-
<Button.Root
|
|
92
|
+
<Button.Root>
|
|
91
93
|
<Button.Icon>
|
|
92
94
|
<Icon name="action.add" />
|
|
93
95
|
</Button.Icon>
|
|
96
|
+
Новый заказ
|
|
94
97
|
</Button.Root>
|
|
95
98
|
</PageToolbar.Actions>
|
|
96
99
|
<PageToolbar.Chips>
|
|
@@ -16,36 +16,36 @@ export default function PaginationControlledExample() {
|
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
18
|
<Card.Root>
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
19
|
+
<Card.Body>
|
|
20
|
+
<div className={styles.footer}>
|
|
21
|
+
<Typography as="span" variant="body-s" tone="secondary">
|
|
22
|
+
Счета {from}–{to} из {TOTAL_INVOICES}
|
|
23
|
+
</Typography>
|
|
24
|
+
<div className={styles.controls}>
|
|
25
|
+
<Select.Root
|
|
26
|
+
value={perPage}
|
|
27
|
+
onValueChange={(next) => {
|
|
28
|
+
setPerPage(next);
|
|
29
|
+
setPage(1);
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
<Select.Trigger aria-label="Строк на странице">
|
|
33
|
+
<Select.Value />
|
|
34
|
+
</Select.Trigger>
|
|
35
|
+
<Select.Content>
|
|
36
|
+
<Select.Item value="10">10 строк</Select.Item>
|
|
37
|
+
<Select.Item value="25">25 строк</Select.Item>
|
|
38
|
+
<Select.Item value="50">50 строк</Select.Item>
|
|
39
|
+
</Select.Content>
|
|
40
|
+
</Select.Root>
|
|
41
|
+
<Pagination
|
|
42
|
+
value={page}
|
|
43
|
+
onValueChange={setPage}
|
|
44
|
+
totalPages={Math.ceil(TOTAL_INVOICES / pageSize)}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
47
|
</div>
|
|
48
|
-
</
|
|
48
|
+
</Card.Body>
|
|
49
49
|
</Card.Root>
|
|
50
50
|
);
|
|
51
51
|
}
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
/* A list footer in a Card: the range on the left, rows per page and pages on the right; wraps when narrow. */
|
|
4
4
|
.footer {
|
|
5
|
-
box-sizing: border-box;
|
|
6
5
|
display: flex;
|
|
7
6
|
flex-wrap: wrap;
|
|
8
7
|
align-items: center;
|
|
9
8
|
justify-content: space-between;
|
|
10
9
|
gap: var(--prime-space-3);
|
|
11
|
-
padding: var(--prime-space-3) var(--prime-space-4);
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
.controls {
|
|
@@ -177,7 +177,7 @@ No keyboard interaction.
|
|
|
177
177
|
| [sizes.tsx](examples/sizes.tsx) | Every tier: the line grows from 4 to 8 px like the Slider track — `size`. |
|
|
178
178
|
| [states.tsx](examples/states.tsx) | Loading takes the bar's own geometry, so the data lands without a jump — `loading`. |
|
|
179
179
|
| [custom-max.tsx](examples/custom-max.tsx) | A scale of steps instead of percent: 3 of 5 profile steps — `max`. |
|
|
180
|
-
| [segments.tsx](examples/segments.tsx) | Parts of a whole in one bar: joined or separate pills, free capacity up to `max` and an empty list — `segments`, `segmentGap`, `max`. |
|
|
180
|
+
| [segments.tsx](examples/segments.tsx) | Parts of a whole in one bar: joined or separate pills, free capacity up to `max` and an empty list with its own spoken text — `segments`, `segmentGap`, `max`, `labels`. |
|
|
181
181
|
| [legend.tsx](examples/legend.tsx) | Shares of categories in their chart colors with a legend of color · name · value · share — `color`, `legend`, `formatValue`. |
|
|
182
182
|
| [ranking.tsx](examples/ranking.tsx) | Rankings as rows of label · value · share over a bar: top cities against the leader and a funnel against its first step — `layout`, `scale`. |
|
|
183
183
|
| [steps.tsx](examples/steps.tsx) | The scale as whole cells that fill one after another: 2 of 5 onboarding steps, forward and back — `steps`, `max`. |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Parts of a whole in one bar: joined or separate pills, free capacity up to `max` and an empty list — `segments`, `segmentGap`, `max`. */
|
|
1
|
+
/** Parts of a whole in one bar: joined or separate pills, free capacity up to `max` and an empty list with its own spoken text — `segments`, `segmentGap`, `max`, `labels`. */
|
|
2
2
|
import { ProgressBar, type ProgressSegment } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
@@ -26,7 +26,7 @@ export default function ProgressBarSegmentsExample() {
|
|
|
26
26
|
label="Хранилище: 71 из 100 ГБ"
|
|
27
27
|
showValue
|
|
28
28
|
/>
|
|
29
|
-
<ProgressBar segments={[]} label="
|
|
29
|
+
<ProgressBar segments={[]} label="Заявки за ноябрь" labels={{ empty: "Заявок пока нет" }} />
|
|
30
30
|
</div>
|
|
31
31
|
);
|
|
32
32
|
}
|
|
@@ -171,7 +171,7 @@ No keyboard interaction.
|
|
|
171
171
|
| [states.tsx](examples/states.tsx) | Loading is a Skeleton ring of the same diameter and stroke; the number in the centre waits for the data — `loading`. |
|
|
172
172
|
| [inner-content.tsx](examples/inner-content.tsx) | The center holds a percentage, a count on its own scale or an icon — `children`, `max`. |
|
|
173
173
|
| [under-way.tsx](examples/under-way.tsx) | An import whose share is not known yet turns a quarter arc, then fills and swaps its icon; a sync turns while its share grows — `value`, `spin`, `children`. |
|
|
174
|
-
| [segments.tsx](examples/segments.tsx) | Parts of a whole clockwise from the top: a closed ring, free capacity up to `max`, separate arcs and an empty list — `segments`, `segmentGap`. |
|
|
174
|
+
| [segments.tsx](examples/segments.tsx) | Parts of a whole clockwise from the top: a closed ring, free capacity up to `max`, separate arcs and an empty list with its own spoken text — `segments`, `segmentGap`, `labels`. |
|
|
175
175
|
| [legend.tsx](examples/legend.tsx) | A ring of category shares with a legend beside it, in the categories' chart colors — `color`, `legend`, `formatValue`. |
|
|
176
176
|
|
|
177
177
|
## Mistakes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Parts of a whole clockwise from the top: a closed ring, free capacity up to `max`, separate arcs and an empty list — `segments`, `segmentGap`. */
|
|
1
|
+
/** Parts of a whole clockwise from the top: a closed ring, free capacity up to `max`, separate arcs and an empty list with its own spoken text — `segments`, `segmentGap`, `labels`. */
|
|
2
2
|
import { ProgressCircle, type ProgressSegment, Typography } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
@@ -54,9 +54,14 @@ export default function ProgressCircleSegmentsExample() {
|
|
|
54
54
|
</Typography>
|
|
55
55
|
</div>
|
|
56
56
|
<div className={styles.item}>
|
|
57
|
-
<ProgressCircle
|
|
57
|
+
<ProgressCircle
|
|
58
|
+
size="xl"
|
|
59
|
+
segments={[]}
|
|
60
|
+
aria-label="Заявки за ноябрь"
|
|
61
|
+
labels={{ empty: "Заявок пока нет" }}
|
|
62
|
+
/>
|
|
58
63
|
<Typography as="span" variant="caption" tone="muted">
|
|
59
|
-
|
|
64
|
+
Заявки за ноябрь
|
|
60
65
|
</Typography>
|
|
61
66
|
</div>
|
|
62
67
|
</div>
|
|
@@ -152,6 +152,7 @@ The radiogroup carries `data-size`, `data-orientation`, `aria-orientation`, `ari
|
|
|
152
152
|
| [group.tsx](examples/group.tsx) | A required group with option descriptions and the group's error under the options — `label`, `required`, `hint`, `error`. |
|
|
153
153
|
| [orientation.tsx](examples/orientation.tsx) | Options stacked in a column and laid out in a wrapping row — `orientation`. |
|
|
154
154
|
| [controlled.tsx](examples/controlled.tsx) | The parent owns the chosen plan and shows it in the hint — `value`, `onValueChange`. |
|
|
155
|
+
| [in-form.tsx](examples/in-form.tsx) | Choices of an order form: a required group shows its error after a submit without a choice, an optional one is marked — `name`, `required`, `optional`, `error`. |
|
|
155
156
|
|
|
156
157
|
## Mistakes
|
|
157
158
|
- `Radio.Root` outside `Radio.Group` → it throws; every option needs the group.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* Layout of the Radio scenarios: semantic tokens only. */
|
|
2
|
+
|
|
3
|
+
/* in-form.tsx: groups, then actions (group → actions 32). */
|
|
4
|
+
.form {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: var(--prime-space-6);
|
|
8
|
+
width: min(100%, var(--prime-modal-width-s));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.formActions {
|
|
12
|
+
display: flex;
|
|
13
|
+
margin-top: var(--prime-space-2);
|
|
14
|
+
}
|