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,192 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/** Cap of the page column inside `main`. */
|
|
3
|
-
export type PageContentMaxWidth = "full" | "readable" | "wide";
|
|
4
|
-
/** The element of the page column: a plain column, or a `<section>` that a heading names. */
|
|
5
|
-
export type PageContentRootAs = "div" | "section";
|
|
6
|
-
export type PageContentRootProps = React.HTMLAttributes<HTMLElement> & {
|
|
7
|
-
/**
|
|
8
|
-
* `section` — the whole app page as a region; name it with `aria-labelledby` → the Title `id`.
|
|
9
|
-
*/
|
|
10
|
-
as?: PageContentRootAs;
|
|
11
|
-
/**
|
|
12
|
-
* Cap of the column, centred: `full` — the whole main; `readable` — the reading measure `--prime-layout-reading-max-width` (42rem); `wide` — the content width `--prime-layout-content-max-width` (75rem).
|
|
13
|
-
*/
|
|
14
|
-
maxWidth?: PageContentMaxWidth;
|
|
15
|
-
/**
|
|
16
|
-
* The page takes the height of main (`AppShell.Root fillViewport`) and the body takes what the header leaves: for a full-height table, board, chat or `PageContent.Split`.
|
|
17
|
-
*/
|
|
18
|
-
fill?: boolean;
|
|
19
|
-
ref?: React.Ref<HTMLElement>;
|
|
20
|
-
};
|
|
21
|
-
declare function PageContentRoot({ as: Tag, maxWidth, fill, className, ref, ...rest }: PageContentRootProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
declare namespace PageContentRoot {
|
|
23
|
-
var displayName: string;
|
|
24
|
-
}
|
|
25
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
26
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
27
|
-
};
|
|
28
|
-
export type PageContentActionsProps = DivProps;
|
|
29
|
-
/** Page-level actions (buttons) next to the title; wrap below the heading on narrow columns. */
|
|
30
|
-
declare function PageContentActions({ className, ...rest }: PageContentActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
declare namespace PageContentActions {
|
|
32
|
-
var displayName: string;
|
|
33
|
-
}
|
|
34
|
-
export type PageContentHeaderProps = DivProps;
|
|
35
|
-
/** Title and description stack on the left; `PageContent.Actions` children go to the end. */
|
|
36
|
-
declare function PageContentHeader({ className, children, ...rest }: PageContentHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
declare namespace PageContentHeader {
|
|
38
|
-
var displayName: string;
|
|
39
|
-
}
|
|
40
|
-
export type PageContentTitleProps = React.HTMLAttributes<HTMLHeadingElement> & {
|
|
41
|
-
ref?: React.Ref<HTMLHeadingElement>;
|
|
42
|
-
};
|
|
43
|
-
declare function PageContentTitle({ className, ...rest }: PageContentTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
declare namespace PageContentTitle {
|
|
45
|
-
var displayName: string;
|
|
46
|
-
}
|
|
47
|
-
export type PageContentDescriptionMeasure = "readable" | "full";
|
|
48
|
-
export type PageContentDescriptionProps = React.HTMLAttributes<HTMLParagraphElement> & {
|
|
49
|
-
/**
|
|
50
|
-
* `readable` — no wider than the reading measure `--prime-layout-reading-max-width` (42rem); `full` — the full width of the parent.
|
|
51
|
-
*/
|
|
52
|
-
measure?: PageContentDescriptionMeasure;
|
|
53
|
-
ref?: React.Ref<HTMLParagraphElement>;
|
|
54
|
-
};
|
|
55
|
-
declare function PageContentDescription({ className, measure, ...rest }: PageContentDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
declare namespace PageContentDescription {
|
|
57
|
-
var displayName: string;
|
|
58
|
-
}
|
|
59
|
-
export type PageContentBodyProps = DivProps;
|
|
60
|
-
declare function PageContentBody({ className, ...rest }: PageContentBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
-
declare namespace PageContentBody {
|
|
62
|
-
var displayName: string;
|
|
63
|
-
}
|
|
64
|
-
/** Where the heading of a section stands: over its content or in a column beside it. */
|
|
65
|
-
export type PageContentSectionLayout = "stack" | "aside";
|
|
66
|
-
export type PageContentSectionProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
67
|
-
/**
|
|
68
|
-
* The visible heading (`h2`); it also names the section.
|
|
69
|
-
*/
|
|
70
|
-
label: React.ReactNode;
|
|
71
|
-
/**
|
|
72
|
-
* One line of context under the heading, in secondary body-s.
|
|
73
|
-
*/
|
|
74
|
-
description?: React.ReactNode;
|
|
75
|
-
/**
|
|
76
|
-
* `stack` — the heading over the content; `aside` — a ~16rem heading column beside it (a settings page), above it once the content would get narrower than 30rem.
|
|
77
|
-
*/
|
|
78
|
-
layout?: PageContentSectionLayout;
|
|
79
|
-
ref?: React.Ref<HTMLElement>;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* A titled section of the page: an `h2` heading (with an optional description and
|
|
83
|
-
* `PageContent.Actions` at its end) over its content. Sections stand further apart than the plain
|
|
84
|
-
* blocks of the body, so the air shows where a new topic starts.
|
|
85
|
-
*/
|
|
86
|
-
declare function PageContentSection({ label, description, layout, className, children, ...rest }: PageContentSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
87
|
-
declare namespace PageContentSection {
|
|
88
|
-
var displayName: string;
|
|
89
|
-
}
|
|
90
|
-
export type PageContentGridProps = DivProps;
|
|
91
|
-
/**
|
|
92
|
-
* The grid of the page's tiles (KPI cards, charts, panels): 12 columns, one gap on both axes.
|
|
93
|
-
* Columns follow the grid's own width, so tiles fold on a narrow panel by themselves.
|
|
94
|
-
*/
|
|
95
|
-
declare function PageContentGrid({ className, ...rest }: PageContentGridProps): import("react/jsx-runtime").JSX.Element;
|
|
96
|
-
declare namespace PageContentGrid {
|
|
97
|
-
var displayName: string;
|
|
98
|
-
}
|
|
99
|
-
/** Columns of 12 a cell spans on a wide grid. */
|
|
100
|
-
export type PageContentCellSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
101
|
-
/** Rows a cell spans. */
|
|
102
|
-
export type PageContentCellRows = 1 | 2 | 3 | 4;
|
|
103
|
-
export type PageContentCellProps = DivProps & {
|
|
104
|
-
/**
|
|
105
|
-
* Columns of 12 on a wide grid (64rem+). Narrower grids round it: see Grid columns in COMPONENT.md.
|
|
106
|
-
*/
|
|
107
|
-
span?: PageContentCellSpan;
|
|
108
|
-
/**
|
|
109
|
-
* Rows the cell spans from 40rem: a chart beside two stacked tiles (`ChartFrame.Plot height="fill"` fills the height).
|
|
110
|
-
*/
|
|
111
|
-
rows?: PageContentCellRows;
|
|
112
|
-
};
|
|
113
|
-
/** One tile place in `PageContent.Grid`; its child (a Card, a ChartFrame) fills it. */
|
|
114
|
-
declare function PageContentCell({ span, rows, className, ...rest }: PageContentCellProps): import("react/jsx-runtime").JSX.Element;
|
|
115
|
-
declare namespace PageContentCell {
|
|
116
|
-
var displayName: string;
|
|
117
|
-
}
|
|
118
|
-
export type PageContentLabels = {
|
|
119
|
-
/** Name of `PageContent.BackButton` (back from the detail to the list on a narrow split). */
|
|
120
|
-
back: string;
|
|
121
|
-
};
|
|
122
|
-
export declare const PAGE_CONTENT_LABELS: PageContentLabels;
|
|
123
|
-
export type PageContentSplitProps = DivProps & {
|
|
124
|
-
/**
|
|
125
|
-
* The detail is open (a record is chosen), controlled. On a narrow split it takes the place of the list; on a wide one both panes stay.
|
|
126
|
-
*/
|
|
127
|
-
open?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* Initial open state, uncontrolled.
|
|
130
|
-
*/
|
|
131
|
-
defaultOpen?: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* `PageContent.BackButton` closes the detail (`false`); clear the chosen record there.
|
|
134
|
-
*/
|
|
135
|
-
onOpenChange?: (open: boolean) => void;
|
|
136
|
-
/**
|
|
137
|
-
* Built-in strings, see Labels.
|
|
138
|
-
*/
|
|
139
|
-
labels?: Partial<PageContentLabels>;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* List + detail (mail, a messenger, a ticket queue): two panes side by side from 48rem of its own
|
|
143
|
-
* width, one at a time below it — the list, or the open detail with a back button. Takes the free
|
|
144
|
-
* height of a filling page; each pane gives its last child the free height.
|
|
145
|
-
*/
|
|
146
|
-
declare function PageContentSplit({ open: openProp, defaultOpen, onOpenChange, labels, className, children, ...rest }: PageContentSplitProps): import("react/jsx-runtime").JSX.Element;
|
|
147
|
-
declare namespace PageContentSplit {
|
|
148
|
-
var displayName: string;
|
|
149
|
-
}
|
|
150
|
-
/** Which pane of the split a panel is. */
|
|
151
|
-
export type PageContentPanelKind = "list" | "detail";
|
|
152
|
-
export type PageContentPanelProps = DivProps & {
|
|
153
|
-
/**
|
|
154
|
-
* `list` — the 16–20rem column, or the whole split while closed; going back refocuses its last control. `detail` — the rest, or the whole split while open; focus lands here when it opens.
|
|
155
|
-
*/
|
|
156
|
-
kind: PageContentPanelKind;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* A pane of the split. `list` — a fixed column on a wide split, the whole split while the detail
|
|
160
|
-
* is closed; it remembers the control that had focus, so going back returns there. `detail` — the
|
|
161
|
-
* rest of a wide split; on a narrow one it replaces the list while open.
|
|
162
|
-
*/
|
|
163
|
-
declare function PageContentPanel({ kind, className, ref, onFocus, onAnimationEnd, ...rest }: PageContentPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
164
|
-
declare namespace PageContentPanel {
|
|
165
|
-
var displayName: string;
|
|
166
|
-
}
|
|
167
|
-
export type PageContentBackButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children"> & {
|
|
168
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
169
|
-
};
|
|
170
|
-
/**
|
|
171
|
-
* Back from the detail to the list: a soft neutral icon Button named by `labels.back`, shown only
|
|
172
|
-
* while the split shows one pane. Put it at the start of the detail's header.
|
|
173
|
-
*/
|
|
174
|
-
declare function PageContentBackButton({ className, onClick, ...rest }: PageContentBackButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
175
|
-
declare namespace PageContentBackButton {
|
|
176
|
-
var displayName: string;
|
|
177
|
-
}
|
|
178
|
-
export declare const PageContent: {
|
|
179
|
-
Root: typeof PageContentRoot;
|
|
180
|
-
Header: typeof PageContentHeader;
|
|
181
|
-
Actions: typeof PageContentActions;
|
|
182
|
-
Title: typeof PageContentTitle;
|
|
183
|
-
Description: typeof PageContentDescription;
|
|
184
|
-
Body: typeof PageContentBody;
|
|
185
|
-
Section: typeof PageContentSection;
|
|
186
|
-
Grid: typeof PageContentGrid;
|
|
187
|
-
Cell: typeof PageContentCell;
|
|
188
|
-
Split: typeof PageContentSplit;
|
|
189
|
-
Panel: typeof PageContentPanel;
|
|
190
|
-
BackButton: typeof PageContentBackButton;
|
|
191
|
-
};
|
|
192
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type * as React from "react";
|
|
2
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
4
|
-
};
|
|
5
|
-
export type PageToolbarRootProps = DivProps;
|
|
6
|
-
/**
|
|
7
|
-
* The panel at the top of a page: search and filter, sections, view options and the primary
|
|
8
|
-
* action, with the active filters under the top row. It lays itself out from its own width — one
|
|
9
|
-
* row when wide, stacked rows when narrow — so the slots keep fixed places at any width. Parts may
|
|
10
|
-
* be left out; whatever the JSX order, the DOM (and Tab) order is Tools, Sections, View, Actions,
|
|
11
|
-
* Chips. Named (`aria-label`), it is a `group`.
|
|
12
|
-
*/
|
|
13
|
-
declare function PageToolbarRoot({ className, children, ref, ...rest }: PageToolbarRootProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare namespace PageToolbarRoot {
|
|
15
|
-
var displayName: string;
|
|
16
|
-
}
|
|
17
|
-
export type PageToolbarSectionsProps = DivProps;
|
|
18
|
-
/** Sections of the page — a `fullWidth` SegmentedControl; after the Tools when wide, a full row under the chips when narrow. */
|
|
19
|
-
declare function PageToolbarSections({ className, ...rest }: PageToolbarSectionsProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
declare namespace PageToolbarSections {
|
|
21
|
-
var displayName: string;
|
|
22
|
-
}
|
|
23
|
-
export type PageToolbarToolsProps = DivProps;
|
|
24
|
-
/** Search and filter button (`SmartFilter.Toolbar`): the first slot and the stretchy one; the Chips sit under the top row. */
|
|
25
|
-
declare function PageToolbarTools({ className, ...rest }: PageToolbarToolsProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
declare namespace PageToolbarTools {
|
|
27
|
-
var displayName: string;
|
|
28
|
-
}
|
|
29
|
-
export type PageToolbarViewProps = DivProps;
|
|
30
|
-
/** How the data is shown: period, table / cards, columns. Sized by content when wide; its own full row when narrow, its controls sharing it. */
|
|
31
|
-
declare function PageToolbarView({ className, ...rest }: PageToolbarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
declare namespace PageToolbarView {
|
|
33
|
-
var displayName: string;
|
|
34
|
-
}
|
|
35
|
-
export type PageToolbarActionsProps = DivProps;
|
|
36
|
-
/** The primary action of the page: the top row's end at every width, never wraps down. */
|
|
37
|
-
declare function PageToolbarActions({ className, ...rest }: PageToolbarActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
-
declare namespace PageToolbarActions {
|
|
39
|
-
var displayName: string;
|
|
40
|
-
}
|
|
41
|
-
export type PageToolbarChipsProps = DivProps;
|
|
42
|
-
/** Active filters (`SmartFilter.Chips`) in their own row under the top row; the row disappears when empty. */
|
|
43
|
-
declare function PageToolbarChips({ className, ...rest }: PageToolbarChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
declare namespace PageToolbarChips {
|
|
45
|
-
var displayName: string;
|
|
46
|
-
}
|
|
47
|
-
export declare const PageToolbar: {
|
|
48
|
-
Root: typeof PageToolbarRoot;
|
|
49
|
-
Sections: typeof PageToolbarSections;
|
|
50
|
-
Tools: typeof PageToolbarTools;
|
|
51
|
-
View: typeof PageToolbarView;
|
|
52
|
-
Actions: typeof PageToolbarActions;
|
|
53
|
-
Chips: typeof PageToolbarChips;
|
|
54
|
-
};
|
|
55
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* A vertical wheel over a strip that scrolls only sideways (`axis="horizontal"`) scrolls the strip:
|
|
4
|
-
* a mouse has no other way to reach what is hidden to the side. The browser's own sideways wheel
|
|
5
|
-
* (a trackpad swipe, Shift + wheel) stays native, and so does a page scroll that passes over the
|
|
6
|
-
* strip (a wheel gesture that began outside it keeps scrolling the page) or a strip already at the
|
|
7
|
-
* edge in that direction (the wheel chains to the page). The steps glide to an accumulated target
|
|
8
|
-
* (instant under reduced motion), so fast wheeling loses no distance.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useWheelToInline(ref: React.RefObject<HTMLElement | null>, enabled: boolean): void;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type DividerProps } from "../../components/divider/Divider";
|
|
3
|
-
export type AppHeaderLabels = {
|
|
4
|
-
/** Name of the menu button that opens the off-canvas Sidebar. */
|
|
5
|
-
menu: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const APP_HEADER_LABELS: AppHeaderLabels;
|
|
8
|
-
type HeaderProps = React.HTMLAttributes<HTMLElement> & {
|
|
9
|
-
ref?: React.Ref<HTMLElement>;
|
|
10
|
-
};
|
|
11
|
-
type DivProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
12
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
13
|
-
};
|
|
14
|
-
export type AppHeaderRootProps = HeaderProps & {
|
|
15
|
-
/**
|
|
16
|
-
* Built-in strings, see Labels.
|
|
17
|
-
*/
|
|
18
|
-
labels?: Partial<AppHeaderLabels>;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* The page's bar at the very top of the content panel: a title row as high as the Sidebar brand
|
|
22
|
-
* row (so the two read as one line) with only what the current page needs — the page title, the
|
|
23
|
-
* page's own buttons — and the page tools (`AppHeader.Tools`) as a second row under it. Sticky;
|
|
24
|
-
* lays itself out from its own width (narrow: the title icon goes, the title and its line of data
|
|
25
|
-
* truncate). Inside an `AppShell` a header the page renders moves into the shell's header row, and
|
|
26
|
-
* while the Sidebar is off-canvas the row starts with the menu button that opens it.
|
|
27
|
-
*/
|
|
28
|
-
declare function AppHeaderRoot(props: AppHeaderRootProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
declare namespace AppHeaderRoot {
|
|
30
|
-
var displayName: string;
|
|
31
|
-
}
|
|
32
|
-
export type AppHeaderStartProps = DivProps;
|
|
33
|
-
/** The leading zone: the menu button, a back button, the title or breadcrumbs. Takes the free width. */
|
|
34
|
-
declare function AppHeaderStart({ className, children, ...rest }: AppHeaderStartProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
declare namespace AppHeaderStart {
|
|
36
|
-
var displayName: string;
|
|
37
|
-
}
|
|
38
|
-
export type AppHeaderTitleProps = DivProps;
|
|
39
|
-
/**
|
|
40
|
-
* Where you are: an optional `AppHeader.Icon`, the name and an optional `AppHeader.Description`
|
|
41
|
-
* under it — the same anatomy as the Sidebar brand. The name is the page's `<h1>` (an app page
|
|
42
|
-
* titles itself in the header); the description stays outside the heading's name. The name
|
|
43
|
-
* truncates.
|
|
44
|
-
*/
|
|
45
|
-
declare function AppHeaderTitle({ className, children, ...rest }: AppHeaderTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
declare namespace AppHeaderTitle {
|
|
47
|
-
var displayName: string;
|
|
48
|
-
}
|
|
49
|
-
export type AppHeaderIconProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
50
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Decorative glyph before the title on a tile shaped like the bar's soft buttons (control m).
|
|
54
|
-
* Not a Thumbnail: its tiers (32 · 40) miss the control height the buttons beside it have.
|
|
55
|
-
*/
|
|
56
|
-
declare function AppHeaderIcon({ className, ...rest }: AppHeaderIconProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
declare namespace AppHeaderIcon {
|
|
58
|
-
var displayName: string;
|
|
59
|
-
}
|
|
60
|
-
export type AppHeaderDescriptionProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
61
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
62
|
-
};
|
|
63
|
-
/** Muted line of data under the title (a period, a count); on a narrow header it truncates. */
|
|
64
|
-
declare function AppHeaderDescription({ className, ...rest }: AppHeaderDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
-
declare namespace AppHeaderDescription {
|
|
66
|
-
var displayName: string;
|
|
67
|
-
}
|
|
68
|
-
export type AppHeaderSeparatorProps = Omit<DividerProps, "orientation" | "children" | "align" | "size" | "inset">;
|
|
69
|
-
/**
|
|
70
|
-
* A short vertical line between groups in a zone (a back button | the path), with air on both
|
|
71
|
-
* sides: the inset vertical Divider, one text line tall.
|
|
72
|
-
*/
|
|
73
|
-
declare function AppHeaderSeparator({ className, ...rest }: AppHeaderSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
-
declare namespace AppHeaderSeparator {
|
|
75
|
-
var displayName: string;
|
|
76
|
-
}
|
|
77
|
-
export type AppHeaderToolsProps = DivProps;
|
|
78
|
-
/**
|
|
79
|
-
* The page's tools in the header — a `PageToolbar.Root` (sections, period, filters, the primary
|
|
80
|
-
* action): the header's second row, the full width under the title row, so the toolbar lays
|
|
81
|
-
* itself out from that width (one row when wide, two when narrow). Root places it there wherever
|
|
82
|
-
* it is written — directly, in a fragment or inside a component of the page.
|
|
83
|
-
*/
|
|
84
|
-
declare function AppHeaderTools(props: AppHeaderToolsProps): import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
declare namespace AppHeaderTools {
|
|
86
|
-
var displayName: string;
|
|
87
|
-
}
|
|
88
|
-
export type AppHeaderActionsProps = DivProps;
|
|
89
|
-
/** Buttons at the end: one primary action, notifications, the account. Never wraps. */
|
|
90
|
-
declare function AppHeaderActions({ className, ...rest }: AppHeaderActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
91
|
-
declare namespace AppHeaderActions {
|
|
92
|
-
var displayName: string;
|
|
93
|
-
}
|
|
94
|
-
export type AppHeaderMenuButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children" | "aria-expanded" | "aria-controls"> & {
|
|
95
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Opens the off-canvas Sidebar of the shell: an icon button named by `labels.menu`, with
|
|
99
|
-
* `aria-expanded` and `aria-controls` from the shell. The bar draws one itself; this part moves it
|
|
100
|
-
* to another place in the header. Renders nothing while the Sidebar is a rail on screen, or
|
|
101
|
-
* outside a shell with a Sidebar.
|
|
102
|
-
*/
|
|
103
|
-
declare function AppHeaderMenuButton(props: AppHeaderMenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
104
|
-
declare namespace AppHeaderMenuButton {
|
|
105
|
-
var displayName: string;
|
|
106
|
-
}
|
|
107
|
-
export declare const AppHeader: {
|
|
108
|
-
Root: typeof AppHeaderRoot;
|
|
109
|
-
Start: typeof AppHeaderStart;
|
|
110
|
-
Title: typeof AppHeaderTitle;
|
|
111
|
-
Icon: typeof AppHeaderIcon;
|
|
112
|
-
Description: typeof AppHeaderDescription;
|
|
113
|
-
Separator: typeof AppHeaderSeparator;
|
|
114
|
-
Tools: typeof AppHeaderTools;
|
|
115
|
-
Actions: typeof AppHeaderActions;
|
|
116
|
-
MenuButton: typeof AppHeaderMenuButton;
|
|
117
|
-
};
|
|
118
|
-
export {};
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
# PageContent
|
|
2
|
-
|
|
3
|
-
**Category:** page
|
|
4
|
-
**Kind:** layout
|
|
5
|
-
|
|
6
|
-
> Page structure inside the main column: title, page actions and content blocks, titled sections and the tile grid of a dashboard; a page as high as the panel and the list + detail layout.
|
|
7
|
-
|
|
8
|
-
## When to use
|
|
9
|
-
- Every route rendered inside `AppShell.Main`: a page heading (`<h1>`), an intro line, page-level actions and the page body.
|
|
10
|
-
- A text page held to a reading measure (`PageContent.Root maxWidth="readable"`).
|
|
11
|
-
- A wide dashboard page capped at the content width (`maxWidth="wide"`).
|
|
12
|
-
- The tiles of a dashboard — KPI cards, charts, panels — as one board (`PageContent.Grid` + `PageContent.Cell`).
|
|
13
|
-
- A new topic of the page with its own heading and a link or button beside it (`PageContent.Section`); a settings page with a heading column beside each panel (`layout="aside"`).
|
|
14
|
-
- A page whose body takes the rest of the panel's height — a log table, a board, a chat (`fill`).
|
|
15
|
-
- Mail, a messenger, a ticket queue: a list and the chosen record side by side, one at a time on a narrow panel (`PageContent.Split`).
|
|
16
|
-
|
|
17
|
-
## When not to use
|
|
18
|
-
- The app frame (navigation rail, header, scrolling main column) → use [AppShell](../../layout/app-shell/COMPONENT.md).
|
|
19
|
-
- A bounded block inside the page → use [Card](../card/COMPONENT.md).
|
|
20
|
-
- An empty / error / not-found page → use [EmptyPage](../empty-page/COMPONENT.md).
|
|
21
|
-
- A heading inside a card → `Card.Title`; text headings inside prose → use [Typography](../typography/COMPONENT.md).
|
|
22
|
-
- A grid inside one block (thumbnails, fields, bars in a panel) → the block's own CSS grid; `PageContent.Grid` places the page's tiles.
|
|
23
|
-
- Details that open over the list and close again (a record from a table) → use [Drawer](../drawer/COMPONENT.md); `Split` is for a list people work through record by record.
|
|
24
|
-
|
|
25
|
-
## Import
|
|
26
|
-
```tsx
|
|
27
|
-
import { PageContent } from "prime-ui-kit";
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Anatomy
|
|
31
|
-
```
|
|
32
|
-
PageContent.Root column (<div>, or <section> with as="section"); maxWidth, fill
|
|
33
|
-
├─ PageContent.Header heading column + actions in one wrapping row
|
|
34
|
-
│ ├─ PageContent.Title <h1>, heading-m
|
|
35
|
-
│ ├─ PageContent.Description <p>, secondary body-m
|
|
36
|
-
│ └─ PageContent.Actions page buttons (moved to the end of the header row)
|
|
37
|
-
└─ PageContent.Body page content, blocks 24 apart
|
|
38
|
-
├─ PageContent.Grid 12-column tile grid, 16 on both axes; a container (prime-grid)
|
|
39
|
-
│ └─ PageContent.Cell one tile place: span, rows; its child fills it
|
|
40
|
-
├─ PageContent.Section <section> + <h2> label, 40 from its neighbours
|
|
41
|
-
│ └─ PageContent.Actions a link or button at the end of the section heading
|
|
42
|
-
└─ PageContent.Split list + detail; a container (prime-split)
|
|
43
|
-
├─ PageContent.Panel kind="list" list pane: 16–20rem column, or the whole split while closed
|
|
44
|
-
└─ PageContent.Panel kind="detail" detail pane: the rest, or the whole split while open
|
|
45
|
-
└─ PageContent.BackButton back to the list, only while one pane shows
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## API
|
|
49
|
-
|
|
50
|
-
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
51
|
-
|
|
52
|
-
### PageContent.Root
|
|
53
|
-
`ref` → `HTMLElement` (`<div>` or `<section>`). The page column inside `main`: header → body 24 apart, centred under its cap.
|
|
54
|
-
|
|
55
|
-
| Prop | Type | Default | Description |
|
|
56
|
-
|---|---|---|---|
|
|
57
|
-
| `as` | `"div" \| "section"` | `"div"` | `section` — the whole app page as a region; name it with `aria-labelledby` → the Title `id`. |
|
|
58
|
-
| `maxWidth` | `"full" \| "readable" \| "wide"` | `"full"` | Cap of the column, centred: `full` — the whole main; `readable` — the reading measure `--prime-layout-reading-max-width` (42rem); `wide` — the content width `--prime-layout-content-max-width` (75rem). |
|
|
59
|
-
| `fill` | `boolean` | `false` | The page takes the height of main (`AppShell.Root fillViewport`) and the body takes what the header leaves: for a full-height table, board, chat or `PageContent.Split`. |
|
|
60
|
-
| `…rest` | `HTMLAttributes<HTMLElement>` | — | `children` (Header, Body), `className` and the other attributes. |
|
|
61
|
-
|
|
62
|
-
### PageContent.Header
|
|
63
|
-
`ref` → `HTMLDivElement`. Heading column and page actions in one wrapping row; `PageContent.Actions` children move to the end.
|
|
64
|
-
|
|
65
|
-
| Prop | Type | Default | Description |
|
|
66
|
-
|---|---|---|---|
|
|
67
|
-
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` (Title, Description, Actions), `className` and the other div attributes. |
|
|
68
|
-
|
|
69
|
-
### PageContent.Title
|
|
70
|
-
`ref` → `HTMLHeadingElement`. The page `<h1>` in heading-m.
|
|
71
|
-
|
|
72
|
-
| Prop | Type | Default | Description |
|
|
73
|
-
|---|---|---|---|
|
|
74
|
-
| `…rest` | `HTMLAttributes<HTMLHeadingElement>` | — | `children`, `id`, `className` and the other heading attributes. |
|
|
75
|
-
|
|
76
|
-
### PageContent.Description
|
|
77
|
-
`ref` → `HTMLParagraphElement`. Intro `<p>` in secondary body-m.
|
|
78
|
-
|
|
79
|
-
| Prop | Type | Default | Description |
|
|
80
|
-
|---|---|---|---|
|
|
81
|
-
| `measure` | `"readable" \| "full"` | `"readable"` | `readable` — no wider than the reading measure `--prime-layout-reading-max-width` (42rem); `full` — the full width of the parent. |
|
|
82
|
-
| `…rest` | `HTMLAttributes<HTMLParagraphElement>` | — | `children`, `className` and the other paragraph attributes. |
|
|
83
|
-
|
|
84
|
-
### PageContent.Actions
|
|
85
|
-
`ref` → `HTMLDivElement`. Page-level buttons next to the title; they wrap under the heading on narrow columns.
|
|
86
|
-
|
|
87
|
-
| Prop | Type | Default | Description |
|
|
88
|
-
|---|---|---|---|
|
|
89
|
-
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` (Buttons), `className` and the other div attributes. |
|
|
90
|
-
|
|
91
|
-
### PageContent.Body
|
|
92
|
-
`ref` → `HTMLDivElement`. The page content: blocks of one screen 24 apart, a `PageContent.Section` 40 from its neighbours.
|
|
93
|
-
|
|
94
|
-
| Prop | Type | Default | Description |
|
|
95
|
-
|---|---|---|---|
|
|
96
|
-
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
|
|
97
|
-
|
|
98
|
-
### PageContent.Section
|
|
99
|
-
`ref` → `HTMLElement`. A titled section of the page — a `<section>` named by its `h2` (title-m): the heading with an optional description and `PageContent.Actions` at its end, then the content 16 below. Stands 40 from its neighbours in Body.
|
|
100
|
-
|
|
101
|
-
| Prop | Type | Default | Description |
|
|
102
|
-
|---|---|---|---|
|
|
103
|
-
| `label` | `ReactNode` | — (required) | The visible heading (`h2`); it also names the section. |
|
|
104
|
-
| `description` | `ReactNode` | — | One line of context under the heading, in secondary body-s. |
|
|
105
|
-
| `layout` | `"stack" \| "aside"` | `"stack"` | `stack` — the heading over the content; `aside` — a ~16rem heading column beside it (a settings page), above it once the content would get narrower than 30rem. |
|
|
106
|
-
| `…rest` | `Omit<HTMLAttributes<HTMLElement>, "title">` | — | `children` (the content; `PageContent.Actions` goes to the heading row), `className` and the other section attributes. |
|
|
107
|
-
|
|
108
|
-
### PageContent.Grid
|
|
109
|
-
`ref` → `HTMLDivElement`. The grid of the page's tiles (KPI cards, charts, panels): 12 columns, 16 apart on both axes, so its rows read as one board. A size container: cells fold by its own width (see Grid columns).
|
|
110
|
-
|
|
111
|
-
| Prop | Type | Default | Description |
|
|
112
|
-
|---|---|---|---|
|
|
113
|
-
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` (`PageContent.Cell`), `className` and the other div attributes. |
|
|
114
|
-
|
|
115
|
-
### PageContent.Cell
|
|
116
|
-
`ref` → `HTMLDivElement`. One tile place in `PageContent.Grid`; its child (a Card, a ChartFrame) stretches to it, so the tiles of a row share one height.
|
|
117
|
-
|
|
118
|
-
| Prop | Type | Default | Description |
|
|
119
|
-
|---|---|---|---|
|
|
120
|
-
| `span` | `1 \| 2 \| … \| 12` | `12` | Columns of 12 on a wide grid (64rem+). Narrower grids round it: see Grid columns in COMPONENT.md. |
|
|
121
|
-
| `rows` | `1 \| 2 \| 3 \| 4` | `1` | Rows the cell spans from 40rem: a chart beside two stacked tiles (`ChartFrame.Plot height="fill"` fills the height). |
|
|
122
|
-
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` (one tile), `className` and the other div attributes. |
|
|
123
|
-
|
|
124
|
-
### PageContent.Split
|
|
125
|
-
`ref` → `HTMLDivElement`. List + detail (mail, a messenger, a ticket queue): side by side from 48rem of its own width, one pane at a time below it, focus following the pane that comes into view.
|
|
126
|
-
|
|
127
|
-
| Prop | Type | Default | Description |
|
|
128
|
-
|---|---|---|---|
|
|
129
|
-
| `open` | `boolean` | — | The detail is open (a record is chosen), controlled. On a narrow split it takes the place of the list; on a wide one both panes stay. |
|
|
130
|
-
| `defaultOpen` | `boolean` | `false` | Initial open state, uncontrolled. |
|
|
131
|
-
| `onOpenChange` | `(open: boolean) => void` | — | `PageContent.BackButton` closes the detail (`false`); clear the chosen record there. |
|
|
132
|
-
| `labels` | `Partial<PageContentLabels>` | — | Built-in strings, see Labels. |
|
|
133
|
-
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children` (two `PageContent.Panel`s: `list`, then `detail`), `className` and the other div attributes. |
|
|
134
|
-
|
|
135
|
-
### PageContent.Panel
|
|
136
|
-
`ref` → `HTMLDivElement`. A pane of the split: a column whose last child takes the free height (a Card with its own ScrollContainer). Focusable from code (`tabindex=-1`, no ring).
|
|
137
|
-
|
|
138
|
-
| Prop | Type | Default | Description |
|
|
139
|
-
|---|---|---|---|
|
|
140
|
-
| `kind` | `"list" \| "detail"` | — (required) | `list` — the 16–20rem column, or the whole split while closed; going back refocuses its last control. `detail` — the rest, or the whole split while open; focus lands here when it opens. |
|
|
141
|
-
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `aria-label`, `className` and the other div attributes. |
|
|
142
|
-
|
|
143
|
-
### PageContent.BackButton
|
|
144
|
-
`ref` → `HTMLButtonElement`. Back from the detail to the list: a soft neutral icon Button (`nav.chevronLeft`) named by `labels.back`, shown only while the split shows one pane. Put it first in the detail's header; `event.preventDefault()` in `onClick` keeps the detail open.
|
|
145
|
-
|
|
146
|
-
| Prop | Type | Default | Description |
|
|
147
|
-
|---|---|---|---|
|
|
148
|
-
| `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" \| "children">` | — | `onClick`, `aria-label` (replaces `labels.back`), `className` and the other button attributes. |
|
|
149
|
-
|
|
150
|
-
## Variants
|
|
151
|
-
|
|
152
|
-
### maxWidth (Root)
|
|
153
|
-
| Value | Looks like | Use when | Default |
|
|
154
|
-
|---|---|---|---|
|
|
155
|
-
| `full` | Column fills the main area | App pages, tables, dashboards in a padded main | yes |
|
|
156
|
-
| `readable` | Column capped at `--prime-layout-reading-max-width` (42rem), centred | Terms, articles, help pages | |
|
|
157
|
-
| `wide` | Column capped at `--prime-layout-content-max-width` (75rem), centred | Wide screens where content should not stretch edge to edge | |
|
|
158
|
-
|
|
159
|
-
### measure (Description)
|
|
160
|
-
| Value | Looks like | Use when | Default |
|
|
161
|
-
|---|---|---|---|
|
|
162
|
-
| `readable` | Intro line wraps at the reading width | Default, most pages | yes |
|
|
163
|
-
| `full` | Intro uses the full header width | The column is already narrow | |
|
|
164
|
-
|
|
165
|
-
One `PageContent.Title` (`<h1>`) per page; a topic inside Body is a `PageContent.Section` (its `h2`). One primary button in Actions, the rest `soft` / `ghost` neutral.
|
|
166
|
-
|
|
167
|
-
### Flags
|
|
168
|
-
| Flag | Looks like when on | Use when | Default |
|
|
169
|
-
|---|---|---|---|
|
|
170
|
-
| `fill` (Root) | the page is as high as main; the body takes what the header leaves; main keeps gutter-high air under it | a full-height table, board, chat or `PageContent.Split` in an `AppShell.Root fillViewport` | `false` |
|
|
171
|
-
|
|
172
|
-
### layout (Section)
|
|
173
|
-
| Value | Looks like | Use when | Default |
|
|
174
|
-
|---|---|---|---|
|
|
175
|
-
| `stack` | the heading row over the content, 16 apart | a topic of a dashboard, a list or a detail page | ✓ |
|
|
176
|
-
| `aside` | a ~16rem heading column beside the content, above it once the content would get < 30rem | a settings page: a heading column beside each panel | |
|
|
177
|
-
|
|
178
|
-
### Grid columns
|
|
179
|
-
| Grid width | Cell `span` 1–3 | `span` 4 | `span` 5–6 | `span` 7–12 | `rows` |
|
|
180
|
-
|---|---|---|---|---|---|
|
|
181
|
-
| < 30rem | the row | the row | the row | the row | — |
|
|
182
|
-
| 30–40rem | half | the row | the row | the row | — |
|
|
183
|
-
| 40–64rem | half | a third | half | the row | spans |
|
|
184
|
-
| ≥ 64rem | its span | its span | its span | its span | spans |
|
|
185
|
-
|
|
186
|
-
### Split layout
|
|
187
|
-
| Value | Looks like | Use when | Default |
|
|
188
|
-
|---|---|---|---|
|
|
189
|
-
| wide (from 48rem of the split's width) | list in a 16–20rem column, detail beside it, 24 apart; no back button | desktops, tablets in landscape | — |
|
|
190
|
-
| narrow (below 48rem) | one pane: the list, or the open detail with `PageContent.BackButton` | phones, a narrow panel next to an open Sidebar | — |
|
|
191
|
-
|
|
192
|
-
## States
|
|
193
|
-
| State | Driven by | DOM |
|
|
194
|
-
|---|---|---|
|
|
195
|
-
| capped column | `maxWidth` | `data-max-width="readable" \| "wide"` on Root (absent for `full`) |
|
|
196
|
-
| filling | `fill` | `data-fill="true"` on Root; `AppShell.Main` drops its long bottom air for it |
|
|
197
|
-
| full-width intro | `measure="full"` | `data-measure="full"` on Description |
|
|
198
|
-
| with actions | `PageContent.Actions` child | `data-has-actions="true"` on Header |
|
|
199
|
-
| section heading column | `layout="aside"` on Section | `data-layout="aside"` on Section (absent for `stack`) |
|
|
200
|
-
| section with actions | `PageContent.Actions` child of Section | `data-has-actions="true"` on the section heading row |
|
|
201
|
-
| tile span | `span` / `rows` on Cell | `data-span="1"…"12"` (always), `data-rows="2"…"4"` (absent for 1) |
|
|
202
|
-
| detail open | `open` / `defaultOpen` on Split | `data-open="true"` on Split; narrow: the list is `display: none`, else the detail is |
|
|
203
|
-
| pane swap | `open` changes on a narrow split | the pane that comes into view enters once (`enterMotion.enterBase`: base, opacity + a 4 px rise); focus moves into the detail, or back to the list control; a wide split moves nothing |
|
|
204
|
-
|
|
205
|
-
## Layout & spacing
|
|
206
|
-
- No outer padding: edge gutters come from `AppShell.Main`.
|
|
207
|
-
- Header → Body `--prime-space-6` (24); blocks inside Body `--prime-space-6` (24); a `PageContent.Section` 40 from its neighbours (the body's 24 + `--prime-space-4`); tile → tile in a Grid `--prime-space-4` (16) on both axes; section heading → content `--prime-space-4` (16), heading → description `--prime-space-1` (4); Title → Description `--prime-space-2` (8); buttons in Actions `--prime-space-2`; heading → Actions `--prime-space-6` (24) side by side, `--prime-space-4` (16) once they wrap below.
|
|
208
|
-
- Header is a wrapping row: actions stay to the right of the title while the heading keeps half a reading measure, otherwise they wrap below it — no breakpoint needed, works from 320px.
|
|
209
|
-
- Title and Description wrap long words (`overflow-wrap: anywhere`).
|
|
210
|
-
- Grid lays itself out from its own width (container `prime-grid`), never from the window, so a board beside an open Sidebar folds on its own. A Cell stretches its child: the tiles of a row share one height; a chart in a `rows={2}` cell fills it with `ChartFrame.Plot height="fill"`. `dense` flow lets a small tile fill a hole left by a wide one.
|
|
211
|
-
- `fill` needs a main with a height: `AppShell.Root fillViewport` (main scrolls inside the panel). The body passes its free height on to a filling child — DataTable `scrollHeight="fill"`, Crossfade `fill`, `PageContent.Split`.
|
|
212
|
-
- Split takes the free height of a filling page and lays itself out from its own width (container `prime-split`), never from the window: a split beside an open Sidebar may be narrow on a wide screen. Each pane is a column whose last child takes the free height — put a Card with its own `ScrollContainer` there, so the list and the thread scroll separately. The records of the list pane are a [List](../list/COMPONENT.md).
|
|
213
|
-
- The detail pane is on screen all the time on a wide split: while nothing is chosen it shows a short hint («Выберите обращение»), never an empty card. A newly chosen record cross-fades in (`Crossfade` keyed by its id).
|
|
214
|
-
|
|
215
|
-
## Accessibility
|
|
216
|
-
|
|
217
|
-
### Keyboard
|
|
218
|
-
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
219
|
-
|
|
220
|
-
| Key | Action |
|
|
221
|
-
|---|---|
|
|
222
|
-
| `Enter` · `Space` | On `PageContent.BackButton`: back from the detail to the list; focus returns to the list control that opened it. |
|
|
223
|
-
|
|
224
|
-
### ARIA
|
|
225
|
-
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
226
|
-
|
|
227
|
-
- `PageContent.Title` is an `<h1>`; use one per page.
|
|
228
|
-
- Give `PageContent.Root as="section"` an `aria-labelledby` that points at the Title `id` to name the region.
|
|
229
|
-
- `PageContent.Section` is a `<section>` named by its own `<h2>` (`label`) through `aria-labelledby`, so it is a region landmark with the heading's name; the heading levels go h1 (page) → h2 (section) → h3 (a card title inside it).
|
|
230
|
-
- Name both `PageContent.Panel`s with `aria-label`: a named pane is `role="region"`, a landmark. On a narrow split opening the detail moves focus into it and going back returns focus to the list control; the hidden pane is `display: none`, out of Tab and the accessibility tree. The panes take focus from code only (`tabindex="-1"`, no ring).
|
|
231
|
-
- `PageContent.BackButton` is named by `labels.back` and is shown only while the split shows one pane.
|
|
232
|
-
|
|
233
|
-
### Labels
|
|
234
|
-
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
235
|
-
|
|
236
|
-
| Key | Default | Used for |
|
|
237
|
-
|---|---|---|
|
|
238
|
-
| `back` | `"Назад к списку"` | Name of `PageContent.BackButton` (on `PageContent.Split`). |
|
|
239
|
-
|
|
240
|
-
## Examples
|
|
241
|
-
| Example | Shows |
|
|
242
|
-
|---|---|
|
|
243
|
-
| [overview.tsx](examples/overview.tsx) | A page in the main column: title, description and page actions, then the body blocks — `PageContent.Actions`. |
|
|
244
|
-
| [variants.tsx](examples/variants.tsx) | The same page column at three caps: the whole main, a wide dashboard column, a reading column — `maxWidth`. |
|
|
245
|
-
| [grid.tsx](examples/grid.tsx) | A dashboard board: four KPI tiles, a chart two rows high beside two panels, one gap on both axes — `PageContent.Grid`, `PageContent.Cell`, `span`, `rows`. |
|
|
246
|
-
| [sections.tsx](examples/sections.tsx) | A page with titled sections: tiles of one screen close together, a new topic set off by air, a link at the end of the heading, a heading column beside a panel — `PageContent.Section`, `label`, `description`, `PageContent.Actions`, `layout`. |
|
|
247
|
-
| [list-detail.tsx](examples/list-detail.tsx) | 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 — `PageContent.Split`, `PageContent.Panel`, `PageContent.BackButton`, `fill`. |
|
|
248
|
-
| [narrow.tsx](examples/narrow.tsx) | In a phone-width column the page actions wrap under the heading instead of squeezing it — `PageContent.Actions`. |
|
|
249
|
-
| [screen.tsx](examples/screen.tsx) | A settings page: sections with a heading column and a panel, a form saved by its own button, switches that apply at once and a danger zone with a confirm — `layout`, `maxWidth`. |
|
|
250
|
-
|
|
251
|
-
## Mistakes
|
|
252
|
-
- Padding on `PageContent.Root` to imitate gutters → gutters come from `AppShell.Main`.
|
|
253
|
-
- Actions placed outside Header → put `PageContent.Actions` inside `PageContent.Header` so it aligns with the title and wraps.
|
|
254
|
-
- Several `PageContent.Title` on one page → one `<h1>`; a topic of the page is a `PageContent.Section` with its `<h2>`.
|
|
255
|
-
- A hand-made `<section>` + `Typography as="h2"` + own gap CSS → `PageContent.Section label`.
|
|
256
|
-
- Each row of cards in its own grid → the rows stand 24 apart instead of 16; put every tile of the screen in one `PageContent.Grid`.
|
|
257
|
-
- Margins between blocks in Body → Body already sets the 24 gap and the 40 around a Section.
|
|
258
|
-
- Computing a height from `100vh` minus the header for a full-height table or chat → `PageContent.Root fill` and a filling child.
|
|
259
|
-
- A list + detail built with window media queries → `PageContent.Split` follows its own width.
|
|
260
|
-
- Unmounting the detail content the moment the narrow split goes back → keep the last record until another is chosen (the pane leaves with it on screen).
|
|
261
|
-
|
|
262
|
-
## Related
|
|
263
|
-
- **Built from:** [Button](../button/COMPONENT.md) (`PageContent.BackButton`), Icon (`nav.chevronLeft`)
|
|
264
|
-
- **See also:** [AppShell](../../layout/app-shell/COMPONENT.md), [Sidebar](../../layout/sidebar/COMPONENT.md), [Card](../card/COMPONENT.md), [ChartFrame](../chart-frame/COMPONENT.md), [List](../list/COMPONENT.md), [EmptyPage](../empty-page/COMPONENT.md), [ScrollContainer](../scroll-container/COMPONENT.md), [Drawer](../drawer/COMPONENT.md)
|