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,5 +1,5 @@
|
|
|
1
|
-
/** A dashboard board: four KPI tiles, a chart two rows high beside two panels, one gap on both axes — `
|
|
2
|
-
import { Card, ChartFrame, type ChartFrameSeries, chartColors,
|
|
1
|
+
/** A dashboard board: four KPI tiles, a chart two rows high beside two panels, one gap on both axes — `Page.Grid`, `Page.Cell`, `span`, `rows`. */
|
|
2
|
+
import { Card, ChartFrame, type ChartFrameSeries, chartColors, Page } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|
|
5
5
|
|
|
@@ -26,21 +26,21 @@ const MARGIN = { top: 8, right: 8, bottom: 24, left: 8 };
|
|
|
26
26
|
|
|
27
27
|
const formatOrders = (value: number) => `${value.toLocaleString("ru-RU")} заказов`;
|
|
28
28
|
|
|
29
|
-
export default function
|
|
29
|
+
export default function PageGridExample() {
|
|
30
30
|
return (
|
|
31
31
|
<div className={styles.main}>
|
|
32
|
-
<
|
|
33
|
-
<
|
|
32
|
+
<Page.Body>
|
|
33
|
+
<Page.Grid>
|
|
34
34
|
{KPIS.map((kpi) => (
|
|
35
|
-
<
|
|
35
|
+
<Page.Cell key={kpi.label} span={3}>
|
|
36
36
|
<Card.Root variant="stat-trend">
|
|
37
37
|
<Card.Label>{kpi.label}</Card.Label>
|
|
38
38
|
<Card.Value>{kpi.value}</Card.Value>
|
|
39
39
|
<Card.Delta tone={kpi.tone}>{kpi.delta}</Card.Delta>
|
|
40
40
|
</Card.Root>
|
|
41
|
-
</
|
|
41
|
+
</Page.Cell>
|
|
42
42
|
))}
|
|
43
|
-
<
|
|
43
|
+
<Page.Cell span={8} rows={2}>
|
|
44
44
|
<ChartFrame.Root series={SERIES} rows={ROWS} formatValue={formatOrders}>
|
|
45
45
|
<ChartFrame.Header>
|
|
46
46
|
<ChartFrame.Title>Заказы по неделям</ChartFrame.Title>
|
|
@@ -87,23 +87,23 @@ export default function PageContentGridExample() {
|
|
|
87
87
|
}}
|
|
88
88
|
/>
|
|
89
89
|
</ChartFrame.Root>
|
|
90
|
-
</
|
|
91
|
-
<
|
|
90
|
+
</Page.Cell>
|
|
91
|
+
<Page.Cell span={4}>
|
|
92
92
|
<Card.Root variant="stat-trend">
|
|
93
93
|
<Card.Label>Новые клиенты</Card.Label>
|
|
94
94
|
<Card.Value>86</Card.Value>
|
|
95
95
|
<Card.Delta tone="success">+14 к сентябрю</Card.Delta>
|
|
96
96
|
</Card.Root>
|
|
97
|
-
</
|
|
98
|
-
<
|
|
97
|
+
</Page.Cell>
|
|
98
|
+
<Page.Cell span={4}>
|
|
99
99
|
<Card.Root variant="stat-trend">
|
|
100
100
|
<Card.Label>Ждут оплаты</Card.Label>
|
|
101
101
|
<Card.Value>312 400 ₽</Card.Value>
|
|
102
102
|
<Card.Delta tone="warning">7 счетов</Card.Delta>
|
|
103
103
|
</Card.Root>
|
|
104
|
-
</
|
|
105
|
-
</
|
|
106
|
-
</
|
|
104
|
+
</Page.Cell>
|
|
105
|
+
</Page.Grid>
|
|
106
|
+
</Page.Body>
|
|
107
107
|
</div>
|
|
108
108
|
);
|
|
109
109
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/** A client's card edited on its own page: after an edit a press on the navigation or the path asks before the changes are lost, and while it saves nothing leaves — `Page.Guard`, `dirty`, `busy`. */
|
|
2
|
+
import { AppShell, Breadcrumb, Button, Card, Icon, Input, Page, Sidebar } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import styles from "./examples.module.css";
|
|
6
|
+
|
|
7
|
+
const SAVED_NAME = "ООО «Северный ветер»";
|
|
8
|
+
const SAVED_MANAGER = "Анна Морозова";
|
|
9
|
+
|
|
10
|
+
export default function PageGuardExample() {
|
|
11
|
+
const [name, setName] = React.useState(SAVED_NAME);
|
|
12
|
+
const [manager, setManager] = React.useState(SAVED_MANAGER);
|
|
13
|
+
const [saved, setSaved] = React.useState({ name: SAVED_NAME, manager: SAVED_MANAGER });
|
|
14
|
+
const [saving, setSaving] = React.useState(false);
|
|
15
|
+
const formId = React.useId();
|
|
16
|
+
const dirty = name !== saved.name || manager !== saved.manager;
|
|
17
|
+
|
|
18
|
+
const save = (event: React.FormEvent<HTMLFormElement>) => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
setSaving(true);
|
|
21
|
+
window.setTimeout(() => {
|
|
22
|
+
setSaved({ name, manager });
|
|
23
|
+
setSaving(false);
|
|
24
|
+
}, 1200);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div className={styles.window}>
|
|
29
|
+
<AppShell.Root fillViewport className={styles.shell}>
|
|
30
|
+
<AppShell.Nav>
|
|
31
|
+
<Sidebar.Root>
|
|
32
|
+
<Sidebar.Content>
|
|
33
|
+
<Sidebar.Item href="#orders">
|
|
34
|
+
<Sidebar.ItemIcon>
|
|
35
|
+
<Icon name="object.package" />
|
|
36
|
+
</Sidebar.ItemIcon>
|
|
37
|
+
Заказы
|
|
38
|
+
</Sidebar.Item>
|
|
39
|
+
<Sidebar.Item href="#clients" current>
|
|
40
|
+
<Sidebar.ItemIcon>
|
|
41
|
+
<Icon name="object.users" />
|
|
42
|
+
</Sidebar.ItemIcon>
|
|
43
|
+
Клиенты
|
|
44
|
+
</Sidebar.Item>
|
|
45
|
+
</Sidebar.Content>
|
|
46
|
+
</Sidebar.Root>
|
|
47
|
+
</AppShell.Nav>
|
|
48
|
+
<AppShell.Main>
|
|
49
|
+
<Page.Root>
|
|
50
|
+
<Page.Guard dirty={dirty} busy={saving} />
|
|
51
|
+
<Page.TopBar>
|
|
52
|
+
<Page.Heading>
|
|
53
|
+
<Breadcrumb.Root>
|
|
54
|
+
<Breadcrumb.Item href="#clients">Клиенты</Breadcrumb.Item>
|
|
55
|
+
</Breadcrumb.Root>
|
|
56
|
+
<Page.Title>{saved.name}</Page.Title>
|
|
57
|
+
</Page.Heading>
|
|
58
|
+
<Page.Actions>
|
|
59
|
+
<Button.Root type="submit" form={formId} loading={saving} disabled={!dirty}>
|
|
60
|
+
Сохранить
|
|
61
|
+
</Button.Root>
|
|
62
|
+
</Page.Actions>
|
|
63
|
+
</Page.TopBar>
|
|
64
|
+
<Page.Body>
|
|
65
|
+
<Card.Root>
|
|
66
|
+
<Card.Body>
|
|
67
|
+
<form id={formId} className={styles.fields} onSubmit={save}>
|
|
68
|
+
<Input.Root label="Название">
|
|
69
|
+
<Input.Wrapper>
|
|
70
|
+
<Input.Field value={name} onValueChange={setName} />
|
|
71
|
+
</Input.Wrapper>
|
|
72
|
+
</Input.Root>
|
|
73
|
+
<Input.Root label="Менеджер">
|
|
74
|
+
<Input.Wrapper>
|
|
75
|
+
<Input.Field value={manager} onValueChange={setManager} />
|
|
76
|
+
</Input.Wrapper>
|
|
77
|
+
</Input.Root>
|
|
78
|
+
</form>
|
|
79
|
+
</Card.Body>
|
|
80
|
+
</Card.Root>
|
|
81
|
+
</Page.Body>
|
|
82
|
+
</Page.Root>
|
|
83
|
+
</AppShell.Main>
|
|
84
|
+
</AppShell.Root>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
}
|
package/dist/skill/reference/{components/page-content → layout/page}/examples/list-detail.tsx
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** A ticket queue as list + detail on a full-height page: side by side on a wide panel, one pane at a time with a back button on a narrow one; the chosen ticket cross-fades in — `
|
|
2
|
-
import { Card, Crossfade, List,
|
|
1
|
+
/** A ticket queue as list + detail on a full-height page: side by side on a wide panel, one pane at a time with a back button on a narrow one; the chosen ticket cross-fades in — `Page.Split`, `Page.List`, `Page.Detail`, `Page.BackButton`, `fill`. */
|
|
2
|
+
import { Card, Crossfade, List, Page, ScrollContainer, Typography } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import styles from "./examples.module.css";
|
|
@@ -35,7 +35,7 @@ const TICKETS: Ticket[] = [
|
|
|
35
35
|
},
|
|
36
36
|
];
|
|
37
37
|
|
|
38
|
-
export default function
|
|
38
|
+
export default function PageListDetailExample() {
|
|
39
39
|
const [ticketId, setTicketId] = React.useState<string | null>(null);
|
|
40
40
|
// The last opened ticket stays in the detail while the narrow split goes back to the list.
|
|
41
41
|
const [shown, setShown] = React.useState<Ticket | null>(null);
|
|
@@ -47,15 +47,15 @@ export default function PageContentListDetailExample() {
|
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
49
|
<div className={styles.fillMain}>
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
50
|
+
<Page.Root fill>
|
|
51
|
+
<Page.Body>
|
|
52
|
+
<Page.Split
|
|
53
53
|
open={ticketId !== null}
|
|
54
54
|
onOpenChange={(next) => {
|
|
55
55
|
if (!next) setTicketId(null);
|
|
56
56
|
}}
|
|
57
57
|
>
|
|
58
|
-
<
|
|
58
|
+
<Page.List aria-label="Обращения">
|
|
59
59
|
<Card.Root className={styles.paneCard}>
|
|
60
60
|
<ScrollContainer className={styles.pane}>
|
|
61
61
|
<List.Root className={styles.tickets}>
|
|
@@ -75,12 +75,12 @@ export default function PageContentListDetailExample() {
|
|
|
75
75
|
</List.Root>
|
|
76
76
|
</ScrollContainer>
|
|
77
77
|
</Card.Root>
|
|
78
|
-
</
|
|
78
|
+
</Page.List>
|
|
79
79
|
|
|
80
|
-
<
|
|
80
|
+
<Page.Detail aria-label="Обращение">
|
|
81
81
|
<Card.Root className={styles.paneCard}>
|
|
82
82
|
<div className={styles.threadHeader}>
|
|
83
|
-
<
|
|
83
|
+
<Page.BackButton />
|
|
84
84
|
<Typography as="h2" variant="title-s">
|
|
85
85
|
{shown ? `${shown.id} · ${shown.subject}` : "Выберите обращение"}
|
|
86
86
|
</Typography>
|
|
@@ -103,10 +103,10 @@ export default function PageContentListDetailExample() {
|
|
|
103
103
|
</Crossfade>
|
|
104
104
|
</ScrollContainer>
|
|
105
105
|
</Card.Root>
|
|
106
|
-
</
|
|
107
|
-
</
|
|
108
|
-
</
|
|
109
|
-
</
|
|
106
|
+
</Page.Detail>
|
|
107
|
+
</Page.Split>
|
|
108
|
+
</Page.Body>
|
|
109
|
+
</Page.Root>
|
|
110
110
|
</div>
|
|
111
111
|
);
|
|
112
112
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** A page whose figures load after it opens: the line of data keeps its place under the title while it loads, so nothing in the bar moves — `loading`. */
|
|
2
|
+
import { Button, Card, Crossfade, Icon, Page, Skeleton, Typography } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
const ORDERS = [
|
|
6
|
+
{ id: "№ 4821", client: "ООО «Север»", sum: "84 000 ₽" },
|
|
7
|
+
{ id: "№ 4820", client: "ИП Котов", sum: "12 500 ₽" },
|
|
8
|
+
{ id: "№ 4819", client: "ООО «Вектор»", sum: "230 000 ₽" },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const LOAD_MS = 1200;
|
|
12
|
+
|
|
13
|
+
export default function PageLoadingExample() {
|
|
14
|
+
const [loading, setLoading] = React.useState(true);
|
|
15
|
+
|
|
16
|
+
React.useEffect(() => {
|
|
17
|
+
if (!loading) return;
|
|
18
|
+
const timer = window.setTimeout(() => setLoading(false), LOAD_MS);
|
|
19
|
+
return () => window.clearTimeout(timer);
|
|
20
|
+
}, [loading]);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Page.Root>
|
|
24
|
+
<Page.TopBar sticky={false}>
|
|
25
|
+
<Page.Heading>
|
|
26
|
+
<Page.Title>Заказы</Page.Title>
|
|
27
|
+
<Page.Description loading={loading}>128 в работе · 6 ждут оплаты</Page.Description>
|
|
28
|
+
</Page.Heading>
|
|
29
|
+
<Page.Actions>
|
|
30
|
+
<Button.Root variant="soft" tone="neutral" onClick={() => setLoading(true)}>
|
|
31
|
+
<Button.Icon>
|
|
32
|
+
<Icon name="action.refresh" />
|
|
33
|
+
</Button.Icon>
|
|
34
|
+
Обновить
|
|
35
|
+
</Button.Root>
|
|
36
|
+
</Page.Actions>
|
|
37
|
+
</Page.TopBar>
|
|
38
|
+
<Page.Body>
|
|
39
|
+
<Card.Root variant="list" aria-busy={loading || undefined}>
|
|
40
|
+
<Card.Body>
|
|
41
|
+
<Crossfade state={loading ? "loading" : "data"}>
|
|
42
|
+
{loading ? (
|
|
43
|
+
<Skeleton lines={ORDERS.length} />
|
|
44
|
+
) : (
|
|
45
|
+
ORDERS.map((order) => (
|
|
46
|
+
<Typography key={order.id} variant="body-m">
|
|
47
|
+
{order.id} · {order.client} · {order.sum}
|
|
48
|
+
</Typography>
|
|
49
|
+
))
|
|
50
|
+
)}
|
|
51
|
+
</Crossfade>
|
|
52
|
+
</Card.Body>
|
|
53
|
+
</Card.Root>
|
|
54
|
+
</Page.Body>
|
|
55
|
+
</Page.Root>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** On a phone the top bar leads with the menu button that opens the navigation by itself, the primary button gives way to its icon and the secondary ones fold into «⋯» — `offCanvas`, `Page.Actions`. */
|
|
2
|
+
import { AppShell, Button, Icon, Page, Sidebar, Typography } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
const ORDERS = [
|
|
7
|
+
"№ 4821 · ООО «Север» · 84 000 ₽",
|
|
8
|
+
"№ 4820 · ИП Котов · 12 500 ₽",
|
|
9
|
+
"№ 4819 · ООО «Вектор» · 230 000 ₽",
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export default function PageNarrowExample() {
|
|
13
|
+
return (
|
|
14
|
+
<div className={`${styles.window} ${styles.phone}`}>
|
|
15
|
+
<AppShell.Root fillViewport className={styles.shell}>
|
|
16
|
+
<AppShell.Nav>
|
|
17
|
+
{/* `always`: this window is phone-wide on any screen; in an app keep the default `auto`. */}
|
|
18
|
+
<Sidebar.Root offCanvas="always">
|
|
19
|
+
<Sidebar.Content>
|
|
20
|
+
<Sidebar.Item href="#overview">
|
|
21
|
+
<Sidebar.ItemIcon>
|
|
22
|
+
<Icon name="nav.home" />
|
|
23
|
+
</Sidebar.ItemIcon>
|
|
24
|
+
Обзор
|
|
25
|
+
</Sidebar.Item>
|
|
26
|
+
<Sidebar.Item href="#orders" current>
|
|
27
|
+
<Sidebar.ItemIcon>
|
|
28
|
+
<Icon name="object.package" />
|
|
29
|
+
</Sidebar.ItemIcon>
|
|
30
|
+
Заказы
|
|
31
|
+
</Sidebar.Item>
|
|
32
|
+
</Sidebar.Content>
|
|
33
|
+
</Sidebar.Root>
|
|
34
|
+
</AppShell.Nav>
|
|
35
|
+
<AppShell.Main>
|
|
36
|
+
<Page.Root>
|
|
37
|
+
<Page.TopBar>
|
|
38
|
+
<Page.Heading>
|
|
39
|
+
<Page.Title>Заказы покупателей</Page.Title>
|
|
40
|
+
<Page.Description>128 в работе · 6 ждут оплаты · 2 возврата</Page.Description>
|
|
41
|
+
</Page.Heading>
|
|
42
|
+
<Page.Actions>
|
|
43
|
+
<Button.Root variant="soft" tone="neutral">
|
|
44
|
+
<Button.Icon>
|
|
45
|
+
<Icon name="action.download" />
|
|
46
|
+
</Button.Icon>
|
|
47
|
+
Экспорт
|
|
48
|
+
</Button.Root>
|
|
49
|
+
<Button.Root variant="soft" tone="neutral">
|
|
50
|
+
<Button.Icon>
|
|
51
|
+
<Icon name="action.refresh" />
|
|
52
|
+
</Button.Icon>
|
|
53
|
+
Обновить
|
|
54
|
+
</Button.Root>
|
|
55
|
+
<Button.Root>
|
|
56
|
+
<Button.Icon>
|
|
57
|
+
<Icon name="action.add" />
|
|
58
|
+
</Button.Icon>
|
|
59
|
+
Новый заказ
|
|
60
|
+
</Button.Root>
|
|
61
|
+
</Page.Actions>
|
|
62
|
+
</Page.TopBar>
|
|
63
|
+
<Page.Body>
|
|
64
|
+
{ORDERS.map((order) => (
|
|
65
|
+
<Typography key={order} variant="body-m">
|
|
66
|
+
{order}
|
|
67
|
+
</Typography>
|
|
68
|
+
))}
|
|
69
|
+
</Page.Body>
|
|
70
|
+
</Page.Root>
|
|
71
|
+
</AppShell.Main>
|
|
72
|
+
</AppShell.Root>
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** A work page in an app window: the top bar with the title, its line of data and the page's buttons, the body under it — `Page.TopBar`, `Page.Heading`, `Page.Actions`. */
|
|
2
|
+
import { AppShell, Button, Card, Icon, Page, Typography } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
const ORDERS = [
|
|
7
|
+
{ id: "№ 4821", client: "ООО «Север»", sum: "84 000 ₽" },
|
|
8
|
+
{ id: "№ 4820", client: "ИП Котов", sum: "12 500 ₽" },
|
|
9
|
+
{ id: "№ 4819", client: "ООО «Вектор»", sum: "230 000 ₽" },
|
|
10
|
+
{ id: "№ 4818", client: "АО «Техностиль»", sum: "47 900 ₽" },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export default function PageOverviewExample() {
|
|
14
|
+
return (
|
|
15
|
+
<div className={styles.window}>
|
|
16
|
+
<AppShell.Root fillViewport className={styles.shell}>
|
|
17
|
+
<AppShell.Main>
|
|
18
|
+
<Page.Root>
|
|
19
|
+
<Page.TopBar>
|
|
20
|
+
<Page.Heading>
|
|
21
|
+
<Page.Title>Заказы</Page.Title>
|
|
22
|
+
<Page.Description>128 в работе · 6 ждут оплаты</Page.Description>
|
|
23
|
+
</Page.Heading>
|
|
24
|
+
<Page.Actions>
|
|
25
|
+
<Button.Root variant="soft" tone="neutral">
|
|
26
|
+
<Button.Icon>
|
|
27
|
+
<Icon name="action.download" />
|
|
28
|
+
</Button.Icon>
|
|
29
|
+
Экспорт
|
|
30
|
+
</Button.Root>
|
|
31
|
+
<Button.Root>
|
|
32
|
+
<Button.Icon>
|
|
33
|
+
<Icon name="action.add" />
|
|
34
|
+
</Button.Icon>
|
|
35
|
+
Новый заказ
|
|
36
|
+
</Button.Root>
|
|
37
|
+
</Page.Actions>
|
|
38
|
+
</Page.TopBar>
|
|
39
|
+
<Page.Body>
|
|
40
|
+
<Card.Root variant="list">
|
|
41
|
+
<Card.List>
|
|
42
|
+
{ORDERS.map((order) => (
|
|
43
|
+
<Card.ListItem key={order.id}>
|
|
44
|
+
<Typography as="span" variant="body-m">
|
|
45
|
+
{order.id} · {order.client} · {order.sum}
|
|
46
|
+
</Typography>
|
|
47
|
+
</Card.ListItem>
|
|
48
|
+
))}
|
|
49
|
+
</Card.List>
|
|
50
|
+
</Card.Root>
|
|
51
|
+
</Page.Body>
|
|
52
|
+
</Page.Root>
|
|
53
|
+
</AppShell.Main>
|
|
54
|
+
</AppShell.Root>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
/** A settings page: sections with a heading column and a panel, a form saved by its own button, switches that apply at once and a danger zone with a confirm — `layout`, `maxWidth`. */
|
|
1
|
+
/** A settings page as a document: the path in the top bar that repeats the title once it scrolls away, the large title in the flow, sections with a heading column and a panel, a form saved by its own button, switches that apply at once and a danger zone with a confirm — `collapse`, `layout`, `maxWidth`. */
|
|
2
2
|
import {
|
|
3
|
+
Breadcrumb,
|
|
3
4
|
Button,
|
|
4
5
|
Card,
|
|
5
6
|
ConfirmDialog,
|
|
6
7
|
Fieldset,
|
|
7
8
|
Input,
|
|
8
|
-
|
|
9
|
+
Page,
|
|
9
10
|
Select,
|
|
10
11
|
Switch,
|
|
11
12
|
Textarea,
|
|
@@ -45,7 +46,7 @@ const ALERTS = [
|
|
|
45
46
|
},
|
|
46
47
|
];
|
|
47
48
|
|
|
48
|
-
export default function
|
|
49
|
+
export default function PageScreenExample() {
|
|
49
50
|
const [innError, setInnError] = React.useState<string>();
|
|
50
51
|
const [saving, setSaving] = React.useState(false);
|
|
51
52
|
const [saved, setSaved] = React.useState(false);
|
|
@@ -70,15 +71,24 @@ export default function PageContentScreenExample() {
|
|
|
70
71
|
const removeWorkspace = () => new Promise<void>((resolve) => window.setTimeout(resolve, 1200));
|
|
71
72
|
|
|
72
73
|
return (
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
<Page.Root maxWidth="wide">
|
|
75
|
+
<Page.TopBar collapse>
|
|
76
|
+
<Page.Heading>
|
|
77
|
+
<Breadcrumb.Root>
|
|
78
|
+
<Breadcrumb.Item href="#workspace">Прайм Софт</Breadcrumb.Item>
|
|
79
|
+
</Breadcrumb.Root>
|
|
80
|
+
</Page.Heading>
|
|
81
|
+
</Page.TopBar>
|
|
82
|
+
<Page.Header>
|
|
83
|
+
<Page.Heading>
|
|
84
|
+
<Page.Title>Настройки</Page.Title>
|
|
85
|
+
<Page.Description>
|
|
86
|
+
Реквизиты компании, уведомления и управление рабочим пространством.
|
|
87
|
+
</Page.Description>
|
|
88
|
+
</Page.Heading>
|
|
89
|
+
</Page.Header>
|
|
90
|
+
<Page.Body>
|
|
91
|
+
<Page.Section
|
|
82
92
|
layout="aside"
|
|
83
93
|
label="Компания"
|
|
84
94
|
description="Попадают в счета, акты и письма клиентам."
|
|
@@ -135,9 +145,9 @@ export default function PageContentScreenExample() {
|
|
|
135
145
|
</Card.Footer>
|
|
136
146
|
</Card.Root>
|
|
137
147
|
</form>
|
|
138
|
-
</
|
|
148
|
+
</Page.Section>
|
|
139
149
|
|
|
140
|
-
<
|
|
150
|
+
<Page.Section
|
|
141
151
|
layout="aside"
|
|
142
152
|
label="Уведомления"
|
|
143
153
|
description="Включаются сразу, без сохранения."
|
|
@@ -158,9 +168,9 @@ export default function PageContentScreenExample() {
|
|
|
158
168
|
</Fieldset>
|
|
159
169
|
</Card.Body>
|
|
160
170
|
</Card.Root>
|
|
161
|
-
</
|
|
171
|
+
</Page.Section>
|
|
162
172
|
|
|
163
|
-
<
|
|
173
|
+
<Page.Section
|
|
164
174
|
layout="aside"
|
|
165
175
|
label="Рабочее пространство"
|
|
166
176
|
description="Действия, которые нельзя отменить."
|
|
@@ -189,8 +199,8 @@ export default function PageContentScreenExample() {
|
|
|
189
199
|
</div>
|
|
190
200
|
</Card.Body>
|
|
191
201
|
</Card.Root>
|
|
192
|
-
</
|
|
193
|
-
</
|
|
194
|
-
</
|
|
202
|
+
</Page.Section>
|
|
203
|
+
</Page.Body>
|
|
204
|
+
</Page.Root>
|
|
195
205
|
);
|
|
196
206
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/** A page with titled sections: tiles of one screen close together, a new topic set off by air, a link at the end of the heading, a heading column beside a panel — `
|
|
2
|
-
import {
|
|
3
|
-
Card,
|
|
4
|
-
DataTable,
|
|
5
|
-
type DataTableColumn,
|
|
6
|
-
LinkButton,
|
|
7
|
-
PageContent,
|
|
8
|
-
Typography,
|
|
9
|
-
} from "prime-ui-kit";
|
|
1
|
+
/** A page with titled sections: tiles of one screen close together, a new topic set off by air, a link at the end of the heading, a heading column beside a panel — `Page.Section`, `label`, `description`, `Page.Actions`, `layout`. */
|
|
2
|
+
import { Card, DataTable, type DataTableColumn, LinkButton, Page, Typography } from "prime-ui-kit";
|
|
10
3
|
|
|
11
4
|
import styles from "./examples.module.css";
|
|
12
5
|
|
|
@@ -36,33 +29,33 @@ const COLUMNS: DataTableColumn<Invoice>[] = [
|
|
|
36
29
|
},
|
|
37
30
|
];
|
|
38
31
|
|
|
39
|
-
export default function
|
|
32
|
+
export default function PageSectionsExample() {
|
|
40
33
|
return (
|
|
41
34
|
<div className={styles.main}>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
35
|
+
<Page.Body>
|
|
36
|
+
<Page.Grid>
|
|
37
|
+
<Page.Cell span={6}>
|
|
45
38
|
<Card.Root variant="stat-trend">
|
|
46
39
|
<Card.Label>Выставлено</Card.Label>
|
|
47
40
|
<Card.Value>2,4 млн ₽</Card.Value>
|
|
48
41
|
<Card.Delta tone="success">+9% к сентябрю</Card.Delta>
|
|
49
42
|
</Card.Root>
|
|
50
|
-
</
|
|
51
|
-
<
|
|
43
|
+
</Page.Cell>
|
|
44
|
+
<Page.Cell span={6}>
|
|
52
45
|
<Card.Root variant="stat-trend">
|
|
53
46
|
<Card.Label>Оплачено</Card.Label>
|
|
54
47
|
<Card.Value>1,9 млн ₽</Card.Value>
|
|
55
48
|
<Card.Delta tone="neutral">79% выставленного</Card.Delta>
|
|
56
49
|
</Card.Root>
|
|
57
|
-
</
|
|
58
|
-
</
|
|
59
|
-
<
|
|
60
|
-
<
|
|
50
|
+
</Page.Cell>
|
|
51
|
+
</Page.Grid>
|
|
52
|
+
<Page.Section label="Последние счета" description="Три последних за октябрь">
|
|
53
|
+
<Page.Actions>
|
|
61
54
|
<LinkButton href="#invoices">Все счета</LinkButton>
|
|
62
|
-
</
|
|
55
|
+
</Page.Actions>
|
|
63
56
|
<DataTable columns={COLUMNS} rows={INVOICES} getRowKey={(row) => row.id} paging="none" />
|
|
64
|
-
</
|
|
65
|
-
<
|
|
57
|
+
</Page.Section>
|
|
58
|
+
<Page.Section
|
|
66
59
|
layout="aside"
|
|
67
60
|
label="Реквизиты в счетах"
|
|
68
61
|
description="Попадают в каждый новый счёт."
|
|
@@ -74,8 +67,8 @@ export default function PageContentSectionsExample() {
|
|
|
74
67
|
</Typography>
|
|
75
68
|
</Card.Body>
|
|
76
69
|
</Card.Root>
|
|
77
|
-
</
|
|
78
|
-
</
|
|
70
|
+
</Page.Section>
|
|
71
|
+
</Page.Body>
|
|
79
72
|
</div>
|
|
80
73
|
);
|
|
81
74
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** A document page in the flow: the path over the large title, its line of data and the page's buttons beside them, then the body with a section — `Page.Header`, `Page.Heading`, `Page.Description`, `Page.Section`. */
|
|
2
|
+
import { Breadcrumb, Button, Card, Page, Typography } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
export default function PageStructureExample() {
|
|
7
|
+
return (
|
|
8
|
+
<div className={styles.main}>
|
|
9
|
+
<Page.Root>
|
|
10
|
+
<Page.Header>
|
|
11
|
+
<Page.Heading>
|
|
12
|
+
<Breadcrumb.Root>
|
|
13
|
+
<Breadcrumb.Item href="#settings">Настройки</Breadcrumb.Item>
|
|
14
|
+
</Breadcrumb.Root>
|
|
15
|
+
<Page.Title>Уведомления</Page.Title>
|
|
16
|
+
<Page.Description>
|
|
17
|
+
Письма и сообщения, которые получает команда продаж.
|
|
18
|
+
</Page.Description>
|
|
19
|
+
</Page.Heading>
|
|
20
|
+
<Page.Actions>
|
|
21
|
+
<Button.Root variant="soft" tone="neutral">
|
|
22
|
+
Сбросить
|
|
23
|
+
</Button.Root>
|
|
24
|
+
<Button.Root>Сохранить</Button.Root>
|
|
25
|
+
</Page.Actions>
|
|
26
|
+
</Page.Header>
|
|
27
|
+
<Page.Body>
|
|
28
|
+
<Page.Section label="Новые заказы" description="Сразу после оформления.">
|
|
29
|
+
<Card.Root variant="panel">
|
|
30
|
+
<Card.Body>
|
|
31
|
+
<Typography variant="body-m" tone="secondary">
|
|
32
|
+
Письмо ответственному менеджеру и сводка в канал отдела продаж.
|
|
33
|
+
</Typography>
|
|
34
|
+
</Card.Body>
|
|
35
|
+
</Card.Root>
|
|
36
|
+
</Page.Section>
|
|
37
|
+
</Page.Body>
|
|
38
|
+
</Page.Root>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|