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
package/dist/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Accordion,
|
|
5
|
-
AppHeader,
|
|
6
5
|
AppShell,
|
|
7
6
|
Banner,
|
|
8
7
|
BottomNav,
|
|
@@ -43,11 +42,11 @@ import {
|
|
|
43
42
|
NativeSelect,
|
|
44
43
|
NotificationCard,
|
|
45
44
|
NotificationProvider,
|
|
46
|
-
|
|
47
|
-
PageToolbar,
|
|
45
|
+
Page,
|
|
48
46
|
Pagination,
|
|
49
47
|
ProgressCircle,
|
|
50
48
|
Radio,
|
|
49
|
+
RichText,
|
|
51
50
|
SegmentedControl,
|
|
52
51
|
Sheet,
|
|
53
52
|
Sidebar,
|
|
@@ -88,7 +87,7 @@ import {
|
|
|
88
87
|
useSidebar,
|
|
89
88
|
useTokenValue,
|
|
90
89
|
useUploadQueue
|
|
91
|
-
} from "./chunks/chunk-
|
|
90
|
+
} from "./chunks/chunk-MB4CXSLL.js";
|
|
92
91
|
import {
|
|
93
92
|
Avatar,
|
|
94
93
|
Badge,
|
|
@@ -123,14 +122,13 @@ import {
|
|
|
123
122
|
tierMappings,
|
|
124
123
|
tones,
|
|
125
124
|
variants
|
|
126
|
-
} from "./chunks/chunk-
|
|
125
|
+
} from "./chunks/chunk-OAXJWF3L.js";
|
|
127
126
|
import {
|
|
128
127
|
ControlSizeProvider,
|
|
129
128
|
useOptionalControlSize
|
|
130
|
-
} from "./chunks/chunk-
|
|
129
|
+
} from "./chunks/chunk-QFHE5GKW.js";
|
|
131
130
|
export {
|
|
132
131
|
Accordion,
|
|
133
|
-
AppHeader,
|
|
134
132
|
AppShell,
|
|
135
133
|
Avatar,
|
|
136
134
|
Badge,
|
|
@@ -185,13 +183,13 @@ export {
|
|
|
185
183
|
NotificationCard,
|
|
186
184
|
NotificationProvider,
|
|
187
185
|
OVERLAY_CONTENT_SIZE,
|
|
188
|
-
|
|
189
|
-
PageToolbar,
|
|
186
|
+
Page,
|
|
190
187
|
Pagination,
|
|
191
188
|
Popover,
|
|
192
189
|
ProgressBar,
|
|
193
190
|
ProgressCircle,
|
|
194
191
|
Radio,
|
|
192
|
+
RichText,
|
|
195
193
|
ScrollContainer,
|
|
196
194
|
SegmentedControl,
|
|
197
195
|
Select,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { HintTone } from "../components/hint/Hint";
|
|
2
3
|
import { type FieldIds } from "./FieldFrame";
|
|
3
4
|
import type { CheckState, ControlSize } from "./states";
|
|
4
5
|
/** Class of the visually hidden native input that sits on top of the visual control. */
|
|
@@ -38,13 +39,14 @@ type ChoiceFieldProps = {
|
|
|
38
39
|
*/
|
|
39
40
|
groupOption?: boolean;
|
|
40
41
|
hint?: React.ReactNode;
|
|
42
|
+
hintTone?: HintTone;
|
|
41
43
|
error?: React.ReactNode;
|
|
42
44
|
/** The native input (with `choiceInputClass`) followed by its aria-hidden visual. */
|
|
43
45
|
control: React.ReactNode;
|
|
44
46
|
className?: string;
|
|
45
47
|
children?: React.ReactNode;
|
|
46
48
|
};
|
|
47
|
-
export declare function ChoiceField({ ids, size, state, disabled, readOnly, busy, required, optional, optionalLabel, groupOption, hint, error, control, className, children, }: ChoiceFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare function ChoiceField({ ids, size, state, disabled, readOnly, busy, required, optional, optionalLabel, groupOption, hint, hintTone, error, control, className, children, }: ChoiceFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
48
50
|
export type ChoiceLabelProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
49
51
|
ref?: React.Ref<HTMLSpanElement>;
|
|
50
52
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type HintTone } from "../components/hint/Hint";
|
|
2
3
|
import type { ControlSize } from "./states";
|
|
3
4
|
/** Field props shared by every framed field (the same contract as `Input.Root`). */
|
|
4
5
|
export type FieldFrameProps = {
|
|
@@ -18,6 +19,10 @@ export type FieldFrameProps = {
|
|
|
18
19
|
* Support text under the field; linked by `aria-describedby`.
|
|
19
20
|
*/
|
|
20
21
|
hint?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Status color of `hint` («Осталось 12 дней» in `warning`). The words carry the status, the color repeats it; an `error` replaces the hint and its tone. A validation error is `error`, never a `danger` hint.
|
|
24
|
+
*/
|
|
25
|
+
hintTone?: HintTone;
|
|
21
26
|
/**
|
|
22
27
|
* Error message; replaces the hint and implies `invalid`.
|
|
23
28
|
*/
|
|
@@ -121,10 +126,11 @@ export declare function useLeavingError(showError: boolean, error: React.ReactNo
|
|
|
121
126
|
* changes is read, an error the field mounts with is read with the field (`aria-describedby`).
|
|
122
127
|
* An option of a group (`live={false}`) leaves the announcement to the group.
|
|
123
128
|
*/
|
|
124
|
-
export declare function FieldSupport({ ids, size, hint, error, leaving, disabled, live, className, textClassName, }: {
|
|
129
|
+
export declare function FieldSupport({ ids, size, hint, hintTone, error, leaving, disabled, live, className, textClassName, }: {
|
|
125
130
|
ids: FieldIds;
|
|
126
131
|
size: ControlSize;
|
|
127
132
|
hint?: React.ReactNode;
|
|
133
|
+
hintTone?: HintTone;
|
|
128
134
|
error?: React.ReactNode;
|
|
129
135
|
/** The error leaving the slot: the frame's `useLeavingError`. */
|
|
130
136
|
leaving: FieldLeavingError | null;
|
|
@@ -166,7 +172,7 @@ type FieldFrameRenderProps = FieldFrameProps & {
|
|
|
166
172
|
* spaced by the tier's `--field-label-gap` / `--field-hint-gap`. The support row stays mounted
|
|
167
173
|
* (empty and without room when it shows nothing), so its text slot is a polite live region.
|
|
168
174
|
*/
|
|
169
|
-
export declare function FieldFrame({ size, ids, label, required, optional, hint, error, disabled, optionalLabel, requiredLabel, group, labelEnd, counter, reserveSupportRow, className, children, ...rest }: FieldFrameRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
175
|
+
export declare function FieldFrame({ size, ids, label, required, optional, hint, hintTone, error, disabled, optionalLabel, requiredLabel, group, labelEnd, counter, reserveSupportRow, className, children, ...rest }: FieldFrameRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
170
176
|
type FieldCounterProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
171
177
|
current: number;
|
|
172
178
|
max: number;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The layout plan of a page's top bar: which of its steps the row takes at a given width. One
|
|
3
|
+
* pure function of widths measured at their natural size, so a plan never feeds back into the
|
|
4
|
+
* widths it was chosen from (no re-measure loop).
|
|
5
|
+
*
|
|
6
|
+
* The steps, in the order the row gives way:
|
|
7
|
+
* - `one` — heading · tools · actions on one line;
|
|
8
|
+
* - `below` — the tools move to a line of their own under the heading and the actions;
|
|
9
|
+
* - `icons-secondary` — the secondary buttons show only their icons;
|
|
10
|
+
* - `icons` — the primary button too;
|
|
11
|
+
* - `fold` — the secondary buttons fold into «⋯» (only when that is narrower than their icons).
|
|
12
|
+
*
|
|
13
|
+
* Past the last step a heading with a path stacks (`stackHeading`): the path over the title, the
|
|
14
|
+
* title and the description wrapping, so no line of it is cut to a fragment. Without a path the
|
|
15
|
+
* heading truncates.
|
|
16
|
+
*/
|
|
17
|
+
export type BarPlan = "one" | "below" | "icons-secondary" | "icons" | "fold";
|
|
18
|
+
/** One item of the actions: a primary or secondary Button, or anything else (never folds). */
|
|
19
|
+
export type BarAction = {
|
|
20
|
+
role: "primary" | "secondary" | "other";
|
|
21
|
+
/** Natural width with its label. */
|
|
22
|
+
full: number;
|
|
23
|
+
/** Width as its icon alone; `null` — it has no icon and keeps its label. */
|
|
24
|
+
icon: number | null;
|
|
25
|
+
};
|
|
26
|
+
export type BarWidths = {
|
|
27
|
+
/** Natural width of the heading (its widest line); 0 — none. */
|
|
28
|
+
heading: number;
|
|
29
|
+
/** Whether the heading starts with a path (a Breadcrumb before the title): it can stack. */
|
|
30
|
+
path: boolean;
|
|
31
|
+
/** Natural width of the tools on one line; 0 — none. */
|
|
32
|
+
tools: number;
|
|
33
|
+
actions: BarAction[];
|
|
34
|
+
/** Width of the «⋯» button. */
|
|
35
|
+
more: number;
|
|
36
|
+
/** Gap between the heading, the tools and the actions. */
|
|
37
|
+
gap: number;
|
|
38
|
+
/** Gap between two actions. */
|
|
39
|
+
actionGap: number;
|
|
40
|
+
};
|
|
41
|
+
/** The first plan whose first line fits `available`; the narrowest of `icons` and `fold` when none does. */
|
|
42
|
+
export declare function planBar(widths: BarWidths, available: number): BarPlan;
|
|
43
|
+
/** Whether the heading stacks at `plan`: it has a path and its one line still does not fit. */
|
|
44
|
+
export declare function stackHeading(widths: BarWidths, available: number, plan: BarPlan): boolean;
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
* a framed field without a `label` of its own takes it as its label (and keeps its own `label`, if
|
|
5
5
|
* any), so every field in a row has a name without a visible label per row. The column heading
|
|
6
6
|
* shows the name once above the rows; the field's label is read, not shown, until the list stacks
|
|
7
|
-
* its rows into blocks in a narrow container (the
|
|
7
|
+
* its rows into blocks in a narrow container (the size container of the FieldList body),
|
|
8
8
|
* where each field shows it.
|
|
9
9
|
*/
|
|
10
10
|
export type FieldCell = {
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
/** A media position or length: `m:ss`, `h:mm:ss` from an hour on. */
|
|
2
2
|
export declare function formatClock(seconds: number): string;
|
|
3
|
-
/** A
|
|
4
|
-
|
|
3
|
+
/** A calendar day: the month 0–11, as `Date#getMonth`. */
|
|
4
|
+
type CalendarDay = {
|
|
5
|
+
year: number;
|
|
6
|
+
month: number;
|
|
7
|
+
day: number;
|
|
8
|
+
};
|
|
9
|
+
/** The calendar day and the clock of a moment as a time zone reads it. */
|
|
10
|
+
type ZonedParts = CalendarDay & {
|
|
11
|
+
/** 0 (Sunday) – 6, as `Date#getDay`. */
|
|
12
|
+
weekday: number;
|
|
13
|
+
hours: number;
|
|
14
|
+
minutes: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The day and the clock of `date` in `timeZone` (an IANA name, `"Asia/Vladivostok"`); without one,
|
|
18
|
+
* in the browser's zone.
|
|
19
|
+
*/
|
|
20
|
+
export declare function zonedParts(date: Date, timeZone?: string): ZonedParts;
|
|
21
|
+
/** Whole calendar days from `from` to `to` (both read in one zone); never off by a DST hour. */
|
|
22
|
+
export declare function daysBetween(from: CalendarDay, to: CalendarDay): number;
|
|
23
|
+
/** A time of day: `HH:mm`, 24-hour, in `timeZone` or the browser's zone («09:05»). */
|
|
24
|
+
export declare function formatTimeOfDay(date: Date, timeZone?: string): string;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** What holds a page: a request runs (`busy`), changes are not saved (`dirty`). */
|
|
3
|
+
type LeaveGuardState = {
|
|
4
|
+
busy: boolean;
|
|
5
|
+
dirty: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The `onClickCapture` of a navigation item (`Sidebar.Item`, `BottomNav.Item`, a `Breadcrumb.Item`
|
|
9
|
+
* level), chained before the consumer's own. While a page guard holds, the click stops before any
|
|
10
|
+
* handler of the item or of its router link runs and before the browser follows `href`: `busy`
|
|
11
|
+
* holds it, `dirty` asks the guard's confirm, which replays the click once the person agrees.
|
|
12
|
+
* Router-agnostic: the replay is the same click. A click that opens a new tab or window, or one on
|
|
13
|
+
* a disabled item, is never held.
|
|
14
|
+
*/
|
|
15
|
+
export declare function leaveGuardCapture(onClickCapture?: React.MouseEventHandler<HTMLElement>): React.MouseEventHandler<HTMLElement>;
|
|
16
|
+
/**
|
|
17
|
+
* Registers a page guard while mounted: the navigation items ask it through `holdLeave`, and while
|
|
18
|
+
* it is `busy` or `dirty` the browser asks before the tab closes or reloads (`beforeunload`).
|
|
19
|
+
*/
|
|
20
|
+
export declare function useLeaveGuard({ busy, dirty }: LeaveGuardState, ask: (leave: () => void) => void): void;
|
|
21
|
+
export {};
|
|
@@ -66,6 +66,8 @@ export type MessageListContextValue = {
|
|
|
66
66
|
reactionOptions: readonly MessageReactionOption[] | null;
|
|
67
67
|
/** The reader: joins a reaction's avatars at once when they put it. */
|
|
68
68
|
reader: MessageUser | undefined;
|
|
69
|
+
/** The zone a message reads its time in; `undefined` — the browser's zone. */
|
|
70
|
+
timeZone: string | undefined;
|
|
69
71
|
/** Says `text` in the list's polite live region. */
|
|
70
72
|
announce: (text: string) => void;
|
|
71
73
|
};
|
|
@@ -188,6 +188,27 @@ export declare function DialogBody({ className, ...rest }: DialogBodyProps): imp
|
|
|
188
188
|
export declare namespace DialogBody {
|
|
189
189
|
var displayName: string;
|
|
190
190
|
}
|
|
191
|
+
export type DialogSectionProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
192
|
+
/**
|
|
193
|
+
* The heading of the section; it names the `<section>`.
|
|
194
|
+
*/
|
|
195
|
+
label: React.ReactNode;
|
|
196
|
+
/**
|
|
197
|
+
* One line of context under the heading (body-s).
|
|
198
|
+
*/
|
|
199
|
+
description?: React.ReactNode;
|
|
200
|
+
ref?: React.Ref<HTMLElement>;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* A titled group of the dialog body — what `Page.Section` is to a page: an `<h3>` (title-s, one
|
|
204
|
+
* level under the dialog's `<h2>` title) with an optional description and the dialog's `Actions`
|
|
205
|
+
* at the end of the heading row, then the content 16 below. Sections stand further apart than the
|
|
206
|
+
* plain blocks of the body.
|
|
207
|
+
*/
|
|
208
|
+
export declare function DialogSection({ label, description, className, children, ...rest }: DialogSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
209
|
+
export declare namespace DialogSection {
|
|
210
|
+
var displayName: string;
|
|
211
|
+
}
|
|
191
212
|
export type DialogFooterProps = React.HTMLAttributes<HTMLElement> & {
|
|
192
213
|
/**
|
|
193
214
|
* `fill`: equal-width buttons in one row; `end`: auto width, at the end. Stacked on phones (viewport below 640 px) and in a dialog narrower than 360 px.
|
|
@@ -195,8 +216,12 @@ export type DialogFooterProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
195
216
|
layout?: DialogFooterLayout;
|
|
196
217
|
ref?: React.Ref<HTMLElement>;
|
|
197
218
|
};
|
|
198
|
-
/**
|
|
199
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Actions in DOM order, primary last. Stacks full width when the dialog is narrower than 360px.
|
|
221
|
+
* With a `Meta` the buttons move as one row: when the line runs short the status text goes above
|
|
222
|
+
* them first, so the buttons never split over two lines while there is room for them in one.
|
|
223
|
+
*/
|
|
224
|
+
export declare function DialogFooter({ layout, className, children, ...rest }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
200
225
|
export declare namespace DialogFooter {
|
|
201
226
|
var displayName: string;
|
|
202
227
|
}
|
|
@@ -11,7 +11,7 @@ export declare function SheetHandle({ swipe }: {
|
|
|
11
11
|
swipe: Pick<SwipeDismiss, "enabled">;
|
|
12
12
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
13
13
|
/** How wide an anchored panel is (`data-width` on the floating surface). */
|
|
14
|
-
export type FloatingWidth = "auto" | "trigger" | "content";
|
|
14
|
+
export type FloatingWidth = "auto" | "trigger" | "min-trigger" | "content";
|
|
15
15
|
/**
|
|
16
16
|
* The panel is a `<div>`; `E` is the element type its consumer holds it as (a menu, a listbox:
|
|
17
17
|
* `HTMLElement`), so the consumer ref needs no cast.
|
|
@@ -8,9 +8,10 @@ export declare function hasNativeTabStop(el: HTMLElement): boolean;
|
|
|
8
8
|
/**
|
|
9
9
|
* Moves focus into a layer that just opened, unless focus is already inside (a child `autoFocus`):
|
|
10
10
|
* the first match of `first` (a menu's first enabled item, which is no tab stop of its own), else
|
|
11
|
-
* `[data-autofocus]`, else the first tab stop, else the container itself.
|
|
11
|
+
* `[data-autofocus]`, else the first tab stop, else the container itself. `quiet` — a pointer
|
|
12
|
+
* opened the layer: focus lands without the focus ring until the person turns to the keyboard.
|
|
12
13
|
*/
|
|
13
|
-
export declare function focusInto(container: HTMLElement, first?: string): void;
|
|
14
|
+
export declare function focusInto(container: HTMLElement, first?: string, quiet?: boolean): void;
|
|
14
15
|
/**
|
|
15
16
|
* Focuses `el` when it is still in the document. `quiet` — the layer was opened with a pointer:
|
|
16
17
|
* focus returns without the focus ring, also when a key (Escape) closed the layer; the next key
|
package/dist/internal/parts.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare function isPart<P = unknown>(node: React.ReactNode, type: React.E
|
|
|
11
11
|
export declare function flattenChildren(nodes: React.ReactNode, prefix?: string): React.ReactNode[];
|
|
12
12
|
/**
|
|
13
13
|
* Splits the direct children into the elements of the given part types and the rest, each in the
|
|
14
|
-
* written order (`
|
|
14
|
+
* written order (`Page.Actions` at the end of a `Page.Header`, `Badge.Action` at the end of the badge).
|
|
15
15
|
*/
|
|
16
16
|
export declare function splitParts<P = unknown>(children: React.ReactNode, ...types: React.ElementType[]): {
|
|
17
17
|
parts: React.ReactElement<P>[];
|
package/dist/internal/slot.d.ts
CHANGED
|
@@ -33,36 +33,6 @@ export declare function Slot<E extends HTMLElement = HTMLElement>({ children, re
|
|
|
33
33
|
export declare namespace Slot {
|
|
34
34
|
var displayName: string;
|
|
35
35
|
}
|
|
36
|
-
/** One part moved into an outlet: its id (a key for the outlet) and what it renders. */
|
|
37
|
-
type OutletEntry = {
|
|
38
|
-
id: string;
|
|
39
|
-
node: React.ReactNode;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* The place in a host that renders parts written elsewhere in its subtree: a page's own
|
|
43
|
-
* `AppHeader.Root` in the app shell's header row, page tools wrapped in a page component in the
|
|
44
|
-
* header's second row. The host owns one store (`useOutletStore`) and renders its entries
|
|
45
|
-
* (`useOutletEntries`); a part moves in with `useMovedToOutlet`. The store is external to React
|
|
46
|
-
* state, so a part that updates re-renders the outlet only — never the host, never the part's own
|
|
47
|
-
* tree.
|
|
48
|
-
*/
|
|
49
|
-
export type OutletStore = {
|
|
50
|
-
/** Adds or replaces the part `id` (it keeps the place it first took); `null` takes it out. */
|
|
51
|
-
set: (id: string, node: React.ReactNode | null) => void;
|
|
52
|
-
subscribe: (listener: () => void) => () => void;
|
|
53
|
-
entries: () => readonly OutletEntry[];
|
|
54
|
-
};
|
|
55
|
-
/** The outlet store of a host, created once. */
|
|
56
|
-
export declare function useOutletStore(): OutletStore;
|
|
57
|
-
/** The parts moved into `store`, in the order they first arrived (none on the server). */
|
|
58
|
-
export declare function useOutletEntries(store: OutletStore): readonly OutletEntry[];
|
|
59
|
-
/**
|
|
60
|
-
* Moves `node` into the outlet `store` (`null` — no outlet: the part stays where it is written).
|
|
61
|
-
* Returns `true` once the part has moved: render nothing then. Until then — on the server and in
|
|
62
|
-
* the first client render — the part renders in place, so the server HTML has it; the move happens
|
|
63
|
-
* before the browser paints. The part leaves the outlet when it unmounts.
|
|
64
|
-
*/
|
|
65
|
-
export declare function useMovedToOutlet(store: OutletStore | null, node: React.ReactNode): boolean;
|
|
66
36
|
/**
|
|
67
37
|
* The one element child of an `asChild` part, whose own children the part wraps
|
|
68
38
|
* (`React.cloneElement(child, undefined, …child.props.children)`). Throws a named error otherwise.
|
|
@@ -86,6 +86,11 @@ type SwatchChipProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> &
|
|
|
86
86
|
* host's `--prime-icon-size`, with the faint inner edge; `aria-hidden` — the trigger is named.
|
|
87
87
|
*/
|
|
88
88
|
export declare function SwatchChip({ value, className, ...rest }: SwatchChipProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
/**
|
|
90
|
+
* A typed hex color as `#rrggbb` (lowercase): `#` optional, 3 or 6 digits, spaces around ignored;
|
|
91
|
+
* `null` for anything else.
|
|
92
|
+
*/
|
|
93
|
+
export declare function parseHexColor(text: string): string | null;
|
|
89
94
|
/** Case- and space-insensitive color comparison; `null` means "no color". */
|
|
90
95
|
export declare function sameColor(a: string | null, b: string | null): boolean;
|
|
91
96
|
/**
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const TOKEN_DEFAULTS: {
|
|
8
8
|
readonly "--prime-gallery-max-size": 360;
|
|
9
|
+
readonly "--prime-message-sticker": 160;
|
|
9
10
|
readonly "--prime-message-video-note-box": 268;
|
|
10
11
|
readonly "--prime-motion-duration-base": 380;
|
|
11
12
|
readonly "--prime-motion-duration-fast": 230;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { type OutletStore } from "../../internal/slot";
|
|
3
2
|
/**
|
|
4
3
|
* The navigation of the shell, as its Sidebar publishes it: what a menu button anywhere in the
|
|
5
|
-
* shell needs (`
|
|
4
|
+
* shell needs (the menu button of `Page.TopBar`, `Sidebar.Toggle` outside the rail, a BottomNav
|
|
5
|
+
* «Ещё»).
|
|
6
6
|
*/
|
|
7
7
|
export type AppShellNavState = {
|
|
8
8
|
/** `id` of the navigation landmark, for `aria-controls`. */
|
|
@@ -17,27 +17,18 @@ export type AppShellNavState = {
|
|
|
17
17
|
/** Opens or closes the off-canvas panel; on screen, expands or folds the rail. */
|
|
18
18
|
toggle: () => void;
|
|
19
19
|
};
|
|
20
|
-
type
|
|
21
|
-
/** The Sidebar publishes its navigation (`null` when it leaves). */
|
|
22
|
-
publishNav: (nav: AppShellNavState | null) => void;
|
|
23
|
-
/** The header outlet: a page's own `AppHeader.Root` moves here. */
|
|
24
|
-
headers: OutletStore;
|
|
25
|
-
};
|
|
20
|
+
type PublishNav = (nav: AppShellNavState | null) => void;
|
|
26
21
|
/**
|
|
27
22
|
* The navigation of the nearest `AppShell.Root`, as its Sidebar publishes it; `null` outside a
|
|
28
23
|
* shell or before a Sidebar is in it. For a trigger of the navigation outside the rail.
|
|
29
24
|
*/
|
|
30
25
|
export declare function useAppShellNav(): AppShellNavState | null;
|
|
31
26
|
/** How the Sidebar publishes its navigation into the shell (`null` outside a shell). */
|
|
32
|
-
export declare function useAppShellNavPublisher():
|
|
33
|
-
/**
|
|
34
|
-
* The outlet a page's `AppHeader.Root` moves into: the shell's header row. `null` outside a
|
|
35
|
-
* shell, and in the outlet itself (the header there is in place).
|
|
36
|
-
*/
|
|
37
|
-
export declare function useAppShellHeaderOutlet(): OutletStore | null;
|
|
27
|
+
export declare function useAppShellNavPublisher(): PublishNav | null;
|
|
38
28
|
/**
|
|
39
29
|
* Starts a frame of its own inside a shell: a preview of a screen (`ExampleFrame`) is not the
|
|
40
|
-
* page, so a
|
|
30
|
+
* page, so a Sidebar in it and the menu button of its top bar stay in the preview instead of
|
|
31
|
+
* joining the shell around it.
|
|
41
32
|
*/
|
|
42
33
|
export declare function AppShellBoundary({ children }: {
|
|
43
34
|
children?: React.ReactNode;
|
|
@@ -59,9 +50,9 @@ declare namespace AppShellNav {
|
|
|
59
50
|
}
|
|
60
51
|
/**
|
|
61
52
|
* Grid: navigation column | content panel. Everything that is not `AppShell.Nav` goes into the
|
|
62
|
-
* content panel
|
|
63
|
-
* layer
|
|
64
|
-
*
|
|
53
|
+
* content panel — `AppShell.Main` with the page, and the phone footer — which is the page itself
|
|
54
|
+
* (the layer around the shell): cards on it are the next layer. The root owns the navigation
|
|
55
|
+
* state the Sidebar publishes.
|
|
65
56
|
*/
|
|
66
57
|
declare function AppShellRoot({ fillViewport, className, children, ...rest }: AppShellRootProps): import("react/jsx-runtime").JSX.Element;
|
|
67
58
|
declare namespace AppShellRoot {
|
|
@@ -75,17 +66,15 @@ declare function AppShellFooter({ className, ...rest }: AppShellFooterProps): im
|
|
|
75
66
|
declare namespace AppShellFooter {
|
|
76
67
|
var displayName: string;
|
|
77
68
|
}
|
|
78
|
-
/** `full` (default): the whole panel with responsive gutters; `contained`: centered, up to `--prime-layout-content-max-width` (long-read pages). */
|
|
79
|
-
export type AppShellContentWidth = "contained" | "full";
|
|
80
69
|
export type AppShellMainProps = React.HTMLAttributes<HTMLElement> & {
|
|
81
70
|
ref?: React.Ref<HTMLElement>;
|
|
82
|
-
/**
|
|
83
|
-
* `full` — the whole panel with gutters; `contained` — a centred column up to `--prime-layout-content-max-width`.
|
|
84
|
-
*/
|
|
85
|
-
contentWidth?: AppShellContentWidth;
|
|
86
71
|
};
|
|
87
|
-
/**
|
|
88
|
-
|
|
72
|
+
/**
|
|
73
|
+
* `<main>`, where the page renders: it hands the page the shell's gutters and top air
|
|
74
|
+
* (`Page.Root` takes them) and keeps the bottom air; scrolls inside the panel when `fillViewport`
|
|
75
|
+
* is set, so a sticky `Page.TopBar` sticks to its top.
|
|
76
|
+
*/
|
|
77
|
+
declare function AppShellMain({ className, children, ...rest }: AppShellMainProps): import("react/jsx-runtime").JSX.Element;
|
|
89
78
|
declare namespace AppShellMain {
|
|
90
79
|
var displayName: string;
|
|
91
80
|
}
|
|
@@ -95,20 +84,16 @@ export type AppShellTemplateProps = Omit<AppShellRootProps, "children" | "ref">
|
|
|
95
84
|
* Navigation column content; without it the panel takes the full width.
|
|
96
85
|
*/
|
|
97
86
|
nav?: React.ReactNode;
|
|
98
|
-
/**
|
|
99
|
-
* The default header row, an `AppHeader.Root`: a page that renders its own header replaces it while that page is on screen.
|
|
100
|
-
*/
|
|
101
|
-
header?: React.ReactNode;
|
|
102
87
|
/**
|
|
103
88
|
* Footer content (`BottomNav`); no footer when omitted.
|
|
104
89
|
*/
|
|
105
90
|
footer?: React.ReactNode;
|
|
106
91
|
/**
|
|
107
|
-
*
|
|
92
|
+
* The page inside Main (`Page.Root`).
|
|
108
93
|
*/
|
|
109
94
|
children?: React.ReactNode;
|
|
110
95
|
/**
|
|
111
|
-
* Props for Main (
|
|
96
|
+
* Props for Main (`id`, `tabIndex` for a skip link).
|
|
112
97
|
*/
|
|
113
98
|
mainProps?: Omit<AppShellMainProps, "children" | "ref">;
|
|
114
99
|
/**
|
|
@@ -116,12 +101,8 @@ export type AppShellTemplateProps = Omit<AppShellRootProps, "children" | "ref">
|
|
|
116
101
|
*/
|
|
117
102
|
scrollResetKey?: unknown;
|
|
118
103
|
};
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
* changes. `header` is the default header row: a page that renders its own `AppHeader.Root`
|
|
122
|
-
* replaces it while it is on screen.
|
|
123
|
-
*/
|
|
124
|
-
declare function AppShellTemplate({ ref, nav, header, footer, children, mainProps, scrollResetKey, ...rootProps }: AppShellTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
104
|
+
/** Root + Nav + Main + Footer in one; main scrolls to the top when `scrollResetKey` changes. */
|
|
105
|
+
declare function AppShellTemplate({ ref, nav, footer, children, mainProps, scrollResetKey, ...rootProps }: AppShellTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
125
106
|
declare namespace AppShellTemplate {
|
|
126
107
|
var displayName: string;
|
|
127
108
|
}
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export { AppHeader } from "./app-header/AppHeader";
|
|
3
|
-
export type { AppShellContentWidth, AppShellFooterProps, AppShellMainProps, AppShellNavProps, AppShellNavState, AppShellRootProps, AppShellTemplateProps, } from "./app-shell/AppShell";
|
|
1
|
+
export type { AppShellFooterProps, AppShellMainProps, AppShellNavProps, AppShellNavState, AppShellRootProps, AppShellTemplateProps, } from "./app-shell/AppShell";
|
|
4
2
|
export { AppShell, useAppShellNav } from "./app-shell/AppShell";
|
|
5
3
|
export type { BottomNavActionProps, BottomNavItemCountProps, BottomNavItemIconProps, BottomNavItemProps, BottomNavLabels, BottomNavRootProps, } from "./bottom-nav/BottomNav";
|
|
6
4
|
export { BottomNav } from "./bottom-nav/BottomNav";
|
|
5
|
+
export type { PageActionsProps, PageBackButtonProps, PageBodyProps, PageCellProps, PageCellRows, PageCellSpan, PageChipsProps, PageDescriptionProps, PageDetailProps, PageGridProps, PageGuardProps, PageHeaderProps, PageHeadingProps, PageLabels, PageListProps, PageMaxWidth, PageRootProps, PageSectionLayout, PageSectionProps, PageSplitProps, PageTitleProps, PageToolsProps, PageTopBarProps, } from "./page/Page";
|
|
6
|
+
export { Page } from "./page/Page";
|
|
7
7
|
export type { SidebarAccountProps, SidebarBrandLogoProps, SidebarBrandProps, SidebarContentProps, SidebarFooterProps, SidebarGroupProps, SidebarHeaderProps, SidebarItemActionProps, SidebarItemCountProps, SidebarItemIconProps, SidebarItemProps, SidebarItemShortcutProps, SidebarLabels, SidebarMode, SidebarRootProps, SidebarSubContentProps, SidebarSubProps, SidebarSubTriggerProps, SidebarToggleProps, } from "./sidebar/Sidebar";
|
|
8
8
|
export { Sidebar, useSidebar } from "./sidebar/Sidebar";
|