prime-ui-kit 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -47
- package/dist/chunks/chunk-IQELQNMR.js +379 -0
- package/dist/chunks/chunk-LXGRKN34.js +13260 -0
- package/dist/chunks/chunk-ZEFCDEEQ.js +3493 -0
- package/dist/color-picker.d.ts +7 -0
- package/dist/color-picker.js +9 -0
- package/dist/components/accordion/Accordion.d.ts +44 -32
- package/dist/components/avatar/Avatar.d.ts +36 -53
- package/dist/components/badge/Badge.d.ts +50 -13
- package/dist/components/badge/edgeIcons.d.ts +13 -0
- package/dist/components/badge/tier.d.ts +0 -1
- package/dist/components/banner/Banner.d.ts +29 -60
- package/dist/components/breadcrumb/Breadcrumb.d.ts +11 -23
- package/dist/components/button/Button.d.ts +22 -36
- package/dist/components/button-group/ButtonGroup.d.ts +17 -17
- package/dist/components/card/Card.d.ts +75 -202
- package/dist/components/checkbox/Checkbox.d.ts +37 -38
- package/dist/components/code-block/CodeBlock.d.ts +5 -13
- package/dist/components/color-picker/ColorPicker.d.ts +76 -52
- package/dist/components/color-picker/ColorPresets.d.ts +18 -30
- package/dist/components/color-swatches/ColorSwatches.d.ts +40 -0
- package/dist/components/command-menu/CommandMenu.d.ts +138 -78
- package/dist/components/crossfade/Crossfade.d.ts +14 -0
- package/dist/components/data-table/DataTable.d.ts +35 -81
- package/dist/components/data-table/Footer.d.ts +16 -0
- package/dist/components/data-table/Head.d.ts +21 -0
- package/dist/components/data-table/Row.d.ts +56 -0
- package/dist/components/data-table/StateRows.d.ts +18 -0
- package/dist/components/data-table/rows.d.ts +60 -0
- package/dist/components/data-table/types.d.ts +40 -0
- package/dist/components/data-table/useColumnHover.d.ts +9 -0
- package/dist/components/data-table/useFrozenColumns.d.ts +16 -0
- package/dist/components/data-table/useInfiniteRows.d.ts +24 -0
- package/dist/components/data-table/useRowSelection.d.ts +35 -0
- package/dist/components/datepicker/Datepicker.d.ts +9 -126
- package/dist/components/datepicker/DatepickerPanel.d.ts +113 -0
- package/dist/components/datepicker/datepickerModel.d.ts +16 -22
- package/dist/components/datepicker/panelLayout.d.ts +50 -0
- package/dist/components/digit-input/DigitInput.d.ts +24 -19
- package/dist/components/divider/Divider.d.ts +7 -15
- package/dist/components/dnd/Dnd.d.ts +135 -0
- package/dist/components/dnd/DragOverlay.d.ts +6 -0
- package/dist/components/dnd/autoScroll.d.ts +5 -0
- package/dist/components/dnd/context.d.ts +5 -0
- package/dist/components/dnd/dragSession.d.ts +102 -0
- package/dist/components/dnd/geometry.d.ts +30 -0
- package/dist/components/dnd/labels.d.ts +18 -0
- package/dist/components/dnd/store.d.ts +9 -0
- package/dist/components/dnd/useDragSource.d.ts +36 -0
- package/dist/components/dnd/useDropTarget.d.ts +44 -0
- package/dist/components/dnd/useFlipList.d.ts +11 -0
- package/dist/components/dnd/useSortableList.d.ts +62 -0
- package/dist/components/drawer/Drawer.d.ts +13 -21
- package/dist/components/dropdown/Dropdown.d.ts +78 -84
- package/dist/components/empty-page/EmptyPage.d.ts +48 -48
- package/dist/components/example-frame/ExampleFrame.d.ts +20 -27
- package/dist/components/file-upload/FileUpload.d.ts +79 -134
- package/dist/components/hint/Hint.d.ts +10 -11
- package/dist/components/index.d.ts +58 -42
- package/dist/components/input/Input.d.ts +35 -37
- package/dist/components/kanban/Kanban.d.ts +129 -0
- package/dist/components/kbd/Kbd.d.ts +6 -12
- package/dist/components/label/Label.d.ts +18 -15
- package/dist/components/link-button/LinkButton.d.ts +14 -15
- package/dist/components/login-form/LoginForm.d.ts +115 -0
- package/dist/components/modal/DialogParts.d.ts +57 -16
- package/dist/components/modal/Modal.d.ts +9 -20
- package/dist/components/native-select/NativeSelect.d.ts +28 -0
- package/dist/components/notification/Notification.d.ts +50 -16
- package/dist/components/notification/NotificationStore.d.ts +2 -6
- package/dist/components/page-content/PageContent.d.ts +43 -52
- package/dist/components/page-toolbar/PageToolbar.d.ts +53 -0
- package/dist/components/pagination/Pagination.d.ts +11 -23
- package/dist/components/popover/Popover.d.ts +62 -26
- package/dist/components/progress-bar/ProgressBar.d.ts +17 -13
- package/dist/components/progress-circle/ProgressCircle.d.ts +14 -15
- package/dist/components/radio/Radio.d.ts +46 -54
- package/dist/components/scroll-container/ScrollContainer.d.ts +10 -13
- package/dist/components/segmented-control/SegmentedControl.d.ts +20 -29
- package/dist/components/select/Select.d.ts +54 -135
- package/dist/components/select/SelectItem.d.ts +68 -0
- package/dist/components/select/selectContext.d.ts +61 -0
- package/dist/components/skeleton/Skeleton.d.ts +22 -0
- package/dist/components/slider/Slider.d.ts +24 -16
- package/dist/components/smart-filter/SmartFilter.d.ts +105 -0
- package/dist/components/smart-filter/model.d.ts +33 -0
- package/dist/components/spinner/Spinner.d.ts +22 -0
- package/dist/components/stepper/Stepper.d.ts +32 -42
- package/dist/components/switch/Switch.d.ts +19 -37
- package/dist/components/tabs/Tabs.d.ts +65 -38
- package/dist/components/tag-select/TagOptionMenu.d.ts +29 -0
- package/dist/components/tag-select/TagSelect.d.ts +15 -16
- package/dist/components/tag-select/useChipOverflow.d.ts +19 -0
- package/dist/components/textarea/Textarea.d.ts +16 -31
- package/dist/components/thumbnail/Thumbnail.d.ts +41 -0
- package/dist/components/timeline/Timeline.d.ts +46 -61
- package/dist/components/tooltip/Tooltip.d.ts +21 -17
- package/dist/components/typography/Typography.d.ts +5 -21
- package/dist/hooks/useControllableState.d.ts +0 -1
- package/dist/hooks/useEdgeOverflow.d.ts +12 -0
- package/dist/hooks/useEnterConfirm.d.ts +15 -0
- package/dist/hooks/useImageStatus.d.ts +19 -0
- package/dist/hooks/useInertSiblings.d.ts +9 -0
- package/dist/hooks/useMediaQuery.d.ts +7 -0
- package/dist/hooks/useMergedRefs.d.ts +6 -2
- package/dist/hooks/useModalLayer.d.ts +22 -0
- package/dist/hooks/usePosition.d.ts +46 -40
- package/dist/hooks/usePresence.d.ts +0 -1
- package/dist/hooks/useScrollLock.d.ts +3 -5
- package/dist/hooks/useStateSwap.d.ts +8 -0
- package/dist/hooks/useSwipeDismiss.d.ts +34 -0
- package/dist/icons/Icon.d.ts +24 -7
- package/dist/icons/index.d.ts +2 -44
- package/dist/icons/registry.d.ts +85 -0
- package/dist/index.css +7053 -6846
- package/dist/index.d.ts +0 -1
- package/dist/index.js +106 -13830
- package/dist/internal/AnchorRectContext.d.ts +12 -0
- package/dist/internal/ChoiceField.d.ts +34 -0
- package/dist/internal/ControlSizeContext.d.ts +6 -2
- package/dist/internal/FieldFrame.d.ts +47 -8
- package/dist/internal/HighlightMatch.d.ts +13 -0
- package/dist/internal/MenuGroup.d.ts +8 -0
- package/dist/internal/Portal.d.ts +0 -1
- package/dist/internal/VisuallyHidden.d.ts +11 -0
- package/dist/internal/context.d.ts +0 -1
- package/dist/internal/cx.d.ts +0 -1
- package/dist/internal/data-attributes.d.ts +0 -1
- package/dist/internal/fieldClasses.d.ts +9 -0
- package/dist/internal/formatLabel.d.ts +6 -0
- package/dist/internal/highlightTsxHtml.d.ts +1 -2
- package/dist/internal/iconBox.d.ts +9 -0
- package/dist/internal/iconLayout.d.ts +15 -0
- package/dist/internal/imageSlot.d.ts +29 -0
- package/dist/internal/layoutPxFromPrimitives.d.ts +2 -3
- package/dist/internal/listbox.d.ts +40 -0
- package/dist/internal/mergeRefs.d.ts +4 -2
- package/dist/internal/overlay/FloatingPanel.d.ts +36 -0
- package/dist/internal/overlay/focus.d.ts +14 -0
- package/dist/internal/overlay/layerStack.d.ts +41 -0
- package/dist/internal/overlay/useFloatingLayer.d.ts +70 -0
- package/dist/internal/polymorphic.d.ts +9 -0
- package/dist/internal/progressSegments.d.ts +63 -0
- package/dist/internal/rovingFocus.d.ts +18 -0
- package/dist/internal/scrollAncestors.d.ts +1 -2
- package/dist/internal/slot.d.ts +11 -5
- package/dist/internal/states.d.ts +3 -2
- package/dist/internal/swatch.d.ts +56 -0
- package/dist/internal/touchTarget.d.ts +4 -0
- package/dist/layout/app-header/AppHeader.d.ts +110 -0
- package/dist/layout/app-shell/AppShell.d.ts +47 -22
- package/dist/layout/bottom-nav/BottomNav.d.ts +80 -0
- package/dist/layout/index.d.ts +6 -3
- package/dist/layout/sidebar/Sidebar.d.ts +206 -35
- package/dist/theme/applyTheme.d.ts +0 -1
- package/dist/tokens/naming.d.ts +6 -0
- package/dist/tokens/primitives.d.ts +26 -80
- package/dist/tokens/semantic.d.ts +122 -25
- package/dist/tokens/themes/dark.d.ts +7 -1
- package/package.json +30 -24
- package/src/components/accordion/COMPONENT.md +91 -101
- package/src/components/accordion/examples/collapsible.tsx +27 -0
- package/src/components/accordion/examples/controlled.tsx +36 -0
- package/src/components/accordion/examples/examples.module.css +6 -39
- package/src/components/accordion/examples/multiple.tsx +31 -0
- package/src/components/accordion/examples/overview.tsx +39 -0
- package/src/components/accordion/examples/sizes.tsx +14 -25
- package/src/components/accordion/examples/states.tsx +23 -48
- package/src/components/accordion/examples/variants.tsx +35 -0
- package/src/components/accordion/examples/with-icon.tsx +47 -0
- package/src/components/avatar/COMPONENT.md +88 -153
- package/src/components/avatar/examples/examples.module.css +6 -44
- package/src/components/avatar/examples/overview.tsx +18 -0
- package/src/components/avatar/examples/presence.tsx +20 -17
- package/src/components/avatar/examples/sizes.tsx +8 -10
- package/src/components/avatar/examples/src-from-state.tsx +4 -5
- package/src/components/avatar/examples/states.tsx +17 -27
- package/src/components/avatar/examples/team-group.tsx +21 -0
- package/src/components/avatar/examples/variants.tsx +40 -0
- package/src/components/badge/COMPONENT.md +113 -122
- package/src/components/{tag → badge}/examples/applied-filters.tsx +10 -11
- package/src/components/badge/examples/examples.module.css +14 -59
- package/src/components/badge/examples/filter-values.tsx +39 -0
- package/src/components/badge/examples/in-controls.tsx +14 -26
- package/src/components/badge/examples/overview.tsx +13 -0
- package/src/components/badge/examples/sizes.tsx +8 -10
- package/src/components/badge/examples/states.tsx +35 -29
- package/src/components/badge/examples/variants.tsx +27 -36
- package/src/components/badge/examples/with-icon.tsx +50 -0
- package/src/components/banner/COMPONENT.md +89 -94
- package/src/components/banner/examples/dismissible.tsx +38 -0
- package/src/components/banner/examples/examples.module.css +6 -22
- package/src/components/banner/examples/narrow.tsx +23 -0
- package/src/components/banner/examples/overview.tsx +18 -0
- package/src/components/banner/examples/page-strip.tsx +53 -0
- package/src/components/banner/examples/sizes.tsx +22 -21
- package/src/components/banner/examples/structure.tsx +45 -0
- package/src/components/banner/examples/variants.tsx +28 -55
- package/src/components/breadcrumb/COMPONENT.md +55 -59
- package/src/components/breadcrumb/examples/ellipsis.tsx +12 -0
- package/src/components/breadcrumb/examples/examples.module.css +3 -52
- package/src/components/breadcrumb/examples/overflow.tsx +26 -0
- package/src/components/breadcrumb/examples/overview.tsx +12 -0
- package/src/components/breadcrumb/examples/sizes.tsx +11 -14
- package/src/components/breadcrumb/examples/with-icon.tsx +14 -0
- package/src/components/button/COMPONENT.md +65 -66
- package/src/components/button/examples/as-child.tsx +8 -32
- package/src/components/button/examples/examples.module.css +18 -76
- package/src/components/button/examples/in-form.tsx +20 -14
- package/src/components/button/examples/on-colored-host.tsx +29 -0
- package/src/components/button/examples/overview.tsx +13 -0
- package/src/components/button/examples/sizes.tsx +7 -9
- package/src/components/button/examples/states.tsx +18 -28
- package/src/components/button/examples/variants.tsx +31 -0
- package/src/components/button/examples/with-icon.tsx +35 -23
- package/src/components/button-group/COMPONENT.md +64 -55
- package/src/components/button-group/examples/controlled.tsx +3 -3
- package/src/components/button-group/examples/examples.module.css +4 -39
- package/src/components/button-group/examples/full-width.tsx +10 -14
- package/src/components/button-group/examples/in-form.tsx +3 -3
- package/src/components/button-group/examples/orientation.tsx +6 -8
- package/src/components/button-group/examples/overview.tsx +12 -0
- package/src/components/button-group/examples/sizes.tsx +8 -10
- package/src/components/button-group/examples/states.tsx +28 -7
- package/src/components/button-group/examples/with-icon.tsx +45 -0
- package/src/components/card/COMPONENT.md +99 -298
- package/src/components/card/examples/{content.tsx → content-templates.tsx} +23 -29
- package/src/components/card/examples/examples.module.css +0 -8
- package/src/components/card/examples/flat.tsx +9 -14
- package/src/components/card/examples/kpi-media.tsx +42 -0
- package/src/components/card/examples/narrow.tsx +47 -0
- package/src/components/card/examples/{settings.tsx → overview.tsx} +7 -8
- package/src/components/card/examples/panel-chart.tsx +26 -34
- package/src/components/card/examples/{metrics.tsx → variants.tsx} +12 -18
- package/src/components/checkbox/COMPONENT.md +92 -96
- package/src/components/checkbox/examples/controlled.tsx +41 -0
- package/src/components/checkbox/examples/examples.module.css +47 -43
- package/src/components/checkbox/examples/in-form.tsx +34 -0
- package/src/components/checkbox/examples/indicator.tsx +54 -0
- package/src/components/checkbox/examples/overview.tsx +10 -0
- package/src/components/checkbox/examples/sizes.tsx +5 -10
- package/src/components/checkbox/examples/states.tsx +42 -23
- package/src/components/checkbox/examples/without-label.tsx +3 -7
- package/src/components/code-block/COMPONENT.md +55 -57
- package/src/components/code-block/examples/color-scheme.tsx +4 -15
- package/src/components/code-block/examples/examples.module.css +9 -40
- package/src/components/code-block/examples/{long-lines.tsx → narrow.tsx} +3 -4
- package/src/components/code-block/examples/overview.tsx +19 -0
- package/src/components/code-block/examples/variants.tsx +12 -21
- package/src/components/color-picker/COMPONENT.md +196 -165
- package/src/components/color-picker/examples/controlled.tsx +37 -0
- package/src/components/color-picker/examples/examples.module.css +19 -88
- package/src/components/color-picker/examples/formats.tsx +13 -18
- package/src/components/color-picker/examples/in-form.tsx +44 -0
- package/src/components/color-picker/examples/overview.tsx +37 -0
- package/src/components/color-picker/examples/panel.tsx +12 -13
- package/src/components/color-picker/examples/presets-sizes.tsx +15 -20
- package/src/components/color-picker/examples/presets.tsx +33 -0
- package/src/components/color-picker/examples/sizes.tsx +26 -0
- package/src/components/color-picker/examples/states.tsx +4 -14
- package/src/components/color-picker/examples/validation.tsx +18 -0
- package/src/components/color-swatches/COMPONENT.md +145 -0
- package/src/components/color-swatches/examples/controlled.tsx +22 -0
- package/src/components/color-swatches/examples/examples.module.css +19 -0
- package/src/components/color-swatches/examples/in-form.tsx +35 -0
- package/src/components/color-swatches/examples/overview.tsx +6 -0
- package/src/components/color-swatches/examples/sizes.tsx +19 -0
- package/src/components/color-swatches/examples/states.tsx +20 -0
- package/src/components/color-swatches/examples/wrapping.tsx +12 -0
- package/src/components/command-menu/COMPONENT.md +117 -180
- package/src/components/command-menu/examples/controlled-open.tsx +29 -0
- package/src/components/command-menu/examples/controlled.tsx +19 -26
- package/src/components/command-menu/examples/dismiss.tsx +39 -0
- package/src/components/command-menu/examples/overview.tsx +61 -0
- package/src/components/command-menu/examples/sizes.tsx +30 -51
- package/src/components/command-menu/examples/states.tsx +6 -16
- package/src/components/command-menu/examples/structure.tsx +54 -0
- package/src/components/crossfade/COMPONENT.md +104 -0
- package/src/components/crossfade/examples/examples.module.css +65 -0
- package/src/components/crossfade/examples/overview.tsx +102 -0
- package/src/components/crossfade/examples/record-switch.tsx +67 -0
- package/src/components/data-table/COMPONENT.md +181 -182
- package/src/components/data-table/examples/appearance.tsx +31 -34
- package/src/components/data-table/examples/columns-visibility.tsx +167 -0
- package/src/components/data-table/examples/content-width.tsx +46 -26
- package/src/components/data-table/examples/controlled.tsx +56 -0
- package/src/components/data-table/examples/detail-panel.tsx +23 -28
- package/src/components/data-table/examples/examples.module.css +20 -91
- package/src/components/data-table/examples/infinite-scroll.tsx +17 -18
- package/src/components/data-table/examples/narrow.tsx +28 -38
- package/src/components/data-table/examples/nested-rows.tsx +32 -54
- package/src/components/data-table/examples/numeric.tsx +10 -19
- package/src/components/data-table/examples/overview.tsx +54 -0
- package/src/components/data-table/examples/selection.tsx +11 -15
- package/src/components/data-table/examples/sizes.tsx +22 -33
- package/src/components/data-table/examples/states.tsx +23 -24
- package/src/components/data-table/examples/sticky.tsx +17 -24
- package/src/components/data-table/examples/toolbar.tsx +21 -23
- package/src/components/datepicker/COMPONENT.md +152 -164
- package/src/components/datepicker/examples/controlled-open.tsx +32 -0
- package/src/components/datepicker/examples/controlled.tsx +39 -0
- package/src/components/datepicker/examples/examples.module.css +9 -23
- package/src/components/datepicker/examples/in-form.tsx +32 -45
- package/src/components/datepicker/examples/inline-panel.tsx +3 -3
- package/src/components/datepicker/examples/narrow.tsx +1 -1
- package/src/components/datepicker/examples/overview.tsx +6 -0
- package/src/components/datepicker/examples/range-presets.tsx +6 -5
- package/src/components/datepicker/examples/sizes.tsx +7 -10
- package/src/components/datepicker/examples/states.tsx +9 -30
- package/src/components/datepicker/examples/validation.tsx +26 -0
- package/src/components/datepicker/examples/yearless.tsx +9 -8
- package/src/components/digit-input/COMPONENT.md +96 -58
- package/src/components/digit-input/examples/controlled.tsx +6 -15
- package/src/components/digit-input/examples/examples.module.css +13 -38
- package/src/components/digit-input/examples/full-width.tsx +13 -0
- package/src/components/digit-input/examples/grouped.tsx +11 -0
- package/src/components/digit-input/examples/in-form.tsx +32 -0
- package/src/components/digit-input/examples/on-complete.tsx +20 -0
- package/src/components/digit-input/examples/overview.tsx +6 -0
- package/src/components/digit-input/examples/sizes.tsx +5 -17
- package/src/components/digit-input/examples/states.tsx +6 -50
- package/src/components/digit-input/examples/validation.tsx +17 -0
- package/src/components/divider/COMPONENT.md +62 -53
- package/src/components/divider/examples/align.tsx +14 -0
- package/src/components/divider/examples/examples.module.css +6 -20
- package/src/components/divider/examples/or-separator.tsx +19 -0
- package/src/components/divider/examples/overview.tsx +30 -0
- package/src/components/divider/examples/sizes.tsx +11 -10
- package/src/components/divider/examples/vertical.tsx +21 -0
- package/src/components/divider/examples/with-icon.tsx +26 -0
- package/src/components/dnd/COMPONENT.md +197 -0
- package/src/components/dnd/examples/board.tsx +83 -0
- package/src/components/dnd/examples/drop-zones.tsx +82 -0
- package/src/components/dnd/examples/examples.module.css +89 -0
- package/src/components/dnd/examples/handle.tsx +53 -0
- package/src/components/dnd/examples/narrow.tsx +42 -0
- package/src/components/dnd/examples/overview.tsx +45 -0
- package/src/components/drawer/COMPONENT.md +114 -105
- package/src/components/drawer/examples/controlled-open.tsx +33 -0
- package/src/components/drawer/examples/date-sheet.tsx +41 -0
- package/src/components/drawer/examples/dismiss.tsx +55 -0
- package/src/components/drawer/examples/examples.module.css +8 -24
- package/src/components/drawer/examples/in-form.tsx +82 -0
- package/src/components/drawer/examples/long-content.tsx +40 -0
- package/src/components/drawer/examples/overview.tsx +48 -0
- package/src/components/drawer/examples/{variants-sides.tsx → placement.tsx} +13 -14
- package/src/components/drawer/examples/sizes.tsx +9 -15
- package/src/components/drawer/examples/structure.tsx +35 -0
- package/src/components/dropdown/COMPONENT.md +119 -148
- package/src/components/dropdown/examples/checkbox-items.tsx +48 -0
- package/src/components/dropdown/examples/controlled-open.tsx +32 -0
- package/src/components/dropdown/examples/dismiss.tsx +17 -0
- package/src/components/dropdown/examples/examples.module.css +11 -45
- package/src/components/dropdown/examples/long-list.tsx +42 -0
- package/src/components/dropdown/examples/{full-width.tsx → match-trigger-width.tsx} +5 -4
- package/src/components/dropdown/examples/overview.tsx +41 -0
- package/src/components/dropdown/examples/placement.tsx +16 -13
- package/src/components/dropdown/examples/sizes.tsx +18 -15
- package/src/components/dropdown/examples/states.tsx +21 -29
- package/src/components/dropdown/examples/structure.tsx +56 -0
- package/src/components/empty-page/COMPONENT.md +72 -76
- package/src/components/empty-page/examples/compact.tsx +23 -0
- package/src/components/empty-page/examples/data-region.tsx +8 -11
- package/src/components/empty-page/examples/examples.module.css +22 -25
- package/src/components/empty-page/examples/icon-tones.tsx +5 -6
- package/src/components/empty-page/examples/narrow.tsx +26 -0
- package/src/components/empty-page/examples/{no-results.tsx → overview.tsx} +4 -5
- package/src/components/empty-page/examples/sizes.tsx +14 -20
- package/src/components/example-frame/COMPONENT.md +64 -66
- package/src/components/example-frame/examples/controlled.tsx +42 -0
- package/src/components/example-frame/examples/overview.tsx +16 -0
- package/src/components/file-upload/COMPONENT.md +128 -186
- package/src/components/file-upload/examples/avatar-upload.tsx +7 -12
- package/src/components/file-upload/examples/custom-body.tsx +44 -0
- package/src/components/file-upload/examples/examples.module.css +46 -64
- package/src/components/file-upload/examples/in-form.tsx +76 -0
- package/src/components/file-upload/examples/narrow.tsx +17 -0
- package/src/components/file-upload/examples/overview.tsx +52 -0
- package/src/components/file-upload/examples/sizes.tsx +16 -37
- package/src/components/file-upload/examples/states.tsx +6 -98
- package/src/components/file-upload/examples/upload-progress.tsx +39 -0
- package/src/components/file-upload/examples/validation.tsx +19 -0
- package/src/components/file-upload/examples/variants.tsx +5 -18
- package/src/components/hint/COMPONENT.md +42 -48
- package/src/components/hint/examples/examples.module.css +3 -45
- package/src/components/hint/examples/hint-or-error.tsx +5 -5
- package/src/components/hint/examples/overview.tsx +34 -0
- package/src/components/hint/examples/sizes.tsx +8 -10
- package/src/components/hint/examples/states.tsx +21 -14
- package/src/components/hint/examples/with-icon.tsx +31 -0
- package/src/components/input/COMPONENT.md +70 -88
- package/src/components/input/examples/affixes.tsx +22 -0
- package/src/components/input/examples/controlled.tsx +9 -10
- package/src/components/input/examples/examples.module.css +3 -116
- package/src/components/input/examples/in-form.tsx +35 -14
- package/src/components/input/examples/overview.tsx +12 -0
- package/src/components/input/examples/sizes.tsx +6 -11
- package/src/components/input/examples/states.tsx +6 -23
- package/src/components/input/examples/validation.tsx +35 -0
- package/src/components/input/examples/with-icon.tsx +25 -0
- package/src/components/input/examples/{search-without-focus-ring.tsx → without-focus-ring.tsx} +5 -5
- package/src/components/kanban/COMPONENT.md +181 -0
- package/src/components/kanban/examples/controlled.tsx +78 -0
- package/src/components/kanban/examples/examples.module.css +31 -0
- package/src/components/kanban/examples/limits.tsx +58 -0
- package/src/components/kanban/examples/narrow.tsx +76 -0
- package/src/components/kanban/examples/overview.tsx +130 -0
- package/src/components/kanban/examples/states.tsx +75 -0
- package/src/components/kanban/examples/structure.tsx +76 -0
- package/src/components/kbd/COMPONENT.md +50 -65
- package/src/components/kbd/examples/examples.module.css +11 -41
- package/src/components/kbd/examples/in-controls.tsx +25 -31
- package/src/components/kbd/examples/overview.tsx +24 -0
- package/src/components/kbd/examples/shortcut-list.tsx +12 -12
- package/src/components/kbd/examples/sizes.tsx +8 -13
- package/src/components/label/COMPONENT.md +45 -44
- package/src/components/label/examples/examples.module.css +8 -29
- package/src/components/label/examples/overview.tsx +17 -0
- package/src/components/label/examples/sizes.tsx +9 -13
- package/src/components/label/examples/states.tsx +17 -14
- package/src/components/label/examples/structure.tsx +32 -0
- package/src/components/label/examples/with-icon.tsx +25 -17
- package/src/components/link-button/COMPONENT.md +56 -39
- package/src/components/link-button/examples/as-child.tsx +18 -0
- package/src/components/link-button/examples/external-link.tsx +6 -6
- package/src/components/link-button/examples/overview.tsx +11 -0
- package/src/components/link-button/examples/sizes.tsx +9 -11
- package/src/components/link-button/examples/states.tsx +25 -12
- package/src/components/link-button/examples/variants.tsx +21 -0
- package/src/components/link-button/examples/with-icon.tsx +21 -13
- package/src/components/login-form/COMPONENT.md +162 -0
- package/src/components/login-form/examples/examples.module.css +39 -0
- package/src/components/login-form/examples/forgot-password.tsx +39 -0
- package/src/components/login-form/examples/narrow.tsx +32 -0
- package/src/components/login-form/examples/overview.tsx +58 -0
- package/src/components/login-form/examples/register.tsx +85 -0
- package/src/components/login-form/examples/reset-password.tsx +60 -0
- package/src/components/login-form/examples/sizes.tsx +38 -0
- package/src/components/login-form/examples/states.tsx +75 -0
- package/src/components/login-form/examples/structure.tsx +28 -0
- package/src/components/login-form/examples/verification-code.tsx +57 -0
- package/src/components/modal/COMPONENT.md +71 -88
- package/src/components/modal/examples/{controlled.tsx → controlled-open.tsx} +6 -12
- package/src/components/modal/examples/custom-container.tsx +29 -0
- package/src/components/modal/examples/dismiss.tsx +54 -0
- package/src/components/modal/examples/examples.module.css +4 -20
- package/src/components/modal/examples/in-form.tsx +78 -0
- package/src/components/modal/examples/long-content.tsx +52 -0
- package/src/components/modal/examples/overview.tsx +35 -0
- package/src/components/modal/examples/sizes.tsx +7 -9
- package/src/components/modal/examples/structure.tsx +53 -0
- package/src/components/native-select/COMPONENT.md +132 -0
- package/src/components/native-select/examples/controlled.tsx +26 -0
- package/src/components/native-select/examples/examples.module.css +14 -0
- package/src/components/native-select/examples/in-form.tsx +43 -0
- package/src/components/native-select/examples/option-groups.tsx +17 -0
- package/src/components/native-select/examples/overview.tsx +16 -0
- package/src/components/native-select/examples/sizes.tsx +18 -0
- package/src/components/native-select/examples/states.tsx +21 -0
- package/src/components/native-select/examples/validation.tsx +26 -0
- package/src/components/notification/COMPONENT.md +108 -122
- package/src/components/notification/examples/dismiss.tsx +50 -0
- package/src/components/notification/examples/examples.module.css +10 -23
- package/src/components/notification/examples/in-form.tsx +64 -0
- package/src/components/notification/examples/overview.tsx +24 -0
- package/src/components/notification/examples/placement.tsx +66 -0
- package/src/components/notification/examples/sizes.tsx +11 -18
- package/src/components/notification/examples/stacking.tsx +45 -0
- package/src/components/notification/examples/structure.tsx +20 -0
- package/src/components/notification/examples/tones.tsx +14 -26
- package/src/components/page-content/COMPONENT.md +50 -75
- package/src/components/page-content/examples/examples.module.css +4 -8
- package/src/components/page-content/examples/narrow.tsx +25 -0
- package/src/components/page-content/examples/overview.tsx +41 -0
- package/src/components/page-content/examples/variants.tsx +39 -0
- package/src/components/page-toolbar/COMPONENT.md +142 -0
- package/src/components/page-toolbar/examples/examples.module.css +16 -0
- package/src/components/page-toolbar/examples/narrow.tsx +103 -0
- package/src/components/page-toolbar/examples/overview.tsx +113 -0
- package/src/components/page-toolbar/examples/save-changes.tsx +40 -0
- package/src/components/page-toolbar/examples/without-search.tsx +60 -0
- package/src/components/pagination/COMPONENT.md +73 -64
- package/src/components/pagination/examples/controlled.tsx +51 -0
- package/src/components/pagination/examples/examples.module.css +6 -55
- package/src/components/pagination/examples/narrow.tsx +25 -0
- package/src/components/pagination/examples/overflow.tsx +23 -0
- package/src/components/pagination/examples/overview.tsx +6 -0
- package/src/components/pagination/examples/sizes.tsx +10 -18
- package/src/components/popover/COMPONENT.md +89 -99
- package/src/components/popover/examples/controlled-open.tsx +32 -0
- package/src/components/popover/examples/dismiss.tsx +49 -0
- package/src/components/popover/examples/examples.module.css +21 -41
- package/src/components/popover/examples/flush.tsx +47 -0
- package/src/components/popover/examples/in-form.tsx +54 -0
- package/src/components/popover/examples/{full-width.tsx → match-trigger-width.tsx} +7 -7
- package/src/components/popover/examples/overview.tsx +43 -0
- package/src/components/popover/examples/placement.tsx +17 -15
- package/src/components/popover/examples/sizes.tsx +12 -9
- package/src/components/popover/examples/structure.tsx +50 -0
- package/src/components/progress-bar/COMPONENT.md +103 -62
- package/src/components/progress-bar/examples/custom-max.tsx +12 -0
- package/src/components/progress-bar/examples/examples.module.css +4 -34
- package/src/components/progress-bar/examples/overview.tsx +12 -0
- package/src/components/progress-bar/examples/segments.tsx +32 -0
- package/src/components/progress-bar/examples/sizes.tsx +11 -8
- package/src/components/progress-bar/examples/variants.tsx +34 -0
- package/src/components/progress-circle/COMPONENT.md +102 -61
- package/src/components/progress-circle/examples/examples.module.css +2 -39
- package/src/components/progress-circle/examples/inner-content.tsx +35 -0
- package/src/components/progress-circle/examples/overview.tsx +10 -0
- package/src/components/progress-circle/examples/segments.tsx +64 -0
- package/src/components/progress-circle/examples/sizes.tsx +10 -12
- package/src/components/progress-circle/examples/variants.tsx +28 -0
- package/src/components/radio/COMPONENT.md +93 -114
- package/src/components/radio/examples/controlled.tsx +30 -0
- package/src/components/radio/examples/group.tsx +23 -0
- package/src/components/radio/examples/orientation.tsx +34 -0
- package/src/components/radio/examples/overview.tsx +18 -0
- package/src/components/radio/examples/sizes.tsx +7 -12
- package/src/components/radio/examples/states.tsx +42 -30
- package/src/components/scroll-container/COMPONENT.md +57 -29
- package/src/components/scroll-container/examples/edge-fade.tsx +53 -0
- package/src/components/scroll-container/examples/examples.module.css +7 -7
- package/src/components/scroll-container/examples/overscroll.tsx +27 -0
- package/src/components/scroll-container/examples/overview.tsx +27 -0
- package/src/components/scroll-container/examples/variants.tsx +54 -0
- package/src/components/segmented-control/COMPONENT.md +93 -107
- package/src/components/segmented-control/examples/colors.tsx +8 -13
- package/src/components/segmented-control/examples/controlled.tsx +10 -6
- package/src/components/segmented-control/examples/examples.module.css +2 -88
- package/src/components/segmented-control/examples/full-width.tsx +7 -44
- package/src/components/segmented-control/examples/overview.tsx +12 -0
- package/src/components/segmented-control/examples/scroll.tsx +16 -0
- package/src/components/segmented-control/examples/sizes.tsx +8 -20
- package/src/components/segmented-control/examples/states.tsx +28 -34
- package/src/components/segmented-control/examples/two-line.tsx +17 -104
- package/src/components/segmented-control/examples/with-icon.tsx +52 -0
- package/src/components/select/COMPONENT.md +155 -208
- package/src/components/select/examples/clearable.tsx +23 -0
- package/src/components/select/examples/controlled-open.tsx +30 -0
- package/src/components/select/examples/controlled.tsx +17 -10
- package/src/components/select/examples/examples.module.css +18 -38
- package/src/components/select/examples/in-form.tsx +59 -70
- package/src/components/select/examples/multiple.tsx +21 -33
- package/src/components/select/examples/overview.tsx +17 -0
- package/src/components/select/examples/rich-options.tsx +43 -69
- package/src/components/select/examples/searchable.tsx +42 -0
- package/src/components/select/examples/sizes.tsx +13 -17
- package/src/components/select/examples/states.tsx +34 -48
- package/src/components/select/examples/validation.tsx +41 -0
- package/src/components/select/examples/with-icon.tsx +35 -0
- package/src/components/skeleton/COMPONENT.md +104 -0
- package/src/components/skeleton/examples/examples.module.css +89 -0
- package/src/components/skeleton/examples/form.tsx +20 -0
- package/src/components/skeleton/examples/overview.tsx +21 -0
- package/src/components/skeleton/examples/sizes.tsx +24 -0
- package/src/components/skeleton/examples/with-crossfade.tsx +68 -0
- package/src/components/slider/COMPONENT.md +105 -68
- package/src/components/slider/examples/controlled.tsx +26 -30
- package/src/components/slider/examples/examples.module.css +8 -32
- package/src/components/slider/examples/hint-and-error.tsx +33 -0
- package/src/components/slider/examples/overview.tsx +6 -0
- package/src/components/slider/examples/range-step.tsx +7 -17
- package/src/components/slider/examples/sizes.tsx +8 -6
- package/src/components/slider/examples/states.tsx +11 -8
- package/src/components/slider/examples/value-format.tsx +13 -25
- package/src/components/slider/examples/variants.tsx +23 -0
- package/src/components/smart-filter/COMPONENT.md +184 -0
- package/src/components/smart-filter/examples/controlled.tsx +48 -0
- package/src/components/smart-filter/examples/examples.module.css +56 -0
- package/src/components/smart-filter/examples/many-values.tsx +53 -0
- package/src/components/smart-filter/examples/narrow.tsx +38 -0
- package/src/components/smart-filter/examples/overview.tsx +109 -0
- package/src/components/smart-filter/examples/sizes.tsx +33 -0
- package/src/components/spinner/COMPONENT.md +112 -0
- package/src/components/spinner/examples/examples.module.css +20 -0
- package/src/components/spinner/examples/loading-region.tsx +22 -0
- package/src/components/spinner/examples/overview.tsx +15 -0
- package/src/components/spinner/examples/sizes.tsx +19 -0
- package/src/components/spinner/examples/variants.tsx +19 -0
- package/src/components/stepper/COMPONENT.md +83 -78
- package/src/components/stepper/examples/controlled.tsx +46 -0
- package/src/components/stepper/examples/examples.module.css +9 -40
- package/src/components/stepper/examples/narrow.tsx +11 -19
- package/src/components/stepper/examples/orientation.tsx +21 -59
- package/src/components/stepper/examples/overview.tsx +28 -0
- package/src/components/stepper/examples/sizes.tsx +19 -28
- package/src/components/stepper/examples/states.tsx +20 -21
- package/src/components/stepper/examples/with-icon.tsx +29 -0
- package/src/components/switch/COMPONENT.md +75 -94
- package/src/components/switch/examples/controlled.tsx +8 -6
- package/src/components/switch/examples/examples.module.css +13 -45
- package/src/components/switch/examples/in-form.tsx +20 -24
- package/src/components/switch/examples/overview.tsx +10 -0
- package/src/components/switch/examples/settings-row.tsx +14 -22
- package/src/components/switch/examples/sizes.tsx +5 -10
- package/src/components/switch/examples/states.tsx +37 -25
- package/src/components/tabs/COMPONENT.md +156 -86
- package/src/components/tabs/examples/closable.tsx +48 -0
- package/src/components/tabs/examples/controlled.tsx +14 -20
- package/src/components/tabs/examples/examples.module.css +13 -93
- package/src/components/tabs/examples/orientation.tsx +40 -0
- package/src/components/tabs/examples/overflow.tsx +60 -0
- package/src/components/tabs/examples/overview.tsx +30 -0
- package/src/components/tabs/examples/sizes.tsx +19 -19
- package/src/components/tabs/examples/states.tsx +20 -55
- package/src/components/tabs/examples/two-line.tsx +22 -29
- package/src/components/tabs/examples/variants.tsx +40 -0
- package/src/components/tabs/examples/with-icon.tsx +44 -0
- package/src/components/tag-select/COMPONENT.md +119 -122
- package/src/components/tag-select/examples/controlled-open.tsx +29 -0
- package/src/components/tag-select/examples/controlled.tsx +26 -0
- package/src/components/tag-select/examples/creatable.tsx +28 -0
- package/src/components/tag-select/examples/examples.module.css +3 -22
- package/src/components/tag-select/examples/in-form.tsx +44 -41
- package/src/components/tag-select/examples/manage-tags.tsx +20 -39
- package/src/components/tag-select/examples/many-tags.tsx +20 -0
- package/src/components/tag-select/examples/overview.tsx +21 -0
- package/src/components/tag-select/examples/sizes.tsx +7 -10
- package/src/components/tag-select/examples/states.tsx +11 -36
- package/src/components/tag-select/examples/validation.tsx +35 -0
- package/src/components/textarea/COMPONENT.md +50 -50
- package/src/components/textarea/examples/auto-resize.tsx +21 -0
- package/src/components/textarea/examples/controlled.tsx +12 -16
- package/src/components/textarea/examples/examples.module.css +15 -48
- package/src/components/textarea/examples/in-form.tsx +52 -48
- package/src/components/textarea/examples/overview.tsx +12 -0
- package/src/components/textarea/examples/sizes.tsx +6 -7
- package/src/components/textarea/examples/states.tsx +9 -13
- package/src/components/textarea/examples/validation.tsx +34 -0
- package/src/components/textarea/examples/without-focus-ring.tsx +12 -0
- package/src/components/thumbnail/COMPONENT.md +150 -0
- package/src/components/thumbnail/examples/examples.module.css +45 -0
- package/src/components/thumbnail/examples/full-width.tsx +48 -0
- package/src/components/thumbnail/examples/overview.tsx +31 -0
- package/src/components/thumbnail/examples/ratios.tsx +25 -0
- package/src/components/thumbnail/examples/ring.tsx +29 -0
- package/src/components/thumbnail/examples/sizes.tsx +23 -0
- package/src/components/thumbnail/examples/states.tsx +38 -0
- package/src/components/thumbnail/examples/variants.tsx +28 -0
- package/src/components/timeline/COMPONENT.md +92 -203
- package/src/components/timeline/examples/examples.module.css +5 -20
- package/src/components/timeline/examples/links.tsx +28 -0
- package/src/components/timeline/examples/narrow.tsx +30 -38
- package/src/components/timeline/examples/{activity-feed.tsx → overview.tsx} +9 -17
- package/src/components/timeline/examples/sizes.tsx +22 -28
- package/src/components/timeline/examples/{service-history.tsx → structure.tsx} +10 -8
- package/src/components/timeline/examples/{colors-and-tones.tsx → variants.tsx} +11 -16
- package/src/components/tooltip/COMPONENT.md +74 -62
- package/src/components/tooltip/examples/{controlled.tsx → controlled-open.tsx} +5 -7
- package/src/components/tooltip/examples/delay.tsx +19 -28
- package/src/components/tooltip/examples/disabled-trigger.tsx +18 -0
- package/src/components/tooltip/examples/examples.module.css +3 -33
- package/src/components/tooltip/examples/long-content.tsx +12 -15
- package/src/components/tooltip/examples/overview.tsx +17 -0
- package/src/components/tooltip/examples/placement.tsx +30 -0
- package/src/components/tooltip/examples/sizes.tsx +12 -15
- package/src/components/tooltip/examples/toolbar.tsx +35 -0
- package/src/components/typography/COMPONENT.md +68 -99
- package/src/components/typography/examples/article.tsx +23 -36
- package/src/components/typography/examples/examples.module.css +20 -54
- package/src/components/typography/examples/inline-emphasis.tsx +20 -0
- package/src/components/typography/examples/overview.tsx +20 -0
- package/src/components/typography/examples/semantic-tag.tsx +17 -0
- package/src/components/typography/examples/truncate.tsx +7 -7
- package/src/components/typography/examples/variants.tsx +43 -42
- package/src/components/typography/examples/weights.tsx +31 -0
- package/src/layout/app-header/COMPONENT.md +178 -0
- package/src/layout/app-header/examples/breadcrumbs.tsx +36 -0
- package/src/layout/app-header/examples/examples.module.css +47 -0
- package/src/layout/app-header/examples/in-app-shell.tsx +70 -0
- package/src/layout/app-header/examples/narrow.tsx +29 -0
- package/src/layout/app-header/examples/overview.tsx +36 -0
- package/src/layout/app-shell/COMPONENT.md +63 -63
- package/src/layout/app-shell/examples/contained.tsx +5 -5
- package/src/layout/app-shell/examples/examples.module.css +24 -0
- package/src/layout/app-shell/examples/footer.tsx +59 -0
- package/src/layout/app-shell/examples/overview.tsx +83 -0
- package/src/layout/app-shell/examples/template.tsx +54 -0
- package/src/layout/bottom-nav/COMPONENT.md +153 -0
- package/src/layout/bottom-nav/examples/examples.module.css +39 -0
- package/src/layout/bottom-nav/examples/floating.tsx +89 -0
- package/src/layout/bottom-nav/examples/icon-only.tsx +41 -0
- package/src/layout/bottom-nav/examples/in-app-shell.tsx +64 -0
- package/src/layout/bottom-nav/examples/overview.tsx +44 -0
- package/src/layout/bottom-nav/examples/router.tsx +31 -0
- package/src/layout/bottom-nav/examples/structure.tsx +47 -0
- package/src/layout/sidebar/COMPONENT.md +304 -111
- package/src/layout/sidebar/examples/account.tsx +88 -0
- package/src/layout/sidebar/examples/brand-header.tsx +45 -0
- package/src/layout/sidebar/examples/collapsible-groups.tsx +77 -0
- package/src/layout/sidebar/examples/controlled-open.tsx +55 -0
- package/src/layout/sidebar/examples/controlled.tsx +68 -0
- package/src/layout/sidebar/examples/examples.module.css +17 -3
- package/src/layout/sidebar/examples/nested-items.tsx +74 -0
- package/src/layout/sidebar/examples/overview.tsx +126 -0
- package/src/layout/sidebar/examples/router.tsx +19 -13
- package/src/layout/sidebar/examples/sizes.tsx +17 -12
- package/src/layout/sidebar/examples/structure.tsx +81 -0
- package/src/styles/fonts.css +4 -0
- package/src/styles/globals.css +18 -29
- package/src/styles/reset.css +2 -0
- package/src/styles/theme-dark.css +6 -0
- package/src/styles/theme-light.css +58 -23
- package/src/styles/tokens.css +11 -77
- package/dist/components/accordion/Accordion.d.ts.map +0 -1
- package/dist/components/avatar/Avatar.d.ts.map +0 -1
- package/dist/components/badge/Badge.d.ts.map +0 -1
- package/dist/components/badge/tier.d.ts.map +0 -1
- package/dist/components/banner/Banner.d.ts.map +0 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +0 -1
- package/dist/components/button/Button.d.ts.map +0 -1
- package/dist/components/button-group/ButtonGroup.d.ts.map +0 -1
- package/dist/components/card/Card.d.ts.map +0 -1
- package/dist/components/checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/code-block/CodeBlock.d.ts.map +0 -1
- package/dist/components/color-picker/ColorPicker.d.ts.map +0 -1
- package/dist/components/color-picker/ColorPresets.d.ts.map +0 -1
- package/dist/components/command-menu/CommandMenu.d.ts.map +0 -1
- package/dist/components/data-table/DataTable.d.ts.map +0 -1
- package/dist/components/datepicker/Datepicker.d.ts.map +0 -1
- package/dist/components/datepicker/datepickerModel.d.ts.map +0 -1
- package/dist/components/digit-input/DigitInput.d.ts.map +0 -1
- package/dist/components/divider/Divider.d.ts.map +0 -1
- package/dist/components/drawer/Drawer.d.ts.map +0 -1
- package/dist/components/dropdown/Dropdown.d.ts.map +0 -1
- package/dist/components/dropdown/dropdownGeometry.d.ts +0 -10
- package/dist/components/dropdown/dropdownGeometry.d.ts.map +0 -1
- package/dist/components/dropdown/menuKeyboard.d.ts +0 -4
- package/dist/components/dropdown/menuKeyboard.d.ts.map +0 -1
- package/dist/components/dropdown/useDropdownPosition.d.ts +0 -18
- package/dist/components/dropdown/useDropdownPosition.d.ts.map +0 -1
- package/dist/components/empty-page/EmptyPage.d.ts.map +0 -1
- package/dist/components/example-frame/ExampleFrame.d.ts.map +0 -1
- package/dist/components/file-upload/FileUpload.d.ts.map +0 -1
- package/dist/components/hint/Hint.d.ts.map +0 -1
- package/dist/components/index.css +0 -11181
- package/dist/components/index.css.map +0 -7
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -13833
- package/dist/components/index.js.map +0 -7
- package/dist/components/input/Input.d.ts.map +0 -1
- package/dist/components/kbd/Kbd.d.ts.map +0 -1
- package/dist/components/label/Label.d.ts.map +0 -1
- package/dist/components/link-button/LinkButton.d.ts.map +0 -1
- package/dist/components/modal/DialogParts.d.ts.map +0 -1
- package/dist/components/modal/Modal.d.ts.map +0 -1
- package/dist/components/modal/useInertSiblings.d.ts +0 -7
- package/dist/components/modal/useInertSiblings.d.ts.map +0 -1
- package/dist/components/notification/Notification.d.ts.map +0 -1
- package/dist/components/notification/NotificationStore.d.ts.map +0 -1
- package/dist/components/page-content/PageContent.d.ts.map +0 -1
- package/dist/components/pagination/Pagination.d.ts.map +0 -1
- package/dist/components/popover/Popover.d.ts.map +0 -1
- package/dist/components/popover/popoverGeometry.d.ts +0 -6
- package/dist/components/popover/popoverGeometry.d.ts.map +0 -1
- package/dist/components/popover/usePopoverPosition.d.ts +0 -18
- package/dist/components/popover/usePopoverPosition.d.ts.map +0 -1
- package/dist/components/progress-bar/ProgressBar.d.ts.map +0 -1
- package/dist/components/progress-circle/ProgressCircle.d.ts.map +0 -1
- package/dist/components/radio/Radio.d.ts.map +0 -1
- package/dist/components/scroll-container/ScrollContainer.d.ts.map +0 -1
- package/dist/components/segmented-control/SegmentedControl.d.ts.map +0 -1
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +0 -29
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts.map +0 -1
- package/dist/components/select/Select.d.ts.map +0 -1
- package/dist/components/select/selectIcons.d.ts +0 -15
- package/dist/components/select/selectIcons.d.ts.map +0 -1
- package/dist/components/select/selectListbox.d.ts +0 -13
- package/dist/components/select/selectListbox.d.ts.map +0 -1
- package/dist/components/slider/Slider.d.ts.map +0 -1
- package/dist/components/stepper/Stepper.d.ts.map +0 -1
- package/dist/components/switch/Switch.d.ts.map +0 -1
- package/dist/components/tabs/Tabs.d.ts.map +0 -1
- package/dist/components/tag/Tag.d.ts +0 -47
- package/dist/components/tag/Tag.d.ts.map +0 -1
- package/dist/components/tag-select/TagSelect.d.ts.map +0 -1
- package/dist/components/textarea/Textarea.d.ts.map +0 -1
- package/dist/components/timeline/Timeline.d.ts.map +0 -1
- package/dist/components/tooltip/Tooltip.d.ts.map +0 -1
- package/dist/components/typography/Typography.d.ts.map +0 -1
- package/dist/hooks/useControllableState.d.ts.map +0 -1
- package/dist/hooks/useEscapeKey.d.ts +0 -7
- package/dist/hooks/useEscapeKey.d.ts.map +0 -1
- package/dist/hooks/useFieldIds.d.ts +0 -17
- package/dist/hooks/useFieldIds.d.ts.map +0 -1
- package/dist/hooks/useFocusTrap.d.ts +0 -20
- package/dist/hooks/useFocusTrap.d.ts.map +0 -1
- package/dist/hooks/useMergedRefs.d.ts.map +0 -1
- package/dist/hooks/useModalKeyboard.d.ts +0 -14
- package/dist/hooks/useModalKeyboard.d.ts.map +0 -1
- package/dist/hooks/useOutsideClick.d.ts +0 -26
- package/dist/hooks/useOutsideClick.d.ts.map +0 -1
- package/dist/hooks/useOverlayModal.d.ts +0 -7
- package/dist/hooks/useOverlayModal.d.ts.map +0 -1
- package/dist/hooks/usePosition.d.ts.map +0 -1
- package/dist/hooks/usePresence.d.ts.map +0 -1
- package/dist/hooks/useResponsiveMonths.d.ts +0 -18
- package/dist/hooks/useResponsiveMonths.d.ts.map +0 -1
- package/dist/hooks/useScrollLock.d.ts.map +0 -1
- package/dist/icons/Icon.d.ts.map +0 -1
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/index.css.map +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/internal/ControlSizeContext.d.ts.map +0 -1
- package/dist/internal/DividerContentContext.d.ts +0 -4
- package/dist/internal/DividerContentContext.d.ts.map +0 -1
- package/dist/internal/FieldFrame.d.ts.map +0 -1
- package/dist/internal/OverlayPortalLayerContext.d.ts +0 -13
- package/dist/internal/OverlayPortalLayerContext.d.ts.map +0 -1
- package/dist/internal/Portal.d.ts.map +0 -1
- package/dist/internal/context.d.ts.map +0 -1
- package/dist/internal/cx.d.ts.map +0 -1
- package/dist/internal/data-attributes.d.ts.map +0 -1
- package/dist/internal/highlightTsxHtml.d.ts.map +0 -1
- package/dist/internal/layoutPxFromPrimitives.d.ts.map +0 -1
- package/dist/internal/mergeRefs.d.ts.map +0 -1
- package/dist/internal/runtimeUnits.d.ts +0 -3
- package/dist/internal/runtimeUnits.d.ts.map +0 -1
- package/dist/internal/scrollAncestors.d.ts.map +0 -1
- package/dist/internal/slot.d.ts.map +0 -1
- package/dist/internal/states.d.ts.map +0 -1
- package/dist/internal/useFieldDescriptions.d.ts +0 -18
- package/dist/internal/useFieldDescriptions.d.ts.map +0 -1
- package/dist/layout/app-shell/AppShell.d.ts.map +0 -1
- package/dist/layout/index.d.ts.map +0 -1
- package/dist/layout/sidebar/Sidebar.d.ts.map +0 -1
- package/dist/theme/applyTheme.d.ts.map +0 -1
- package/dist/tokens/primitives.d.ts.map +0 -1
- package/dist/tokens/semantic.d.ts.map +0 -1
- package/dist/tokens/themes/dark.d.ts.map +0 -1
- package/dist/tokens/themes/light.d.ts +0 -3
- package/dist/tokens/themes/light.d.ts.map +0 -1
- package/src/components/accordion/examples/checkout.tsx +0 -73
- package/src/components/accordion/examples/layouts.tsx +0 -58
- package/src/components/avatar/examples/colors.tsx +0 -29
- package/src/components/avatar/examples/group.tsx +0 -35
- package/src/components/avatar/examples/team-card.tsx +0 -70
- package/src/components/badge/examples/icons.tsx +0 -37
- package/src/components/badge/examples/order-list.tsx +0 -48
- package/src/components/badge/examples/palette.tsx +0 -44
- package/src/components/badge/examples/surfaces.tsx +0 -21
- package/src/components/banner/examples/dismiss.tsx +0 -48
- package/src/components/banner/examples/placement.tsx +0 -92
- package/src/components/breadcrumb/examples/collapse.tsx +0 -56
- package/src/components/breadcrumb/examples/page-header.tsx +0 -31
- package/src/components/button/examples/composition.tsx +0 -46
- package/src/components/button/examples/controlled.tsx +0 -18
- package/src/components/button/examples/full-width.tsx +0 -15
- package/src/components/button/examples/icon-only.tsx +0 -42
- package/src/components/button/examples/surfaces.tsx +0 -18
- package/src/components/button/examples/variants-tones.tsx +0 -39
- package/src/components/button-group/examples/composition.tsx +0 -99
- package/src/components/card/examples/mini-media.tsx +0 -55
- package/src/components/card/examples/responsive.tsx +0 -72
- package/src/components/checkbox/examples/hint-error.tsx +0 -22
- package/src/components/checkbox/examples/select-all.tsx +0 -40
- package/src/components/checkbox/examples/settings-card.tsx +0 -76
- package/src/components/code-block/examples/api-docs.tsx +0 -31
- package/src/components/code-block/examples/controlled.tsx +0 -38
- package/src/components/code-block/examples/surfaces.tsx +0 -7
- package/src/components/color-picker/examples/brand-color.tsx +0 -73
- package/src/components/color-picker/examples/hex-input-sizes.tsx +0 -54
- package/src/components/color-picker/examples/presets-quick.tsx +0 -57
- package/src/components/color-picker/examples/presets-tags.tsx +0 -52
- package/src/components/command-menu/examples/composition.tsx +0 -91
- package/src/components/command-menu/examples/examples.module.css +0 -9
- package/src/components/command-menu/examples/keyboard-search.tsx +0 -94
- package/src/components/data-table/examples/dashboard.tsx +0 -205
- package/src/components/data-table/examples/sorting-pagination.tsx +0 -66
- package/src/components/datepicker/examples/badge.tsx +0 -19
- package/src/components/datepicker/examples/single.tsx +0 -16
- package/src/components/digit-input/examples/length-and-complete.tsx +0 -30
- package/src/components/digit-input/examples/surfaces.tsx +0 -6
- package/src/components/digit-input/examples/verification-step.tsx +0 -62
- package/src/components/divider/examples/composition.tsx +0 -49
- package/src/components/divider/examples/variants.tsx +0 -62
- package/src/components/drawer/examples/composition.tsx +0 -94
- package/src/components/drawer/examples/controlled.tsx +0 -42
- package/src/components/drawer/examples/features.tsx +0 -48
- package/src/components/drawer/examples/states.tsx +0 -54
- package/src/components/dropdown/examples/as-child.tsx +0 -23
- package/src/components/dropdown/examples/composition.tsx +0 -91
- package/src/components/dropdown/examples/controlled.tsx +0 -32
- package/src/components/dropdown/examples/row-actions.tsx +0 -56
- package/src/components/dropdown/examples/variants.tsx +0 -52
- package/src/components/example-frame/examples/basic.tsx +0 -18
- package/src/components/file-upload/examples/file-list.tsx +0 -67
- package/src/components/file-upload/examples/in-card.tsx +0 -84
- package/src/components/hint/examples/field-states.tsx +0 -60
- package/src/components/hint/examples/in-form.tsx +0 -45
- package/src/components/input/examples/anatomy.tsx +0 -70
- package/src/components/input/examples/control-alignment.tsx +0 -57
- package/src/components/input/examples/full-width.tsx +0 -23
- package/src/components/input/examples/icons-and-affixes.tsx +0 -32
- package/src/components/input/examples/reserved-support-row.tsx +0 -33
- package/src/components/input/examples/surfaces.tsx +0 -12
- package/src/components/input/examples/with-badge.tsx +0 -40
- package/src/components/kbd/examples/modifier-keys.tsx +0 -24
- package/src/components/label/examples/in-form.tsx +0 -39
- package/src/components/label/examples/markers.tsx +0 -27
- package/src/components/link-button/examples/composition.tsx +0 -30
- package/src/components/link-button/examples/examples.module.css +0 -46
- package/src/components/link-button/examples/tones.tsx +0 -15
- package/src/components/modal/examples/composition.tsx +0 -87
- package/src/components/modal/examples/features.tsx +0 -68
- package/src/components/modal/examples/link.tsx +0 -79
- package/src/components/modal/examples/states.tsx +0 -73
- package/src/components/notification/examples/features.tsx +0 -42
- package/src/components/notification/examples/live.tsx +0 -128
- package/src/components/notification/examples/save-form.tsx +0 -59
- package/src/components/page-content/examples/readable.tsx +0 -24
- package/src/components/page-content/examples/settings-page.tsx +0 -49
- package/src/components/page-content/examples/widths.tsx +0 -39
- package/src/components/pagination/examples/compact.tsx +0 -36
- package/src/components/pagination/examples/list-footer.tsx +0 -50
- package/src/components/pagination/examples/states.tsx +0 -44
- package/src/components/popover/examples/as-child.tsx +0 -29
- package/src/components/popover/examples/composition.tsx +0 -45
- package/src/components/popover/examples/controlled.tsx +0 -39
- package/src/components/popover/examples/features.tsx +0 -56
- package/src/components/popover/examples/inset-variants.tsx +0 -58
- package/src/components/popover/examples/states.tsx +0 -48
- package/src/components/progress-bar/examples/file-upload.tsx +0 -52
- package/src/components/progress-bar/examples/values-and-tones.tsx +0 -17
- package/src/components/progress-circle/examples/goals-card.tsx +0 -37
- package/src/components/progress-circle/examples/values-and-tones.tsx +0 -56
- package/src/components/radio/examples/examples.module.css +0 -43
- package/src/components/radio/examples/hint-error.tsx +0 -28
- package/src/components/radio/examples/horizontal.tsx +0 -33
- package/src/components/radio/examples/plan-picker.tsx +0 -55
- package/src/components/scroll-container/examples/both-axes.tsx +0 -57
- package/src/components/scroll-container/examples/list.tsx +0 -44
- package/src/components/segmented-control/examples/item-content.tsx +0 -78
- package/src/components/segmented-control/examples/surfaces.tsx +0 -82
- package/src/components/segmented-control/examples/toolbar.tsx +0 -56
- package/src/components/segmented-progress-bar/COMPONENT.md +0 -128
- package/src/components/segmented-progress-bar/examples/examples.module.css +0 -68
- package/src/components/segmented-progress-bar/examples/segment-gap.tsx +0 -24
- package/src/components/segmented-progress-bar/examples/sizes.tsx +0 -31
- package/src/components/segmented-progress-bar/examples/storage-distribution.tsx +0 -41
- package/src/components/select/examples/native.tsx +0 -21
- package/src/components/select/examples/search-groups.tsx +0 -61
- package/src/components/select/examples/with-badge.tsx +0 -47
- package/src/components/slider/examples/basic.tsx +0 -6
- package/src/components/slider/examples/display-settings.tsx +0 -41
- package/src/components/stepper/examples/wizard.tsx +0 -62
- package/src/components/switch/examples/notification-settings.tsx +0 -37
- package/src/components/switch/examples/on-off.tsx +0 -15
- package/src/components/switch/examples/validation.tsx +0 -19
- package/src/components/tabs/examples/horizontal.tsx +0 -30
- package/src/components/tabs/examples/vertical.tsx +0 -101
- package/src/components/tag/COMPONENT.md +0 -179
- package/src/components/tag/examples/colors.tsx +0 -49
- package/src/components/tag/examples/examples.module.css +0 -47
- package/src/components/tag/examples/sizes.tsx +0 -23
- package/src/components/tag/examples/states.tsx +0 -19
- package/src/components/tag/examples/surfaces.tsx +0 -16
- package/src/components/tag/examples/with-icon.tsx +0 -29
- package/src/components/textarea/examples/height-and-limits.tsx +0 -45
- package/src/components/textarea/examples/hint-and-error.tsx +0 -21
- package/src/components/textarea/examples/reserved-support-row.tsx +0 -37
- package/src/components/textarea/examples/surfaces.tsx +0 -11
- package/src/components/textarea/examples/with-label.tsx +0 -22
- package/src/components/timeline/examples/hover-highlight.tsx +0 -48
- package/src/components/timeline/examples/in-card.tsx +0 -48
- package/src/components/timeline/examples/selectable.tsx +0 -58
- package/src/components/tooltip/examples/composition.tsx +0 -37
- package/src/components/tooltip/examples/side.tsx +0 -29
- package/src/components/tooltip/examples/states.tsx +0 -45
- package/src/components/typography/examples/as-prop.tsx +0 -25
- package/src/components/typography/examples/composition.tsx +0 -23
- package/src/components/typography/examples/full-width.tsx +0 -29
- package/src/components/typography/examples/reading-and-form.tsx +0 -35
- package/src/components/typography/examples/states.tsx +0 -23
- package/src/components/typography/examples/tones.tsx +0 -34
- package/src/components/typography/examples/variant-catalog.tsx +0 -41
- package/src/layout/app-shell/examples/with-sidebar.tsx +0 -63
- package/src/layout/sidebar/examples/modes.tsx +0 -55
- package/src/layout/sidebar/examples/responsive.tsx +0 -44
- package/src/layout/sidebar/examples/states.tsx +0 -34
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Input
|
|
2
2
|
|
|
3
3
|
**Category:** inputs
|
|
4
|
+
**Kind:** field
|
|
4
5
|
|
|
5
|
-
> Single-line text field with label, hint, error and slots for icons, affixes, a
|
|
6
|
+
> Single-line text field with label, hint, error and slots for icons, affixes, a clear button and a counter.
|
|
6
7
|
|
|
7
8
|
## When to use
|
|
8
9
|
- Any single-line value: name, e-mail, phone, search query, amount, URL, code.
|
|
@@ -31,94 +32,96 @@ Input.Root label row, field body, support row; provides size / invali
|
|
|
31
32
|
├─ Input.Icon decorative icon (start | end)
|
|
32
33
|
├─ Input.InlineAffix muted text next to the value (start | end)
|
|
33
34
|
├─ Input.Field native <input>
|
|
34
|
-
|
|
35
|
-
└─ Input.ClearButton trailing clear action
|
|
35
|
+
└─ Input.ClearButton trailing clear action: a full-height segment at the end edge
|
|
36
36
|
Input.Counter goes into Input.Root `counter` (support row, right side)
|
|
37
37
|
```
|
|
38
|
-
The trailing side has a fixed CSS `order`, independent of JSX order: value · end inline affix ·
|
|
38
|
+
The trailing side has a fixed CSS `order`, independent of JSX order: value · end inline affix · end icon · clear button · end affix. All `side="start"` slots share one order before the value, so among them the JSX order decides — write them as affix, icon, inline affix.
|
|
39
39
|
|
|
40
40
|
## API
|
|
41
41
|
|
|
42
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
43
|
+
|
|
42
44
|
### Input.Root
|
|
43
|
-
|
|
45
|
+
`ref` → `HTMLDivElement` (the field frame). Size, label, support row and the context for `Wrapper` and `Field`.
|
|
44
46
|
|
|
45
47
|
| Prop | Type | Default | Description |
|
|
46
48
|
|---|---|---|---|
|
|
47
|
-
| `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `"m"` | Tier for height, padding, radius, text, label and hint. Also provided to nested controls via the control-size context. |
|
|
48
|
-
| `invalid` | `boolean` | `false` | Danger inset ring on the field, `aria-invalid` on the input. A non-empty `error` implies it. |
|
|
49
|
-
| `focusRing` | `boolean` | `true` | `false` hides only the visual focus ring on `Input.Wrapper` (`data-focus-ring="false"`); focus, keyboard, ARIA and the invalid ring stay. |
|
|
49
|
+
| `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `host tier, else "m"` | Tier for height, padding, radius, text, label and hint. Without it the field takes the tier of its host (LoginForm, Popover, a panel with a size), else `m`. Also provided to nested controls via the control-size context. |
|
|
50
50
|
| `label` | `ReactNode` | — | Label above the field, rendered as `<label htmlFor>`. Without it, give `Input.Field` an `aria-label`. |
|
|
51
51
|
| `required` | `boolean` | `false` | Red `*` after the label (`aria-hidden`) and native `required` on `Input.Field`. |
|
|
52
52
|
| `optional` | `boolean` | `false` | Muted marker right after the label text (`labels.optional`). |
|
|
53
53
|
| `hint` | `ReactNode` | — | Help text under the field. Hidden while `error` is shown. |
|
|
54
54
|
| `error` | `ReactNode` | — | Error message in the hint slot; implies `invalid`. |
|
|
55
|
+
| `invalid` | `boolean` | `false` | Danger inset ring on the field, `aria-invalid` on the input. A non-empty `error` implies it. |
|
|
56
|
+
| `focusRing` | `boolean` | `true` | `false` hides only the visual focus ring on `Input.Wrapper` (`data-focus-ring="false"`); focus, keyboard, ARIA and the invalid ring stay. |
|
|
55
57
|
| `counter` | `ReactNode` | — | Right side of the support row, usually `<Input.Counter />`. |
|
|
56
58
|
| `reserveSupportRow` | `boolean` | `false` | Always render the support row (min height = hint line height), so an appearing error does not shift the layout. |
|
|
57
|
-
| `id` | `string` |
|
|
58
|
-
| `labels` | `Partial<InputLabels>` |
|
|
59
|
+
| `id` | `string` | — | Id of the `<input>` (auto-generated when omitted); hint id is `<id>-hint`, error id is `<id>-error`. |
|
|
60
|
+
| `labels` | `Partial<InputLabels>` | — | Built-in strings, see Labels. |
|
|
59
61
|
| `children` | `ReactNode` | — (required) | Usually `Input.Wrapper`. |
|
|
60
|
-
| `
|
|
62
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "id" \| "children" \| "defaultValue" \| "defaultChecked" \| "onChange">` | — | `className`, `data-*` and the other attributes of the field frame `<div>` (field-root rule: `className`, `ref` and the rest → frame, `id` → control). |
|
|
61
63
|
|
|
62
64
|
### Input.Wrapper
|
|
65
|
+
`ref` → `HTMLDivElement`. The visible field: fill, hover, focus ring, invalid ring; `data-size` and `data-invalid` come from the root.
|
|
66
|
+
|
|
63
67
|
| Prop | Type | Default | Description |
|
|
64
68
|
|---|---|---|---|
|
|
65
|
-
| `children` | `ReactNode` | — (required) | Field and slots
|
|
66
|
-
| `
|
|
69
|
+
| `children` | `ReactNode` | — (required) | `Field` and the slots: `Icon`, `Affix`, `InlineAffix`, `ClearButton`. |
|
|
70
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className` and the other attributes of the `<div>`. |
|
|
67
71
|
|
|
68
72
|
### Input.Field
|
|
69
|
-
`
|
|
73
|
+
`ref` → `HTMLInputElement`. The native `<input>`; `id`, `aria-invalid` and `aria-describedby` come from the root.
|
|
70
74
|
|
|
71
75
|
| Prop | Type | Default | Description |
|
|
72
76
|
|---|---|---|---|
|
|
73
77
|
| `onValueChange` | `(value: string) => void` | — | Called with the new string; native `onChange` still fires first. |
|
|
74
78
|
| `aria-describedby` | `string` | — | Merged with the hint/error ids from the root. |
|
|
75
|
-
| `required` | `boolean` |
|
|
76
|
-
|
|
77
|
-
`id`, `aria-invalid` and `aria-describedby` are set from the root context.
|
|
79
|
+
| `required` | `boolean` | — | Overrides the root's `required` for the native input. |
|
|
80
|
+
| `…rest` | `Omit<InputHTMLAttributes<HTMLInputElement>, "size" \| "id">` | — | `value`, `defaultValue`, `onChange`, `type`, `disabled`, `readOnly`, `maxLength`, `placeholder`… |
|
|
78
81
|
|
|
79
82
|
### Input.Icon
|
|
83
|
+
`ref` → `HTMLSpanElement`. Decorative icon (`aria-hidden`), centered between the edge and the text.
|
|
84
|
+
|
|
80
85
|
| Prop | Type | Default | Description |
|
|
81
86
|
|---|---|---|---|
|
|
82
87
|
| `side` | `"start" \| "end"` | — (required) | Side of the value. |
|
|
83
88
|
| `children` | `ReactNode` | — (required) | An icon; kit icons without an explicit `size` take the field tier. |
|
|
84
|
-
| `
|
|
89
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other attributes of the `<span>`. |
|
|
85
90
|
|
|
86
91
|
### Input.Affix
|
|
92
|
+
`ref` → `HTMLDivElement`. Tinted section flush with the edge (`aria-hidden`); the wrapper drops its padding there.
|
|
93
|
+
|
|
87
94
|
| Prop | Type | Default | Description |
|
|
88
95
|
|---|---|---|---|
|
|
89
|
-
| `side` | `"start" \| "end"` | — (required) |
|
|
96
|
+
| `side` | `"start" \| "end"` | — (required) | Edge the section sits on. |
|
|
90
97
|
| `children` | `ReactNode` | — (required) | Static text: protocol, domain, country code. |
|
|
91
|
-
| `
|
|
98
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | — | `className` and the other attributes of the `<div>`. |
|
|
92
99
|
|
|
93
100
|
### Input.InlineAffix
|
|
101
|
+
`ref` → `HTMLSpanElement`. Muted unit next to the value (`aria-hidden`).
|
|
102
|
+
|
|
94
103
|
| Prop | Type | Default | Description |
|
|
95
104
|
|---|---|---|---|
|
|
96
105
|
| `side` | `"start" \| "end"` | — (required) | Side of the value. |
|
|
97
106
|
| `children` | `ReactNode` | — (required) | Short unit: `₽`, `%`, `кг`. |
|
|
98
|
-
| `
|
|
99
|
-
|
|
100
|
-
### Input.Badge
|
|
101
|
-
| Prop | Type | Default | Description |
|
|
102
|
-
|---|---|---|---|
|
|
103
|
-
| `color` | `"gray" \| "blue" \| "green" \| "orange" \| "red" \| "yellow" \| "purple" \| "sky" \| "pink" \| "teal"` | `"gray"` | Palette hue of the soft badge. |
|
|
104
|
-
| `children` | `ReactNode` | — (required) | Short status text. |
|
|
105
|
-
| `className` | `string` | — | Class on the badge. |
|
|
107
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other attributes of the `<span>`. |
|
|
106
108
|
|
|
107
109
|
### Input.ClearButton
|
|
108
|
-
`
|
|
110
|
+
`ref` → `HTMLButtonElement`. A full-height clear segment at the end edge, named by `labels.clear`, with `aria-controls` on the input. Render it only while the field has a value.
|
|
109
111
|
|
|
110
112
|
| Prop | Type | Default | Description |
|
|
111
113
|
|---|---|---|---|
|
|
112
114
|
| `onClick` | `MouseEventHandler<HTMLButtonElement>` | — | Clear the value here. Afterwards focus returns to the input unless `event.preventDefault()` was called. |
|
|
113
|
-
|
|
114
|
-
Renders `type="button"`, `aria-label={labels.clear}`, `aria-controls` = input id, close icon. Render it only when the field has a value.
|
|
115
|
+
| `…rest` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" \| "children" \| "aria-label">` | — | The other button attributes. |
|
|
115
116
|
|
|
116
117
|
### Input.Counter
|
|
118
|
+
`ref` → `HTMLSpanElement`. Character counter for the support row; shows `14/40` and announces `labels.counter`.
|
|
119
|
+
|
|
117
120
|
| Prop | Type | Default | Description |
|
|
118
121
|
|---|---|---|---|
|
|
119
122
|
| `current` | `number` | — (required) | Current length. |
|
|
120
123
|
| `max` | `number` | — (required) | Limit; `current > max` turns the counter danger (`data-invalid="true"`). |
|
|
121
|
-
| `
|
|
124
|
+
| `…rest` | `Omit<HTMLAttributes<HTMLSpanElement>, "children">` | — | `className` and the other attributes of the `<span>`. |
|
|
122
125
|
|
|
123
126
|
## Variants
|
|
124
127
|
Input has no `variant` or `tone`: there is one field treatment (fill, no visible border).
|
|
@@ -132,7 +135,7 @@ Input has no `variant` or `tone`: there is one field treatment (fill, no visible
|
|
|
132
135
|
| `l` | 40 high, text 16/24, padX 12, radius 10, label 14/20, hint 13/20 | Spacious forms, onboarding | |
|
|
133
136
|
| `xl` | 48 high, text 16/24, padX 16, radius 12, label 14/20, hint 13/20 | Hero search, landing forms | |
|
|
134
137
|
|
|
135
|
-
**Sizes:** a field of size T lines up with Button, Select, Datepicker trigger, SegmentedControl and Tabs of size T in one row (same height and radius)
|
|
138
|
+
**Sizes:** a field of size T lines up with Button, Select, Datepicker trigger, SegmentedControl and Tabs of size T in one row (same height and radius). Label and hint always use the same tier as the field.
|
|
136
139
|
|
|
137
140
|
### side (Input.Icon / Input.Affix / Input.InlineAffix)
|
|
138
141
|
| Value | Looks like | Use when | Default |
|
|
@@ -140,34 +143,20 @@ Input has no `variant` or `tone`: there is one field treatment (fill, no visible
|
|
|
140
143
|
| `start` | Before the value. Icon: muted, centered between edge and text (edge → icon = icon → text = field padX). Affix: tinted `fill-subtle` section flush with the edge. Inline affix: muted text before the value | Search icon, `https://`, currency sign before the number | — (required) |
|
|
141
144
|
| `end` | After the value. Same treatments at the trailing side; numeric fields with an end inline affix align the value to the end | Lock icon on read-only, domain suffix, units `₽ % кг` | — |
|
|
142
145
|
|
|
143
|
-
###
|
|
146
|
+
### Flags
|
|
144
147
|
| Value | Looks like | Use when | Default |
|
|
145
148
|
|---|---|---|---|
|
|
146
|
-
| `gray` | Soft badge on a stronger neutral wash (`fill-strong`) so it stays visible on the field fill | Neutral status ("Черновик") | yes |
|
|
147
|
-
| `blue` | Soft blue badge | "Новое", informational marks | |
|
|
148
|
-
| `green` | Soft green badge | "Проверен", verified values | |
|
|
149
|
-
| `orange` | Soft orange badge | "Не заполнено", needs attention | |
|
|
150
|
-
| `red` | Soft red badge | Rejected or blocked value | |
|
|
151
|
-
| `yellow` | Soft yellow badge | Pending | |
|
|
152
|
-
| `purple` | Soft purple badge | Category marks | |
|
|
153
|
-
| `sky` | Soft sky badge | Category marks | |
|
|
154
|
-
| `pink` | Soft pink badge | Category marks | |
|
|
155
|
-
| `teal` | Soft teal badge | Category marks | |
|
|
156
|
-
|
|
157
|
-
### Visual flags
|
|
158
|
-
| Flag | Looks like | Use when | Default |
|
|
159
|
-
|---|---|---|---|
|
|
160
149
|
| `focusRing={false}` | No focus ring; the field still switches to the focus fill, caret visible | A single search field where focus is obvious | `true` |
|
|
161
150
|
| `reserveSupportRow` | Empty support row of hint height under the field | Fields validated on the fly; neighbouring fields in one grid row | `false` |
|
|
162
151
|
| `required` / `optional` | Red `*` / muted «необязательно» after the label | Mark the minority: required when most are optional, optional when most are required | `false` |
|
|
163
152
|
|
|
164
153
|
**Combinations**
|
|
165
154
|
- Recommended: `Input.Icon side="start"` + `Input.ClearButton` for search; `Input.Affix` on both sides for URLs; `Input.InlineAffix side="end"` with `inputMode="decimal"` for amounts.
|
|
166
|
-
- Allowed but rare:
|
|
155
|
+
- Allowed but rare: an end icon together with the clear button (the icon sits before the button).
|
|
167
156
|
- Pointless: `required` and `optional` together; `hint` and `error` together (the error replaces the hint); `invalid` without any message in a form where the user needs to know what is wrong.
|
|
168
157
|
- Forbidden: `focusRing={false}` on regular form fields (WCAG 2.4.7).
|
|
169
158
|
|
|
170
|
-
**Hierarchy:** keep one size for all fields of a form; mark required/optional consistently;
|
|
159
|
+
**Hierarchy:** keep one size for all fields of a form; mark required/optional consistently; a status of the value goes into the hint, not into the field.
|
|
171
160
|
|
|
172
161
|
## States
|
|
173
162
|
| State | Driven by | DOM |
|
|
@@ -190,50 +179,44 @@ Controlled: `value` + `onChange` (or `onValueChange`) on `Input.Field`. Uncontro
|
|
|
190
179
|
- Field → field in a form: `--prime-space-5` (20); group → actions: `--prime-space-8` (32).
|
|
191
180
|
- `Input.Root` is `width: 100%` and `min-width: 0`; there is no `fullWidth` prop — the width comes from the parent (grid column, flex item, capped wrapper).
|
|
192
181
|
- Use `reserveSupportRow` on fields that share a grid row so their bottoms stay aligned when only one shows an error.
|
|
193
|
-
- The value truncates with an ellipsis before
|
|
182
|
+
- The value truncates with an ellipsis before icons and affixes; the field height never changes.
|
|
194
183
|
|
|
195
184
|
## Accessibility
|
|
185
|
+
|
|
186
|
+
### Keyboard
|
|
187
|
+
| Key | Action |
|
|
188
|
+
|---|---|
|
|
189
|
+
| `Tab` | Focuses the field, then the clear button when it is shown. |
|
|
190
|
+
| `Enter` · `Space` | On the clear button: clears the value and returns focus to the field. |
|
|
191
|
+
|
|
192
|
+
### ARIA
|
|
196
193
|
- `label` renders a `<label htmlFor>` bound to the input. Without `label`, set `aria-label` on `Input.Field`. A placeholder never replaces the label.
|
|
197
|
-
- Hint and error are linked through `aria-describedby`; the error replaces the hint
|
|
194
|
+
- Hint and error are linked through `aria-describedby`; the error replaces the hint and sets `aria-invalid="true"`.
|
|
198
195
|
- `Input.Icon`, `Input.Affix`, `Input.InlineAffix` are `aria-hidden`: put the meaning in the label (e.g. "Сумма, ₽").
|
|
199
|
-
- `Input.ClearButton` is a real button
|
|
196
|
+
- `Input.ClearButton` is a real button named by `labels.clear`, with `aria-controls` on the input.
|
|
200
197
|
- `Input.Counter` shows `14/40` visually and announces `labels.counter` through `aria-live="polite"`.
|
|
201
198
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
| `optional` | `"необязательно"` | Marker after the label when `optional` |
|
|
205
|
-
| `clear` | `"Очистить"` | Accessible name of `Input.ClearButton` |
|
|
206
|
-
| `counter` | `"{current} из {max} символов"` | Screen-reader text of `Input.Counter`; `{current}` and `{max}` are replaced |
|
|
199
|
+
### Labels
|
|
200
|
+
<!-- Generated from api.ts by `bun run docs:build`. Edit api.ts, not this section. -->
|
|
207
201
|
|
|
208
|
-
|
|
209
|
-
| File | Scenario | When to use this pattern |
|
|
202
|
+
| Key | Default | Used for |
|
|
210
203
|
|---|---|---|
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
| [states.tsx](examples/states.tsx) | Empty, filled, disabled, read-only, error with text, `invalid` only | Checking all states |
|
|
215
|
-
| [surfaces.tsx](examples/surfaces.tsx) | A plain field whose fill follows the surface | Fields on canvas vs inside cards/overlays |
|
|
216
|
-
| [controlled.tsx](examples/controlled.tsx) | Controlled value, `Input.ClearButton`, `Input.Counter` with an error over the limit | Search and length-limited text |
|
|
217
|
-
| [search-without-focus-ring.tsx](examples/search-without-focus-ring.tsx) | `focusRing={false}` search field | A single search field where focus is obvious |
|
|
218
|
-
| [icons-and-affixes.tsx](examples/icons-and-affixes.tsx) | `Input.Icon`, `Input.Affix` on both sides, `Input.InlineAffix` | E-mail, URL, amount fields |
|
|
219
|
-
| [with-badge.tsx](examples/with-badge.tsx) | `Input.Badge`, `Select.Badge`, `Datepicker.Badge` with palette colors | Marking a value as verified / new / missing |
|
|
220
|
-
| [in-form.tsx](examples/in-form.tsx) | Company details form with required, optional, error and actions | Form spacing reference |
|
|
221
|
-
| [reserved-support-row.tsx](examples/reserved-support-row.tsx) | Toggling an error with `reserveSupportRow`, custom `labels.optional`, explicit `id` | Live validation without layout shift |
|
|
222
|
-
| [full-width.tsx](examples/full-width.tsx) | Capped vs full-width parent | Controlling field width from the layout |
|
|
223
|
-
|
|
224
|
-
```tsx
|
|
225
|
-
import { Input } from "prime-ui-kit";
|
|
204
|
+
| `optional` | `"необязательно"` | Marker after the label when `optional`. |
|
|
205
|
+
| `clear` | `"Очистить"` | Accessible name of `Input.ClearButton`. |
|
|
206
|
+
| `counter` | `"{current} из {max} символов"` | Screen-reader text of `Input.Counter`; `{current}` and `{max}` are replaced. |
|
|
226
207
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
208
|
+
## Examples
|
|
209
|
+
| Example | Shows |
|
|
210
|
+
|---|---|
|
|
211
|
+
| [overview.tsx](examples/overview.tsx) | A labelled field with a hint under it — `label`, `hint`. |
|
|
212
|
+
| [sizes.tsx](examples/sizes.tsx) | Every size tier; the label and the hint follow the field tier — `size`. |
|
|
213
|
+
| [states.tsx](examples/states.tsx) | A default field next to a disabled and a read-only one — `disabled`, `readOnly`. |
|
|
214
|
+
| [validation.tsx](examples/validation.tsx) | Required and optional markers, a hint, an error and a support row that does not shift — `required`, `optional`, `hint`, `error`, `reserveSupportRow`. |
|
|
215
|
+
| [with-icon.tsx](examples/with-icon.tsx) | A decorative icon at either end of the value — `Input.Icon`, `side`. |
|
|
216
|
+
| [affixes.tsx](examples/affixes.tsx) | A fixed prefix and suffix flush with the edges and a unit next to the value — `Input.Affix`, `Input.InlineAffix`. |
|
|
217
|
+
| [without-focus-ring.tsx](examples/without-focus-ring.tsx) | A single search field where the caret and the lighter fill show focus — `focusRing`. |
|
|
218
|
+
| [controlled.tsx](examples/controlled.tsx) | The parent owns the value: a clear button and a character counter follow it — `value`, `onValueChange`, `Input.ClearButton`, `Input.Counter`. |
|
|
219
|
+
| [in-form.tsx](examples/in-form.tsx) | Company details form: required fields checked on submit, neighbours keep their bottoms aligned — `required`, `error`, `reserveSupportRow`. |
|
|
237
220
|
|
|
238
221
|
## Mistakes
|
|
239
222
|
- `<Input.Field placeholder="Email" />` without a label → add `label` on `Input.Root` or `aria-label` on the field.
|
|
@@ -245,6 +228,5 @@ export function EmailField() {
|
|
|
245
228
|
- `tone="danger"` / `error` as a boolean → use `invalid` or an `error` message.
|
|
246
229
|
|
|
247
230
|
## Related
|
|
248
|
-
- [Label](../label/COMPONENT.md), [Hint](../hint/COMPONENT.md)
|
|
249
|
-
- [Textarea](../textarea/COMPONENT.md), [Select](../select/COMPONENT.md), [Datepicker](../datepicker/COMPONENT.md), [TagSelect](../tag-select/COMPONENT.md) — fields with the same contract
|
|
250
|
-
- [Badge](../badge/COMPONENT.md) — what `Input.Badge` renders.
|
|
231
|
+
- **Built from:** [Label](../label/COMPONENT.md) (`label`), [Hint](../hint/COMPONENT.md) (`hint`, `error`), `Icon` (`Input.ClearButton`)
|
|
232
|
+
- **See also:** [Textarea](../textarea/COMPONENT.md), [Select](../select/COMPONENT.md), [Datepicker](../datepicker/COMPONENT.md), [TagSelect](../tag-select/COMPONENT.md) — fields with the same contract
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** A fixed prefix and suffix flush with the edges and a unit next to the value — `Input.Affix`, `Input.InlineAffix`. */
|
|
2
|
+
import { Input } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
export default function InputAffixesExample() {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<Input.Root label="Адрес магазина" hint="Адрес: https://moy-magazin.shop.ru">
|
|
8
|
+
<Input.Wrapper>
|
|
9
|
+
<Input.Affix side="start">https://</Input.Affix>
|
|
10
|
+
<Input.Field placeholder="moy-magazin" />
|
|
11
|
+
<Input.Affix side="end">.shop.ru</Input.Affix>
|
|
12
|
+
</Input.Wrapper>
|
|
13
|
+
</Input.Root>
|
|
14
|
+
<Input.Root label="Сумма платежа, ₽">
|
|
15
|
+
<Input.Wrapper>
|
|
16
|
+
<Input.Field placeholder="0,00" inputMode="decimal" />
|
|
17
|
+
<Input.InlineAffix side="end">₽</Input.InlineAffix>
|
|
18
|
+
</Input.Wrapper>
|
|
19
|
+
</Input.Root>
|
|
20
|
+
</>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** The parent owns the value: a clear button and a character counter follow it — `value`, `onValueChange`, `Input.ClearButton`, `Input.Counter`. */
|
|
2
2
|
import { Icon, Input } from "prime-ui-kit";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const MAX = 60;
|
|
5
|
+
const TITLE_LIMIT = 60;
|
|
8
6
|
|
|
9
7
|
export default function InputControlledExample() {
|
|
10
8
|
const [query, setQuery] = React.useState("");
|
|
11
9
|
const [title, setTitle] = React.useState("Еженедельный отчёт по продажам");
|
|
12
10
|
|
|
13
11
|
return (
|
|
14
|
-
|
|
12
|
+
<>
|
|
15
13
|
<Input.Root label="Поиск по каталогу">
|
|
16
14
|
<Input.Wrapper>
|
|
17
15
|
<Input.Icon side="start">
|
|
18
16
|
<Icon name="action.search" tone="secondary" />
|
|
19
17
|
</Input.Icon>
|
|
20
18
|
<Input.Field
|
|
19
|
+
type="search"
|
|
21
20
|
placeholder="Название или артикул"
|
|
22
21
|
value={query}
|
|
23
|
-
|
|
22
|
+
onValueChange={setQuery}
|
|
24
23
|
/>
|
|
25
24
|
{query ? <Input.ClearButton onClick={() => setQuery("")} /> : null}
|
|
26
25
|
</Input.Wrapper>
|
|
@@ -28,13 +27,13 @@ export default function InputControlledExample() {
|
|
|
28
27
|
<Input.Root
|
|
29
28
|
label="Название отчёта"
|
|
30
29
|
hint="Видно всем участникам"
|
|
31
|
-
error={title.length >
|
|
32
|
-
counter={<Input.Counter current={title.length} max={
|
|
30
|
+
error={title.length > TITLE_LIMIT ? "Сократите название до 60 символов" : undefined}
|
|
31
|
+
counter={<Input.Counter current={title.length} max={TITLE_LIMIT} />}
|
|
33
32
|
>
|
|
34
33
|
<Input.Wrapper>
|
|
35
|
-
<Input.Field value={title}
|
|
34
|
+
<Input.Field value={title} onValueChange={setTitle} />
|
|
36
35
|
</Input.Wrapper>
|
|
37
36
|
</Input.Root>
|
|
38
|
-
|
|
37
|
+
</>
|
|
39
38
|
);
|
|
40
39
|
}
|
|
@@ -1,108 +1,6 @@
|
|
|
1
|
-
/* Layout
|
|
1
|
+
/* Layout of the Input scenarios: semantic tokens only. */
|
|
2
2
|
|
|
3
|
-
/*
|
|
4
|
-
.stack {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: var(--prime-space-3);
|
|
8
|
-
width: 100%;
|
|
9
|
-
min-width: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/* ---- anatomy.tsx: rows are scenarios, columns are sizes xs…xl ---- */
|
|
13
|
-
.anatomyScroller {
|
|
14
|
-
width: 100%;
|
|
15
|
-
min-width: 0;
|
|
16
|
-
overflow-x: auto;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.anatomyGrid {
|
|
20
|
-
display: grid;
|
|
21
|
-
grid-template-columns: repeat(
|
|
22
|
-
5,
|
|
23
|
-
minmax(calc(var(--prime-panel-min-width) - var(--prime-space-8)), 1fr)
|
|
24
|
-
);
|
|
25
|
-
align-items: start;
|
|
26
|
-
column-gap: var(--prime-space-5);
|
|
27
|
-
row-gap: var(--prime-space-4);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* One scenario: its heading and the five cells share the outer columns (subgrid). */
|
|
31
|
-
.anatomyRow {
|
|
32
|
-
grid-column: 1 / -1;
|
|
33
|
-
display: grid;
|
|
34
|
-
grid-template-columns: subgrid;
|
|
35
|
-
align-items: start;
|
|
36
|
-
row-gap: var(--prime-space-2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.anatomyRowHead {
|
|
40
|
-
grid-column: 1 / -1;
|
|
41
|
-
padding-top: var(--prime-space-2);
|
|
42
|
-
border-top: var(--prime-border-width) solid var(--prime-color-border-subtle);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* ---- control-alignment.tsx: one row of controls per size ---- */
|
|
46
|
-
.alignStack {
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
gap: var(--prime-space-5);
|
|
50
|
-
width: 100%;
|
|
51
|
-
min-width: 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.alignRow {
|
|
55
|
-
display: grid;
|
|
56
|
-
grid-template-columns: var(--prime-space-8) repeat(4, minmax(0, max-content));
|
|
57
|
-
align-items: center;
|
|
58
|
-
gap: var(--prime-space-2);
|
|
59
|
-
min-width: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.alignField {
|
|
63
|
-
width: calc(var(--prime-panel-min-width) - var(--prime-space-4));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@media (max-width: 767px) {
|
|
67
|
-
.alignRow {
|
|
68
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.alignSize {
|
|
72
|
-
grid-column: 1 / -1;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.alignField {
|
|
76
|
-
width: auto;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* ---- sizes.tsx: five sizes in one row, field bottoms aligned ---- */
|
|
81
|
-
.sizesRow {
|
|
82
|
-
display: grid;
|
|
83
|
-
grid-template-columns: repeat(
|
|
84
|
-
auto-fit,
|
|
85
|
-
minmax(calc(var(--prime-panel-min-width) - var(--prime-space-12)), 1fr)
|
|
86
|
-
);
|
|
87
|
-
align-items: end;
|
|
88
|
-
gap: var(--prime-space-4);
|
|
89
|
-
width: 100%;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* ---- states.tsx ---- */
|
|
93
|
-
.statesGrid {
|
|
94
|
-
display: grid;
|
|
95
|
-
grid-template-columns: repeat(
|
|
96
|
-
auto-fill,
|
|
97
|
-
minmax(calc(var(--prime-panel-min-width) + var(--prime-space-8)), 1fr)
|
|
98
|
-
);
|
|
99
|
-
align-items: start;
|
|
100
|
-
column-gap: var(--prime-space-6);
|
|
101
|
-
row-gap: var(--prime-space-5);
|
|
102
|
-
width: 100%;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* ---- in-form.tsx: field → field 20, group → actions 32 (foundation §1) ---- */
|
|
3
|
+
/* in-form.tsx: field → field 20, group → actions 32 (foundation §1). */
|
|
106
4
|
.form {
|
|
107
5
|
display: flex;
|
|
108
6
|
flex-direction: column;
|
|
@@ -119,6 +17,7 @@
|
|
|
119
17
|
.formFields {
|
|
120
18
|
display: grid;
|
|
121
19
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
20
|
+
align-items: start;
|
|
122
21
|
gap: var(--prime-space-5) var(--prime-space-4);
|
|
123
22
|
}
|
|
124
23
|
|
|
@@ -137,15 +36,3 @@
|
|
|
137
36
|
grid-template-columns: minmax(0, 1fr);
|
|
138
37
|
}
|
|
139
38
|
}
|
|
140
|
-
|
|
141
|
-
/* ---- full-width.tsx ---- */
|
|
142
|
-
.widthRoot {
|
|
143
|
-
display: grid;
|
|
144
|
-
gap: var(--prime-space-6);
|
|
145
|
-
width: 100%;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.widthNarrow {
|
|
149
|
-
width: 100%;
|
|
150
|
-
max-width: calc(var(--prime-panel-min-width) + var(--prime-space-8));
|
|
151
|
-
}
|
|
@@ -1,47 +1,68 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Company details form: required fields checked on submit, neighbours keep their bottoms aligned — `required`, `error`, `reserveSupportRow`. */
|
|
2
2
|
import { Button, Input, Typography } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
|
|
4
5
|
import styles from "./examples.module.css";
|
|
5
6
|
|
|
7
|
+
type Errors = { name?: string; inn?: string };
|
|
8
|
+
|
|
9
|
+
function validate(form: FormData): Errors {
|
|
10
|
+
const errors: Errors = {};
|
|
11
|
+
if (!String(form.get("name") ?? "").trim()) errors.name = "Укажите название организации";
|
|
12
|
+
if (!/^\d{10}$/.test(String(form.get("inn") ?? ""))) errors.inn = "ИНН состоит из 10 цифр";
|
|
13
|
+
return errors;
|
|
14
|
+
}
|
|
15
|
+
|
|
6
16
|
export default function InputInFormExample() {
|
|
17
|
+
const [errors, setErrors] = React.useState<Errors>({});
|
|
18
|
+
|
|
19
|
+
const submit = (event: React.FormEvent<HTMLFormElement>) => {
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
setErrors(validate(new FormData(event.currentTarget)));
|
|
22
|
+
};
|
|
23
|
+
|
|
7
24
|
return (
|
|
8
|
-
<form className={styles.form} onSubmit={
|
|
25
|
+
<form className={styles.form} noValidate onSubmit={submit}>
|
|
9
26
|
<div className={styles.formHeader}>
|
|
10
|
-
<Typography
|
|
27
|
+
<Typography as="h3" variant="title-m">
|
|
11
28
|
Реквизиты компании
|
|
12
|
-
</Typography
|
|
13
|
-
<Typography
|
|
29
|
+
</Typography>
|
|
30
|
+
<Typography as="p" variant="body-s" tone="secondary">
|
|
14
31
|
Используются в счетах и закрывающих документах.
|
|
15
|
-
</Typography
|
|
32
|
+
</Typography>
|
|
16
33
|
</div>
|
|
17
34
|
<div className={styles.formFields}>
|
|
18
35
|
<div className={styles.formWide}>
|
|
19
|
-
<Input.Root label="Название организации" required>
|
|
36
|
+
<Input.Root label="Название организации" required error={errors.name}>
|
|
20
37
|
<Input.Wrapper>
|
|
21
|
-
<Input.Field
|
|
38
|
+
<Input.Field
|
|
39
|
+
name="name"
|
|
40
|
+
defaultValue="ООО «Северный ветер»"
|
|
41
|
+
autoComplete="organization"
|
|
42
|
+
/>
|
|
22
43
|
</Input.Wrapper>
|
|
23
44
|
</Input.Root>
|
|
24
45
|
</div>
|
|
25
|
-
<Input.Root label="ИНН" required error=
|
|
46
|
+
<Input.Root label="ИНН" required error={errors.inn} reserveSupportRow>
|
|
26
47
|
<Input.Wrapper>
|
|
27
|
-
<Input.Field defaultValue="78123" inputMode="numeric" />
|
|
48
|
+
<Input.Field name="inn" defaultValue="78123" inputMode="numeric" />
|
|
28
49
|
</Input.Wrapper>
|
|
29
50
|
</Input.Root>
|
|
30
51
|
<Input.Root label="КПП" optional reserveSupportRow>
|
|
31
52
|
<Input.Wrapper>
|
|
32
|
-
<Input.Field placeholder="9 цифр" inputMode="numeric" />
|
|
53
|
+
<Input.Field name="kpp" placeholder="9 цифр" inputMode="numeric" />
|
|
33
54
|
</Input.Wrapper>
|
|
34
55
|
</Input.Root>
|
|
35
56
|
<div className={styles.formWide}>
|
|
36
|
-
<Input.Root label="
|
|
57
|
+
<Input.Root label="Почта для счетов" hint="Сюда придут счета и акты">
|
|
37
58
|
<Input.Wrapper>
|
|
38
|
-
<Input.Field type="email" placeholder="buh@company.ru" />
|
|
59
|
+
<Input.Field name="email" type="email" placeholder="buh@company.ru" />
|
|
39
60
|
</Input.Wrapper>
|
|
40
61
|
</Input.Root>
|
|
41
62
|
</div>
|
|
42
63
|
</div>
|
|
43
64
|
<div className={styles.formActions}>
|
|
44
|
-
<Button.Root variant="ghost" tone="neutral" type="reset">
|
|
65
|
+
<Button.Root variant="ghost" tone="neutral" type="reset" onClick={() => setErrors({})}>
|
|
45
66
|
Отменить
|
|
46
67
|
</Button.Root>
|
|
47
68
|
<Button.Root type="submit">Сохранить</Button.Root>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A labelled field with a hint under it — `label`, `hint`. */
|
|
2
|
+
import { Input } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
export default function InputOverviewExample() {
|
|
5
|
+
return (
|
|
6
|
+
<Input.Root label="Рабочая почта" hint="Пришлём ссылку для входа">
|
|
7
|
+
<Input.Wrapper>
|
|
8
|
+
<Input.Field type="email" name="email" placeholder="name@company.ru" autoComplete="email" />
|
|
9
|
+
</Input.Wrapper>
|
|
10
|
+
</Input.Root>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import styles from "./examples.module.css";
|
|
1
|
+
/** Every size tier; the label and the hint follow the field tier — `size`. */
|
|
2
|
+
import { Input } from "prime-ui-kit";
|
|
5
3
|
|
|
6
4
|
const SIZES = ["xs", "s", "m", "l", "xl"] as const;
|
|
7
5
|
|
|
8
6
|
export default function InputSizesExample() {
|
|
9
7
|
return (
|
|
10
|
-
|
|
8
|
+
<>
|
|
11
9
|
{SIZES.map((size) => (
|
|
12
|
-
<Input.Root key={size} size={size} label={
|
|
10
|
+
<Input.Root key={size} size={size} label={size} hint="Пришлём ссылку для входа">
|
|
13
11
|
<Input.Wrapper>
|
|
14
|
-
<Input.
|
|
15
|
-
<Icon name="field.email" tone="secondary" />
|
|
16
|
-
</Input.Icon>
|
|
17
|
-
<Input.Field type="email" placeholder="Почта" />
|
|
12
|
+
<Input.Field type="email" placeholder="name@company.ru" />
|
|
18
13
|
</Input.Wrapper>
|
|
19
14
|
</Input.Root>
|
|
20
15
|
))}
|
|
21
|
-
|
|
16
|
+
</>
|
|
22
17
|
);
|
|
23
18
|
}
|