prime-ui-kit 0.9.0 → 0.9.2
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 +61 -47
- package/dist/chunks/chunk-IQELQNMR.js +379 -0
- package/dist/chunks/chunk-LXGRKN34.js +13260 -0
- package/dist/chunks/chunk-ZEFCDEEQ.js +3493 -0
- package/dist/color-picker.d.ts +7 -0
- package/dist/color-picker.js +9 -0
- package/dist/components/accordion/Accordion.d.ts +44 -32
- package/dist/components/avatar/Avatar.d.ts +36 -53
- package/dist/components/badge/Badge.d.ts +50 -13
- package/dist/components/badge/edgeIcons.d.ts +13 -0
- package/dist/components/badge/tier.d.ts +0 -1
- package/dist/components/banner/Banner.d.ts +29 -60
- package/dist/components/breadcrumb/Breadcrumb.d.ts +11 -23
- package/dist/components/button/Button.d.ts +22 -36
- package/dist/components/button-group/ButtonGroup.d.ts +17 -17
- package/dist/components/card/Card.d.ts +75 -202
- package/dist/components/checkbox/Checkbox.d.ts +37 -38
- package/dist/components/code-block/CodeBlock.d.ts +5 -13
- package/dist/components/color-picker/ColorPicker.d.ts +76 -52
- package/dist/components/color-picker/ColorPresets.d.ts +18 -30
- package/dist/components/color-swatches/ColorSwatches.d.ts +40 -0
- package/dist/components/command-menu/CommandMenu.d.ts +138 -78
- package/dist/components/crossfade/Crossfade.d.ts +14 -0
- package/dist/components/data-table/DataTable.d.ts +35 -81
- package/dist/components/data-table/Footer.d.ts +16 -0
- package/dist/components/data-table/Head.d.ts +21 -0
- package/dist/components/data-table/Row.d.ts +56 -0
- package/dist/components/data-table/StateRows.d.ts +18 -0
- package/dist/components/data-table/rows.d.ts +60 -0
- package/dist/components/data-table/types.d.ts +40 -0
- package/dist/components/data-table/useColumnHover.d.ts +9 -0
- package/dist/components/data-table/useFrozenColumns.d.ts +16 -0
- package/dist/components/data-table/useInfiniteRows.d.ts +24 -0
- package/dist/components/data-table/useRowSelection.d.ts +35 -0
- package/dist/components/datepicker/Datepicker.d.ts +9 -126
- package/dist/components/datepicker/DatepickerPanel.d.ts +113 -0
- package/dist/components/datepicker/datepickerModel.d.ts +16 -22
- package/dist/components/datepicker/panelLayout.d.ts +50 -0
- package/dist/components/digit-input/DigitInput.d.ts +24 -19
- package/dist/components/divider/Divider.d.ts +7 -15
- package/dist/components/dnd/Dnd.d.ts +135 -0
- package/dist/components/dnd/DragOverlay.d.ts +6 -0
- package/dist/components/dnd/autoScroll.d.ts +5 -0
- package/dist/components/dnd/context.d.ts +5 -0
- package/dist/components/dnd/dragSession.d.ts +102 -0
- package/dist/components/dnd/geometry.d.ts +30 -0
- package/dist/components/dnd/labels.d.ts +18 -0
- package/dist/components/dnd/store.d.ts +9 -0
- package/dist/components/dnd/useDragSource.d.ts +36 -0
- package/dist/components/dnd/useDropTarget.d.ts +44 -0
- package/dist/components/dnd/useFlipList.d.ts +11 -0
- package/dist/components/dnd/useSortableList.d.ts +62 -0
- package/dist/components/drawer/Drawer.d.ts +13 -21
- package/dist/components/dropdown/Dropdown.d.ts +78 -84
- package/dist/components/empty-page/EmptyPage.d.ts +48 -48
- package/dist/components/example-frame/ExampleFrame.d.ts +20 -27
- package/dist/components/file-upload/FileUpload.d.ts +79 -134
- package/dist/components/hint/Hint.d.ts +10 -11
- package/dist/components/index.d.ts +58 -42
- package/dist/components/input/Input.d.ts +35 -37
- package/dist/components/kanban/Kanban.d.ts +129 -0
- package/dist/components/kbd/Kbd.d.ts +6 -12
- package/dist/components/label/Label.d.ts +18 -15
- package/dist/components/link-button/LinkButton.d.ts +14 -15
- package/dist/components/login-form/LoginForm.d.ts +115 -0
- package/dist/components/modal/DialogParts.d.ts +57 -16
- package/dist/components/modal/Modal.d.ts +9 -20
- package/dist/components/native-select/NativeSelect.d.ts +28 -0
- package/dist/components/notification/Notification.d.ts +50 -16
- package/dist/components/notification/NotificationStore.d.ts +2 -6
- package/dist/components/page-content/PageContent.d.ts +43 -52
- package/dist/components/page-toolbar/PageToolbar.d.ts +53 -0
- package/dist/components/pagination/Pagination.d.ts +11 -23
- package/dist/components/popover/Popover.d.ts +62 -26
- package/dist/components/progress-bar/ProgressBar.d.ts +17 -13
- package/dist/components/progress-circle/ProgressCircle.d.ts +14 -15
- package/dist/components/radio/Radio.d.ts +46 -54
- package/dist/components/scroll-container/ScrollContainer.d.ts +10 -13
- package/dist/components/segmented-control/SegmentedControl.d.ts +20 -29
- package/dist/components/select/Select.d.ts +54 -135
- package/dist/components/select/SelectItem.d.ts +68 -0
- package/dist/components/select/selectContext.d.ts +61 -0
- package/dist/components/skeleton/Skeleton.d.ts +22 -0
- package/dist/components/slider/Slider.d.ts +24 -16
- package/dist/components/smart-filter/SmartFilter.d.ts +105 -0
- package/dist/components/smart-filter/model.d.ts +33 -0
- package/dist/components/spinner/Spinner.d.ts +22 -0
- package/dist/components/stepper/Stepper.d.ts +32 -42
- package/dist/components/switch/Switch.d.ts +19 -37
- package/dist/components/tabs/Tabs.d.ts +65 -38
- package/dist/components/tag-select/TagOptionMenu.d.ts +29 -0
- package/dist/components/tag-select/TagSelect.d.ts +15 -16
- package/dist/components/tag-select/useChipOverflow.d.ts +19 -0
- package/dist/components/textarea/Textarea.d.ts +16 -31
- package/dist/components/thumbnail/Thumbnail.d.ts +41 -0
- package/dist/components/timeline/Timeline.d.ts +46 -61
- package/dist/components/tooltip/Tooltip.d.ts +21 -17
- package/dist/components/typography/Typography.d.ts +5 -21
- package/dist/hooks/useControllableState.d.ts +0 -1
- package/dist/hooks/useEdgeOverflow.d.ts +12 -0
- package/dist/hooks/useEnterConfirm.d.ts +15 -0
- package/dist/hooks/useImageStatus.d.ts +19 -0
- package/dist/hooks/useInertSiblings.d.ts +9 -0
- package/dist/hooks/useMediaQuery.d.ts +7 -0
- package/dist/hooks/useMergedRefs.d.ts +6 -2
- package/dist/hooks/useModalLayer.d.ts +22 -0
- package/dist/hooks/usePosition.d.ts +46 -40
- package/dist/hooks/usePresence.d.ts +0 -1
- package/dist/hooks/useScrollLock.d.ts +3 -5
- package/dist/hooks/useStateSwap.d.ts +8 -0
- package/dist/hooks/useSwipeDismiss.d.ts +34 -0
- package/dist/icons/Icon.d.ts +24 -7
- package/dist/icons/index.d.ts +2 -44
- package/dist/icons/registry.d.ts +85 -0
- package/dist/index.css +7053 -6846
- package/dist/index.d.ts +0 -1
- package/dist/index.js +106 -13830
- package/dist/internal/AnchorRectContext.d.ts +12 -0
- package/dist/internal/ChoiceField.d.ts +34 -0
- package/dist/internal/ControlSizeContext.d.ts +6 -2
- package/dist/internal/FieldFrame.d.ts +47 -8
- package/dist/internal/HighlightMatch.d.ts +13 -0
- package/dist/internal/MenuGroup.d.ts +8 -0
- package/dist/internal/Portal.d.ts +0 -1
- package/dist/internal/VisuallyHidden.d.ts +11 -0
- package/dist/internal/context.d.ts +0 -1
- package/dist/internal/cx.d.ts +0 -1
- package/dist/internal/data-attributes.d.ts +0 -1
- package/dist/internal/fieldClasses.d.ts +9 -0
- package/dist/internal/formatLabel.d.ts +6 -0
- package/dist/internal/highlightTsxHtml.d.ts +1 -2
- package/dist/internal/iconBox.d.ts +9 -0
- package/dist/internal/iconLayout.d.ts +15 -0
- package/dist/internal/imageSlot.d.ts +29 -0
- package/dist/internal/layoutPxFromPrimitives.d.ts +2 -3
- package/dist/internal/listbox.d.ts +40 -0
- package/dist/internal/mergeRefs.d.ts +4 -2
- package/dist/internal/overlay/FloatingPanel.d.ts +36 -0
- package/dist/internal/overlay/focus.d.ts +14 -0
- package/dist/internal/overlay/layerStack.d.ts +41 -0
- package/dist/internal/overlay/useFloatingLayer.d.ts +70 -0
- package/dist/internal/polymorphic.d.ts +9 -0
- package/dist/internal/progressSegments.d.ts +63 -0
- package/dist/internal/rovingFocus.d.ts +18 -0
- package/dist/internal/scrollAncestors.d.ts +1 -2
- package/dist/internal/slot.d.ts +11 -5
- package/dist/internal/states.d.ts +3 -2
- package/dist/internal/swatch.d.ts +56 -0
- package/dist/internal/touchTarget.d.ts +4 -0
- package/dist/layout/app-header/AppHeader.d.ts +110 -0
- package/dist/layout/app-shell/AppShell.d.ts +47 -22
- package/dist/layout/bottom-nav/BottomNav.d.ts +80 -0
- package/dist/layout/index.d.ts +6 -3
- package/dist/layout/sidebar/Sidebar.d.ts +206 -35
- package/dist/theme/applyTheme.d.ts +0 -1
- package/dist/tokens/naming.d.ts +6 -0
- package/dist/tokens/primitives.d.ts +26 -80
- package/dist/tokens/semantic.d.ts +122 -25
- package/dist/tokens/themes/dark.d.ts +7 -1
- package/package.json +30 -24
- package/src/components/accordion/COMPONENT.md +91 -101
- package/src/components/accordion/examples/collapsible.tsx +27 -0
- package/src/components/accordion/examples/controlled.tsx +36 -0
- package/src/components/accordion/examples/examples.module.css +6 -39
- package/src/components/accordion/examples/multiple.tsx +31 -0
- package/src/components/accordion/examples/overview.tsx +39 -0
- package/src/components/accordion/examples/sizes.tsx +14 -25
- package/src/components/accordion/examples/states.tsx +23 -48
- package/src/components/accordion/examples/variants.tsx +35 -0
- package/src/components/accordion/examples/with-icon.tsx +47 -0
- package/src/components/avatar/COMPONENT.md +88 -153
- package/src/components/avatar/examples/examples.module.css +6 -44
- package/src/components/avatar/examples/overview.tsx +18 -0
- package/src/components/avatar/examples/presence.tsx +20 -17
- package/src/components/avatar/examples/sizes.tsx +8 -10
- package/src/components/avatar/examples/src-from-state.tsx +4 -5
- package/src/components/avatar/examples/states.tsx +17 -27
- package/src/components/avatar/examples/team-group.tsx +21 -0
- package/src/components/avatar/examples/variants.tsx +40 -0
- package/src/components/badge/COMPONENT.md +113 -122
- package/src/components/{tag → badge}/examples/applied-filters.tsx +10 -11
- package/src/components/badge/examples/examples.module.css +14 -59
- package/src/components/badge/examples/filter-values.tsx +39 -0
- package/src/components/badge/examples/in-controls.tsx +14 -26
- package/src/components/badge/examples/overview.tsx +13 -0
- package/src/components/badge/examples/sizes.tsx +8 -10
- package/src/components/badge/examples/states.tsx +35 -29
- package/src/components/badge/examples/variants.tsx +27 -36
- package/src/components/badge/examples/with-icon.tsx +50 -0
- package/src/components/banner/COMPONENT.md +89 -94
- package/src/components/banner/examples/dismissible.tsx +38 -0
- package/src/components/banner/examples/examples.module.css +6 -22
- package/src/components/banner/examples/narrow.tsx +23 -0
- package/src/components/banner/examples/overview.tsx +18 -0
- package/src/components/banner/examples/page-strip.tsx +53 -0
- package/src/components/banner/examples/sizes.tsx +22 -21
- package/src/components/banner/examples/structure.tsx +45 -0
- package/src/components/banner/examples/variants.tsx +28 -55
- package/src/components/breadcrumb/COMPONENT.md +55 -59
- package/src/components/breadcrumb/examples/ellipsis.tsx +12 -0
- package/src/components/breadcrumb/examples/examples.module.css +3 -52
- package/src/components/breadcrumb/examples/overflow.tsx +26 -0
- package/src/components/breadcrumb/examples/overview.tsx +12 -0
- package/src/components/breadcrumb/examples/sizes.tsx +11 -14
- package/src/components/breadcrumb/examples/with-icon.tsx +14 -0
- package/src/components/button/COMPONENT.md +65 -66
- package/src/components/button/examples/as-child.tsx +8 -32
- package/src/components/button/examples/examples.module.css +18 -76
- package/src/components/button/examples/in-form.tsx +20 -14
- package/src/components/button/examples/on-colored-host.tsx +29 -0
- package/src/components/button/examples/overview.tsx +13 -0
- package/src/components/button/examples/sizes.tsx +7 -9
- package/src/components/button/examples/states.tsx +18 -28
- package/src/components/button/examples/variants.tsx +31 -0
- package/src/components/button/examples/with-icon.tsx +35 -23
- package/src/components/button-group/COMPONENT.md +64 -55
- package/src/components/button-group/examples/controlled.tsx +3 -3
- package/src/components/button-group/examples/examples.module.css +4 -39
- package/src/components/button-group/examples/full-width.tsx +10 -14
- package/src/components/button-group/examples/in-form.tsx +3 -3
- package/src/components/button-group/examples/orientation.tsx +6 -8
- package/src/components/button-group/examples/overview.tsx +12 -0
- package/src/components/button-group/examples/sizes.tsx +8 -10
- package/src/components/button-group/examples/states.tsx +28 -7
- package/src/components/button-group/examples/with-icon.tsx +45 -0
- package/src/components/card/COMPONENT.md +99 -298
- package/src/components/card/examples/{content.tsx → content-templates.tsx} +23 -29
- package/src/components/card/examples/examples.module.css +0 -8
- package/src/components/card/examples/flat.tsx +9 -14
- package/src/components/card/examples/kpi-media.tsx +42 -0
- package/src/components/card/examples/narrow.tsx +47 -0
- package/src/components/card/examples/{settings.tsx → overview.tsx} +7 -8
- package/src/components/card/examples/panel-chart.tsx +26 -34
- package/src/components/card/examples/{metrics.tsx → variants.tsx} +12 -18
- package/src/components/checkbox/COMPONENT.md +92 -96
- package/src/components/checkbox/examples/controlled.tsx +41 -0
- package/src/components/checkbox/examples/examples.module.css +47 -43
- package/src/components/checkbox/examples/in-form.tsx +34 -0
- package/src/components/checkbox/examples/indicator.tsx +54 -0
- package/src/components/checkbox/examples/overview.tsx +10 -0
- package/src/components/checkbox/examples/sizes.tsx +5 -10
- package/src/components/checkbox/examples/states.tsx +42 -23
- package/src/components/checkbox/examples/without-label.tsx +3 -7
- package/src/components/code-block/COMPONENT.md +55 -57
- package/src/components/code-block/examples/color-scheme.tsx +4 -15
- package/src/components/code-block/examples/examples.module.css +9 -40
- package/src/components/code-block/examples/{long-lines.tsx → narrow.tsx} +3 -4
- package/src/components/code-block/examples/overview.tsx +19 -0
- package/src/components/code-block/examples/variants.tsx +12 -21
- package/src/components/color-picker/COMPONENT.md +196 -165
- package/src/components/color-picker/examples/controlled.tsx +37 -0
- package/src/components/color-picker/examples/examples.module.css +19 -88
- package/src/components/color-picker/examples/formats.tsx +13 -18
- package/src/components/color-picker/examples/in-form.tsx +44 -0
- package/src/components/color-picker/examples/overview.tsx +37 -0
- package/src/components/color-picker/examples/panel.tsx +12 -13
- package/src/components/color-picker/examples/presets-sizes.tsx +15 -20
- package/src/components/color-picker/examples/presets.tsx +33 -0
- package/src/components/color-picker/examples/sizes.tsx +26 -0
- package/src/components/color-picker/examples/states.tsx +4 -14
- package/src/components/color-picker/examples/validation.tsx +18 -0
- package/src/components/color-swatches/COMPONENT.md +145 -0
- package/src/components/color-swatches/examples/controlled.tsx +22 -0
- package/src/components/color-swatches/examples/examples.module.css +19 -0
- package/src/components/color-swatches/examples/in-form.tsx +35 -0
- package/src/components/color-swatches/examples/overview.tsx +6 -0
- package/src/components/color-swatches/examples/sizes.tsx +19 -0
- package/src/components/color-swatches/examples/states.tsx +20 -0
- package/src/components/color-swatches/examples/wrapping.tsx +12 -0
- package/src/components/command-menu/COMPONENT.md +117 -180
- package/src/components/command-menu/examples/controlled-open.tsx +29 -0
- package/src/components/command-menu/examples/controlled.tsx +19 -26
- package/src/components/command-menu/examples/dismiss.tsx +39 -0
- package/src/components/command-menu/examples/overview.tsx +61 -0
- package/src/components/command-menu/examples/sizes.tsx +30 -51
- package/src/components/command-menu/examples/states.tsx +6 -16
- package/src/components/command-menu/examples/structure.tsx +54 -0
- package/src/components/crossfade/COMPONENT.md +104 -0
- package/src/components/crossfade/examples/examples.module.css +65 -0
- package/src/components/crossfade/examples/overview.tsx +102 -0
- package/src/components/crossfade/examples/record-switch.tsx +67 -0
- package/src/components/data-table/COMPONENT.md +181 -182
- package/src/components/data-table/examples/appearance.tsx +31 -34
- package/src/components/data-table/examples/columns-visibility.tsx +167 -0
- package/src/components/data-table/examples/content-width.tsx +46 -26
- package/src/components/data-table/examples/controlled.tsx +56 -0
- package/src/components/data-table/examples/detail-panel.tsx +23 -28
- package/src/components/data-table/examples/examples.module.css +20 -91
- package/src/components/data-table/examples/infinite-scroll.tsx +17 -18
- package/src/components/data-table/examples/narrow.tsx +28 -38
- package/src/components/data-table/examples/nested-rows.tsx +32 -54
- package/src/components/data-table/examples/numeric.tsx +10 -19
- package/src/components/data-table/examples/overview.tsx +54 -0
- package/src/components/data-table/examples/selection.tsx +11 -15
- package/src/components/data-table/examples/sizes.tsx +22 -33
- package/src/components/data-table/examples/states.tsx +23 -24
- package/src/components/data-table/examples/sticky.tsx +17 -24
- package/src/components/data-table/examples/toolbar.tsx +21 -23
- package/src/components/datepicker/COMPONENT.md +152 -164
- package/src/components/datepicker/examples/controlled-open.tsx +32 -0
- package/src/components/datepicker/examples/controlled.tsx +39 -0
- package/src/components/datepicker/examples/examples.module.css +9 -23
- package/src/components/datepicker/examples/in-form.tsx +32 -45
- package/src/components/datepicker/examples/inline-panel.tsx +3 -3
- package/src/components/datepicker/examples/narrow.tsx +1 -1
- package/src/components/datepicker/examples/overview.tsx +6 -0
- package/src/components/datepicker/examples/range-presets.tsx +6 -5
- package/src/components/datepicker/examples/sizes.tsx +7 -10
- package/src/components/datepicker/examples/states.tsx +9 -30
- package/src/components/datepicker/examples/validation.tsx +26 -0
- package/src/components/datepicker/examples/yearless.tsx +9 -8
- package/src/components/digit-input/COMPONENT.md +96 -58
- package/src/components/digit-input/examples/controlled.tsx +6 -15
- package/src/components/digit-input/examples/examples.module.css +13 -38
- package/src/components/digit-input/examples/full-width.tsx +13 -0
- package/src/components/digit-input/examples/grouped.tsx +11 -0
- package/src/components/digit-input/examples/in-form.tsx +32 -0
- package/src/components/digit-input/examples/on-complete.tsx +20 -0
- package/src/components/digit-input/examples/overview.tsx +6 -0
- package/src/components/digit-input/examples/sizes.tsx +5 -17
- package/src/components/digit-input/examples/states.tsx +6 -50
- package/src/components/digit-input/examples/validation.tsx +17 -0
- package/src/components/divider/COMPONENT.md +62 -53
- package/src/components/divider/examples/align.tsx +14 -0
- package/src/components/divider/examples/examples.module.css +6 -20
- package/src/components/divider/examples/or-separator.tsx +19 -0
- package/src/components/divider/examples/overview.tsx +30 -0
- package/src/components/divider/examples/sizes.tsx +11 -10
- package/src/components/divider/examples/vertical.tsx +21 -0
- package/src/components/divider/examples/with-icon.tsx +26 -0
- package/src/components/dnd/COMPONENT.md +197 -0
- package/src/components/dnd/examples/board.tsx +83 -0
- package/src/components/dnd/examples/drop-zones.tsx +82 -0
- package/src/components/dnd/examples/examples.module.css +89 -0
- package/src/components/dnd/examples/handle.tsx +53 -0
- package/src/components/dnd/examples/narrow.tsx +42 -0
- package/src/components/dnd/examples/overview.tsx +45 -0
- package/src/components/drawer/COMPONENT.md +114 -105
- package/src/components/drawer/examples/controlled-open.tsx +33 -0
- package/src/components/drawer/examples/date-sheet.tsx +41 -0
- package/src/components/drawer/examples/dismiss.tsx +55 -0
- package/src/components/drawer/examples/examples.module.css +8 -24
- package/src/components/drawer/examples/in-form.tsx +82 -0
- package/src/components/drawer/examples/long-content.tsx +40 -0
- package/src/components/drawer/examples/overview.tsx +48 -0
- package/src/components/drawer/examples/{variants-sides.tsx → placement.tsx} +13 -14
- package/src/components/drawer/examples/sizes.tsx +9 -15
- package/src/components/drawer/examples/structure.tsx +35 -0
- package/src/components/dropdown/COMPONENT.md +119 -148
- package/src/components/dropdown/examples/checkbox-items.tsx +48 -0
- package/src/components/dropdown/examples/controlled-open.tsx +32 -0
- package/src/components/dropdown/examples/dismiss.tsx +17 -0
- package/src/components/dropdown/examples/examples.module.css +11 -45
- package/src/components/dropdown/examples/long-list.tsx +42 -0
- package/src/components/dropdown/examples/{full-width.tsx → match-trigger-width.tsx} +5 -4
- package/src/components/dropdown/examples/overview.tsx +41 -0
- package/src/components/dropdown/examples/placement.tsx +16 -13
- package/src/components/dropdown/examples/sizes.tsx +18 -15
- package/src/components/dropdown/examples/states.tsx +21 -29
- package/src/components/dropdown/examples/structure.tsx +56 -0
- package/src/components/empty-page/COMPONENT.md +72 -76
- package/src/components/empty-page/examples/compact.tsx +23 -0
- package/src/components/empty-page/examples/data-region.tsx +8 -11
- package/src/components/empty-page/examples/examples.module.css +22 -25
- package/src/components/empty-page/examples/icon-tones.tsx +5 -6
- package/src/components/empty-page/examples/narrow.tsx +26 -0
- package/src/components/empty-page/examples/{no-results.tsx → overview.tsx} +4 -5
- package/src/components/empty-page/examples/sizes.tsx +14 -20
- package/src/components/example-frame/COMPONENT.md +64 -66
- package/src/components/example-frame/examples/controlled.tsx +42 -0
- package/src/components/example-frame/examples/overview.tsx +16 -0
- package/src/components/file-upload/COMPONENT.md +128 -186
- package/src/components/file-upload/examples/avatar-upload.tsx +7 -12
- package/src/components/file-upload/examples/custom-body.tsx +44 -0
- package/src/components/file-upload/examples/examples.module.css +46 -64
- package/src/components/file-upload/examples/in-form.tsx +76 -0
- package/src/components/file-upload/examples/narrow.tsx +17 -0
- package/src/components/file-upload/examples/overview.tsx +52 -0
- package/src/components/file-upload/examples/sizes.tsx +16 -37
- package/src/components/file-upload/examples/states.tsx +6 -98
- package/src/components/file-upload/examples/upload-progress.tsx +39 -0
- package/src/components/file-upload/examples/validation.tsx +19 -0
- package/src/components/file-upload/examples/variants.tsx +5 -18
- package/src/components/hint/COMPONENT.md +42 -48
- package/src/components/hint/examples/examples.module.css +3 -45
- package/src/components/hint/examples/hint-or-error.tsx +5 -5
- package/src/components/hint/examples/overview.tsx +34 -0
- package/src/components/hint/examples/sizes.tsx +8 -10
- package/src/components/hint/examples/states.tsx +21 -14
- package/src/components/hint/examples/with-icon.tsx +31 -0
- package/src/components/input/COMPONENT.md +70 -88
- package/src/components/input/examples/affixes.tsx +22 -0
- package/src/components/input/examples/controlled.tsx +9 -10
- package/src/components/input/examples/examples.module.css +3 -116
- package/src/components/input/examples/in-form.tsx +35 -14
- package/src/components/input/examples/overview.tsx +12 -0
- package/src/components/input/examples/sizes.tsx +6 -11
- package/src/components/input/examples/states.tsx +6 -23
- package/src/components/input/examples/validation.tsx +35 -0
- package/src/components/input/examples/with-icon.tsx +25 -0
- package/src/components/input/examples/{search-without-focus-ring.tsx → without-focus-ring.tsx} +5 -5
- package/src/components/kanban/COMPONENT.md +181 -0
- package/src/components/kanban/examples/controlled.tsx +78 -0
- package/src/components/kanban/examples/examples.module.css +31 -0
- package/src/components/kanban/examples/limits.tsx +58 -0
- package/src/components/kanban/examples/narrow.tsx +76 -0
- package/src/components/kanban/examples/overview.tsx +130 -0
- package/src/components/kanban/examples/states.tsx +75 -0
- package/src/components/kanban/examples/structure.tsx +76 -0
- package/src/components/kbd/COMPONENT.md +50 -65
- package/src/components/kbd/examples/examples.module.css +11 -41
- package/src/components/kbd/examples/in-controls.tsx +25 -31
- package/src/components/kbd/examples/overview.tsx +24 -0
- package/src/components/kbd/examples/shortcut-list.tsx +12 -12
- package/src/components/kbd/examples/sizes.tsx +8 -13
- package/src/components/label/COMPONENT.md +45 -44
- package/src/components/label/examples/examples.module.css +8 -29
- package/src/components/label/examples/overview.tsx +17 -0
- package/src/components/label/examples/sizes.tsx +9 -13
- package/src/components/label/examples/states.tsx +17 -14
- package/src/components/label/examples/structure.tsx +32 -0
- package/src/components/label/examples/with-icon.tsx +25 -17
- package/src/components/link-button/COMPONENT.md +56 -39
- package/src/components/link-button/examples/as-child.tsx +18 -0
- package/src/components/link-button/examples/external-link.tsx +6 -6
- package/src/components/link-button/examples/overview.tsx +11 -0
- package/src/components/link-button/examples/sizes.tsx +9 -11
- package/src/components/link-button/examples/states.tsx +25 -12
- package/src/components/link-button/examples/variants.tsx +21 -0
- package/src/components/link-button/examples/with-icon.tsx +21 -13
- package/src/components/login-form/COMPONENT.md +162 -0
- package/src/components/login-form/examples/examples.module.css +39 -0
- package/src/components/login-form/examples/forgot-password.tsx +39 -0
- package/src/components/login-form/examples/narrow.tsx +32 -0
- package/src/components/login-form/examples/overview.tsx +58 -0
- package/src/components/login-form/examples/register.tsx +85 -0
- package/src/components/login-form/examples/reset-password.tsx +60 -0
- package/src/components/login-form/examples/sizes.tsx +38 -0
- package/src/components/login-form/examples/states.tsx +75 -0
- package/src/components/login-form/examples/structure.tsx +28 -0
- package/src/components/login-form/examples/verification-code.tsx +57 -0
- package/src/components/modal/COMPONENT.md +71 -88
- package/src/components/modal/examples/{controlled.tsx → controlled-open.tsx} +6 -12
- package/src/components/modal/examples/custom-container.tsx +29 -0
- package/src/components/modal/examples/dismiss.tsx +54 -0
- package/src/components/modal/examples/examples.module.css +4 -20
- package/src/components/modal/examples/in-form.tsx +78 -0
- package/src/components/modal/examples/long-content.tsx +52 -0
- package/src/components/modal/examples/overview.tsx +35 -0
- package/src/components/modal/examples/sizes.tsx +7 -9
- package/src/components/modal/examples/structure.tsx +53 -0
- package/src/components/native-select/COMPONENT.md +132 -0
- package/src/components/native-select/examples/controlled.tsx +26 -0
- package/src/components/native-select/examples/examples.module.css +14 -0
- package/src/components/native-select/examples/in-form.tsx +43 -0
- package/src/components/native-select/examples/option-groups.tsx +17 -0
- package/src/components/native-select/examples/overview.tsx +16 -0
- package/src/components/native-select/examples/sizes.tsx +18 -0
- package/src/components/native-select/examples/states.tsx +21 -0
- package/src/components/native-select/examples/validation.tsx +26 -0
- package/src/components/notification/COMPONENT.md +108 -122
- package/src/components/notification/examples/dismiss.tsx +50 -0
- package/src/components/notification/examples/examples.module.css +10 -23
- package/src/components/notification/examples/in-form.tsx +64 -0
- package/src/components/notification/examples/overview.tsx +24 -0
- package/src/components/notification/examples/placement.tsx +66 -0
- package/src/components/notification/examples/sizes.tsx +11 -18
- package/src/components/notification/examples/stacking.tsx +45 -0
- package/src/components/notification/examples/structure.tsx +20 -0
- package/src/components/notification/examples/tones.tsx +14 -26
- package/src/components/page-content/COMPONENT.md +50 -75
- package/src/components/page-content/examples/examples.module.css +4 -8
- package/src/components/page-content/examples/narrow.tsx +25 -0
- package/src/components/page-content/examples/overview.tsx +41 -0
- package/src/components/page-content/examples/variants.tsx +39 -0
- package/src/components/page-toolbar/COMPONENT.md +142 -0
- package/src/components/page-toolbar/examples/examples.module.css +16 -0
- package/src/components/page-toolbar/examples/narrow.tsx +103 -0
- package/src/components/page-toolbar/examples/overview.tsx +113 -0
- package/src/components/page-toolbar/examples/save-changes.tsx +40 -0
- package/src/components/page-toolbar/examples/without-search.tsx +60 -0
- package/src/components/pagination/COMPONENT.md +73 -64
- package/src/components/pagination/examples/controlled.tsx +51 -0
- package/src/components/pagination/examples/examples.module.css +6 -55
- package/src/components/pagination/examples/narrow.tsx +25 -0
- package/src/components/pagination/examples/overflow.tsx +23 -0
- package/src/components/pagination/examples/overview.tsx +6 -0
- package/src/components/pagination/examples/sizes.tsx +10 -18
- package/src/components/popover/COMPONENT.md +89 -99
- package/src/components/popover/examples/controlled-open.tsx +32 -0
- package/src/components/popover/examples/dismiss.tsx +49 -0
- package/src/components/popover/examples/examples.module.css +21 -41
- package/src/components/popover/examples/flush.tsx +47 -0
- package/src/components/popover/examples/in-form.tsx +54 -0
- package/src/components/popover/examples/{full-width.tsx → match-trigger-width.tsx} +7 -7
- package/src/components/popover/examples/overview.tsx +43 -0
- package/src/components/popover/examples/placement.tsx +17 -15
- package/src/components/popover/examples/sizes.tsx +12 -9
- package/src/components/popover/examples/structure.tsx +50 -0
- package/src/components/progress-bar/COMPONENT.md +103 -62
- package/src/components/progress-bar/examples/custom-max.tsx +12 -0
- package/src/components/progress-bar/examples/examples.module.css +4 -34
- package/src/components/progress-bar/examples/overview.tsx +12 -0
- package/src/components/progress-bar/examples/segments.tsx +32 -0
- package/src/components/progress-bar/examples/sizes.tsx +11 -8
- package/src/components/progress-bar/examples/variants.tsx +34 -0
- package/src/components/progress-circle/COMPONENT.md +102 -61
- package/src/components/progress-circle/examples/examples.module.css +2 -39
- package/src/components/progress-circle/examples/inner-content.tsx +35 -0
- package/src/components/progress-circle/examples/overview.tsx +10 -0
- package/src/components/progress-circle/examples/segments.tsx +64 -0
- package/src/components/progress-circle/examples/sizes.tsx +10 -12
- package/src/components/progress-circle/examples/variants.tsx +28 -0
- package/src/components/radio/COMPONENT.md +93 -114
- package/src/components/radio/examples/controlled.tsx +30 -0
- package/src/components/radio/examples/group.tsx +23 -0
- package/src/components/radio/examples/orientation.tsx +34 -0
- package/src/components/radio/examples/overview.tsx +18 -0
- package/src/components/radio/examples/sizes.tsx +7 -12
- package/src/components/radio/examples/states.tsx +42 -30
- package/src/components/scroll-container/COMPONENT.md +57 -29
- package/src/components/scroll-container/examples/edge-fade.tsx +53 -0
- package/src/components/scroll-container/examples/examples.module.css +7 -7
- package/src/components/scroll-container/examples/overscroll.tsx +27 -0
- package/src/components/scroll-container/examples/overview.tsx +27 -0
- package/src/components/scroll-container/examples/variants.tsx +54 -0
- package/src/components/segmented-control/COMPONENT.md +93 -107
- package/src/components/segmented-control/examples/colors.tsx +8 -13
- package/src/components/segmented-control/examples/controlled.tsx +10 -6
- package/src/components/segmented-control/examples/examples.module.css +2 -88
- package/src/components/segmented-control/examples/full-width.tsx +7 -44
- package/src/components/segmented-control/examples/overview.tsx +12 -0
- package/src/components/segmented-control/examples/scroll.tsx +16 -0
- package/src/components/segmented-control/examples/sizes.tsx +8 -20
- package/src/components/segmented-control/examples/states.tsx +28 -34
- package/src/components/segmented-control/examples/two-line.tsx +17 -104
- package/src/components/segmented-control/examples/with-icon.tsx +52 -0
- package/src/components/select/COMPONENT.md +155 -208
- package/src/components/select/examples/clearable.tsx +23 -0
- package/src/components/select/examples/controlled-open.tsx +30 -0
- package/src/components/select/examples/controlled.tsx +17 -10
- package/src/components/select/examples/examples.module.css +18 -38
- package/src/components/select/examples/in-form.tsx +59 -70
- package/src/components/select/examples/multiple.tsx +21 -33
- package/src/components/select/examples/overview.tsx +17 -0
- package/src/components/select/examples/rich-options.tsx +43 -69
- package/src/components/select/examples/searchable.tsx +42 -0
- package/src/components/select/examples/sizes.tsx +13 -17
- package/src/components/select/examples/states.tsx +34 -48
- package/src/components/select/examples/validation.tsx +41 -0
- package/src/components/select/examples/with-icon.tsx +35 -0
- package/src/components/skeleton/COMPONENT.md +104 -0
- package/src/components/skeleton/examples/examples.module.css +89 -0
- package/src/components/skeleton/examples/form.tsx +20 -0
- package/src/components/skeleton/examples/overview.tsx +21 -0
- package/src/components/skeleton/examples/sizes.tsx +24 -0
- package/src/components/skeleton/examples/with-crossfade.tsx +68 -0
- package/src/components/slider/COMPONENT.md +105 -68
- package/src/components/slider/examples/controlled.tsx +26 -30
- package/src/components/slider/examples/examples.module.css +8 -32
- package/src/components/slider/examples/hint-and-error.tsx +33 -0
- package/src/components/slider/examples/overview.tsx +6 -0
- package/src/components/slider/examples/range-step.tsx +7 -17
- package/src/components/slider/examples/sizes.tsx +8 -6
- package/src/components/slider/examples/states.tsx +11 -8
- package/src/components/slider/examples/value-format.tsx +13 -25
- package/src/components/slider/examples/variants.tsx +23 -0
- package/src/components/smart-filter/COMPONENT.md +184 -0
- package/src/components/smart-filter/examples/controlled.tsx +48 -0
- package/src/components/smart-filter/examples/examples.module.css +56 -0
- package/src/components/smart-filter/examples/many-values.tsx +53 -0
- package/src/components/smart-filter/examples/narrow.tsx +38 -0
- package/src/components/smart-filter/examples/overview.tsx +109 -0
- package/src/components/smart-filter/examples/sizes.tsx +33 -0
- package/src/components/spinner/COMPONENT.md +112 -0
- package/src/components/spinner/examples/examples.module.css +20 -0
- package/src/components/spinner/examples/loading-region.tsx +22 -0
- package/src/components/spinner/examples/overview.tsx +15 -0
- package/src/components/spinner/examples/sizes.tsx +19 -0
- package/src/components/spinner/examples/variants.tsx +19 -0
- package/src/components/stepper/COMPONENT.md +83 -78
- package/src/components/stepper/examples/controlled.tsx +46 -0
- package/src/components/stepper/examples/examples.module.css +9 -40
- package/src/components/stepper/examples/narrow.tsx +11 -19
- package/src/components/stepper/examples/orientation.tsx +21 -59
- package/src/components/stepper/examples/overview.tsx +28 -0
- package/src/components/stepper/examples/sizes.tsx +19 -28
- package/src/components/stepper/examples/states.tsx +20 -21
- package/src/components/stepper/examples/with-icon.tsx +29 -0
- package/src/components/switch/COMPONENT.md +75 -94
- package/src/components/switch/examples/controlled.tsx +8 -6
- package/src/components/switch/examples/examples.module.css +13 -45
- package/src/components/switch/examples/in-form.tsx +20 -24
- package/src/components/switch/examples/overview.tsx +10 -0
- package/src/components/switch/examples/settings-row.tsx +14 -22
- package/src/components/switch/examples/sizes.tsx +5 -10
- package/src/components/switch/examples/states.tsx +37 -25
- package/src/components/tabs/COMPONENT.md +156 -86
- package/src/components/tabs/examples/closable.tsx +48 -0
- package/src/components/tabs/examples/controlled.tsx +14 -20
- package/src/components/tabs/examples/examples.module.css +13 -93
- package/src/components/tabs/examples/orientation.tsx +40 -0
- package/src/components/tabs/examples/overflow.tsx +60 -0
- package/src/components/tabs/examples/overview.tsx +30 -0
- package/src/components/tabs/examples/sizes.tsx +19 -19
- package/src/components/tabs/examples/states.tsx +20 -55
- package/src/components/tabs/examples/two-line.tsx +22 -29
- package/src/components/tabs/examples/variants.tsx +40 -0
- package/src/components/tabs/examples/with-icon.tsx +44 -0
- package/src/components/tag-select/COMPONENT.md +119 -122
- package/src/components/tag-select/examples/controlled-open.tsx +29 -0
- package/src/components/tag-select/examples/controlled.tsx +26 -0
- package/src/components/tag-select/examples/creatable.tsx +28 -0
- package/src/components/tag-select/examples/examples.module.css +3 -22
- package/src/components/tag-select/examples/in-form.tsx +44 -41
- package/src/components/tag-select/examples/manage-tags.tsx +20 -39
- package/src/components/tag-select/examples/many-tags.tsx +20 -0
- package/src/components/tag-select/examples/overview.tsx +21 -0
- package/src/components/tag-select/examples/sizes.tsx +7 -10
- package/src/components/tag-select/examples/states.tsx +11 -36
- package/src/components/tag-select/examples/validation.tsx +35 -0
- package/src/components/textarea/COMPONENT.md +50 -50
- package/src/components/textarea/examples/auto-resize.tsx +21 -0
- package/src/components/textarea/examples/controlled.tsx +12 -16
- package/src/components/textarea/examples/examples.module.css +15 -48
- package/src/components/textarea/examples/in-form.tsx +52 -48
- package/src/components/textarea/examples/overview.tsx +12 -0
- package/src/components/textarea/examples/sizes.tsx +6 -7
- package/src/components/textarea/examples/states.tsx +9 -13
- package/src/components/textarea/examples/validation.tsx +34 -0
- package/src/components/textarea/examples/without-focus-ring.tsx +12 -0
- package/src/components/thumbnail/COMPONENT.md +150 -0
- package/src/components/thumbnail/examples/examples.module.css +45 -0
- package/src/components/thumbnail/examples/full-width.tsx +48 -0
- package/src/components/thumbnail/examples/overview.tsx +31 -0
- package/src/components/thumbnail/examples/ratios.tsx +25 -0
- package/src/components/thumbnail/examples/ring.tsx +29 -0
- package/src/components/thumbnail/examples/sizes.tsx +23 -0
- package/src/components/thumbnail/examples/states.tsx +38 -0
- package/src/components/thumbnail/examples/variants.tsx +28 -0
- package/src/components/timeline/COMPONENT.md +92 -203
- package/src/components/timeline/examples/examples.module.css +5 -20
- package/src/components/timeline/examples/links.tsx +28 -0
- package/src/components/timeline/examples/narrow.tsx +30 -38
- package/src/components/timeline/examples/{activity-feed.tsx → overview.tsx} +9 -17
- package/src/components/timeline/examples/sizes.tsx +22 -28
- package/src/components/timeline/examples/{service-history.tsx → structure.tsx} +10 -8
- package/src/components/timeline/examples/{colors-and-tones.tsx → variants.tsx} +11 -16
- package/src/components/tooltip/COMPONENT.md +74 -62
- package/src/components/tooltip/examples/{controlled.tsx → controlled-open.tsx} +5 -7
- package/src/components/tooltip/examples/delay.tsx +19 -28
- package/src/components/tooltip/examples/disabled-trigger.tsx +18 -0
- package/src/components/tooltip/examples/examples.module.css +3 -33
- package/src/components/tooltip/examples/long-content.tsx +12 -15
- package/src/components/tooltip/examples/overview.tsx +17 -0
- package/src/components/tooltip/examples/placement.tsx +30 -0
- package/src/components/tooltip/examples/sizes.tsx +12 -15
- package/src/components/tooltip/examples/toolbar.tsx +35 -0
- package/src/components/typography/COMPONENT.md +68 -99
- package/src/components/typography/examples/article.tsx +23 -36
- package/src/components/typography/examples/examples.module.css +20 -54
- package/src/components/typography/examples/inline-emphasis.tsx +20 -0
- package/src/components/typography/examples/overview.tsx +20 -0
- package/src/components/typography/examples/semantic-tag.tsx +17 -0
- package/src/components/typography/examples/truncate.tsx +7 -7
- package/src/components/typography/examples/variants.tsx +43 -42
- package/src/components/typography/examples/weights.tsx +31 -0
- package/src/layout/app-header/COMPONENT.md +178 -0
- package/src/layout/app-header/examples/breadcrumbs.tsx +36 -0
- package/src/layout/app-header/examples/examples.module.css +47 -0
- package/src/layout/app-header/examples/in-app-shell.tsx +70 -0
- package/src/layout/app-header/examples/narrow.tsx +29 -0
- package/src/layout/app-header/examples/overview.tsx +36 -0
- package/src/layout/app-shell/COMPONENT.md +63 -63
- package/src/layout/app-shell/examples/contained.tsx +5 -5
- package/src/layout/app-shell/examples/examples.module.css +24 -0
- package/src/layout/app-shell/examples/footer.tsx +59 -0
- package/src/layout/app-shell/examples/overview.tsx +83 -0
- package/src/layout/app-shell/examples/template.tsx +54 -0
- package/src/layout/bottom-nav/COMPONENT.md +153 -0
- package/src/layout/bottom-nav/examples/examples.module.css +39 -0
- package/src/layout/bottom-nav/examples/floating.tsx +89 -0
- package/src/layout/bottom-nav/examples/icon-only.tsx +41 -0
- package/src/layout/bottom-nav/examples/in-app-shell.tsx +64 -0
- package/src/layout/bottom-nav/examples/overview.tsx +44 -0
- package/src/layout/bottom-nav/examples/router.tsx +31 -0
- package/src/layout/bottom-nav/examples/structure.tsx +47 -0
- package/src/layout/sidebar/COMPONENT.md +304 -111
- package/src/layout/sidebar/examples/account.tsx +88 -0
- package/src/layout/sidebar/examples/brand-header.tsx +45 -0
- package/src/layout/sidebar/examples/collapsible-groups.tsx +77 -0
- package/src/layout/sidebar/examples/controlled-open.tsx +55 -0
- package/src/layout/sidebar/examples/controlled.tsx +68 -0
- package/src/layout/sidebar/examples/examples.module.css +17 -3
- package/src/layout/sidebar/examples/nested-items.tsx +74 -0
- package/src/layout/sidebar/examples/overview.tsx +126 -0
- package/src/layout/sidebar/examples/router.tsx +19 -13
- package/src/layout/sidebar/examples/sizes.tsx +17 -12
- package/src/layout/sidebar/examples/structure.tsx +81 -0
- package/src/styles/fonts.css +4 -0
- package/src/styles/globals.css +18 -29
- package/src/styles/reset.css +2 -0
- package/src/styles/theme-dark.css +6 -0
- package/src/styles/theme-light.css +58 -23
- package/src/styles/tokens.css +11 -77
- package/dist/components/accordion/Accordion.d.ts.map +0 -1
- package/dist/components/avatar/Avatar.d.ts.map +0 -1
- package/dist/components/badge/Badge.d.ts.map +0 -1
- package/dist/components/badge/tier.d.ts.map +0 -1
- package/dist/components/banner/Banner.d.ts.map +0 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +0 -1
- package/dist/components/button/Button.d.ts.map +0 -1
- package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
- package/dist/components/card/Card.d.ts.map +0 -1
- package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/code-block/CodeBlock.d.ts.map +0 -1
- package/dist/components/color-picker/ColorPicker.d.ts.map +0 -1
- package/dist/components/color-picker/ColorPresets.d.ts.map +0 -1
- package/dist/components/command-menu/CommandMenu.d.ts.map +0 -1
- package/dist/components/data-table/DataTable.d.ts.map +0 -1
- package/dist/components/datepicker/Datepicker.d.ts.map +0 -1
- package/dist/components/datepicker/datepickerModel.d.ts.map +0 -1
- package/dist/components/digit-input/DigitInput.d.ts.map +0 -1
- package/dist/components/divider/Divider.d.ts.map +0 -1
- package/dist/components/drawer/Drawer.d.ts.map +0 -1
- package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
- package/dist/components/dropdown/dropdownGeometry.d.ts +0 -10
- package/dist/components/dropdown/dropdownGeometry.d.ts.map +0 -1
- package/dist/components/dropdown/menuKeyboard.d.ts +0 -4
- package/dist/components/dropdown/menuKeyboard.d.ts.map +0 -1
- package/dist/components/dropdown/useDropdownPosition.d.ts +0 -18
- package/dist/components/dropdown/useDropdownPosition.d.ts.map +0 -1
- package/dist/components/empty-page/EmptyPage.d.ts.map +0 -1
- package/dist/components/example-frame/ExampleFrame.d.ts.map +0 -1
- package/dist/components/file-upload/FileUpload.d.ts.map +0 -1
- package/dist/components/hint/Hint.d.ts.map +0 -1
- package/dist/components/index.css +0 -11181
- package/dist/components/index.css.map +0 -7
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -13833
- package/dist/components/index.js.map +0 -7
- package/dist/components/input/Input.d.ts.map +0 -1
- package/dist/components/kbd/Kbd.d.ts.map +0 -1
- package/dist/components/label/Label.d.ts.map +0 -1
- package/dist/components/link-button/LinkButton.d.ts.map +0 -1
- package/dist/components/modal/DialogParts.d.ts.map +0 -1
- package/dist/components/modal/Modal.d.ts.map +0 -1
- package/dist/components/modal/useInertSiblings.d.ts +0 -7
- package/dist/components/modal/useInertSiblings.d.ts.map +0 -1
- package/dist/components/notification/Notification.d.ts.map +0 -1
- package/dist/components/notification/NotificationStore.d.ts.map +0 -1
- package/dist/components/page-content/PageContent.d.ts.map +0 -1
- package/dist/components/pagination/Pagination.d.ts.map +0 -1
- package/dist/components/popover/Popover.d.ts.map +0 -1
- package/dist/components/popover/popoverGeometry.d.ts +0 -6
- package/dist/components/popover/popoverGeometry.d.ts.map +0 -1
- package/dist/components/popover/usePopoverPosition.d.ts +0 -18
- package/dist/components/popover/usePopoverPosition.d.ts.map +0 -1
- package/dist/components/progress-bar/ProgressBar.d.ts.map +0 -1
- package/dist/components/progress-circle/ProgressCircle.d.ts.map +0 -1
- package/dist/components/radio/Radio.d.ts.map +0 -1
- package/dist/components/scroll-container/ScrollContainer.d.ts.map +0 -1
- package/dist/components/segmented-control/SegmentedControl.d.ts.map +0 -1
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +0 -29
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts.map +0 -1
- package/dist/components/select/Select.d.ts.map +0 -1
- package/dist/components/select/selectIcons.d.ts +0 -15
- package/dist/components/select/selectIcons.d.ts.map +0 -1
- package/dist/components/select/selectListbox.d.ts +0 -13
- package/dist/components/select/selectListbox.d.ts.map +0 -1
- package/dist/components/slider/Slider.d.ts.map +0 -1
- package/dist/components/stepper/Stepper.d.ts.map +0 -1
- package/dist/components/switch/Switch.d.ts.map +0 -1
- package/dist/components/tabs/Tabs.d.ts.map +0 -1
- package/dist/components/tag/Tag.d.ts +0 -47
- package/dist/components/tag/Tag.d.ts.map +0 -1
- package/dist/components/tag-select/TagSelect.d.ts.map +0 -1
- package/dist/components/textarea/Textarea.d.ts.map +0 -1
- package/dist/components/timeline/Timeline.d.ts.map +0 -1
- package/dist/components/tooltip/Tooltip.d.ts.map +0 -1
- package/dist/components/typography/Typography.d.ts.map +0 -1
- package/dist/hooks/useControllableState.d.ts.map +0 -1
- package/dist/hooks/useEscapeKey.d.ts +0 -7
- package/dist/hooks/useEscapeKey.d.ts.map +0 -1
- package/dist/hooks/useFieldIds.d.ts +0 -17
- package/dist/hooks/useFieldIds.d.ts.map +0 -1
- package/dist/hooks/useFocusTrap.d.ts +0 -20
- package/dist/hooks/useFocusTrap.d.ts.map +0 -1
- package/dist/hooks/useMergedRefs.d.ts.map +0 -1
- package/dist/hooks/useModalKeyboard.d.ts +0 -14
- package/dist/hooks/useModalKeyboard.d.ts.map +0 -1
- package/dist/hooks/useOutsideClick.d.ts +0 -26
- package/dist/hooks/useOutsideClick.d.ts.map +0 -1
- package/dist/hooks/useOverlayModal.d.ts +0 -7
- package/dist/hooks/useOverlayModal.d.ts.map +0 -1
- package/dist/hooks/usePosition.d.ts.map +0 -1
- package/dist/hooks/usePresence.d.ts.map +0 -1
- package/dist/hooks/useResponsiveMonths.d.ts +0 -18
- package/dist/hooks/useResponsiveMonths.d.ts.map +0 -1
- package/dist/hooks/useScrollLock.d.ts.map +0 -1
- package/dist/icons/Icon.d.ts.map +0 -1
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/index.css.map +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/internal/ControlSizeContext.d.ts.map +0 -1
- package/dist/internal/DividerContentContext.d.ts +0 -4
- package/dist/internal/DividerContentContext.d.ts.map +0 -1
- package/dist/internal/FieldFrame.d.ts.map +0 -1
- package/dist/internal/OverlayPortalLayerContext.d.ts +0 -13
- package/dist/internal/OverlayPortalLayerContext.d.ts.map +0 -1
- package/dist/internal/Portal.d.ts.map +0 -1
- package/dist/internal/context.d.ts.map +0 -1
- package/dist/internal/cx.d.ts.map +0 -1
- package/dist/internal/data-attributes.d.ts.map +0 -1
- package/dist/internal/highlightTsxHtml.d.ts.map +0 -1
- package/dist/internal/layoutPxFromPrimitives.d.ts.map +0 -1
- package/dist/internal/mergeRefs.d.ts.map +0 -1
- package/dist/internal/runtimeUnits.d.ts +0 -3
- package/dist/internal/runtimeUnits.d.ts.map +0 -1
- package/dist/internal/scrollAncestors.d.ts.map +0 -1
- package/dist/internal/slot.d.ts.map +0 -1
- package/dist/internal/states.d.ts.map +0 -1
- package/dist/internal/useFieldDescriptions.d.ts +0 -18
- package/dist/internal/useFieldDescriptions.d.ts.map +0 -1
- package/dist/layout/app-shell/AppShell.d.ts.map +0 -1
- package/dist/layout/index.d.ts.map +0 -1
- package/dist/layout/sidebar/Sidebar.d.ts.map +0 -1
- package/dist/theme/applyTheme.d.ts.map +0 -1
- package/dist/tokens/primitives.d.ts.map +0 -1
- package/dist/tokens/semantic.d.ts.map +0 -1
- package/dist/tokens/themes/dark.d.ts.map +0 -1
- package/dist/tokens/themes/light.d.ts +0 -3
- package/dist/tokens/themes/light.d.ts.map +0 -1
- package/src/components/accordion/examples/checkout.tsx +0 -73
- package/src/components/accordion/examples/layouts.tsx +0 -58
- package/src/components/avatar/examples/colors.tsx +0 -29
- package/src/components/avatar/examples/group.tsx +0 -35
- package/src/components/avatar/examples/team-card.tsx +0 -70
- package/src/components/badge/examples/icons.tsx +0 -37
- package/src/components/badge/examples/order-list.tsx +0 -48
- package/src/components/badge/examples/palette.tsx +0 -44
- package/src/components/badge/examples/surfaces.tsx +0 -21
- package/src/components/banner/examples/dismiss.tsx +0 -48
- package/src/components/banner/examples/placement.tsx +0 -92
- package/src/components/breadcrumb/examples/collapse.tsx +0 -56
- package/src/components/breadcrumb/examples/page-header.tsx +0 -31
- package/src/components/button/examples/composition.tsx +0 -46
- package/src/components/button/examples/controlled.tsx +0 -18
- package/src/components/button/examples/full-width.tsx +0 -15
- package/src/components/button/examples/icon-only.tsx +0 -42
- package/src/components/button/examples/surfaces.tsx +0 -18
- package/src/components/button/examples/variants-tones.tsx +0 -39
- package/src/components/button-group/examples/composition.tsx +0 -99
- package/src/components/card/examples/mini-media.tsx +0 -55
- package/src/components/card/examples/responsive.tsx +0 -72
- package/src/components/checkbox/examples/hint-error.tsx +0 -22
- package/src/components/checkbox/examples/select-all.tsx +0 -40
- package/src/components/checkbox/examples/settings-card.tsx +0 -76
- package/src/components/code-block/examples/api-docs.tsx +0 -31
- package/src/components/code-block/examples/controlled.tsx +0 -38
- package/src/components/code-block/examples/surfaces.tsx +0 -7
- package/src/components/color-picker/examples/brand-color.tsx +0 -73
- package/src/components/color-picker/examples/hex-input-sizes.tsx +0 -54
- package/src/components/color-picker/examples/presets-quick.tsx +0 -57
- package/src/components/color-picker/examples/presets-tags.tsx +0 -52
- package/src/components/command-menu/examples/composition.tsx +0 -91
- package/src/components/command-menu/examples/examples.module.css +0 -9
- package/src/components/command-menu/examples/keyboard-search.tsx +0 -94
- package/src/components/data-table/examples/dashboard.tsx +0 -205
- package/src/components/data-table/examples/sorting-pagination.tsx +0 -66
- package/src/components/datepicker/examples/badge.tsx +0 -19
- package/src/components/datepicker/examples/single.tsx +0 -16
- package/src/components/digit-input/examples/length-and-complete.tsx +0 -30
- package/src/components/digit-input/examples/surfaces.tsx +0 -6
- package/src/components/digit-input/examples/verification-step.tsx +0 -62
- package/src/components/divider/examples/composition.tsx +0 -49
- package/src/components/divider/examples/variants.tsx +0 -62
- package/src/components/drawer/examples/composition.tsx +0 -94
- package/src/components/drawer/examples/controlled.tsx +0 -42
- package/src/components/drawer/examples/features.tsx +0 -48
- package/src/components/drawer/examples/states.tsx +0 -54
- package/src/components/dropdown/examples/as-child.tsx +0 -23
- package/src/components/dropdown/examples/composition.tsx +0 -91
- package/src/components/dropdown/examples/controlled.tsx +0 -32
- package/src/components/dropdown/examples/row-actions.tsx +0 -56
- package/src/components/dropdown/examples/variants.tsx +0 -52
- package/src/components/example-frame/examples/basic.tsx +0 -18
- package/src/components/file-upload/examples/file-list.tsx +0 -67
- package/src/components/file-upload/examples/in-card.tsx +0 -84
- package/src/components/hint/examples/field-states.tsx +0 -60
- package/src/components/hint/examples/in-form.tsx +0 -45
- package/src/components/input/examples/anatomy.tsx +0 -70
- package/src/components/input/examples/control-alignment.tsx +0 -57
- package/src/components/input/examples/full-width.tsx +0 -23
- package/src/components/input/examples/icons-and-affixes.tsx +0 -32
- package/src/components/input/examples/reserved-support-row.tsx +0 -33
- package/src/components/input/examples/surfaces.tsx +0 -12
- package/src/components/input/examples/with-badge.tsx +0 -40
- package/src/components/kbd/examples/modifier-keys.tsx +0 -24
- package/src/components/label/examples/in-form.tsx +0 -39
- package/src/components/label/examples/markers.tsx +0 -27
- package/src/components/link-button/examples/composition.tsx +0 -30
- package/src/components/link-button/examples/examples.module.css +0 -46
- package/src/components/link-button/examples/tones.tsx +0 -15
- package/src/components/modal/examples/composition.tsx +0 -87
- package/src/components/modal/examples/features.tsx +0 -68
- package/src/components/modal/examples/link.tsx +0 -79
- package/src/components/modal/examples/states.tsx +0 -73
- package/src/components/notification/examples/features.tsx +0 -42
- package/src/components/notification/examples/live.tsx +0 -128
- package/src/components/notification/examples/save-form.tsx +0 -59
- package/src/components/page-content/examples/readable.tsx +0 -24
- package/src/components/page-content/examples/settings-page.tsx +0 -49
- package/src/components/page-content/examples/widths.tsx +0 -39
- package/src/components/pagination/examples/compact.tsx +0 -36
- package/src/components/pagination/examples/list-footer.tsx +0 -50
- package/src/components/pagination/examples/states.tsx +0 -44
- package/src/components/popover/examples/as-child.tsx +0 -29
- package/src/components/popover/examples/composition.tsx +0 -45
- package/src/components/popover/examples/controlled.tsx +0 -39
- package/src/components/popover/examples/features.tsx +0 -56
- package/src/components/popover/examples/inset-variants.tsx +0 -58
- package/src/components/popover/examples/states.tsx +0 -48
- package/src/components/progress-bar/examples/file-upload.tsx +0 -52
- package/src/components/progress-bar/examples/values-and-tones.tsx +0 -17
- package/src/components/progress-circle/examples/goals-card.tsx +0 -37
- package/src/components/progress-circle/examples/values-and-tones.tsx +0 -56
- package/src/components/radio/examples/examples.module.css +0 -43
- package/src/components/radio/examples/hint-error.tsx +0 -28
- package/src/components/radio/examples/horizontal.tsx +0 -33
- package/src/components/radio/examples/plan-picker.tsx +0 -55
- package/src/components/scroll-container/examples/both-axes.tsx +0 -57
- package/src/components/scroll-container/examples/list.tsx +0 -44
- package/src/components/segmented-control/examples/item-content.tsx +0 -78
- package/src/components/segmented-control/examples/surfaces.tsx +0 -82
- package/src/components/segmented-control/examples/toolbar.tsx +0 -56
- package/src/components/segmented-progress-bar/COMPONENT.md +0 -128
- package/src/components/segmented-progress-bar/examples/examples.module.css +0 -68
- package/src/components/segmented-progress-bar/examples/segment-gap.tsx +0 -24
- package/src/components/segmented-progress-bar/examples/sizes.tsx +0 -31
- package/src/components/segmented-progress-bar/examples/storage-distribution.tsx +0 -41
- package/src/components/select/examples/native.tsx +0 -21
- package/src/components/select/examples/search-groups.tsx +0 -61
- package/src/components/select/examples/with-badge.tsx +0 -47
- package/src/components/slider/examples/basic.tsx +0 -6
- package/src/components/slider/examples/display-settings.tsx +0 -41
- package/src/components/stepper/examples/wizard.tsx +0 -62
- package/src/components/switch/examples/notification-settings.tsx +0 -37
- package/src/components/switch/examples/on-off.tsx +0 -15
- package/src/components/switch/examples/validation.tsx +0 -19
- package/src/components/tabs/examples/horizontal.tsx +0 -30
- package/src/components/tabs/examples/vertical.tsx +0 -101
- package/src/components/tag/COMPONENT.md +0 -179
- package/src/components/tag/examples/colors.tsx +0 -49
- package/src/components/tag/examples/examples.module.css +0 -47
- package/src/components/tag/examples/sizes.tsx +0 -23
- package/src/components/tag/examples/states.tsx +0 -19
- package/src/components/tag/examples/surfaces.tsx +0 -16
- package/src/components/tag/examples/with-icon.tsx +0 -29
- package/src/components/textarea/examples/height-and-limits.tsx +0 -45
- package/src/components/textarea/examples/hint-and-error.tsx +0 -21
- package/src/components/textarea/examples/reserved-support-row.tsx +0 -37
- package/src/components/textarea/examples/surfaces.tsx +0 -11
- package/src/components/textarea/examples/with-label.tsx +0 -22
- package/src/components/timeline/examples/hover-highlight.tsx +0 -48
- package/src/components/timeline/examples/in-card.tsx +0 -48
- package/src/components/timeline/examples/selectable.tsx +0 -58
- package/src/components/tooltip/examples/composition.tsx +0 -37
- package/src/components/tooltip/examples/side.tsx +0 -29
- package/src/components/tooltip/examples/states.tsx +0 -45
- package/src/components/typography/examples/as-prop.tsx +0 -25
- package/src/components/typography/examples/composition.tsx +0 -23
- package/src/components/typography/examples/full-width.tsx +0 -29
- package/src/components/typography/examples/reading-and-form.tsx +0 -35
- package/src/components/typography/examples/states.tsx +0 -23
- package/src/components/typography/examples/tones.tsx +0 -34
- package/src/components/typography/examples/variant-catalog.tsx +0 -41
- package/src/layout/app-shell/examples/with-sidebar.tsx +0 -63
- package/src/layout/sidebar/examples/modes.tsx +0 -55
- package/src/layout/sidebar/examples/responsive.tsx +0 -44
- package/src/layout/sidebar/examples/states.tsx +0 -34
|
@@ -1,27 +1,20 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** A default field next to a disabled and a read-only one — `disabled`, `readOnly`. */
|
|
2
2
|
import { Icon, Input } from "prime-ui-kit";
|
|
3
3
|
|
|
4
|
-
import styles from "./examples.module.css";
|
|
5
|
-
|
|
6
4
|
export default function InputStatesExample() {
|
|
7
5
|
return (
|
|
8
|
-
|
|
9
|
-
<Input.Root label="
|
|
6
|
+
<>
|
|
7
|
+
<Input.Root label="default">
|
|
10
8
|
<Input.Wrapper>
|
|
11
9
|
<Input.Field placeholder="Например, Москва" />
|
|
12
10
|
</Input.Wrapper>
|
|
13
11
|
</Input.Root>
|
|
14
|
-
<Input.Root label="
|
|
15
|
-
<Input.Wrapper>
|
|
16
|
-
<Input.Field defaultValue="Санкт-Петербург" />
|
|
17
|
-
</Input.Wrapper>
|
|
18
|
-
</Input.Root>
|
|
19
|
-
<Input.Root label="Отключено" hint="Значение нельзя изменить">
|
|
12
|
+
<Input.Root label="disabled">
|
|
20
13
|
<Input.Wrapper>
|
|
21
14
|
<Input.Field defaultValue="Екатеринбург" disabled />
|
|
22
15
|
</Input.Wrapper>
|
|
23
16
|
</Input.Root>
|
|
24
|
-
<Input.Root label="
|
|
17
|
+
<Input.Root label="readOnly">
|
|
25
18
|
<Input.Wrapper>
|
|
26
19
|
<Input.Field defaultValue="ID 4821-0093" readOnly />
|
|
27
20
|
<Input.Icon side="end">
|
|
@@ -29,16 +22,6 @@ export default function InputStatesExample() {
|
|
|
29
22
|
</Input.Icon>
|
|
30
23
|
</Input.Wrapper>
|
|
31
24
|
</Input.Root>
|
|
32
|
-
|
|
33
|
-
<Input.Wrapper>
|
|
34
|
-
<Input.Field placeholder="Город" />
|
|
35
|
-
</Input.Wrapper>
|
|
36
|
-
</Input.Root>
|
|
37
|
-
<Input.Root invalid label="Ошибка без текста" hint="invalid — только кольцо">
|
|
38
|
-
<Input.Wrapper>
|
|
39
|
-
<Input.Field defaultValue="Казань" />
|
|
40
|
-
</Input.Wrapper>
|
|
41
|
-
</Input.Root>
|
|
42
|
-
</div>
|
|
25
|
+
</>
|
|
43
26
|
);
|
|
44
27
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Required and optional markers, a hint, an error and a support row that does not shift — `required`, `optional`, `hint`, `error`, `reserveSupportRow`. */
|
|
2
|
+
import { Button, Input } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
export default function InputValidationExample() {
|
|
6
|
+
const [checked, setChecked] = React.useState(false);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<Input.Root label="Название организации" required hint="Как в учредительных документах">
|
|
11
|
+
<Input.Wrapper>
|
|
12
|
+
<Input.Field defaultValue="ООО «Северный ветер»" autoComplete="organization" />
|
|
13
|
+
</Input.Wrapper>
|
|
14
|
+
</Input.Root>
|
|
15
|
+
<Input.Root label="ИНН" required error="ИНН состоит из 10 или 12 цифр">
|
|
16
|
+
<Input.Wrapper>
|
|
17
|
+
<Input.Field defaultValue="77010" inputMode="numeric" />
|
|
18
|
+
</Input.Wrapper>
|
|
19
|
+
</Input.Root>
|
|
20
|
+
<Input.Root
|
|
21
|
+
label="Промокод"
|
|
22
|
+
optional
|
|
23
|
+
reserveSupportRow
|
|
24
|
+
error={checked ? "Промокод недействителен или истёк" : undefined}
|
|
25
|
+
>
|
|
26
|
+
<Input.Wrapper>
|
|
27
|
+
<Input.Field defaultValue="SPRING25" />
|
|
28
|
+
</Input.Wrapper>
|
|
29
|
+
</Input.Root>
|
|
30
|
+
<Button.Root variant="soft" tone="neutral" onClick={() => setChecked((value) => !value)}>
|
|
31
|
+
{checked ? "Сбросить проверку" : "Проверить промокод"}
|
|
32
|
+
</Button.Root>
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** A decorative icon at either end of the value — `Input.Icon`, `side`. */
|
|
2
|
+
import { Icon, Input } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
export default function InputWithIconExample() {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<Input.Root label="Поиск по каталогу">
|
|
8
|
+
<Input.Wrapper>
|
|
9
|
+
<Input.Icon side="start">
|
|
10
|
+
<Icon name="action.search" tone="secondary" />
|
|
11
|
+
</Input.Icon>
|
|
12
|
+
<Input.Field type="search" placeholder="Название или артикул" />
|
|
13
|
+
</Input.Wrapper>
|
|
14
|
+
</Input.Root>
|
|
15
|
+
<Input.Root label="Номер договора">
|
|
16
|
+
<Input.Wrapper>
|
|
17
|
+
<Input.Field defaultValue="Д-2026/0147" readOnly />
|
|
18
|
+
<Input.Icon side="end">
|
|
19
|
+
<Icon name="status.locked" tone="secondary" />
|
|
20
|
+
</Input.Icon>
|
|
21
|
+
</Input.Wrapper>
|
|
22
|
+
</Input.Root>
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
package/src/components/input/examples/{search-without-focus-ring.tsx → without-focus-ring.tsx}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/** A search field
|
|
1
|
+
/** A single search field where the caret and the lighter fill show focus — `focusRing`. */
|
|
2
2
|
import { Icon, Input } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
export default function
|
|
5
|
+
export default function InputWithoutFocusRingExample() {
|
|
6
6
|
const [query, setQuery] = React.useState("");
|
|
7
7
|
|
|
8
8
|
return (
|
|
@@ -13,10 +13,10 @@ export default function InputSearchWithoutFocusRingExample() {
|
|
|
13
13
|
</Input.Icon>
|
|
14
14
|
<Input.Field
|
|
15
15
|
type="search"
|
|
16
|
-
aria-label="Поиск"
|
|
17
|
-
placeholder="Поиск"
|
|
16
|
+
aria-label="Поиск по заказам"
|
|
17
|
+
placeholder="Поиск по заказам"
|
|
18
18
|
value={query}
|
|
19
|
-
|
|
19
|
+
onValueChange={setQuery}
|
|
20
20
|
/>
|
|
21
21
|
{query ? <Input.ClearButton onClick={() => setQuery("")} /> : null}
|
|
22
22
|
</Input.Wrapper>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Kanban
|
|
2
|
+
|
|
3
|
+
**Category:** data-display
|
|
4
|
+
**Kind:** composite
|
|
5
|
+
|
|
6
|
+
> A board of status columns: cards reorder within a column and move between columns by pointer, touch hold and keyboard, with announcements, WIP limits, loading and empty states and a layout that scrolls inside itself at any width.
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
- Work items that flow through statuses and are moved by hand: tasks, tickets, orders, invoices, deals.
|
|
10
|
+
- A team needs to see the load of every status at once (counts, WIP limits).
|
|
11
|
+
- The status change is the main action on the screen, and its order inside a status matters.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
- Records with many attributes to compare, sort or filter → use [DataTable](../data-table/COMPONENT.md).
|
|
15
|
+
- One list to reorder, or items carried onto folders or assignees → use [Dnd](../dnd/COMPONENT.md) directly.
|
|
16
|
+
- A linear process the user walks through once → use [Stepper](../stepper/COMPONENT.md).
|
|
17
|
+
- A history of events → use [Timeline](../timeline/COMPONENT.md).
|
|
18
|
+
|
|
19
|
+
## Import
|
|
20
|
+
```tsx
|
|
21
|
+
import { Kanban, type KanbanColumn, type KanbanMove, type KanbanValue } from "prime-ui-kit";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Anatomy
|
|
25
|
+
```
|
|
26
|
+
Kanban.Root board: horizontal strip of columns, its own Dnd.Root if none above
|
|
27
|
+
└─ column (from `columns`) `fill-faint` well; header + own vertical scroll
|
|
28
|
+
├─ header title (h3) · count Badge · renderColumnActions(column)
|
|
29
|
+
└─ <ul> (Dnd.Sortable) drop area; Skeleton cards while loading; EmptyPage when empty
|
|
30
|
+
└─ Kanban.Item <li> card from renderItem(item)
|
|
31
|
+
├─ Kanban.ItemTitle title, up to three lines
|
|
32
|
+
├─ Kanban.ItemDescription muted meta line: id, due date
|
|
33
|
+
├─ Kanban.ItemBadges wrapping row of Badge
|
|
34
|
+
└─ Kanban.ItemFooter row: Kanban.ItemCount … at the start, the assignee at the end
|
|
35
|
+
└─ Kanban.ItemCount icon + number
|
|
36
|
+
```
|
|
37
|
+
Columns and cards are application data (`columns`, `items`); the board state is where each card stands: `value` maps a column id to its card ids in order. A card in flight is drawn by Dnd as a lifted clone; the column under it opens a gap where it lands.
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
42
|
+
|
|
43
|
+
### Kanban.Root
|
|
44
|
+
Generic `Kanban.Root<T>`; `ref` → `HTMLDivElement`. The board: a strip of columns that scrolls sideways inside itself, each column a labelled `<ul>` of cards under a header with the title, a count `Badge` and actions. Mounts its own `Dnd.Root` unless one is already above it. Sets `aria-busy` while loading, `data-loading`, `data-disabled`.
|
|
45
|
+
|
|
46
|
+
| Prop | Type | Default | Description |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| `columns` | `readonly KanbanColumn[]` | — (required) | Columns in their order: `{ id, title, limit? }`; `limit` is a WIP limit — a full column refuses cards from other columns and its count turns orange (`count / limit`). |
|
|
49
|
+
| `items` | `readonly T[]` | — (required) | Every card the board can show; `value` decides where each one stands. |
|
|
50
|
+
| `getId` | `(item: T) => string` | — (required) | Stable unique id of a card, the one used in `value`. |
|
|
51
|
+
| `getLabel` | `(item: T) => string` | `the id` | Spoken by the live region. |
|
|
52
|
+
| `value` | `KanbanValue` | — | Card ids per column (controlled): `{ [columnId]: id[] }`. Ids missing from `items` are skipped. |
|
|
53
|
+
| `defaultValue` | `KanbanValue` | `{}` | Initial card ids per column (uncontrolled). |
|
|
54
|
+
| `onValueChange` | `(value: KanbanValue, move: KanbanMove) => void` | — | A card moved by pointer, touch or keyboard: the new placement, then `{ id, from, to, index }` to save. |
|
|
55
|
+
| `renderItem` | `(item: T) => ReactNode` | — (required) | Renders one card; return a `Kanban.Item`. |
|
|
56
|
+
| `renderColumnActions` | `(column: KanbanColumn) => ReactNode` | — | Trailing actions of a column header (add a card, a menu); kit controls inside take the `s` tier. |
|
|
57
|
+
| `canDrop` | `(id: string, columnId: string) => boolean` | — | A workflow rule: refuses card `id` in column `columnId`; the column turns `danger` before the release and a keyboard move is announced as refused. |
|
|
58
|
+
| `loading` | `boolean` | `false` | Columns show skeleton cards in the card geometry; the cards cross-fade in when it turns off. |
|
|
59
|
+
| `disabled` | `boolean` | `false` | Read-only board: no drag, no keyboard moves; clicks on cards still work. |
|
|
60
|
+
| `labels` | `Partial<KanbanLabels>` | — | Built-in strings, see Labels. |
|
|
61
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "defaultValue">` | — | `className` (the board height), `aria-label` and the other div attributes. |
|
|
62
|
+
|
|
63
|
+
### Kanban.Item
|
|
64
|
+
`ref` → `HTMLLIElement`. One card: an `<li>` on the raised fill (`bg-raised`) with the card shadow; return it from `renderItem` (it takes its id from there). Draggable by the whole card, focusable, `aria-keyshortcuts` for Alt + arrows. Presses on buttons, fields and links inside never start a drag.
|
|
65
|
+
|
|
66
|
+
| Prop | Type | Default | Description |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| `disabled` | `boolean` | `false` | This card cannot be dragged or moved. |
|
|
69
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLElement>, "id">` | — | `children` (the card parts), `className`, `onClick` and the other attributes; `onKeyDown` runs first, `preventDefault()` keeps the move from happening. |
|
|
70
|
+
|
|
71
|
+
### Kanban.ItemTitle · Kanban.ItemDescription
|
|
72
|
+
`ref` → `HTMLSpanElement`. The card title (medium body text, up to three lines) and the muted meta line under it (id, due date; one line, tabular numbers).
|
|
73
|
+
|
|
74
|
+
| Prop | Type | Default | Description |
|
|
75
|
+
|---|---|---|---|
|
|
76
|
+
| `…rest` | `HTMLAttributes<HTMLSpanElement>` | — | `children`, `className` and the other span attributes. |
|
|
77
|
+
|
|
78
|
+
### Kanban.ItemBadges
|
|
79
|
+
`ref` → `HTMLDivElement`. A wrapping row of `Badge`s: labels, priority.
|
|
80
|
+
|
|
81
|
+
| Prop | Type | Default | Description |
|
|
82
|
+
|---|---|---|---|
|
|
83
|
+
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
|
|
84
|
+
|
|
85
|
+
### Kanban.ItemFooter
|
|
86
|
+
`ref` → `HTMLDivElement`. The bottom row: `Kanban.ItemCount`s at the start; the last child, unless a count, sits at the end (the assignee `Avatar`).
|
|
87
|
+
|
|
88
|
+
| Prop | Type | Default | Description |
|
|
89
|
+
|---|---|---|---|
|
|
90
|
+
| `…rest` | `HTMLAttributes<HTMLDivElement>` | — | `children`, `className` and the other div attributes. |
|
|
91
|
+
|
|
92
|
+
### Kanban.ItemCount
|
|
93
|
+
`ref` → `HTMLSpanElement`. A small muted counter with a 14 px icon: comments, attachments, subtasks.
|
|
94
|
+
|
|
95
|
+
| Prop | Type | Default | Description |
|
|
96
|
+
|---|---|---|---|
|
|
97
|
+
| `…rest` | `HTMLAttributes<HTMLSpanElement>` | — | `children`, `className` and the other span attributes. |
|
|
98
|
+
|
|
99
|
+
## Variants
|
|
100
|
+
|
|
101
|
+
The board has no visual variants: one look, fills over lines.
|
|
102
|
+
|
|
103
|
+
### Flags
|
|
104
|
+
| Value | Looks like | Use when | Default |
|
|
105
|
+
|---|---|---|---|
|
|
106
|
+
| `limit` (column) | count reads `count / limit`, orange when full; a full column refuses cards from others | a WIP limit per status | — |
|
|
107
|
+
| `canDrop` | the column turns `danger` under a refused card; a keyboard move is announced as refused | workflow rules (a blocked ticket cannot be closed) | — |
|
|
108
|
+
| `loading` | skeleton cards in the card geometry, no counts | the first load or a refresh | `false` |
|
|
109
|
+
| `disabled` | cards do not drag, Alt + arrows do nothing | read-only boards, no permission | `false` |
|
|
110
|
+
|
|
111
|
+
## States
|
|
112
|
+
| State | Driven by | DOM |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| idle | — | cards show `cursor: grab`; under a mouse the card gets a `fill-subtle` wash (`@media (hover: hover)` only) |
|
|
115
|
+
| carried | a drag | Dnd: the clone lifts on `--prime-shadow-modal`, a dashed accent gap opens where the card lands, cards glide aside |
|
|
116
|
+
| over a column | pointer over another column | the gap opens there; an empty column's well fades out |
|
|
117
|
+
| refused | `limit` reached, `canDrop` returns `false` | `data-dnd-reject` on the `<ul>`: `danger-soft` fill |
|
|
118
|
+
| full | count ≥ `limit` | `data-full` on the column, orange count `count / limit` |
|
|
119
|
+
| empty | no cards | a compact `EmptyPage` («Нет карточек») in an 80 px well at the top; the whole column stays a drop area |
|
|
120
|
+
| loading | `loading` | `aria-busy` and `data-loading` on the root; `Skeleton` cards; `Crossfade` swaps them for the cards |
|
|
121
|
+
| disabled | `disabled` / `Kanban.Item disabled` | `data-disabled` on the root / card; no `aria-roledescription`, no shortcuts |
|
|
122
|
+
|
|
123
|
+
Motion: the hover wash and the empty well fade on opacity (`fast`, `standard`); the swap from skeletons is `Crossfade`; drag motion is Dnd's (lift, gap, glide, landing). Under `prefers-reduced-motion` all of it is off.
|
|
124
|
+
|
|
125
|
+
## Layout & spacing
|
|
126
|
+
- Give the root a height (`className`): columns span it and every column body scrolls on its own; without one the columns take the height of the tallest.
|
|
127
|
+
- The board is a size container. From 40rem of its own width columns keep a fixed 18rem; below it a column takes 85% of the board and snaps (`scroll-snap-type: x mandatory`), so the next column peeks. Snapping is off while a drag auto-scrolls the strip.
|
|
128
|
+
- The strip scrolls sideways inside the board, never the page. Cards sit at the top of their column; the drop area runs to the bottom of the column, so a card can be released anywhere in it.
|
|
129
|
+
- Column gap `--prime-space-3`, card gap `--prime-space-2`, card padding `--prime-space-3`, column radius `l`, card radius `m`.
|
|
130
|
+
- Header actions get the `s` tier; inside a card, kit controls take the `m` host tier (a `Badge` is `s`). Pick a small `Avatar` (`size="s"`).
|
|
131
|
+
|
|
132
|
+
## Accessibility
|
|
133
|
+
|
|
134
|
+
### Keyboard
|
|
135
|
+
| Key | Action |
|
|
136
|
+
|---|---|
|
|
137
|
+
| `Tab` | Moves through the cards, column by column. |
|
|
138
|
+
| `Alt + ↑` · `Alt + ↓` | Moves the card one place inside its column. |
|
|
139
|
+
| `Alt + ←` · `Alt + →` | Moves the card to the neighbouring column at the same row (or its end); focus follows it. The direction follows the writing direction (`dir="rtl"`: ← is the next column). |
|
|
140
|
+
| `Escape` | Cancels a drag in flight. |
|
|
141
|
+
|
|
142
|
+
### ARIA
|
|
143
|
+
- Every column is a `<ul>` labelled by its heading (`aria-labelledby`); cards are `<li>` with `aria-roledescription` and `aria-keyshortcuts`.
|
|
144
|
+
- A live region (`role="status"`) announces grabbed, dropped, «position N of M», a move to another column and a refusal (`labels`).
|
|
145
|
+
- The count is spoken as text («Карточек: 3 из 5»), not only by colour; a full column also reads `count / limit`.
|
|
146
|
+
- Touch: a drag starts after a hold; a finger that moves first scrolls the board.
|
|
147
|
+
- While loading the root has `aria-busy`; skeletons are hidden from assistive tech.
|
|
148
|
+
|
|
149
|
+
### Labels
|
|
150
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
151
|
+
|
|
152
|
+
| Key | Default | Used for |
|
|
153
|
+
|---|---|---|
|
|
154
|
+
| `count` | `"Карточек: {count}"` | Spoken name of the count badge. |
|
|
155
|
+
| `countLimit` | `"Карточек: {count} из {limit}"` | Spoken name of the count badge of a column with a `limit`. |
|
|
156
|
+
| `empty` | `"Нет карточек"` | Text of an empty column. |
|
|
157
|
+
| `moved` | `"{label}: «{column}», позиция {position} из {total}"` | Live region: a card moved to another column with the keyboard. |
|
|
158
|
+
| `refused` | `"{label}: колонка «{column}» не принимает карточку"` | Live region: the next column refused the card (full or `canDrop`). |
|
|
159
|
+
|
|
160
|
+
## Examples
|
|
161
|
+
| Example | Shows |
|
|
162
|
+
|---|---|
|
|
163
|
+
| [overview.tsx](examples/overview.tsx) | A release board: cards move within and between columns by drag, a touch hold or Alt + arrows; a card shows its meta line, labels, comments and assignee — `Kanban.Root`, `Kanban.Item`, `renderItem`, `renderColumnActions`. |
|
|
164
|
+
| [structure.tsx](examples/structure.tsx) | Cards take only the parts they need: a title alone, a meta line, labels, a footer with counts and an assignee — `Kanban.ItemTitle`, `Kanban.ItemDescription`, `Kanban.ItemBadges`, `Kanban.ItemFooter`, `Kanban.ItemCount`. |
|
|
165
|
+
| [limits.tsx](examples/limits.tsx) | A support queue with a work-in-progress limit and a workflow rule: a full column and a blocked ticket are refused before the release, from the keyboard too — `limit`, `canDrop`. |
|
|
166
|
+
| [states.tsx](examples/states.tsx) | Loading draws skeleton cards in the card geometry and cross-fades the cards in; an empty column keeps its drop area; a read-only board drags nothing — `loading`, `disabled`. |
|
|
167
|
+
| [controlled.tsx](examples/controlled.tsx) | The placement lives in the parent: every move arrives with its source, target and position to save, and a button resets the board — `value`, `onValueChange`. |
|
|
168
|
+
| [narrow.tsx](examples/narrow.tsx) | On a phone-width screen a column takes 85% of the board and snaps into place, so the next one peeks; the strip scrolls inside the board, never the page. |
|
|
169
|
+
|
|
170
|
+
## Mistakes
|
|
171
|
+
- Returning something other than `Kanban.Item` from `renderItem` → the card does not drag and Alt + arrows do nothing.
|
|
172
|
+
- Using the array index as the card id → ids must survive a move.
|
|
173
|
+
- Keeping the status only on the item and no `value` → the board draws nothing; build `defaultValue` (or `value`) from your data: `{ [status]: ids }`.
|
|
174
|
+
- No height on the root inside a fixed region → the page scrolls instead of the column.
|
|
175
|
+
- A hover-only action on a card → touch has no hover; put the action in the card or open the card on click.
|
|
176
|
+
- Styling a card from an ancestor (`.board .card`) → the flying clone is portalled to `<body>` and loses it; put the class on `Kanban.Item`.
|
|
177
|
+
- Drag as the only way to change a status → keep a status field or a menu in the card details too.
|
|
178
|
+
|
|
179
|
+
## Related
|
|
180
|
+
- **Built from:** [Dnd](../dnd/COMPONENT.md), [Badge](../badge/COMPONENT.md), [ScrollContainer](../scroll-container/COMPONENT.md), [Skeleton](../skeleton/COMPONENT.md), [Crossfade](../crossfade/COMPONENT.md), [EmptyPage](../empty-page/COMPONENT.md)
|
|
181
|
+
- **See also:** [DataTable](../data-table/COMPONENT.md), [Card](../card/COMPONENT.md), [Avatar](../avatar/COMPONENT.md), [Timeline](../timeline/COMPONENT.md)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** The placement lives in the parent: every move arrives with its source, target and position to save, and a button resets the board — `value`, `onValueChange`. */
|
|
2
|
+
import { Button, Kanban, type KanbanMove, type KanbanValue, Typography } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import styles from "./examples.module.css";
|
|
6
|
+
|
|
7
|
+
type Invoice = { id: string; client: string; amount: string };
|
|
8
|
+
|
|
9
|
+
const COLUMNS = [
|
|
10
|
+
{ id: "draft", title: "Черновики" },
|
|
11
|
+
{ id: "sent", title: "Отправлены" },
|
|
12
|
+
{ id: "paid", title: "Оплачены" },
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const INVOICES: Invoice[] = [
|
|
16
|
+
{ id: "INV-2041", client: "ООО «Север»", amount: "48 300 ₽" },
|
|
17
|
+
{ id: "INV-2042", client: "АО «Гранит»", amount: "212 000 ₽" },
|
|
18
|
+
{ id: "INV-2038", client: "ИП Лебедев", amount: "7 950 ₽" },
|
|
19
|
+
{ id: "INV-2035", client: "ООО «Вектор»", amount: "95 400 ₽" },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const INITIAL: KanbanValue = {
|
|
23
|
+
draft: ["INV-2041", "INV-2042"],
|
|
24
|
+
sent: ["INV-2038"],
|
|
25
|
+
paid: ["INV-2035"],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const TITLES = new Map(COLUMNS.map((column) => [column.id, column.title]));
|
|
29
|
+
|
|
30
|
+
export default function KanbanControlledExample() {
|
|
31
|
+
const [placement, setPlacement] = React.useState(INITIAL);
|
|
32
|
+
const [lastMove, setLastMove] = React.useState<KanbanMove | null>(null);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className={styles.stage}>
|
|
36
|
+
<div className={styles.toolbar}>
|
|
37
|
+
<Typography as="span" variant="body-s" tone="muted" aria-live="polite">
|
|
38
|
+
{lastMove
|
|
39
|
+
? `${lastMove.id}: ${TITLES.get(lastMove.from)} → ${TITLES.get(lastMove.to)}, позиция ${lastMove.index + 1}`
|
|
40
|
+
: "Перенесите счёт — изменение уйдёт на сервер"}
|
|
41
|
+
</Typography>
|
|
42
|
+
<div className={styles.spacer} />
|
|
43
|
+
<Button.Root
|
|
44
|
+
variant="ghost"
|
|
45
|
+
tone="neutral"
|
|
46
|
+
disabled={placement === INITIAL}
|
|
47
|
+
onClick={() => {
|
|
48
|
+
setPlacement(INITIAL);
|
|
49
|
+
setLastMove(null);
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
Сбросить
|
|
53
|
+
</Button.Root>
|
|
54
|
+
</div>
|
|
55
|
+
<Kanban.Root
|
|
56
|
+
aria-label="Счета за октябрь"
|
|
57
|
+
className={styles.board}
|
|
58
|
+
columns={COLUMNS}
|
|
59
|
+
items={INVOICES}
|
|
60
|
+
getId={(invoice) => invoice.id}
|
|
61
|
+
getLabel={(invoice) => invoice.id}
|
|
62
|
+
value={placement}
|
|
63
|
+
onValueChange={(next, move) => {
|
|
64
|
+
setPlacement(next);
|
|
65
|
+
setLastMove(move);
|
|
66
|
+
}}
|
|
67
|
+
renderItem={(invoice) => (
|
|
68
|
+
<Kanban.Item>
|
|
69
|
+
<Kanban.ItemTitle>{invoice.client}</Kanban.ItemTitle>
|
|
70
|
+
<Kanban.ItemDescription>
|
|
71
|
+
{invoice.id} · {invoice.amount}
|
|
72
|
+
</Kanban.ItemDescription>
|
|
73
|
+
</Kanban.Item>
|
|
74
|
+
)}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* Layout of the Kanban scenarios: semantic tokens only. */
|
|
2
|
+
|
|
3
|
+
/* A board gets its height from the page region it fills; tall columns scroll inside it. */
|
|
4
|
+
.board {
|
|
5
|
+
block-size: calc(var(--prime-space-24) * 5);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* A board that stands below its own toolbar. */
|
|
9
|
+
.stage {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: var(--prime-space-3);
|
|
13
|
+
inline-size: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.toolbar {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--prime-space-3);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.spacer {
|
|
24
|
+
flex: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* A phone-width screen. */
|
|
28
|
+
.phone {
|
|
29
|
+
inline-size: min(100%, calc(var(--prime-space-20) * 4.5));
|
|
30
|
+
block-size: calc(var(--prime-space-24) * 5);
|
|
31
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** A support queue with a work-in-progress limit and a workflow rule: a full column and a blocked ticket are refused before the release, from the keyboard too — `limit`, `canDrop`. */
|
|
2
|
+
import { Badge, Kanban } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
type Ticket = { id: string; title: string; client: string; blocked?: boolean };
|
|
7
|
+
|
|
8
|
+
const COLUMNS = [
|
|
9
|
+
{ id: "new", title: "Новые" },
|
|
10
|
+
{ id: "progress", title: "В работе", limit: 3 },
|
|
11
|
+
{ id: "solved", title: "Решены" },
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const TICKETS: Ticket[] = [
|
|
15
|
+
{ id: "SUP-1042", title: "Не приходит письмо со счётом", client: "ООО «Север»" },
|
|
16
|
+
{ id: "SUP-1045", title: "Ошибка оплаты картой", client: "ИП Лебедев", blocked: true },
|
|
17
|
+
{ id: "SUP-1038", title: "Сменить владельца аккаунта", client: "ООО «Вектор»" },
|
|
18
|
+
{ id: "SUP-1036", title: "Дубли в отчёте по заказам", client: "АО «Гранит»" },
|
|
19
|
+
{ id: "SUP-1031", title: "Нет доступа к API-ключам", client: "ООО «Логистик»" },
|
|
20
|
+
{ id: "SUP-1027", title: "Перенести проект в другую команду", client: "ООО «Север»" },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const BLOCKED = new Set(TICKETS.filter((ticket) => ticket.blocked).map((ticket) => ticket.id));
|
|
24
|
+
|
|
25
|
+
const PLACEMENT = {
|
|
26
|
+
new: ["SUP-1042", "SUP-1045"],
|
|
27
|
+
progress: ["SUP-1038", "SUP-1036", "SUP-1031"],
|
|
28
|
+
solved: ["SUP-1027"],
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default function KanbanLimitsExample() {
|
|
32
|
+
return (
|
|
33
|
+
<Kanban.Root
|
|
34
|
+
aria-label="Очередь поддержки"
|
|
35
|
+
className={styles.board}
|
|
36
|
+
columns={COLUMNS}
|
|
37
|
+
items={TICKETS}
|
|
38
|
+
getId={(ticket) => ticket.id}
|
|
39
|
+
getLabel={(ticket) => ticket.title}
|
|
40
|
+
defaultValue={PLACEMENT}
|
|
41
|
+
// A ticket waiting on the client cannot be closed.
|
|
42
|
+
canDrop={(id, columnId) => columnId !== "solved" || !BLOCKED.has(id)}
|
|
43
|
+
renderItem={(ticket) => (
|
|
44
|
+
<Kanban.Item>
|
|
45
|
+
<Kanban.ItemTitle>{ticket.title}</Kanban.ItemTitle>
|
|
46
|
+
<Kanban.ItemDescription>
|
|
47
|
+
{ticket.id} · {ticket.client}
|
|
48
|
+
</Kanban.ItemDescription>
|
|
49
|
+
{ticket.blocked ? (
|
|
50
|
+
<Kanban.ItemBadges>
|
|
51
|
+
<Badge.Root color="orange">Ждёт клиента</Badge.Root>
|
|
52
|
+
</Kanban.ItemBadges>
|
|
53
|
+
) : null}
|
|
54
|
+
</Kanban.Item>
|
|
55
|
+
)}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** On a phone-width screen a column takes 85% of the board and snaps into place, so the next one peeks; the strip scrolls inside the board, never the page. */
|
|
2
|
+
import { Avatar, Kanban } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
6
|
+
type Task = { id: string; title: string; due: string; initials: string; name: string };
|
|
7
|
+
|
|
8
|
+
const COLUMNS = [
|
|
9
|
+
{ id: "todo", title: "К выполнению" },
|
|
10
|
+
{ id: "progress", title: "В работе" },
|
|
11
|
+
{ id: "done", title: "Готово" },
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const TASKS: Task[] = [
|
|
15
|
+
{
|
|
16
|
+
id: "PRJ-301",
|
|
17
|
+
title: "Подготовить отчёт по продажам",
|
|
18
|
+
due: "до 14 окт",
|
|
19
|
+
initials: "АК",
|
|
20
|
+
name: "Анна Котова",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "PRJ-305",
|
|
24
|
+
title: "Созвон с ООО «Вектор»",
|
|
25
|
+
due: "до 9 окт",
|
|
26
|
+
initials: "ИС",
|
|
27
|
+
name: "Илья Смирнов",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "PRJ-297",
|
|
31
|
+
title: "Обновить прайс-лист",
|
|
32
|
+
due: "до 11 окт",
|
|
33
|
+
initials: "МВ",
|
|
34
|
+
name: "Мария Волкова",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "PRJ-290",
|
|
38
|
+
title: "Закрыть акты за сентябрь",
|
|
39
|
+
due: "2 окт",
|
|
40
|
+
initials: "АК",
|
|
41
|
+
name: "Анна Котова",
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
const PLACEMENT = {
|
|
46
|
+
todo: ["PRJ-301", "PRJ-305"],
|
|
47
|
+
progress: ["PRJ-297"],
|
|
48
|
+
done: ["PRJ-290"],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default function KanbanNarrowExample() {
|
|
52
|
+
return (
|
|
53
|
+
<Kanban.Root
|
|
54
|
+
aria-label="Мои задачи"
|
|
55
|
+
className={styles.phone}
|
|
56
|
+
columns={COLUMNS}
|
|
57
|
+
items={TASKS}
|
|
58
|
+
getId={(task) => task.id}
|
|
59
|
+
getLabel={(task) => task.title}
|
|
60
|
+
defaultValue={PLACEMENT}
|
|
61
|
+
renderItem={(task) => (
|
|
62
|
+
<Kanban.Item>
|
|
63
|
+
<Kanban.ItemTitle>{task.title}</Kanban.ItemTitle>
|
|
64
|
+
<Kanban.ItemFooter>
|
|
65
|
+
<Kanban.ItemDescription>
|
|
66
|
+
{task.id} · {task.due}
|
|
67
|
+
</Kanban.ItemDescription>
|
|
68
|
+
<Avatar.Root size="s" aria-label={task.name}>
|
|
69
|
+
<Avatar.Fallback>{task.initials}</Avatar.Fallback>
|
|
70
|
+
</Avatar.Root>
|
|
71
|
+
</Kanban.ItemFooter>
|
|
72
|
+
</Kanban.Item>
|
|
73
|
+
)}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
}
|