prime-ui-kit 0.15.0 → 0.17.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 +79 -74
- package/dist/chunks/{chunk-Q3BFRQHZ.js → chunk-2ODXLPW3.js} +169 -10
- package/dist/chunks/{chunk-XJAVS6FH.js → chunk-7WWZYGRC.js} +5482 -4179
- package/dist/chunks/{chunk-THFZIHKU.js → chunk-A4WE3UNC.js} +28219 -27605
- package/dist/chunks/{chunk-6TI4DSM5.js → chunk-PRP4B6OG.js} +1 -1
- package/dist/chunks/{chunk-2IKH55MI.js → chunk-SVFWPLNW.js} +215 -154
- package/dist/color-picker.d.ts +1 -1
- package/dist/color-picker.js +3 -3
- package/dist/components/accordion/Accordion.d.ts +52 -5
- package/dist/components/avatar/Avatar.d.ts +31 -8
- package/dist/components/badge/Badge.d.ts +93 -25
- package/dist/components/banner/Banner.d.ts +17 -10
- package/dist/components/breadcrumb/Breadcrumb.d.ts +18 -5
- package/dist/components/button/Button.d.ts +102 -43
- package/dist/components/button-group/ButtonGroup.d.ts +32 -8
- package/dist/components/card/Card.d.ts +15 -9
- package/dist/components/chart-frame/ChartFrame.d.ts +58 -51
- package/dist/components/chat/Chat.d.ts +77 -38
- package/dist/components/chat/ChatPinned.d.ts +20 -8
- package/dist/components/chat/ChatRows.d.ts +8 -1
- package/dist/components/chat/MessageList.d.ts +14 -19
- package/dist/components/chat/chatContext.d.ts +3 -3
- package/dist/components/chat/messageFlow.d.ts +1 -1
- package/dist/components/chat-list/ChatList.d.ts +88 -34
- package/dist/components/checkbox/Checkbox.d.ts +61 -12
- package/dist/components/code-block/CodeBlock.d.ts +11 -5
- package/dist/components/color-field/ColorField.d.ts +54 -14
- package/dist/components/color-picker/ColorPicker.d.ts +81 -30
- package/dist/components/color-picker/ColorPresets.d.ts +68 -13
- package/dist/components/color-swatches/ColorSwatches.d.ts +90 -18
- package/dist/components/command-menu/CommandMenu.d.ts +86 -27
- package/dist/components/composer/Composer.d.ts +82 -41
- package/dist/components/composer/useRecorder.d.ts +0 -2
- package/dist/components/confirm-dialog/ConfirmDialog.d.ts +40 -16
- package/dist/components/crossfade/Crossfade.d.ts +5 -8
- package/dist/components/data-table/ColumnsMenu.d.ts +6 -2
- package/dist/components/data-table/DataTable.d.ts +157 -58
- package/dist/components/data-table/Footer.d.ts +2 -4
- package/dist/components/data-table/Row.d.ts +1 -1
- package/dist/components/data-table/StateRows.d.ts +2 -2
- package/dist/components/data-table/reorder.d.ts +10 -10
- package/dist/components/data-table/types.d.ts +5 -0
- package/dist/components/data-table/useInfiniteRows.d.ts +3 -3
- package/dist/components/datepicker/Datepicker.d.ts +61 -12
- package/dist/components/datepicker/DatepickerPanel.d.ts +76 -16
- package/dist/components/datepicker/panelLayout.d.ts +6 -11
- package/dist/components/description-list/DescriptionList.d.ts +40 -11
- package/dist/components/digit-input/DigitInput.d.ts +50 -19
- package/dist/components/divider/Divider.d.ts +15 -5
- package/dist/components/dnd/Dnd.d.ts +152 -41
- package/dist/components/dnd/geometry.d.ts +0 -8
- package/dist/components/dnd/labels.d.ts +1 -1
- package/dist/components/dnd/useDropTarget.d.ts +0 -2
- package/dist/components/dnd/useSortableList.d.ts +6 -1
- package/dist/components/drawer/Drawer.d.ts +39 -18
- package/dist/components/dropdown/Dropdown.d.ts +90 -19
- package/dist/components/empty-page/EmptyPage.d.ts +14 -15
- package/dist/components/example-frame/ExampleFrame.d.ts +38 -8
- package/dist/components/field-list/FieldList.d.ts +57 -19
- package/dist/components/fieldset/Fieldset.d.ts +12 -7
- package/dist/components/file-upload/FileUpload.d.ts +119 -42
- package/dist/components/gallery/Gallery.d.ts +44 -16
- package/dist/components/gallery/layout.d.ts +4 -1
- package/dist/components/gantt/Gantt.d.ts +69 -34
- package/dist/components/gantt/GanttRow.d.ts +2 -2
- package/dist/components/hint/Hint.d.ts +10 -4
- package/dist/components/index.d.ts +18 -21
- package/dist/components/input/Input.d.ts +78 -25
- package/dist/components/kanban/Kanban.d.ts +64 -36
- package/dist/components/kbd/Kbd.d.ts +3 -1
- package/dist/components/label/Label.d.ts +33 -4
- package/dist/components/link-button/LinkButton.d.ts +40 -10
- package/dist/components/list/List.d.ts +48 -26
- package/dist/components/login-form/LoginForm.d.ts +66 -7
- package/dist/components/media-viewer/MediaViewer.d.ts +46 -18
- package/dist/components/media-viewer/physics.d.ts +0 -2
- package/dist/components/media-viewer/viewerEngine.d.ts +0 -1
- package/dist/components/message/Message.d.ts +27 -16
- package/dist/components/message/MessageCards.d.ts +49 -10
- package/dist/components/message/MessageFile.d.ts +19 -5
- package/dist/components/message/MessageParts.d.ts +44 -18
- package/dist/components/message/MessageReactionBar.d.ts +3 -1
- package/dist/components/message/MessageTyping.d.ts +10 -6
- package/dist/components/message/bubbleMorph.d.ts +2 -0
- package/dist/components/modal/Modal.d.ts +6 -6
- package/dist/components/native-select/NativeSelect.d.ts +22 -7
- package/dist/components/notification/Notification.d.ts +35 -11
- package/dist/components/notification/NotificationStore.d.ts +12 -3
- package/dist/components/pagination/Pagination.d.ts +29 -6
- package/dist/components/popover/Popover.d.ts +54 -31
- package/dist/components/progress-bar/ProgressBar.d.ts +37 -12
- package/dist/components/progress-circle/ProgressCircle.d.ts +32 -13
- package/dist/components/radio/Radio.d.ts +58 -15
- package/dist/components/scroll-container/ScrollContainer.d.ts +28 -14
- package/dist/components/scroll-container/useScrollEdges.d.ts +1 -24
- package/dist/components/segmented-control/SegmentedControl.d.ts +73 -15
- package/dist/components/select/Select.d.ts +104 -30
- package/dist/components/select/SelectItem.d.ts +35 -8
- package/dist/components/select/selectContext.d.ts +7 -19
- package/dist/components/sheet/Sheet.d.ts +32 -15
- package/dist/components/skeleton/Skeleton.d.ts +9 -3
- package/dist/components/slider/Slider.d.ts +55 -15
- package/dist/components/smart-filter/SmartFilter.d.ts +39 -13
- package/dist/components/sparkline/Sparkline.d.ts +42 -19
- package/dist/components/spinner/Spinner.d.ts +11 -5
- package/dist/components/stepper/Stepper.d.ts +41 -19
- package/dist/components/switch/Switch.d.ts +37 -12
- package/dist/components/tabs/Tabs.d.ts +61 -18
- package/dist/components/tag-select/TagSelect.d.ts +74 -20
- package/dist/components/textarea/Textarea.d.ts +52 -25
- package/dist/components/thumbnail/Thumbnail.d.ts +50 -20
- package/dist/components/timeline/Timeline.d.ts +85 -66
- package/dist/components/tooltip/Tooltip.d.ts +47 -17
- package/dist/components/typography/Typography.d.ts +32 -6
- package/dist/components/video-note/VideoNote.d.ts +7 -1
- package/dist/{internal → components/visually-hidden}/VisuallyHidden.d.ts +5 -5
- package/dist/components/voice-player/VoicePlayer.d.ts +16 -3
- package/dist/hooks/breakpoints.d.ts +10 -0
- package/dist/hooks/floatingPosition.d.ts +42 -0
- package/dist/hooks/useDraft.d.ts +12 -0
- package/dist/hooks/useEdgeOverflow.d.ts +5 -3
- package/dist/hooks/useElementSize.d.ts +31 -0
- package/dist/hooks/useEnterConfirm.d.ts +2 -1
- package/dist/hooks/useImageStatus.d.ts +12 -5
- package/dist/hooks/useLoadMore.d.ts +28 -0
- package/dist/hooks/useMediaQuery.d.ts +1 -3
- package/dist/hooks/useMergedRefs.d.ts +10 -4
- package/dist/hooks/useModalLayer.d.ts +13 -7
- package/dist/hooks/usePosition.d.ts +4 -42
- package/dist/hooks/usePresence.d.ts +4 -7
- package/dist/hooks/useScrollRegion.d.ts +28 -0
- package/dist/hooks/useStableValue.d.ts +6 -0
- package/dist/hooks/useSwipeDismiss.d.ts +38 -17
- package/dist/hooks/useVirtualRows.d.ts +9 -3
- package/dist/icon-set.js +2 -2
- package/dist/icons/Icon.d.ts +1 -1
- package/dist/icons/glyph.d.ts +9 -2
- package/dist/index.css +1 -1
- package/dist/index.js +15 -9
- package/dist/internal/AnchorRectContext.d.ts +2 -1
- package/dist/internal/ChartTooltip.d.ts +1 -1
- package/dist/internal/CheckMark.d.ts +2 -2
- package/dist/internal/ChoiceField.d.ts +29 -10
- package/dist/internal/ControlSizeContext.d.ts +16 -0
- package/dist/internal/Disclosure.d.ts +38 -9
- package/dist/internal/FieldAction.d.ts +20 -12
- package/dist/internal/FieldCommit.d.ts +8 -11
- package/dist/internal/FieldFrame.d.ts +100 -21
- package/dist/internal/MenuGroup.d.ts +3 -1
- package/dist/internal/MorphText.d.ts +2 -1
- package/dist/internal/ProgressLegend.d.ts +3 -2
- package/dist/internal/RegionSwap.d.ts +41 -0
- package/dist/internal/RollingNumber.d.ts +10 -1
- package/dist/internal/RowAction.d.ts +26 -0
- package/dist/internal/SwitcherScroller.d.ts +11 -0
- package/dist/internal/attachmentTile.d.ts +1 -1
- package/dist/internal/audio.d.ts +13 -0
- package/dist/internal/barPlan.d.ts +44 -0
- package/dist/{components/badge/tier.d.ts → internal/chipTier.d.ts} +7 -5
- package/dist/internal/context.d.ts +10 -1
- package/dist/internal/controlValue.d.ts +7 -0
- package/dist/internal/edgeAutoScroll.d.ts +43 -25
- package/dist/internal/fieldCell.d.ts +4 -3
- package/dist/internal/fieldClasses.d.ts +15 -2
- package/dist/internal/fileSize.d.ts +5 -1
- package/dist/internal/formatClock.d.ts +2 -0
- package/dist/internal/formatNumber.d.ts +6 -0
- package/dist/internal/glyphSwap.d.ts +5 -9
- package/dist/internal/hasContent.d.ts +6 -0
- package/dist/internal/highlightTsx.d.ts +12 -0
- package/dist/internal/iconBox.d.ts +6 -0
- package/dist/internal/iconLayout.d.ts +2 -1
- package/dist/internal/imageSlot.d.ts +6 -1
- package/dist/internal/interactiveElement.d.ts +41 -0
- package/dist/internal/labels.d.ts +6 -0
- package/dist/internal/leaveInPlace.d.ts +6 -5
- package/dist/internal/listPresence.d.ts +32 -0
- package/dist/internal/listbox.d.ts +71 -31
- package/dist/internal/longPress.d.ts +42 -0
- package/dist/internal/mediaDisk.d.ts +7 -4
- package/dist/internal/mediaPlayer.d.ts +91 -27
- package/dist/internal/mediaSession.d.ts +0 -6
- package/dist/internal/messageList.d.ts +4 -3
- package/dist/internal/motionTiming.d.ts +34 -0
- package/dist/internal/namedRole.d.ts +13 -0
- package/dist/internal/nodeText.d.ts +6 -0
- package/dist/{components/modal → internal/overlay}/DialogGuard.d.ts +3 -5
- package/dist/{components/modal → internal/overlay}/DialogParts.d.ts +86 -89
- package/dist/internal/overlay/FloatingPanel.d.ts +27 -5
- package/dist/internal/overlay/ModalDialog.d.ts +59 -0
- package/dist/internal/overlay/focus.d.ts +31 -6
- package/dist/internal/overlay/layerStack.d.ts +8 -5
- package/dist/internal/overlay/useAnchorName.d.ts +14 -0
- package/dist/internal/overlay/useContainScroll.d.ts +7 -0
- package/dist/internal/overlay/useFloatingLayer.d.ts +43 -14
- package/dist/internal/overlay/useOpenState.d.ts +22 -0
- package/dist/internal/partPresence.d.ts +31 -0
- package/dist/internal/parts.d.ts +39 -0
- package/dist/internal/progressSegments.d.ts +52 -12
- package/dist/internal/richText.d.ts +6 -34
- package/dist/internal/ring.d.ts +18 -8
- package/dist/internal/rovingFocus.d.ts +10 -5
- package/dist/{components/data-table/rowEvents.d.ts → internal/rowLink.d.ts} +0 -5
- package/dist/internal/scrollAncestors.d.ts +14 -0
- package/dist/internal/selectionIndicator.d.ts +27 -0
- package/dist/internal/slot.d.ts +23 -5
- package/dist/internal/states.d.ts +61 -0
- package/dist/internal/sticky.d.ts +5 -1
- package/dist/internal/swallowNextClick.d.ts +9 -0
- package/dist/internal/swatch.d.ts +59 -15
- package/dist/internal/textFormatting.d.ts +2 -1
- package/dist/internal/textFormattingToolbar.d.ts +3 -2
- package/dist/internal/tokenDefaults.d.ts +21 -0
- package/dist/internal/touchTarget.d.ts +5 -0
- package/dist/internal/transcript.d.ts +19 -18
- package/dist/internal/transfer.d.ts +22 -8
- package/dist/internal/transferDisk.d.ts +2 -3
- package/dist/internal/useFlipList.d.ts +44 -0
- package/dist/internal/useNearView.d.ts +4 -3
- package/dist/internal/usePendingChanges.d.ts +23 -0
- package/dist/internal/useRangeSelection.d.ts +2 -1
- package/dist/layout/app-shell/AppShell.d.ts +63 -18
- package/dist/layout/bottom-nav/BottomNav.d.ts +58 -22
- package/dist/layout/index.d.ts +4 -4
- package/dist/layout/page/Page.d.ts +263 -0
- package/dist/layout/sidebar/Sidebar.d.ts +232 -101
- package/dist/skill/SKILL.md +16 -16
- package/dist/skill/anti-slop.md +204 -27
- package/dist/skill/api-contract.md +115 -35
- package/dist/skill/cheatsheet.md +60 -55
- package/dist/skill/checklist.md +61 -89
- package/dist/skill/choosing.md +26 -27
- package/dist/skill/components.md +50 -50
- package/dist/skill/composition.md +220 -185
- package/dist/skill/foundations.md +39 -32
- package/dist/skill/layouts.md +82 -143
- package/dist/skill/motion.md +26 -31
- package/dist/skill/reference/components/accordion/COMPONENT.md +16 -9
- package/dist/skill/reference/components/accordion/examples/overview.tsx +2 -2
- package/dist/skill/reference/components/accordion/examples/sizes.tsx +6 -8
- package/dist/skill/reference/components/accordion/examples/states.tsx +27 -24
- package/dist/skill/reference/components/accordion/examples/variants.tsx +6 -8
- package/dist/skill/reference/components/accordion/examples/with-icon.tsx +22 -19
- package/dist/skill/reference/components/avatar/COMPONENT.md +24 -17
- package/dist/skill/reference/components/avatar/examples/examples.module.css +1 -4
- package/dist/skill/reference/components/avatar/examples/overview.tsx +3 -3
- package/dist/skill/reference/components/avatar/examples/presence.tsx +4 -4
- package/dist/skill/reference/components/avatar/examples/src-from-state.tsx +3 -3
- package/dist/skill/reference/components/avatar/examples/states.tsx +4 -4
- package/dist/skill/reference/components/avatar/examples/team-group.tsx +3 -3
- package/dist/skill/reference/components/badge/COMPONENT.md +66 -34
- package/dist/skill/reference/components/badge/examples/controlled.tsx +32 -0
- package/dist/skill/reference/components/badge/examples/examples.module.css +2 -2
- package/dist/skill/reference/components/badge/examples/filter-values.tsx +4 -6
- package/dist/skill/reference/components/badge/examples/in-controls.tsx +1 -1
- package/dist/skill/reference/components/badge/examples/overview.tsx +6 -5
- package/dist/skill/reference/components/badge/examples/square.tsx +21 -0
- package/dist/skill/reference/components/badge/examples/states.tsx +4 -4
- package/dist/skill/reference/components/badge/examples/with-icon.tsx +10 -1
- package/dist/skill/reference/components/banner/COMPONENT.md +13 -9
- package/dist/skill/reference/components/banner/examples/dismissible.tsx +3 -19
- package/dist/skill/reference/components/banner/examples/examples.module.css +6 -1
- package/dist/skill/reference/components/banner/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/banner/examples/page-strip.tsx +24 -22
- package/dist/skill/reference/components/breadcrumb/COMPONENT.md +23 -16
- package/dist/skill/reference/components/breadcrumb/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/breadcrumb/examples/overflow.tsx +1 -1
- package/dist/skill/reference/components/breadcrumb/examples/sizes.tsx +6 -8
- package/dist/skill/reference/components/breadcrumb/examples/with-icon.tsx +15 -8
- package/dist/skill/reference/components/button/COMPONENT.md +67 -30
- package/dist/skill/reference/components/button/examples/align.tsx +25 -0
- package/dist/skill/reference/components/button/examples/controlled.tsx +21 -0
- package/dist/skill/reference/components/button/examples/density.tsx +45 -0
- package/dist/skill/reference/components/button/examples/examples.module.css +14 -25
- package/dist/skill/reference/components/button/examples/hold-to-confirm.tsx +1 -1
- package/dist/skill/reference/components/button/examples/label-morph.tsx +1 -1
- package/dist/skill/reference/components/button/examples/on-colored-host.tsx +19 -19
- package/dist/skill/reference/components/button/examples/over-media.tsx +7 -1
- package/dist/skill/reference/components/button/examples/toggle.tsx +2 -10
- package/dist/skill/reference/components/button-group/COMPONENT.md +21 -15
- package/dist/skill/reference/components/button-group/examples/controlled.tsx +1 -1
- package/dist/skill/reference/components/card/COMPONENT.md +21 -10
- package/dist/skill/reference/components/card/examples/content-templates.tsx +8 -2
- package/dist/skill/reference/components/card/examples/examples.module.css +4 -16
- package/dist/skill/reference/components/card/examples/overview.tsx +11 -11
- package/dist/skill/reference/components/card/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/card/examples/screen.tsx +185 -198
- package/dist/skill/reference/components/card/examples/variants.tsx +74 -47
- package/dist/skill/reference/components/chart-frame/COMPONENT.md +24 -28
- package/dist/skill/reference/components/chart-frame/examples/controlled.tsx +9 -7
- package/dist/skill/reference/components/chart-frame/examples/fill-height.tsx +13 -15
- package/dist/skill/reference/components/chart-frame/examples/narrow.tsx +24 -5
- package/dist/skill/reference/components/chart-frame/examples/overview.tsx +5 -2
- package/dist/skill/reference/components/chart-frame/examples/states.tsx +72 -64
- package/dist/skill/reference/components/chart-frame/examples/tooltip.tsx +27 -26
- package/dist/skill/reference/components/chat/COMPONENT.md +39 -26
- package/dist/skill/reference/components/chat/examples/group-chat.tsx +2 -2
- package/dist/skill/reference/components/chat/examples/overview.tsx +119 -130
- package/dist/skill/reference/components/chat/examples/reactions.tsx +18 -23
- package/dist/skill/reference/components/chat/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/chat/examples/screen.tsx +212 -242
- package/dist/skill/reference/components/chat/examples/states.tsx +23 -22
- package/dist/skill/reference/components/chat-list/COMPONENT.md +11 -6
- package/dist/skill/reference/components/chat-list/examples/controlled.tsx +2 -2
- package/dist/skill/reference/components/chat-list/examples/examples.module.css +8 -8
- package/dist/skill/reference/components/chat-list/examples/live.tsx +29 -22
- package/dist/skill/reference/components/chat-list/examples/sizes.tsx +6 -8
- package/dist/skill/reference/components/chat-list/examples/states.tsx +42 -38
- package/dist/skill/reference/components/checkbox/COMPONENT.md +27 -14
- package/dist/skill/reference/components/checkbox/examples/controlled.tsx +18 -16
- package/dist/skill/reference/components/checkbox/examples/examples.module.css +15 -56
- package/dist/skill/reference/components/checkbox/examples/in-form.tsx +16 -16
- package/dist/skill/reference/components/checkbox/examples/indicator.tsx +19 -64
- package/dist/skill/reference/components/checkbox/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/checkbox/examples/states.tsx +1 -1
- package/dist/skill/reference/components/checkbox/examples/without-label.tsx +1 -1
- package/dist/skill/reference/components/code-block/COMPONENT.md +16 -12
- package/dist/skill/reference/components/code-block/examples/color-scheme.tsx +2 -4
- package/dist/skill/reference/components/code-block/examples/examples.module.css +1 -9
- package/dist/skill/reference/components/code-block/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/color-field/COMPONENT.md +15 -9
- package/dist/skill/reference/components/color-field/examples/examples.module.css +4 -5
- package/dist/skill/reference/components/color-field/examples/in-form.tsx +15 -13
- package/dist/skill/reference/components/color-field/examples/sizes.tsx +5 -1
- package/dist/skill/reference/components/color-field/examples/states.tsx +15 -3
- package/dist/skill/reference/components/color-picker/COMPONENT.md +69 -22
- package/dist/skill/reference/components/color-picker/examples/controlled.tsx +16 -5
- package/dist/skill/reference/components/color-picker/examples/examples.module.css +8 -12
- package/dist/skill/reference/components/color-picker/examples/in-form.tsx +24 -22
- package/dist/skill/reference/components/color-picker/examples/overview.tsx +6 -11
- package/dist/skill/reference/components/color-picker/examples/panel.tsx +1 -1
- package/dist/skill/reference/components/color-picker/examples/sizes.tsx +10 -16
- package/dist/skill/reference/components/color-picker/examples/states.tsx +28 -23
- package/dist/skill/reference/components/color-swatches/COMPONENT.md +22 -8
- package/dist/skill/reference/components/color-swatches/examples/examples.module.css +3 -4
- package/dist/skill/reference/components/color-swatches/examples/in-form.tsx +19 -17
- package/dist/skill/reference/components/color-swatches/examples/palette.tsx +24 -0
- package/dist/skill/reference/components/color-swatches/examples/wrapping.tsx +17 -2
- package/dist/skill/reference/components/command-menu/COMPONENT.md +60 -20
- package/dist/skill/reference/components/command-menu/examples/sizes.tsx +20 -15
- package/dist/skill/reference/components/command-menu/examples/states.tsx +46 -24
- package/dist/skill/reference/components/composer/COMPONENT.md +42 -24
- package/dist/skill/reference/components/composer/examples/examples.module.css +0 -9
- package/dist/skill/reference/components/composer/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/composer/examples/reply-edit.tsx +3 -3
- package/dist/skill/reference/components/composer/examples/sizes.tsx +3 -5
- package/dist/skill/reference/components/composer/examples/states.tsx +4 -6
- package/dist/skill/reference/components/confirm-dialog/COMPONENT.md +26 -13
- package/dist/skill/reference/components/confirm-dialog/examples/dismiss.tsx +27 -0
- package/dist/skill/reference/components/confirm-dialog/examples/failure.tsx +9 -16
- package/dist/skill/reference/components/crossfade/COMPONENT.md +13 -7
- package/dist/skill/reference/components/crossfade/examples/examples.module.css +1 -40
- package/dist/skill/reference/components/crossfade/examples/fill.tsx +16 -19
- package/dist/skill/reference/components/crossfade/examples/overview.tsx +14 -16
- package/dist/skill/reference/components/crossfade/examples/record-switch.tsx +6 -11
- package/dist/skill/reference/components/crossfade/examples/screen.module.css +1 -24
- package/dist/skill/reference/components/crossfade/examples/screen.tsx +108 -124
- package/dist/skill/reference/components/data-table/COMPONENT.md +36 -26
- package/dist/skill/reference/components/data-table/examples/controlled.tsx +14 -2
- package/dist/skill/reference/components/data-table/examples/examples.module.css +10 -9
- package/dist/skill/reference/components/data-table/examples/narrow.tsx +5 -1
- package/dist/skill/reference/components/data-table/examples/row-link.tsx +2 -1
- package/dist/skill/reference/components/data-table/examples/screen.module.css +2 -2
- package/dist/skill/reference/components/data-table/examples/screen.tsx +53 -62
- package/dist/skill/reference/components/data-table/examples/server.tsx +6 -2
- package/dist/skill/reference/components/data-table/examples/sizes.tsx +17 -17
- package/dist/skill/reference/components/data-table/examples/states.tsx +37 -29
- package/dist/skill/reference/components/datepicker/COMPONENT.md +53 -22
- package/dist/skill/reference/components/datepicker/examples/dismiss.tsx +15 -0
- package/dist/skill/reference/components/datepicker/examples/examples.module.css +9 -2
- package/dist/skill/reference/components/datepicker/examples/in-form.tsx +33 -25
- package/dist/skill/reference/components/datepicker/examples/inline-panel.tsx +3 -1
- package/dist/skill/reference/components/datepicker/examples/sizes.tsx +2 -2
- package/dist/skill/reference/components/datepicker/examples/states.tsx +2 -2
- package/dist/skill/reference/components/datepicker/examples/validation.tsx +3 -3
- package/dist/skill/reference/components/description-list/COMPONENT.md +24 -9
- package/dist/skill/reference/components/description-list/examples/examples.module.css +4 -24
- package/dist/skill/reference/components/description-list/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/description-list/examples/screen.module.css +0 -18
- package/dist/skill/reference/components/description-list/examples/screen.tsx +119 -134
- package/dist/skill/reference/components/description-list/examples/sizes.tsx +2 -4
- package/dist/skill/reference/components/description-list/examples/structure.tsx +6 -7
- package/dist/skill/reference/components/description-list/examples/totals.tsx +40 -0
- package/dist/skill/reference/components/digit-input/COMPONENT.md +12 -6
- package/dist/skill/reference/components/digit-input/examples/examples.module.css +2 -2
- package/dist/skill/reference/components/digit-input/examples/grouped.tsx +4 -4
- package/dist/skill/reference/components/digit-input/examples/in-form.tsx +1 -1
- package/dist/skill/reference/components/digit-input/examples/sizes.tsx +5 -3
- package/dist/skill/reference/components/digit-input/examples/states.tsx +14 -6
- package/dist/skill/reference/components/digit-input/examples/validation.tsx +1 -1
- package/dist/skill/reference/components/divider/COMPONENT.md +28 -14
- package/dist/skill/reference/components/divider/examples/align.tsx +2 -4
- package/dist/skill/reference/components/divider/examples/examples.module.css +16 -17
- package/dist/skill/reference/components/divider/examples/or-separator.tsx +3 -5
- package/dist/skill/reference/components/divider/examples/overview.tsx +18 -16
- package/dist/skill/reference/components/divider/examples/vertical.tsx +25 -8
- package/dist/skill/reference/components/divider/examples/with-icon.tsx +1 -1
- package/dist/skill/reference/components/dnd/COMPONENT.md +52 -34
- package/dist/skill/reference/components/dnd/examples/drop-zones.tsx +1 -1
- package/dist/skill/reference/components/dnd/examples/examples.module.css +7 -7
- package/dist/skill/reference/components/dnd/examples/states.tsx +41 -35
- package/dist/skill/reference/components/drawer/COMPONENT.md +38 -15
- package/dist/skill/reference/components/drawer/examples/guard.tsx +1 -3
- package/dist/skill/reference/components/drawer/examples/header-actions.tsx +1 -1
- package/dist/skill/reference/components/drawer/examples/in-form.tsx +31 -31
- package/dist/skill/reference/components/drawer/examples/placement.tsx +1 -1
- package/dist/skill/reference/components/drawer/examples/screen.tsx +137 -160
- package/dist/skill/reference/components/drawer/examples/sizes.tsx +32 -27
- package/dist/skill/reference/components/dropdown/COMPONENT.md +59 -24
- package/dist/skill/reference/components/dropdown/examples/context-menu.tsx +75 -0
- package/dist/skill/reference/components/dropdown/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/dropdown/examples/sizes.tsx +39 -34
- package/dist/skill/reference/components/dropdown/examples/states.tsx +37 -29
- package/dist/skill/reference/components/empty-page/COMPONENT.md +20 -9
- package/dist/skill/reference/components/empty-page/examples/compact.tsx +28 -18
- package/dist/skill/reference/components/empty-page/examples/examples.module.css +0 -43
- package/dist/skill/reference/components/empty-page/examples/narrow.tsx +3 -3
- package/dist/skill/reference/components/empty-page/examples/region-error.tsx +6 -11
- package/dist/skill/reference/components/empty-page/examples/sizes.tsx +13 -13
- package/dist/skill/reference/components/empty-page/examples/variants.tsx +34 -30
- package/dist/skill/reference/components/example-frame/COMPONENT.md +23 -11
- package/dist/skill/reference/components/example-frame/examples/controlled.tsx +3 -3
- package/dist/skill/reference/components/field-list/COMPONENT.md +14 -8
- 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/sizes.tsx +32 -26
- package/dist/skill/reference/components/field-list/examples/states.tsx +37 -31
- package/dist/skill/reference/components/fieldset/COMPONENT.md +11 -6
- package/dist/skill/reference/components/fieldset/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/fieldset/examples/states.tsx +1 -1
- package/dist/skill/reference/components/file-upload/COMPONENT.md +68 -30
- package/dist/skill/reference/components/file-upload/examples/avatar-upload.tsx +5 -5
- package/dist/skill/reference/components/file-upload/examples/custom-body.tsx +12 -7
- package/dist/skill/reference/components/file-upload/examples/examples.module.css +4 -4
- package/dist/skill/reference/components/file-upload/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/file-upload/examples/row-parts.tsx +4 -4
- package/dist/skill/reference/components/file-upload/examples/screen.module.css +4 -4
- package/dist/skill/reference/components/file-upload/examples/screen.tsx +70 -84
- package/dist/skill/reference/components/file-upload/examples/sizes.tsx +1 -3
- package/dist/skill/reference/components/file-upload/examples/states.tsx +1 -3
- package/dist/skill/reference/components/file-upload/examples/variants.tsx +13 -7
- package/dist/skill/reference/components/gallery/COMPONENT.md +17 -7
- package/dist/skill/reference/components/gallery/examples/album-sizes.tsx +52 -0
- package/dist/skill/reference/components/gallery/examples/controlled.tsx +40 -0
- package/dist/skill/reference/components/gallery/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/gallery/examples/overview.tsx +15 -43
- package/dist/skill/reference/components/gallery/examples/transfer.tsx +22 -13
- package/dist/skill/reference/components/gantt/COMPONENT.md +21 -15
- package/dist/skill/reference/components/gantt/examples/examples.module.css +0 -16
- package/dist/skill/reference/components/gantt/examples/occupancy.tsx +2 -2
- package/dist/skill/reference/components/gantt/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/gantt/examples/screen.tsx +56 -74
- package/dist/skill/reference/components/gantt/examples/sizes.tsx +16 -16
- package/dist/skill/reference/components/gantt/examples/states.tsx +34 -30
- package/dist/skill/reference/components/gantt/examples/variants.tsx +27 -25
- package/dist/skill/reference/components/hint/COMPONENT.md +24 -14
- package/dist/skill/reference/components/hint/examples/examples.module.css +10 -1
- package/dist/skill/reference/components/hint/examples/hint-or-error.tsx +2 -2
- package/dist/skill/reference/components/hint/examples/overview.tsx +10 -11
- package/dist/skill/reference/components/hint/examples/sizes.tsx +1 -1
- package/dist/skill/reference/components/input/COMPONENT.md +10 -6
- package/dist/skill/reference/components/input/examples/affixes.tsx +2 -2
- package/dist/skill/reference/components/input/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/input/examples/sizes.tsx +9 -5
- package/dist/skill/reference/components/input/examples/states.tsx +39 -23
- package/dist/skill/reference/components/input/examples/with-icon.tsx +24 -16
- package/dist/skill/reference/components/kanban/COMPONENT.md +30 -24
- package/dist/skill/reference/components/kanban/examples/columns.tsx +14 -19
- package/dist/skill/reference/components/kanban/examples/item-link.tsx +2 -2
- package/dist/skill/reference/components/kanban/examples/limits.tsx +1 -1
- package/dist/skill/reference/components/kanban/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/kanban/examples/screen.module.css +2 -4
- package/dist/skill/reference/components/kanban/examples/screen.tsx +55 -68
- package/dist/skill/reference/components/kanban/examples/states.tsx +37 -58
- package/dist/skill/reference/components/kanban/examples/variants.tsx +0 -3
- package/dist/skill/reference/components/kbd/COMPONENT.md +11 -7
- package/dist/skill/reference/components/kbd/examples/examples.module.css +1 -20
- package/dist/skill/reference/components/kbd/examples/in-controls.tsx +2 -2
- package/dist/skill/reference/components/kbd/examples/shortcut-list.tsx +14 -26
- package/dist/skill/reference/components/label/COMPONENT.md +26 -11
- package/dist/skill/reference/components/label/examples/examples.module.css +12 -9
- package/dist/skill/reference/components/label/examples/overview.tsx +6 -10
- package/dist/skill/reference/components/label/examples/structure.tsx +2 -2
- package/dist/skill/reference/components/link-button/COMPONENT.md +33 -20
- package/dist/skill/reference/components/link-button/examples/as-child.tsx +1 -1
- package/dist/skill/reference/components/link-button/examples/external-link.tsx +1 -1
- package/dist/skill/reference/components/link-button/examples/overview.tsx +4 -2
- package/dist/skill/reference/components/link-button/examples/variants.tsx +2 -2
- package/dist/skill/reference/components/list/COMPONENT.md +24 -16
- package/dist/skill/reference/components/list/examples/examples.module.css +0 -8
- package/dist/skill/reference/components/list/examples/overflow.tsx +1 -1
- package/dist/skill/reference/components/list/examples/overview.tsx +31 -30
- package/dist/skill/reference/components/list/examples/sizes.tsx +23 -23
- package/dist/skill/reference/components/list/examples/states.tsx +38 -21
- package/dist/skill/reference/components/list/examples/with-icon.tsx +16 -14
- package/dist/skill/reference/components/login-form/COMPONENT.md +69 -16
- package/dist/skill/reference/components/login-form/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/login-form/examples/register.tsx +1 -1
- package/dist/skill/reference/components/media-viewer/COMPONENT.md +12 -8
- package/dist/skill/reference/components/media-viewer/examples/controlled.tsx +16 -16
- package/dist/skill/reference/components/media-viewer/examples/examples.module.css +3 -5
- package/dist/skill/reference/components/media-viewer/examples/video.tsx +1 -1
- package/dist/skill/reference/components/message/COMPONENT.md +102 -46
- package/dist/skill/reference/components/message/examples/typing.tsx +5 -5
- package/dist/skill/reference/components/modal/COMPONENT.md +71 -37
- package/dist/skill/reference/components/modal/examples/dismiss.tsx +35 -27
- package/dist/skill/reference/components/modal/examples/enter-key.tsx +22 -25
- package/dist/skill/reference/components/modal/examples/examples.module.css +0 -7
- package/dist/skill/reference/components/modal/examples/guard.tsx +2 -4
- package/dist/skill/reference/components/modal/examples/in-form.tsx +28 -28
- package/dist/skill/reference/components/modal/examples/long-content.tsx +6 -4
- package/dist/skill/reference/components/modal/examples/sizes.tsx +36 -31
- package/dist/skill/reference/components/modal/examples/structure.tsx +1 -1
- package/dist/skill/reference/components/native-select/COMPONENT.md +7 -3
- package/dist/skill/reference/components/native-select/examples/examples.module.css +3 -3
- package/dist/skill/reference/components/native-select/examples/in-form.tsx +28 -29
- package/dist/skill/reference/components/native-select/examples/sizes.tsx +2 -2
- package/dist/skill/reference/components/native-select/examples/states.tsx +2 -2
- package/dist/skill/reference/components/notification/COMPONENT.md +36 -31
- package/dist/skill/reference/components/notification/examples/examples.module.css +1 -2
- package/dist/skill/reference/components/notification/examples/in-form.tsx +28 -20
- package/dist/skill/reference/components/notification/examples/sizes.tsx +16 -12
- package/dist/skill/reference/components/notification/examples/undo.tsx +7 -15
- package/dist/skill/reference/components/pagination/COMPONENT.md +29 -18
- package/dist/skill/reference/components/pagination/examples/controlled.tsx +2 -1
- package/dist/skill/reference/components/pagination/examples/narrow.tsx +5 -5
- package/dist/skill/reference/components/popover/COMPONENT.md +44 -20
- package/dist/skill/reference/components/popover/examples/controlled-open.tsx +6 -4
- package/dist/skill/reference/components/popover/examples/dismiss.tsx +37 -28
- package/dist/skill/reference/components/popover/examples/examples.module.css +2 -2
- package/dist/skill/reference/components/popover/examples/sizes.tsx +32 -27
- package/dist/skill/reference/components/popover/examples/width.tsx +57 -0
- package/dist/skill/reference/components/progress-bar/COMPONENT.md +21 -29
- package/dist/skill/reference/components/progress-bar/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/progress-circle/COMPONENT.md +21 -29
- package/dist/skill/reference/components/progress-circle/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/progress-circle/examples/on-color.tsx +16 -0
- package/dist/skill/reference/components/progress-circle/examples/variants.tsx +1 -0
- package/dist/skill/reference/components/radio/COMPONENT.md +13 -4
- package/dist/skill/reference/components/radio/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/scroll-container/COMPONENT.md +18 -12
- package/dist/skill/reference/components/scroll-container/examples/auto-scroll.tsx +8 -4
- package/dist/skill/reference/components/scroll-container/examples/edges.tsx +4 -4
- package/dist/skill/reference/components/scroll-container/examples/examples.module.css +7 -51
- package/dist/skill/reference/components/scroll-container/examples/load-more.tsx +4 -4
- package/dist/skill/reference/components/scroll-container/examples/lock.tsx +4 -4
- package/dist/skill/reference/components/scroll-container/examples/log.tsx +97 -0
- package/dist/skill/reference/components/scroll-container/examples/overscroll.tsx +4 -4
- package/dist/skill/reference/components/scroll-container/examples/overview.tsx +5 -5
- package/dist/skill/reference/components/scroll-container/examples/scrollbar.tsx +4 -4
- package/dist/skill/reference/components/scroll-container/examples/snap.tsx +2 -2
- package/dist/skill/reference/components/scroll-container/examples/variants.tsx +1 -0
- package/dist/skill/reference/components/segmented-control/COMPONENT.md +24 -12
- package/dist/skill/reference/components/segmented-control/examples/controlled.tsx +2 -4
- package/dist/skill/reference/components/segmented-control/examples/examples.module.css +0 -8
- package/dist/skill/reference/components/segmented-control/examples/scroll.tsx +1 -1
- package/dist/skill/reference/components/select/COMPONENT.md +33 -9
- package/dist/skill/reference/components/select/examples/dismiss.tsx +26 -0
- package/dist/skill/reference/components/select/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/select/examples/server-search.tsx +6 -2
- package/dist/skill/reference/components/select/examples/sizes.tsx +2 -2
- package/dist/skill/reference/components/select/examples/states.tsx +2 -2
- package/dist/skill/reference/components/select/examples/with-icon.tsx +20 -18
- package/dist/skill/reference/components/sheet/COMPONENT.md +44 -21
- package/dist/skill/reference/components/sheet/examples/header-actions.tsx +23 -4
- package/dist/skill/reference/components/sheet/examples/overview.tsx +25 -10
- package/dist/skill/reference/components/skeleton/COMPONENT.md +8 -4
- package/dist/skill/reference/components/skeleton/examples/examples.module.css +1 -13
- package/dist/skill/reference/components/skeleton/examples/with-crossfade.tsx +7 -7
- package/dist/skill/reference/components/slider/COMPONENT.md +13 -8
- package/dist/skill/reference/components/slider/examples/examples.module.css +6 -7
- package/dist/skill/reference/components/slider/examples/hint-and-error.tsx +3 -5
- package/dist/skill/reference/components/slider/examples/in-form.tsx +21 -19
- package/dist/skill/reference/components/slider/examples/states.tsx +14 -10
- package/dist/skill/reference/components/smart-filter/COMPONENT.md +42 -22
- package/dist/skill/reference/components/smart-filter/examples/examples.module.css +3 -21
- package/dist/skill/reference/components/smart-filter/examples/many-values.tsx +12 -8
- package/dist/skill/reference/components/smart-filter/examples/ranges.tsx +2 -1
- package/dist/skill/reference/components/smart-filter/examples/sizes.tsx +9 -7
- package/dist/skill/reference/components/sparkline/COMPONENT.md +8 -3
- package/dist/skill/reference/components/sparkline/examples/curve.tsx +16 -11
- package/dist/skill/reference/components/sparkline/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/sparkline/examples/signed-bars.tsx +2 -2
- package/dist/skill/reference/components/sparkline/examples/states.tsx +14 -10
- package/dist/skill/reference/components/spinner/COMPONENT.md +15 -9
- package/dist/skill/reference/components/spinner/examples/examples.module.css +2 -14
- package/dist/skill/reference/components/spinner/examples/overview.tsx +1 -1
- package/dist/skill/reference/components/stepper/COMPONENT.md +50 -41
- package/dist/skill/reference/components/stepper/examples/examples.module.css +1 -6
- package/dist/skill/reference/components/stepper/examples/narrow.tsx +1 -1
- package/dist/skill/reference/components/stepper/examples/sizes.tsx +6 -8
- package/dist/skill/reference/components/stepper/examples/states.tsx +44 -43
- package/dist/skill/reference/components/stepper/examples/with-icon.tsx +19 -17
- package/dist/skill/reference/components/switch/COMPONENT.md +22 -9
- package/dist/skill/reference/components/switch/examples/examples.module.css +2 -2
- package/dist/skill/reference/components/switch/examples/states.tsx +3 -3
- package/dist/skill/reference/components/tabs/COMPONENT.md +21 -16
- package/dist/skill/reference/components/tabs/examples/in-drawer.tsx +1 -1
- package/dist/skill/reference/components/tabs/examples/sizes.tsx +5 -10
- package/dist/skill/reference/components/tabs/examples/variants.tsx +19 -23
- package/dist/skill/reference/components/tag-select/COMPONENT.md +19 -6
- package/dist/skill/reference/components/tag-select/examples/creatable.tsx +2 -2
- package/dist/skill/reference/components/tag-select/examples/dismiss.tsx +23 -0
- package/dist/skill/reference/components/tag-select/examples/examples.module.css +3 -3
- package/dist/skill/reference/components/tag-select/examples/in-form.tsx +31 -32
- package/dist/skill/reference/components/tag-select/examples/sizes.tsx +2 -2
- package/dist/skill/reference/components/tag-select/examples/states.tsx +2 -2
- package/dist/skill/reference/components/textarea/COMPONENT.md +10 -6
- package/dist/skill/reference/components/textarea/examples/examples.module.css +3 -10
- package/dist/skill/reference/components/textarea/examples/in-form.tsx +3 -3
- package/dist/skill/reference/components/textarea/examples/sizes.tsx +10 -7
- package/dist/skill/reference/components/textarea/examples/states.tsx +29 -13
- package/dist/skill/reference/components/textarea/examples/validation.tsx +45 -36
- package/dist/skill/reference/components/thumbnail/COMPONENT.md +17 -13
- package/dist/skill/reference/components/thumbnail/examples/examples.module.css +1 -1
- package/dist/skill/reference/components/thumbnail/examples/states.tsx +1 -1
- package/dist/skill/reference/components/thumbnail/examples/variants.tsx +12 -1
- package/dist/skill/reference/components/timeline/COMPONENT.md +51 -35
- package/dist/skill/reference/components/timeline/examples/links.tsx +14 -14
- package/dist/skill/reference/components/timeline/examples/narrow.tsx +6 -6
- package/dist/skill/reference/components/timeline/examples/overview.tsx +6 -6
- package/dist/skill/reference/components/timeline/examples/sizes.tsx +28 -23
- package/dist/skill/reference/components/timeline/examples/structure.tsx +30 -30
- package/dist/skill/reference/components/timeline/examples/variants.tsx +40 -28
- package/dist/skill/reference/components/tooltip/COMPONENT.md +10 -6
- package/dist/skill/reference/components/tooltip/examples/examples.module.css +1 -5
- package/dist/skill/reference/components/tooltip/examples/non-interactive-trigger.tsx +1 -1
- package/dist/skill/reference/components/tooltip/examples/sizes.tsx +17 -10
- package/dist/skill/reference/components/typography/COMPONENT.md +18 -3
- package/dist/skill/reference/components/typography/examples/examples.module.css +3 -6
- package/dist/skill/reference/components/typography/examples/numeric.tsx +16 -0
- package/dist/skill/reference/components/video-note/COMPONENT.md +11 -7
- package/dist/skill/reference/components/visually-hidden/COMPONENT.md +8 -4
- package/dist/skill/reference/components/visually-hidden/examples/assertive.tsx +1 -1
- package/dist/skill/reference/components/visually-hidden/examples/overview.tsx +17 -7
- package/dist/skill/reference/components/voice-player/COMPONENT.md +15 -7
- package/dist/skill/reference/foundation.md +568 -0
- package/dist/skill/reference/layout/app-shell/COMPONENT.md +53 -36
- package/dist/skill/reference/layout/app-shell/examples/examples.module.css +2 -22
- package/dist/skill/reference/layout/app-shell/examples/footer.tsx +10 -10
- package/dist/skill/reference/layout/app-shell/examples/overview.tsx +21 -25
- package/dist/skill/reference/layout/app-shell/examples/screen.module.css +2 -2
- package/dist/skill/reference/layout/app-shell/examples/screen.tsx +48 -47
- package/dist/skill/reference/layout/app-shell/examples/template.tsx +13 -17
- package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +30 -20
- package/dist/skill/reference/layout/bottom-nav/examples/examples.module.css +2 -7
- 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/bottom-nav/examples/router.tsx +6 -5
- package/dist/skill/reference/layout/page/COMPONENT.md +353 -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/{components/page-content → layout/page}/examples/examples.module.css +32 -16
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/grid.tsx +18 -16
- package/dist/skill/reference/layout/page/examples/list-detail.tsx +112 -0
- package/dist/skill/reference/layout/page/examples/narrow.tsx +75 -0
- package/dist/skill/reference/layout/page/examples/overview.tsx +57 -0
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.module.css +1 -1
- package/{src/components/page-content → dist/skill/reference/layout/page}/examples/screen.tsx +29 -19
- package/{src/components/page-content → dist/skill/reference/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 +13 -13
- package/dist/skill/reference/layout/sidebar/COMPONENT.md +51 -40
- package/dist/skill/reference/layout/sidebar/examples/account.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/brand-header.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/collapsible-groups.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/controlled-open.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/controlled.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/custom-part.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/dismiss.tsx +50 -0
- package/dist/skill/reference/layout/sidebar/examples/examples.module.css +7 -32
- package/dist/skill/reference/layout/sidebar/examples/narrow.tsx +47 -42
- package/dist/skill/reference/layout/sidebar/examples/nested-items.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/overview.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/persist.tsx +1 -3
- package/dist/skill/reference/layout/sidebar/examples/router.tsx +12 -13
- package/dist/skill/reference/layout/sidebar/examples/sizes.tsx +6 -6
- package/dist/skill/responsive.md +116 -105
- package/dist/skill/ux.md +21 -9
- package/dist/theme/applyTheme.d.ts +7 -6
- package/dist/tokens/hues.d.ts +8 -0
- package/dist/tokens/layers.d.ts +5 -16
- package/dist/tokens/offGrid.d.ts +7 -0
- package/dist/tokens/primitives.d.ts +34 -9
- package/dist/tokens/semantic.d.ts +208 -51
- package/dist/tokens/themes/dark.d.ts +39 -33
- package/package.json +5 -3
- package/src/components/accordion/COMPONENT.md +16 -9
- package/src/components/accordion/examples/overview.tsx +2 -2
- package/src/components/accordion/examples/sizes.tsx +6 -8
- package/src/components/accordion/examples/states.tsx +27 -24
- package/src/components/accordion/examples/variants.tsx +6 -8
- package/src/components/accordion/examples/with-icon.tsx +22 -19
- package/src/components/avatar/COMPONENT.md +24 -17
- package/src/components/avatar/examples/examples.module.css +1 -4
- package/src/components/avatar/examples/overview.tsx +3 -3
- package/src/components/avatar/examples/presence.tsx +4 -4
- package/src/components/avatar/examples/src-from-state.tsx +3 -3
- package/src/components/avatar/examples/states.tsx +4 -4
- package/src/components/avatar/examples/team-group.tsx +3 -3
- package/src/components/badge/COMPONENT.md +66 -34
- package/src/components/badge/examples/controlled.tsx +32 -0
- package/src/components/badge/examples/examples.module.css +2 -2
- package/src/components/badge/examples/filter-values.tsx +4 -6
- package/src/components/badge/examples/in-controls.tsx +1 -1
- package/src/components/badge/examples/overview.tsx +6 -5
- package/src/components/badge/examples/square.tsx +21 -0
- package/src/components/badge/examples/states.tsx +4 -4
- package/src/components/badge/examples/with-icon.tsx +10 -1
- package/src/components/banner/COMPONENT.md +13 -9
- package/src/components/banner/examples/dismissible.tsx +3 -19
- package/src/components/banner/examples/examples.module.css +6 -1
- package/src/components/banner/examples/overview.tsx +1 -1
- package/src/components/banner/examples/page-strip.tsx +24 -22
- package/src/components/breadcrumb/COMPONENT.md +23 -16
- package/src/components/breadcrumb/examples/examples.module.css +1 -1
- package/src/components/breadcrumb/examples/overflow.tsx +1 -1
- package/src/components/breadcrumb/examples/sizes.tsx +6 -8
- package/src/components/breadcrumb/examples/with-icon.tsx +15 -8
- package/src/components/button/COMPONENT.md +67 -30
- package/src/components/button/examples/align.tsx +25 -0
- package/src/components/button/examples/controlled.tsx +21 -0
- package/src/components/button/examples/density.tsx +45 -0
- package/src/components/button/examples/examples.module.css +14 -25
- package/src/components/button/examples/hold-to-confirm.tsx +1 -1
- package/src/components/button/examples/label-morph.tsx +1 -1
- package/src/components/button/examples/on-colored-host.tsx +19 -19
- package/src/components/button/examples/over-media.tsx +7 -1
- package/src/components/button/examples/toggle.tsx +2 -10
- package/src/components/button-group/COMPONENT.md +21 -15
- package/src/components/button-group/examples/controlled.tsx +1 -1
- package/src/components/card/COMPONENT.md +21 -10
- package/src/components/card/examples/content-templates.tsx +8 -2
- package/src/components/card/examples/examples.module.css +4 -16
- package/src/components/card/examples/overview.tsx +11 -11
- package/src/components/card/examples/screen.module.css +1 -1
- package/src/components/card/examples/screen.tsx +185 -198
- package/src/components/card/examples/variants.tsx +74 -47
- package/src/components/chart-frame/COMPONENT.md +24 -28
- package/src/components/chart-frame/examples/controlled.tsx +9 -7
- package/src/components/chart-frame/examples/fill-height.tsx +13 -15
- package/src/components/chart-frame/examples/narrow.tsx +24 -5
- package/src/components/chart-frame/examples/overview.tsx +5 -2
- package/src/components/chart-frame/examples/states.tsx +72 -64
- package/src/components/chart-frame/examples/tooltip.tsx +27 -26
- package/src/components/chat/COMPONENT.md +39 -26
- package/src/components/chat/examples/group-chat.tsx +2 -2
- package/src/components/chat/examples/overview.tsx +119 -130
- package/src/components/chat/examples/reactions.tsx +18 -23
- package/src/components/chat/examples/screen.module.css +1 -1
- package/src/components/chat/examples/screen.tsx +212 -242
- package/src/components/chat/examples/states.tsx +23 -22
- package/src/components/chat-list/COMPONENT.md +11 -6
- package/src/components/chat-list/examples/controlled.tsx +2 -2
- package/src/components/chat-list/examples/examples.module.css +8 -8
- package/src/components/chat-list/examples/live.tsx +29 -22
- package/src/components/chat-list/examples/sizes.tsx +6 -8
- package/src/components/chat-list/examples/states.tsx +42 -38
- package/src/components/checkbox/COMPONENT.md +27 -14
- package/src/components/checkbox/examples/controlled.tsx +18 -16
- package/src/components/checkbox/examples/examples.module.css +15 -56
- package/src/components/checkbox/examples/in-form.tsx +16 -16
- package/src/components/checkbox/examples/indicator.tsx +19 -64
- package/src/components/checkbox/examples/overview.tsx +1 -1
- package/src/components/checkbox/examples/states.tsx +1 -1
- package/src/components/checkbox/examples/without-label.tsx +1 -1
- package/src/components/code-block/COMPONENT.md +16 -12
- package/src/components/code-block/examples/color-scheme.tsx +2 -4
- package/src/components/code-block/examples/examples.module.css +1 -9
- package/src/components/code-block/examples/narrow.tsx +1 -1
- package/src/components/color-field/COMPONENT.md +15 -9
- package/src/components/color-field/examples/examples.module.css +4 -5
- package/src/components/color-field/examples/in-form.tsx +15 -13
- package/src/components/color-field/examples/sizes.tsx +5 -1
- package/src/components/color-field/examples/states.tsx +15 -3
- package/src/components/color-picker/COMPONENT.md +69 -22
- package/src/components/color-picker/examples/controlled.tsx +16 -5
- package/src/components/color-picker/examples/examples.module.css +8 -12
- package/src/components/color-picker/examples/in-form.tsx +24 -22
- package/src/components/color-picker/examples/overview.tsx +6 -11
- package/src/components/color-picker/examples/panel.tsx +1 -1
- package/src/components/color-picker/examples/sizes.tsx +10 -16
- package/src/components/color-picker/examples/states.tsx +28 -23
- package/src/components/color-swatches/COMPONENT.md +22 -8
- package/src/components/color-swatches/examples/examples.module.css +3 -4
- package/src/components/color-swatches/examples/in-form.tsx +19 -17
- package/src/components/color-swatches/examples/palette.tsx +24 -0
- package/src/components/color-swatches/examples/wrapping.tsx +17 -2
- package/src/components/command-menu/COMPONENT.md +60 -20
- package/src/components/command-menu/examples/sizes.tsx +20 -15
- package/src/components/command-menu/examples/states.tsx +46 -24
- package/src/components/composer/COMPONENT.md +42 -24
- package/src/components/composer/examples/examples.module.css +0 -9
- package/src/components/composer/examples/narrow.tsx +1 -1
- package/src/components/composer/examples/reply-edit.tsx +3 -3
- package/src/components/composer/examples/sizes.tsx +3 -5
- package/src/components/composer/examples/states.tsx +4 -6
- package/src/components/confirm-dialog/COMPONENT.md +26 -13
- package/src/components/confirm-dialog/examples/dismiss.tsx +27 -0
- package/src/components/confirm-dialog/examples/failure.tsx +9 -16
- package/src/components/crossfade/COMPONENT.md +13 -7
- package/src/components/crossfade/examples/examples.module.css +1 -40
- package/src/components/crossfade/examples/fill.tsx +16 -19
- package/src/components/crossfade/examples/overview.tsx +14 -16
- package/src/components/crossfade/examples/record-switch.tsx +6 -11
- package/src/components/crossfade/examples/screen.module.css +1 -24
- package/src/components/crossfade/examples/screen.tsx +108 -124
- package/src/components/data-table/COMPONENT.md +36 -26
- package/src/components/data-table/examples/controlled.tsx +14 -2
- package/src/components/data-table/examples/examples.module.css +10 -9
- package/src/components/data-table/examples/narrow.tsx +5 -1
- package/src/components/data-table/examples/row-link.tsx +2 -1
- package/src/components/data-table/examples/screen.module.css +2 -2
- package/src/components/data-table/examples/screen.tsx +53 -62
- package/src/components/data-table/examples/server.tsx +6 -2
- package/src/components/data-table/examples/sizes.tsx +17 -17
- package/src/components/data-table/examples/states.tsx +37 -29
- package/src/components/datepicker/COMPONENT.md +53 -22
- package/src/components/datepicker/examples/dismiss.tsx +15 -0
- package/src/components/datepicker/examples/examples.module.css +9 -2
- package/src/components/datepicker/examples/in-form.tsx +33 -25
- package/src/components/datepicker/examples/inline-panel.tsx +3 -1
- package/src/components/datepicker/examples/sizes.tsx +2 -2
- package/src/components/datepicker/examples/states.tsx +2 -2
- package/src/components/datepicker/examples/validation.tsx +3 -3
- package/src/components/description-list/COMPONENT.md +24 -9
- package/src/components/description-list/examples/examples.module.css +4 -24
- package/src/components/description-list/examples/narrow.tsx +1 -1
- package/src/components/description-list/examples/screen.module.css +0 -18
- package/src/components/description-list/examples/screen.tsx +119 -134
- package/src/components/description-list/examples/sizes.tsx +2 -4
- package/src/components/description-list/examples/structure.tsx +6 -7
- package/src/components/description-list/examples/totals.tsx +40 -0
- package/src/components/digit-input/COMPONENT.md +12 -6
- package/src/components/digit-input/examples/examples.module.css +2 -2
- package/src/components/digit-input/examples/grouped.tsx +4 -4
- package/src/components/digit-input/examples/in-form.tsx +1 -1
- package/src/components/digit-input/examples/sizes.tsx +5 -3
- package/src/components/digit-input/examples/states.tsx +14 -6
- package/src/components/digit-input/examples/validation.tsx +1 -1
- package/src/components/divider/COMPONENT.md +28 -14
- package/src/components/divider/examples/align.tsx +2 -4
- package/src/components/divider/examples/examples.module.css +16 -17
- package/src/components/divider/examples/or-separator.tsx +3 -5
- package/src/components/divider/examples/overview.tsx +18 -16
- package/src/components/divider/examples/vertical.tsx +25 -8
- package/src/components/divider/examples/with-icon.tsx +1 -1
- package/src/components/dnd/COMPONENT.md +52 -34
- package/src/components/dnd/examples/drop-zones.tsx +1 -1
- package/src/components/dnd/examples/examples.module.css +7 -7
- package/src/components/dnd/examples/states.tsx +41 -35
- package/src/components/drawer/COMPONENT.md +38 -15
- package/src/components/drawer/examples/guard.tsx +1 -3
- package/src/components/drawer/examples/header-actions.tsx +1 -1
- package/src/components/drawer/examples/in-form.tsx +31 -31
- package/src/components/drawer/examples/placement.tsx +1 -1
- package/src/components/drawer/examples/screen.tsx +137 -160
- package/src/components/drawer/examples/sizes.tsx +32 -27
- package/src/components/dropdown/COMPONENT.md +59 -24
- package/src/components/dropdown/examples/context-menu.tsx +75 -0
- package/src/components/dropdown/examples/examples.module.css +1 -1
- package/src/components/dropdown/examples/sizes.tsx +39 -34
- package/src/components/dropdown/examples/states.tsx +37 -29
- package/src/components/empty-page/COMPONENT.md +20 -9
- package/src/components/empty-page/examples/compact.tsx +28 -18
- package/src/components/empty-page/examples/examples.module.css +0 -43
- package/src/components/empty-page/examples/narrow.tsx +3 -3
- package/src/components/empty-page/examples/region-error.tsx +6 -11
- package/src/components/empty-page/examples/sizes.tsx +13 -13
- package/src/components/empty-page/examples/variants.tsx +34 -30
- package/src/components/example-frame/COMPONENT.md +23 -11
- package/src/components/example-frame/examples/controlled.tsx +3 -3
- package/src/components/field-list/COMPONENT.md +14 -8
- 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/sizes.tsx +32 -26
- package/src/components/field-list/examples/states.tsx +37 -31
- package/src/components/fieldset/COMPONENT.md +11 -6
- package/src/components/fieldset/examples/examples.module.css +1 -1
- package/src/components/fieldset/examples/states.tsx +1 -1
- package/src/components/file-upload/COMPONENT.md +68 -30
- package/src/components/file-upload/examples/avatar-upload.tsx +5 -5
- package/src/components/file-upload/examples/custom-body.tsx +12 -7
- package/src/components/file-upload/examples/examples.module.css +4 -4
- package/src/components/file-upload/examples/narrow.tsx +1 -1
- package/src/components/file-upload/examples/row-parts.tsx +4 -4
- package/src/components/file-upload/examples/screen.module.css +4 -4
- package/src/components/file-upload/examples/screen.tsx +70 -84
- package/src/components/file-upload/examples/sizes.tsx +1 -3
- package/src/components/file-upload/examples/states.tsx +1 -3
- package/src/components/file-upload/examples/variants.tsx +13 -7
- package/src/components/gallery/COMPONENT.md +17 -7
- package/src/components/gallery/examples/album-sizes.tsx +52 -0
- package/src/components/gallery/examples/controlled.tsx +40 -0
- package/src/components/gallery/examples/examples.module.css +1 -1
- package/src/components/gallery/examples/overview.tsx +15 -43
- package/src/components/gallery/examples/transfer.tsx +22 -13
- package/src/components/gantt/COMPONENT.md +21 -15
- package/src/components/gantt/examples/examples.module.css +0 -16
- package/src/components/gantt/examples/occupancy.tsx +2 -2
- package/src/components/gantt/examples/screen.module.css +1 -1
- package/src/components/gantt/examples/screen.tsx +56 -74
- package/src/components/gantt/examples/sizes.tsx +16 -16
- package/src/components/gantt/examples/states.tsx +34 -30
- package/src/components/gantt/examples/variants.tsx +27 -25
- package/src/components/hint/COMPONENT.md +24 -14
- package/src/components/hint/examples/examples.module.css +10 -1
- package/src/components/hint/examples/hint-or-error.tsx +2 -2
- package/src/components/hint/examples/overview.tsx +10 -11
- package/src/components/hint/examples/sizes.tsx +1 -1
- package/src/components/input/COMPONENT.md +10 -6
- package/src/components/input/examples/affixes.tsx +2 -2
- package/src/components/input/examples/examples.module.css +1 -1
- package/src/components/input/examples/sizes.tsx +9 -5
- package/src/components/input/examples/states.tsx +39 -23
- package/src/components/input/examples/with-icon.tsx +24 -16
- package/src/components/kanban/COMPONENT.md +30 -24
- package/src/components/kanban/examples/columns.tsx +14 -19
- package/src/components/kanban/examples/item-link.tsx +2 -2
- package/src/components/kanban/examples/limits.tsx +1 -1
- package/src/components/kanban/examples/narrow.tsx +1 -1
- package/src/components/kanban/examples/screen.module.css +2 -4
- package/src/components/kanban/examples/screen.tsx +55 -68
- package/src/components/kanban/examples/states.tsx +37 -58
- package/src/components/kanban/examples/variants.tsx +0 -3
- package/src/components/kbd/COMPONENT.md +11 -7
- package/src/components/kbd/examples/examples.module.css +1 -20
- package/src/components/kbd/examples/in-controls.tsx +2 -2
- package/src/components/kbd/examples/shortcut-list.tsx +14 -26
- package/src/components/label/COMPONENT.md +26 -11
- package/src/components/label/examples/examples.module.css +12 -9
- package/src/components/label/examples/overview.tsx +6 -10
- package/src/components/label/examples/structure.tsx +2 -2
- package/src/components/link-button/COMPONENT.md +33 -20
- package/src/components/link-button/examples/as-child.tsx +1 -1
- package/src/components/link-button/examples/external-link.tsx +1 -1
- package/src/components/link-button/examples/overview.tsx +4 -2
- package/src/components/link-button/examples/variants.tsx +2 -2
- package/src/components/list/COMPONENT.md +24 -16
- package/src/components/list/examples/examples.module.css +0 -8
- package/src/components/list/examples/overflow.tsx +1 -1
- package/src/components/list/examples/overview.tsx +31 -30
- package/src/components/list/examples/sizes.tsx +23 -23
- package/src/components/list/examples/states.tsx +38 -21
- package/src/components/list/examples/with-icon.tsx +16 -14
- package/src/components/login-form/COMPONENT.md +69 -16
- package/src/components/login-form/examples/narrow.tsx +1 -1
- package/src/components/login-form/examples/register.tsx +1 -1
- package/src/components/media-viewer/COMPONENT.md +12 -8
- package/src/components/media-viewer/examples/controlled.tsx +16 -16
- package/src/components/media-viewer/examples/examples.module.css +3 -5
- package/src/components/media-viewer/examples/video.tsx +1 -1
- package/src/components/message/COMPONENT.md +102 -46
- package/src/components/message/examples/typing.tsx +5 -5
- package/src/components/modal/COMPONENT.md +71 -37
- package/src/components/modal/examples/dismiss.tsx +35 -27
- package/src/components/modal/examples/enter-key.tsx +22 -25
- package/src/components/modal/examples/examples.module.css +0 -7
- package/src/components/modal/examples/guard.tsx +2 -4
- package/src/components/modal/examples/in-form.tsx +28 -28
- package/src/components/modal/examples/long-content.tsx +6 -4
- package/src/components/modal/examples/sizes.tsx +36 -31
- package/src/components/modal/examples/structure.tsx +1 -1
- package/src/components/native-select/COMPONENT.md +7 -3
- package/src/components/native-select/examples/examples.module.css +3 -3
- package/src/components/native-select/examples/in-form.tsx +28 -29
- package/src/components/native-select/examples/sizes.tsx +2 -2
- package/src/components/native-select/examples/states.tsx +2 -2
- package/src/components/notification/COMPONENT.md +36 -31
- package/src/components/notification/examples/examples.module.css +1 -2
- package/src/components/notification/examples/in-form.tsx +28 -20
- package/src/components/notification/examples/sizes.tsx +16 -12
- package/src/components/notification/examples/undo.tsx +7 -15
- package/src/components/pagination/COMPONENT.md +29 -18
- package/src/components/pagination/examples/controlled.tsx +2 -1
- package/src/components/pagination/examples/narrow.tsx +5 -5
- package/src/components/popover/COMPONENT.md +44 -20
- package/src/components/popover/examples/controlled-open.tsx +6 -4
- package/src/components/popover/examples/dismiss.tsx +37 -28
- package/src/components/popover/examples/examples.module.css +2 -2
- package/src/components/popover/examples/sizes.tsx +32 -27
- package/src/components/popover/examples/width.tsx +57 -0
- package/src/components/progress-bar/COMPONENT.md +21 -29
- package/src/components/progress-bar/examples/examples.module.css +1 -1
- package/src/components/progress-circle/COMPONENT.md +21 -29
- package/src/components/progress-circle/examples/examples.module.css +1 -1
- package/src/components/progress-circle/examples/on-color.tsx +16 -0
- package/src/components/progress-circle/examples/variants.tsx +1 -0
- package/src/components/radio/COMPONENT.md +13 -4
- package/src/components/radio/examples/examples.module.css +1 -1
- package/src/components/scroll-container/COMPONENT.md +18 -12
- package/src/components/scroll-container/examples/auto-scroll.tsx +8 -4
- package/src/components/scroll-container/examples/edges.tsx +4 -4
- package/src/components/scroll-container/examples/examples.module.css +7 -51
- package/src/components/scroll-container/examples/load-more.tsx +4 -4
- package/src/components/scroll-container/examples/lock.tsx +4 -4
- package/src/components/scroll-container/examples/log.tsx +97 -0
- package/src/components/scroll-container/examples/overscroll.tsx +4 -4
- package/src/components/scroll-container/examples/overview.tsx +5 -5
- package/src/components/scroll-container/examples/scrollbar.tsx +4 -4
- package/src/components/scroll-container/examples/snap.tsx +2 -2
- package/src/components/scroll-container/examples/variants.tsx +1 -0
- package/src/components/segmented-control/COMPONENT.md +24 -12
- package/src/components/segmented-control/examples/controlled.tsx +2 -4
- package/src/components/segmented-control/examples/examples.module.css +0 -8
- package/src/components/segmented-control/examples/scroll.tsx +1 -1
- package/src/components/select/COMPONENT.md +33 -9
- package/src/components/select/examples/dismiss.tsx +26 -0
- package/src/components/select/examples/examples.module.css +1 -1
- package/src/components/select/examples/server-search.tsx +6 -2
- package/src/components/select/examples/sizes.tsx +2 -2
- package/src/components/select/examples/states.tsx +2 -2
- package/src/components/select/examples/with-icon.tsx +20 -18
- package/src/components/sheet/COMPONENT.md +44 -21
- package/src/components/sheet/examples/header-actions.tsx +23 -4
- package/src/components/sheet/examples/overview.tsx +25 -10
- package/src/components/skeleton/COMPONENT.md +8 -4
- package/src/components/skeleton/examples/examples.module.css +1 -13
- package/src/components/skeleton/examples/with-crossfade.tsx +7 -7
- package/src/components/slider/COMPONENT.md +13 -8
- package/src/components/slider/examples/examples.module.css +6 -7
- package/src/components/slider/examples/hint-and-error.tsx +3 -5
- package/src/components/slider/examples/in-form.tsx +21 -19
- package/src/components/slider/examples/states.tsx +14 -10
- package/src/components/smart-filter/COMPONENT.md +42 -22
- package/src/components/smart-filter/examples/examples.module.css +3 -21
- package/src/components/smart-filter/examples/many-values.tsx +12 -8
- package/src/components/smart-filter/examples/ranges.tsx +2 -1
- package/src/components/smart-filter/examples/sizes.tsx +9 -7
- package/src/components/sparkline/COMPONENT.md +8 -3
- package/src/components/sparkline/examples/curve.tsx +16 -11
- package/src/components/sparkline/examples/examples.module.css +1 -1
- package/src/components/sparkline/examples/signed-bars.tsx +2 -2
- package/src/components/sparkline/examples/states.tsx +14 -10
- package/src/components/spinner/COMPONENT.md +15 -9
- package/src/components/spinner/examples/examples.module.css +2 -14
- package/src/components/spinner/examples/overview.tsx +1 -1
- package/src/components/stepper/COMPONENT.md +50 -41
- package/src/components/stepper/examples/examples.module.css +1 -6
- package/src/components/stepper/examples/narrow.tsx +1 -1
- package/src/components/stepper/examples/sizes.tsx +6 -8
- package/src/components/stepper/examples/states.tsx +44 -43
- package/src/components/stepper/examples/with-icon.tsx +19 -17
- package/src/components/switch/COMPONENT.md +22 -9
- package/src/components/switch/examples/examples.module.css +2 -2
- package/src/components/switch/examples/states.tsx +3 -3
- package/src/components/tabs/COMPONENT.md +21 -16
- package/src/components/tabs/examples/in-drawer.tsx +1 -1
- package/src/components/tabs/examples/sizes.tsx +5 -10
- package/src/components/tabs/examples/variants.tsx +19 -23
- package/src/components/tag-select/COMPONENT.md +19 -6
- package/src/components/tag-select/examples/creatable.tsx +2 -2
- package/src/components/tag-select/examples/dismiss.tsx +23 -0
- package/src/components/tag-select/examples/examples.module.css +3 -3
- package/src/components/tag-select/examples/in-form.tsx +31 -32
- package/src/components/tag-select/examples/sizes.tsx +2 -2
- package/src/components/tag-select/examples/states.tsx +2 -2
- package/src/components/textarea/COMPONENT.md +10 -6
- package/src/components/textarea/examples/examples.module.css +3 -10
- package/src/components/textarea/examples/in-form.tsx +3 -3
- package/src/components/textarea/examples/sizes.tsx +10 -7
- package/src/components/textarea/examples/states.tsx +29 -13
- package/src/components/textarea/examples/validation.tsx +45 -36
- package/src/components/thumbnail/COMPONENT.md +17 -13
- package/src/components/thumbnail/examples/examples.module.css +1 -1
- package/src/components/thumbnail/examples/states.tsx +1 -1
- package/src/components/thumbnail/examples/variants.tsx +12 -1
- package/src/components/timeline/COMPONENT.md +51 -35
- package/src/components/timeline/examples/links.tsx +14 -14
- package/src/components/timeline/examples/narrow.tsx +6 -6
- package/src/components/timeline/examples/overview.tsx +6 -6
- package/src/components/timeline/examples/sizes.tsx +28 -23
- package/src/components/timeline/examples/structure.tsx +30 -30
- package/src/components/timeline/examples/variants.tsx +40 -28
- package/src/components/tooltip/COMPONENT.md +10 -6
- package/src/components/tooltip/examples/examples.module.css +1 -5
- package/src/components/tooltip/examples/non-interactive-trigger.tsx +1 -1
- package/src/components/tooltip/examples/sizes.tsx +17 -10
- package/src/components/typography/COMPONENT.md +18 -3
- package/src/components/typography/examples/examples.module.css +3 -6
- package/src/components/typography/examples/numeric.tsx +16 -0
- package/src/components/video-note/COMPONENT.md +11 -7
- package/src/components/visually-hidden/COMPONENT.md +8 -4
- package/src/components/visually-hidden/examples/assertive.tsx +1 -1
- package/src/components/visually-hidden/examples/overview.tsx +17 -7
- package/src/components/voice-player/COMPONENT.md +15 -7
- package/src/layout/app-shell/COMPONENT.md +53 -36
- package/src/layout/app-shell/examples/examples.module.css +2 -22
- package/src/layout/app-shell/examples/footer.tsx +10 -10
- package/src/layout/app-shell/examples/overview.tsx +21 -25
- package/src/layout/app-shell/examples/screen.module.css +2 -2
- package/src/layout/app-shell/examples/screen.tsx +48 -47
- package/src/layout/app-shell/examples/template.tsx +13 -17
- package/src/layout/bottom-nav/COMPONENT.md +30 -20
- package/src/layout/bottom-nav/examples/examples.module.css +2 -7
- 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/bottom-nav/examples/router.tsx +6 -5
- package/src/layout/page/COMPONENT.md +353 -0
- package/src/layout/page/examples/actions-collapse.tsx +45 -0
- package/src/layout/page/examples/collapse.tsx +68 -0
- package/src/{components/page-content → layout/page}/examples/examples.module.css +32 -16
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/grid.tsx +18 -16
- package/src/layout/page/examples/list-detail.tsx +112 -0
- package/src/layout/page/examples/narrow.tsx +75 -0
- package/src/layout/page/examples/overview.tsx +57 -0
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.module.css +1 -1
- package/{dist/skill/reference/components/page-content → src/layout/page}/examples/screen.tsx +29 -19
- package/{dist/skill/reference/components/page-content → src/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 +13 -13
- package/src/layout/sidebar/COMPONENT.md +51 -40
- package/src/layout/sidebar/examples/account.tsx +1 -3
- package/src/layout/sidebar/examples/brand-header.tsx +1 -3
- package/src/layout/sidebar/examples/collapsible-groups.tsx +1 -3
- package/src/layout/sidebar/examples/controlled-open.tsx +1 -3
- package/src/layout/sidebar/examples/controlled.tsx +1 -3
- package/src/layout/sidebar/examples/custom-part.tsx +1 -3
- package/src/layout/sidebar/examples/dismiss.tsx +50 -0
- package/src/layout/sidebar/examples/examples.module.css +7 -32
- package/src/layout/sidebar/examples/narrow.tsx +47 -42
- package/src/layout/sidebar/examples/nested-items.tsx +1 -3
- package/src/layout/sidebar/examples/overview.tsx +1 -3
- package/src/layout/sidebar/examples/persist.tsx +1 -3
- package/src/layout/sidebar/examples/router.tsx +12 -13
- package/src/layout/sidebar/examples/sizes.tsx +6 -6
- package/src/styles/controls.css +2 -2
- package/src/styles/fonts.css +22 -0
- package/src/styles/globals.css +89 -12
- package/src/styles/theme-dark.css +25 -24
- package/src/styles/theme-light.css +70 -23
- package/src/styles/tokens.css +17 -5
- package/dist/components/dnd/useFlipList.d.ts +0 -17
- package/dist/components/gantt/useEdgeAutoScroll.d.ts +0 -12
- package/dist/components/modal/ModalDialog.d.ts +0 -46
- package/dist/components/page-content/PageContent.d.ts +0 -173
- package/dist/components/page-toolbar/PageToolbar.d.ts +0 -54
- package/dist/hooks/useStateSwap.d.ts +0 -8
- package/dist/internal/highlightTsxHtml.d.ts +0 -2
- package/dist/internal/layoutPxFromPrimitives.d.ts +0 -6
- package/dist/internal/mergeRefs.d.ts +0 -6
- package/dist/layout/app-header/AppHeader.d.ts +0 -109
- package/dist/skill/reference/components/drawer/examples/examples.module.css +0 -8
- package/dist/skill/reference/components/page-content/COMPONENT.md +0 -272
- package/dist/skill/reference/components/page-content/examples/list-detail.tsx +0 -106
- 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 -143
- 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 -40
- package/dist/skill/reference/components/page-toolbar/examples/without-search.tsx +0 -60
- package/dist/skill/reference/components/popover/examples/match-trigger-width.tsx +0 -23
- package/dist/skill/reference/components/scroll-container/examples/chat.tsx +0 -101
- package/dist/skill/reference/components/spinner/examples/loading-region.tsx +0 -22
- package/dist/skill/reference/layout/app-header/COMPONENT.md +0 -186
- package/dist/skill/reference/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/dist/skill/reference/layout/app-header/examples/examples.module.css +0 -47
- package/dist/skill/reference/layout/app-header/examples/in-app-shell.tsx +0 -69
- package/dist/skill/reference/layout/app-header/examples/narrow.tsx +0 -28
- 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/drawer/examples/examples.module.css +0 -8
- package/src/components/page-content/COMPONENT.md +0 -272
- package/src/components/page-content/examples/list-detail.tsx +0 -106
- 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 -143
- 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 -40
- package/src/components/page-toolbar/examples/without-search.tsx +0 -60
- package/src/components/popover/examples/match-trigger-width.tsx +0 -23
- package/src/components/scroll-container/examples/chat.tsx +0 -101
- package/src/components/spinner/examples/loading-region.tsx +0 -22
- package/src/layout/app-header/COMPONENT.md +0 -186
- package/src/layout/app-header/examples/breadcrumbs.tsx +0 -37
- package/src/layout/app-header/examples/examples.module.css +0 -47
- package/src/layout/app-header/examples/in-app-shell.tsx +0 -69
- package/src/layout/app-header/examples/narrow.tsx +0 -28
- package/src/layout/app-header/examples/overview.tsx +0 -34
- package/src/layout/app-header/examples/page-title.tsx +0 -78
- package/src/layout/app-shell/examples/contained.tsx +0 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Campaign limits submitted with the form by `name`, a calm note confirms the save — `name`, `label`. */
|
|
2
|
-
import { Button, Slider, Typography } from "prime-ui-kit";
|
|
2
|
+
import { Button, Fieldset, Slider, Typography } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import styles from "./examples.module.css";
|
|
@@ -16,24 +16,26 @@ export default function SliderInFormExample() {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<form className={styles.
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
<form className={styles.form} noValidate onSubmit={submit}>
|
|
20
|
+
<Fieldset aria-label="Лимиты кампании">
|
|
21
|
+
<Slider
|
|
22
|
+
label="Показов одному клиенту в день"
|
|
23
|
+
name="dailyCap"
|
|
24
|
+
min={1}
|
|
25
|
+
max={10}
|
|
26
|
+
defaultValue={3}
|
|
27
|
+
showValue
|
|
28
|
+
onValueChange={() => setSaved(undefined)}
|
|
29
|
+
/>
|
|
30
|
+
<Slider
|
|
31
|
+
label="Доля бюджета на ставки, %"
|
|
32
|
+
name="bidShare"
|
|
33
|
+
step={5}
|
|
34
|
+
defaultValue={40}
|
|
35
|
+
showValue
|
|
36
|
+
onValueChange={() => setSaved(undefined)}
|
|
37
|
+
/>
|
|
38
|
+
</Fieldset>
|
|
37
39
|
<div className={styles.actions}>
|
|
38
40
|
<Button.Root type="submit">Сохранить лимиты</Button.Root>
|
|
39
41
|
{saved ? (
|
|
@@ -3,19 +3,23 @@ import { Slider } from "prime-ui-kit";
|
|
|
3
3
|
|
|
4
4
|
export default function SliderStatesExample() {
|
|
5
5
|
return (
|
|
6
|
-
|
|
6
|
+
<>
|
|
7
7
|
<div>
|
|
8
|
-
<
|
|
8
|
+
<div>
|
|
9
|
+
<Slider label="min" showValue defaultValue={0} />
|
|
10
|
+
</div>
|
|
11
|
+
<div>
|
|
12
|
+
<Slider label="max" showValue defaultValue={100} />
|
|
13
|
+
</div>
|
|
9
14
|
</div>
|
|
10
15
|
<div>
|
|
11
|
-
<
|
|
16
|
+
<div>
|
|
17
|
+
<Slider label="invalid" showValue defaultValue={90} invalid />
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<Slider label="disabled" showValue defaultValue={35} disabled />
|
|
21
|
+
</div>
|
|
12
22
|
</div>
|
|
13
|
-
|
|
14
|
-
<Slider label="invalid" showValue defaultValue={90} invalid />
|
|
15
|
-
</div>
|
|
16
|
-
<div>
|
|
17
|
-
<Slider label="disabled" showValue defaultValue={35} disabled />
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
23
|
+
</>
|
|
20
24
|
);
|
|
21
25
|
}
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
- An API that takes one value per field (`multiple: false`), a screen whose text search lives elsewhere (`searchable={false}`), values of different kinds in one field (`group`).
|
|
14
14
|
|
|
15
15
|
## When not to use
|
|
16
|
-
- One field with a few options → use [SegmentedControl](../segmented-control/COMPONENT.md), [Select](../select/COMPONENT.md) or [TagSelect](../tag-select/COMPONENT.md) in the
|
|
16
|
+
- One field with a few options → use [SegmentedControl](../segmented-control/COMPONENT.md), [Select](../select/COMPONENT.md) or [TagSelect](../tag-select/COMPONENT.md) in the page's `Page.Tools`.
|
|
17
17
|
- A search outside a table or list page (inside a picker, a settings section, a panel) → [Input](../input/COMPONENT.md) with a search icon. Over a table or list page the search is SmartFilter even with no fields yet (`fields={[]}`): it grows into filters without a rebuild.
|
|
18
18
|
- Choosing values for a form field → use [TagSelect](../tag-select/COMPONENT.md).
|
|
19
|
-
- One period that drives a whole dashboard → [Datepicker](../datepicker/COMPONENT.md) in the page
|
|
19
|
+
- One period that drives a whole dashboard → [Datepicker](../datepicker/COMPONENT.md) in the page's `Page.Tools`; SmartFilter ranges filter rows of a list.
|
|
20
20
|
|
|
21
21
|
## Import
|
|
22
22
|
```tsx
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
|
|
31
31
|
## Anatomy
|
|
32
32
|
```
|
|
33
|
-
SmartFilter.Root state + context
|
|
33
|
+
SmartFilter.Root state + context, no DOM
|
|
34
34
|
├─ SmartFilter.Toolbar [search Input (searchable)] [filter Button (count Badge)] — the anchor of the panel
|
|
35
35
|
│ └─ panel flush Popover as wide as the toolbar; sections split by Dividers
|
|
36
36
|
│ ├─ query row ghost Button «Искать «text»» + Kbd ↵, while typing
|
|
@@ -41,14 +41,14 @@ SmartFilter.Root state + context (flex column)
|
|
|
41
41
|
│ └─ footer hint · count · Reset Button
|
|
42
42
|
└─ SmartFilter.Chips applied filters as removable Badges · add / clear all Buttons
|
|
43
43
|
```
|
|
44
|
-
The toolbar and the chips are separate parts so a page can put them in different places; both only need to be inside `Root
|
|
44
|
+
The toolbar and the chips are separate parts so a page can put them in different places; both only need to be inside `Root`, which draws nothing of its own.
|
|
45
45
|
|
|
46
46
|
## API
|
|
47
47
|
|
|
48
48
|
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
49
49
|
|
|
50
50
|
### SmartFilter.Root
|
|
51
|
-
|
|
51
|
+
No DOM, no ref. The value, the search and the panel state shared by its parts; the host places the parts.
|
|
52
52
|
|
|
53
53
|
| Prop | Type | Default | Description |
|
|
54
54
|
|---|---|---|---|
|
|
@@ -59,14 +59,13 @@ The toolbar and the chips are separate parts so a page can put them in different
|
|
|
59
59
|
| `search` | `string` | — | Search text, controlled. |
|
|
60
60
|
| `defaultSearch` | `string` | `""` | Initial search text, uncontrolled. |
|
|
61
61
|
| `onSearchChange` | `(search: string) => void` | — | Every keystroke; debounce in the owner when it asks a server. |
|
|
62
|
-
| `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `"m"` | Tier of the filter button, the search, the tags and the panel. |
|
|
62
|
+
| `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | host tier, else `"m"` | Tier of the filter button, the search, the tags and the panel. Without it the tier of its host, else `m`. |
|
|
63
63
|
| `collapsedLimit` | `number` | `12` | Values of one field shown before «Ещё N» (not while searching). |
|
|
64
64
|
| `labels` | `Partial<SmartFilterLabels>` | — | Built-in strings, see Labels. |
|
|
65
|
-
| `
|
|
66
|
-
| `children` | `ReactNode` | — (required) | `SmartFilter.Toolbar` and `SmartFilter.Chips`, anywhere inside. |
|
|
65
|
+
| `children` | `ReactNode` | — (required) | `SmartFilter.Toolbar` and `SmartFilter.Chips`, anywhere inside — in a page bar the Root wraps `Page.Root`. |
|
|
67
66
|
|
|
68
67
|
### SmartFilter.Toolbar
|
|
69
|
-
`ref` → `HTMLDivElement`. A `<div>`: the search Input first, then the filter Button (a count Badge while filters apply); the anchor of the panel, a flush Popover.
|
|
68
|
+
`ref` → `HTMLDivElement`. A `<div>`: the search Input first, then the filter Button (a count Badge while filters apply), which shows only its icon and count when the search would get too little room; the anchor of the panel, a flush Popover.
|
|
70
69
|
|
|
71
70
|
| Prop | Type | Default | Description |
|
|
72
71
|
|---|---|---|---|
|
|
@@ -80,10 +79,12 @@ The toolbar and the chips are separate parts so a page can put them in different
|
|
|
80
79
|
|---|---|---|---|
|
|
81
80
|
| `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className` and the other attributes of the chips row. |
|
|
82
81
|
|
|
83
|
-
###
|
|
82
|
+
### Types
|
|
83
|
+
|
|
84
|
+
#### `SmartFilterField`
|
|
84
85
|
One entry of `fields`: data, not a part. Selected values missing from `options` stay visible so they can be removed.
|
|
85
86
|
|
|
86
|
-
|
|
|
87
|
+
| Field | Type | Default | Description |
|
|
87
88
|
|---|---|---|---|
|
|
88
89
|
| `key` | `string` | — (required) | Key of the field in the value. |
|
|
89
90
|
| `label` | `string` | — (required) | Field name in the panel and the chips. |
|
|
@@ -91,10 +92,24 @@ One entry of `fields`: data, not a part. Selected values missing from `options`
|
|
|
91
92
|
| `options` | `{ value: string; label: string; icon?: ReactNode; group?: string }[]` | — (required) | `options` fields: values; `icon` is a decorative kit Icon before the label; values with one `group` stay together under that heading, groups in the order they first appear. |
|
|
92
93
|
| `finite` | `boolean` | `true` | `options` fields: a fixed set — hiding every value is refused. `false` for an open set (services, users). |
|
|
93
94
|
| `multiple` | `boolean` | `true` | `options` fields: many values at once. `false` — one value and no hiding: a press picks only that value, a second press clears it (an API that takes one value per field). |
|
|
94
|
-
| `formatValue` | `(value: number) => string` |
|
|
95
|
+
| `formatValue` | `(value: number) => string` | Russian digit groups | `range` fields: a bound in the chip («1 000 ₽»). |
|
|
96
|
+
|
|
97
|
+
### Functions
|
|
98
|
+
|
|
99
|
+
#### `matchesSmartFilter(entry, item)`
|
|
100
|
+
`(entry: SmartFilterFieldValue \| undefined, item: string \| number \| Date \| null \| undefined) => boolean`
|
|
101
|
+
|
|
102
|
+
Checks one item's value against a field's entry on the client; an empty entry matches everything.
|
|
103
|
+
|
|
104
|
+
#### `resolveSmartFilterValues(entry, all)`
|
|
105
|
+
`(entry: SmartFilterFieldValue \| undefined, all: readonly string[]) => string[]`
|
|
95
106
|
|
|
96
|
-
|
|
97
|
-
|
|
107
|
+
Turns a fixed field's entry into the list of values to ask a server for.
|
|
108
|
+
|
|
109
|
+
#### `isSmartFilterRange(entry)`
|
|
110
|
+
`(entry: SmartFilterFieldValue \| undefined) => entry is SmartFilterRange<number> \| SmartFilterRange<Date>`
|
|
111
|
+
|
|
112
|
+
Tells a range entry from a selection.
|
|
98
113
|
|
|
99
114
|
## Variants
|
|
100
115
|
|
|
@@ -141,7 +156,7 @@ same height and type.
|
|
|
141
156
|
|---|---|---|
|
|
142
157
|
| closed / open | filter button, search focus | button `aria-expanded`; the panel is a Popover below the toolbar |
|
|
143
158
|
| value neutral | no selection | gray Badge |
|
|
144
|
-
| value shown | press |
|
|
159
|
+
| value shown | press | the Badge's pressed (selected) look, `aria-pressed="true"`, `data-mode="include"` |
|
|
145
160
|
| value hidden | «−», Alt+click, Shift+Enter | red Badge with «НЕ», `data-mode="exclude"`; its «−» stays visible and unhides |
|
|
146
161
|
| cannot hide | last value of a `finite` field | the «−» is disabled |
|
|
147
162
|
| searching | `search` | only matching values, the match in `accent-text` (a `<mark>`); fields with nothing found in a compact EmptyPage; the «Искать» row closes the panel |
|
|
@@ -149,19 +164,22 @@ same height and type.
|
|
|
149
164
|
| range inverted | `from` above `to` | both bound inputs `aria-invalid` with the danger ring; nothing matches |
|
|
150
165
|
| single value | `multiple: false` | at most one value `aria-pressed`; no «−» |
|
|
151
166
|
| no filters | empty value | no count on the button, no Chips |
|
|
167
|
+
| compact button | the toolbar narrower than the search's 9rem plus the labelled button (search and fields both present) | the button shows its icon and the count Badge; its name stays «Фильтр» (`aria-label` without filters, a visually hidden label with them) |
|
|
152
168
|
|
|
153
169
|
## Layout & spacing
|
|
154
|
-
- The panel is a flush Popover as wide as the toolbar; every section is a full-width row with its own padding (`--prime-space-3` × `--prime-space-4`, footer `--prime-space-2` × `--prime-space-4`), Dividers run edge to edge, the field label column is `--prime-space-24
|
|
155
|
-
- The toolbar is one row of controls (`--prime-space-2` gap): the search first, growing from 9rem (`--prime-space-24` × 1.5), then the filter button at its own width. When less than 9rem is left beside the button, the button
|
|
170
|
+
- The panel is a flush Popover at least as wide as the toolbar (`width="min-trigger"`), by its content up to twice the panel minimum when the toolbar is narrow; every section is a full-width row with its own padding (`--prime-space-3` × `--prime-space-4`, footer `--prime-space-2` × `--prime-space-4`), Dividers run edge to edge, the field label column is at least `--prime-space-24` (a longer name takes its own width, never breaking inside a word); a row narrower than 24rem stacks the label over the values (an intrinsic wrap, no breakpoint).
|
|
171
|
+
- The toolbar is one row of controls (`--prime-space-2` gap): the search first, growing from 9rem (`--prime-space-24` × 1.5), then the filter button at its own width. When less than 9rem is left beside the labelled button, the button shows only its icon and count and stays beside the search, which gives its width instead of wrapping. Every row stays one control high. The search and the button also stand alone: `searchable={false}` keeps the button, empty `fields` keep the search. Search first, filter second — the active filters (`SmartFilter.Chips`) sit under them.
|
|
156
172
|
- Chips are Badges of the toolbar tier on the badge scale (`xs` → `s`), so a tag sits lower than the controls above it; «Добавить фильтр» is a tag of the same tier and «Сбросить все» a LinkButton with the tag's text size.
|
|
157
|
-
- Values and chips wrap with `--prime-space-2` gaps; «Сбросить все» is pushed to the end.
|
|
173
|
+
- Values and chips wrap with `--prime-space-2` gaps; «Сбросить все» is pushed to the end. The chips row rises in with the first filter and closes up in place with the last (`partPresence`).
|
|
158
174
|
- Option groups stack `--prime-space-3` apart, a caption `--prime-space-1` above each group's values. A range row holds two equal Inputs with a dash between them, centred on the field label.
|
|
159
175
|
- While typing a search a range row stays only when its field name matches.
|
|
160
|
-
- The root
|
|
176
|
+
- The root draws nothing: its host places Toolbar and Chips. In a page bar the Toolbar goes in `Page.Tools` and the Chips in `Page.Chips`, with `SmartFilter.Root` around `Page.Root`; outside a page a host stacks them (a `Card.Body`, a form column).
|
|
161
177
|
|
|
162
178
|
## Accessibility
|
|
163
179
|
|
|
164
180
|
### Keyboard
|
|
181
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
182
|
+
|
|
165
183
|
| Key | Action |
|
|
166
184
|
|---|---|
|
|
167
185
|
| `Tab` | Moves through the panel values and their «−» (shown on focus). |
|
|
@@ -170,6 +188,8 @@ same height and type.
|
|
|
170
188
|
| `Enter` · `Escape` | In the search, close the panel. |
|
|
171
189
|
|
|
172
190
|
### ARIA
|
|
191
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
192
|
+
|
|
173
193
|
- The filter button has `aria-expanded` and `aria-haspopup="dialog"`; the panel is a non-modal `role="dialog"` named by a visually hidden `labels.filter` title.
|
|
174
194
|
- Values are toggle buttons with `aria-pressed`; the «−» has its own name (`labels.hideValue` / `labels.unhideValue`); a hidden value carries the «НЕ» text, so meaning is never in color alone.
|
|
175
195
|
- Fields with nothing found are announced through `role="status"`.
|
|
@@ -224,12 +244,12 @@ same height and type.
|
|
|
224
244
|
- A fixed field marked `finite: false` → the user can hide every value and get an empty list.
|
|
225
245
|
- Filtering the list with `includes` → use `matchesSmartFilter` (empty `include` is "any", `exclude` rejects; range bounds are inclusive, dates by whole days; an item with no value passes only an empty filter).
|
|
226
246
|
- Sending `include` to a server for a hidden value of a fixed field → use `resolveSmartFilterValues` («hide» becomes «all except», `[]` means no filter).
|
|
227
|
-
- Putting `Chips` outside `SmartFilter.Root` → every part needs the root.
|
|
247
|
+
- Putting `Chips` outside `SmartFilter.Root` → every part needs the root; when Toolbar and Chips stand in different groups of a page bar, wrap `Page.Root` in it.
|
|
228
248
|
- A second row of filter buttons next to the toolbar → fields belong in `fields`.
|
|
229
249
|
- An amount or a period in its own Popover beside the toolbar → a `range` / `date-range` field; it gets a chip and the count.
|
|
230
250
|
- One field split in two because its values are of different kinds → one field with `group` on the options.
|
|
231
251
|
- Cutting the «−» and the search off on the client for a one-value API → `multiple: false` and `searchable={false}`.
|
|
232
252
|
|
|
233
253
|
## Related
|
|
234
|
-
- **Built from:** [Button](../button/COMPONENT.md), [Badge](../badge/COMPONENT.md), [Input](../input/COMPONENT.md), [Datepicker](../datepicker/COMPONENT.md), [Popover](../popover/COMPONENT.md), [Divider](../divider/COMPONENT.md), [Kbd](../kbd/COMPONENT.md), [EmptyPage](../empty-page/COMPONENT.md), [LinkButton](../link-button/COMPONENT.md), [Typography](../typography/COMPONENT.md), Icon (`action.search`, `action.filter`, `action.add`, `nav.chevronDown`)
|
|
235
|
-
- **See also:** [
|
|
254
|
+
- **Built from:** [Button](../button/COMPONENT.md), [Badge](../badge/COMPONENT.md), [Input](../input/COMPONENT.md), [Datepicker](../datepicker/COMPONENT.md), [Popover](../popover/COMPONENT.md), [Divider](../divider/COMPONENT.md), [Kbd](../kbd/COMPONENT.md), [EmptyPage](../empty-page/COMPONENT.md), [LinkButton](../link-button/COMPONENT.md), [Typography](../typography/COMPONENT.md), Icon (`action.search`, `action.filter`, `action.add`, `nav.chevronDown`), [VisuallyHidden](../visually-hidden/COMPONENT.md)
|
|
255
|
+
- **See also:** [Page](../../layout/page/COMPONENT.md) (`Page.Tools`, `Page.Chips`), [TagSelect](../tag-select/COMPONENT.md), [DataTable](../data-table/COMPONENT.md)
|
|
@@ -8,27 +8,6 @@
|
|
|
8
8
|
min-width: 0;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/* sizes.tsx: one tier per block, its caption right under it, blocks apart. */
|
|
12
|
-
.sizes {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
gap: var(--prime-space-8);
|
|
16
|
-
width: 100%;
|
|
17
|
-
min-width: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.size {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
gap: var(--prime-space-2);
|
|
25
|
-
min-width: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.size > :first-child {
|
|
29
|
-
align-self: stretch;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
11
|
/* A request row in the list: method, route (takes the room), service. */
|
|
33
12
|
.request {
|
|
34
13
|
display: flex;
|
|
@@ -51,6 +30,9 @@
|
|
|
51
30
|
|
|
52
31
|
/* 320 px: the smallest supported viewport. */
|
|
53
32
|
.narrow {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
gap: var(--prime-space-3);
|
|
54
36
|
width: min(100%, calc(var(--prime-space-20) * 4));
|
|
55
37
|
min-width: 0;
|
|
56
38
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** An open set of twenty services, degraded ones marked with an icon, collapsed after eight; typing narrows the panel and marks the match in accent — `finite`, `icon`, `collapsedLimit`. */
|
|
2
2
|
import { Icon, SmartFilter, type SmartFilterField } from "prime-ui-kit";
|
|
3
3
|
|
|
4
|
+
import styles from "./examples.module.css";
|
|
5
|
+
|
|
4
6
|
const SERVICES = [
|
|
5
7
|
"access-policy",
|
|
6
8
|
"billing",
|
|
@@ -41,13 +43,15 @@ const FIELDS: SmartFilterField[] = [
|
|
|
41
43
|
|
|
42
44
|
export default function SmartFilterManyValuesExample() {
|
|
43
45
|
return (
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
<div className={styles.stack}>
|
|
47
|
+
<SmartFilter.Root
|
|
48
|
+
fields={FIELDS}
|
|
49
|
+
collapsedLimit={8}
|
|
50
|
+
defaultValue={{ service: { include: [], exclude: ["events"] } }}
|
|
51
|
+
>
|
|
52
|
+
<SmartFilter.Toolbar />
|
|
53
|
+
<SmartFilter.Chips />
|
|
54
|
+
</SmartFilter.Root>
|
|
55
|
+
</div>
|
|
52
56
|
);
|
|
53
57
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Deals narrowed by an amount from–to and a period from the calendar; each range is one readable chip, and the bounds go to the server as from / to parameters — `kind`, `formatValue`, `matchesSmartFilter`, `isSmartFilterRange`. */
|
|
2
2
|
import {
|
|
3
3
|
Card,
|
|
4
|
+
formatDateValue,
|
|
4
5
|
isSmartFilterRange,
|
|
5
6
|
matchesSmartFilter,
|
|
6
7
|
SmartFilter,
|
|
@@ -62,7 +63,7 @@ const DEALS = [
|
|
|
62
63
|
const INITIAL: SmartFilterValue = { amount: { from: 50_000, to: 500_000 } };
|
|
63
64
|
|
|
64
65
|
const asParam = (bound: number | Date) =>
|
|
65
|
-
bound instanceof Date ? bound
|
|
66
|
+
bound instanceof Date ? formatDateValue(bound) : String(bound);
|
|
66
67
|
|
|
67
68
|
/** The query a server gets: a range becomes `key_from` / `key_to`, a selection its included values. */
|
|
68
69
|
function toQuery(value: SmartFilterValue) {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** Every size tier: the filter button, the search, the tags and the panel follow one tier — `size`. */
|
|
2
|
-
import { SmartFilter, type SmartFilterField, Typography } from "prime-ui-kit";
|
|
3
|
-
|
|
4
|
-
import styles from "./examples.module.css";
|
|
2
|
+
import { Card, SmartFilter, type SmartFilterField, Typography } from "prime-ui-kit";
|
|
5
3
|
|
|
6
4
|
const FIELDS: SmartFilterField[] = [
|
|
7
5
|
{
|
|
@@ -16,12 +14,16 @@ const SIZES = ["xs", "s", "m", "l", "xl"] as const;
|
|
|
16
14
|
|
|
17
15
|
export default function SmartFilterSizesExample() {
|
|
18
16
|
return (
|
|
19
|
-
<div
|
|
17
|
+
<div>
|
|
20
18
|
{SIZES.map((size) => (
|
|
21
|
-
<div key={size}
|
|
19
|
+
<div key={size}>
|
|
22
20
|
<SmartFilter.Root fields={FIELDS} size={size} defaultValue={ONLY_GET}>
|
|
23
|
-
<
|
|
24
|
-
|
|
21
|
+
<Card.Root>
|
|
22
|
+
<Card.Body>
|
|
23
|
+
<SmartFilter.Toolbar />
|
|
24
|
+
<SmartFilter.Chips />
|
|
25
|
+
</Card.Body>
|
|
26
|
+
</Card.Root>
|
|
25
27
|
</SmartFilter.Root>
|
|
26
28
|
<Typography as="span" variant="caption" tone="muted">
|
|
27
29
|
{size}
|
|
@@ -57,13 +57,13 @@ compact: the plot alone (no head, no value row); loading — the p
|
|
|
57
57
|
| `layout` | `"default" \| "compact"` | `"default"` | `default` — the headline over an 80 px plot; `compact` — the plot alone at an `xs` control height with the dot at rest, for a DataTable cell; the scrubbed point shows in the tooltip and `aria-valuetext`. |
|
|
58
58
|
| `change` | `"previous" \| "first" \| "none"` | `"previous"` | What the change badge of a shown point compares it with: `previous` — the point before it; `first` — the first point with a value (the change over the period); `none` — no badge. |
|
|
59
59
|
| `summary` | `"latest" \| "sum" \| "average"` | `"latest"` | What the headline shows at rest: `latest` — the latest point (or `highlight`), for a level (MRR, conversion); `sum` — the period total, for a flow (revenue per day); `average` — the period mean. |
|
|
60
|
-
| `highlight` | `number` |
|
|
60
|
+
| `highlight` | `number` | the latest point with a value | Index of the point at rest with `summary="latest"` (the current month): the headline returns to it; `bars` draw the other bars quieter. Not allowed with `sum` / `average`. |
|
|
61
61
|
| `compareTo` | `number` | — | The same summary for the previous period («прошлые 30 дней»): the badge at rest compares the headline with it. Without it a `sum` / `average` headline shows no change at rest. |
|
|
62
62
|
| `min` | `number` | — | The value axis reaches down to at least this value: a floor of zero, or one scale for several sparklines (a table column). Data below widens the scale, never gets cut. |
|
|
63
63
|
| `max` | `number` | — | The value axis reaches up to at least this value; data above widens the scale. |
|
|
64
64
|
| `reference` | `number` | — | A dashed horizontal line at this value — a plan, a target, an average; the scale holds it and the chart is described by `labels.reference`. |
|
|
65
65
|
| `loading` | `boolean` | `false` | The series is on its way: Skeletons of the date, the value and the plot that cross-fade into the data; the title stays, the root is `aria-busy` and the chart is not focusable yet. |
|
|
66
|
-
| `formatValue` | `(value: number) => string` |
|
|
66
|
+
| `formatValue` | `(value: number) => string` | Russian digit groups | Display of a value in the headline, the tooltip, the reference description and the spoken point («312 400 ₽»). |
|
|
67
67
|
| `labels` | `Partial<SparklineLabels>` | — | Built-in strings, see Labels. |
|
|
68
68
|
| `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className`, `data-*` and the other div attributes on the root. |
|
|
69
69
|
|
|
@@ -133,12 +133,15 @@ Put it in a `Card` for a dashboard tile.
|
|
|
133
133
|
- Bars share the width equally, 4 px apart; the zero line sits where 0 falls on the scale (the bottom when every value is positive).
|
|
134
134
|
- In a dashboard, wrap it in `Card.Root` + `Card.Body`; several cards go in a grid.
|
|
135
135
|
- When the value row does not fit (a narrow card), the change badge wraps under the value.
|
|
136
|
+
- On a head narrower than 20rem (a phone card) the date takes its own line under the title, which wraps instead of being cut; the break follows the width only, so a date that changes while scrubbing never moves it.
|
|
136
137
|
- `layout="compact"` fits a DataTable row of any tier (plot and dot within an `xs` control height) and takes the cell width, at least `--prime-space-24`; give the column a `width` for an even plot per row. Put the number next to it in its own column: the compact plot shows a value only in its tooltip while scrubbed.
|
|
137
138
|
- The tooltip is the kit's chart tooltip, placed like every anchored layer (`usePosition`): right of the pointer at its height, on the left only where the right has no room in the viewport — crossing the middle never moves it; from the keyboard right of the point at mid-height. Portaled, so a card or a table scroller never clips it.
|
|
138
139
|
|
|
139
140
|
## Accessibility
|
|
140
141
|
|
|
141
142
|
### Keyboard
|
|
143
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
144
|
+
|
|
142
145
|
| Key | Action |
|
|
143
146
|
|---|---|
|
|
144
147
|
| `←` · `→` · `↓` · `↑` | Previous or next point: `←` / `↓` back, `→` / `↑` forward, as on a slider. |
|
|
@@ -147,6 +150,8 @@ Put it in a `Card` for a dashboard tile.
|
|
|
147
150
|
| `Escape` | Hides the tooltip and returns the headline to rest. |
|
|
148
151
|
|
|
149
152
|
### ARIA
|
|
153
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
154
|
+
|
|
150
155
|
- The plot is `role="slider"` named by `label`; `aria-valuetext` speaks the point («8 окт: 312 400 ₽», `labels.point`); a point with no data speaks `labels.empty` («8 окт: Нет данных»). At rest with `sum` / `average` it speaks the period and the summary («9 сен – 8 окт: 8 914 000 ₽»). With `reference` the slider is described by `labels.reference` («Ориентир: 3%», `aria-describedby`). The headline follows the point under the pointer or the arrows, in text.
|
|
151
156
|
- The headline with the value and change reads as plain text.
|
|
152
157
|
- The change carries a sign and an arrow, never color alone; a negative bar goes down, not only red.
|
|
@@ -190,5 +195,5 @@ Put it in a `Card` for a dashboard tile.
|
|
|
190
195
|
- A full Sparkline squeezed into a table cell, or its headline hidden with CSS → `layout="compact"`.
|
|
191
196
|
|
|
192
197
|
## Related
|
|
193
|
-
- **Built from:** [Badge](../badge/COMPONENT.md) (change), [Skeleton](../skeleton/COMPONENT.md) (loading), `Icon` (trend arrow), `ChartTooltip` (the chart tooltip shared with ChartFrame)
|
|
198
|
+
- **Built from:** [Badge](../badge/COMPONENT.md) (change), [Skeleton](../skeleton/COMPONENT.md) (loading), `Icon` (trend arrow), `ChartTooltip` (the chart tooltip shared with ChartFrame), [ScrollContainer](../scroll-container/COMPONENT.md) (the tooltip's floating panel)
|
|
194
199
|
- **See also:** [ChartFrame](../chart-frame/COMPONENT.md), [DataTable](../data-table/COMPONENT.md) (a compact Sparkline per row), [Card](../card/COMPONENT.md), [ProgressBar](../progress-bar/COMPONENT.md), [SegmentedControl](../segmented-control/COMPONENT.md)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** The same month of active users as a smooth curve, straight segments and steps — `curve`. */
|
|
2
|
-
import { Sparkline, type SparklinePoint
|
|
2
|
+
import { Card, Sparkline, type SparklinePoint } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples.module.css";
|
|
3
5
|
|
|
4
6
|
const USERS: SparklinePoint[] = [
|
|
5
7
|
{ label: "сен, 1 нед.", value: 1240 },
|
|
@@ -10,19 +12,22 @@ const USERS: SparklinePoint[] = [
|
|
|
10
12
|
{ label: "окт, 2 нед.", value: 1840 },
|
|
11
13
|
];
|
|
12
14
|
|
|
13
|
-
const CURVES = [
|
|
15
|
+
const CURVES = [
|
|
16
|
+
{ curve: "smooth", title: "Плавная кривая" },
|
|
17
|
+
{ curve: "linear", title: "Прямые отрезки" },
|
|
18
|
+
{ curve: "step", title: "Ступени" },
|
|
19
|
+
] as const;
|
|
14
20
|
|
|
15
21
|
export default function SparklineCurveExample() {
|
|
16
22
|
return (
|
|
17
|
-
|
|
18
|
-
{CURVES.map((curve) => (
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</div>
|
|
23
|
+
<>
|
|
24
|
+
{CURVES.map(({ curve, title }) => (
|
|
25
|
+
<Card.Root key={curve} className={styles.card}>
|
|
26
|
+
<Card.Body>
|
|
27
|
+
<Sparkline data={USERS} label={title} curve={curve} />
|
|
28
|
+
</Card.Body>
|
|
29
|
+
</Card.Root>
|
|
25
30
|
))}
|
|
26
|
-
|
|
31
|
+
</>
|
|
27
32
|
);
|
|
28
33
|
}
|
|
@@ -14,8 +14,8 @@ const PROFIT: SparklinePoint[] = [
|
|
|
14
14
|
{ label: "авг", value: 280_000 },
|
|
15
15
|
{ label: "сен", value: 470_000 },
|
|
16
16
|
{ label: "окт", value: 390_000 },
|
|
17
|
-
{ label: "ноя", value:
|
|
18
|
-
{ label: "дек", value:
|
|
17
|
+
{ label: "ноя", value: null },
|
|
18
|
+
{ label: "дек", value: null },
|
|
19
19
|
];
|
|
20
20
|
|
|
21
21
|
/** October is the current month: November and December are still empty. */
|
|
@@ -12,19 +12,23 @@ const formatRubles = (value: number) => `${value.toLocaleString("ru-RU")} ₽`;
|
|
|
12
12
|
|
|
13
13
|
export default function SparklineStatesExample() {
|
|
14
14
|
return (
|
|
15
|
-
|
|
15
|
+
<>
|
|
16
16
|
<div>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
<div>
|
|
18
|
+
<Sparkline data={REVENUE} label="Выручка" formatValue={formatRubles} />
|
|
19
|
+
<Typography as="span" variant="caption" tone="muted">
|
|
20
|
+
data
|
|
21
|
+
</Typography>
|
|
22
|
+
</div>
|
|
21
23
|
</div>
|
|
22
24
|
<div>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
<div>
|
|
26
|
+
<Sparkline data={[]} label="Выручка" loading />
|
|
27
|
+
<Typography as="span" variant="caption" tone="muted">
|
|
28
|
+
loading
|
|
29
|
+
</Typography>
|
|
30
|
+
</div>
|
|
27
31
|
</div>
|
|
28
|
-
|
|
32
|
+
</>
|
|
29
33
|
);
|
|
30
34
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
> An indeterminate loading indicator: the kit ring with the share unknown — a quarter arc turning on a faint track while a request runs.
|
|
7
7
|
|
|
8
8
|
## When to use
|
|
9
|
-
-
|
|
9
|
+
- Something is busy and has no content shape to hold (a running job on a status line, a request with no layout yet).
|
|
10
10
|
- A status line next to text («Загружаем счета…»).
|
|
11
11
|
- Inside a kit component that shows loading (it is the kit's one spinner).
|
|
12
12
|
|
|
@@ -51,7 +51,7 @@ Spinner <span role="status">; size and tone
|
|
|
51
51
|
|---|---|---|---|
|
|
52
52
|
| `default` | the color of the surrounding text | inside text, buttons, rows | yes |
|
|
53
53
|
| `secondary` | `text-secondary` | a status line in secondary text | |
|
|
54
|
-
| `muted` | `text-muted` | a
|
|
54
|
+
| `muted` | `text-muted` | a quiet status line under content | |
|
|
55
55
|
| `accent` | `accent-text` | the one loading spot that should draw the eye | |
|
|
56
56
|
| `success` · `warning` · `danger` | the status `*-text` color | loading inside a status block of that tone | |
|
|
57
57
|
|
|
@@ -61,29 +61,34 @@ Spinner <span role="status">; size and tone
|
|
|
61
61
|
| `xs` | 14px | dense rows, inside `xs` controls | |
|
|
62
62
|
| `s` | 16px | next to `body-s` text | |
|
|
63
63
|
| `m` | 20px | standalone next to `body-m` text | |
|
|
64
|
-
| `l` | 24px |
|
|
65
|
-
| `xl` | 32px | a
|
|
64
|
+
| `l` | 24px | next to `body-l` or a title | |
|
|
65
|
+
| `xl` | 32px | a running job with nothing to show yet, next to its explanation | |
|
|
66
66
|
| — (omitted) | the host's icon size, else the control tier (16 on `m`) | inside a kit control or next to its text | yes |
|
|
67
67
|
|
|
68
68
|
## States
|
|
69
69
|
| State | Driven by | DOM |
|
|
70
70
|
|---|---|---|
|
|
71
|
+
| appearing | mounted | fades in over `fast` (`internal/enterMotion`), so a spinner that comes and goes never blinks |
|
|
71
72
|
| spinning | mounted | the ring turns at a constant speed (`--prime-motion-loop × 3` per turn, linear) |
|
|
72
73
|
| reduced motion | `prefers-reduced-motion` | the ring keeps turning, twice as slow (`--prime-motion-loop × 6` per turn) and linear: a loading cue is information, so the token is not zeroed |
|
|
73
74
|
| size / tone | `size`, `tone` | `data-size` (the explicit size, else the host control tier, else `m`), `data-tone` (only for a non-default tone) |
|
|
74
75
|
|
|
75
76
|
## Layout & spacing
|
|
76
77
|
- The ring fills the icon box: a stroke of two border widths (the line weight, an icon's stroke) — a round-capped quarter arc in the tone color over an 18% track of it; `inline-flex`, `vertical-align: middle`. The svg turns as a whole (a compositor transform).
|
|
77
|
-
- Next to text: one row, `align-items: center`,
|
|
78
|
-
-
|
|
78
|
+
- Next to text: one row, `align-items: center`, 8px apart (the `m` tier gap).
|
|
79
|
+
- A region whose content has a shape (a card, a list) shows a `Skeleton` of that shape, not a spinner.
|
|
79
80
|
- Render the real layout around it; never a full-screen overlay of spinners.
|
|
80
81
|
|
|
81
82
|
## Accessibility
|
|
82
83
|
|
|
83
84
|
### Keyboard
|
|
85
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
86
|
+
|
|
84
87
|
No keyboard interaction.
|
|
85
88
|
|
|
86
89
|
### ARIA
|
|
90
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
91
|
+
|
|
87
92
|
- `role="status"` with a visually hidden `labels.loading`, so screen readers learn that something is loading.
|
|
88
93
|
- When the host already announces it is busy (`aria-busy` on a button or a region), pass `aria-hidden="true"`.
|
|
89
94
|
- Under `prefers-reduced-motion` the ring keeps turning, slower and linear, so the loading cue stays readable.
|
|
@@ -98,17 +103,18 @@ No keyboard interaction.
|
|
|
98
103
|
## Examples
|
|
99
104
|
| Example | Shows |
|
|
100
105
|
|---|---|
|
|
101
|
-
| [overview.tsx](examples/overview.tsx) | A loading status next to a short explanation; the spinner takes the text color
|
|
106
|
+
| [overview.tsx](examples/overview.tsx) | A loading status next to a short explanation; the spinner takes the text color and names the wait — `labels`. |
|
|
102
107
|
| [variants.tsx](examples/variants.tsx) | Every ring color; `default` follows the surrounding text — `tone`. |
|
|
103
108
|
| [sizes.tsx](examples/sizes.tsx) | Every size on the icon scale, 14 to 32 px — `size`. |
|
|
104
|
-
| [loading-region.tsx](examples/loading-region.tsx) | A card that loads its content: the region says it is busy and the spinner stays hidden from screen readers — `aria-hidden`. |
|
|
105
109
|
|
|
106
110
|
## Mistakes
|
|
107
111
|
- A hand-made spinner (`@keyframes spin` on a bordered circle) → use `Spinner`.
|
|
108
112
|
- A `Spinner` next to a `loading` Button → the button already shows one.
|
|
109
113
|
- Both `aria-busy` on the region and a spoken spinner inside → add `aria-hidden="true"` to the spinner.
|
|
110
114
|
- A spinner for a known progress → ProgressBar / ProgressCircle.
|
|
115
|
+
- A spinner in a card or a list while its content loads → a `Skeleton` in the content's shape.
|
|
116
|
+
- Fading a conditional spinner in by hand → the spinner fades itself in.
|
|
111
117
|
|
|
112
118
|
## Related
|
|
113
|
-
- **Built from:** `internal/ring` (the ring drawing, shared with ProgressCircle and the circle Button)
|
|
119
|
+
- **Built from:** `internal/ring` (the ring drawing, shared with ProgressCircle and the circle Button), `internal/enterMotion` (the fade-in), [VisuallyHidden](../visually-hidden/COMPONENT.md)
|
|
114
120
|
- **See also:** [Skeleton](../skeleton/COMPONENT.md), [ProgressBar](../progress-bar/COMPONENT.md), [ProgressCircle](../progress-circle/COMPONENT.md), [Button](../button/COMPONENT.md), [EmptyPage](../empty-page/COMPONENT.md)
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
/* Layout of the Spinner scenarios: semantic tokens only. */
|
|
2
2
|
|
|
3
|
-
/* overview.tsx: spinner and text in one line,
|
|
3
|
+
/* overview.tsx: spinner and text in one line, 8px apart (the m tier gap). */
|
|
4
4
|
.status {
|
|
5
5
|
display: inline-flex;
|
|
6
6
|
align-items: center;
|
|
7
|
-
gap: var(--prime-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* loading-region.tsx: the Card's size and its centered body. */
|
|
11
|
-
.region {
|
|
12
|
-
width: min(100%, var(--prime-modal-width-s));
|
|
13
|
-
min-height: calc(var(--prime-space-24) * 2);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.loading {
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
gap: var(--prime-space-3);
|
|
7
|
+
gap: var(--prime-space-2);
|
|
20
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** A loading status next to a short explanation; the spinner takes the text color
|
|
1
|
+
/** A loading status next to a short explanation; the spinner takes the text color and names the wait — `labels`. */
|
|
2
2
|
import { Spinner, Typography } from "prime-ui-kit";
|
|
3
3
|
|
|
4
4
|
import styles from "./examples.module.css";
|