@arolariu/components 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/EXAMPLES.md +2510 -0
- package/dist/components/ui/alert-dialog.d.ts +4 -16
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +18 -14
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -12
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +18 -15
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/calendar.d.ts +1 -4
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +7 -7
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +125 -59
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox-group.d.ts +2 -6
- package/dist/components/ui/checkbox-group.d.ts.map +1 -1
- package/dist/components/ui/checkbox-group.js +8 -7
- package/dist/components/ui/checkbox-group.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +3 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +4 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/combobox.d.ts +335 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +206 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/combobox.module.js +23 -0
- package/dist/components/ui/combobox.module.js.map +1 -0
- package/dist/components/ui/combobox_module.css +142 -0
- package/dist/components/ui/combobox_module.css.map +1 -0
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +25 -16
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +10 -16
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +28 -20
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/menubar.d.ts +11 -13
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/meter.d.ts +8 -24
- package/dist/components/ui/meter.d.ts.map +1 -1
- package/dist/components/ui/meter.js +23 -19
- package/dist/components/ui/meter.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +3 -12
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +14 -11
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/number-field.d.ts +6 -12
- package/dist/components/ui/number-field.d.ts.map +1 -1
- package/dist/components/ui/number-field.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -4
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +10 -9
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -4
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +3 -3
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scratcher.d.ts +1 -1
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +5 -4
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +2 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -4
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +9 -8
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +5 -4
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -6
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +2 -8
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +12 -10
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toolbar.d.ts +10 -30
- package/dist/components/ui/toolbar.d.ts.map +1 -1
- package/dist/components/ui/toolbar.js +28 -23
- package/dist/components/ui/toolbar.js.map +1 -1
- package/dist/hooks/useClipboard.d.ts +77 -0
- package/dist/hooks/useClipboard.d.ts.map +1 -0
- package/dist/hooks/useClipboard.js +42 -0
- package/dist/hooks/useClipboard.js.map +1 -0
- package/dist/hooks/useControllableState.d.ts +54 -0
- package/dist/hooks/useControllableState.d.ts.map +1 -0
- package/dist/hooks/useControllableState.js +29 -0
- package/dist/hooks/useControllableState.js.map +1 -0
- package/dist/hooks/useDebounce.d.ts +33 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useDebounce.js +20 -0
- package/dist/hooks/useDebounce.js.map +1 -0
- package/dist/hooks/useEventCallback.d.ts +34 -0
- package/dist/hooks/useEventCallback.d.ts.map +1 -0
- package/dist/hooks/useEventCallback.js +12 -0
- package/dist/hooks/useEventCallback.js.map +1 -0
- package/dist/hooks/useId.d.ts +30 -0
- package/dist/hooks/useId.d.ts.map +1 -0
- package/dist/hooks/useId.js +9 -0
- package/dist/hooks/useId.js.map +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +51 -0
- package/dist/hooks/useIntersectionObserver.d.ts.map +1 -0
- package/dist/hooks/useIntersectionObserver.js +25 -0
- package/dist/hooks/useIntersectionObserver.js.map +1 -0
- package/dist/hooks/useInterval.d.ts +55 -0
- package/dist/hooks/useInterval.d.ts.map +1 -0
- package/dist/hooks/useInterval.js +24 -0
- package/dist/hooks/useInterval.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +43 -0
- package/dist/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/hooks/useLocalStorage.js +53 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useMergedRefs.d.ts +27 -0
- package/dist/hooks/useMergedRefs.d.ts.map +1 -0
- package/dist/hooks/useMergedRefs.js +11 -0
- package/dist/hooks/useMergedRefs.js.map +1 -0
- package/dist/hooks/useOnClickOutside.d.ts +32 -0
- package/dist/hooks/useOnClickOutside.d.ts.map +1 -0
- package/dist/hooks/useOnClickOutside.js +23 -0
- package/dist/hooks/useOnClickOutside.js.map +1 -0
- package/dist/hooks/usePrevious.d.ts +33 -0
- package/dist/hooks/usePrevious.d.ts.map +1 -0
- package/dist/hooks/usePrevious.js +14 -0
- package/dist/hooks/usePrevious.js.map +1 -0
- package/dist/hooks/useThrottle.d.ts +37 -0
- package/dist/hooks/useThrottle.d.ts.map +1 -0
- package/dist/hooks/useThrottle.js +34 -0
- package/dist/hooks/useThrottle.js.map +1 -0
- package/dist/hooks/useTimeout.d.ts +28 -0
- package/dist/hooks/useTimeout.d.ts.map +1 -0
- package/dist/hooks/useTimeout.js +24 -0
- package/dist/hooks/useTimeout.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/lib/utilities.d.ts +2 -3
- package/dist/lib/utilities.d.ts.map +1 -1
- package/dist/lib/utilities.js.map +1 -1
- package/dist/motion/tokens.js +5 -5
- package/dist/motion/tokens.js.map +1 -1
- package/dist/rslib-runtime.js +39 -0
- package/dist/rslib-runtime.js.map +1 -0
- package/package.json +82 -3
- package/src/components/ui/alert-dialog.tsx +15 -8
- package/src/components/ui/avatar.tsx +9 -6
- package/src/components/ui/calendar.tsx +7 -13
- package/src/components/ui/carousel.tsx +2 -0
- package/src/components/ui/chart.tsx +63 -60
- package/src/components/ui/checkbox-group.tsx +4 -5
- package/src/components/ui/checkbox.tsx +10 -2
- package/src/components/ui/collapsible.tsx +1 -0
- package/src/components/ui/combobox.module.css +158 -0
- package/src/components/ui/combobox.tsx +569 -0
- package/src/components/ui/command.tsx +31 -15
- package/src/components/ui/context-menu.tsx +3 -0
- package/src/components/ui/drawer.tsx +2 -0
- package/src/components/ui/dropdown-menu.tsx +3 -0
- package/src/components/ui/dropdrawer.tsx +80 -62
- package/src/components/ui/menubar.tsx +9 -10
- package/src/components/ui/meter.tsx +16 -17
- package/src/components/ui/navigation-menu.tsx +41 -33
- package/src/components/ui/number-field.tsx +6 -13
- package/src/components/ui/progress.tsx +3 -2
- package/src/components/ui/radio-group.tsx +2 -5
- package/src/components/ui/resizable.tsx +2 -2
- package/src/components/ui/scratcher.tsx +6 -10
- package/src/components/ui/scroll-area.tsx +2 -5
- package/src/components/ui/separator.tsx +4 -3
- package/src/components/ui/sheet.tsx +3 -0
- package/src/components/ui/sidebar.tsx +1 -0
- package/src/components/ui/sonner.tsx +20 -12
- package/src/components/ui/toggle-group.tsx +6 -4
- package/src/components/ui/toolbar.tsx +20 -21
- package/src/hooks/useClipboard.tsx +137 -0
- package/src/hooks/useControllableState.tsx +81 -0
- package/src/hooks/useDebounce.tsx +50 -0
- package/src/hooks/useEventCallback.tsx +47 -0
- package/src/hooks/useId.tsx +36 -0
- package/src/hooks/useIntersectionObserver.tsx +81 -0
- package/src/hooks/useInterval.tsx +80 -0
- package/src/hooks/useLocalStorage.tsx +111 -0
- package/src/hooks/useMergedRefs.tsx +48 -0
- package/src/hooks/useOnClickOutside.tsx +55 -0
- package/src/hooks/usePrevious.tsx +44 -0
- package/src/hooks/useThrottle.tsx +78 -0
- package/src/hooks/useTimeout.tsx +51 -0
- package/src/index.ts +23 -0
- package/src/lib/utilities.ts +4 -4
- package/src/motion/tokens.ts +4 -4
- package/src/stories/DesignPrinciples.mdx +48 -0
- package/src/stories/GettingStarted.mdx +92 -0
- package/src/stories/Welcome.mdx +44 -0
|
@@ -222,6 +222,7 @@ const ContextMenuSub: typeof BaseContextMenu.SubmenuRoot & {displayName?: string
|
|
|
222
222
|
*/
|
|
223
223
|
const ContextMenuTrigger = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Trigger>, ContextMenuTrigger.Props>(
|
|
224
224
|
(props: Readonly<ContextMenuTrigger.Props>, ref): React.ReactElement => {
|
|
225
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
225
226
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
226
227
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
227
228
|
|
|
@@ -367,6 +368,7 @@ const ContextMenuContent = React.forwardRef<React.ComponentRef<typeof BaseContex
|
|
|
367
368
|
* @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}
|
|
368
369
|
*/
|
|
369
370
|
function ContextMenuItem(props: Readonly<ContextMenuItem.Props>): React.ReactElement {
|
|
371
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
370
372
|
const {asChild = false, children, className, inset = false, render, ...otherProps} = props;
|
|
371
373
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
372
374
|
|
|
@@ -532,6 +534,7 @@ function ContextMenuSeparator(props: Readonly<ContextMenuSeparator.Props>): Reac
|
|
|
532
534
|
* @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}
|
|
533
535
|
*/
|
|
534
536
|
function ContextMenuShortcut(props: Readonly<ContextMenuShortcut.Props>): React.ReactElement {
|
|
537
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
535
538
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
536
539
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
537
540
|
|
|
@@ -258,6 +258,7 @@ const DrawerContent = React.forwardRef<React.ComponentRef<typeof BaseDrawer.Popu
|
|
|
258
258
|
* @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}
|
|
259
259
|
*/
|
|
260
260
|
function DrawerHeader(props: Readonly<DrawerHeader.Props>): React.ReactElement {
|
|
261
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
261
262
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
262
263
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
263
264
|
|
|
@@ -286,6 +287,7 @@ function DrawerHeader(props: Readonly<DrawerHeader.Props>): React.ReactElement {
|
|
|
286
287
|
* @see {@link https://base-ui.com/react/components/drawer | Base UI Documentation}
|
|
287
288
|
*/
|
|
288
289
|
function DrawerFooter(props: Readonly<DrawerFooter.Props>): React.ReactElement {
|
|
290
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
289
291
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
290
292
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
291
293
|
|
|
@@ -222,6 +222,7 @@ const DropdownMenuSub: typeof BaseMenu.SubmenuRoot & {displayName?: string} = Ba
|
|
|
222
222
|
*/
|
|
223
223
|
const DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, DropdownMenuTrigger.Props>(
|
|
224
224
|
(props: Readonly<DropdownMenuTrigger.Props>, ref): React.ReactElement => {
|
|
225
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
225
226
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
226
227
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
227
228
|
|
|
@@ -367,6 +368,7 @@ const DropdownMenuContent = React.forwardRef<React.ComponentRef<typeof BaseMenu.
|
|
|
367
368
|
* @see {@link https://base-ui.com/react/components/menu | Base UI Documentation}
|
|
368
369
|
*/
|
|
369
370
|
function DropdownMenuItem(props: Readonly<DropdownMenuItem.Props>): React.ReactElement {
|
|
371
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
370
372
|
const {asChild = false, children, className, inset = false, render, ...otherProps} = props;
|
|
371
373
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
372
374
|
|
|
@@ -532,6 +534,7 @@ function DropdownMenuSeparator(props: Readonly<DropdownMenuSeparator.Props>): Re
|
|
|
532
534
|
* @see {@link https://base-ui.com/react/components/menu | Base UI Documentation}
|
|
533
535
|
*/
|
|
534
536
|
function DropdownMenuShortcut(props: Readonly<DropdownMenuShortcut.Props>): React.ReactElement {
|
|
537
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
535
538
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
536
539
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
537
540
|
|
|
@@ -37,22 +37,25 @@ const useDropDrawerContext = (): DropDrawerContextValue => {
|
|
|
37
37
|
const Drawer = BaseDrawer.Root;
|
|
38
38
|
const DrawerPortal = BaseDrawer.Portal;
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const DrawerTrigger = React.forwardRef<HTMLButtonElement, React.ComponentPropsWithRef<typeof BaseDrawer.Trigger> & {asChild?: boolean}>(
|
|
41
|
+
function DrawerTrigger(props, forwardedRef) {
|
|
42
|
+
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
43
|
+
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
return (
|
|
46
|
+
<BaseDrawer.Trigger
|
|
47
|
+
{...otherProps}
|
|
48
|
+
ref={forwardedRef}
|
|
49
|
+
render={useRender({
|
|
50
|
+
defaultTagName: "button",
|
|
51
|
+
render: renderProp as never,
|
|
52
|
+
props: mergeProps({className}, {}),
|
|
53
|
+
})}>
|
|
54
|
+
{renderProp ? undefined : children}
|
|
55
|
+
</BaseDrawer.Trigger>
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
);
|
|
56
59
|
|
|
57
60
|
function DrawerOverlay(props: Readonly<React.ComponentPropsWithRef<typeof BaseDrawer.Backdrop>>): React.ReactElement {
|
|
58
61
|
const {className, render, ...otherProps} = props;
|
|
@@ -69,29 +72,30 @@ function DrawerOverlay(props: Readonly<React.ComponentPropsWithRef<typeof BaseDr
|
|
|
69
72
|
);
|
|
70
73
|
}
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
props
|
|
74
|
-
|
|
75
|
-
const {className, children, render, ...otherProps} = props;
|
|
75
|
+
const DrawerContent = React.forwardRef<HTMLDivElement, React.ComponentPropsWithRef<typeof BaseDrawer.Popup> & {children?: React.ReactNode}>(
|
|
76
|
+
function DrawerContent(props, forwardedRef) {
|
|
77
|
+
const {className, children, render, ...otherProps} = props;
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
return (
|
|
80
|
+
<DrawerPortal>
|
|
81
|
+
<DrawerOverlay />
|
|
82
|
+
<BaseDrawer.Viewport className={styles.drawerViewport}>
|
|
83
|
+
<BaseDrawer.Popup
|
|
84
|
+
{...otherProps}
|
|
85
|
+
ref={forwardedRef}
|
|
86
|
+
render={useRender({
|
|
87
|
+
defaultTagName: "div",
|
|
88
|
+
render: render as never,
|
|
89
|
+
props: mergeProps({className: cn(styles.drawerContent, className)}, {}),
|
|
90
|
+
})}>
|
|
91
|
+
<div className={styles.drawerHandle} />
|
|
92
|
+
<BaseDrawer.Content className={styles.drawerInnerContent}>{children}</BaseDrawer.Content>
|
|
93
|
+
</BaseDrawer.Popup>
|
|
94
|
+
</BaseDrawer.Viewport>
|
|
95
|
+
</DrawerPortal>
|
|
96
|
+
);
|
|
97
|
+
},
|
|
98
|
+
);
|
|
95
99
|
|
|
96
100
|
function DrawerHeader(
|
|
97
101
|
props: Readonly<React.ComponentPropsWithRef<"div"> & {render?: useRender.RenderProp<Record<string, never>>}>,
|
|
@@ -136,34 +140,37 @@ function DrawerTitle(props: Readonly<React.ComponentPropsWithRef<typeof BaseDraw
|
|
|
136
140
|
const DropdownMenu = BaseMenu.Root;
|
|
137
141
|
const DropdownMenuSub = BaseMenu.SubmenuRoot;
|
|
138
142
|
|
|
139
|
-
|
|
140
|
-
props
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
143
|
+
const DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, React.ComponentPropsWithRef<typeof BaseMenu.Trigger> & {asChild?: boolean}>(
|
|
144
|
+
function DropdownMenuTrigger(props, forwardedRef) {
|
|
145
|
+
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
146
|
+
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
144
147
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
return (
|
|
149
|
+
<BaseMenu.Trigger
|
|
150
|
+
{...otherProps}
|
|
151
|
+
ref={forwardedRef}
|
|
152
|
+
render={useRender({
|
|
153
|
+
defaultTagName: "button",
|
|
154
|
+
render: renderProp as never,
|
|
155
|
+
props: mergeProps({className}, {}),
|
|
156
|
+
})}>
|
|
157
|
+
{renderProp ? undefined : children}
|
|
158
|
+
</BaseMenu.Trigger>
|
|
159
|
+
);
|
|
160
|
+
},
|
|
161
|
+
);
|
|
157
162
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
const DropdownMenuContent = React.forwardRef<
|
|
164
|
+
HTMLDivElement,
|
|
165
|
+
React.ComponentPropsWithRef<typeof BaseMenu.Positioner> & {children?: React.ReactNode}
|
|
166
|
+
>(function DropdownMenuContent(props, forwardedRef) {
|
|
161
167
|
const {className, children, render, ...otherProps} = props;
|
|
162
168
|
|
|
163
169
|
return (
|
|
164
170
|
<BaseMenu.Portal>
|
|
165
171
|
<BaseMenu.Positioner
|
|
166
172
|
{...otherProps}
|
|
173
|
+
ref={forwardedRef}
|
|
167
174
|
render={useRender({
|
|
168
175
|
defaultTagName: "div",
|
|
169
176
|
props: mergeProps({className: styles.dropdownPositioner}, {}),
|
|
@@ -179,7 +186,7 @@ function DropdownMenuContent(
|
|
|
179
186
|
</BaseMenu.Positioner>
|
|
180
187
|
</BaseMenu.Portal>
|
|
181
188
|
);
|
|
182
|
-
}
|
|
189
|
+
});
|
|
183
190
|
|
|
184
191
|
interface DropdownMenuItemProps extends React.ComponentPropsWithRef<typeof BaseMenu.Item> {
|
|
185
192
|
/** @deprecated Prefer Base UI's `render` prop. */
|
|
@@ -192,6 +199,7 @@ interface DropdownMenuItemProps extends React.ComponentPropsWithRef<typeof BaseM
|
|
|
192
199
|
}
|
|
193
200
|
|
|
194
201
|
function DropdownMenuItem(props: Readonly<DropdownMenuItemProps>): React.ReactElement {
|
|
202
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
195
203
|
const {asChild = false, children, className, inset = false, render, ...otherProps} = props;
|
|
196
204
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
197
205
|
|
|
@@ -408,11 +416,15 @@ function DropDrawer({children, ...props}: DropDrawerRootProps): React.JSX.Elemen
|
|
|
408
416
|
*
|
|
409
417
|
* @see {@link https://base-ui.com/react/components/drawer | Base UI Drawer Docs}
|
|
410
418
|
*/
|
|
411
|
-
|
|
419
|
+
const DropDrawerTrigger = React.forwardRef<HTMLButtonElement, DropDrawerTriggerProps>(function DropDrawerTrigger(
|
|
420
|
+
{className, children, ...props},
|
|
421
|
+
forwardedRef,
|
|
422
|
+
) {
|
|
412
423
|
const {isMobile} = useDropDrawerContext();
|
|
413
424
|
|
|
414
425
|
return isMobile ? (
|
|
415
426
|
<DrawerTrigger
|
|
427
|
+
ref={forwardedRef}
|
|
416
428
|
data-slot='drop-drawer-trigger'
|
|
417
429
|
className={className}
|
|
418
430
|
{...(props as React.ComponentProps<typeof DrawerTrigger>)}>
|
|
@@ -420,13 +432,14 @@ function DropDrawerTrigger({className, children, ...props}: DropDrawerTriggerPro
|
|
|
420
432
|
</DrawerTrigger>
|
|
421
433
|
) : (
|
|
422
434
|
<DropdownMenuTrigger
|
|
435
|
+
ref={forwardedRef}
|
|
423
436
|
data-slot='drop-drawer-trigger'
|
|
424
437
|
className={className}
|
|
425
438
|
{...(props as React.ComponentProps<typeof DropdownMenuTrigger>)}>
|
|
426
439
|
{children}
|
|
427
440
|
</DropdownMenuTrigger>
|
|
428
441
|
);
|
|
429
|
-
}
|
|
442
|
+
});
|
|
430
443
|
|
|
431
444
|
/**
|
|
432
445
|
* Renders the responsive dropdown or drawer content surface.
|
|
@@ -444,7 +457,10 @@ function DropDrawerTrigger({className, children, ...props}: DropDrawerTriggerPro
|
|
|
444
457
|
*
|
|
445
458
|
* @see {@link https://base-ui.com/react/components/menu | Base UI Menu Docs}
|
|
446
459
|
*/
|
|
447
|
-
|
|
460
|
+
const DropDrawerContent = React.forwardRef<HTMLDivElement, DropDrawerContentProps>(function DropDrawerContent(
|
|
461
|
+
{className, children, ...props},
|
|
462
|
+
forwardedRef,
|
|
463
|
+
) {
|
|
448
464
|
const {isMobile} = useDropDrawerContext();
|
|
449
465
|
const [activeSubmenu, setActiveSubmenu] = React.useState<string | null>(null);
|
|
450
466
|
const [submenuTitle, setSubmenuTitle] = React.useState<string | null>(null);
|
|
@@ -594,6 +610,7 @@ function DropDrawerContent({className, children, ...props}: DropDrawerContentPro
|
|
|
594
610
|
submenuTitle,
|
|
595
611
|
}}>
|
|
596
612
|
<DrawerContent
|
|
613
|
+
ref={forwardedRef}
|
|
597
614
|
data-slot='drop-drawer-content'
|
|
598
615
|
className={cn(styles.mobileContent, className)}
|
|
599
616
|
{...(props as React.ComponentProps<typeof DrawerContent>)}>
|
|
@@ -670,6 +687,7 @@ function DropDrawerContent({className, children, ...props}: DropDrawerContentPro
|
|
|
670
687
|
submenuTitle,
|
|
671
688
|
}}>
|
|
672
689
|
<DropdownMenuContent
|
|
690
|
+
ref={forwardedRef}
|
|
673
691
|
data-slot='drop-drawer-content'
|
|
674
692
|
align='end'
|
|
675
693
|
sideOffset={4}
|
|
@@ -679,7 +697,7 @@ function DropDrawerContent({className, children, ...props}: DropDrawerContentPro
|
|
|
679
697
|
</DropdownMenuContent>
|
|
680
698
|
</SubmenuContext.Provider>
|
|
681
699
|
);
|
|
682
|
-
}
|
|
700
|
+
});
|
|
683
701
|
|
|
684
702
|
/**
|
|
685
703
|
* Renders an actionable item inside the drop drawer surface.
|
|
@@ -10,14 +10,6 @@ import * as React from "react";
|
|
|
10
10
|
import {cn} from "@/lib/utilities";
|
|
11
11
|
import styles from "./menubar.module.css";
|
|
12
12
|
|
|
13
|
-
type MenubarProps = Omit<React.ComponentPropsWithRef<typeof BaseMenubar>, "className"> & {className?: string};
|
|
14
|
-
interface MenubarTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseMenu.Trigger>, "className"> {
|
|
15
|
-
/**
|
|
16
|
-
* Applies additional CSS classes to the component root element.
|
|
17
|
-
* @default undefined
|
|
18
|
-
*/
|
|
19
|
-
className?: string;
|
|
20
|
-
}
|
|
21
13
|
interface MenubarSubTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseMenu.SubmenuTrigger>, "className"> {
|
|
22
14
|
/**
|
|
23
15
|
* Applies additional CSS classes to the component root element.
|
|
@@ -540,6 +532,7 @@ function MenubarSeparator(props: Readonly<MenubarSeparator.Props>): React.ReactE
|
|
|
540
532
|
* @see {@link https://base-ui.com/react/components/menubar | Base UI Documentation}
|
|
541
533
|
*/
|
|
542
534
|
function MenubarShortcut(props: Readonly<MenubarShortcut.Props>): React.ReactElement {
|
|
535
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
543
536
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
544
537
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
545
538
|
|
|
@@ -554,13 +547,19 @@ function MenubarShortcut(props: Readonly<MenubarShortcut.Props>): React.ReactEle
|
|
|
554
547
|
|
|
555
548
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
556
549
|
namespace Menubar {
|
|
557
|
-
export type Props =
|
|
550
|
+
export type Props = Omit<React.ComponentPropsWithRef<typeof BaseMenubar>, "className"> & {className?: string};
|
|
558
551
|
export type State = BaseMenubar.State;
|
|
559
552
|
}
|
|
560
553
|
|
|
561
554
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
562
555
|
namespace MenubarTrigger {
|
|
563
|
-
export type Props =
|
|
556
|
+
export type Props = Omit<React.ComponentPropsWithRef<typeof BaseMenu.Trigger>, "className"> & {
|
|
557
|
+
/**
|
|
558
|
+
* Applies additional CSS classes to the component root element.
|
|
559
|
+
* @default undefined
|
|
560
|
+
*/
|
|
561
|
+
className?: string;
|
|
562
|
+
};
|
|
564
563
|
export type State = BaseMenu.Trigger.State;
|
|
565
564
|
}
|
|
566
565
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
@@ -8,11 +8,6 @@ import * as React from "react";
|
|
|
8
8
|
import {cn} from "@/lib/utilities";
|
|
9
9
|
import styles from "./meter.module.css";
|
|
10
10
|
|
|
11
|
-
type MeterProps = React.ComponentPropsWithRef<typeof BaseMeter.Root>;
|
|
12
|
-
type MeterTrackProps = React.ComponentPropsWithRef<typeof BaseMeter.Track>;
|
|
13
|
-
type MeterIndicatorProps = React.ComponentPropsWithRef<typeof BaseMeter.Indicator>;
|
|
14
|
-
type MeterLabelProps = React.ComponentPropsWithRef<typeof BaseMeter.Label>;
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* Displays a scalar measurement within a known range.
|
|
18
13
|
*
|
|
@@ -32,12 +27,13 @@ type MeterLabelProps = React.ComponentPropsWithRef<typeof BaseMeter.Label>;
|
|
|
32
27
|
*
|
|
33
28
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
34
29
|
*/
|
|
35
|
-
|
|
30
|
+
const Meter = React.forwardRef<HTMLDivElement, Meter.Props>(function Meter(props, forwardedRef) {
|
|
36
31
|
const {className, children, render, ...otherProps} = props;
|
|
37
32
|
|
|
38
33
|
return (
|
|
39
34
|
<BaseMeter.Root
|
|
40
35
|
{...otherProps}
|
|
36
|
+
ref={forwardedRef}
|
|
41
37
|
render={useRender({
|
|
42
38
|
defaultTagName: "div",
|
|
43
39
|
render: render as never,
|
|
@@ -46,7 +42,7 @@ function Meter(props: Readonly<Meter.Props>): React.ReactElement {
|
|
|
46
42
|
{children}
|
|
47
43
|
</BaseMeter.Root>
|
|
48
44
|
);
|
|
49
|
-
}
|
|
45
|
+
});
|
|
50
46
|
|
|
51
47
|
/**
|
|
52
48
|
* Renders the background track for a meter.
|
|
@@ -62,12 +58,13 @@ function Meter(props: Readonly<Meter.Props>): React.ReactElement {
|
|
|
62
58
|
*
|
|
63
59
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
64
60
|
*/
|
|
65
|
-
|
|
61
|
+
const MeterTrack = React.forwardRef<HTMLDivElement, MeterTrack.Props>(function MeterTrack(props, forwardedRef) {
|
|
66
62
|
const {className, children, render, ...otherProps} = props;
|
|
67
63
|
|
|
68
64
|
return (
|
|
69
65
|
<BaseMeter.Track
|
|
70
66
|
{...otherProps}
|
|
67
|
+
ref={forwardedRef}
|
|
71
68
|
render={useRender({
|
|
72
69
|
defaultTagName: "div",
|
|
73
70
|
render: render as never,
|
|
@@ -76,7 +73,7 @@ function MeterTrack(props: Readonly<MeterTrack.Props>): React.ReactElement {
|
|
|
76
73
|
{children}
|
|
77
74
|
</BaseMeter.Track>
|
|
78
75
|
);
|
|
79
|
-
}
|
|
76
|
+
});
|
|
80
77
|
|
|
81
78
|
/**
|
|
82
79
|
* Renders the filled indicator that reflects the current meter value.
|
|
@@ -92,12 +89,13 @@ function MeterTrack(props: Readonly<MeterTrack.Props>): React.ReactElement {
|
|
|
92
89
|
*
|
|
93
90
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
94
91
|
*/
|
|
95
|
-
|
|
92
|
+
const MeterIndicator = React.forwardRef<HTMLDivElement, MeterIndicator.Props>(function MeterIndicator(props, forwardedRef) {
|
|
96
93
|
const {className, children, render, ...otherProps} = props;
|
|
97
94
|
|
|
98
95
|
return (
|
|
99
96
|
<BaseMeter.Indicator
|
|
100
97
|
{...otherProps}
|
|
98
|
+
ref={forwardedRef}
|
|
101
99
|
render={useRender({
|
|
102
100
|
defaultTagName: "div",
|
|
103
101
|
render: render as never,
|
|
@@ -106,7 +104,7 @@ function MeterIndicator(props: Readonly<MeterIndicator.Props>): React.ReactEleme
|
|
|
106
104
|
{children}
|
|
107
105
|
</BaseMeter.Indicator>
|
|
108
106
|
);
|
|
109
|
-
}
|
|
107
|
+
});
|
|
110
108
|
|
|
111
109
|
/**
|
|
112
110
|
* Renders the accessible label associated with a meter.
|
|
@@ -122,12 +120,13 @@ function MeterIndicator(props: Readonly<MeterIndicator.Props>): React.ReactEleme
|
|
|
122
120
|
*
|
|
123
121
|
* @see {@link https://base-ui.com/react/components/meter | Base UI Meter Docs}
|
|
124
122
|
*/
|
|
125
|
-
|
|
123
|
+
const MeterLabel = React.forwardRef<HTMLSpanElement, MeterLabel.Props>(function MeterLabel(props, forwardedRef) {
|
|
126
124
|
const {className, children, render, ...otherProps} = props;
|
|
127
125
|
|
|
128
126
|
return (
|
|
129
127
|
<BaseMeter.Label
|
|
130
128
|
{...otherProps}
|
|
129
|
+
ref={forwardedRef}
|
|
131
130
|
render={useRender({
|
|
132
131
|
defaultTagName: "span",
|
|
133
132
|
render: render as never,
|
|
@@ -136,29 +135,29 @@ function MeterLabel(props: Readonly<MeterLabel.Props>): React.ReactElement {
|
|
|
136
135
|
{children}
|
|
137
136
|
</BaseMeter.Label>
|
|
138
137
|
);
|
|
139
|
-
}
|
|
138
|
+
});
|
|
140
139
|
|
|
141
140
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
142
141
|
namespace Meter {
|
|
143
|
-
export type Props =
|
|
142
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Root>;
|
|
144
143
|
export type State = BaseMeter.Root.State;
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
148
147
|
namespace MeterTrack {
|
|
149
|
-
export type Props =
|
|
148
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Track>;
|
|
150
149
|
export type State = BaseMeter.Track.State;
|
|
151
150
|
}
|
|
152
151
|
|
|
153
152
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
154
153
|
namespace MeterIndicator {
|
|
155
|
-
export type Props =
|
|
154
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Indicator>;
|
|
156
155
|
export type State = BaseMeter.Indicator.State;
|
|
157
156
|
}
|
|
158
157
|
|
|
159
158
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
160
159
|
namespace MeterLabel {
|
|
161
|
-
export type Props =
|
|
160
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseMeter.Label>;
|
|
162
161
|
export type State = BaseMeter.Label.State;
|
|
163
162
|
}
|
|
164
163
|
|
|
@@ -176,22 +176,25 @@ const NavigationMenuItem = BaseNavigationMenu.Item;
|
|
|
176
176
|
*
|
|
177
177
|
* @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}
|
|
178
178
|
*/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
render
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
179
|
+
const NavigationMenuTrigger = React.forwardRef<HTMLButtonElement, NavigationMenuTrigger.Props>(
|
|
180
|
+
function NavigationMenuTrigger(props, forwardedRef) {
|
|
181
|
+
const {className, children, render, ...otherProps} = props;
|
|
182
|
+
|
|
183
|
+
return (
|
|
184
|
+
<BaseNavigationMenu.Trigger
|
|
185
|
+
{...otherProps}
|
|
186
|
+
ref={forwardedRef}
|
|
187
|
+
render={useRender({
|
|
188
|
+
defaultTagName: "button",
|
|
189
|
+
render: render as never,
|
|
190
|
+
props: mergeProps({className: cn(styles.trigger, className)}, {}),
|
|
191
|
+
})}>
|
|
192
|
+
{children}
|
|
193
|
+
<ChevronDown className={styles.triggerIcon} />
|
|
194
|
+
</BaseNavigationMenu.Trigger>
|
|
195
|
+
);
|
|
196
|
+
},
|
|
197
|
+
);
|
|
195
198
|
|
|
196
199
|
/**
|
|
197
200
|
* Renders the navigation menu content.
|
|
@@ -208,21 +211,24 @@ function NavigationMenuTrigger(props: Readonly<NavigationMenuTrigger.Props>): Re
|
|
|
208
211
|
*
|
|
209
212
|
* @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}
|
|
210
213
|
*/
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
render
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
214
|
+
const NavigationMenuContent = React.forwardRef<HTMLDivElement, NavigationMenuContent.Props>(
|
|
215
|
+
function NavigationMenuContent(props, forwardedRef) {
|
|
216
|
+
const {className, children, render, ...otherProps} = props;
|
|
217
|
+
|
|
218
|
+
return (
|
|
219
|
+
<BaseNavigationMenu.Content
|
|
220
|
+
{...otherProps}
|
|
221
|
+
ref={forwardedRef}
|
|
222
|
+
render={useRender({
|
|
223
|
+
defaultTagName: "div",
|
|
224
|
+
render: render as never,
|
|
225
|
+
props: mergeProps({className: cn(styles.content, className)}, {}),
|
|
226
|
+
})}>
|
|
227
|
+
{children}
|
|
228
|
+
</BaseNavigationMenu.Content>
|
|
229
|
+
);
|
|
230
|
+
},
|
|
231
|
+
);
|
|
226
232
|
|
|
227
233
|
/**
|
|
228
234
|
* Renders the navigation menu link.
|
|
@@ -239,12 +245,13 @@ function NavigationMenuContent(props: Readonly<NavigationMenuContent.Props>): Re
|
|
|
239
245
|
*
|
|
240
246
|
* @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}
|
|
241
247
|
*/
|
|
242
|
-
|
|
248
|
+
const NavigationMenuLink = React.forwardRef<HTMLAnchorElement, NavigationMenuLink.Props>(function NavigationMenuLink(props, forwardedRef) {
|
|
243
249
|
const {className, children, render, ...otherProps} = props;
|
|
244
250
|
|
|
245
251
|
return (
|
|
246
252
|
<BaseNavigationMenu.Link
|
|
247
253
|
{...otherProps}
|
|
254
|
+
ref={forwardedRef}
|
|
248
255
|
render={useRender({
|
|
249
256
|
defaultTagName: "a",
|
|
250
257
|
render: render as never,
|
|
@@ -253,7 +260,7 @@ function NavigationMenuLink(props: Readonly<NavigationMenuLink.Props>): React.Re
|
|
|
253
260
|
{children}
|
|
254
261
|
</BaseNavigationMenu.Link>
|
|
255
262
|
);
|
|
256
|
-
}
|
|
263
|
+
});
|
|
257
264
|
|
|
258
265
|
/**
|
|
259
266
|
* Renders the navigation menu viewport.
|
|
@@ -318,6 +325,7 @@ function NavigationMenuViewport(props: Readonly<NavigationMenuViewport.Props>):
|
|
|
318
325
|
* @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Documentation}
|
|
319
326
|
*/
|
|
320
327
|
function NavigationMenuIndicator(props: Readonly<NavigationMenuIndicator.Props>): React.ReactElement {
|
|
328
|
+
// eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
|
|
321
329
|
const {asChild = false, children, className, render, ...otherProps} = props;
|
|
322
330
|
const renderProp = asChild && React.isValidElement(children) ? children : render;
|
|
323
331
|
|
|
@@ -8,13 +8,6 @@ import * as React from "react";
|
|
|
8
8
|
import {cn} from "@/lib/utilities";
|
|
9
9
|
import styles from "./number-field.module.css";
|
|
10
10
|
|
|
11
|
-
type NumberFieldProps = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;
|
|
12
|
-
type NumberFieldGroupProps = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;
|
|
13
|
-
type NumberFieldInputProps = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;
|
|
14
|
-
type NumberFieldIncrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;
|
|
15
|
-
type NumberFieldDecrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;
|
|
16
|
-
type NumberFieldScrubAreaProps = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;
|
|
17
|
-
|
|
18
11
|
/**
|
|
19
12
|
* Provides a styled numeric input with optional steppers and scrub support.
|
|
20
13
|
*
|
|
@@ -210,37 +203,37 @@ function NumberFieldScrubArea(props: Readonly<NumberFieldScrubArea.Props>): Reac
|
|
|
210
203
|
|
|
211
204
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
212
205
|
namespace NumberField {
|
|
213
|
-
export type Props =
|
|
206
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;
|
|
214
207
|
export type State = BaseNumberField.Root.State;
|
|
215
208
|
}
|
|
216
209
|
|
|
217
210
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
218
211
|
namespace NumberFieldGroup {
|
|
219
|
-
export type Props =
|
|
212
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;
|
|
220
213
|
export type State = BaseNumberField.Group.State;
|
|
221
214
|
}
|
|
222
215
|
|
|
223
216
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
224
217
|
namespace NumberFieldInput {
|
|
225
|
-
export type Props =
|
|
218
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;
|
|
226
219
|
export type State = BaseNumberField.Input.State;
|
|
227
220
|
}
|
|
228
221
|
|
|
229
222
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
230
223
|
namespace NumberFieldIncrement {
|
|
231
|
-
export type Props =
|
|
224
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;
|
|
232
225
|
export type State = BaseNumberField.Increment.State;
|
|
233
226
|
}
|
|
234
227
|
|
|
235
228
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
236
229
|
namespace NumberFieldDecrement {
|
|
237
|
-
export type Props =
|
|
230
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;
|
|
238
231
|
export type State = BaseNumberField.Decrement.State;
|
|
239
232
|
}
|
|
240
233
|
|
|
241
234
|
// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
|
|
242
235
|
namespace NumberFieldScrubArea {
|
|
243
|
-
export type Props =
|
|
236
|
+
export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;
|
|
244
237
|
export type State = BaseNumberField.ScrubArea.State;
|
|
245
238
|
}
|
|
246
239
|
|