prime-ui-kit 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -47
- package/dist/chunks/chunk-IQELQNMR.js +379 -0
- package/dist/chunks/chunk-LXGRKN34.js +13260 -0
- package/dist/chunks/chunk-ZEFCDEEQ.js +3493 -0
- package/dist/color-picker.d.ts +7 -0
- package/dist/color-picker.js +9 -0
- package/dist/components/accordion/Accordion.d.ts +44 -32
- package/dist/components/avatar/Avatar.d.ts +36 -53
- package/dist/components/badge/Badge.d.ts +50 -13
- package/dist/components/badge/edgeIcons.d.ts +13 -0
- package/dist/components/badge/tier.d.ts +0 -1
- package/dist/components/banner/Banner.d.ts +29 -60
- package/dist/components/breadcrumb/Breadcrumb.d.ts +11 -23
- package/dist/components/button/Button.d.ts +22 -36
- package/dist/components/button-group/ButtonGroup.d.ts +17 -17
- package/dist/components/card/Card.d.ts +75 -202
- package/dist/components/checkbox/Checkbox.d.ts +37 -38
- package/dist/components/code-block/CodeBlock.d.ts +5 -13
- package/dist/components/color-picker/ColorPicker.d.ts +76 -52
- package/dist/components/color-picker/ColorPresets.d.ts +18 -30
- package/dist/components/color-swatches/ColorSwatches.d.ts +40 -0
- package/dist/components/command-menu/CommandMenu.d.ts +138 -78
- package/dist/components/crossfade/Crossfade.d.ts +14 -0
- package/dist/components/data-table/DataTable.d.ts +35 -81
- package/dist/components/data-table/Footer.d.ts +16 -0
- package/dist/components/data-table/Head.d.ts +21 -0
- package/dist/components/data-table/Row.d.ts +56 -0
- package/dist/components/data-table/StateRows.d.ts +18 -0
- package/dist/components/data-table/rows.d.ts +60 -0
- package/dist/components/data-table/types.d.ts +40 -0
- package/dist/components/data-table/useColumnHover.d.ts +9 -0
- package/dist/components/data-table/useFrozenColumns.d.ts +16 -0
- package/dist/components/data-table/useInfiniteRows.d.ts +24 -0
- package/dist/components/data-table/useRowSelection.d.ts +35 -0
- package/dist/components/datepicker/Datepicker.d.ts +9 -126
- package/dist/components/datepicker/DatepickerPanel.d.ts +113 -0
- package/dist/components/datepicker/datepickerModel.d.ts +16 -22
- package/dist/components/datepicker/panelLayout.d.ts +50 -0
- package/dist/components/digit-input/DigitInput.d.ts +24 -19
- package/dist/components/divider/Divider.d.ts +7 -15
- package/dist/components/dnd/Dnd.d.ts +135 -0
- package/dist/components/dnd/DragOverlay.d.ts +6 -0
- package/dist/components/dnd/autoScroll.d.ts +5 -0
- package/dist/components/dnd/context.d.ts +5 -0
- package/dist/components/dnd/dragSession.d.ts +102 -0
- package/dist/components/dnd/geometry.d.ts +30 -0
- package/dist/components/dnd/labels.d.ts +18 -0
- package/dist/components/dnd/store.d.ts +9 -0
- package/dist/components/dnd/useDragSource.d.ts +36 -0
- package/dist/components/dnd/useDropTarget.d.ts +44 -0
- package/dist/components/dnd/useFlipList.d.ts +11 -0
- package/dist/components/dnd/useSortableList.d.ts +62 -0
- package/dist/components/drawer/Drawer.d.ts +13 -21
- package/dist/components/dropdown/Dropdown.d.ts +78 -84
- package/dist/components/empty-page/EmptyPage.d.ts +48 -48
- package/dist/components/example-frame/ExampleFrame.d.ts +20 -27
- package/dist/components/file-upload/FileUpload.d.ts +79 -134
- package/dist/components/hint/Hint.d.ts +10 -11
- package/dist/components/index.d.ts +58 -42
- package/dist/components/input/Input.d.ts +35 -37
- package/dist/components/kanban/Kanban.d.ts +129 -0
- package/dist/components/kbd/Kbd.d.ts +6 -12
- package/dist/components/label/Label.d.ts +18 -15
- package/dist/components/link-button/LinkButton.d.ts +14 -15
- package/dist/components/login-form/LoginForm.d.ts +115 -0
- package/dist/components/modal/DialogParts.d.ts +57 -16
- package/dist/components/modal/Modal.d.ts +9 -20
- package/dist/components/native-select/NativeSelect.d.ts +28 -0
- package/dist/components/notification/Notification.d.ts +50 -16
- package/dist/components/notification/NotificationStore.d.ts +2 -6
- package/dist/components/page-content/PageContent.d.ts +43 -52
- package/dist/components/page-toolbar/PageToolbar.d.ts +53 -0
- package/dist/components/pagination/Pagination.d.ts +11 -23
- package/dist/components/popover/Popover.d.ts +62 -26
- package/dist/components/progress-bar/ProgressBar.d.ts +17 -13
- package/dist/components/progress-circle/ProgressCircle.d.ts +14 -15
- package/dist/components/radio/Radio.d.ts +46 -54
- package/dist/components/scroll-container/ScrollContainer.d.ts +10 -13
- package/dist/components/segmented-control/SegmentedControl.d.ts +20 -29
- package/dist/components/select/Select.d.ts +54 -135
- package/dist/components/select/SelectItem.d.ts +68 -0
- package/dist/components/select/selectContext.d.ts +61 -0
- package/dist/components/skeleton/Skeleton.d.ts +22 -0
- package/dist/components/slider/Slider.d.ts +24 -16
- package/dist/components/smart-filter/SmartFilter.d.ts +105 -0
- package/dist/components/smart-filter/model.d.ts +33 -0
- package/dist/components/spinner/Spinner.d.ts +22 -0
- package/dist/components/stepper/Stepper.d.ts +32 -42
- package/dist/components/switch/Switch.d.ts +19 -37
- package/dist/components/tabs/Tabs.d.ts +65 -38
- package/dist/components/tag-select/TagOptionMenu.d.ts +29 -0
- package/dist/components/tag-select/TagSelect.d.ts +15 -16
- package/dist/components/tag-select/useChipOverflow.d.ts +19 -0
- package/dist/components/textarea/Textarea.d.ts +16 -31
- package/dist/components/thumbnail/Thumbnail.d.ts +41 -0
- package/dist/components/timeline/Timeline.d.ts +46 -61
- package/dist/components/tooltip/Tooltip.d.ts +21 -17
- package/dist/components/typography/Typography.d.ts +5 -21
- package/dist/hooks/useControllableState.d.ts +0 -1
- package/dist/hooks/useEdgeOverflow.d.ts +12 -0
- package/dist/hooks/useEnterConfirm.d.ts +15 -0
- package/dist/hooks/useImageStatus.d.ts +19 -0
- package/dist/hooks/useInertSiblings.d.ts +9 -0
- package/dist/hooks/useMediaQuery.d.ts +7 -0
- package/dist/hooks/useMergedRefs.d.ts +6 -2
- package/dist/hooks/useModalLayer.d.ts +22 -0
- package/dist/hooks/usePosition.d.ts +46 -40
- package/dist/hooks/usePresence.d.ts +0 -1
- package/dist/hooks/useScrollLock.d.ts +3 -5
- package/dist/hooks/useStateSwap.d.ts +8 -0
- package/dist/hooks/useSwipeDismiss.d.ts +34 -0
- package/dist/icons/Icon.d.ts +24 -7
- package/dist/icons/index.d.ts +2 -44
- package/dist/icons/registry.d.ts +85 -0
- package/dist/index.css +7053 -6846
- package/dist/index.d.ts +0 -1
- package/dist/index.js +106 -13830
- package/dist/internal/AnchorRectContext.d.ts +12 -0
- package/dist/internal/ChoiceField.d.ts +34 -0
- package/dist/internal/ControlSizeContext.d.ts +6 -2
- package/dist/internal/FieldFrame.d.ts +47 -8
- package/dist/internal/HighlightMatch.d.ts +13 -0
- package/dist/internal/MenuGroup.d.ts +8 -0
- package/dist/internal/Portal.d.ts +0 -1
- package/dist/internal/VisuallyHidden.d.ts +11 -0
- package/dist/internal/context.d.ts +0 -1
- package/dist/internal/cx.d.ts +0 -1
- package/dist/internal/data-attributes.d.ts +0 -1
- package/dist/internal/fieldClasses.d.ts +9 -0
- package/dist/internal/formatLabel.d.ts +6 -0
- package/dist/internal/highlightTsxHtml.d.ts +1 -2
- package/dist/internal/iconBox.d.ts +9 -0
- package/dist/internal/iconLayout.d.ts +15 -0
- package/dist/internal/imageSlot.d.ts +29 -0
- package/dist/internal/layoutPxFromPrimitives.d.ts +2 -3
- package/dist/internal/listbox.d.ts +40 -0
- package/dist/internal/mergeRefs.d.ts +4 -2
- package/dist/internal/overlay/FloatingPanel.d.ts +36 -0
- package/dist/internal/overlay/focus.d.ts +14 -0
- package/dist/internal/overlay/layerStack.d.ts +41 -0
- package/dist/internal/overlay/useFloatingLayer.d.ts +70 -0
- package/dist/internal/polymorphic.d.ts +9 -0
- package/dist/internal/progressSegments.d.ts +63 -0
- package/dist/internal/rovingFocus.d.ts +18 -0
- package/dist/internal/scrollAncestors.d.ts +1 -2
- package/dist/internal/slot.d.ts +11 -5
- package/dist/internal/states.d.ts +3 -2
- package/dist/internal/swatch.d.ts +56 -0
- package/dist/internal/touchTarget.d.ts +4 -0
- package/dist/layout/app-header/AppHeader.d.ts +110 -0
- package/dist/layout/app-shell/AppShell.d.ts +47 -22
- package/dist/layout/bottom-nav/BottomNav.d.ts +80 -0
- package/dist/layout/index.d.ts +6 -3
- package/dist/layout/sidebar/Sidebar.d.ts +206 -35
- package/dist/theme/applyTheme.d.ts +0 -1
- package/dist/tokens/naming.d.ts +6 -0
- package/dist/tokens/primitives.d.ts +26 -80
- package/dist/tokens/semantic.d.ts +122 -25
- package/dist/tokens/themes/dark.d.ts +7 -1
- package/package.json +30 -24
- package/src/components/accordion/COMPONENT.md +91 -101
- package/src/components/accordion/examples/collapsible.tsx +27 -0
- package/src/components/accordion/examples/controlled.tsx +36 -0
- package/src/components/accordion/examples/examples.module.css +6 -39
- package/src/components/accordion/examples/multiple.tsx +31 -0
- package/src/components/accordion/examples/overview.tsx +39 -0
- package/src/components/accordion/examples/sizes.tsx +14 -25
- package/src/components/accordion/examples/states.tsx +23 -48
- package/src/components/accordion/examples/variants.tsx +35 -0
- package/src/components/accordion/examples/with-icon.tsx +47 -0
- package/src/components/avatar/COMPONENT.md +88 -153
- package/src/components/avatar/examples/examples.module.css +6 -44
- package/src/components/avatar/examples/overview.tsx +18 -0
- package/src/components/avatar/examples/presence.tsx +20 -17
- package/src/components/avatar/examples/sizes.tsx +8 -10
- package/src/components/avatar/examples/src-from-state.tsx +4 -5
- package/src/components/avatar/examples/states.tsx +17 -27
- package/src/components/avatar/examples/team-group.tsx +21 -0
- package/src/components/avatar/examples/variants.tsx +40 -0
- package/src/components/badge/COMPONENT.md +113 -122
- package/src/components/{tag → badge}/examples/applied-filters.tsx +10 -11
- package/src/components/badge/examples/examples.module.css +14 -59
- package/src/components/badge/examples/filter-values.tsx +39 -0
- package/src/components/badge/examples/in-controls.tsx +14 -26
- package/src/components/badge/examples/overview.tsx +13 -0
- package/src/components/badge/examples/sizes.tsx +8 -10
- package/src/components/badge/examples/states.tsx +35 -29
- package/src/components/badge/examples/variants.tsx +27 -36
- package/src/components/badge/examples/with-icon.tsx +50 -0
- package/src/components/banner/COMPONENT.md +89 -94
- package/src/components/banner/examples/dismissible.tsx +38 -0
- package/src/components/banner/examples/examples.module.css +6 -22
- package/src/components/banner/examples/narrow.tsx +23 -0
- package/src/components/banner/examples/overview.tsx +18 -0
- package/src/components/banner/examples/page-strip.tsx +53 -0
- package/src/components/banner/examples/sizes.tsx +22 -21
- package/src/components/banner/examples/structure.tsx +45 -0
- package/src/components/banner/examples/variants.tsx +28 -55
- package/src/components/breadcrumb/COMPONENT.md +55 -59
- package/src/components/breadcrumb/examples/ellipsis.tsx +12 -0
- package/src/components/breadcrumb/examples/examples.module.css +3 -52
- package/src/components/breadcrumb/examples/overflow.tsx +26 -0
- package/src/components/breadcrumb/examples/overview.tsx +12 -0
- package/src/components/breadcrumb/examples/sizes.tsx +11 -14
- package/src/components/breadcrumb/examples/with-icon.tsx +14 -0
- package/src/components/button/COMPONENT.md +65 -66
- package/src/components/button/examples/as-child.tsx +8 -32
- package/src/components/button/examples/examples.module.css +18 -76
- package/src/components/button/examples/in-form.tsx +20 -14
- package/src/components/button/examples/on-colored-host.tsx +29 -0
- package/src/components/button/examples/overview.tsx +13 -0
- package/src/components/button/examples/sizes.tsx +7 -9
- package/src/components/button/examples/states.tsx +18 -28
- package/src/components/button/examples/variants.tsx +31 -0
- package/src/components/button/examples/with-icon.tsx +35 -23
- package/src/components/button-group/COMPONENT.md +64 -55
- package/src/components/button-group/examples/controlled.tsx +3 -3
- package/src/components/button-group/examples/examples.module.css +4 -39
- package/src/components/button-group/examples/full-width.tsx +10 -14
- package/src/components/button-group/examples/in-form.tsx +3 -3
- package/src/components/button-group/examples/orientation.tsx +6 -8
- package/src/components/button-group/examples/overview.tsx +12 -0
- package/src/components/button-group/examples/sizes.tsx +8 -10
- package/src/components/button-group/examples/states.tsx +28 -7
- package/src/components/button-group/examples/with-icon.tsx +45 -0
- package/src/components/card/COMPONENT.md +99 -298
- package/src/components/card/examples/{content.tsx → content-templates.tsx} +23 -29
- package/src/components/card/examples/examples.module.css +0 -8
- package/src/components/card/examples/flat.tsx +9 -14
- package/src/components/card/examples/kpi-media.tsx +42 -0
- package/src/components/card/examples/narrow.tsx +47 -0
- package/src/components/card/examples/{settings.tsx → overview.tsx} +7 -8
- package/src/components/card/examples/panel-chart.tsx +26 -34
- package/src/components/card/examples/{metrics.tsx → variants.tsx} +12 -18
- package/src/components/checkbox/COMPONENT.md +92 -96
- package/src/components/checkbox/examples/controlled.tsx +41 -0
- package/src/components/checkbox/examples/examples.module.css +47 -43
- package/src/components/checkbox/examples/in-form.tsx +34 -0
- package/src/components/checkbox/examples/indicator.tsx +54 -0
- package/src/components/checkbox/examples/overview.tsx +10 -0
- package/src/components/checkbox/examples/sizes.tsx +5 -10
- package/src/components/checkbox/examples/states.tsx +42 -23
- package/src/components/checkbox/examples/without-label.tsx +3 -7
- package/src/components/code-block/COMPONENT.md +55 -57
- package/src/components/code-block/examples/color-scheme.tsx +4 -15
- package/src/components/code-block/examples/examples.module.css +9 -40
- package/src/components/code-block/examples/{long-lines.tsx → narrow.tsx} +3 -4
- package/src/components/code-block/examples/overview.tsx +19 -0
- package/src/components/code-block/examples/variants.tsx +12 -21
- package/src/components/color-picker/COMPONENT.md +196 -165
- package/src/components/color-picker/examples/controlled.tsx +37 -0
- package/src/components/color-picker/examples/examples.module.css +19 -88
- package/src/components/color-picker/examples/formats.tsx +13 -18
- package/src/components/color-picker/examples/in-form.tsx +44 -0
- package/src/components/color-picker/examples/overview.tsx +37 -0
- package/src/components/color-picker/examples/panel.tsx +12 -13
- package/src/components/color-picker/examples/presets-sizes.tsx +15 -20
- package/src/components/color-picker/examples/presets.tsx +33 -0
- package/src/components/color-picker/examples/sizes.tsx +26 -0
- package/src/components/color-picker/examples/states.tsx +4 -14
- package/src/components/color-picker/examples/validation.tsx +18 -0
- package/src/components/color-swatches/COMPONENT.md +145 -0
- package/src/components/color-swatches/examples/controlled.tsx +22 -0
- package/src/components/color-swatches/examples/examples.module.css +19 -0
- package/src/components/color-swatches/examples/in-form.tsx +35 -0
- package/src/components/color-swatches/examples/overview.tsx +6 -0
- package/src/components/color-swatches/examples/sizes.tsx +19 -0
- package/src/components/color-swatches/examples/states.tsx +20 -0
- package/src/components/color-swatches/examples/wrapping.tsx +12 -0
- package/src/components/command-menu/COMPONENT.md +117 -180
- package/src/components/command-menu/examples/controlled-open.tsx +29 -0
- package/src/components/command-menu/examples/controlled.tsx +19 -26
- package/src/components/command-menu/examples/dismiss.tsx +39 -0
- package/src/components/command-menu/examples/overview.tsx +61 -0
- package/src/components/command-menu/examples/sizes.tsx +30 -51
- package/src/components/command-menu/examples/states.tsx +6 -16
- package/src/components/command-menu/examples/structure.tsx +54 -0
- package/src/components/crossfade/COMPONENT.md +104 -0
- package/src/components/crossfade/examples/examples.module.css +65 -0
- package/src/components/crossfade/examples/overview.tsx +102 -0
- package/src/components/crossfade/examples/record-switch.tsx +67 -0
- package/src/components/data-table/COMPONENT.md +181 -182
- package/src/components/data-table/examples/appearance.tsx +31 -34
- package/src/components/data-table/examples/columns-visibility.tsx +167 -0
- package/src/components/data-table/examples/content-width.tsx +46 -26
- package/src/components/data-table/examples/controlled.tsx +56 -0
- package/src/components/data-table/examples/detail-panel.tsx +23 -28
- package/src/components/data-table/examples/examples.module.css +20 -91
- package/src/components/data-table/examples/infinite-scroll.tsx +17 -18
- package/src/components/data-table/examples/narrow.tsx +28 -38
- package/src/components/data-table/examples/nested-rows.tsx +32 -54
- package/src/components/data-table/examples/numeric.tsx +10 -19
- package/src/components/data-table/examples/overview.tsx +54 -0
- package/src/components/data-table/examples/selection.tsx +11 -15
- package/src/components/data-table/examples/sizes.tsx +22 -33
- package/src/components/data-table/examples/states.tsx +23 -24
- package/src/components/data-table/examples/sticky.tsx +17 -24
- package/src/components/data-table/examples/toolbar.tsx +21 -23
- package/src/components/datepicker/COMPONENT.md +152 -164
- package/src/components/datepicker/examples/controlled-open.tsx +32 -0
- package/src/components/datepicker/examples/controlled.tsx +39 -0
- package/src/components/datepicker/examples/examples.module.css +9 -23
- package/src/components/datepicker/examples/in-form.tsx +32 -45
- package/src/components/datepicker/examples/inline-panel.tsx +3 -3
- package/src/components/datepicker/examples/narrow.tsx +1 -1
- package/src/components/datepicker/examples/overview.tsx +6 -0
- package/src/components/datepicker/examples/range-presets.tsx +6 -5
- package/src/components/datepicker/examples/sizes.tsx +7 -10
- package/src/components/datepicker/examples/states.tsx +9 -30
- package/src/components/datepicker/examples/validation.tsx +26 -0
- package/src/components/datepicker/examples/yearless.tsx +9 -8
- package/src/components/digit-input/COMPONENT.md +96 -58
- package/src/components/digit-input/examples/controlled.tsx +6 -15
- package/src/components/digit-input/examples/examples.module.css +13 -38
- package/src/components/digit-input/examples/full-width.tsx +13 -0
- package/src/components/digit-input/examples/grouped.tsx +11 -0
- package/src/components/digit-input/examples/in-form.tsx +32 -0
- package/src/components/digit-input/examples/on-complete.tsx +20 -0
- package/src/components/digit-input/examples/overview.tsx +6 -0
- package/src/components/digit-input/examples/sizes.tsx +5 -17
- package/src/components/digit-input/examples/states.tsx +6 -50
- package/src/components/digit-input/examples/validation.tsx +17 -0
- package/src/components/divider/COMPONENT.md +62 -53
- package/src/components/divider/examples/align.tsx +14 -0
- package/src/components/divider/examples/examples.module.css +6 -20
- package/src/components/divider/examples/or-separator.tsx +19 -0
- package/src/components/divider/examples/overview.tsx +30 -0
- package/src/components/divider/examples/sizes.tsx +11 -10
- package/src/components/divider/examples/vertical.tsx +21 -0
- package/src/components/divider/examples/with-icon.tsx +26 -0
- package/src/components/dnd/COMPONENT.md +197 -0
- package/src/components/dnd/examples/board.tsx +83 -0
- package/src/components/dnd/examples/drop-zones.tsx +82 -0
- package/src/components/dnd/examples/examples.module.css +89 -0
- package/src/components/dnd/examples/handle.tsx +53 -0
- package/src/components/dnd/examples/narrow.tsx +42 -0
- package/src/components/dnd/examples/overview.tsx +45 -0
- package/src/components/drawer/COMPONENT.md +114 -105
- package/src/components/drawer/examples/controlled-open.tsx +33 -0
- package/src/components/drawer/examples/date-sheet.tsx +41 -0
- package/src/components/drawer/examples/dismiss.tsx +55 -0
- package/src/components/drawer/examples/examples.module.css +8 -24
- package/src/components/drawer/examples/in-form.tsx +82 -0
- package/src/components/drawer/examples/long-content.tsx +40 -0
- package/src/components/drawer/examples/overview.tsx +48 -0
- package/src/components/drawer/examples/{variants-sides.tsx → placement.tsx} +13 -14
- package/src/components/drawer/examples/sizes.tsx +9 -15
- package/src/components/drawer/examples/structure.tsx +35 -0
- package/src/components/dropdown/COMPONENT.md +119 -148
- package/src/components/dropdown/examples/checkbox-items.tsx +48 -0
- package/src/components/dropdown/examples/controlled-open.tsx +32 -0
- package/src/components/dropdown/examples/dismiss.tsx +17 -0
- package/src/components/dropdown/examples/examples.module.css +11 -45
- package/src/components/dropdown/examples/long-list.tsx +42 -0
- package/src/components/dropdown/examples/{full-width.tsx → match-trigger-width.tsx} +5 -4
- package/src/components/dropdown/examples/overview.tsx +41 -0
- package/src/components/dropdown/examples/placement.tsx +16 -13
- package/src/components/dropdown/examples/sizes.tsx +18 -15
- package/src/components/dropdown/examples/states.tsx +21 -29
- package/src/components/dropdown/examples/structure.tsx +56 -0
- package/src/components/empty-page/COMPONENT.md +72 -76
- package/src/components/empty-page/examples/compact.tsx +23 -0
- package/src/components/empty-page/examples/data-region.tsx +8 -11
- package/src/components/empty-page/examples/examples.module.css +22 -25
- package/src/components/empty-page/examples/icon-tones.tsx +5 -6
- package/src/components/empty-page/examples/narrow.tsx +26 -0
- package/src/components/empty-page/examples/{no-results.tsx → overview.tsx} +4 -5
- package/src/components/empty-page/examples/sizes.tsx +14 -20
- package/src/components/example-frame/COMPONENT.md +64 -66
- package/src/components/example-frame/examples/controlled.tsx +42 -0
- package/src/components/example-frame/examples/overview.tsx +16 -0
- package/src/components/file-upload/COMPONENT.md +128 -186
- package/src/components/file-upload/examples/avatar-upload.tsx +7 -12
- package/src/components/file-upload/examples/custom-body.tsx +44 -0
- package/src/components/file-upload/examples/examples.module.css +46 -64
- package/src/components/file-upload/examples/in-form.tsx +76 -0
- package/src/components/file-upload/examples/narrow.tsx +17 -0
- package/src/components/file-upload/examples/overview.tsx +52 -0
- package/src/components/file-upload/examples/sizes.tsx +16 -37
- package/src/components/file-upload/examples/states.tsx +6 -98
- package/src/components/file-upload/examples/upload-progress.tsx +39 -0
- package/src/components/file-upload/examples/validation.tsx +19 -0
- package/src/components/file-upload/examples/variants.tsx +5 -18
- package/src/components/hint/COMPONENT.md +42 -48
- package/src/components/hint/examples/examples.module.css +3 -45
- package/src/components/hint/examples/hint-or-error.tsx +5 -5
- package/src/components/hint/examples/overview.tsx +34 -0
- package/src/components/hint/examples/sizes.tsx +8 -10
- package/src/components/hint/examples/states.tsx +21 -14
- package/src/components/hint/examples/with-icon.tsx +31 -0
- package/src/components/input/COMPONENT.md +70 -88
- package/src/components/input/examples/affixes.tsx +22 -0
- package/src/components/input/examples/controlled.tsx +9 -10
- package/src/components/input/examples/examples.module.css +3 -116
- package/src/components/input/examples/in-form.tsx +35 -14
- package/src/components/input/examples/overview.tsx +12 -0
- package/src/components/input/examples/sizes.tsx +6 -11
- package/src/components/input/examples/states.tsx +6 -23
- package/src/components/input/examples/validation.tsx +35 -0
- package/src/components/input/examples/with-icon.tsx +25 -0
- package/src/components/input/examples/{search-without-focus-ring.tsx → without-focus-ring.tsx} +5 -5
- package/src/components/kanban/COMPONENT.md +181 -0
- package/src/components/kanban/examples/controlled.tsx +78 -0
- package/src/components/kanban/examples/examples.module.css +31 -0
- package/src/components/kanban/examples/limits.tsx +58 -0
- package/src/components/kanban/examples/narrow.tsx +76 -0
- package/src/components/kanban/examples/overview.tsx +130 -0
- package/src/components/kanban/examples/states.tsx +75 -0
- package/src/components/kanban/examples/structure.tsx +76 -0
- package/src/components/kbd/COMPONENT.md +50 -65
- package/src/components/kbd/examples/examples.module.css +11 -41
- package/src/components/kbd/examples/in-controls.tsx +25 -31
- package/src/components/kbd/examples/overview.tsx +24 -0
- package/src/components/kbd/examples/shortcut-list.tsx +12 -12
- package/src/components/kbd/examples/sizes.tsx +8 -13
- package/src/components/label/COMPONENT.md +45 -44
- package/src/components/label/examples/examples.module.css +8 -29
- package/src/components/label/examples/overview.tsx +17 -0
- package/src/components/label/examples/sizes.tsx +9 -13
- package/src/components/label/examples/states.tsx +17 -14
- package/src/components/label/examples/structure.tsx +32 -0
- package/src/components/label/examples/with-icon.tsx +25 -17
- package/src/components/link-button/COMPONENT.md +56 -39
- package/src/components/link-button/examples/as-child.tsx +18 -0
- package/src/components/link-button/examples/external-link.tsx +6 -6
- package/src/components/link-button/examples/overview.tsx +11 -0
- package/src/components/link-button/examples/sizes.tsx +9 -11
- package/src/components/link-button/examples/states.tsx +25 -12
- package/src/components/link-button/examples/variants.tsx +21 -0
- package/src/components/link-button/examples/with-icon.tsx +21 -13
- package/src/components/login-form/COMPONENT.md +162 -0
- package/src/components/login-form/examples/examples.module.css +39 -0
- package/src/components/login-form/examples/forgot-password.tsx +39 -0
- package/src/components/login-form/examples/narrow.tsx +32 -0
- package/src/components/login-form/examples/overview.tsx +58 -0
- package/src/components/login-form/examples/register.tsx +85 -0
- package/src/components/login-form/examples/reset-password.tsx +60 -0
- package/src/components/login-form/examples/sizes.tsx +38 -0
- package/src/components/login-form/examples/states.tsx +75 -0
- package/src/components/login-form/examples/structure.tsx +28 -0
- package/src/components/login-form/examples/verification-code.tsx +57 -0
- package/src/components/modal/COMPONENT.md +71 -88
- package/src/components/modal/examples/{controlled.tsx → controlled-open.tsx} +6 -12
- package/src/components/modal/examples/custom-container.tsx +29 -0
- package/src/components/modal/examples/dismiss.tsx +54 -0
- package/src/components/modal/examples/examples.module.css +4 -20
- package/src/components/modal/examples/in-form.tsx +78 -0
- package/src/components/modal/examples/long-content.tsx +52 -0
- package/src/components/modal/examples/overview.tsx +35 -0
- package/src/components/modal/examples/sizes.tsx +7 -9
- package/src/components/modal/examples/structure.tsx +53 -0
- package/src/components/native-select/COMPONENT.md +132 -0
- package/src/components/native-select/examples/controlled.tsx +26 -0
- package/src/components/native-select/examples/examples.module.css +14 -0
- package/src/components/native-select/examples/in-form.tsx +43 -0
- package/src/components/native-select/examples/option-groups.tsx +17 -0
- package/src/components/native-select/examples/overview.tsx +16 -0
- package/src/components/native-select/examples/sizes.tsx +18 -0
- package/src/components/native-select/examples/states.tsx +21 -0
- package/src/components/native-select/examples/validation.tsx +26 -0
- package/src/components/notification/COMPONENT.md +108 -122
- package/src/components/notification/examples/dismiss.tsx +50 -0
- package/src/components/notification/examples/examples.module.css +10 -23
- package/src/components/notification/examples/in-form.tsx +64 -0
- package/src/components/notification/examples/overview.tsx +24 -0
- package/src/components/notification/examples/placement.tsx +66 -0
- package/src/components/notification/examples/sizes.tsx +11 -18
- package/src/components/notification/examples/stacking.tsx +45 -0
- package/src/components/notification/examples/structure.tsx +20 -0
- package/src/components/notification/examples/tones.tsx +14 -26
- package/src/components/page-content/COMPONENT.md +50 -75
- package/src/components/page-content/examples/examples.module.css +4 -8
- package/src/components/page-content/examples/narrow.tsx +25 -0
- package/src/components/page-content/examples/overview.tsx +41 -0
- package/src/components/page-content/examples/variants.tsx +39 -0
- package/src/components/page-toolbar/COMPONENT.md +142 -0
- package/src/components/page-toolbar/examples/examples.module.css +16 -0
- package/src/components/page-toolbar/examples/narrow.tsx +103 -0
- package/src/components/page-toolbar/examples/overview.tsx +113 -0
- package/src/components/page-toolbar/examples/save-changes.tsx +40 -0
- package/src/components/page-toolbar/examples/without-search.tsx +60 -0
- package/src/components/pagination/COMPONENT.md +73 -64
- package/src/components/pagination/examples/controlled.tsx +51 -0
- package/src/components/pagination/examples/examples.module.css +6 -55
- package/src/components/pagination/examples/narrow.tsx +25 -0
- package/src/components/pagination/examples/overflow.tsx +23 -0
- package/src/components/pagination/examples/overview.tsx +6 -0
- package/src/components/pagination/examples/sizes.tsx +10 -18
- package/src/components/popover/COMPONENT.md +89 -99
- package/src/components/popover/examples/controlled-open.tsx +32 -0
- package/src/components/popover/examples/dismiss.tsx +49 -0
- package/src/components/popover/examples/examples.module.css +21 -41
- package/src/components/popover/examples/flush.tsx +47 -0
- package/src/components/popover/examples/in-form.tsx +54 -0
- package/src/components/popover/examples/{full-width.tsx → match-trigger-width.tsx} +7 -7
- package/src/components/popover/examples/overview.tsx +43 -0
- package/src/components/popover/examples/placement.tsx +17 -15
- package/src/components/popover/examples/sizes.tsx +12 -9
- package/src/components/popover/examples/structure.tsx +50 -0
- package/src/components/progress-bar/COMPONENT.md +103 -62
- package/src/components/progress-bar/examples/custom-max.tsx +12 -0
- package/src/components/progress-bar/examples/examples.module.css +4 -34
- package/src/components/progress-bar/examples/overview.tsx +12 -0
- package/src/components/progress-bar/examples/segments.tsx +32 -0
- package/src/components/progress-bar/examples/sizes.tsx +11 -8
- package/src/components/progress-bar/examples/variants.tsx +34 -0
- package/src/components/progress-circle/COMPONENT.md +102 -61
- package/src/components/progress-circle/examples/examples.module.css +2 -39
- package/src/components/progress-circle/examples/inner-content.tsx +35 -0
- package/src/components/progress-circle/examples/overview.tsx +10 -0
- package/src/components/progress-circle/examples/segments.tsx +64 -0
- package/src/components/progress-circle/examples/sizes.tsx +10 -12
- package/src/components/progress-circle/examples/variants.tsx +28 -0
- package/src/components/radio/COMPONENT.md +93 -114
- package/src/components/radio/examples/controlled.tsx +30 -0
- package/src/components/radio/examples/group.tsx +23 -0
- package/src/components/radio/examples/orientation.tsx +34 -0
- package/src/components/radio/examples/overview.tsx +18 -0
- package/src/components/radio/examples/sizes.tsx +7 -12
- package/src/components/radio/examples/states.tsx +42 -30
- package/src/components/scroll-container/COMPONENT.md +57 -29
- package/src/components/scroll-container/examples/edge-fade.tsx +53 -0
- package/src/components/scroll-container/examples/examples.module.css +7 -7
- package/src/components/scroll-container/examples/overscroll.tsx +27 -0
- package/src/components/scroll-container/examples/overview.tsx +27 -0
- package/src/components/scroll-container/examples/variants.tsx +54 -0
- package/src/components/segmented-control/COMPONENT.md +93 -107
- package/src/components/segmented-control/examples/colors.tsx +8 -13
- package/src/components/segmented-control/examples/controlled.tsx +10 -6
- package/src/components/segmented-control/examples/examples.module.css +2 -88
- package/src/components/segmented-control/examples/full-width.tsx +7 -44
- package/src/components/segmented-control/examples/overview.tsx +12 -0
- package/src/components/segmented-control/examples/scroll.tsx +16 -0
- package/src/components/segmented-control/examples/sizes.tsx +8 -20
- package/src/components/segmented-control/examples/states.tsx +28 -34
- package/src/components/segmented-control/examples/two-line.tsx +17 -104
- package/src/components/segmented-control/examples/with-icon.tsx +52 -0
- package/src/components/select/COMPONENT.md +155 -208
- package/src/components/select/examples/clearable.tsx +23 -0
- package/src/components/select/examples/controlled-open.tsx +30 -0
- package/src/components/select/examples/controlled.tsx +17 -10
- package/src/components/select/examples/examples.module.css +18 -38
- package/src/components/select/examples/in-form.tsx +59 -70
- package/src/components/select/examples/multiple.tsx +21 -33
- package/src/components/select/examples/overview.tsx +17 -0
- package/src/components/select/examples/rich-options.tsx +43 -69
- package/src/components/select/examples/searchable.tsx +42 -0
- package/src/components/select/examples/sizes.tsx +13 -17
- package/src/components/select/examples/states.tsx +34 -48
- package/src/components/select/examples/validation.tsx +41 -0
- package/src/components/select/examples/with-icon.tsx +35 -0
- package/src/components/skeleton/COMPONENT.md +104 -0
- package/src/components/skeleton/examples/examples.module.css +89 -0
- package/src/components/skeleton/examples/form.tsx +20 -0
- package/src/components/skeleton/examples/overview.tsx +21 -0
- package/src/components/skeleton/examples/sizes.tsx +24 -0
- package/src/components/skeleton/examples/with-crossfade.tsx +68 -0
- package/src/components/slider/COMPONENT.md +105 -68
- package/src/components/slider/examples/controlled.tsx +26 -30
- package/src/components/slider/examples/examples.module.css +8 -32
- package/src/components/slider/examples/hint-and-error.tsx +33 -0
- package/src/components/slider/examples/overview.tsx +6 -0
- package/src/components/slider/examples/range-step.tsx +7 -17
- package/src/components/slider/examples/sizes.tsx +8 -6
- package/src/components/slider/examples/states.tsx +11 -8
- package/src/components/slider/examples/value-format.tsx +13 -25
- package/src/components/slider/examples/variants.tsx +23 -0
- package/src/components/smart-filter/COMPONENT.md +184 -0
- package/src/components/smart-filter/examples/controlled.tsx +48 -0
- package/src/components/smart-filter/examples/examples.module.css +56 -0
- package/src/components/smart-filter/examples/many-values.tsx +53 -0
- package/src/components/smart-filter/examples/narrow.tsx +38 -0
- package/src/components/smart-filter/examples/overview.tsx +109 -0
- package/src/components/smart-filter/examples/sizes.tsx +33 -0
- package/src/components/spinner/COMPONENT.md +112 -0
- package/src/components/spinner/examples/examples.module.css +20 -0
- package/src/components/spinner/examples/loading-region.tsx +22 -0
- package/src/components/spinner/examples/overview.tsx +15 -0
- package/src/components/spinner/examples/sizes.tsx +19 -0
- package/src/components/spinner/examples/variants.tsx +19 -0
- package/src/components/stepper/COMPONENT.md +83 -78
- package/src/components/stepper/examples/controlled.tsx +46 -0
- package/src/components/stepper/examples/examples.module.css +9 -40
- package/src/components/stepper/examples/narrow.tsx +11 -19
- package/src/components/stepper/examples/orientation.tsx +21 -59
- package/src/components/stepper/examples/overview.tsx +28 -0
- package/src/components/stepper/examples/sizes.tsx +19 -28
- package/src/components/stepper/examples/states.tsx +20 -21
- package/src/components/stepper/examples/with-icon.tsx +29 -0
- package/src/components/switch/COMPONENT.md +75 -94
- package/src/components/switch/examples/controlled.tsx +8 -6
- package/src/components/switch/examples/examples.module.css +13 -45
- package/src/components/switch/examples/in-form.tsx +20 -24
- package/src/components/switch/examples/overview.tsx +10 -0
- package/src/components/switch/examples/settings-row.tsx +14 -22
- package/src/components/switch/examples/sizes.tsx +5 -10
- package/src/components/switch/examples/states.tsx +37 -25
- package/src/components/tabs/COMPONENT.md +156 -86
- package/src/components/tabs/examples/closable.tsx +48 -0
- package/src/components/tabs/examples/controlled.tsx +14 -20
- package/src/components/tabs/examples/examples.module.css +13 -93
- package/src/components/tabs/examples/orientation.tsx +40 -0
- package/src/components/tabs/examples/overflow.tsx +60 -0
- package/src/components/tabs/examples/overview.tsx +30 -0
- package/src/components/tabs/examples/sizes.tsx +19 -19
- package/src/components/tabs/examples/states.tsx +20 -55
- package/src/components/tabs/examples/two-line.tsx +22 -29
- package/src/components/tabs/examples/variants.tsx +40 -0
- package/src/components/tabs/examples/with-icon.tsx +44 -0
- package/src/components/tag-select/COMPONENT.md +119 -122
- package/src/components/tag-select/examples/controlled-open.tsx +29 -0
- package/src/components/tag-select/examples/controlled.tsx +26 -0
- package/src/components/tag-select/examples/creatable.tsx +28 -0
- package/src/components/tag-select/examples/examples.module.css +3 -22
- package/src/components/tag-select/examples/in-form.tsx +44 -41
- package/src/components/tag-select/examples/manage-tags.tsx +20 -39
- package/src/components/tag-select/examples/many-tags.tsx +20 -0
- package/src/components/tag-select/examples/overview.tsx +21 -0
- package/src/components/tag-select/examples/sizes.tsx +7 -10
- package/src/components/tag-select/examples/states.tsx +11 -36
- package/src/components/tag-select/examples/validation.tsx +35 -0
- package/src/components/textarea/COMPONENT.md +50 -50
- package/src/components/textarea/examples/auto-resize.tsx +21 -0
- package/src/components/textarea/examples/controlled.tsx +12 -16
- package/src/components/textarea/examples/examples.module.css +15 -48
- package/src/components/textarea/examples/in-form.tsx +52 -48
- package/src/components/textarea/examples/overview.tsx +12 -0
- package/src/components/textarea/examples/sizes.tsx +6 -7
- package/src/components/textarea/examples/states.tsx +9 -13
- package/src/components/textarea/examples/validation.tsx +34 -0
- package/src/components/textarea/examples/without-focus-ring.tsx +12 -0
- package/src/components/thumbnail/COMPONENT.md +150 -0
- package/src/components/thumbnail/examples/examples.module.css +45 -0
- package/src/components/thumbnail/examples/full-width.tsx +48 -0
- package/src/components/thumbnail/examples/overview.tsx +31 -0
- package/src/components/thumbnail/examples/ratios.tsx +25 -0
- package/src/components/thumbnail/examples/ring.tsx +29 -0
- package/src/components/thumbnail/examples/sizes.tsx +23 -0
- package/src/components/thumbnail/examples/states.tsx +38 -0
- package/src/components/thumbnail/examples/variants.tsx +28 -0
- package/src/components/timeline/COMPONENT.md +92 -203
- package/src/components/timeline/examples/examples.module.css +5 -20
- package/src/components/timeline/examples/links.tsx +28 -0
- package/src/components/timeline/examples/narrow.tsx +30 -38
- package/src/components/timeline/examples/{activity-feed.tsx → overview.tsx} +9 -17
- package/src/components/timeline/examples/sizes.tsx +22 -28
- package/src/components/timeline/examples/{service-history.tsx → structure.tsx} +10 -8
- package/src/components/timeline/examples/{colors-and-tones.tsx → variants.tsx} +11 -16
- package/src/components/tooltip/COMPONENT.md +74 -62
- package/src/components/tooltip/examples/{controlled.tsx → controlled-open.tsx} +5 -7
- package/src/components/tooltip/examples/delay.tsx +19 -28
- package/src/components/tooltip/examples/disabled-trigger.tsx +18 -0
- package/src/components/tooltip/examples/examples.module.css +3 -33
- package/src/components/tooltip/examples/long-content.tsx +12 -15
- package/src/components/tooltip/examples/overview.tsx +17 -0
- package/src/components/tooltip/examples/placement.tsx +30 -0
- package/src/components/tooltip/examples/sizes.tsx +12 -15
- package/src/components/tooltip/examples/toolbar.tsx +35 -0
- package/src/components/typography/COMPONENT.md +68 -99
- package/src/components/typography/examples/article.tsx +23 -36
- package/src/components/typography/examples/examples.module.css +20 -54
- package/src/components/typography/examples/inline-emphasis.tsx +20 -0
- package/src/components/typography/examples/overview.tsx +20 -0
- package/src/components/typography/examples/semantic-tag.tsx +17 -0
- package/src/components/typography/examples/truncate.tsx +7 -7
- package/src/components/typography/examples/variants.tsx +43 -42
- package/src/components/typography/examples/weights.tsx +31 -0
- package/src/layout/app-header/COMPONENT.md +178 -0
- package/src/layout/app-header/examples/breadcrumbs.tsx +36 -0
- package/src/layout/app-header/examples/examples.module.css +47 -0
- package/src/layout/app-header/examples/in-app-shell.tsx +70 -0
- package/src/layout/app-header/examples/narrow.tsx +29 -0
- package/src/layout/app-header/examples/overview.tsx +36 -0
- package/src/layout/app-shell/COMPONENT.md +63 -63
- package/src/layout/app-shell/examples/contained.tsx +5 -5
- package/src/layout/app-shell/examples/examples.module.css +24 -0
- package/src/layout/app-shell/examples/footer.tsx +59 -0
- package/src/layout/app-shell/examples/overview.tsx +83 -0
- package/src/layout/app-shell/examples/template.tsx +54 -0
- package/src/layout/bottom-nav/COMPONENT.md +153 -0
- package/src/layout/bottom-nav/examples/examples.module.css +39 -0
- package/src/layout/bottom-nav/examples/floating.tsx +89 -0
- package/src/layout/bottom-nav/examples/icon-only.tsx +41 -0
- package/src/layout/bottom-nav/examples/in-app-shell.tsx +64 -0
- package/src/layout/bottom-nav/examples/overview.tsx +44 -0
- package/src/layout/bottom-nav/examples/router.tsx +31 -0
- package/src/layout/bottom-nav/examples/structure.tsx +47 -0
- package/src/layout/sidebar/COMPONENT.md +304 -111
- package/src/layout/sidebar/examples/account.tsx +88 -0
- package/src/layout/sidebar/examples/brand-header.tsx +45 -0
- package/src/layout/sidebar/examples/collapsible-groups.tsx +77 -0
- package/src/layout/sidebar/examples/controlled-open.tsx +55 -0
- package/src/layout/sidebar/examples/controlled.tsx +68 -0
- package/src/layout/sidebar/examples/examples.module.css +17 -3
- package/src/layout/sidebar/examples/nested-items.tsx +74 -0
- package/src/layout/sidebar/examples/overview.tsx +126 -0
- package/src/layout/sidebar/examples/router.tsx +19 -13
- package/src/layout/sidebar/examples/sizes.tsx +17 -12
- package/src/layout/sidebar/examples/structure.tsx +81 -0
- package/src/styles/fonts.css +4 -0
- package/src/styles/globals.css +18 -29
- package/src/styles/reset.css +2 -0
- package/src/styles/theme-dark.css +6 -0
- package/src/styles/theme-light.css +58 -23
- package/src/styles/tokens.css +11 -77
- package/dist/components/accordion/Accordion.d.ts.map +0 -1
- package/dist/components/avatar/Avatar.d.ts.map +0 -1
- package/dist/components/badge/Badge.d.ts.map +0 -1
- package/dist/components/badge/tier.d.ts.map +0 -1
- package/dist/components/banner/Banner.d.ts.map +0 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +0 -1
- package/dist/components/button/Button.d.ts.map +0 -1
- package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
- package/dist/components/card/Card.d.ts.map +0 -1
- package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/code-block/CodeBlock.d.ts.map +0 -1
- package/dist/components/color-picker/ColorPicker.d.ts.map +0 -1
- package/dist/components/color-picker/ColorPresets.d.ts.map +0 -1
- package/dist/components/command-menu/CommandMenu.d.ts.map +0 -1
- package/dist/components/data-table/DataTable.d.ts.map +0 -1
- package/dist/components/datepicker/Datepicker.d.ts.map +0 -1
- package/dist/components/datepicker/datepickerModel.d.ts.map +0 -1
- package/dist/components/digit-input/DigitInput.d.ts.map +0 -1
- package/dist/components/divider/Divider.d.ts.map +0 -1
- package/dist/components/drawer/Drawer.d.ts.map +0 -1
- package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
- package/dist/components/dropdown/dropdownGeometry.d.ts +0 -10
- package/dist/components/dropdown/dropdownGeometry.d.ts.map +0 -1
- package/dist/components/dropdown/menuKeyboard.d.ts +0 -4
- package/dist/components/dropdown/menuKeyboard.d.ts.map +0 -1
- package/dist/components/dropdown/useDropdownPosition.d.ts +0 -18
- package/dist/components/dropdown/useDropdownPosition.d.ts.map +0 -1
- package/dist/components/empty-page/EmptyPage.d.ts.map +0 -1
- package/dist/components/example-frame/ExampleFrame.d.ts.map +0 -1
- package/dist/components/file-upload/FileUpload.d.ts.map +0 -1
- package/dist/components/hint/Hint.d.ts.map +0 -1
- package/dist/components/index.css +0 -11181
- package/dist/components/index.css.map +0 -7
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -13833
- package/dist/components/index.js.map +0 -7
- package/dist/components/input/Input.d.ts.map +0 -1
- package/dist/components/kbd/Kbd.d.ts.map +0 -1
- package/dist/components/label/Label.d.ts.map +0 -1
- package/dist/components/link-button/LinkButton.d.ts.map +0 -1
- package/dist/components/modal/DialogParts.d.ts.map +0 -1
- package/dist/components/modal/Modal.d.ts.map +0 -1
- package/dist/components/modal/useInertSiblings.d.ts +0 -7
- package/dist/components/modal/useInertSiblings.d.ts.map +0 -1
- package/dist/components/notification/Notification.d.ts.map +0 -1
- package/dist/components/notification/NotificationStore.d.ts.map +0 -1
- package/dist/components/page-content/PageContent.d.ts.map +0 -1
- package/dist/components/pagination/Pagination.d.ts.map +0 -1
- package/dist/components/popover/Popover.d.ts.map +0 -1
- package/dist/components/popover/popoverGeometry.d.ts +0 -6
- package/dist/components/popover/popoverGeometry.d.ts.map +0 -1
- package/dist/components/popover/usePopoverPosition.d.ts +0 -18
- package/dist/components/popover/usePopoverPosition.d.ts.map +0 -1
- package/dist/components/progress-bar/ProgressBar.d.ts.map +0 -1
- package/dist/components/progress-circle/ProgressCircle.d.ts.map +0 -1
- package/dist/components/radio/Radio.d.ts.map +0 -1
- package/dist/components/scroll-container/ScrollContainer.d.ts.map +0 -1
- package/dist/components/segmented-control/SegmentedControl.d.ts.map +0 -1
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +0 -29
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts.map +0 -1
- package/dist/components/select/Select.d.ts.map +0 -1
- package/dist/components/select/selectIcons.d.ts +0 -15
- package/dist/components/select/selectIcons.d.ts.map +0 -1
- package/dist/components/select/selectListbox.d.ts +0 -13
- package/dist/components/select/selectListbox.d.ts.map +0 -1
- package/dist/components/slider/Slider.d.ts.map +0 -1
- package/dist/components/stepper/Stepper.d.ts.map +0 -1
- package/dist/components/switch/Switch.d.ts.map +0 -1
- package/dist/components/tabs/Tabs.d.ts.map +0 -1
- package/dist/components/tag/Tag.d.ts +0 -47
- package/dist/components/tag/Tag.d.ts.map +0 -1
- package/dist/components/tag-select/TagSelect.d.ts.map +0 -1
- package/dist/components/textarea/Textarea.d.ts.map +0 -1
- package/dist/components/timeline/Timeline.d.ts.map +0 -1
- package/dist/components/tooltip/Tooltip.d.ts.map +0 -1
- package/dist/components/typography/Typography.d.ts.map +0 -1
- package/dist/hooks/useControllableState.d.ts.map +0 -1
- package/dist/hooks/useEscapeKey.d.ts +0 -7
- package/dist/hooks/useEscapeKey.d.ts.map +0 -1
- package/dist/hooks/useFieldIds.d.ts +0 -17
- package/dist/hooks/useFieldIds.d.ts.map +0 -1
- package/dist/hooks/useFocusTrap.d.ts +0 -20
- package/dist/hooks/useFocusTrap.d.ts.map +0 -1
- package/dist/hooks/useMergedRefs.d.ts.map +0 -1
- package/dist/hooks/useModalKeyboard.d.ts +0 -14
- package/dist/hooks/useModalKeyboard.d.ts.map +0 -1
- package/dist/hooks/useOutsideClick.d.ts +0 -26
- package/dist/hooks/useOutsideClick.d.ts.map +0 -1
- package/dist/hooks/useOverlayModal.d.ts +0 -7
- package/dist/hooks/useOverlayModal.d.ts.map +0 -1
- package/dist/hooks/usePosition.d.ts.map +0 -1
- package/dist/hooks/usePresence.d.ts.map +0 -1
- package/dist/hooks/useResponsiveMonths.d.ts +0 -18
- package/dist/hooks/useResponsiveMonths.d.ts.map +0 -1
- package/dist/hooks/useScrollLock.d.ts.map +0 -1
- package/dist/icons/Icon.d.ts.map +0 -1
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/index.css.map +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/internal/ControlSizeContext.d.ts.map +0 -1
- package/dist/internal/DividerContentContext.d.ts +0 -4
- package/dist/internal/DividerContentContext.d.ts.map +0 -1
- package/dist/internal/FieldFrame.d.ts.map +0 -1
- package/dist/internal/OverlayPortalLayerContext.d.ts +0 -13
- package/dist/internal/OverlayPortalLayerContext.d.ts.map +0 -1
- package/dist/internal/Portal.d.ts.map +0 -1
- package/dist/internal/context.d.ts.map +0 -1
- package/dist/internal/cx.d.ts.map +0 -1
- package/dist/internal/data-attributes.d.ts.map +0 -1
- package/dist/internal/highlightTsxHtml.d.ts.map +0 -1
- package/dist/internal/layoutPxFromPrimitives.d.ts.map +0 -1
- package/dist/internal/mergeRefs.d.ts.map +0 -1
- package/dist/internal/runtimeUnits.d.ts +0 -3
- package/dist/internal/runtimeUnits.d.ts.map +0 -1
- package/dist/internal/scrollAncestors.d.ts.map +0 -1
- package/dist/internal/slot.d.ts.map +0 -1
- package/dist/internal/states.d.ts.map +0 -1
- package/dist/internal/useFieldDescriptions.d.ts +0 -18
- package/dist/internal/useFieldDescriptions.d.ts.map +0 -1
- package/dist/layout/app-shell/AppShell.d.ts.map +0 -1
- package/dist/layout/index.d.ts.map +0 -1
- package/dist/layout/sidebar/Sidebar.d.ts.map +0 -1
- package/dist/theme/applyTheme.d.ts.map +0 -1
- package/dist/tokens/primitives.d.ts.map +0 -1
- package/dist/tokens/semantic.d.ts.map +0 -1
- package/dist/tokens/themes/dark.d.ts.map +0 -1
- package/dist/tokens/themes/light.d.ts +0 -3
- package/dist/tokens/themes/light.d.ts.map +0 -1
- package/src/components/accordion/examples/checkout.tsx +0 -73
- package/src/components/accordion/examples/layouts.tsx +0 -58
- package/src/components/avatar/examples/colors.tsx +0 -29
- package/src/components/avatar/examples/group.tsx +0 -35
- package/src/components/avatar/examples/team-card.tsx +0 -70
- package/src/components/badge/examples/icons.tsx +0 -37
- package/src/components/badge/examples/order-list.tsx +0 -48
- package/src/components/badge/examples/palette.tsx +0 -44
- package/src/components/badge/examples/surfaces.tsx +0 -21
- package/src/components/banner/examples/dismiss.tsx +0 -48
- package/src/components/banner/examples/placement.tsx +0 -92
- package/src/components/breadcrumb/examples/collapse.tsx +0 -56
- package/src/components/breadcrumb/examples/page-header.tsx +0 -31
- package/src/components/button/examples/composition.tsx +0 -46
- package/src/components/button/examples/controlled.tsx +0 -18
- package/src/components/button/examples/full-width.tsx +0 -15
- package/src/components/button/examples/icon-only.tsx +0 -42
- package/src/components/button/examples/surfaces.tsx +0 -18
- package/src/components/button/examples/variants-tones.tsx +0 -39
- package/src/components/button-group/examples/composition.tsx +0 -99
- package/src/components/card/examples/mini-media.tsx +0 -55
- package/src/components/card/examples/responsive.tsx +0 -72
- package/src/components/checkbox/examples/hint-error.tsx +0 -22
- package/src/components/checkbox/examples/select-all.tsx +0 -40
- package/src/components/checkbox/examples/settings-card.tsx +0 -76
- package/src/components/code-block/examples/api-docs.tsx +0 -31
- package/src/components/code-block/examples/controlled.tsx +0 -38
- package/src/components/code-block/examples/surfaces.tsx +0 -7
- package/src/components/color-picker/examples/brand-color.tsx +0 -73
- package/src/components/color-picker/examples/hex-input-sizes.tsx +0 -54
- package/src/components/color-picker/examples/presets-quick.tsx +0 -57
- package/src/components/color-picker/examples/presets-tags.tsx +0 -52
- package/src/components/command-menu/examples/composition.tsx +0 -91
- package/src/components/command-menu/examples/examples.module.css +0 -9
- package/src/components/command-menu/examples/keyboard-search.tsx +0 -94
- package/src/components/data-table/examples/dashboard.tsx +0 -205
- package/src/components/data-table/examples/sorting-pagination.tsx +0 -66
- package/src/components/datepicker/examples/badge.tsx +0 -19
- package/src/components/datepicker/examples/single.tsx +0 -16
- package/src/components/digit-input/examples/length-and-complete.tsx +0 -30
- package/src/components/digit-input/examples/surfaces.tsx +0 -6
- package/src/components/digit-input/examples/verification-step.tsx +0 -62
- package/src/components/divider/examples/composition.tsx +0 -49
- package/src/components/divider/examples/variants.tsx +0 -62
- package/src/components/drawer/examples/composition.tsx +0 -94
- package/src/components/drawer/examples/controlled.tsx +0 -42
- package/src/components/drawer/examples/features.tsx +0 -48
- package/src/components/drawer/examples/states.tsx +0 -54
- package/src/components/dropdown/examples/as-child.tsx +0 -23
- package/src/components/dropdown/examples/composition.tsx +0 -91
- package/src/components/dropdown/examples/controlled.tsx +0 -32
- package/src/components/dropdown/examples/row-actions.tsx +0 -56
- package/src/components/dropdown/examples/variants.tsx +0 -52
- package/src/components/example-frame/examples/basic.tsx +0 -18
- package/src/components/file-upload/examples/file-list.tsx +0 -67
- package/src/components/file-upload/examples/in-card.tsx +0 -84
- package/src/components/hint/examples/field-states.tsx +0 -60
- package/src/components/hint/examples/in-form.tsx +0 -45
- package/src/components/input/examples/anatomy.tsx +0 -70
- package/src/components/input/examples/control-alignment.tsx +0 -57
- package/src/components/input/examples/full-width.tsx +0 -23
- package/src/components/input/examples/icons-and-affixes.tsx +0 -32
- package/src/components/input/examples/reserved-support-row.tsx +0 -33
- package/src/components/input/examples/surfaces.tsx +0 -12
- package/src/components/input/examples/with-badge.tsx +0 -40
- package/src/components/kbd/examples/modifier-keys.tsx +0 -24
- package/src/components/label/examples/in-form.tsx +0 -39
- package/src/components/label/examples/markers.tsx +0 -27
- package/src/components/link-button/examples/composition.tsx +0 -30
- package/src/components/link-button/examples/examples.module.css +0 -46
- package/src/components/link-button/examples/tones.tsx +0 -15
- package/src/components/modal/examples/composition.tsx +0 -87
- package/src/components/modal/examples/features.tsx +0 -68
- package/src/components/modal/examples/link.tsx +0 -79
- package/src/components/modal/examples/states.tsx +0 -73
- package/src/components/notification/examples/features.tsx +0 -42
- package/src/components/notification/examples/live.tsx +0 -128
- package/src/components/notification/examples/save-form.tsx +0 -59
- package/src/components/page-content/examples/readable.tsx +0 -24
- package/src/components/page-content/examples/settings-page.tsx +0 -49
- package/src/components/page-content/examples/widths.tsx +0 -39
- package/src/components/pagination/examples/compact.tsx +0 -36
- package/src/components/pagination/examples/list-footer.tsx +0 -50
- package/src/components/pagination/examples/states.tsx +0 -44
- package/src/components/popover/examples/as-child.tsx +0 -29
- package/src/components/popover/examples/composition.tsx +0 -45
- package/src/components/popover/examples/controlled.tsx +0 -39
- package/src/components/popover/examples/features.tsx +0 -56
- package/src/components/popover/examples/inset-variants.tsx +0 -58
- package/src/components/popover/examples/states.tsx +0 -48
- package/src/components/progress-bar/examples/file-upload.tsx +0 -52
- package/src/components/progress-bar/examples/values-and-tones.tsx +0 -17
- package/src/components/progress-circle/examples/goals-card.tsx +0 -37
- package/src/components/progress-circle/examples/values-and-tones.tsx +0 -56
- package/src/components/radio/examples/examples.module.css +0 -43
- package/src/components/radio/examples/hint-error.tsx +0 -28
- package/src/components/radio/examples/horizontal.tsx +0 -33
- package/src/components/radio/examples/plan-picker.tsx +0 -55
- package/src/components/scroll-container/examples/both-axes.tsx +0 -57
- package/src/components/scroll-container/examples/list.tsx +0 -44
- package/src/components/segmented-control/examples/item-content.tsx +0 -78
- package/src/components/segmented-control/examples/surfaces.tsx +0 -82
- package/src/components/segmented-control/examples/toolbar.tsx +0 -56
- package/src/components/segmented-progress-bar/COMPONENT.md +0 -128
- package/src/components/segmented-progress-bar/examples/examples.module.css +0 -68
- package/src/components/segmented-progress-bar/examples/segment-gap.tsx +0 -24
- package/src/components/segmented-progress-bar/examples/sizes.tsx +0 -31
- package/src/components/segmented-progress-bar/examples/storage-distribution.tsx +0 -41
- package/src/components/select/examples/native.tsx +0 -21
- package/src/components/select/examples/search-groups.tsx +0 -61
- package/src/components/select/examples/with-badge.tsx +0 -47
- package/src/components/slider/examples/basic.tsx +0 -6
- package/src/components/slider/examples/display-settings.tsx +0 -41
- package/src/components/stepper/examples/wizard.tsx +0 -62
- package/src/components/switch/examples/notification-settings.tsx +0 -37
- package/src/components/switch/examples/on-off.tsx +0 -15
- package/src/components/switch/examples/validation.tsx +0 -19
- package/src/components/tabs/examples/horizontal.tsx +0 -30
- package/src/components/tabs/examples/vertical.tsx +0 -101
- package/src/components/tag/COMPONENT.md +0 -179
- package/src/components/tag/examples/colors.tsx +0 -49
- package/src/components/tag/examples/examples.module.css +0 -47
- package/src/components/tag/examples/sizes.tsx +0 -23
- package/src/components/tag/examples/states.tsx +0 -19
- package/src/components/tag/examples/surfaces.tsx +0 -16
- package/src/components/tag/examples/with-icon.tsx +0 -29
- package/src/components/textarea/examples/height-and-limits.tsx +0 -45
- package/src/components/textarea/examples/hint-and-error.tsx +0 -21
- package/src/components/textarea/examples/reserved-support-row.tsx +0 -37
- package/src/components/textarea/examples/surfaces.tsx +0 -11
- package/src/components/textarea/examples/with-label.tsx +0 -22
- package/src/components/timeline/examples/hover-highlight.tsx +0 -48
- package/src/components/timeline/examples/in-card.tsx +0 -48
- package/src/components/timeline/examples/selectable.tsx +0 -58
- package/src/components/tooltip/examples/composition.tsx +0 -37
- package/src/components/tooltip/examples/side.tsx +0 -29
- package/src/components/tooltip/examples/states.tsx +0 -45
- package/src/components/typography/examples/as-prop.tsx +0 -25
- package/src/components/typography/examples/composition.tsx +0 -23
- package/src/components/typography/examples/full-width.tsx +0 -29
- package/src/components/typography/examples/reading-and-form.tsx +0 -35
- package/src/components/typography/examples/states.tsx +0 -23
- package/src/components/typography/examples/tones.tsx +0 -34
- package/src/components/typography/examples/variant-catalog.tsx +0 -41
- package/src/layout/app-shell/examples/with-sidebar.tsx +0 -63
- package/src/layout/sidebar/examples/modes.tsx +0 -55
- package/src/layout/sidebar/examples/responsive.tsx +0 -44
- package/src/layout/sidebar/examples/states.tsx +0 -34
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
|
|
8
8
|
**A calm, precise React 19 UI kit for product interfaces** — admin panels, dashboards, settings, forms
|
|
9
|
-
and data tables.
|
|
9
|
+
and data tables. 61 components on one design contract, one API vocabulary and one set of tokens, so
|
|
10
10
|
every screen you build looks like it was drawn by the same hand.
|
|
11
11
|
|
|
12
12
|
- **Graphite design language.** Depth from fill, not lines; a strict 4px grid; one size axis
|
|
@@ -15,7 +15,14 @@ every screen you build looks like it was drawn by the same hand.
|
|
|
15
15
|
- **Light and dark as equals.** Full themes, WCAG AA text contrast, a focus ring that is never clipped.
|
|
16
16
|
- **One API everywhere.** `size`, `variant`, `tone`, `color`, `invalid/hint/error`,
|
|
17
17
|
`value/onValueChange`, `checked/onCheckedChange`, `open/onOpenChange`, `labels` — the same names in
|
|
18
|
-
every component, compound parts `X.Root` + `X.Part
|
|
18
|
+
every component, compound parts `X.Root` + `X.Part` for components with parts and a single export
|
|
19
|
+
for leaves (`<Kbd>`, `<Divider>`), state in `data-*`.
|
|
20
|
+
- **Built from itself.** Components reuse the kit's own Button, Badge, Spinner, Icon, Checkbox,
|
|
21
|
+
EmptyPage and ScrollContainer instead of private copies, so a fix in one place lands everywhere.
|
|
22
|
+
- **States flow, they never flip.** Controls move into their new state; a region that switches
|
|
23
|
+
between loading, data, empty and error cross-fades and glides to its new height (`Crossfade`),
|
|
24
|
+
and while it loads a `Skeleton` holds the shape of the coming content — so nothing on the page
|
|
25
|
+
jumps.
|
|
19
26
|
- **Overlays that behave.** Modal, Drawer, Popover, Dropdown, Select, Tooltip and CommandMenu share
|
|
20
27
|
one stack: one click or one Escape closes exactly the topmost layer, focus goes where it should.
|
|
21
28
|
- **Accessible by default.** Keyboard support, ARIA roles, Russian default strings for every system
|
|
@@ -51,50 +58,36 @@ prime-ui-kit is built to be used by coding agents (Claude Code, Cursor, Codex,
|
|
|
51
58
|
|
|
52
59
|
---
|
|
53
60
|
|
|
54
|
-
## What's new in 0.9.0
|
|
55
|
-
|
|
56
|
-
- **API v1.** One vocabulary across the kit: `size`, `variant`, `tone`, `color`, `invalid/hint/error`,
|
|
57
|
-
`value/onValueChange`, `checked/onCheckedChange`, `open/onOpenChange`, `closeOnOutsideClick`,
|
|
58
|
-
`closeOnEscape`, `labels`. No aliases, no deprecated props.
|
|
59
|
-
- **Graphite redesign.** Fill-based depth, borderless fields, lavender accent, soft badges and tags,
|
|
60
|
-
full dark theme, never-clipped focus ring, one overlay stack with shared dismiss and motion rules.
|
|
61
|
-
- **Docs rewritten from the code.** Every component has a new `COMPONENT.md` (anatomy, every prop with
|
|
62
|
-
its default, every variant, states, a11y, mistakes) and one-scenario-per-file `examples/` that the
|
|
63
|
-
playground renders directly — one source for the playground, the npm package and the agent skill.
|
|
64
|
-
- **Agent skill rebuilt** (`SKILL/`): process, design rules, API cheat sheet, choosing guide,
|
|
65
|
-
composition, page recipes, anti-slop rules and a review checklist — field-tested on real screens.
|
|
66
|
-
- **Docs contract test** keeps docs, examples and the playground from drifting apart.
|
|
67
|
-
- Kit fixes: `Popover.Trigger` keeps the child's `id` (field labels work for Datepicker and
|
|
68
|
-
ColorPresets), `Card.Title` / `Card.SectionTitle` take `as` for the heading level, FileUpload `solid`
|
|
69
|
-
keeps no outline on hover, more prop types exported.
|
|
70
|
-
|
|
71
61
|
## Install
|
|
72
62
|
|
|
73
63
|
```bash
|
|
74
|
-
npm install prime-ui-kit react react-dom
|
|
64
|
+
npm install prime-ui-kit react react-dom date-fns
|
|
65
|
+
# using ColorPicker: also react-aria-components
|
|
75
66
|
# or: pnpm add … · bun add …
|
|
76
67
|
```
|
|
77
68
|
|
|
78
69
|
| Peer dependency | Version |
|
|
79
70
|
|---|---|
|
|
80
71
|
| `react`, `react-dom` | ^19.0.0 |
|
|
81
|
-
| `react-aria-components` | ^1.16.0 |
|
|
82
72
|
| `date-fns` | ^4.0.0 |
|
|
73
|
+
| `react-aria-components` (optional, only for `prime-ui-kit/color-picker`) | ^1.16.0 |
|
|
83
74
|
|
|
84
|
-
`lucide-react` (icons)
|
|
75
|
+
`lucide-react` (icons) comes with the package. The kit has no router dependency: pass your router's
|
|
76
|
+
pathname to `AppShell.Template scrollResetKey` and use `asChild` for router links.
|
|
85
77
|
|
|
86
78
|
## Set up styles and theme
|
|
87
79
|
|
|
88
80
|
```tsx
|
|
89
|
-
import "prime-ui-kit/
|
|
90
|
-
import "prime-ui-kit/
|
|
81
|
+
import "prime-ui-kit/bundle.css"; // tokens, light and dark themes, component styles
|
|
82
|
+
import "prime-ui-kit/fonts.css"; // optional: Golos Text + JetBrains Mono from Google Fonts
|
|
83
|
+
import "prime-ui-kit/reset.css"; // optional: minimal document reset (skip if the app has its own)
|
|
91
84
|
import { applyTheme } from "prime-ui-kit";
|
|
92
85
|
|
|
93
86
|
applyTheme("dark"); // sets data-theme on <html> without a transition flash
|
|
94
87
|
```
|
|
95
88
|
|
|
89
|
+
`bundle.css` is everything the components need; it leaves the root font size to the browser.
|
|
96
90
|
`data-theme="light" | "dark"` also works on any wrapper, so one page can show both themes.
|
|
97
|
-
Fine-grained alternatives: `prime-ui-kit/tokens.css`, `theme-light.css`, `theme-dark.css`.
|
|
98
91
|
|
|
99
92
|
## Quick start
|
|
100
93
|
|
|
@@ -108,7 +101,7 @@ export function App() {
|
|
|
108
101
|
nav={
|
|
109
102
|
<Sidebar.Root>
|
|
110
103
|
<Sidebar.Content>
|
|
111
|
-
<Sidebar.Item
|
|
104
|
+
<Sidebar.Item current>Clients</Sidebar.Item>
|
|
112
105
|
</Sidebar.Content>
|
|
113
106
|
</Sidebar.Root>
|
|
114
107
|
}
|
|
@@ -135,8 +128,10 @@ export function App() {
|
|
|
135
128
|
|
|
136
129
|
Short rules that keep code correct — for people and for AI coding assistants:
|
|
137
130
|
|
|
138
|
-
1. Import everything from the package root: `import { Button, Input } from "prime-ui-kit"`.
|
|
139
|
-
|
|
131
|
+
1. Import everything from the package root: `import { Button, Input } from "prime-ui-kit"`. The one
|
|
132
|
+
exception is `import { ColorPicker } from "prime-ui-kit/color-picker"`.
|
|
133
|
+
2. Import styles once at the app root: `prime-ui-kit/bundle.css` (plus the optional `fonts.css` and
|
|
134
|
+
`reset.css`).
|
|
140
135
|
3. Compound components are used through parts: `<Button.Root>`, `<Modal.Root>` + `<Modal.Content>`.
|
|
141
136
|
`<Button>` alone is not a component.
|
|
142
137
|
4. Default `size` is `m`; controls in one row share one size.
|
|
@@ -190,32 +185,39 @@ accessibility, examples and common mistakes.
|
|
|
190
185
|
| [**SegmentedControl**](https://github.com/esurkov1/prime-ui/blob/main/src/components/segmented-control/COMPONENT.md) | A switch between 2–5 mutually exclusive options or modes that takes effect immediately. |
|
|
191
186
|
| [**Slider**](https://github.com/esurkov1/prime-ui/blob/main/src/components/slider/COMPONENT.md) | A slider for picking an approximate numeric value within a range, with an optional label and value readout. |
|
|
192
187
|
| [**Select**](https://github.com/esurkov1/prime-ui/blob/main/src/components/select/COMPONENT.md) | A dropdown field for choosing one value (or several with `multiple`) from a closed list. |
|
|
188
|
+
| [**NativeSelect**](https://github.com/esurkov1/prime-ui/blob/main/src/components/native-select/COMPONENT.md) | The system `<select>` in the kit's field frame: plain text options, native picker on phones. |
|
|
193
189
|
| [**TagSelect**](https://github.com/esurkov1/prime-ui/blob/main/src/components/tag-select/COMPONENT.md) | A multi-select field that shows the chosen values as coloured tags, filters as you type and can create new tags. |
|
|
190
|
+
| [**SmartFilter**](https://github.com/esurkov1/prime-ui/blob/main/src/components/smart-filter/COMPONENT.md) | A filter bar for lists and tables: a filter button and search with a panel of values, applied filters as tags, and a show / hide choice for every value. |
|
|
194
191
|
| [**Datepicker**](https://github.com/esurkov1/prime-ui/blob/main/src/components/datepicker/COMPONENT.md) | A calendar for picking a date or a date range: a field with a popover (`Datepicker.Root`) or an embedded panel (`Datepicker.Panel`). |
|
|
195
192
|
| [**ColorPicker**](https://github.com/esurkov1/prime-ui/blob/main/src/components/color-picker/COMPONENT.md) | Color selection: a full picker (area, channel sliders, hex and channel fields, eyedropper, swatches) and `ColorPresets` for a quick color from a fixed palette. |
|
|
193
|
+
| [**ColorSwatches**](https://github.com/esurkov1/prime-ui/blob/main/src/components/color-swatches/COMPONENT.md) | An inline color choice: a wrapping grid of preset swatches inside a form, without a popover. |
|
|
196
194
|
|
|
197
195
|
### Data display (`data-display`)
|
|
198
196
|
|
|
199
197
|
| Component | What it is for |
|
|
200
198
|
|---|---|
|
|
201
|
-
| [**Badge**](https://github.com/esurkov1/prime-ui/blob/main/src/components/badge/COMPONENT.md) |
|
|
202
|
-
| [**Tag**](https://github.com/esurkov1/prime-ui/blob/main/src/components/tag/COMPONENT.md) | A chip for a selected value, applied filter or keyword, with an optional remove button and a palette color. |
|
|
199
|
+
| [**Badge**](https://github.com/esurkov1/prime-ui/blob/main/src/components/badge/COMPONENT.md) | The kit's one chip: a status, category or count label, a removable value or applied filter, and a pressable toggle with a hover action, in a palette color. |
|
|
203
200
|
| [**Avatar**](https://github.com/esurkov1/prime-ui/blob/main/src/components/avatar/COMPONENT.md) | A round photo of a person or entity with an initials or icon fallback, presence dot and overlapping groups. |
|
|
201
|
+
| [**Thumbnail**](https://github.com/esurkov1/prime-ui/blob/main/src/components/thumbnail/COMPONENT.md) | A preview of an object — product, vehicle, file, cover — at a fixed aspect ratio, with a colored icon fallback. |
|
|
204
202
|
| [**Kbd**](https://github.com/esurkov1/prime-ui/blob/main/src/components/kbd/COMPONENT.md) | A key cap for a keyboard key or a shortcut, rendered as a native `<kbd>`. |
|
|
205
203
|
| [**Card**](https://github.com/esurkov1/prime-ui/blob/main/src/components/card/COMPONENT.md) | A filled surface block with structural templates for metrics, charts, lists, calls to action and covers. |
|
|
206
204
|
| [**DataTable**](https://github.com/esurkov1/prime-ui/blob/main/src/components/data-table/COMPONENT.md) | A data table with sorting, pagination or infinite scroll, row selection, nested rows and loading / empty / error states. |
|
|
205
|
+
| [**Kanban**](https://github.com/esurkov1/prime-ui/blob/main/src/components/kanban/COMPONENT.md) | A board of status columns: cross-column moves by pointer, touch and keyboard, WIP limits, loading and empty states. |
|
|
207
206
|
| [**Timeline**](https://github.com/esurkov1/prime-ui/blob/main/src/components/timeline/COMPONENT.md) | An event feed: dots on a thin line, event title and date, an optional amount on the right, grouped under labels. |
|
|
208
207
|
| [**CodeBlock**](https://github.com/esurkov1/prime-ui/blob/main/src/components/code-block/COMPONENT.md) | A static TypeScript / TSX snippet with syntax highlighting, on a sunken panel or bare inside a host. |
|
|
208
|
+
| [**Accordion**](https://github.com/esurkov1/prime-ui/blob/main/src/components/accordion/COMPONENT.md) | Collapsible sections: FAQ, settings groups, checkout steps. |
|
|
209
209
|
|
|
210
|
-
###
|
|
210
|
+
### Status and loading (`status`)
|
|
211
211
|
|
|
212
212
|
| Component | What it is for |
|
|
213
213
|
|---|---|
|
|
214
214
|
| [**Banner**](https://github.com/esurkov1/prime-ui/blob/main/src/components/banner/COMPONENT.md) | Full-width in-flow message for a page, section or card: status icon, title, description, actions and dismiss. |
|
|
215
215
|
| [**Notification**](https://github.com/esurkov1/prime-ui/blob/main/src/components/notification/COMPONENT.md) | Pop-up toast notifications: `NotificationProvider` at the app root and `notify()` from any screen. |
|
|
216
|
-
| [**ProgressBar**](https://github.com/esurkov1/prime-ui/blob/main/src/components/progress-bar/COMPONENT.md) | Linear progress
|
|
217
|
-
| [**
|
|
218
|
-
| [**
|
|
216
|
+
| [**ProgressBar**](https://github.com/esurkov1/prime-ui/blob/main/src/components/progress-bar/COMPONENT.md) | Linear progress: one value on a native `<progress>`, or `segments` that split a whole (storage by type, task statuses), with a label, a percentage and status colors. |
|
|
217
|
+
| [**ProgressCircle**](https://github.com/esurkov1/prime-ui/blob/main/src/components/progress-circle/COMPONENT.md) | Circular progress — the ring version of ProgressBar: one value or `segments` that split a whole, with status colors and optional content in the center. |
|
|
218
|
+
| [**Spinner**](https://github.com/esurkov1/prime-ui/blob/main/src/components/spinner/COMPONENT.md) | An indeterminate loading indicator: a ring with a gap that turns while a request runs. |
|
|
219
|
+
| [**Skeleton**](https://github.com/esurkov1/prime-ui/blob/main/src/components/skeleton/COMPONENT.md) | A placeholder in the shape of the content that is loading — text lines, a control, an avatar, a block — so the layout is in place before the data arrives. |
|
|
220
|
+
| [**Crossfade**](https://github.com/esurkov1/prime-ui/blob/main/src/components/crossfade/COMPONENT.md) | A region that cross-fades between its states (loading → data → empty → error) and glides to the new height, so the page below does not jump. |
|
|
219
221
|
| [**EmptyPage**](https://github.com/esurkov1/prime-ui/blob/main/src/components/empty-page/COMPONENT.md) | Empty state of a page or a block: icon, title, explanation and an action. |
|
|
220
222
|
|
|
221
223
|
### Navigation (`navigation`)
|
|
@@ -225,7 +227,9 @@ accessibility, examples and common mistakes.
|
|
|
225
227
|
| [**Tabs**](https://github.com/esurkov1/prime-ui/blob/main/src/components/tabs/COMPONENT.md) | Tabs for navigating between content panels of one screen. |
|
|
226
228
|
| [**Breadcrumb**](https://github.com/esurkov1/prime-ui/blob/main/src/components/breadcrumb/COMPONENT.md) | Breadcrumbs: the path to the current page. |
|
|
227
229
|
| [**Pagination**](https://github.com/esurkov1/prime-ui/blob/main/src/components/pagination/COMPONENT.md) | Page-by-page navigation: arrows, page numbers with ellipsis and a compact «3 / 12» view. |
|
|
228
|
-
| [**Stepper**](https://github.com/esurkov1/prime-ui/blob/main/src/components/stepper/COMPONENT.md) | Steps of a multi-step process with pending, active, completed and
|
|
230
|
+
| [**Stepper**](https://github.com/esurkov1/prime-ui/blob/main/src/components/stepper/COMPONENT.md) | Steps of a multi-step process with pending, active, completed and danger statuses. |
|
|
231
|
+
| [**Sidebar**](https://github.com/esurkov1/prime-ui/blob/main/src/layout/sidebar/COMPONENT.md) | App side navigation in three modes — expanded, compact, hidden — and an off-canvas panel on narrow screens. |
|
|
232
|
+
| [**BottomNav**](https://github.com/esurkov1/prime-ui/blob/main/src/layout/bottom-nav/COMPONENT.md) | Phone navigation bar: 3–5 sections, flat or a floating glass capsule. |
|
|
229
233
|
|
|
230
234
|
### Overlays (`overlays`)
|
|
231
235
|
|
|
@@ -238,17 +242,29 @@ accessibility, examples and common mistakes.
|
|
|
238
242
|
| [**Drawer**](https://github.com/esurkov1/prime-ui/blob/main/src/components/drawer/COMPONENT.md) | A modal side panel that slides in from the edge: filters, forms and record details. |
|
|
239
243
|
| [**CommandMenu**](https://github.com/esurkov1/prime-ui/blob/main/src/components/command-menu/COMPONENT.md) | A command palette in a dialog: a search field that filters a list of commands and pages (⌘K). |
|
|
240
244
|
|
|
241
|
-
###
|
|
245
|
+
### Page (`page`)
|
|
242
246
|
|
|
243
247
|
| Component | What it is for |
|
|
244
248
|
|---|---|
|
|
245
249
|
| [**AppShell**](https://github.com/esurkov1/prime-ui/blob/main/src/layout/app-shell/COMPONENT.md) | The app frame: a navigation rail on the canvas and a content panel on the surface. |
|
|
246
|
-
| [**
|
|
250
|
+
| [**AppHeader**](https://github.com/esurkov1/prime-ui/blob/main/src/layout/app-header/COMPONENT.md) | The bar at the top of the app: where you are, ⌘K search, a few actions and the phone menu button. |
|
|
247
251
|
| [**PageContent**](https://github.com/esurkov1/prime-ui/blob/main/src/components/page-content/COMPONENT.md) | Page structure inside the main column: title, description, page actions and content sections. |
|
|
248
|
-
| [**
|
|
252
|
+
| [**PageToolbar**](https://github.com/esurkov1/prime-ui/blob/main/src/components/page-toolbar/COMPONENT.md) | The panel at the top of a page — sections, filter and search, view options and the primary action — one row when wide, exactly two rows when narrow. |
|
|
249
253
|
| [**Divider**](https://github.com/esurkov1/prime-ui/blob/main/src/components/divider/COMPONENT.md) | A hairline separator, horizontal or vertical, with or without a label. |
|
|
250
254
|
| [**ScrollContainer**](https://github.com/esurkov1/prime-ui/blob/main/src/components/scroll-container/COMPONENT.md) | A scroll region with the kit's thin scrollbar that shrinks correctly inside flex and grid parents. |
|
|
251
255
|
|
|
256
|
+
### Interaction (`interaction`)
|
|
257
|
+
|
|
258
|
+
| Component | What it is for |
|
|
259
|
+
|---|---|
|
|
260
|
+
| [**Dnd**](https://github.com/esurkov1/prime-ui/blob/main/src/components/dnd/COMPONENT.md) | Pointer-driven drag and drop: reorderable lists, draggable items and drop zones, with touch and keyboard support. |
|
|
261
|
+
|
|
262
|
+
### Composition (`composition`)
|
|
263
|
+
|
|
264
|
+
| Component | What it is for |
|
|
265
|
+
|---|---|
|
|
266
|
+
| [**LoginForm**](https://github.com/esurkov1/prime-ui/blob/main/src/components/login-form/COMPONENT.md) | A sign-in card with a logo, title, provider buttons and a form; covers sign-in, sign-up, password reset and code confirmation. |
|
|
267
|
+
|
|
252
268
|
### Foundations (`foundations`)
|
|
253
269
|
|
|
254
270
|
| Component | What it is for |
|
|
@@ -268,9 +284,8 @@ accessibility, examples and common mistakes.
|
|
|
268
284
|
| `NotificationProvider` + `useNotifications()` | Toast queue: `notify`, `dismiss`, `dismissAll`. Place the provider once at the app root. |
|
|
269
285
|
| `ControlSizeProvider` | Default `size` for every control in a subtree (dense toolbars, compact forms). |
|
|
270
286
|
| `Tooltip.Provider` | Shared open delay for a group of tooltips. |
|
|
271
|
-
| `OverlayPortalLayerProvider` | Portal target for overlays rendered inside a custom layer. |
|
|
272
287
|
| `applyTheme(scheme, element?)` | Switch the theme without transition flashes. |
|
|
273
|
-
|
|
|
288
|
+
| `<Icon name="…" />`, `createIcon(glyph)` | The kit icon set (built on lucide-react); `createIcon` turns a domain glyph into a kit icon. |
|
|
274
289
|
|
|
275
290
|
## Docs inside the package
|
|
276
291
|
|
|
@@ -279,7 +294,7 @@ Each component folder ships with the package:
|
|
|
279
294
|
```
|
|
280
295
|
node_modules/prime-ui-kit/src/components/<name>/COMPONENT.md full reference
|
|
281
296
|
node_modules/prime-ui-kit/src/components/<name>/examples/*.tsx one scenario per file, copyable
|
|
282
|
-
node_modules/prime-ui-kit/src/layout
|
|
297
|
+
node_modules/prime-ui-kit/src/layout/<name>/… AppShell, AppHeader, Sidebar, BottomNav
|
|
283
298
|
```
|
|
284
299
|
|
|
285
300
|
Examples import only from `"prime-ui-kit"` and style layout with a local `examples.module.css` on
|
|
@@ -328,12 +343,11 @@ command again with `--force` (degit) or re-copy the folder.
|
|
|
328
343
|
|
|
329
344
|
| Path | Purpose |
|
|
330
345
|
|---|---|
|
|
331
|
-
| `prime-ui-kit` |
|
|
332
|
-
| `prime-ui-kit/
|
|
333
|
-
| `prime-ui-kit/
|
|
334
|
-
| `prime-ui-kit/
|
|
335
|
-
| `prime-ui-kit/
|
|
336
|
-
| `prime-ui-kit/components.css` | Component CSS for the `components` entry. |
|
|
346
|
+
| `prime-ui-kit` | The JS/TS API: every component, layout, icon and helper (no CSS side effects). |
|
|
347
|
+
| `prime-ui-kit/bundle.css` | Tokens, both themes, base rules (focus ring, reduced motion) and every component's CSS. |
|
|
348
|
+
| `prime-ui-kit/fonts.css` | Optional: Golos Text and JetBrains Mono from Google Fonts. |
|
|
349
|
+
| `prime-ui-kit/reset.css` | Optional: minimal document reset. |
|
|
350
|
+
| `prime-ui-kit/tokens.css`, `theme-light.css`, `theme-dark.css` | The token layers alone (already inside `bundle.css`), for styling without components. |
|
|
337
351
|
|
|
338
352
|
Type definitions ship with the package.
|
|
339
353
|
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
ColorSwatches,
|
|
4
|
+
Icon,
|
|
5
|
+
Input,
|
|
6
|
+
Select,
|
|
7
|
+
SwatchChip,
|
|
8
|
+
createComponentContext,
|
|
9
|
+
cx,
|
|
10
|
+
fieldSurfaceClass
|
|
11
|
+
} from "./chunk-ZEFCDEEQ.js";
|
|
12
|
+
|
|
13
|
+
// src/components/color-picker/ColorPicker.tsx
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import {
|
|
16
|
+
ColorArea as AriaColorArea,
|
|
17
|
+
ColorPicker as AriaColorPicker,
|
|
18
|
+
ColorSlider as AriaColorSlider,
|
|
19
|
+
ColorThumb as AriaColorThumb,
|
|
20
|
+
SliderOutput as AriaSliderOutput,
|
|
21
|
+
SliderTrack as AriaSliderTrack,
|
|
22
|
+
ColorPickerStateContext,
|
|
23
|
+
composeRenderProps,
|
|
24
|
+
parseColor
|
|
25
|
+
} from "react-aria-components";
|
|
26
|
+
|
|
27
|
+
// src/components/color-picker/ColorPicker.module.css
|
|
28
|
+
var ColorPicker_default = {
|
|
29
|
+
panel: "ColorPicker_panel",
|
|
30
|
+
slider: "ColorPicker_slider",
|
|
31
|
+
sliderHeader: "ColorPicker_sliderHeader",
|
|
32
|
+
sliderLabel: "ColorPicker_sliderLabel",
|
|
33
|
+
sliderValue: "ColorPicker_sliderValue",
|
|
34
|
+
sliderTrack: "ColorPicker_sliderTrack",
|
|
35
|
+
thumb: "ColorPicker_thumb",
|
|
36
|
+
thumbArea: "ColorPicker_thumbArea",
|
|
37
|
+
area: "ColorPicker_area",
|
|
38
|
+
formatSelectWrap: "ColorPicker_formatSelectWrap",
|
|
39
|
+
channelStrip: "ColorPicker_channelStrip",
|
|
40
|
+
channelStripLead: "ColorPicker_channelStripLead",
|
|
41
|
+
channelStripEyedropperBtn: "ColorPicker_channelStripEyedropperBtn",
|
|
42
|
+
channelCell: "ColorPicker_channelCell",
|
|
43
|
+
channelInput: "ColorPicker_channelInput",
|
|
44
|
+
channelCellHex: "ColorPicker_channelCellHex",
|
|
45
|
+
channelSuffix: "ColorPicker_channelSuffix",
|
|
46
|
+
eyeDropperSquare: "ColorPicker_eyeDropperSquare"
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/components/color-picker/ColorPicker.tsx
|
|
50
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
51
|
+
var COLOR_PICKER_LABELS = {
|
|
52
|
+
format: "\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439 \u0446\u0432\u0435\u0442\u0430",
|
|
53
|
+
eyeDropper: "\u041F\u0438\u043F\u0435\u0442\u043A\u0430",
|
|
54
|
+
hex: "Hex",
|
|
55
|
+
hue: "\u041E\u0442\u0442\u0435\u043D\u043E\u043A, \u0433\u0440\u0430\u0434\u0443\u0441\u044B",
|
|
56
|
+
saturation: "\u041D\u0430\u0441\u044B\u0449\u0435\u043D\u043D\u043E\u0441\u0442\u044C, \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u044B",
|
|
57
|
+
lightness: "\u042F\u0440\u043A\u043E\u0441\u0442\u044C, \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u044B",
|
|
58
|
+
alpha: "\u041D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u043E\u0441\u0442\u044C, \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u044B",
|
|
59
|
+
red: "\u041A\u0440\u0430\u0441\u043D\u044B\u0439, 0\u2013255",
|
|
60
|
+
green: "\u0417\u0435\u043B\u0451\u043D\u044B\u0439, 0\u2013255",
|
|
61
|
+
blue: "\u0421\u0438\u043D\u0438\u0439, 0\u2013255"
|
|
62
|
+
};
|
|
63
|
+
var CHECKER_BG = "repeating-conic-gradient(var(--prime-color-bg-surface) 0deg 90deg, var(--prime-color-fill-strong) 90deg 180deg) 0% 0% / var(--prime-space-2) var(--prime-space-2)";
|
|
64
|
+
var [ColorPickerProvider, useColorPickerContext] = createComponentContext("ColorPicker");
|
|
65
|
+
function useColorState() {
|
|
66
|
+
const state = React.useContext(ColorPickerStateContext);
|
|
67
|
+
if (!state) throw new Error("ColorPicker parts must be used inside <ColorPicker.Root>.");
|
|
68
|
+
return state;
|
|
69
|
+
}
|
|
70
|
+
function toHexText(color) {
|
|
71
|
+
return color.toString(color.getChannelValue("alpha") < 1 ? "hexa" : "hex");
|
|
72
|
+
}
|
|
73
|
+
function useColorDraft(read, parse) {
|
|
74
|
+
const state = useColorState();
|
|
75
|
+
const inputRef = React.useRef(null);
|
|
76
|
+
const [text, setText] = React.useState(() => read(state.color));
|
|
77
|
+
const fingerprint = state.color.toString("hexa");
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
if (inputRef.current && document.activeElement === inputRef.current) return;
|
|
80
|
+
setText(read(state.color));
|
|
81
|
+
}, [fingerprint]);
|
|
82
|
+
const commit = () => {
|
|
83
|
+
const next = parse(text.trim(), state.color);
|
|
84
|
+
if (next) state.setColor(next);
|
|
85
|
+
setText(read(next ?? state.color));
|
|
86
|
+
};
|
|
87
|
+
return { inputRef, text, setText, commit };
|
|
88
|
+
}
|
|
89
|
+
function onCommitKeyDown(commit) {
|
|
90
|
+
return (event) => {
|
|
91
|
+
if (event.key !== "Enter") return;
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
commit();
|
|
94
|
+
event.currentTarget.blur();
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
var parseHex = (text) => {
|
|
98
|
+
try {
|
|
99
|
+
return parseColor(text);
|
|
100
|
+
} catch {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var FORMAT_LABELS = { hsl: "HSL", rgb: "RGB", hex: "Hex" };
|
|
105
|
+
var isFormat = (value) => value in FORMAT_LABELS;
|
|
106
|
+
function FormatSelect({ className, ...rest }) {
|
|
107
|
+
const { format, setFormat, labels } = useColorPickerContext();
|
|
108
|
+
return /* @__PURE__ */ jsx("div", { ...rest, className: cx(ColorPicker_default.formatSelectWrap, className), children: /* @__PURE__ */ jsxs(Select.Root, { value: format, onValueChange: (value) => isFormat(value) && setFormat(value), children: [
|
|
109
|
+
/* @__PURE__ */ jsx(Select.Trigger, { "aria-label": labels.format, children: /* @__PURE__ */ jsx(Select.Value, {}) }),
|
|
110
|
+
/* @__PURE__ */ jsx(Select.Content, { children: Object.entries(FORMAT_LABELS).map(([value, label]) => /* @__PURE__ */ jsx(Select.Item, { label, value, children: label }, value)) })
|
|
111
|
+
] }) });
|
|
112
|
+
}
|
|
113
|
+
function displayChannelValue(color, channel, space) {
|
|
114
|
+
const raw = color.toFormat(space).getChannelValue(channel);
|
|
115
|
+
return String(Math.round(channel === "alpha" ? raw * 100 : raw));
|
|
116
|
+
}
|
|
117
|
+
function parseChannelValue(text, color, channel, space) {
|
|
118
|
+
const n = Number.parseFloat(text.replace(",", "."));
|
|
119
|
+
if (Number.isNaN(n)) return null;
|
|
120
|
+
if (channel === "alpha")
|
|
121
|
+
return color.withChannelValue("alpha", Math.min(100, Math.max(0, n)) / 100);
|
|
122
|
+
const c = color.toFormat(space);
|
|
123
|
+
const range = c.getChannelRange(channel);
|
|
124
|
+
return c.withChannelValue(channel, Math.min(range.maxValue, Math.max(range.minValue, n)));
|
|
125
|
+
}
|
|
126
|
+
function ChannelField({
|
|
127
|
+
channel,
|
|
128
|
+
space,
|
|
129
|
+
suffix
|
|
130
|
+
}) {
|
|
131
|
+
const { labels } = useColorPickerContext();
|
|
132
|
+
const { inputRef, text, setText, commit } = useColorDraft(
|
|
133
|
+
(color) => displayChannelValue(color, channel, space),
|
|
134
|
+
(value, color) => parseChannelValue(value, color, channel, space)
|
|
135
|
+
);
|
|
136
|
+
return /* @__PURE__ */ jsxs("label", { className: cx(fieldSurfaceClass, ColorPicker_default.channelCell), children: [
|
|
137
|
+
/* @__PURE__ */ jsx(
|
|
138
|
+
"input",
|
|
139
|
+
{
|
|
140
|
+
ref: inputRef,
|
|
141
|
+
"aria-label": labels[channel],
|
|
142
|
+
className: ColorPicker_default.channelInput,
|
|
143
|
+
inputMode: "decimal",
|
|
144
|
+
value: text,
|
|
145
|
+
onBlur: commit,
|
|
146
|
+
onChange: (e) => setText(e.target.value),
|
|
147
|
+
onKeyDown: onCommitKeyDown(commit)
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
suffix ? /* @__PURE__ */ jsx("span", { className: ColorPicker_default.channelSuffix, children: suffix }) : null
|
|
151
|
+
] });
|
|
152
|
+
}
|
|
153
|
+
function StripHexField() {
|
|
154
|
+
const { labels } = useColorPickerContext();
|
|
155
|
+
const { inputRef, text, setText, commit } = useColorDraft(toHexText, parseHex);
|
|
156
|
+
return /* @__PURE__ */ jsx("label", { className: cx(fieldSurfaceClass, ColorPicker_default.channelCell, ColorPicker_default.channelCellHex), children: /* @__PURE__ */ jsx(
|
|
157
|
+
"input",
|
|
158
|
+
{
|
|
159
|
+
ref: inputRef,
|
|
160
|
+
"aria-label": labels.hex,
|
|
161
|
+
autoCapitalize: "off",
|
|
162
|
+
autoCorrect: "off",
|
|
163
|
+
className: ColorPicker_default.channelInput,
|
|
164
|
+
spellCheck: false,
|
|
165
|
+
value: text,
|
|
166
|
+
onBlur: commit,
|
|
167
|
+
onChange: (e) => setText(e.target.value),
|
|
168
|
+
onKeyDown: onCommitKeyDown(commit)
|
|
169
|
+
}
|
|
170
|
+
) });
|
|
171
|
+
}
|
|
172
|
+
function ChannelStrip({ className, focusRing = true, ...rest }) {
|
|
173
|
+
const { format } = useColorPickerContext();
|
|
174
|
+
return /* @__PURE__ */ jsxs(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
...rest,
|
|
178
|
+
className: cx(ColorPicker_default.channelStrip, className),
|
|
179
|
+
"data-focus-ring": focusRing ? void 0 : "false",
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ jsx("div", { className: ColorPicker_default.channelStripLead, children: /* @__PURE__ */ jsx(EyeDropperButton, { className: ColorPicker_default.channelStripEyedropperBtn }) }),
|
|
182
|
+
format === "hex" ? /* @__PURE__ */ jsx(StripHexField, {}) : format === "hsl" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
183
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "hue", space: "hsl", suffix: "\xB0" }),
|
|
184
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "saturation", space: "hsl", suffix: "%" }),
|
|
185
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "lightness", space: "hsl", suffix: "%" }),
|
|
186
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "alpha", space: "hsl", suffix: "%" })
|
|
187
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
188
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "red", space: "rgb", suffix: "" }),
|
|
189
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "green", space: "rgb", suffix: "" }),
|
|
190
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "blue", space: "rgb", suffix: "" }),
|
|
191
|
+
/* @__PURE__ */ jsx(ChannelField, { channel: "alpha", space: "rgb", suffix: "%" })
|
|
192
|
+
] })
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
function Panel({ surface = "none", className, ...rest }) {
|
|
198
|
+
return /* @__PURE__ */ jsx("div", { className: cx(ColorPicker_default.panel, className), "data-surface": surface, ...rest });
|
|
199
|
+
}
|
|
200
|
+
Panel.displayName = "ColorPicker.Panel";
|
|
201
|
+
function ColorPickerRoot({
|
|
202
|
+
value,
|
|
203
|
+
defaultValue,
|
|
204
|
+
onValueChange,
|
|
205
|
+
defaultFormat = "hsl",
|
|
206
|
+
labels: labelsProp,
|
|
207
|
+
children
|
|
208
|
+
}) {
|
|
209
|
+
const [format, setFormat] = React.useState(defaultFormat);
|
|
210
|
+
const labels = React.useMemo(() => ({ ...COLOR_PICKER_LABELS, ...labelsProp }), [labelsProp]);
|
|
211
|
+
const contextValue = React.useMemo(() => ({ format, setFormat, labels }), [format, labels]);
|
|
212
|
+
return /* @__PURE__ */ jsx(ColorPickerProvider, { value: contextValue, children: /* @__PURE__ */ jsx(AriaColorPicker, { value, defaultValue, onChange: onValueChange, children }) });
|
|
213
|
+
}
|
|
214
|
+
ColorPickerRoot.displayName = "ColorPicker.Root";
|
|
215
|
+
function Slider({ className, disabled, ...props }) {
|
|
216
|
+
return /* @__PURE__ */ jsx(
|
|
217
|
+
AriaColorSlider,
|
|
218
|
+
{
|
|
219
|
+
className: composeRenderProps(className, (c) => cx(ColorPicker_default.slider, c)),
|
|
220
|
+
isDisabled: disabled,
|
|
221
|
+
...props
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
function Area({ className, disabled, ...props }) {
|
|
226
|
+
return /* @__PURE__ */ jsx(
|
|
227
|
+
AriaColorArea,
|
|
228
|
+
{
|
|
229
|
+
className: composeRenderProps(className, (c) => cx(ColorPicker_default.area, c)),
|
|
230
|
+
isDisabled: disabled,
|
|
231
|
+
...props
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function SliderTrack({ className, style, ...props }) {
|
|
236
|
+
return /* @__PURE__ */ jsx(
|
|
237
|
+
AriaSliderTrack,
|
|
238
|
+
{
|
|
239
|
+
className: composeRenderProps(className, (c) => cx(ColorPicker_default.sliderTrack, c)),
|
|
240
|
+
style: (renderProps) => {
|
|
241
|
+
const fromUser = typeof style === "function" ? style(renderProps) : style;
|
|
242
|
+
const baseBg = renderProps.defaultStyle.background;
|
|
243
|
+
const layered = renderProps.isDisabled || baseBg === void 0 ? baseBg : `${String(baseBg)}, ${CHECKER_BG}`;
|
|
244
|
+
return {
|
|
245
|
+
...renderProps.defaultStyle,
|
|
246
|
+
...fromUser,
|
|
247
|
+
...layered !== void 0 ? { background: layered } : null
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
...props
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
function Thumb({ className, ...props }) {
|
|
255
|
+
return /* @__PURE__ */ jsx(
|
|
256
|
+
AriaColorThumb,
|
|
257
|
+
{
|
|
258
|
+
className: composeRenderProps(className, (c) => cx(ColorPicker_default.thumb, c)),
|
|
259
|
+
...props
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
function AreaThumb({ className, ...props }) {
|
|
264
|
+
return /* @__PURE__ */ jsx(
|
|
265
|
+
AriaColorThumb,
|
|
266
|
+
{
|
|
267
|
+
className: composeRenderProps(className, (c) => cx(ColorPicker_default.thumbArea, c)),
|
|
268
|
+
...props
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
function Swatches(props) {
|
|
273
|
+
const state = useColorState();
|
|
274
|
+
return /* @__PURE__ */ jsx(
|
|
275
|
+
ColorSwatches,
|
|
276
|
+
{
|
|
277
|
+
...props,
|
|
278
|
+
value: state.color.toString("hex"),
|
|
279
|
+
onValueChange: (next) => next && state.setColor(parseColor(next))
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
Swatches.displayName = "ColorPicker.Swatches";
|
|
284
|
+
function SliderMeta({ label, className, ...rest }) {
|
|
285
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cx(ColorPicker_default.sliderHeader, className), children: [
|
|
286
|
+
/* @__PURE__ */ jsx("span", { className: ColorPicker_default.sliderLabel, children: label }),
|
|
287
|
+
/* @__PURE__ */ jsx(AriaSliderOutput, { className: ColorPicker_default.sliderValue })
|
|
288
|
+
] });
|
|
289
|
+
}
|
|
290
|
+
function HexInput({ label, hint, error, focusRing = true, ...rest }) {
|
|
291
|
+
const { labels } = useColorPickerContext();
|
|
292
|
+
const { inputRef, text, setText, commit } = useColorDraft(toHexText, parseHex);
|
|
293
|
+
return /* @__PURE__ */ jsx(
|
|
294
|
+
Input.Root,
|
|
295
|
+
{
|
|
296
|
+
...rest,
|
|
297
|
+
label: label ?? labels.hex,
|
|
298
|
+
hint,
|
|
299
|
+
error,
|
|
300
|
+
focusRing,
|
|
301
|
+
children: /* @__PURE__ */ jsx(Input.Wrapper, { children: /* @__PURE__ */ jsx(
|
|
302
|
+
Input.Field,
|
|
303
|
+
{
|
|
304
|
+
ref: inputRef,
|
|
305
|
+
autoCapitalize: "off",
|
|
306
|
+
autoCorrect: "off",
|
|
307
|
+
spellCheck: false,
|
|
308
|
+
value: text,
|
|
309
|
+
onBlur: commit,
|
|
310
|
+
onChange: (e) => setText(e.target.value),
|
|
311
|
+
onKeyDown: onCommitKeyDown(commit)
|
|
312
|
+
}
|
|
313
|
+
) })
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
HexInput.displayName = "ColorPicker.HexInput";
|
|
318
|
+
function EyeDropperButton({
|
|
319
|
+
children,
|
|
320
|
+
onClick,
|
|
321
|
+
type = "button",
|
|
322
|
+
className,
|
|
323
|
+
ref,
|
|
324
|
+
...rest
|
|
325
|
+
}) {
|
|
326
|
+
const { labels } = useColorPickerContext();
|
|
327
|
+
const state = useColorState();
|
|
328
|
+
const EyeDropperApi = typeof window === "undefined" ? void 0 : window.EyeDropper;
|
|
329
|
+
const supported = EyeDropperApi !== void 0;
|
|
330
|
+
return /* @__PURE__ */ jsx(
|
|
331
|
+
Button.Root,
|
|
332
|
+
{
|
|
333
|
+
variant: "soft",
|
|
334
|
+
tone: "neutral",
|
|
335
|
+
ref,
|
|
336
|
+
type,
|
|
337
|
+
"aria-label": labels.eyeDropper,
|
|
338
|
+
"aria-hidden": supported ? void 0 : true,
|
|
339
|
+
disabled: !supported,
|
|
340
|
+
tabIndex: supported ? void 0 : -1,
|
|
341
|
+
className: cx(ColorPicker_default.eyeDropperSquare, className),
|
|
342
|
+
onClick: (e) => {
|
|
343
|
+
onClick?.(e);
|
|
344
|
+
if (e.defaultPrevented || !EyeDropperApi) return;
|
|
345
|
+
void new EyeDropperApi().open().then((result) => state.setColor(parseColor(result.sRGBHex))).catch(() => {
|
|
346
|
+
});
|
|
347
|
+
},
|
|
348
|
+
...rest,
|
|
349
|
+
children: children ?? /* @__PURE__ */ jsx(Button.Icon, { children: /* @__PURE__ */ jsx(Icon, { name: "action.eyedropper" }) })
|
|
350
|
+
}
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
EyeDropperButton.displayName = "ColorPicker.EyeDropperButton";
|
|
354
|
+
function TriggerSwatch(props) {
|
|
355
|
+
const state = useColorState();
|
|
356
|
+
return /* @__PURE__ */ jsx(SwatchChip, { ...props, value: state.color.toString("css") });
|
|
357
|
+
}
|
|
358
|
+
TriggerSwatch.displayName = "ColorPicker.TriggerSwatch";
|
|
359
|
+
var ColorPicker = {
|
|
360
|
+
Root: ColorPickerRoot,
|
|
361
|
+
Panel,
|
|
362
|
+
TriggerSwatch,
|
|
363
|
+
FormatSelect,
|
|
364
|
+
ChannelStrip,
|
|
365
|
+
HexInput,
|
|
366
|
+
Area,
|
|
367
|
+
AreaThumb,
|
|
368
|
+
Slider,
|
|
369
|
+
SliderMeta,
|
|
370
|
+
SliderTrack,
|
|
371
|
+
Thumb,
|
|
372
|
+
Swatches,
|
|
373
|
+
EyeDropperButton
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
export {
|
|
377
|
+
parseColor,
|
|
378
|
+
ColorPicker
|
|
379
|
+
};
|