prime-ui-kit 0.9.0 → 0.9.1
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 +41 -41
- package/dist/chunks/chunk-DB2Y3XXA.js +12437 -0
- package/dist/chunks/chunk-KCQFOORX.js +379 -0
- package/dist/chunks/chunk-NHOWNIAR.js +3239 -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 +30 -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 +35 -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 +93 -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 +39 -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 +8 -19
- package/dist/components/dropdown/Dropdown.d.ts +63 -86
- 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 +54 -42
- package/dist/components/input/Input.d.ts +35 -37
- 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 +7 -21
- 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/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 +15 -27
- 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 +62 -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/useEnterConfirm.d.ts +15 -0
- package/dist/hooks/useImageStatus.d.ts +19 -0
- package/dist/hooks/useInertSiblings.d.ts +9 -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/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 +5990 -6891
- package/dist/index.d.ts +0 -1
- package/dist/index.js +98 -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 +34 -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 +60 -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/layout/app-shell/AppShell.d.ts +41 -21
- package/dist/layout/index.d.ts +1 -2
- 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 +22 -80
- package/dist/tokens/semantic.d.ts +66 -25
- package/dist/tokens/themes/dark.d.ts +3 -1
- package/package.json +29 -24
- package/src/components/accordion/COMPONENT.md +90 -100
- 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 +88 -93
- 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 +45 -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 +171 -185
- package/src/components/data-table/examples/appearance.tsx +31 -34
- 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 +91 -53
- package/src/components/digit-input/examples/controlled.tsx +6 -15
- package/src/components/digit-input/examples/examples.module.css +9 -42
- 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 +35 -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 +61 -52
- 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 +103 -102
- package/src/components/drawer/examples/controlled-open.tsx +33 -0
- package/src/components/drawer/examples/dismiss.tsx +55 -0
- package/src/components/drawer/examples/examples.module.css +3 -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} +10 -13
- package/src/components/drawer/examples/sizes.tsx +9 -15
- package/src/components/drawer/examples/structure.tsx +35 -0
- package/src/components/dropdown/COMPONENT.md +109 -152
- 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 +71 -75
- 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/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 +64 -84
- 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 +107 -121
- 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 +49 -74
- 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/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 +88 -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 +102 -61
- 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 +101 -60
- 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 +56 -28
- 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 +91 -105
- 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 +154 -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 +182 -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 +153 -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-shell/COMPONENT.md +48 -54
- package/src/layout/app-shell/examples/contained.tsx +5 -5
- package/src/layout/app-shell/examples/examples.module.css +9 -0
- package/src/layout/app-shell/examples/overview.tsx +72 -0
- package/src/layout/app-shell/examples/template.tsx +54 -0
- package/src/layout/sidebar/COMPONENT.md +302 -110
- 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 +3 -0
- package/src/styles/theme-light.css +34 -23
- package/src/styles/tokens.css +9 -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
|
@@ -7,13 +7,14 @@ export type TextareaLabels = {
|
|
|
7
7
|
counter: string;
|
|
8
8
|
};
|
|
9
9
|
export type TextareaRootProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "children"> & {
|
|
10
|
+
/** Tier. Default: the tier of the surrounding control (a form, a panel), else `m`. */
|
|
10
11
|
size?: ControlSize;
|
|
11
12
|
/** Invalid state: danger ring and `aria-invalid`. A non-empty `error` implies it. */
|
|
12
13
|
invalid?: boolean;
|
|
13
14
|
/**
|
|
14
15
|
* Draws the focus ring on the field box (default). `false` hides only the visual ring — focus,
|
|
15
16
|
* keyboard and ARIA are unchanged, the error ring still shows. Turn it off only where focus is
|
|
16
|
-
* otherwise obvious (a single
|
|
17
|
+
* otherwise obvious (a single composer field with a caret); WCAG 2.4.7.
|
|
17
18
|
*/
|
|
18
19
|
focusRing?: boolean;
|
|
19
20
|
label?: React.ReactNode;
|
|
@@ -31,45 +32,29 @@ export type TextareaRootProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
|
|
|
31
32
|
/** Called with the new string value; native `onChange` still fires. */
|
|
32
33
|
onValueChange?: (value: string) => void;
|
|
33
34
|
labels?: Partial<TextareaLabels>;
|
|
35
|
+
/** The native `<textarea>`. */
|
|
36
|
+
ref?: React.Ref<HTMLTextAreaElement>;
|
|
34
37
|
};
|
|
35
|
-
|
|
38
|
+
/**
|
|
39
|
+
* A multi-line field. `className` goes to the field frame, `id`, `ref` and the native attributes
|
|
40
|
+
* to the `<textarea>` (it has no `Field` part).
|
|
41
|
+
*/
|
|
42
|
+
declare function TextareaRoot({ id, className, size: sizeProp, invalid, focusRing, label, required, optional, hint, error, counter, reserveSupportRow, autoResize, disabled, readOnly, value, onInput, onChange, onValueChange, labels: labelsProp, "aria-describedby": ariaDescribedBy, ref, ...rest }: TextareaRootProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare namespace TextareaRoot {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
export type TextareaCounterProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
36
47
|
current: number;
|
|
37
48
|
max: number;
|
|
38
|
-
|
|
49
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
39
50
|
};
|
|
40
51
|
/** Character counter for the `counter` slot; turns danger when `current > max`. */
|
|
41
|
-
declare function TextareaCounter(
|
|
52
|
+
declare function TextareaCounter(props: TextareaCounterProps): import("react/jsx-runtime").JSX.Element;
|
|
42
53
|
declare namespace TextareaCounter {
|
|
43
54
|
var displayName: string;
|
|
44
55
|
}
|
|
45
56
|
export declare const Textarea: {
|
|
46
|
-
Root:
|
|
47
|
-
size?: ControlSize;
|
|
48
|
-
/** Invalid state: danger ring and `aria-invalid`. A non-empty `error` implies it. */
|
|
49
|
-
invalid?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Draws the focus ring on the field box (default). `false` hides only the visual ring — focus,
|
|
52
|
-
* keyboard and ARIA are unchanged, the error ring still shows. Turn it off only where focus is
|
|
53
|
-
* otherwise obvious (a single search field with a caret, e.g. a command palette); WCAG 2.4.7.
|
|
54
|
-
*/
|
|
55
|
-
focusRing?: boolean;
|
|
56
|
-
label?: React.ReactNode;
|
|
57
|
-
/** Shows the muted optional marker after the label text (`labels.optional`). */
|
|
58
|
-
optional?: boolean;
|
|
59
|
-
hint?: React.ReactNode;
|
|
60
|
-
/** Error message; replaces the hint in the same slot and implies `invalid`. */
|
|
61
|
-
error?: React.ReactNode;
|
|
62
|
-
/** Right-aligned slot of the support row, e.g. `<Textarea.Counter current={n} max={500} />`. */
|
|
63
|
-
counter?: React.ReactNode;
|
|
64
|
-
/** Always render the support row so an appearing error does not shift the layout. */
|
|
65
|
-
reserveSupportRow?: boolean;
|
|
66
|
-
/** Height follows the content. `false` → fixed height with native vertical resize. */
|
|
67
|
-
autoResize?: boolean;
|
|
68
|
-
/** Called with the new string value; native `onChange` still fires. */
|
|
69
|
-
onValueChange?: (value: string) => void;
|
|
70
|
-
labels?: Partial<TextareaLabels>;
|
|
71
|
-
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
57
|
+
Root: typeof TextareaRoot;
|
|
72
58
|
Counter: typeof TextareaCounter;
|
|
73
59
|
};
|
|
74
60
|
export {};
|
|
75
|
-
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { type ImageSlotFallbackProps, type ImageSlotImageProps } from "@/internal/imageSlot";
|
|
3
|
+
import type { ControlSize, PaletteColor } from "@/internal/states";
|
|
4
|
+
/** Width ÷ height. `1:1` square · `4:3` / `3:2` photo · `16:9` wide cover · `3:4` portrait. */
|
|
5
|
+
export type ThumbnailRatio = "1:1" | "4:3" | "3:2" | "16:9" | "3:4";
|
|
6
|
+
export type ThumbnailRootProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
/** Height tier: 24 · 32 · 40 · 48 · 64; width follows `ratio`. Default `m`. */
|
|
8
|
+
size?: ControlSize;
|
|
9
|
+
/** Aspect ratio, width ÷ height. Default `1:1`. */
|
|
10
|
+
ratio?: ThumbnailRatio;
|
|
11
|
+
/** Fallback fill and icon color (`--prime-color-palette-<hue>-*`). Default `gray`. */
|
|
12
|
+
color?: PaletteColor;
|
|
13
|
+
/** Fallback fill: `soft` tint with a hue icon, or `solid` hue with a contrasting icon. */
|
|
14
|
+
variant?: "soft" | "solid";
|
|
15
|
+
/** Fills the container width (cards, galleries); the height follows `ratio`. */
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
/** A faint inner ring around the frame, for photos with a white background on a light surface. */
|
|
18
|
+
ring?: boolean;
|
|
19
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
20
|
+
};
|
|
21
|
+
/** A preview of an object (product, vehicle, file, cover) at a fixed aspect ratio. People use Avatar. */
|
|
22
|
+
declare function ThumbnailRoot({ size, ratio, color, variant, fullWidth, ring, className, children, ...rest }: ThumbnailRootProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare namespace ThumbnailRoot {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
export type ThumbnailImageProps = ImageSlotImageProps & {
|
|
27
|
+
/** `cover` (default) crops to fill; `contain` shows the whole image on the fallback fill. */
|
|
28
|
+
fit?: "cover" | "contain";
|
|
29
|
+
};
|
|
30
|
+
/** The picture; while it loads or after an error the Fallback shows through. */
|
|
31
|
+
declare function ThumbnailImage({ fit, ...rest }: ThumbnailImageProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare namespace ThumbnailImage {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
export type ThumbnailFallbackProps = ImageSlotFallbackProps;
|
|
36
|
+
export declare const Thumbnail: {
|
|
37
|
+
Root: typeof ThumbnailRoot;
|
|
38
|
+
Image: typeof ThumbnailImage;
|
|
39
|
+
Fallback: (props: ImageSlotFallbackProps) => React.ReactElement;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -3,31 +3,33 @@ import type { ControlSize, PaletteColor, Tone } from "@/internal/states";
|
|
|
3
3
|
export type TimelineRootProps = {
|
|
4
4
|
/** Tier of text, dots and row rhythm. Default `m` (rows 64px). */
|
|
5
5
|
size?: ControlSize;
|
|
6
|
-
/**
|
|
7
|
-
* Who gets the highlighted look (pill, accent title and dot):
|
|
8
|
-
* `selected` (default) — the `active` row keeps it; interactive rows get a faint hover wash.
|
|
9
|
-
* `hover` — the row under the pointer or with keyboard focus, transiently; `active` keeps only
|
|
10
|
-
* its semantics (`aria-current`), no persistent highlight.
|
|
11
|
-
*/
|
|
12
|
-
highlight?: "selected" | "hover";
|
|
13
6
|
/** `Timeline.Group` elements. */
|
|
14
7
|
children: React.ReactNode;
|
|
15
8
|
className?: string;
|
|
9
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
16
10
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children">;
|
|
11
|
+
declare function TimelineRoot({ size, children, className, ...rest }: TimelineRootProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace TimelineRoot {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
17
15
|
export type TimelineGroupProps = {
|
|
18
16
|
/** Group heading (e.g. «Недавно»); labels the list via `aria-labelledby`. */
|
|
19
17
|
label?: React.ReactNode;
|
|
20
18
|
/** `Timeline.Item` and `Timeline.Gap` elements. */
|
|
21
19
|
children: React.ReactNode;
|
|
22
20
|
className?: string;
|
|
21
|
+
ref?: React.Ref<HTMLOListElement>;
|
|
23
22
|
} & Omit<React.OlHTMLAttributes<HTMLOListElement>, "children">;
|
|
23
|
+
/** One labelled `<ol>` of events. The connecting line runs from its first dot to its last. */
|
|
24
|
+
declare function TimelineGroup({ label, children, className, ...rest }: TimelineGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare namespace TimelineGroup {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
24
28
|
export type TimelineItemProps = {
|
|
25
29
|
/** Decorative dot hue (categorization). Default `blue`, shown at reduced emphasis. */
|
|
26
30
|
color?: PaletteColor;
|
|
27
31
|
/** Semantic dot color (status). Wins over `color`; shown at full emphasis. */
|
|
28
32
|
tone?: Tone;
|
|
29
|
-
/** Highlighted / selected row: soft pill, accent title and dot; `data-state="active"`, `aria-current`. */
|
|
30
|
-
active?: boolean;
|
|
31
33
|
/** Renders the row as a link. */
|
|
32
34
|
href?: string;
|
|
33
35
|
/** Renders the row as the single child element (router link etc.); the dot is prepended to its children. */
|
|
@@ -37,12 +39,19 @@ export type TimelineItemProps = {
|
|
|
37
39
|
/** `Timeline.Title`, `Timeline.Meta`, `Timeline.Value`. */
|
|
38
40
|
children: React.ReactNode;
|
|
39
41
|
className?: string;
|
|
42
|
+
/** The row element (`a`, `button`, `div` or the `asChild` element). */
|
|
43
|
+
ref?: React.Ref<HTMLElement>;
|
|
40
44
|
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "color" | "onClick"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "rel" | "download">;
|
|
45
|
+
declare function TimelineItem({ color, tone, href, asChild, onClick, children, className, ref, ...rest }: TimelineItemProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare namespace TimelineItem {
|
|
47
|
+
var displayName: string;
|
|
48
|
+
}
|
|
41
49
|
export type TimelineTitleProps = {
|
|
42
50
|
children: React.ReactNode;
|
|
43
51
|
className?: string;
|
|
52
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
44
53
|
} & Omit<React.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
45
|
-
/** First line: the event. Medium, primary (accent on the
|
|
54
|
+
/** First line: the event. Medium, primary (accent on the highlighted row); wraps when narrow. */
|
|
46
55
|
declare function TimelineTitle({ children, className, ...rest }: TimelineTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
47
56
|
declare namespace TimelineTitle {
|
|
48
57
|
var displayName: string;
|
|
@@ -50,6 +59,7 @@ declare namespace TimelineTitle {
|
|
|
50
59
|
export type TimelineMetaProps = {
|
|
51
60
|
children: React.ReactNode;
|
|
52
61
|
className?: string;
|
|
62
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
53
63
|
} & Omit<React.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
54
64
|
/** Second line: date and relative time, muted, tabular numbers. Emphasize a part with `Timeline.MetaPrimary` or `<strong>`. */
|
|
55
65
|
declare function TimelineMeta({ children, className, ...rest }: TimelineMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -59,6 +69,7 @@ declare namespace TimelineMeta {
|
|
|
59
69
|
export type TimelineMetaPrimaryProps = {
|
|
60
70
|
children: React.ReactNode;
|
|
61
71
|
className?: string;
|
|
72
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
62
73
|
} & Omit<React.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
63
74
|
/** Emphasized part of the meta line (the date): primary, medium. */
|
|
64
75
|
declare function TimelineMetaPrimary({ children, className, ...rest }: TimelineMetaPrimaryProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -70,6 +81,7 @@ export type TimelineValueProps = {
|
|
|
70
81
|
tone?: Tone;
|
|
71
82
|
children: React.ReactNode;
|
|
72
83
|
className?: string;
|
|
84
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
73
85
|
} & Omit<React.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
74
86
|
/**
|
|
75
87
|
* Trailing amount: right-aligned, vertically centered, tabular numbers. Add `Timeline.ValueMeta` for a
|
|
@@ -82,74 +94,47 @@ declare namespace TimelineValue {
|
|
|
82
94
|
export type TimelineValueMetaProps = {
|
|
83
95
|
children: React.ReactNode;
|
|
84
96
|
className?: string;
|
|
97
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
85
98
|
} & Omit<React.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
86
99
|
/** Second line inside `Timeline.Value` (category, unit): meta size, muted, right-aligned under the value. */
|
|
87
100
|
declare function TimelineValueMeta({ children, className, ...rest }: TimelineValueMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
88
101
|
declare namespace TimelineValueMeta {
|
|
89
102
|
var displayName: string;
|
|
90
103
|
}
|
|
104
|
+
export type TimelineGapMetaProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
105
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
106
|
+
};
|
|
107
|
+
/** A caption on the right of a gap (e.g. «сейчас»). */
|
|
108
|
+
declare function TimelineGapMeta({ className, ...rest }: TimelineGapMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
109
|
+
declare namespace TimelineGapMeta {
|
|
110
|
+
var displayName: string;
|
|
111
|
+
}
|
|
91
112
|
export type TimelineGapProps = {
|
|
92
113
|
/** Caption color and hollow dot. Default `neutral` (muted); `warning` / `danger` flag a long interval. */
|
|
93
114
|
tone?: Tone;
|
|
94
|
-
/**
|
|
95
|
-
trailing?: React.ReactNode;
|
|
96
|
-
/** Interval caption, e.g. «40 дней · 2 200 км без обслуживания». */
|
|
115
|
+
/** Interval caption, e.g. «40 дней · 2 200 км без обслуживания», and an optional `Timeline.GapMeta`. */
|
|
97
116
|
children: React.ReactNode;
|
|
98
117
|
className?: string;
|
|
118
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
99
119
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children">;
|
|
120
|
+
/**
|
|
121
|
+
* Interval between two events: a shorter row with a small hollow dot on a dashed segment and a
|
|
122
|
+
* muted caption. Renders an `li`, so it goes inside `Timeline.Group` between items.
|
|
123
|
+
*/
|
|
124
|
+
declare function TimelineGap({ tone, children, className, ...rest }: TimelineGapProps): import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
declare namespace TimelineGap {
|
|
126
|
+
var displayName: string;
|
|
127
|
+
}
|
|
100
128
|
export declare const Timeline: {
|
|
101
|
-
Root:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Who gets the highlighted look (pill, accent title and dot):
|
|
106
|
-
* `selected` (default) — the `active` row keeps it; interactive rows get a faint hover wash.
|
|
107
|
-
* `hover` — the row under the pointer or with keyboard focus, transiently; `active` keeps only
|
|
108
|
-
* its semantics (`aria-current`), no persistent highlight.
|
|
109
|
-
*/
|
|
110
|
-
highlight?: "selected" | "hover";
|
|
111
|
-
/** `Timeline.Group` elements. */
|
|
112
|
-
children: React.ReactNode;
|
|
113
|
-
className?: string;
|
|
114
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & React.RefAttributes<HTMLDivElement>>;
|
|
115
|
-
Group: React.ForwardRefExoticComponent<{
|
|
116
|
-
/** Group heading (e.g. «Недавно»); labels the list via `aria-labelledby`. */
|
|
117
|
-
label?: React.ReactNode;
|
|
118
|
-
/** `Timeline.Item` and `Timeline.Gap` elements. */
|
|
119
|
-
children: React.ReactNode;
|
|
120
|
-
className?: string;
|
|
121
|
-
} & Omit<React.OlHTMLAttributes<HTMLOListElement>, "children"> & React.RefAttributes<HTMLOListElement>>;
|
|
122
|
-
Item: React.ForwardRefExoticComponent<{
|
|
123
|
-
/** Decorative dot hue (categorization). Default `blue`, shown at reduced emphasis. */
|
|
124
|
-
color?: PaletteColor;
|
|
125
|
-
/** Semantic dot color (status). Wins over `color`; shown at full emphasis. */
|
|
126
|
-
tone?: Tone;
|
|
127
|
-
/** Highlighted / selected row: soft pill, accent title and dot; `data-state="active"`, `aria-current`. */
|
|
128
|
-
active?: boolean;
|
|
129
|
-
/** Renders the row as a link. */
|
|
130
|
-
href?: string;
|
|
131
|
-
/** Renders the row as the single child element (router link etc.); the dot is prepended to its children. */
|
|
132
|
-
asChild?: boolean;
|
|
133
|
-
/** Renders the row as a `button` (unless `href` / `asChild`). */
|
|
134
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
135
|
-
/** `Timeline.Title`, `Timeline.Meta`, `Timeline.Value`. */
|
|
136
|
-
children: React.ReactNode;
|
|
137
|
-
className?: string;
|
|
138
|
-
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "color" | "onClick"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "rel" | "target" | "download"> & React.RefAttributes<HTMLElement>>;
|
|
129
|
+
Root: typeof TimelineRoot;
|
|
130
|
+
Group: typeof TimelineGroup;
|
|
131
|
+
Item: typeof TimelineItem;
|
|
139
132
|
Title: typeof TimelineTitle;
|
|
140
133
|
Meta: typeof TimelineMeta;
|
|
141
134
|
MetaPrimary: typeof TimelineMetaPrimary;
|
|
142
135
|
Value: typeof TimelineValue;
|
|
143
136
|
ValueMeta: typeof TimelineValueMeta;
|
|
144
|
-
Gap:
|
|
145
|
-
|
|
146
|
-
tone?: Tone;
|
|
147
|
-
/** Optional trailing caption on the right (e.g. «сейчас»). */
|
|
148
|
-
trailing?: React.ReactNode;
|
|
149
|
-
/** Interval caption, e.g. «40 дней · 2 200 км без обслуживания». */
|
|
150
|
-
children: React.ReactNode;
|
|
151
|
-
className?: string;
|
|
152
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & React.RefAttributes<HTMLDivElement>>;
|
|
137
|
+
Gap: typeof TimelineGap;
|
|
138
|
+
GapMeta: typeof TimelineGapMeta;
|
|
153
139
|
};
|
|
154
140
|
export {};
|
|
155
|
-
//# sourceMappingURL=Timeline.d.ts.map
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type PositionAlign, type PositionSide } from "@/hooks/usePosition";
|
|
2
3
|
import type { ControlSize } from "@/internal/states";
|
|
3
|
-
export type TooltipSide =
|
|
4
|
+
export type TooltipSide = PositionSide;
|
|
5
|
+
export type TooltipAlign = PositionAlign;
|
|
4
6
|
export type TooltipProviderProps = {
|
|
7
|
+
/** Show delay in ms for every Tooltip.Root inside. */
|
|
5
8
|
delayDuration?: number;
|
|
9
|
+
/** Window in ms after a tooltip closes during which the next one opens instantly. */
|
|
10
|
+
skipDelayDuration?: number;
|
|
6
11
|
children: React.ReactNode;
|
|
7
12
|
};
|
|
8
|
-
declare function TooltipProvider({ delayDuration, children }: TooltipProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function TooltipProvider({ delayDuration, skipDelayDuration, children, }: TooltipProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
14
|
declare namespace TooltipProvider {
|
|
10
15
|
var displayName: string;
|
|
11
16
|
}
|
|
@@ -14,7 +19,7 @@ export type TooltipRootProps = {
|
|
|
14
19
|
open?: boolean;
|
|
15
20
|
defaultOpen?: boolean;
|
|
16
21
|
onOpenChange?: (open: boolean) => void;
|
|
17
|
-
/**
|
|
22
|
+
/** Show delay in ms for this tooltip; defaults to the Provider's (400). */
|
|
18
23
|
delayDuration?: number;
|
|
19
24
|
};
|
|
20
25
|
declare function TooltipRoot({ children, open, defaultOpen, onOpenChange, delayDuration: delayProp, }: TooltipRootProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,27 +27,27 @@ declare namespace TooltipRoot {
|
|
|
22
27
|
var displayName: string;
|
|
23
28
|
}
|
|
24
29
|
export type TooltipTriggerProps = {
|
|
30
|
+
/** One focusable element: a Button, or a `tabIndex={0}` wrapper around a disabled control. */
|
|
25
31
|
children: React.ReactElement;
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
32
|
+
ref?: React.Ref<HTMLElement>;
|
|
33
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "children">;
|
|
34
|
+
/**
|
|
35
|
+
* The tooltip id joins the child's own `aria-describedby`; the child's handlers run first. Other
|
|
36
|
+
* props (handlers, ARIA, `ref`) are forwarded to the child.
|
|
37
|
+
*/
|
|
38
|
+
declare function TooltipTrigger({ children, ...forwarded }: TooltipTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
29
39
|
declare namespace TooltipTrigger {
|
|
30
40
|
var displayName: string;
|
|
31
41
|
}
|
|
32
|
-
type
|
|
33
|
-
top: number;
|
|
34
|
-
left: number;
|
|
35
|
-
side: TooltipSide;
|
|
36
|
-
};
|
|
37
|
-
/** Позиция по стороне; если не влезает — противоположная сторона; затем сдвиг в пределах вьюпорта. */
|
|
38
|
-
export declare function computeTooltipPosition(ar: Pick<DOMRectReadOnly, "top" | "left" | "right" | "bottom" | "width" | "height">, cw: number, ch: number, vw: number, vh: number, side: TooltipSide, offset: number, pad: number): TooltipCoords;
|
|
39
|
-
export type TooltipContentProps = {
|
|
42
|
+
export type TooltipContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, "id" | "role" | "onPointerEnter" | "onPointerLeave"> & {
|
|
40
43
|
children: React.ReactNode;
|
|
44
|
+
/** Text and padding tier; also the size context of controls inside (a Kbd). */
|
|
41
45
|
size?: ControlSize;
|
|
42
46
|
side?: TooltipSide;
|
|
43
|
-
|
|
47
|
+
align?: TooltipAlign;
|
|
48
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
44
49
|
};
|
|
45
|
-
declare function TooltipContent({ children, size, side, className }: TooltipContentProps): import("react/jsx-runtime").JSX.Element
|
|
50
|
+
declare function TooltipContent({ children, size, side, align, className, ...rest }: TooltipContentProps): import("react/jsx-runtime").JSX.Element;
|
|
46
51
|
declare namespace TooltipContent {
|
|
47
52
|
var displayName: string;
|
|
48
53
|
}
|
|
@@ -53,4 +58,3 @@ export declare const Tooltip: {
|
|
|
53
58
|
Content: typeof TooltipContent;
|
|
54
59
|
};
|
|
55
60
|
export {};
|
|
56
|
-
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import type { TextTone } from "@/internal/states";
|
|
3
3
|
/** Text roles from the foundation (`--prime-text-<role>-*`). */
|
|
4
4
|
export type TypographyRole = "caption" | "body-s" | "body-m" | "body-l" | "title-s" | "title-m" | "title-l" | "heading-s" | "heading-m" | "heading-l" | "display-s" | "display-m" | "display-l" | "code";
|
|
5
5
|
export type TypographyWeight = "regular" | "medium" | "semibold";
|
|
6
6
|
export type TypographyTracking = "normal" | "tight" | "tighter" | "wide";
|
|
7
7
|
export type TypographyAs = "p" | "span" | "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "small" | "blockquote" | "article" | "section" | "header" | "footer" | "aside" | "nav" | "main";
|
|
8
|
-
export type
|
|
8
|
+
export type TypographyProps = {
|
|
9
9
|
as?: TypographyAs;
|
|
10
10
|
/** Text role (`--prime-text-<role>-*`). */
|
|
11
11
|
variant: TypographyRole;
|
|
@@ -20,23 +20,7 @@ export type TypographyRootProps = {
|
|
|
20
20
|
tone?: TextTone;
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
className?: string;
|
|
23
|
+
ref?: React.Ref<HTMLElement>;
|
|
23
24
|
} & React.HTMLAttributes<HTMLElement>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
as?: TypographyAs;
|
|
27
|
-
/** Text role (`--prime-text-<role>-*`). */
|
|
28
|
-
variant: TypographyRole;
|
|
29
|
-
/** Overrides the role's weight. Omit to use the role's own weight. */
|
|
30
|
-
weight?: TypographyWeight;
|
|
31
|
-
/** Overrides the role's tracking. Omit to use the role's own tracking. */
|
|
32
|
-
tracking?: TypographyTracking;
|
|
33
|
-
/** Clamp to one line with an ellipsis (set `title` when the full text matters). */
|
|
34
|
-
truncate?: boolean;
|
|
35
|
-
italic?: boolean;
|
|
36
|
-
/** Text color. Default `default` (primary text). */
|
|
37
|
-
tone?: TextTone;
|
|
38
|
-
children?: React.ReactNode;
|
|
39
|
-
className?: string;
|
|
40
|
-
} & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=Typography.d.ts.map
|
|
25
|
+
/** Any text element styled by one text role; state goes to `data-*`. */
|
|
26
|
+
export declare function Typography({ as: Tag, variant, weight, tracking, truncate, italic, tone, className, children, ref, ...rest }: TypographyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,4 +5,3 @@ type UseControllableStateParams<T> = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function useControllableState<T>({ value, defaultValue, onChange, }: UseControllableStateParams<T>): readonly [T, (nextValue: T | ((prev: T) => T)) => void];
|
|
7
7
|
export {};
|
|
8
|
-
//# sourceMappingURL=useControllableState.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type UseEnterConfirmOptions = {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
5
|
+
/** Replaces the default (a `click()` on `confirmRef`). */
|
|
6
|
+
onEnterConfirm?: (event: KeyboardEvent) => void;
|
|
7
|
+
/** The confirm target (the primary button wrapped in `Modal.Confirm`). */
|
|
8
|
+
confirmRef: React.RefObject<HTMLElement | null>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Enter inside a dialog clicks its confirm action — from a text field or the dialog itself. Enter on
|
|
12
|
+
* a button, link or `role="button"` activates that element instead (Enter on Cancel cancels), and
|
|
13
|
+
* the header (close button) is left alone.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useEnterConfirm({ enabled, containerRef, onEnterConfirm, confirmRef, }: UseEnterConfirmOptions): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Load status of an image part as its root sees it; `idle` = no image part mounted. */
|
|
3
|
+
export type ImageStatus = "idle" | "loading" | "loaded" | "error";
|
|
4
|
+
type ImageHandlers = {
|
|
5
|
+
onLoad?: React.ReactEventHandler<HTMLImageElement>;
|
|
6
|
+
onError?: React.ReactEventHandler<HTMLImageElement>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Image side of an image-with-fallback component (Avatar, Thumbnail): tracks the `<img>` load and
|
|
10
|
+
* reports it to the root through `report`, so the root's Fallback shows while loading and after an
|
|
11
|
+
* error. Key the image element by `src`: a new source remounts it and starts again at `loading`.
|
|
12
|
+
* Unmounting the image reports `idle`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useImageStatus(report: (status: ImageStatus) => void, { onLoad, onError }?: ImageHandlers): {
|
|
15
|
+
status: "loading" | "error" | "loaded";
|
|
16
|
+
onLoad: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
17
|
+
onError: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Body children that stay usable under a modal layer: live regions (the toast viewport). */
|
|
3
|
+
export declare const LIVE_REGION_ATTR = "data-prime-live-region";
|
|
4
|
+
/**
|
|
5
|
+
* While `enabled`, makes every `<body>` child inert except the one that holds `ref` (its portal)
|
|
6
|
+
* and live regions, then restores the previous values. `inert` already removes the content from
|
|
7
|
+
* the accessibility tree, so no `aria-hidden` is added. Part of `useModalLayer`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useInertSiblings(enabled: boolean, ref: React.RefObject<HTMLElement | null>): void;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* One stable callback ref that writes to every given ref (callback or object). The identity changes
|
|
4
|
+
* only when one of the refs does, so the node is not detached and reattached on every render. The
|
|
5
|
+
* single way to merge refs in components; the number of refs at a call site must not change.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useMergedRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type DismissReason, type LayerEntry } from "@/internal/overlay/layerStack";
|
|
3
|
+
export type UseModalLayerOptions = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Escape (`escape`) or a click on the scrim (`scrim`); the owner applies its `closeOn*` props. */
|
|
6
|
+
onDismiss: (reason: DismissReason) => void;
|
|
7
|
+
};
|
|
8
|
+
export type ModalLayer<T extends HTMLElement> = {
|
|
9
|
+
/** Attach to the panel (`role="dialog"`): the trap container and the inside of the layer. */
|
|
10
|
+
ref: React.RefObject<T | null>;
|
|
11
|
+
/** Pass to `<LayerProvider value={layer}>` around the content: nested layers stack above. */
|
|
12
|
+
layer: LayerEntry;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The mechanics of a modal layer — Modal, Drawer, CommandMenu, the off-canvas Sidebar — in one
|
|
16
|
+
* fixed order: the rest of the page becomes inert, focus moves in and Tab is trapped, document
|
|
17
|
+
* scroll locks, and the layer joins the stack with scrim (`click`) dismissal. On close the page is
|
|
18
|
+
* restored first, then focus returns to the opener, captured at the open transition. Focus always
|
|
19
|
+
* returns, also after a scrim click: the page behind was inert, so the opener is the only place to
|
|
20
|
+
* continue from (foundation §8).
|
|
21
|
+
*/
|
|
22
|
+
export declare function useModalLayer<T extends HTMLElement = HTMLElement>({ open, onDismiss, }: UseModalLayerOptions): ModalLayer<T>;
|
|
@@ -1,62 +1,68 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export type PositionSide = "bottom" | "
|
|
2
|
+
export type PositionSide = "top" | "right" | "bottom" | "left";
|
|
3
3
|
export type PositionAlign = "start" | "center" | "end";
|
|
4
|
-
type UsePositionOptions = {
|
|
5
|
-
side?: PositionSide;
|
|
6
|
-
align?: PositionAlign;
|
|
7
|
-
offset?: number;
|
|
8
|
-
/** Отступ контента от краёв вьюпорта при расчёте flip/позиции (px). */
|
|
9
|
-
viewportPad?: number;
|
|
10
|
-
flip?: boolean;
|
|
11
|
-
matchTriggerMinWidth?: boolean;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Private custom properties written by `usePosition` on the floating element. Panels combine them
|
|
15
|
-
* with tokens, e.g. `max-height: min(var(--prime-panel-max-height), var(--float-max-h))`, so the
|
|
16
|
-
* design limit and the room next to the anchor both apply.
|
|
17
|
-
*/
|
|
18
|
-
export declare const FLOAT_MAX_HEIGHT_VAR = "--float-max-h";
|
|
19
|
-
/** Trigger width (px) when the panel should be at least as wide as its anchor. */
|
|
20
|
-
export declare const FLOAT_MIN_WIDTH_VAR = "--float-min-w";
|
|
21
|
-
/** Viewport width minus gutters (px): a panel is never wider than the screen. */
|
|
22
|
-
export declare const FLOAT_MAX_WIDTH_VAR = "--float-max-w";
|
|
23
|
-
export type PositionUpdateMeta = {
|
|
24
|
-
resolvedSide: PositionSide;
|
|
25
|
-
};
|
|
26
4
|
/**
|
|
27
5
|
* Computed length of a CSS custom property on `:root` in px (rem/px values).
|
|
28
6
|
* Falls back when there is no DOM / stylesheet (SSR, jsdom).
|
|
29
7
|
*/
|
|
30
8
|
export declare function readCssLengthPx(name: string, fallbackPx: number): number;
|
|
31
|
-
/** Gap between anchor and floating panel: `--prime-panel-offset`. */
|
|
32
|
-
export declare function getPanelOffsetPx(): number;
|
|
33
9
|
/** Minimum distance from a floating panel to the viewport edge: `--prime-space-2`. */
|
|
34
10
|
export declare function getViewportPadPx(): number;
|
|
35
11
|
export type ComputeFloatingOptions = {
|
|
36
|
-
|
|
12
|
+
side: PositionSide;
|
|
37
13
|
align: PositionAlign;
|
|
14
|
+
/** Gap between the anchor and the layer (px). */
|
|
38
15
|
offset: number;
|
|
39
|
-
/**
|
|
16
|
+
/** Minimum distance from the viewport edge (px); 8 by default. */
|
|
40
17
|
viewportPad?: number;
|
|
18
|
+
/** Flip to the opposite side (and edge) when the layer does not fit. */
|
|
41
19
|
flip: boolean;
|
|
42
|
-
|
|
20
|
+
matchAnchorWidth: boolean;
|
|
21
|
+
/** Closest the arrow centre may come to a layer corner; computes `arrow` when set. */
|
|
22
|
+
arrowInset?: number;
|
|
43
23
|
};
|
|
44
24
|
export type ComputedFloatPosition = {
|
|
45
25
|
top: number;
|
|
46
26
|
left: number;
|
|
47
|
-
|
|
27
|
+
/** The side after flipping. */
|
|
28
|
+
side: PositionSide;
|
|
48
29
|
minWidth?: number;
|
|
49
|
-
/**
|
|
30
|
+
/** Room across: the viewport minus gutters (top / bottom) or the room on the side (left / right). */
|
|
50
31
|
maxWidth: number;
|
|
51
|
-
/**
|
|
52
|
-
maxHeight
|
|
32
|
+
/** Room along the side the layer opened on (px). */
|
|
33
|
+
maxHeight: number;
|
|
34
|
+
/** Arrow centre along the edge facing the anchor (px from the layer's start). */
|
|
35
|
+
arrow?: number;
|
|
53
36
|
};
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Places a layer on `side` of the anchor: flips to the opposite side when it does not fit there
|
|
39
|
+
* and does on the other (or has more room), aligns it along the cross axis (flipping the edge when
|
|
40
|
+
* it overflows), keeps it inside the viewport and, with `arrowInset`, points an arrow at the
|
|
41
|
+
* anchor's centre without leaving the layer's straight edge.
|
|
42
|
+
*/
|
|
43
|
+
export declare function computeFloatingPosition(anchor: Pick<DOMRectReadOnly, "top" | "left" | "right" | "bottom" | "width" | "height">, contentW: number, contentH: number, vw: number, vh: number, opts: ComputeFloatingOptions): ComputedFloatPosition;
|
|
44
|
+
export type PositionOptions = {
|
|
45
|
+
side?: PositionSide;
|
|
46
|
+
align?: PositionAlign;
|
|
47
|
+
/** Write the anchor width to `--float-min-w` (the panel CSS decides min or exact width). */
|
|
48
|
+
matchAnchorWidth?: boolean;
|
|
49
|
+
/** Token of the gap between anchor and layer. Default `--prime-panel-offset`. */
|
|
50
|
+
offsetToken?: string;
|
|
51
|
+
/** Closest the arrow may come to a layer corner, read from the layer; writes `--float-arrow`. */
|
|
52
|
+
arrowInset?: (layer: HTMLElement) => number;
|
|
59
53
|
};
|
|
60
|
-
export
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
export type Position = {
|
|
55
|
+
/** The side the layer opened on (after flipping). */
|
|
56
|
+
side: PositionSide;
|
|
57
|
+
/** Attach to the layer element (merge with other refs): positioning starts once it is in the DOM. */
|
|
58
|
+
attachLayer: (node: HTMLElement | null) => void;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Places a floating layer (`position: fixed`) next to its anchor and follows the anchor while
|
|
62
|
+
* `enabled`: before paint, again on the next frame (fonts), and on window resize, scroll of any
|
|
63
|
+
* scrolling ancestor of the anchor, visual-viewport changes and size changes of the layer or the
|
|
64
|
+
* anchor. Shared by every anchored layer (Popover, Dropdown, Select, TagSelect, Tooltip). A
|
|
65
|
+
* portaled layer reaches the DOM one commit after its owner, so the subscription waits for
|
|
66
|
+
* `attachLayer` instead of reading the ref too early.
|
|
67
|
+
*/
|
|
68
|
+
export declare function usePosition(enabled: boolean, anchorRef: React.RefObject<HTMLElement | null>, layerRef: React.RefObject<HTMLElement | null>, { side: preferredSide, align, matchAnchorWidth, offsetToken, arrowInset, }?: PositionOptions): Position;
|
|
@@ -28,4 +28,3 @@ export type Presence = {
|
|
|
28
28
|
* `prefers-reduced-motion: reduce`. Shared by every floating layer (foundation §7 "Overlay contract").
|
|
29
29
|
*/
|
|
30
30
|
export declare function usePresence(open: boolean, options?: UsePresenceOptions): Presence;
|
|
31
|
-
//# sourceMappingURL=usePresence.d.ts.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Locks
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Shared by modal/drawer overlays.
|
|
2
|
+
* Locks document scroll while enabled. Reference-counted: nested modal layers share one lock and
|
|
3
|
+
* the last one restores it. The scrollbar width is added to the body's right padding, so the page
|
|
4
|
+
* does not shift. Part of `useModalLayer`.
|
|
6
5
|
*/
|
|
7
6
|
export declare function useScrollLock(enabled: boolean): void;
|
|
8
|
-
//# sourceMappingURL=useScrollLock.d.ts.map
|