prime-ui-kit 0.16.0 → 0.18.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 +15 -18
- package/dist/chunks/{chunk-A7OQWH6R.js → chunk-IVS3J7AS.js} +1 -1
- package/dist/chunks/{chunk-6TPHKCUJ.js → chunk-MB4CXSLL.js} +27732 -26723
- package/dist/chunks/{chunk-4PSQ64S4.js → chunk-OAXJWF3L.js} +6818 -6264
- package/dist/chunks/{chunk-U3Q2I3MY.js → chunk-QFHE5GKW.js} +3 -2
- package/dist/chunks/{chunk-HDBQICPW.js → chunk-X3JT5CLR.js} +60 -20
- package/dist/color-picker.d.ts +1 -1
- package/dist/color-picker.js +3 -3
- package/dist/components/badge/Badge.d.ts +17 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +12 -3
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +1 -1
- package/dist/components/card/Card.d.ts +8 -4
- package/dist/components/chart-frame/ChartFrame.d.ts +1 -1
- package/dist/components/chat/Chat.d.ts +3 -3
- package/dist/components/chat/ChatRows.d.ts +5 -1
- package/dist/components/chat/MessageList.d.ts +5 -1
- package/dist/components/chat/groupMessages.d.ts +12 -4
- package/dist/components/chat-list/ChatList.d.ts +18 -9
- package/dist/components/chat-list/formatChatTime.d.ts +3 -3
- package/dist/components/checkbox/Checkbox.d.ts +6 -1
- package/dist/components/color-field/ColorField.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +23 -1
- package/dist/components/color-picker/ColorPresets.d.ts +9 -1
- package/dist/components/crossfade/Crossfade.d.ts +1 -1
- package/dist/components/data-table/DataTable.d.ts +3 -1
- package/dist/components/data-table/Head.d.ts +3 -1
- package/dist/components/data-table/types.d.ts +5 -0
- package/dist/components/digit-input/DigitInput.d.ts +1 -1
- package/dist/components/drawer/Drawer.d.ts +3 -2
- package/dist/components/field-list/FieldList.d.ts +18 -6
- package/dist/components/hint/Hint.d.ts +8 -2
- package/dist/components/index.d.ts +6 -7
- package/dist/components/input/Input.d.ts +27 -5
- package/dist/components/input/inputSuggestions.d.ts +39 -0
- package/dist/components/kanban/Kanban.d.ts +4 -9
- package/dist/components/list/List.d.ts +19 -5
- package/dist/components/message/Message.d.ts +15 -3
- package/dist/components/message/MessageSticker.d.ts +27 -0
- package/dist/components/message/formatMessageTime.d.ts +5 -2
- package/dist/components/modal/Modal.d.ts +3 -2
- package/dist/components/native-select/NativeSelect.d.ts +1 -1
- package/dist/components/pagination/Pagination.d.ts +5 -1
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/radio/Radio.d.ts +11 -2
- package/dist/components/rich-text/RichText.d.ts +23 -0
- package/dist/components/scroll-container/ScrollContainer.d.ts +1 -1
- package/dist/components/scroll-container/scrollGlide.d.ts +26 -0
- package/dist/components/scroll-container/useScrollMotion.d.ts +25 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/select/selectContext.d.ts +7 -0
- package/dist/components/slider/Slider.d.ts +2 -2
- package/dist/components/smart-filter/SmartFilter.d.ts +4 -5
- package/dist/components/switch/Switch.d.ts +6 -1
- package/dist/components/tag-select/TagSelect.d.ts +1 -1
- package/dist/components/textarea/Textarea.d.ts +6 -1
- package/dist/components/timeline/Timeline.d.ts +1 -1
- package/dist/icon-set.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +7 -9
- package/dist/internal/ChoiceField.d.ts +3 -1
- package/dist/internal/FieldFrame.d.ts +8 -2
- package/dist/internal/barPlan.d.ts +44 -0
- package/dist/internal/fieldCell.d.ts +1 -1
- package/dist/internal/formatClock.d.ts +23 -2
- package/dist/internal/leaveGuard.d.ts +21 -0
- package/dist/internal/messageList.d.ts +2 -0
- package/dist/internal/overlay/DialogParts.d.ts +27 -2
- package/dist/internal/overlay/FloatingPanel.d.ts +1 -1
- package/dist/internal/overlay/focus.d.ts +3 -2
- package/dist/internal/parts.d.ts +1 -1
- package/dist/internal/slot.d.ts +0 -30
- package/dist/internal/swatch.d.ts +5 -0
- package/dist/internal/tokenDefaults.d.ts +1 -0
- package/dist/layout/app-shell/AppShell.d.ts +19 -38
- package/dist/layout/index.d.ts +3 -3
- package/dist/layout/page/Page.d.ts +302 -0
- package/dist/layout/sidebar/Sidebar.d.ts +1 -1
- package/dist/skill/SKILL.md +10 -10
- package/dist/skill/anti-slop.md +106 -5
- package/dist/skill/api-contract.md +15 -8
- package/dist/skill/cheatsheet.md +46 -26
- package/dist/skill/checklist.md +12 -3
- package/dist/skill/choosing.md +34 -20
- package/dist/skill/components.md +4 -5
- package/dist/skill/composition.md +193 -154
- package/dist/skill/foundations.md +9 -9
- package/dist/skill/layouts.md +42 -99
- package/dist/skill/reference/components/avatar/COMPONENT.md +2 -2
- package/dist/skill/reference/components/avatar/examples/team-group.tsx +1 -1
- package/dist/skill/reference/components/badge/COMPONENT.md +14 -1
- package/dist/skill/reference/components/badge/examples/examples.module.css +7 -0
- package/dist/skill/reference/components/badge/examples/tag-row.tsx +34 -0
- package/dist/skill/reference/components/banner/COMPONENT.md +4 -4
- package/dist/skill/reference/components/banner/examples/examples.module.css +6 -1
- package/dist/skill/reference/components/banner/examples/page-strip.tsx +24 -22
- package/dist/skill/reference/components/breadcrumb/COMPONENT.md +18 -12
- package/dist/skill/reference/components/breadcrumb/examples/router.tsx +17 -0
- package/dist/skill/reference/components/button/COMPONENT.md +2 -1
- package/dist/skill/reference/components/button/examples/hold-to-confirm.tsx +1 -1
- package/dist/skill/reference/components/button/examples/on-colored-host.tsx +8 -8
- package/dist/skill/reference/components/button-group/COMPONENT.md +1 -0
- package/dist/skill/reference/components/card/COMPONENT.md +14 -8
- package/dist/skill/reference/components/card/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/card/examples/screen.tsx +184 -198
- package/dist/skill/reference/components/card/examples/states.tsx +59 -0
- package/dist/skill/reference/components/chart-frame/COMPONENT.md +1 -1
- package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +9 -9
- package/dist/skill/reference/components/chat/COMPONENT.md +8 -5
- package/dist/skill/reference/components/chat/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/chat/examples/screen.tsx +110 -117
- package/dist/skill/reference/components/chat/examples/time-zone.tsx +83 -0
- package/dist/skill/reference/components/chat-list/COMPONENT.md +14 -8
- package/dist/skill/reference/components/chat-list/examples/controlled.tsx +2 -2
- package/dist/skill/reference/components/chat-list/examples/examples.module.css +8 -0
- package/dist/skill/reference/components/chat-list/examples/links.tsx +1 -1
- package/dist/skill/reference/components/chat-list/examples/router.tsx +63 -0
- package/dist/skill/reference/components/checkbox/COMPONENT.md +1 -0
- package/dist/skill/reference/components/checkbox/examples/examples.module.css +3 -2
- package/dist/skill/reference/components/code-block/COMPONENT.md +1 -1
- package/dist/skill/reference/components/code-block/examples/color-scheme.tsx +2 -4
- package/dist/skill/reference/components/code-block/examples/examples.module.css +0 -11
- package/dist/skill/reference/components/color-field/COMPONENT.md +2 -1
- package/dist/skill/reference/components/color-picker/COMPONENT.md +31 -11
- package/dist/skill/reference/components/color-picker/examples/examples.module.css +2 -5
- package/dist/skill/reference/components/color-picker/examples/overview.tsx +5 -10
- package/dist/skill/reference/components/color-picker/examples/presets-custom.tsx +31 -0
- package/dist/skill/reference/components/color-picker/examples/sizes.tsx +4 -8
- package/dist/skill/reference/components/color-swatches/COMPONENT.md +1 -0
- package/dist/skill/reference/components/crossfade/COMPONENT.md +3 -3
- package/dist/skill/reference/components/crossfade/examples/screen.tsx +107 -112
- package/dist/skill/reference/components/data-table/COMPONENT.md +12 -7
- package/dist/skill/reference/components/data-table/examples/examples.module.css +9 -0
- package/dist/skill/reference/components/data-table/examples/numeric.tsx +9 -2
- package/dist/skill/reference/components/data-table/examples/screen.tsx +42 -52
- package/dist/skill/reference/components/data-table/examples/server.tsx +6 -2
- package/dist/skill/reference/components/datepicker/COMPONENT.md +3 -1
- package/dist/skill/reference/components/datepicker/examples/deadline.tsx +33 -0
- package/dist/skill/reference/components/datepicker/examples/examples.module.css +6 -0
- package/dist/skill/reference/components/datepicker/examples/inline-panel.tsx +3 -1
- package/dist/skill/reference/components/description-list/COMPONENT.md +1 -1
- package/dist/skill/reference/components/description-list/examples/screen.tsx +120 -127
- package/dist/skill/reference/components/digit-input/COMPONENT.md +1 -0
- package/dist/skill/reference/components/digit-input/examples/grouped.tsx +4 -4
- package/dist/skill/reference/components/digit-input/examples/validation.tsx +1 -1
- package/dist/skill/reference/components/divider/COMPONENT.md +2 -2
- package/dist/skill/reference/components/divider/examples/examples.module.css +4 -1
- package/dist/skill/reference/components/divider/examples/vertical.tsx +22 -9
- package/dist/skill/reference/components/dnd/examples/examples.module.css +3 -1
- package/dist/skill/reference/components/drawer/COMPONENT.md +16 -3
- package/dist/skill/reference/components/drawer/examples/client-card.tsx +32 -8
- package/dist/skill/reference/components/drawer/examples/placement.tsx +26 -31
- package/dist/skill/reference/components/drawer/examples/screen.tsx +137 -160
- package/dist/skill/reference/components/dropdown/COMPONENT.md +1 -1
- package/dist/skill/reference/components/example-frame/COMPONENT.md +3 -3
- package/dist/skill/reference/components/field-list/COMPONENT.md +15 -3
- package/dist/skill/reference/components/field-list/examples/saving.tsx +83 -0
- package/dist/skill/reference/components/field-list/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/field-list/examples/screen.tsx +19 -19
- package/dist/skill/reference/components/field-list/examples/totals.tsx +82 -0
- package/dist/skill/reference/components/fieldset/COMPONENT.md +1 -1
- package/dist/skill/reference/components/fieldset/examples/states.tsx +1 -1
- package/dist/skill/reference/components/file-upload/COMPONENT.md +2 -1
- package/dist/skill/reference/components/file-upload/examples/screen.module.css +2 -2
- package/dist/skill/reference/components/file-upload/examples/screen.tsx +65 -81
- package/dist/skill/reference/components/gallery/COMPONENT.md +1 -0
- package/dist/skill/reference/components/gantt/COMPONENT.md +1 -1
- package/dist/skill/reference/components/gantt/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/gantt/examples/screen.tsx +55 -73
- package/dist/skill/reference/components/hint/COMPONENT.md +16 -2
- package/dist/skill/reference/components/hint/examples/examples.module.css +10 -1
- package/dist/skill/reference/components/hint/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/hint/examples/variants.tsx +48 -0
- package/dist/skill/reference/components/input/COMPONENT.md +39 -9
- package/dist/skill/reference/components/input/examples/affixes.tsx +4 -2
- package/dist/skill/reference/components/input/examples/dismiss.tsx +29 -0
- package/dist/skill/reference/components/input/examples/suggestions.tsx +26 -0
- package/dist/skill/reference/components/input/examples/time.tsx +24 -0
- package/dist/skill/reference/components/input/examples/with-select.tsx +44 -0
- package/dist/skill/reference/components/kanban/COMPONENT.md +7 -7
- package/dist/skill/reference/components/kanban/examples/columns.tsx +4 -2
- package/dist/skill/reference/components/kanban/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/kanban/examples/screen.tsx +50 -65
- package/dist/skill/reference/components/kbd/COMPONENT.md +1 -1
- package/dist/skill/reference/components/label/examples/examples.module.css +12 -1
- package/dist/skill/reference/components/label/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/list/COMPONENT.md +26 -10
- package/dist/skill/reference/components/list/examples/row-controls.tsx +80 -0
- package/dist/skill/reference/components/list/examples/with-icon.tsx +23 -2
- package/dist/skill/reference/components/login-form/COMPONENT.md +8 -7
- package/dist/skill/reference/components/login-form/examples/states.tsx +12 -14
- package/dist/skill/reference/components/media-viewer/examples/controlled.tsx +16 -16
- package/dist/skill/reference/components/media-viewer/examples/examples.module.css +1 -3
- package/dist/skill/reference/components/message/COMPONENT.md +30 -9
- package/dist/skill/reference/components/message/examples/preview.tsx +28 -0
- package/dist/skill/reference/components/message/examples/sticker.tsx +35 -0
- package/dist/skill/reference/components/modal/COMPONENT.md +15 -3
- package/dist/skill/reference/components/modal/examples/long-content.tsx +37 -18
- package/dist/skill/reference/components/native-select/COMPONENT.md +1 -0
- package/dist/skill/reference/components/notification/COMPONENT.md +1 -1
- package/dist/skill/reference/components/pagination/COMPONENT.md +11 -3
- package/dist/skill/reference/components/pagination/examples/controlled.tsx +2 -1
- package/dist/skill/reference/components/popover/COMPONENT.md +3 -2
- package/dist/skill/reference/components/popover/examples/width.tsx +13 -1
- package/dist/skill/reference/components/radio/COMPONENT.md +2 -0
- package/dist/skill/reference/components/rich-text/COMPONENT.md +93 -0
- package/dist/skill/reference/components/rich-text/examples/overview.tsx +19 -0
- package/dist/skill/reference/components/scroll-container/COMPONENT.md +8 -5
- package/dist/skill/reference/components/segmented-control/COMPONENT.md +1 -0
- package/dist/skill/reference/components/segmented-control/examples/in-form.tsx +1 -1
- package/dist/skill/reference/components/select/COMPONENT.md +7 -3
- package/dist/skill/reference/components/slider/COMPONENT.md +4 -3
- package/dist/skill/reference/components/slider/examples/controlled.tsx +1 -1
- package/dist/skill/reference/components/slider/examples/states.tsx +14 -10
- package/dist/skill/reference/components/smart-filter/COMPONENT.md +13 -13
- package/dist/skill/reference/components/smart-filter/examples/examples.module.css +3 -0
- package/dist/skill/reference/components/smart-filter/examples/many-values.tsx +12 -8
- package/dist/skill/reference/components/smart-filter/examples/sizes.tsx +7 -3
- package/dist/skill/reference/components/sparkline/COMPONENT.md +1 -0
- package/dist/skill/reference/components/sparkline/examples/curve.tsx +16 -11
- package/dist/skill/reference/components/sparkline/examples/states.tsx +14 -10
- package/dist/skill/reference/components/switch/COMPONENT.md +2 -1
- package/dist/skill/reference/components/tabs/COMPONENT.md +1 -1
- package/dist/skill/reference/components/tag-select/COMPONENT.md +1 -0
- package/dist/skill/reference/components/textarea/COMPONENT.md +1 -0
- package/dist/skill/reference/components/timeline/COMPONENT.md +3 -3
- package/dist/skill/reference/components/timeline/examples/structure.tsx +2 -1
- package/dist/skill/reference/components/typography/COMPONENT.md +2 -2
- package/dist/skill/reference/foundation.md +15 -11
- package/dist/skill/reference/layout/app-shell/COMPONENT.md +25 -38
- package/dist/skill/reference/layout/app-shell/examples/footer.tsx +10 -10
- package/dist/skill/reference/layout/app-shell/examples/overview.tsx +20 -22
- package/dist/skill/reference/layout/app-shell/examples/screen.module.css +2 -2
- package/dist/skill/reference/layout/app-shell/examples/screen.tsx +25 -30
- package/dist/skill/reference/layout/app-shell/examples/template.tsx +13 -17
- package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +4 -3
- package/dist/skill/reference/layout/bottom-nav/examples/floating-action.tsx +10 -19
- package/dist/skill/reference/layout/bottom-nav/examples/floating.tsx +10 -19
- package/dist/skill/reference/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
- package/dist/skill/reference/layout/page/COMPONENT.md +382 -0
- package/dist/skill/reference/layout/page/examples/actions-collapse.tsx +45 -0
- package/dist/skill/reference/layout/page/examples/collapse.tsx +68 -0
- package/dist/skill/reference/layout/page/examples/examples.module.css +92 -0
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/grid.tsx +15 -15
- package/dist/skill/reference/layout/page/examples/guard.tsx +87 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
- package/dist/skill/reference/layout/page/examples/loading.tsx +57 -0
- package/dist/skill/reference/layout/page/examples/narrow.tsx +75 -0
- package/dist/skill/reference/layout/page/examples/overview.tsx +57 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/screen.module.css +1 -1
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx +29 -19
- package/dist/skill/reference/{components/page-content → layout/page}/examples/sections.tsx +17 -24
- package/dist/skill/reference/layout/page/examples/structure.tsx +41 -0
- package/dist/skill/reference/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
- package/dist/skill/reference/layout/page/examples/top-bar.tsx +85 -0
- package/dist/skill/reference/{components/page-content → layout/page}/examples/variants.tsx +7 -7
- package/dist/skill/reference/layout/sidebar/COMPONENT.md +6 -4
- package/dist/skill/reference/layout/sidebar/examples/dismiss.tsx +10 -7
- package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +11 -8
- package/dist/skill/responsive.md +94 -75
- package/dist/skill/ux.md +5 -3
- package/dist/tokens/layers.d.ts +2 -0
- package/dist/tokens/primitives.d.ts +12 -2
- package/dist/tokens/semantic.d.ts +9 -0
- package/dist/tokens/themes/dark.d.ts +7 -2
- package/package.json +2 -2
- package/src/components/avatar/COMPONENT.md +2 -2
- package/src/components/avatar/examples/team-group.tsx +1 -1
- package/src/components/badge/COMPONENT.md +14 -1
- package/src/components/badge/examples/examples.module.css +7 -0
- package/src/components/badge/examples/tag-row.tsx +34 -0
- package/src/components/banner/COMPONENT.md +4 -4
- package/src/components/banner/examples/examples.module.css +6 -1
- package/src/components/banner/examples/page-strip.tsx +24 -22
- package/src/components/breadcrumb/COMPONENT.md +18 -12
- package/src/components/breadcrumb/examples/router.tsx +17 -0
- package/src/components/button/COMPONENT.md +2 -1
- package/src/components/button/examples/hold-to-confirm.tsx +1 -1
- package/src/components/button/examples/on-colored-host.tsx +8 -8
- package/src/components/button-group/COMPONENT.md +1 -0
- package/src/components/card/COMPONENT.md +14 -8
- package/src/components/card/examples/screen.module.css +1 -1
- package/src/components/card/examples/screen.tsx +184 -198
- package/src/components/card/examples/states.tsx +59 -0
- package/src/components/chart-frame/COMPONENT.md +1 -1
- package/src/components/chart-frame/examples/fill-height.tsx +9 -9
- package/src/components/chat/COMPONENT.md +8 -5
- package/src/components/chat/examples/screen.module.css +1 -1
- package/src/components/chat/examples/screen.tsx +110 -117
- package/src/components/chat/examples/time-zone.tsx +83 -0
- package/src/components/chat-list/COMPONENT.md +14 -8
- package/src/components/chat-list/examples/controlled.tsx +2 -2
- package/src/components/chat-list/examples/examples.module.css +8 -0
- package/src/components/chat-list/examples/links.tsx +1 -1
- package/src/components/chat-list/examples/router.tsx +63 -0
- package/src/components/checkbox/COMPONENT.md +1 -0
- package/src/components/checkbox/examples/examples.module.css +3 -2
- package/src/components/code-block/COMPONENT.md +1 -1
- package/src/components/code-block/examples/color-scheme.tsx +2 -4
- package/src/components/code-block/examples/examples.module.css +0 -11
- package/src/components/color-field/COMPONENT.md +2 -1
- package/src/components/color-picker/COMPONENT.md +31 -11
- package/src/components/color-picker/examples/examples.module.css +2 -5
- package/src/components/color-picker/examples/overview.tsx +5 -10
- package/src/components/color-picker/examples/presets-custom.tsx +31 -0
- package/src/components/color-picker/examples/sizes.tsx +4 -8
- package/src/components/color-swatches/COMPONENT.md +1 -0
- package/src/components/crossfade/COMPONENT.md +3 -3
- package/src/components/crossfade/examples/screen.tsx +107 -112
- package/src/components/data-table/COMPONENT.md +12 -7
- package/src/components/data-table/examples/examples.module.css +9 -0
- package/src/components/data-table/examples/numeric.tsx +9 -2
- package/src/components/data-table/examples/screen.tsx +42 -52
- package/src/components/data-table/examples/server.tsx +6 -2
- package/src/components/datepicker/COMPONENT.md +3 -1
- package/src/components/datepicker/examples/deadline.tsx +33 -0
- package/src/components/datepicker/examples/examples.module.css +6 -0
- package/src/components/datepicker/examples/inline-panel.tsx +3 -1
- package/src/components/description-list/COMPONENT.md +1 -1
- package/src/components/description-list/examples/screen.tsx +120 -127
- package/src/components/digit-input/COMPONENT.md +1 -0
- package/src/components/digit-input/examples/grouped.tsx +4 -4
- package/src/components/digit-input/examples/validation.tsx +1 -1
- package/src/components/divider/COMPONENT.md +2 -2
- package/src/components/divider/examples/examples.module.css +4 -1
- package/src/components/divider/examples/vertical.tsx +22 -9
- package/src/components/dnd/examples/examples.module.css +3 -1
- package/src/components/drawer/COMPONENT.md +16 -3
- package/src/components/drawer/examples/client-card.tsx +32 -8
- package/src/components/drawer/examples/placement.tsx +26 -31
- package/src/components/drawer/examples/screen.tsx +137 -160
- package/src/components/dropdown/COMPONENT.md +1 -1
- package/src/components/example-frame/COMPONENT.md +3 -3
- package/src/components/field-list/COMPONENT.md +15 -3
- package/src/components/field-list/examples/saving.tsx +83 -0
- package/src/components/field-list/examples/screen.module.css +1 -1
- package/src/components/field-list/examples/screen.tsx +19 -19
- package/src/components/field-list/examples/totals.tsx +82 -0
- package/src/components/fieldset/COMPONENT.md +1 -1
- package/src/components/fieldset/examples/states.tsx +1 -1
- package/src/components/file-upload/COMPONENT.md +2 -1
- package/src/components/file-upload/examples/screen.module.css +2 -2
- package/src/components/file-upload/examples/screen.tsx +65 -81
- package/src/components/gallery/COMPONENT.md +1 -0
- package/src/components/gantt/COMPONENT.md +1 -1
- package/src/components/gantt/examples/screen.module.css +1 -1
- package/src/components/gantt/examples/screen.tsx +55 -73
- package/src/components/hint/COMPONENT.md +16 -2
- package/src/components/hint/examples/examples.module.css +10 -1
- package/src/components/hint/examples/overview.tsx +1 -1
- package/src/components/hint/examples/variants.tsx +48 -0
- package/src/components/input/COMPONENT.md +39 -9
- package/src/components/input/examples/affixes.tsx +4 -2
- package/src/components/input/examples/dismiss.tsx +29 -0
- package/src/components/input/examples/suggestions.tsx +26 -0
- package/src/components/input/examples/time.tsx +24 -0
- package/src/components/input/examples/with-select.tsx +44 -0
- package/src/components/kanban/COMPONENT.md +7 -7
- package/src/components/kanban/examples/columns.tsx +4 -2
- package/src/components/kanban/examples/screen.module.css +1 -1
- package/src/components/kanban/examples/screen.tsx +50 -65
- package/src/components/kbd/COMPONENT.md +1 -1
- package/src/components/label/examples/examples.module.css +12 -1
- package/src/components/label/examples/overview.tsx +1 -1
- package/src/components/list/COMPONENT.md +26 -10
- package/src/components/list/examples/row-controls.tsx +80 -0
- package/src/components/list/examples/with-icon.tsx +23 -2
- package/src/components/login-form/COMPONENT.md +8 -7
- package/src/components/login-form/examples/states.tsx +12 -14
- package/src/components/media-viewer/examples/controlled.tsx +16 -16
- package/src/components/media-viewer/examples/examples.module.css +1 -3
- package/src/components/message/COMPONENT.md +30 -9
- package/src/components/message/examples/preview.tsx +28 -0
- package/src/components/message/examples/sticker.tsx +35 -0
- package/src/components/modal/COMPONENT.md +15 -3
- package/src/components/modal/examples/long-content.tsx +37 -18
- package/src/components/native-select/COMPONENT.md +1 -0
- package/src/components/notification/COMPONENT.md +1 -1
- package/src/components/pagination/COMPONENT.md +11 -3
- package/src/components/pagination/examples/controlled.tsx +2 -1
- package/src/components/popover/COMPONENT.md +3 -2
- package/src/components/popover/examples/width.tsx +13 -1
- package/src/components/radio/COMPONENT.md +2 -0
- package/src/components/rich-text/COMPONENT.md +93 -0
- package/src/components/rich-text/examples/overview.tsx +19 -0
- package/src/components/scroll-container/COMPONENT.md +8 -5
- package/src/components/segmented-control/COMPONENT.md +1 -0
- package/src/components/segmented-control/examples/in-form.tsx +1 -1
- package/src/components/select/COMPONENT.md +7 -3
- package/src/components/slider/COMPONENT.md +4 -3
- package/src/components/slider/examples/controlled.tsx +1 -1
- package/src/components/slider/examples/states.tsx +14 -10
- package/src/components/smart-filter/COMPONENT.md +13 -13
- package/src/components/smart-filter/examples/examples.module.css +3 -0
- package/src/components/smart-filter/examples/many-values.tsx +12 -8
- package/src/components/smart-filter/examples/sizes.tsx +7 -3
- package/src/components/sparkline/COMPONENT.md +1 -0
- package/src/components/sparkline/examples/curve.tsx +16 -11
- package/src/components/sparkline/examples/states.tsx +14 -10
- package/src/components/switch/COMPONENT.md +2 -1
- package/src/components/tabs/COMPONENT.md +1 -1
- package/src/components/tag-select/COMPONENT.md +1 -0
- package/src/components/textarea/COMPONENT.md +1 -0
- package/src/components/timeline/COMPONENT.md +3 -3
- package/src/components/timeline/examples/structure.tsx +2 -1
- package/src/components/typography/COMPONENT.md +2 -2
- package/src/layout/app-shell/COMPONENT.md +25 -38
- package/src/layout/app-shell/examples/footer.tsx +10 -10
- package/src/layout/app-shell/examples/overview.tsx +20 -22
- package/src/layout/app-shell/examples/screen.module.css +2 -2
- package/src/layout/app-shell/examples/screen.tsx +25 -30
- package/src/layout/app-shell/examples/template.tsx +13 -17
- package/src/layout/bottom-nav/COMPONENT.md +4 -3
- package/src/layout/bottom-nav/examples/floating-action.tsx +10 -19
- package/src/layout/bottom-nav/examples/floating.tsx +10 -19
- package/src/layout/bottom-nav/examples/in-app-shell.tsx +11 -19
- package/src/layout/page/COMPONENT.md +382 -0
- package/src/layout/page/examples/actions-collapse.tsx +45 -0
- package/src/layout/page/examples/collapse.tsx +68 -0
- package/src/layout/page/examples/examples.module.css +92 -0
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/grid.tsx +15 -15
- package/src/layout/page/examples/guard.tsx +87 -0
- package/src/{components/page-content → layout/page}/examples/list-detail.tsx +14 -14
- package/src/layout/page/examples/loading.tsx +57 -0
- package/src/layout/page/examples/narrow.tsx +75 -0
- package/src/layout/page/examples/overview.tsx +57 -0
- package/src/{components/page-content → layout/page}/examples/screen.module.css +1 -1
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.tsx +29 -19
- package/src/{components/page-content → layout/page}/examples/sections.tsx +17 -24
- package/src/layout/page/examples/structure.tsx +41 -0
- package/src/{components/page-toolbar/examples/narrow.tsx → layout/page/examples/tools.tsx} +38 -35
- package/src/layout/page/examples/top-bar.tsx +85 -0
- package/src/{components/page-content → layout/page}/examples/variants.tsx +7 -7
- package/src/layout/sidebar/COMPONENT.md +6 -4
- package/src/layout/sidebar/examples/dismiss.tsx +10 -7
- package/src/layout/sidebar/examples/narrow.tsx +11 -8
- package/src/styles/theme-dark.css +12 -10
- package/src/styles/theme-light.css +4 -0
- package/src/styles/tokens.css +3 -1
- package/dist/components/page-content/PageContent.d.ts +0 -192
- package/dist/components/page-toolbar/PageToolbar.d.ts +0 -55
- package/dist/components/scroll-container/useWheelToInline.d.ts +0 -10
- package/dist/layout/app-header/AppHeader.d.ts +0 -118
- package/dist/skill/reference/components/page-content/COMPONENT.md +0 -264
- package/dist/skill/reference/components/page-content/examples/examples.module.css +0 -56
- package/dist/skill/reference/components/page-content/examples/narrow.tsx +0 -25
- package/dist/skill/reference/components/page-content/examples/overview.tsx +0 -41
- package/dist/skill/reference/components/page-toolbar/COMPONENT.md +0 -147
- package/dist/skill/reference/components/page-toolbar/examples/examples.module.css +0 -16
- package/dist/skill/reference/components/page-toolbar/examples/overview.tsx +0 -113
- package/dist/skill/reference/components/page-toolbar/examples/save-changes.tsx +0 -43
- package/dist/skill/reference/components/page-toolbar/examples/without-search.tsx +0 -60
- package/dist/skill/reference/layout/app-header/COMPONENT.md +0 -187
- package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/dist/skill/reference/layout/app-header/examples/examples.module.css +0 -28
- package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -67
- package/dist/skill/reference/layout/app-header/examples/narrow.tsx +0 -66
- package/dist/skill/reference/layout/app-header/examples/overview.tsx +0 -34
- package/dist/skill/reference/layout/app-header/examples/page-title.tsx +0 -78
- package/dist/skill/reference/layout/app-shell/examples/contained.tsx +0 -30
- package/src/components/page-content/COMPONENT.md +0 -264
- package/src/components/page-content/examples/examples.module.css +0 -56
- package/src/components/page-content/examples/narrow.tsx +0 -25
- package/src/components/page-content/examples/overview.tsx +0 -41
- package/src/components/page-toolbar/COMPONENT.md +0 -147
- package/src/components/page-toolbar/examples/examples.module.css +0 -16
- package/src/components/page-toolbar/examples/overview.tsx +0 -113
- package/src/components/page-toolbar/examples/save-changes.tsx +0 -43
- package/src/components/page-toolbar/examples/without-search.tsx +0 -60
- package/src/layout/app-header/COMPONENT.md +0 -187
- package/src/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/src/layout/app-header/examples/examples.module.css +0 -28
- package/src/layout/app-header/examples/in-app-shell.tsx +0 -67
- package/src/layout/app-header/examples/narrow.tsx +0 -66
- package/src/layout/app-header/examples/overview.tsx +0 -34
- package/src/layout/app-header/examples/page-title.tsx +0 -78
- package/src/layout/app-shell/examples/contained.tsx +0 -30
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** A nested record: the path, the title with its status and due date and the record's actions by weight in
|
|
1
|
+
/** A nested record: the path, the title with its status and due date and the record's actions by weight in its top bar, a main column with the line items and their totals and a side column with the client's details and the history — `align`, `orientation`. */
|
|
2
2
|
import {
|
|
3
|
-
AppHeader,
|
|
4
3
|
Avatar,
|
|
5
4
|
Breadcrumb,
|
|
6
5
|
Button,
|
|
@@ -8,11 +7,9 @@ import {
|
|
|
8
7
|
DataTable,
|
|
9
8
|
type DataTableColumn,
|
|
10
9
|
DescriptionList,
|
|
11
|
-
Dropdown,
|
|
12
10
|
Icon,
|
|
13
11
|
LinkButton,
|
|
14
|
-
|
|
15
|
-
PageToolbar,
|
|
12
|
+
Page,
|
|
16
13
|
Timeline,
|
|
17
14
|
Typography,
|
|
18
15
|
} from "prime-ui-kit";
|
|
@@ -75,132 +72,128 @@ const COLUMNS: DataTableColumn<Line>[] = [
|
|
|
75
72
|
|
|
76
73
|
export default function DescriptionListScreenExample() {
|
|
77
74
|
return (
|
|
78
|
-
|
|
79
|
-
{/* A nested record titles itself in
|
|
80
|
-
only h1 with its status and due date under it, the record's actions
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
<Page.Root>
|
|
76
|
+
{/* A nested record titles itself in its top bar: the path up to the list, the record as the
|
|
77
|
+
only h1 with its status and due date under it, the record's actions at the end. */}
|
|
78
|
+
|
|
79
|
+
<Page.TopBar>
|
|
80
|
+
<Page.Heading>
|
|
83
81
|
<Breadcrumb.Root>
|
|
84
82
|
<Breadcrumb.Item href="#invoices">Счета</Breadcrumb.Item>
|
|
85
83
|
</Breadcrumb.Root>
|
|
86
|
-
<
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<DescriptionList.Root align="end" className={styles.totals}>
|
|
134
|
-
{TOTALS.map((row) => (
|
|
135
|
-
<DescriptionList.Item key={row.label} label={row.label}>
|
|
136
|
-
{row.value}
|
|
137
|
-
</DescriptionList.Item>
|
|
138
|
-
))}
|
|
139
|
-
<DescriptionList.Item
|
|
140
|
-
label={
|
|
141
|
-
<Typography as="span" variant="title-m">
|
|
142
|
-
К оплате
|
|
143
|
-
</Typography>
|
|
144
|
-
}
|
|
145
|
-
>
|
|
146
|
-
<Typography as="span" variant="title-m" numeric="tabular">
|
|
147
|
-
{MONEY.format(NET + VAT)}
|
|
148
|
-
</Typography>
|
|
84
|
+
<Page.Title>Счёт № 2026-0418</Page.Title>
|
|
85
|
+
<Page.Description>Отправлен · оплатить до 14 октября</Page.Description>
|
|
86
|
+
</Page.Heading>
|
|
87
|
+
{/* By weight: when the row runs short the soft actions show only their icons, then fold
|
|
88
|
+
into «⋯»; the primary action stays. */}
|
|
89
|
+
<Page.Actions>
|
|
90
|
+
<Button.Root variant="soft" tone="neutral">
|
|
91
|
+
<Button.Icon>
|
|
92
|
+
<Icon name="action.copy" />
|
|
93
|
+
</Button.Icon>
|
|
94
|
+
Дублировать
|
|
95
|
+
</Button.Root>
|
|
96
|
+
<Button.Root variant="soft" tone="neutral">
|
|
97
|
+
<Button.Icon>
|
|
98
|
+
<Icon name="action.download" />
|
|
99
|
+
</Button.Icon>
|
|
100
|
+
Скачать PDF
|
|
101
|
+
</Button.Root>
|
|
102
|
+
<Button.Root variant="soft" tone="neutral">
|
|
103
|
+
<Button.Icon>
|
|
104
|
+
<Icon name="action.send" />
|
|
105
|
+
</Button.Icon>
|
|
106
|
+
Напомнить
|
|
107
|
+
</Button.Root>
|
|
108
|
+
<Button.Root>
|
|
109
|
+
<Button.Icon>
|
|
110
|
+
<Icon name="action.check" />
|
|
111
|
+
</Button.Icon>
|
|
112
|
+
Отметить оплату
|
|
113
|
+
</Button.Root>
|
|
114
|
+
</Page.Actions>
|
|
115
|
+
</Page.TopBar>
|
|
116
|
+
<Page.Body>
|
|
117
|
+
<div className={styles.columns}>
|
|
118
|
+
<Page.Section label="Позиции" className={styles.main}>
|
|
119
|
+
<DataTable
|
|
120
|
+
columns={COLUMNS}
|
|
121
|
+
rows={LINES}
|
|
122
|
+
getRowKey={(row) => row.id}
|
|
123
|
+
paging="none"
|
|
124
|
+
highlightRowOnHover={false}
|
|
125
|
+
/>
|
|
126
|
+
{/* The totals end where the «Сумма» column of the table above ends. */}
|
|
127
|
+
<DescriptionList.Root align="end" className={styles.totals}>
|
|
128
|
+
{TOTALS.map((row) => (
|
|
129
|
+
<DescriptionList.Item key={row.label} label={row.label}>
|
|
130
|
+
{row.value}
|
|
149
131
|
</DescriptionList.Item>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
132
|
+
))}
|
|
133
|
+
<DescriptionList.Item
|
|
134
|
+
label={
|
|
135
|
+
<Typography as="span" variant="title-m">
|
|
136
|
+
К оплате
|
|
137
|
+
</Typography>
|
|
138
|
+
}
|
|
139
|
+
>
|
|
140
|
+
<Typography as="span" variant="title-m" numeric="tabular">
|
|
141
|
+
{MONEY.format(NET + VAT)}
|
|
142
|
+
</Typography>
|
|
143
|
+
</DescriptionList.Item>
|
|
144
|
+
</DescriptionList.Root>
|
|
145
|
+
</Page.Section>
|
|
146
|
+
<aside className={styles.aside} aria-label="Клиент и история">
|
|
147
|
+
<Card.Root variant="panel">
|
|
148
|
+
<Card.Header>
|
|
149
|
+
<Card.Title as="h2">Клиент</Card.Title>
|
|
150
|
+
</Card.Header>
|
|
151
|
+
<Card.Body>
|
|
152
|
+
<div className={styles.client}>
|
|
153
|
+
<span className={styles.person}>
|
|
154
|
+
<Avatar.Root color="teal">
|
|
155
|
+
<Avatar.Fallback>СВ</Avatar.Fallback>
|
|
156
|
+
</Avatar.Root>
|
|
157
|
+
<span className={styles.personText}>
|
|
158
|
+
<Typography as="span" variant="title-s">
|
|
159
|
+
ООО «Северный ветер»
|
|
160
|
+
</Typography>
|
|
161
|
+
<Typography as="span" variant="caption" tone="muted">
|
|
162
|
+
ИНН 7704 512 908
|
|
163
|
+
</Typography>
|
|
171
164
|
</span>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
</DescriptionList.
|
|
180
|
-
</
|
|
181
|
-
</
|
|
182
|
-
</Card.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
</Timeline.
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
</Timeline.
|
|
198
|
-
</
|
|
199
|
-
</Card.
|
|
200
|
-
</
|
|
201
|
-
</
|
|
202
|
-
</
|
|
203
|
-
</
|
|
204
|
-
|
|
165
|
+
</span>
|
|
166
|
+
<DescriptionList.Root orientation="vertical">
|
|
167
|
+
<DescriptionList.Item label="Контакт">
|
|
168
|
+
Ольга Мартынова, финансовый директор
|
|
169
|
+
</DescriptionList.Item>
|
|
170
|
+
<DescriptionList.Item label="Почта для счетов">
|
|
171
|
+
<LinkButton href="mailto:billing@veter.ru">billing@veter.ru</LinkButton>
|
|
172
|
+
</DescriptionList.Item>
|
|
173
|
+
</DescriptionList.Root>
|
|
174
|
+
</div>
|
|
175
|
+
</Card.Body>
|
|
176
|
+
</Card.Root>
|
|
177
|
+
<Card.Root variant="panel">
|
|
178
|
+
<Card.Header>
|
|
179
|
+
<Card.Title as="h2">История</Card.Title>
|
|
180
|
+
</Card.Header>
|
|
181
|
+
<Card.Body>
|
|
182
|
+
<Timeline.Root>
|
|
183
|
+
<Timeline.Group>
|
|
184
|
+
{HISTORY.map((event) => (
|
|
185
|
+
<Timeline.Item key={event.id}>
|
|
186
|
+
<Timeline.ItemTitle>{event.title}</Timeline.ItemTitle>
|
|
187
|
+
<Timeline.ItemMeta>{event.date}</Timeline.ItemMeta>
|
|
188
|
+
</Timeline.Item>
|
|
189
|
+
))}
|
|
190
|
+
</Timeline.Group>
|
|
191
|
+
</Timeline.Root>
|
|
192
|
+
</Card.Body>
|
|
193
|
+
</Card.Root>
|
|
194
|
+
</aside>
|
|
195
|
+
</div>
|
|
196
|
+
</Page.Body>
|
|
197
|
+
</Page.Root>
|
|
205
198
|
);
|
|
206
199
|
}
|
|
@@ -42,6 +42,7 @@ DigitInput field frame: label row → cells → support row (hint | e
|
|
|
42
42
|
| `required` | `boolean` | — | Red `*` after the label and native `required` on every cell. |
|
|
43
43
|
| `optional` | `boolean` | — | Muted marker right after the label text (`labels.optional`). |
|
|
44
44
|
| `hint` | `ReactNode` | — | Help text under the cells. Hidden while `error` is shown. |
|
|
45
|
+
| `hintTone` | `"neutral" \| "success" \| "warning" \| "danger"` | `"neutral"` | Status color of `hint` («Осталось 12 дней» in `warning`). The words carry the status, the color repeats it; an `error` replaces the hint and its tone. A validation error is `error`, never a `danger` hint. |
|
|
45
46
|
| `error` | `ReactNode` | — | Error message in the hint slot; implies `invalid`. |
|
|
46
47
|
| `invalid` | `boolean` | — | Danger ring and danger digits on every cell, `aria-invalid`. A non-empty `error` implies it. |
|
|
47
48
|
| `success` | `boolean` | `false` | The code was accepted (after the server checked it): the cells turn success one after another. Ignored while invalid. Say it in words too (`hint`). |
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** A long code read in chunks with a wider gap between groups — `groupSize`. */
|
|
2
|
-
import { DigitInput } from "prime-ui-kit";
|
|
2
|
+
import { DigitInput, Fieldset } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
export default function DigitInputGroupedExample() {
|
|
5
5
|
return (
|
|
6
|
-
|
|
6
|
+
<Fieldset aria-label="Подтверждение входа">
|
|
7
7
|
<DigitInput label="Код из приложения" length={6} groupSize={3} defaultValue="482915" />
|
|
8
|
-
<DigitInput label="Резервный код" length={
|
|
9
|
-
|
|
8
|
+
<DigitInput label="Резервный код" length={6} groupSize={2} />
|
|
9
|
+
</Fieldset>
|
|
10
10
|
);
|
|
11
11
|
}
|
|
@@ -18,7 +18,7 @@ export default function DigitInputValidationExample() {
|
|
|
18
18
|
onValueChange={() => setError(undefined)}
|
|
19
19
|
onComplete={(value) => setError(value === CODE ? undefined : "Неверный код")}
|
|
20
20
|
/>
|
|
21
|
-
<DigitInput label="Код приглашения" optional />
|
|
21
|
+
<DigitInput label="Код приглашения" length={6} optional />
|
|
22
22
|
</>
|
|
23
23
|
);
|
|
24
24
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
- A vertical break between groups of buttons in a toolbar row; `inset` makes it one text line tall (a header).
|
|
13
13
|
|
|
14
14
|
## When not to use
|
|
15
|
-
- To separate cards or panels from each other → use fill and spacing ([Card](../card/COMPONENT.md), [
|
|
15
|
+
- To separate cards or panels from each other → use fill and spacing ([Card](../card/COMPONENT.md), [Page](../../layout/page/COMPONENT.md) sections), never a line.
|
|
16
16
|
- Separators inside a dropdown menu → `Dropdown.Separator` ([Dropdown](../dropdown/COMPONENT.md)).
|
|
17
17
|
- Row lines of a table → [DataTable](../data-table/COMPONENT.md) draws them itself.
|
|
18
18
|
|
|
@@ -124,4 +124,4 @@ No `labels`.
|
|
|
124
124
|
|
|
125
125
|
## Related
|
|
126
126
|
- **Built from:** `internal/fieldClasses` (the tier table), `internal/textRole` (the label type), `internal/hasContent`
|
|
127
|
-
- **See also:** [Dropdown](../dropdown/COMPONENT.md) (`Dropdown.Separator`), [Select](../select/COMPONENT.md) (`Select.Separator`), [Accordion](../accordion/COMPONENT.md), [Card](../card/COMPONENT.md), [
|
|
127
|
+
- **See also:** [Dropdown](../dropdown/COMPONENT.md) (`Dropdown.Separator`), [Select](../select/COMPONENT.md) (`Select.Separator`), [Accordion](../accordion/COMPONENT.md), [Card](../card/COMPONENT.md), [Page](../../layout/page/COMPONENT.md)
|
|
@@ -18,9 +18,12 @@
|
|
|
18
18
|
gap: var(--prime-space-4);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/* vertical.tsx: the toolbar row the vertical lines stand in
|
|
21
|
+
/* vertical.tsx: the toolbar row the vertical lines stand in; on a phone narrower than the row it
|
|
22
|
+
wraps rather than squeezing the buttons under their labels. */
|
|
22
23
|
.toolbar {
|
|
23
24
|
display: flex;
|
|
25
|
+
flex-wrap: wrap;
|
|
24
26
|
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
25
28
|
gap: var(--prime-space-2);
|
|
26
29
|
}
|
|
@@ -1,24 +1,37 @@
|
|
|
1
1
|
/** Vertical lines between groups of toolbar buttons: one as tall as the row, one inset to a text line — `orientation`, `inset`. */
|
|
2
|
-
import { Button, Divider } from "prime-ui-kit";
|
|
2
|
+
import { Button, Divider, Icon } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
5
5
|
|
|
6
6
|
export default function DividerVerticalExample() {
|
|
7
7
|
return (
|
|
8
8
|
<div className={styles.toolbar}>
|
|
9
|
-
<Button.Root variant="ghost" tone="neutral">
|
|
10
|
-
|
|
9
|
+
<Button.Root variant="ghost" tone="neutral" aria-label="Жирный">
|
|
10
|
+
<Button.Icon>
|
|
11
|
+
<Icon name="format.bold" />
|
|
12
|
+
</Button.Icon>
|
|
11
13
|
</Button.Root>
|
|
12
|
-
<Button.Root variant="ghost" tone="neutral">
|
|
13
|
-
|
|
14
|
+
<Button.Root variant="ghost" tone="neutral" aria-label="Курсив">
|
|
15
|
+
<Button.Icon>
|
|
16
|
+
<Icon name="format.italic" />
|
|
17
|
+
</Button.Icon>
|
|
14
18
|
</Button.Root>
|
|
15
19
|
<Divider orientation="vertical" />
|
|
16
|
-
<Button.Root variant="ghost" tone="neutral">
|
|
17
|
-
|
|
20
|
+
<Button.Root variant="ghost" tone="neutral" aria-label="Список">
|
|
21
|
+
<Button.Icon>
|
|
22
|
+
<Icon name="format.list" />
|
|
23
|
+
</Button.Icon>
|
|
24
|
+
</Button.Root>
|
|
25
|
+
<Button.Root variant="ghost" tone="neutral" aria-label="Цитата">
|
|
26
|
+
<Button.Icon>
|
|
27
|
+
<Icon name="format.quote" />
|
|
28
|
+
</Button.Icon>
|
|
18
29
|
</Button.Root>
|
|
19
30
|
<Divider orientation="vertical" inset />
|
|
20
|
-
<Button.Root variant="ghost" tone="
|
|
21
|
-
|
|
31
|
+
<Button.Root variant="ghost" tone="neutral" aria-label="Ссылка">
|
|
32
|
+
<Button.Icon>
|
|
33
|
+
<Icon name="format.link" />
|
|
34
|
+
</Button.Icon>
|
|
22
35
|
</Button.Root>
|
|
23
36
|
</div>
|
|
24
37
|
);
|
|
@@ -68,13 +68,15 @@
|
|
|
68
68
|
padding: var(--prime-space-1) var(--prime-space-2);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
/* A card in a column well: the selected thumb of the well's fill (as a Kanban card), so it stands two
|
|
72
|
+
ladder steps off the column in both themes. */
|
|
71
73
|
.ticket {
|
|
72
74
|
display: flex;
|
|
73
75
|
flex-direction: column;
|
|
74
76
|
gap: var(--prime-space-1);
|
|
75
77
|
padding: var(--prime-space-3) var(--prime-space-4);
|
|
76
78
|
border-radius: var(--prime-radius-m);
|
|
77
|
-
background: var(--prime-color-
|
|
79
|
+
background: var(--prime-color-control-selected);
|
|
78
80
|
box-shadow: var(--prime-shadow-raised);
|
|
79
81
|
}
|
|
80
82
|
|
|
@@ -35,6 +35,7 @@ Drawer.Root state and dismiss policy (no DOM)
|
|
|
35
35
|
│ ├─ Drawer.Description <p>
|
|
36
36
|
│ └─ Drawer.Actions row of tier-s controls before the close button
|
|
37
37
|
├─ Drawer.Body the only scrolling zone (ScrollContainer)
|
|
38
|
+
│ └─ Drawer.Section <section>: <h3> label, description, Drawer.Actions at the heading's end
|
|
38
39
|
└─ Drawer.Footer always: Close or Cancel + the main action, primary last
|
|
39
40
|
├─ Drawer.Meta <p>, muted status at the start
|
|
40
41
|
└─ Drawer.Close clones its child; closes on click
|
|
@@ -80,7 +81,7 @@ No DOM, no ref. State and dismiss policy.
|
|
|
80
81
|
| `…rest` | `HTMLAttributes<HTMLElement>` | — | `className` and the other attributes of the `<header>`. |
|
|
81
82
|
|
|
82
83
|
### Drawer.Actions
|
|
83
|
-
`ref` → `HTMLDivElement`. A row of controls at the end of the header, before the close button: a status Badge, a ⋯ Dropdown, an icon button. Controls inside take tier `s`.
|
|
84
|
+
`ref` → `HTMLDivElement`. A row of controls at the end of the header, before the close button: a status Badge, a ⋯ Dropdown, an icon button; or at the end of a `Drawer.Section` heading. Controls inside take tier `s`.
|
|
84
85
|
|
|
85
86
|
| Prop | Type | Default | Description |
|
|
86
87
|
|---|---|---|---|
|
|
@@ -109,6 +110,15 @@ No DOM, no ref. State and dismiss policy.
|
|
|
109
110
|
|---|---|---|---|
|
|
110
111
|
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `className`, `children` and the other attributes of the zone. |
|
|
111
112
|
|
|
113
|
+
### Drawer.Section
|
|
114
|
+
`ref` → `HTMLElement`. A titled `<section>` of the body: an `<h3>` (title-s, under the `<h2>` title), an optional description, a `Drawer.Actions` at the end of the heading row; the content 16 below, sections 32 apart. Fields group in a `Fieldset`.
|
|
115
|
+
|
|
116
|
+
| Prop | Type | Default | Description |
|
|
117
|
+
|---|---|---|---|
|
|
118
|
+
| `label` | `ReactNode` | — (required) | The heading of the section; it names the `<section>`. |
|
|
119
|
+
| `description` | `ReactNode` | — | One line of context under the heading (body-s). |
|
|
120
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLElement>, "title">` | — | `children` (the content and an optional `Drawer.Actions`), `className` and the other attributes of the `<section>`. |
|
|
121
|
+
|
|
112
122
|
### Drawer.Footer
|
|
113
123
|
`ref` → `HTMLElement`. Renders `<footer>` with the actions, primary last, and an optional `Meta` at the start.
|
|
114
124
|
|
|
@@ -189,6 +199,8 @@ Motion: the scrim fades, the panel slides from its side over `slow` and leaves o
|
|
|
189
199
|
- Full viewport height; only the body scrolls, with its own side padding.
|
|
190
200
|
- Tabs in the header: a `Tabs.List` inside `Drawer.Header` (with `Tabs.Root` around the header and the body) spans the header's last row. The header becomes the tab strip, edge to edge and without the hairline; the active tab is the body rising into it, the panels sit in the body.
|
|
191
201
|
- Fields inside get the surface field fill.
|
|
202
|
+
- Titled groups of the body (a record's contacts, its deals, its history): `Drawer.Section label` — an `<h3>` under the drawer's `<h2>` title, an optional `description`, a `Drawer.Actions` at the end of its heading row; content 16 below, sections 32 apart. A group of fields is a `Fieldset`; a page section is `Page.Section`.
|
|
203
|
+
- With a `Drawer.Meta` the buttons stay one row: when the footer runs short the status goes above them first.
|
|
192
204
|
|
|
193
205
|
## Accessibility
|
|
194
206
|
|
|
@@ -229,18 +241,19 @@ Motion: the scrim fades, the panel slides from its side over `slow` and leaves o
|
|
|
229
241
|
| [sizes.tsx](examples/sizes.tsx) | Every panel width, 360 to 800 px; below 640 px of viewport the panel takes the full width — `size`. |
|
|
230
242
|
| [placement.tsx](examples/placement.tsx) | The panel slides from the right for details and from the left for filters, rounded only on the edge facing the page — `side`. |
|
|
231
243
|
| [header-actions.tsx](examples/header-actions.tsx) | A record card: its status and a ⋯ menu sit in the header before the close button, one tier smaller — `Drawer.Actions`. |
|
|
232
|
-
| [client-card.tsx](examples/client-card.tsx) | A client card from the list: the contact's avatar heads the panel in place of an icon tile, then the details — `Drawer.Icon`, `Avatar.Root`. |
|
|
244
|
+
| [client-card.tsx](examples/client-card.tsx) | A client card from the list: the contact's avatar heads the panel in place of an icon tile, then the details in titled sections, one with its own action — `Drawer.Icon`, `Avatar.Root`, `Drawer.Section`, `Drawer.Actions`. |
|
|
233
245
|
| [guard.tsx](examples/guard.tsx) | A form that holds the drawer from inside: after an edit Escape, the scrim and Cancel ask before discarding, the footer says so, and saving locks every way out — `Drawer.Guard`, `Drawer.Meta`. |
|
|
234
246
|
| [long-content.tsx](examples/long-content.tsx) | A long body scrolls on its own while the header and the footer stay in place — `Drawer.Body`. |
|
|
235
247
|
| [dismiss.tsx](examples/dismiss.tsx) | An import closes only from its buttons, and not at all while it runs — `closeOnOutsideClick`, `closeOnEscape`. |
|
|
236
248
|
| [controlled-open.tsx](examples/controlled-open.tsx) | The parent owns the state and opens the drawer from a link, without a trigger — `open`, `onOpenChange`. |
|
|
237
249
|
| [in-form.tsx](examples/in-form.tsx) | A settings form in the panel: the footer button submits the form and an empty name shakes the field and keeps it open until it is filled — `Drawer.Body`, `Drawer.Footer`, `error`. |
|
|
238
|
-
| [screen.tsx](examples/screen.tsx) | A create form in a Drawer opened from the primary action in
|
|
250
|
+
| [screen.tsx](examples/screen.tsx) | A create form in a Drawer opened from the primary action in its top bar: grouped fields, errors on submit with focus on the first invalid field, a loading submit, a toast and the new row in the list — `Drawer.Trigger`, `Drawer.Guard`. |
|
|
239
251
|
|
|
240
252
|
## Mistakes
|
|
241
253
|
- A drawer without `Drawer.Footer` → add one: «Закрыть» for details, «Отмена» + the submit button for a form. The header × alone is not the end of the panel.
|
|
242
254
|
- Save or Cancel buttons at the end of the body, or in the header → they go in `Drawer.Footer`, which stays in place while the body scrolls.
|
|
243
255
|
- A delete confirmation in a Drawer → use ConfirmDialog.
|
|
256
|
+
- A hand-made heading row (`Typography as="h3"` + buttons) over a group in the body → `Drawer.Section label` with `Drawer.Actions`.
|
|
244
257
|
- Busy or unsaved state lifted out of the form into Root props → put `Drawer.Guard` next to the form, inside Content.
|
|
245
258
|
- Clearing the record together with `open` and rendering a skeleton for «no record» → not needed: the panel keeps its last content while it slides out.
|
|
246
259
|
- A Badge or a menu as a custom child of the header text column → put them in `Drawer.Actions`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** A client card from the list: the contact's avatar heads the panel in place of an icon tile, then the details — `Drawer.Icon`, `Avatar.Root`. */
|
|
2
|
-
import { Avatar, Button, DescriptionList, Drawer } from "prime-ui-kit";
|
|
1
|
+
/** A client card from the list: the contact's avatar heads the panel in place of an icon tile, then the details in titled sections, one with its own action — `Drawer.Icon`, `Avatar.Root`, `Drawer.Section`, `Drawer.Actions`. */
|
|
2
|
+
import { Avatar, Button, DescriptionList, Drawer, Icon } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
const CLIENT = {
|
|
5
5
|
name: "Анна Соколова",
|
|
@@ -10,6 +10,11 @@ const CLIENT = {
|
|
|
10
10
|
manager: "Игорь Лебедев",
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
const DEALS = [
|
|
14
|
+
{ id: "D-2041", title: "Поставка серверов", amount: "1 240 000 ₽" },
|
|
15
|
+
{ id: "D-2057", title: "Сервисный контракт на год", amount: "380 000 ₽" },
|
|
16
|
+
];
|
|
17
|
+
|
|
13
18
|
export default function DrawerClientCardExample() {
|
|
14
19
|
return (
|
|
15
20
|
<Drawer.Root>
|
|
@@ -29,12 +34,31 @@ export default function DrawerClientCardExample() {
|
|
|
29
34
|
<Drawer.Description>{CLIENT.company}</Drawer.Description>
|
|
30
35
|
</Drawer.Header>
|
|
31
36
|
<Drawer.Body>
|
|
32
|
-
<
|
|
33
|
-
<DescriptionList.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
<Drawer.Section label="Контакт">
|
|
38
|
+
<DescriptionList.Root>
|
|
39
|
+
<DescriptionList.Item label="Должность">{CLIENT.role}</DescriptionList.Item>
|
|
40
|
+
<DescriptionList.Item label="Телефон">{CLIENT.phone}</DescriptionList.Item>
|
|
41
|
+
<DescriptionList.Item label="Почта">{CLIENT.email}</DescriptionList.Item>
|
|
42
|
+
<DescriptionList.Item label="Менеджер">{CLIENT.manager}</DescriptionList.Item>
|
|
43
|
+
</DescriptionList.Root>
|
|
44
|
+
</Drawer.Section>
|
|
45
|
+
<Drawer.Section label="Открытые сделки" description="2 сделки на 1 620 000 ₽">
|
|
46
|
+
<Drawer.Actions>
|
|
47
|
+
<Button.Root variant="ghost" tone="neutral">
|
|
48
|
+
<Button.Icon>
|
|
49
|
+
<Icon name="action.add" />
|
|
50
|
+
</Button.Icon>
|
|
51
|
+
Сделка
|
|
52
|
+
</Button.Root>
|
|
53
|
+
</Drawer.Actions>
|
|
54
|
+
<DescriptionList.Root>
|
|
55
|
+
{DEALS.map((deal) => (
|
|
56
|
+
<DescriptionList.Item key={deal.id} label={deal.title}>
|
|
57
|
+
{deal.amount}
|
|
58
|
+
</DescriptionList.Item>
|
|
59
|
+
))}
|
|
60
|
+
</DescriptionList.Root>
|
|
61
|
+
</Drawer.Section>
|
|
38
62
|
</Drawer.Body>
|
|
39
63
|
<Drawer.Footer>
|
|
40
64
|
<Drawer.Close>
|
|
@@ -8,38 +8,33 @@ const SIDES = [
|
|
|
8
8
|
|
|
9
9
|
export default function DrawerPlacementExample() {
|
|
10
10
|
return (
|
|
11
|
-
|
|
11
|
+
<>
|
|
12
12
|
{SIDES.map(({ side, title }) => (
|
|
13
|
-
<
|
|
14
|
-
<Drawer.
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<Drawer.
|
|
21
|
-
<Drawer.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<Drawer.
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</Drawer.Root>
|
|
38
|
-
<Typography as="span" variant="caption" tone="muted">
|
|
39
|
-
{side}
|
|
40
|
-
</Typography>
|
|
41
|
-
</div>
|
|
13
|
+
<Drawer.Root key={side}>
|
|
14
|
+
<Drawer.Trigger>
|
|
15
|
+
<Button.Root variant="soft" tone="neutral">
|
|
16
|
+
{title}
|
|
17
|
+
</Button.Root>
|
|
18
|
+
</Drawer.Trigger>
|
|
19
|
+
<Drawer.Content side={side} size="s">
|
|
20
|
+
<Drawer.Header>
|
|
21
|
+
<Drawer.Title>{title}</Drawer.Title>
|
|
22
|
+
</Drawer.Header>
|
|
23
|
+
<Drawer.Body>
|
|
24
|
+
<Typography variant="body-m" tone="secondary">
|
|
25
|
+
Скругление только со стороны страницы, подложка затемняет остальное.
|
|
26
|
+
</Typography>
|
|
27
|
+
</Drawer.Body>
|
|
28
|
+
<Drawer.Footer>
|
|
29
|
+
<Drawer.Close>
|
|
30
|
+
<Button.Root variant="outline" tone="neutral">
|
|
31
|
+
Закрыть
|
|
32
|
+
</Button.Root>
|
|
33
|
+
</Drawer.Close>
|
|
34
|
+
</Drawer.Footer>
|
|
35
|
+
</Drawer.Content>
|
|
36
|
+
</Drawer.Root>
|
|
42
37
|
))}
|
|
43
|
-
|
|
38
|
+
</>
|
|
44
39
|
);
|
|
45
40
|
}
|