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
|
@@ -113,6 +113,7 @@ import * as React2 from "react";
|
|
|
113
113
|
// src/internal/tokenDefaults.ts
|
|
114
114
|
var TOKEN_DEFAULTS = {
|
|
115
115
|
"--prime-gallery-max-size": 360,
|
|
116
|
+
"--prime-message-sticker": 160,
|
|
116
117
|
"--prime-message-video-note-box": 268,
|
|
117
118
|
"--prime-motion-duration-base": 380,
|
|
118
119
|
"--prime-motion-duration-fast": 230,
|
|
@@ -1747,9 +1748,8 @@ export {
|
|
|
1747
1748
|
useOptionalControlSize,
|
|
1748
1749
|
useControlSize,
|
|
1749
1750
|
useHostTier,
|
|
1750
|
-
cx,
|
|
1751
|
-
fieldTier_default,
|
|
1752
1751
|
TOKEN_DEFAULTS,
|
|
1752
|
+
cx,
|
|
1753
1753
|
motionToken,
|
|
1754
1754
|
readCssDurationMs,
|
|
1755
1755
|
readElementDurationMs,
|
|
@@ -1763,6 +1763,7 @@ export {
|
|
|
1763
1763
|
HOVER_QUERY,
|
|
1764
1764
|
prefersReducedMotion,
|
|
1765
1765
|
usePresence,
|
|
1766
|
+
fieldTier_default,
|
|
1766
1767
|
iconBox_default,
|
|
1767
1768
|
iconBoxClass,
|
|
1768
1769
|
iconSlotClass,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
Button,
|
|
5
5
|
ColorSwatches,
|
|
6
|
+
FieldActionButton,
|
|
6
7
|
FieldFrame,
|
|
7
8
|
Icon,
|
|
8
9
|
Input,
|
|
@@ -22,11 +23,11 @@ import {
|
|
|
22
23
|
useInheritedDisabled,
|
|
23
24
|
useLabels,
|
|
24
25
|
useOpenState
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OAXJWF3L.js";
|
|
26
27
|
import {
|
|
27
28
|
cx,
|
|
28
29
|
useHostTier
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-QFHE5GKW.js";
|
|
30
31
|
|
|
31
32
|
// src/components/color-field/ColorField.tsx
|
|
32
33
|
import * as React3 from "react";
|
|
@@ -42,7 +43,8 @@ import {
|
|
|
42
43
|
ColorPickerStateContext,
|
|
43
44
|
ColorSliderStateContext,
|
|
44
45
|
composeRenderProps,
|
|
45
|
-
parseColor
|
|
46
|
+
parseColor,
|
|
47
|
+
useLocale
|
|
46
48
|
} from "react-aria-components";
|
|
47
49
|
|
|
48
50
|
// src/hooks/useDraft.ts
|
|
@@ -75,6 +77,7 @@ var ColorPicker_default = {
|
|
|
75
77
|
channelInput: "ColorPicker_channelInput",
|
|
76
78
|
channelCellHex: "ColorPicker_channelCellHex",
|
|
77
79
|
channelSuffix: "ColorPicker_channelSuffix",
|
|
80
|
+
swatchButton: "ColorPicker_swatchButton",
|
|
78
81
|
eyeDropperSquare: "ColorPicker_eyeDropperSquare"
|
|
79
82
|
};
|
|
80
83
|
|
|
@@ -84,6 +87,7 @@ var COLOR_PICKER_LABELS = {
|
|
|
84
87
|
format: "\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439 \u0446\u0432\u0435\u0442\u0430",
|
|
85
88
|
eyeDropper: "\u041F\u0438\u043F\u0435\u0442\u043A\u0430",
|
|
86
89
|
hex: "Hex",
|
|
90
|
+
palette: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043B\u0438\u0442\u0440\u0443",
|
|
87
91
|
hue: "\u041E\u0442\u0442\u0435\u043D\u043E\u043A, \u0433\u0440\u0430\u0434\u0443\u0441\u044B",
|
|
88
92
|
saturation: "\u041D\u0430\u0441\u044B\u0449\u0435\u043D\u043D\u043E\u0441\u0442\u044C, \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u044B",
|
|
89
93
|
lightness: "\u042F\u0440\u043A\u043E\u0441\u0442\u044C, \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u044B",
|
|
@@ -279,15 +283,21 @@ function ColorPickerRoot({
|
|
|
279
283
|
);
|
|
280
284
|
}
|
|
281
285
|
ColorPickerRoot.displayName = "ColorPicker.Root";
|
|
286
|
+
var SliderChannelContext = React2.createContext(null);
|
|
282
287
|
function Slider({ className, disabled, ...props }) {
|
|
283
|
-
return /* @__PURE__ */ jsx(
|
|
288
|
+
return /* @__PURE__ */ jsx(SliderChannelContext.Provider, { value: props.channel, children: /* @__PURE__ */ jsx(
|
|
284
289
|
AriaColorSlider,
|
|
285
290
|
{
|
|
286
291
|
className: composeRenderProps(className, (c) => cx(ColorPicker_default.slider, c)),
|
|
287
292
|
isDisabled: useInheritedDisabled(disabled),
|
|
288
293
|
...props
|
|
289
294
|
}
|
|
290
|
-
);
|
|
295
|
+
) });
|
|
296
|
+
}
|
|
297
|
+
function sliderValueLabel(color, channel, locale) {
|
|
298
|
+
const raw = color.getChannelValue(channel);
|
|
299
|
+
const rounded = channel === "alpha" ? Math.round(raw * 100) / 100 : Math.round(raw);
|
|
300
|
+
return color.withChannelValue(channel, rounded).formatChannelValue(channel, locale);
|
|
291
301
|
}
|
|
292
302
|
function Area({ className, disabled, ...props }) {
|
|
293
303
|
return /* @__PURE__ */ jsx(
|
|
@@ -342,12 +352,22 @@ function Swatches(props) {
|
|
|
342
352
|
Swatches.displayName = "ColorPicker.Swatches";
|
|
343
353
|
function SliderMeta({ label, className, ...rest }) {
|
|
344
354
|
const slider = React2.useContext(ColorSliderStateContext);
|
|
355
|
+
const channel = React2.useContext(SliderChannelContext);
|
|
356
|
+
const { locale } = useLocale();
|
|
345
357
|
return /* @__PURE__ */ jsxs("div", { ...rest, className: cx(ColorPicker_default.sliderHeader, className), children: [
|
|
346
358
|
/* @__PURE__ */ jsx("span", { className: ColorPicker_default.sliderLabel, children: label }),
|
|
347
|
-
/* @__PURE__ */ jsx("output", { className: ColorPicker_default.sliderValue, "aria-live": "off", children: slider
|
|
359
|
+
/* @__PURE__ */ jsx("output", { className: ColorPicker_default.sliderValue, "aria-live": "off", children: slider && channel ? sliderValueLabel(slider.value, channel, locale) : null })
|
|
348
360
|
] });
|
|
349
361
|
}
|
|
350
|
-
function HexInput({
|
|
362
|
+
function HexInput({
|
|
363
|
+
label,
|
|
364
|
+
hint,
|
|
365
|
+
hintTone,
|
|
366
|
+
error,
|
|
367
|
+
focusRing,
|
|
368
|
+
children,
|
|
369
|
+
...rest
|
|
370
|
+
}) {
|
|
351
371
|
const { labels } = useColorPickerContext();
|
|
352
372
|
const { inputRef, text, setText, commit } = useColorDraft(toHexText, parseHex);
|
|
353
373
|
return /* @__PURE__ */ jsx(
|
|
@@ -356,21 +376,25 @@ function HexInput({ label, hint, error, focusRing, ...rest }) {
|
|
|
356
376
|
...rest,
|
|
357
377
|
label: label ?? labels.hex,
|
|
358
378
|
hint,
|
|
379
|
+
hintTone,
|
|
359
380
|
error,
|
|
360
381
|
focusRing,
|
|
361
|
-
children: /* @__PURE__ */
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
382
|
+
children: /* @__PURE__ */ jsxs(Input.Wrapper, { children: [
|
|
383
|
+
/* @__PURE__ */ jsx(
|
|
384
|
+
Input.Field,
|
|
385
|
+
{
|
|
386
|
+
ref: inputRef,
|
|
387
|
+
autoCapitalize: "off",
|
|
388
|
+
autoCorrect: "off",
|
|
389
|
+
spellCheck: false,
|
|
390
|
+
value: text,
|
|
391
|
+
onBlur: commit,
|
|
392
|
+
onChange: (e) => setText(e.target.value),
|
|
393
|
+
onKeyDown: onCommitKeyDown(commit)
|
|
394
|
+
}
|
|
395
|
+
),
|
|
396
|
+
children
|
|
397
|
+
] })
|
|
374
398
|
}
|
|
375
399
|
);
|
|
376
400
|
}
|
|
@@ -419,10 +443,24 @@ function TriggerSwatch(props) {
|
|
|
419
443
|
return /* @__PURE__ */ jsx(SwatchChip, { ...props, value: state.color.toString("css") });
|
|
420
444
|
}
|
|
421
445
|
TriggerSwatch.displayName = "ColorPicker.TriggerSwatch";
|
|
446
|
+
function SwatchButton({ className, ...rest }) {
|
|
447
|
+
const { labels } = useColorPickerContext();
|
|
448
|
+
return /* @__PURE__ */ jsx(
|
|
449
|
+
FieldActionButton,
|
|
450
|
+
{
|
|
451
|
+
...rest,
|
|
452
|
+
label: labels.palette,
|
|
453
|
+
className: cx(ColorPicker_default.swatchButton, className),
|
|
454
|
+
children: /* @__PURE__ */ jsx(TriggerSwatch, {})
|
|
455
|
+
}
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
SwatchButton.displayName = "ColorPicker.SwatchButton";
|
|
422
459
|
var ColorPicker = {
|
|
423
460
|
Root: ColorPickerRoot,
|
|
424
461
|
Panel,
|
|
425
462
|
TriggerSwatch,
|
|
463
|
+
SwatchButton,
|
|
426
464
|
FormatSelect,
|
|
427
465
|
ChannelStrip,
|
|
428
466
|
HexInput,
|
|
@@ -478,6 +516,7 @@ function ColorField({
|
|
|
478
516
|
required = false,
|
|
479
517
|
optional,
|
|
480
518
|
hint,
|
|
519
|
+
hintTone,
|
|
481
520
|
error,
|
|
482
521
|
className,
|
|
483
522
|
"aria-label": ariaLabel,
|
|
@@ -528,6 +567,7 @@ function ColorField({
|
|
|
528
567
|
required,
|
|
529
568
|
optional,
|
|
530
569
|
hint,
|
|
570
|
+
hintTone,
|
|
531
571
|
error,
|
|
532
572
|
disabled,
|
|
533
573
|
optionalLabel: labels.optional,
|
package/dist/color-picker.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type { ColorFieldLabels, ColorFieldProps } from "./components/color-field/ColorField";
|
|
7
7
|
export { ColorField } from "./components/color-field/ColorField";
|
|
8
|
-
export type { ColorPickerAreaProps, ColorPickerChannelStripProps, ColorPickerColorValue, ColorPickerEyeDropperButtonProps, ColorPickerFormatSelectProps, ColorPickerHexInputProps, ColorPickerLabels, ColorPickerPanelProps, ColorPickerRootProps, ColorPickerSliderMetaProps, ColorPickerSliderProps, ColorPickerSliderTrackProps, ColorPickerSwatchesProps, ColorPickerThumbProps, ColorPickerTriggerSwatchProps, ColorValueFormat, } from "./components/color-picker/ColorPicker";
|
|
8
|
+
export type { ColorPickerAreaProps, ColorPickerChannelStripProps, ColorPickerColorValue, ColorPickerEyeDropperButtonProps, ColorPickerFormatSelectProps, ColorPickerHexInputProps, ColorPickerLabels, ColorPickerPanelProps, ColorPickerRootProps, ColorPickerSliderMetaProps, ColorPickerSliderProps, ColorPickerSliderTrackProps, ColorPickerSwatchButtonProps, ColorPickerSwatchesProps, ColorPickerThumbProps, ColorPickerTriggerSwatchProps, ColorValueFormat, } from "./components/color-picker/ColorPicker";
|
|
9
9
|
export { ColorPicker, parseColor } from "./components/color-picker/ColorPicker";
|
package/dist/color-picker.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
ColorField,
|
|
5
5
|
ColorPicker,
|
|
6
6
|
parseColor
|
|
7
|
-
} from "./chunks/chunk-
|
|
8
|
-
import "./chunks/chunk-
|
|
9
|
-
import "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-X3JT5CLR.js";
|
|
8
|
+
import "./chunks/chunk-OAXJWF3L.js";
|
|
9
|
+
import "./chunks/chunk-QFHE5GKW.js";
|
|
10
10
|
export {
|
|
11
11
|
ColorField,
|
|
12
12
|
ColorPicker,
|
|
@@ -127,6 +127,13 @@ export type BadgeActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement
|
|
|
127
127
|
children?: React.ReactNode;
|
|
128
128
|
ref?: React.Ref<HTMLButtonElement>;
|
|
129
129
|
};
|
|
130
|
+
export type BadgeGroupProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
131
|
+
/**
|
|
132
|
+
* Tier of every badge in the group; a badge's own `size` wins. Small tiers stand closer.
|
|
133
|
+
*/
|
|
134
|
+
size?: ControlSize;
|
|
135
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
136
|
+
};
|
|
130
137
|
declare function BadgeRoot({ color, tone, variant, size: sizeProp, shape, onRemove, pressed: pressedProp, defaultPressed, onPressedChange, loading, labels, disabled: disabledProp, children, className, ref, ...rest }: BadgeRootProps): import("react/jsx-runtime").JSX.Element;
|
|
131
138
|
declare namespace BadgeRoot {
|
|
132
139
|
var displayName: string;
|
|
@@ -153,8 +160,18 @@ declare function BadgeAction({ label, onClick, persistent: _persistent, disabled
|
|
|
153
160
|
declare namespace BadgeAction {
|
|
154
161
|
var displayName: string;
|
|
155
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* A row of badges as one value (the tags of a record, the stages a deal went through): the badges
|
|
165
|
+
* wrap onto more lines, a chip gap apart. `size` sets the tier of every badge in it; without it the
|
|
166
|
+
* badges follow the host, as a lone badge does.
|
|
167
|
+
*/
|
|
168
|
+
declare function BadgeGroup({ size, className, ...rest }: BadgeGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
169
|
+
declare namespace BadgeGroup {
|
|
170
|
+
var displayName: string;
|
|
171
|
+
}
|
|
156
172
|
export declare const Badge: {
|
|
157
173
|
Root: typeof BadgeRoot;
|
|
174
|
+
Group: typeof BadgeGroup;
|
|
158
175
|
Icon: typeof BadgeIcon;
|
|
159
176
|
Dot: typeof BadgeDot;
|
|
160
177
|
Action: typeof BadgeAction;
|
|
@@ -18,15 +18,19 @@ export type BreadcrumbRootProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
18
18
|
labels?: Partial<BreadcrumbLabels>;
|
|
19
19
|
ref?: React.Ref<HTMLElement>;
|
|
20
20
|
};
|
|
21
|
-
declare function BreadcrumbRoot({ children, className, size: sizeProp, labels: labelsProp, ...rest }: BreadcrumbRootProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function BreadcrumbRoot({ children, className, size: sizeProp, labels: labelsProp, ref, ...rest }: BreadcrumbRootProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
declare namespace BreadcrumbRoot {
|
|
23
23
|
var displayName: string;
|
|
24
24
|
}
|
|
25
25
|
export type BreadcrumbItemProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, "aria-label"> & {
|
|
26
26
|
/**
|
|
27
|
-
* Renders a link; without it the item is text.
|
|
27
|
+
* Renders a link; without it (and without `asChild`) the item is text.
|
|
28
28
|
*/
|
|
29
29
|
href?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The single child (a router `Link`) is the level's link with the same look; its own text is the level. In the «…» menu of a folded path it is the menu item.
|
|
32
|
+
*/
|
|
33
|
+
asChild?: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Current page: `aria-current="page"` (on the link when `href` is set), primary text, medium weight. Usually the last item, without `href`.
|
|
32
36
|
*/
|
|
@@ -37,7 +41,12 @@ export type BreadcrumbItemProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, "a
|
|
|
37
41
|
"aria-label"?: string;
|
|
38
42
|
ref?: React.Ref<HTMLLIElement>;
|
|
39
43
|
};
|
|
40
|
-
|
|
44
|
+
/**
|
|
45
|
+
* One level of the path in its `<li>`: a link (`href`, or the consumer's router link with
|
|
46
|
+
* `asChild`) for a previous level, plain text for the current one. A press on the link goes
|
|
47
|
+
* through `Page.Guard` (`leaveGuardCapture`).
|
|
48
|
+
*/
|
|
49
|
+
declare function BreadcrumbItem({ href, asChild, current, children, className, "aria-label": ariaLabel, onClickCapture, ...rest }: BreadcrumbItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
50
|
declare namespace BreadcrumbItem {
|
|
42
51
|
var displayName: string;
|
|
43
52
|
}
|
|
@@ -37,7 +37,7 @@ type ButtonShapeProps = {
|
|
|
37
37
|
"aria-label": string;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
* A `<button>` runs the long-action modes; with `asChild` the child (a link) owns its
|
|
40
|
+
* A `<button>` runs the long-action modes; with `asChild` the child (a link) owns its element, so
|
|
41
41
|
* it takes none of them.
|
|
42
42
|
*/
|
|
43
43
|
type ButtonElementProps = {
|
|
@@ -45,7 +45,7 @@ export type ButtonGroupRootProps = Omit<FieldRootDomProps, "dir"> & FieldFramePr
|
|
|
45
45
|
* The field: label · the segments · hint or error. `className`, `ref` and the rest go to the frame;
|
|
46
46
|
* `id`, `role` and the `aria-label*` / `aria-describedby` names to the `role="group"` element.
|
|
47
47
|
*/
|
|
48
|
-
declare function ButtonGroupRoot({ orientation, size: sizeProp, fullWidth, label, required, optional, hint, error, invalid, reserveSupportRow, id, labels: labelsProp, children, className, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ButtonGroupRootProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
declare function ButtonGroupRoot({ orientation, size: sizeProp, fullWidth, label, required, optional, hint, hintTone, error, invalid, reserveSupportRow, id, labels: labelsProp, children, className, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ButtonGroupRootProps): import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
declare namespace ButtonGroupRoot {
|
|
50
50
|
var displayName: string;
|
|
51
51
|
}
|
|
@@ -16,12 +16,16 @@ export type CardRootProps = DivProps & {
|
|
|
16
16
|
* No raised shadow: a flat tile for dense grids.
|
|
17
17
|
*/
|
|
18
18
|
flat?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The KPI is loading: `Card.Value`, `Card.Delta` and `Card.Meta` show a Skeleton in their own geometry and the root sets `aria-busy`; the data fades in when it arrives. Labels and titles stay.
|
|
21
|
+
*/
|
|
22
|
+
loading?: boolean;
|
|
19
23
|
/**
|
|
20
24
|
* The whole card is one link or button: pass that element as the only child with the parts inside it; it gets hover, press and the focus ring. Nothing interactive may sit inside it.
|
|
21
25
|
*/
|
|
22
26
|
asChild?: boolean;
|
|
23
27
|
};
|
|
24
|
-
declare function CardRoot({ variant, flat, asChild, className, children, ...rest }: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function CardRoot({ variant, flat, loading, asChild, className, children, ...rest }: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
25
29
|
declare namespace CardRoot {
|
|
26
30
|
var displayName: string;
|
|
27
31
|
}
|
|
@@ -79,7 +83,7 @@ declare namespace CardLabel {
|
|
|
79
83
|
var displayName: string;
|
|
80
84
|
}
|
|
81
85
|
export type CardValueProps = SpanProps;
|
|
82
|
-
declare function CardValue({ className, ...rest }: CardValueProps): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
declare function CardValue({ className, children, ...rest }: CardValueProps): import("react/jsx-runtime").JSX.Element;
|
|
83
87
|
declare namespace CardValue {
|
|
84
88
|
var displayName: string;
|
|
85
89
|
}
|
|
@@ -89,7 +93,7 @@ export type CardDeltaProps = SpanProps & {
|
|
|
89
93
|
*/
|
|
90
94
|
tone?: Extract<Tone, "neutral" | "success" | "warning" | "danger">;
|
|
91
95
|
};
|
|
92
|
-
declare function CardDelta({ className, tone, ...rest }: CardDeltaProps): import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
declare function CardDelta({ className, tone, children, ...rest }: CardDeltaProps): import("react/jsx-runtime").JSX.Element;
|
|
93
97
|
declare namespace CardDelta {
|
|
94
98
|
var displayName: string;
|
|
95
99
|
}
|
|
@@ -98,7 +102,7 @@ export type CardMetaProps = SpanProps;
|
|
|
98
102
|
* The reference line of a KPI («Лидов 120 · сделок 18»): caption, muted, tabular; it sits at the
|
|
99
103
|
* bottom of the tile, so tiles in a row line their meta up.
|
|
100
104
|
*/
|
|
101
|
-
declare function CardMeta({ className, ...rest }: CardMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
declare function CardMeta({ className, children, ...rest }: CardMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
102
106
|
declare namespace CardMeta {
|
|
103
107
|
var displayName: string;
|
|
104
108
|
}
|
|
@@ -166,7 +166,7 @@ declare namespace ChartFrameDelta {
|
|
|
166
166
|
}
|
|
167
167
|
export type ChartFramePlotProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
168
168
|
/**
|
|
169
|
-
* Height of the plot area in px. `fill` takes the free height of a stretched panel (a `
|
|
169
|
+
* Height of the plot area in px. `fill` takes the free height of a stretched panel (a `Page.Cell` with `rows`), the default height at least.
|
|
170
170
|
*/
|
|
171
171
|
height?: number | "fill";
|
|
172
172
|
/**
|
|
@@ -186,9 +186,9 @@ export type ChatMessagesProps<T = unknown> = Omit<MessageListProps, "selected" |
|
|
|
186
186
|
*/
|
|
187
187
|
now?: Date;
|
|
188
188
|
/**
|
|
189
|
-
* The label of a date
|
|
189
|
+
* The label of a date; gets the `timeZone`.
|
|
190
190
|
*/
|
|
191
|
-
formatDate?: (date: Date, now: Date) => string;
|
|
191
|
+
formatDate?: (date: Date, now: Date, timeZone?: string) => string;
|
|
192
192
|
};
|
|
193
193
|
/**
|
|
194
194
|
* The conversation: the one message list of the kit, in its own scroller. A `role="log"` of rows
|
|
@@ -198,7 +198,7 @@ export type ChatMessagesProps<T = unknown> = Omit<MessageListProps, "selected" |
|
|
|
198
198
|
* and `Message.Typing` close the list). Only the rows around the view render; the list opens at
|
|
199
199
|
* the end and keeps the reader's place.
|
|
200
200
|
*/
|
|
201
|
-
declare function ChatMessages<T>({ group, loading, hasOlder, onLoadOlder, items, getKey, getAuthor, getDate, isService, renderMessage, unread, groupWindow, now, formatDate, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest }: ChatMessagesProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
201
|
+
declare function ChatMessages<T>({ group, loading, hasOlder, onLoadOlder, items, getKey, getAuthor, getDate, isService, renderMessage, unread, groupWindow, now, timeZone, formatDate, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest }: ChatMessagesProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
202
202
|
declare namespace ChatMessages {
|
|
203
203
|
var displayName: string;
|
|
204
204
|
}
|
|
@@ -2,7 +2,11 @@ import type * as React from "react";
|
|
|
2
2
|
export type ChatSeparatorProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
ref?: React.Ref<HTMLDivElement>;
|
|
4
4
|
};
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* A date between messages («Сегодня», «12 марта»): a small pill that sticks while its day scrolls.
|
|
7
|
+
* An incoming bubble stands one step off the list's host, the pill one step above the bubble, so the
|
|
8
|
+
* two never share a fill while the bubbles pass under it.
|
|
9
|
+
*/
|
|
6
10
|
export declare function ChatSeparator({ className, children, ...rest }: ChatSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
11
|
export declare namespace ChatSeparator {
|
|
8
12
|
var displayName: string;
|
|
@@ -38,6 +38,10 @@ export type MessageListProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
38
38
|
* The reader (`{ id, name: «Вы», src?, color? }`): a reaction they put shows them among the chip's avatars at once, before the data comes back; matched by `id`.
|
|
39
39
|
*/
|
|
40
40
|
reader?: MessageUser;
|
|
41
|
+
/**
|
|
42
|
+
* The IANA zone of the date separators, the runs and every message time (`"Asia/Vladivostok"`): a profile's zone, not the browser's.
|
|
43
|
+
*/
|
|
44
|
+
timeZone?: string;
|
|
41
45
|
/**
|
|
42
46
|
* A message was added at the end after mount, sent or received: for a sound, a counter, a title badge. Not called for the first render, history or a message put back in the middle.
|
|
43
47
|
*/
|
|
@@ -76,7 +80,7 @@ export type MessageListProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
76
80
|
* `anchor="end"`); jumps, search, selection ranges, the keyboard and playing media reach or keep
|
|
77
81
|
* rows that are not rendered.
|
|
78
82
|
*/
|
|
79
|
-
export declare function MessageList({ group, selected: selectedProp, defaultSelected, onSelectedChange, quickReaction, reactionOptions, reader, onNewMessage, onRead, jumpTo, highlight, onMatchesChange, revealRef, labels: labelsProp, className, children, onKeyDown, onFocus, ref, ...rest }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
export declare function MessageList({ group, selected: selectedProp, defaultSelected, onSelectedChange, quickReaction, reactionOptions, reader, timeZone, onNewMessage, onRead, jumpTo, highlight, onMatchesChange, revealRef, labels: labelsProp, className, children, onKeyDown, onFocus, ref, ...rest }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
80
84
|
export type ChatSelectionBarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
81
85
|
ref?: React.Ref<HTMLDivElement>;
|
|
82
86
|
};
|
|
@@ -7,7 +7,7 @@ import type { MessagePosition } from "../message/types";
|
|
|
7
7
|
export type MessageListEntry<T> = {
|
|
8
8
|
type: "date";
|
|
9
9
|
key: string;
|
|
10
|
-
/** The start of the day (local time). */
|
|
10
|
+
/** The start of the day (in `timeZone`, else local time). */
|
|
11
11
|
date: Date;
|
|
12
12
|
/** «Сегодня», «Вчера», «12 марта», «12 марта 2025». */
|
|
13
13
|
label: string;
|
|
@@ -37,11 +37,19 @@ export type GroupMessagesOptions<T> = {
|
|
|
37
37
|
groupWindow?: number;
|
|
38
38
|
/** «Today» for the date labels. Default: now. */
|
|
39
39
|
now?: Date;
|
|
40
|
+
/**
|
|
41
|
+
* The zone the days are read in (an IANA name, `"Asia/Vladivostok"`): where a day starts and what
|
|
42
|
+
* «today» is. Default: the browser's zone.
|
|
43
|
+
*/
|
|
44
|
+
timeZone?: string;
|
|
40
45
|
/** The label of a date separator. Default `formatMessageDate`. */
|
|
41
|
-
formatDate?: (date: Date, now: Date) => string;
|
|
46
|
+
formatDate?: (date: Date, now: Date, timeZone?: string) => string;
|
|
42
47
|
};
|
|
43
|
-
/**
|
|
44
|
-
|
|
48
|
+
/**
|
|
49
|
+
* «Сегодня», «Вчера», «12 марта» this year, «12 марта 2025» another year; days are read in
|
|
50
|
+
* `timeZone`, or the browser's zone.
|
|
51
|
+
*/
|
|
52
|
+
export declare function formatMessageDate(date: Date, now?: Date, timeZone?: string): string;
|
|
45
53
|
/**
|
|
46
54
|
* The rows of a chat from messages in time order: a date separator before the first message of
|
|
47
55
|
* every day, and for every message its `position` in the run of one author (a new run starts with
|
|
@@ -140,17 +140,22 @@ type ChatListItemOwnProps = {
|
|
|
140
140
|
*/
|
|
141
141
|
draft?: string;
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
143
|
+
* The one child element (a router `Link`) is the row; the parts go inside it.
|
|
144
|
+
*/
|
|
145
|
+
asChild?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* `ChatList.ItemIcon`, `ChatList.ItemText`, `ChatList.ItemDescription`, `ChatList.ItemMenu` — inside the child element with `asChild`.
|
|
144
148
|
*/
|
|
145
149
|
children?: React.ReactNode;
|
|
146
150
|
};
|
|
147
|
-
export type ChatListItemProps = ChatListItemOwnProps & Omit<ListItemProps, keyof ChatListItemOwnProps | "value" | "current" | "
|
|
151
|
+
export type ChatListItemProps = ChatListItemOwnProps & Omit<ListItemProps, keyof ChatListItemOwnProps | "value" | "current" | "disabled">;
|
|
148
152
|
/**
|
|
149
|
-
* A dialog: a `List.Item` row (a button,
|
|
150
|
-
*
|
|
151
|
-
*
|
|
153
|
+
* A dialog: a `List.Item` row (a button, a link with `href`, or the consumer's element with
|
|
154
|
+
* `asChild` — a router link, its children the parts) with the avatar, the name and the time on
|
|
155
|
+
* the first line, the preview and the counts on the second. Its key and `current` come from
|
|
156
|
+
* `ChatList.Root`.
|
|
152
157
|
*/
|
|
153
|
-
declare function ChatListItem({ time, status, unread, mention, muted, pinned, typing, draft, className, children, onClick, onKeyDown, onFocus, onContextMenu, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, ref, ...rest }: ChatListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
158
|
+
declare function ChatListItem({ asChild, time, status, unread, mention, muted, pinned, typing, draft, className, children, onClick, onKeyDown, onFocus, onContextMenu, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, ref, ...rest }: ChatListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
154
159
|
declare namespace ChatListItem {
|
|
155
160
|
var displayName: string;
|
|
156
161
|
}
|
|
@@ -216,9 +221,13 @@ export type ChatListRootProps<T = unknown> = Omit<React.HTMLAttributes<HTMLDivEl
|
|
|
216
221
|
*/
|
|
217
222
|
now?: Date;
|
|
218
223
|
/**
|
|
219
|
-
*
|
|
224
|
+
* The IANA zone the times of the rows are read in (`"Asia/Vladivostok"`): a profile's zone, not the browser's.
|
|
225
|
+
*/
|
|
226
|
+
timeZone?: string;
|
|
227
|
+
/**
|
|
228
|
+
* Display of a row's `Date` time: «14:32» today, «пн» this week, «12 мар», «12.03.2025»; gets the `timeZone`.
|
|
220
229
|
*/
|
|
221
|
-
formatTime?: (date: Date, now: Date) => string;
|
|
230
|
+
formatTime?: (date: Date, now: Date, timeZone?: string) => string;
|
|
222
231
|
/**
|
|
223
232
|
* Built-in strings, see Labels.
|
|
224
233
|
*/
|
|
@@ -231,7 +240,7 @@ export type ChatListRootProps<T = unknown> = Omit<React.HTMLAttributes<HTMLDivEl
|
|
|
231
240
|
* new places when the order changes, a long list rendered only around the view, placeholder rows
|
|
232
241
|
* while loading and more dialogs loaded near the end. Draws no surface: put it in a pane.
|
|
233
242
|
*/
|
|
234
|
-
declare function ChatListRoot<T>({ items, getKey, renderItem, value: valueProp, defaultValue, onValueChange, search: searchProp, defaultSearch, onSearchChange, loading, hasMore, onLoadMore, empty, size: sizeProp, now: nowProp, formatTime, labels: labelsProp, className, ref, ...rest }: ChatListRootProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
243
|
+
declare function ChatListRoot<T>({ items, getKey, renderItem, value: valueProp, defaultValue, onValueChange, search: searchProp, defaultSearch, onSearchChange, loading, hasMore, onLoadMore, empty, size: sizeProp, now: nowProp, timeZone, formatTime, labels: labelsProp, className, ref, ...rest }: ChatListRootProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
235
244
|
declare namespace ChatListRoot {
|
|
236
245
|
var displayName: string;
|
|
237
246
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The time of a dialog's last message, as a messenger shows it: today «14:32», within the last
|
|
3
|
-
* six days the weekday «пн», earlier this year «12 мар», another year «12.03.2025».
|
|
4
|
-
* `ChatList.Root formatTime`.
|
|
3
|
+
* six days the weekday «пн», earlier this year «12 мар», another year «12.03.2025». Days and the
|
|
4
|
+
* clock are read in `timeZone`, or the browser's zone. The default `ChatList.Root formatTime`.
|
|
5
5
|
*/
|
|
6
|
-
export declare function formatChatTime(date: Date, now: Date): string;
|
|
6
|
+
export declare function formatChatTime(date: Date, now: Date, timeZone?: string): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { HintTone } from "../hint/Hint";
|
|
2
3
|
import { type ChoiceLabelProps } from "../../internal/ChoiceField";
|
|
3
4
|
import type { ControlSize } from "../../internal/states";
|
|
4
5
|
export type CheckboxShape = "square" | "circle";
|
|
@@ -32,6 +33,10 @@ export type CheckboxRootProps = Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
32
33
|
* Help text under the label text. Hidden while `error` is shown.
|
|
33
34
|
*/
|
|
34
35
|
hint?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
38
|
+
*/
|
|
39
|
+
hintTone?: HintTone;
|
|
35
40
|
/**
|
|
36
41
|
* Error message in the hint slot; implies `invalid`.
|
|
37
42
|
*/
|
|
@@ -59,7 +64,7 @@ export type CheckboxRootProps = Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
59
64
|
/** The native checkbox input. */
|
|
60
65
|
ref?: React.Ref<HTMLInputElement>;
|
|
61
66
|
};
|
|
62
|
-
declare function CheckboxRoot({ id, checked: checkedProp, defaultChecked, onCheckedChange, indeterminate, invalid, hint, error, size: sizeProp, shape, optional, labels: labelsProp, disabled: disabledProp, readOnly, className, "aria-describedby": ariaDescribedBy, children, ref, ...inputRest }: CheckboxRootProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
declare function CheckboxRoot({ id, checked: checkedProp, defaultChecked, onCheckedChange, indeterminate, invalid, hint, hintTone, error, size: sizeProp, shape, optional, labels: labelsProp, disabled: disabledProp, readOnly, className, "aria-describedby": ariaDescribedBy, children, ref, ...inputRest }: CheckboxRootProps): import("react/jsx-runtime").JSX.Element;
|
|
63
68
|
declare namespace CheckboxRoot {
|
|
64
69
|
var displayName: string;
|
|
65
70
|
}
|
|
@@ -77,7 +77,7 @@ export type ColorFieldProps = FieldRootDomProps & FieldFrameProps & FieldFocusRi
|
|
|
77
77
|
* the ColorPicker panel (area, hue, optional opacity, channels with the eyedropper, presets) in a
|
|
78
78
|
* Popover.
|
|
79
79
|
*/
|
|
80
|
-
export declare function ColorField({ value: valueProp, defaultValue, onValueChange, presets, alpha, size: sizeProp, disabled: disabledProp, invalid: invalidProp, focusRing, name, id, label, required, optional, hint, error, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, labels: labelsProp, ...rest }: ColorFieldProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
80
|
+
export declare function ColorField({ value: valueProp, defaultValue, onValueChange, presets, alpha, size: sizeProp, disabled: disabledProp, invalid: invalidProp, focusRing, name, id, label, required, optional, hint, hintTone, error, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, labels: labelsProp, ...rest }: ColorFieldProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
81
81
|
export declare namespace ColorField {
|
|
82
82
|
var displayName: string;
|
|
83
83
|
}
|
|
@@ -2,6 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { type ColorAreaProps as AriaColorAreaProps, type ColorSliderProps as AriaColorSliderProps, type ColorThumbProps as AriaColorThumbProps, type SliderTrackProps as AriaSliderTrackProps, type Color, parseColor } from "react-aria-components";
|
|
3
3
|
import { Button } from "../button/Button";
|
|
4
4
|
import { type ColorSwatchesColorProps } from "../color-swatches/ColorSwatches";
|
|
5
|
+
import type { HintTone } from "../hint/Hint";
|
|
6
|
+
import { type FieldActionButtonProps } from "../../internal/FieldAction";
|
|
5
7
|
import type { FieldFocusRingProps, FieldRootDomProps } from "../../internal/FieldFrame";
|
|
6
8
|
import type { ControlSize } from "../../internal/states";
|
|
7
9
|
export type { Color as ColorPickerColorValue } from "react-aria-components";
|
|
@@ -23,6 +25,8 @@ export type ColorPickerLabels = {
|
|
|
23
25
|
eyeDropper: string;
|
|
24
26
|
/** Hex field of `ChannelStrip` and the default `HexInput` label. */
|
|
25
27
|
hex: string;
|
|
28
|
+
/** `ColorPicker.SwatchButton`: its name and tooltip. */
|
|
29
|
+
palette: string;
|
|
26
30
|
hue: string;
|
|
27
31
|
saturation: string;
|
|
28
32
|
lightness: string;
|
|
@@ -79,10 +83,18 @@ export type ColorPickerHexInputProps = FieldRootDomProps & FieldFocusRingProps &
|
|
|
79
83
|
* Help text under the field. Hidden while `error` is shown.
|
|
80
84
|
*/
|
|
81
85
|
hint?: React.ReactNode;
|
|
86
|
+
/**
|
|
87
|
+
* 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.
|
|
88
|
+
*/
|
|
89
|
+
hintTone?: HintTone;
|
|
82
90
|
/**
|
|
83
91
|
* Error message in the hint slot; marks the field invalid.
|
|
84
92
|
*/
|
|
85
93
|
error?: React.ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* End segments of the field box after the value: `ColorPicker.SwatchButton` (in a `Popover.Trigger`), so the hex and its swatch read as one field.
|
|
96
|
+
*/
|
|
97
|
+
children?: React.ReactNode;
|
|
86
98
|
};
|
|
87
99
|
export { parseColor };
|
|
88
100
|
/** Hex text of a color: `#rrggbb`, or `#rrggbbaa` when it is not opaque. */
|
|
@@ -158,7 +170,7 @@ export type ColorPickerSliderMetaProps = DivProps & {
|
|
|
158
170
|
* React Aria's `SliderOutput` inside a color slider points `for` at an id no input carries.
|
|
159
171
|
*/
|
|
160
172
|
declare function SliderMeta({ label, className, ...rest }: ColorPickerSliderMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
161
|
-
declare function HexInput({ label, hint, error, focusRing, ...rest }: ColorPickerHexInputProps): import("react/jsx-runtime").JSX.Element;
|
|
173
|
+
declare function HexInput({ label, hint, hintTone, error, focusRing, children, ...rest }: ColorPickerHexInputProps): import("react/jsx-runtime").JSX.Element;
|
|
162
174
|
declare namespace HexInput {
|
|
163
175
|
var displayName: string;
|
|
164
176
|
}
|
|
@@ -181,10 +193,20 @@ declare function TriggerSwatch(props: ColorPickerTriggerSwatchProps): import("re
|
|
|
181
193
|
declare namespace TriggerSwatch {
|
|
182
194
|
var displayName: string;
|
|
183
195
|
}
|
|
196
|
+
export type ColorPickerSwatchButtonProps = Omit<FieldActionButtonProps, "label" | "children" | "asChild">;
|
|
197
|
+
/**
|
|
198
|
+
* The current color as a button segment at the end of `HexInput` (named `labels.palette`, with a
|
|
199
|
+
* tooltip): the hex and its swatch read as one field. Wrap it in `Popover.Trigger` to open a panel.
|
|
200
|
+
*/
|
|
201
|
+
declare function SwatchButton({ className, ...rest }: ColorPickerSwatchButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
202
|
+
declare namespace SwatchButton {
|
|
203
|
+
var displayName: string;
|
|
204
|
+
}
|
|
184
205
|
export declare const ColorPicker: {
|
|
185
206
|
Root: typeof ColorPickerRoot;
|
|
186
207
|
Panel: typeof Panel;
|
|
187
208
|
TriggerSwatch: typeof TriggerSwatch;
|
|
209
|
+
SwatchButton: typeof SwatchButton;
|
|
188
210
|
FormatSelect: typeof FormatSelect;
|
|
189
211
|
ChannelStrip: typeof ChannelStrip;
|
|
190
212
|
HexInput: typeof HexInput;
|