@thewhileloop/whileui 2.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -70
- package/dist/blocks/commerce/metric-card.d.ts +9 -29
- package/dist/blocks/datepicker/date-range-picker-modal.d.ts +1 -1
- package/dist/blocks/datepicker/date-range-picker-modal.js +6 -14
- package/dist/blocks/datepicker/datepicker-modal.d.ts +1 -1
- package/dist/blocks/datepicker/datepicker-modal.js +6 -12
- package/dist/blocks/datepicker/index.d.ts +1 -0
- package/dist/blocks/datepicker/index.js +1 -0
- package/dist/blocks/datepicker/time-picker-modal.d.ts +43 -0
- package/dist/blocks/datepicker/time-picker-modal.js +187 -0
- package/dist/blocks/layout/smart-input.d.ts +3 -2
- package/dist/blocks/layout/smart-input.js +33 -18
- package/dist/blocks/media/smart-image.d.ts +39 -98
- package/dist/blocks/navigation/drawer-menu.js +88 -72
- package/dist/components/alert/alert.d.ts +23 -55
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +1 -4
- package/dist/components/avatar/avatar.d.ts +18 -45
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/badge.d.ts +84 -212
- package/dist/components/button/button.d.ts +69 -188
- package/dist/components/card/card.d.ts +29 -73
- package/dist/components/card/card.js +1 -1
- package/dist/components/container/container.d.ts +24 -96
- package/dist/components/data-row/data-row.d.ts +18 -38
- package/dist/components/data-row/data-row.js +1 -1
- package/dist/components/fab/fab.d.ts +87 -0
- package/dist/components/fab/fab.js +59 -0
- package/dist/components/fab/index.d.ts +1 -0
- package/dist/components/fab/index.js +1 -0
- package/dist/components/form-field/form-field.d.ts +31 -87
- package/dist/components/form-field/form-field.js +1 -1
- package/dist/components/hover-card/hover-card.d.ts +3 -2
- package/dist/components/input/input.d.ts +18 -31
- package/dist/components/input/input.js +20 -8
- package/dist/components/label/label.d.ts +3 -3
- package/dist/components/labeled-field/labeled-field.d.ts +3 -2
- package/dist/components/numeric-input/numeric-input.d.ts +27 -82
- package/dist/components/numeric-input/numeric-input.js +79 -80
- package/dist/components/otp-input/otp-input.d.ts +21 -65
- package/dist/components/popover/popover.d.ts +4 -3
- package/dist/components/pressable/pressable.d.ts +3 -3
- package/dist/components/progress/progress.d.ts +15 -39
- package/dist/components/row/row.d.ts +63 -163
- package/dist/components/segmented-control/segmented-control.d.ts +69 -241
- package/dist/components/select/select.d.ts +10 -22
- package/dist/components/select/select.js +2 -7
- package/dist/components/separator/separator.d.ts +3 -3
- package/dist/components/skeleton/skeleton.d.ts +9 -29
- package/dist/components/spinner/spinner.d.ts +12 -36
- package/dist/components/stack/stack.d.ts +63 -163
- package/dist/components/tabs/tabs.d.ts +9 -29
- package/dist/components/text/text.d.ts +51 -131
- package/dist/components/textarea/textarea.d.ts +15 -39
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/toast/toast.d.ts +12 -36
- package/dist/components/toggle/toggle.d.ts +42 -138
- package/dist/components/toggle-group/toggle-group.d.ts +42 -138
- package/dist/components/tooltip/tooltip.d.ts +3 -2
- package/dist/components/view/view.d.ts +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/lib/focus-ring.d.ts +10 -0
- package/dist/lib/focus-ring.js +10 -0
- package/dist/lib/interaction-tokens.d.ts +24 -1
- package/dist/lib/interaction-tokens.js +26 -44
- package/dist/lib/motion-policy.js +2 -2
- package/dist/lib/ref-types.d.ts +3 -0
- package/dist/lib/ref-types.js +1 -0
- package/dist/lib/theme-bridge.d.ts +4 -2
- package/dist/lib/theme-bridge.js +13 -9
- package/dist/lib/theme-presets.d.ts +26 -0
- package/dist/lib/theme-presets.js +28 -0
- package/package.json +29 -28
|
@@ -1,106 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Text, View, type TextProps, type ViewProps } from 'react-native';
|
|
1
|
+
import { type TextInstance, type TextProps, type ViewInstance, type ViewProps } from 'react-native';
|
|
3
2
|
import { type VariantProps } from '../../lib/tv';
|
|
3
|
+
import type { ForwardRefComponent } from '../../lib/ref-types';
|
|
4
4
|
declare const formFieldVariants: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
density: {
|
|
6
|
-
default:
|
|
7
|
-
compact:
|
|
6
|
+
default: "gap-1.5";
|
|
7
|
+
compact: "gap-1";
|
|
8
8
|
};
|
|
9
|
-
}, undefined, "w-full",
|
|
9
|
+
}, undefined, "w-full", {
|
|
10
10
|
density: {
|
|
11
|
-
default:
|
|
12
|
-
compact:
|
|
11
|
+
default: "gap-1.5";
|
|
12
|
+
compact: "gap-1";
|
|
13
13
|
};
|
|
14
|
-
}, {
|
|
14
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
15
15
|
density: {
|
|
16
|
-
default:
|
|
17
|
-
compact:
|
|
16
|
+
default: "gap-1.5";
|
|
17
|
+
compact: "gap-1";
|
|
18
18
|
};
|
|
19
|
-
}
|
|
20
|
-
density: {
|
|
21
|
-
default: string;
|
|
22
|
-
compact: string;
|
|
23
|
-
};
|
|
24
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
25
|
-
density: {
|
|
26
|
-
default: string;
|
|
27
|
-
compact: string;
|
|
28
|
-
};
|
|
29
|
-
}, undefined, "w-full", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
30
|
-
density: {
|
|
31
|
-
default: string;
|
|
32
|
-
compact: string;
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
density: {
|
|
36
|
-
default: string;
|
|
37
|
-
compact: string;
|
|
38
|
-
};
|
|
39
|
-
}>, unknown, unknown, undefined>>;
|
|
19
|
+
}, undefined>>;
|
|
40
20
|
declare const formControlVariants: import("tailwind-variants").TVReturnType<{
|
|
41
21
|
density: {
|
|
42
|
-
default:
|
|
43
|
-
compact:
|
|
44
|
-
};
|
|
45
|
-
invalid: {
|
|
46
|
-
true: string;
|
|
47
|
-
false: string;
|
|
48
|
-
};
|
|
49
|
-
}, undefined, "justify-center", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
50
|
-
density: {
|
|
51
|
-
default: string;
|
|
52
|
-
compact: string;
|
|
53
|
-
};
|
|
54
|
-
invalid: {
|
|
55
|
-
true: string;
|
|
56
|
-
false: string;
|
|
57
|
-
};
|
|
58
|
-
}, {
|
|
59
|
-
density: {
|
|
60
|
-
default: string;
|
|
61
|
-
compact: string;
|
|
62
|
-
};
|
|
63
|
-
invalid: {
|
|
64
|
-
true: string;
|
|
65
|
-
false: string;
|
|
66
|
-
};
|
|
67
|
-
}>, {
|
|
68
|
-
density: {
|
|
69
|
-
default: string;
|
|
70
|
-
compact: string;
|
|
71
|
-
};
|
|
72
|
-
invalid: {
|
|
73
|
-
true: string;
|
|
74
|
-
false: string;
|
|
75
|
-
};
|
|
76
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
77
|
-
density: {
|
|
78
|
-
default: string;
|
|
79
|
-
compact: string;
|
|
22
|
+
default: "";
|
|
23
|
+
compact: "";
|
|
80
24
|
};
|
|
81
25
|
invalid: {
|
|
82
|
-
true:
|
|
83
|
-
false:
|
|
26
|
+
true: "";
|
|
27
|
+
false: "";
|
|
84
28
|
};
|
|
85
|
-
}, undefined, "justify-center",
|
|
29
|
+
}, undefined, "justify-center", {
|
|
86
30
|
density: {
|
|
87
|
-
default:
|
|
88
|
-
compact:
|
|
31
|
+
default: "";
|
|
32
|
+
compact: "";
|
|
89
33
|
};
|
|
90
34
|
invalid: {
|
|
91
|
-
true:
|
|
92
|
-
false:
|
|
35
|
+
true: "";
|
|
36
|
+
false: "";
|
|
93
37
|
};
|
|
94
|
-
}, {
|
|
38
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
95
39
|
density: {
|
|
96
|
-
default:
|
|
97
|
-
compact:
|
|
40
|
+
default: "";
|
|
41
|
+
compact: "";
|
|
98
42
|
};
|
|
99
43
|
invalid: {
|
|
100
|
-
true:
|
|
101
|
-
false:
|
|
44
|
+
true: "";
|
|
45
|
+
false: "";
|
|
102
46
|
};
|
|
103
|
-
}
|
|
47
|
+
}, undefined>>;
|
|
104
48
|
export interface FormFieldProps extends ViewProps, VariantProps<typeof formFieldVariants> {
|
|
105
49
|
invalid?: boolean;
|
|
106
50
|
disabled?: boolean;
|
|
@@ -115,9 +59,9 @@ export interface FormHintProps extends TextProps {
|
|
|
115
59
|
}
|
|
116
60
|
export interface FormMessageProps extends TextProps {
|
|
117
61
|
}
|
|
118
|
-
declare const FormField:
|
|
119
|
-
declare const FormLabel:
|
|
120
|
-
declare const FormControl:
|
|
121
|
-
declare const FormHint:
|
|
122
|
-
declare const FormMessage:
|
|
62
|
+
declare const FormField: ForwardRefComponent<ViewInstance, FormFieldProps>;
|
|
63
|
+
declare const FormLabel: ForwardRefComponent<TextInstance, FormLabelProps>;
|
|
64
|
+
declare const FormControl: ForwardRefComponent<ViewInstance, FormControlProps>;
|
|
65
|
+
declare const FormHint: ForwardRefComponent<TextInstance, FormHintProps>;
|
|
66
|
+
declare const FormMessage: ForwardRefComponent<TextInstance, FormMessageProps>;
|
|
123
67
|
export { FormField, FormLabel, FormControl, FormHint, FormMessage, formFieldVariants, formControlVariants, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { createContext, useContext, useMemo } from 'react';
|
|
3
|
-
import { Text, View } from 'react-native';
|
|
3
|
+
import { Text, View, } from 'react-native';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
5
|
import { tv } from '../../lib/tv';
|
|
6
6
|
import { useInteractionTokens } from '../../lib/interaction-tokens';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as HoverCardPrimitive from '@rn-primitives/hover-card';
|
|
3
3
|
import { type FrostedSurfaceProps } from '../../lib/frosted-surface';
|
|
4
|
+
import type { ForwardRefComponent } from '../../lib/ref-types';
|
|
4
5
|
export interface HoverCardProps {
|
|
5
6
|
onOpenChange?: (open: boolean) => void;
|
|
6
7
|
openDelay?: number;
|
|
@@ -15,6 +16,6 @@ export interface HoverCardContentProps extends React.ComponentPropsWithoutRef<ty
|
|
|
15
16
|
portalHost?: string;
|
|
16
17
|
}
|
|
17
18
|
declare function HoverCard({ onOpenChange, openDelay, closeDelay, children }: HoverCardProps): React.JSX.Element;
|
|
18
|
-
declare const HoverCardTrigger:
|
|
19
|
-
declare const HoverCardContent:
|
|
19
|
+
declare const HoverCardTrigger: ForwardRefComponent<HoverCardPrimitive.TriggerRef, HoverCardTriggerProps>;
|
|
20
|
+
declare const HoverCardContent: ForwardRefComponent<HoverCardPrimitive.ContentRef, HoverCardContentProps>;
|
|
20
21
|
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -1,47 +1,34 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type TextInputInstance, type TextInputProps } from 'react-native';
|
|
3
3
|
import { type VariantProps } from '../../lib/tv';
|
|
4
|
+
import type { ForwardRefComponent } from '../../lib/ref-types';
|
|
4
5
|
declare const inputVariants: import("tailwind-variants").TVReturnType<{
|
|
5
6
|
variant: {
|
|
6
|
-
default:
|
|
7
|
-
error:
|
|
7
|
+
default: "border-border";
|
|
8
|
+
error: "border-destructive";
|
|
9
|
+
/** No border, no fill — for one large figure that is the screen's subject. */
|
|
10
|
+
plain: "border-transparent bg-transparent";
|
|
8
11
|
};
|
|
9
|
-
}, undefined, "w-full border-border bg-muted text-foreground",
|
|
12
|
+
}, undefined, "w-full border-border bg-muted text-foreground", {
|
|
10
13
|
variant: {
|
|
11
|
-
default:
|
|
12
|
-
error:
|
|
14
|
+
default: "border-border";
|
|
15
|
+
error: "border-destructive";
|
|
16
|
+
/** No border, no fill — for one large figure that is the screen's subject. */
|
|
17
|
+
plain: "border-transparent bg-transparent";
|
|
13
18
|
};
|
|
14
|
-
}, {
|
|
19
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
15
20
|
variant: {
|
|
16
|
-
default:
|
|
17
|
-
error:
|
|
21
|
+
default: "border-border";
|
|
22
|
+
error: "border-destructive";
|
|
23
|
+
/** No border, no fill — for one large figure that is the screen's subject. */
|
|
24
|
+
plain: "border-transparent bg-transparent";
|
|
18
25
|
};
|
|
19
|
-
}
|
|
20
|
-
variant: {
|
|
21
|
-
default: string;
|
|
22
|
-
error: string;
|
|
23
|
-
};
|
|
24
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
25
|
-
variant: {
|
|
26
|
-
default: string;
|
|
27
|
-
error: string;
|
|
28
|
-
};
|
|
29
|
-
}, undefined, "w-full border-border bg-muted text-foreground", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
30
|
-
variant: {
|
|
31
|
-
default: string;
|
|
32
|
-
error: string;
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
variant: {
|
|
36
|
-
default: string;
|
|
37
|
-
error: string;
|
|
38
|
-
};
|
|
39
|
-
}>, unknown, unknown, undefined>>;
|
|
26
|
+
}, undefined>>;
|
|
40
27
|
export interface InputProps extends TextInputProps, VariantProps<typeof inputVariants> {
|
|
41
28
|
className?: string;
|
|
42
29
|
prefix?: React.ReactNode;
|
|
43
30
|
suffix?: React.ReactNode;
|
|
44
31
|
inputClassName?: string;
|
|
45
32
|
}
|
|
46
|
-
declare const Input:
|
|
33
|
+
declare const Input: ForwardRefComponent<TextInputInstance, InputProps>;
|
|
47
34
|
export { Input, inputVariants };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
import { View, TextInput } from 'react-native';
|
|
4
4
|
import { cn } from '../../lib/cn';
|
|
5
|
-
import {
|
|
5
|
+
import { focusFieldWrapper } from '../../lib/focus-ring';
|
|
6
6
|
import { tv } from '../../lib/tv';
|
|
7
7
|
import { useThemeColors } from '../../lib/theme-colors';
|
|
8
8
|
import { useInteractionTokens } from '../../lib/interaction-tokens';
|
|
@@ -14,29 +14,41 @@ const inputVariants = tv({
|
|
|
14
14
|
variant: {
|
|
15
15
|
default: 'border-border',
|
|
16
16
|
error: 'border-destructive',
|
|
17
|
+
/** No border, no fill — for one large figure that is the screen's subject. */
|
|
18
|
+
plain: 'border-transparent bg-transparent',
|
|
17
19
|
},
|
|
18
20
|
},
|
|
19
21
|
defaultVariants: {
|
|
20
22
|
variant: 'default',
|
|
21
23
|
},
|
|
22
24
|
});
|
|
23
|
-
const Input = React.forwardRef(({ className, prefix, suffix, inputClassName, variant, editable = true, placeholderTextColor, ...props }, ref) => {
|
|
25
|
+
const Input = React.forwardRef(({ className, prefix, suffix, inputClassName, variant, editable = true, placeholderTextColor, onFocus, onBlur, ...props }, ref) => {
|
|
24
26
|
const colors = useThemeColors();
|
|
25
27
|
const interaction = useInteractionTokens();
|
|
26
28
|
const visual = useVisualTokens();
|
|
27
|
-
|
|
29
|
+
// The border is on this wrapper and the focus is on the TextInput inside it, so the
|
|
30
|
+
// wrapper learns about focus from the events rather than a pseudo-class.
|
|
31
|
+
const [focused, setFocused] = useState(false);
|
|
32
|
+
const plain = variant === 'plain';
|
|
33
|
+
return (_jsxs(View, { className: cn('flex-row items-center border-border bg-muted', inputVariants({ variant }), focused && !plain && focusFieldWrapper, className), style: [
|
|
28
34
|
{
|
|
29
35
|
minHeight: visual.controlHeightDefault,
|
|
30
|
-
borderWidth: visual.borderWidthControl,
|
|
36
|
+
borderWidth: plain ? 0 : visual.borderWidthControl,
|
|
31
37
|
borderRadius: visual.radiusLg,
|
|
32
|
-
paddingHorizontal: visual.controlPaddingXDefault,
|
|
38
|
+
paddingHorizontal: plain ? 0 : visual.controlPaddingXDefault,
|
|
33
39
|
},
|
|
34
40
|
!editable ? { opacity: interaction.disabledOpacity } : undefined,
|
|
35
|
-
], children: [prefix && (_jsx(View, { style: { paddingRight: Math.max(8, Math.round(visual.controlPaddingXDefault * 0.5)) }, children: prefix })), _jsx(TextInput, { ref: ref, className: cn('flex-1 text-foreground placeholder:text-muted-foreground',
|
|
41
|
+
], children: [prefix && (_jsx(View, { style: { paddingRight: Math.max(8, Math.round(visual.controlPaddingXDefault * 0.5)) }, children: prefix })), _jsx(TextInput, { ref: ref, className: cn('flex-1 text-foreground placeholder:text-muted-foreground web:outline-none', inputClassName), style: {
|
|
36
42
|
...typographyStyle(visual, 'label'),
|
|
37
43
|
minHeight: visual.controlHeightDefault - 2,
|
|
38
44
|
paddingVertical: visual.controlPaddingYDefault,
|
|
39
|
-
}, editable: editable, placeholderTextColor: placeholderTextColor ?? colors.placeholder,
|
|
45
|
+
}, editable: editable, placeholderTextColor: placeholderTextColor ?? colors.placeholder, onFocus: (event) => {
|
|
46
|
+
setFocused(true);
|
|
47
|
+
onFocus?.(event);
|
|
48
|
+
}, onBlur: (event) => {
|
|
49
|
+
setFocused(false);
|
|
50
|
+
onBlur?.(event);
|
|
51
|
+
}, ...props }), suffix && (_jsx(View, { style: { paddingLeft: Math.max(8, Math.round(visual.controlPaddingXDefault * 0.5)) }, children: suffix }))] }));
|
|
40
52
|
});
|
|
41
53
|
Input.displayName = 'Input';
|
|
42
54
|
export { Input, inputVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { type TextInstance, type TextProps } from 'react-native';
|
|
2
|
+
import type { ForwardRefComponent } from '../../lib/ref-types';
|
|
3
3
|
export interface LabelProps extends TextProps {
|
|
4
4
|
}
|
|
5
|
-
declare const Label:
|
|
5
|
+
declare const Label: ForwardRefComponent<TextInstance, LabelProps>;
|
|
6
6
|
export { Label };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type ViewInstance, type ViewProps } from 'react-native';
|
|
3
3
|
import { type FormFieldProps } from '../form-field';
|
|
4
|
+
import type { ForwardRefComponent } from '../../lib/ref-types';
|
|
4
5
|
export interface LabeledFieldProps extends Omit<FormFieldProps, 'children'> {
|
|
5
6
|
label?: React.ReactNode;
|
|
6
7
|
hint?: React.ReactNode;
|
|
@@ -14,5 +15,5 @@ export interface LabeledFieldControlProps extends ViewProps {
|
|
|
14
15
|
className?: string;
|
|
15
16
|
}
|
|
16
17
|
declare function LabeledField({ label, hint, error, leftSlot, rightSlot, children, controlWrapperClassName, required, disabled, invalid, ...props }: LabeledFieldProps): React.JSX.Element;
|
|
17
|
-
declare const LabeledFieldControl:
|
|
18
|
+
declare const LabeledFieldControl: ForwardRefComponent<ViewInstance, LabeledFieldControlProps>;
|
|
18
19
|
export { LabeledField, LabeledFieldControl };
|
|
@@ -1,106 +1,51 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type TextInputInstance, type TextInputProps } from 'react-native';
|
|
3
3
|
import { type VariantProps } from '../../lib/tv';
|
|
4
|
+
import type { ForwardRefComponent } from '../../lib/ref-types';
|
|
4
5
|
declare const numericInputVariants: import("tailwind-variants").TVReturnType<{
|
|
5
6
|
variant: {
|
|
6
|
-
default:
|
|
7
|
-
error:
|
|
7
|
+
default: "border-border";
|
|
8
|
+
error: "border-destructive";
|
|
8
9
|
};
|
|
9
10
|
size: {
|
|
10
|
-
default:
|
|
11
|
-
compact:
|
|
11
|
+
default: "";
|
|
12
|
+
compact: "";
|
|
12
13
|
};
|
|
13
|
-
}, undefined, "w-full flex-row items-center border-border bg-muted",
|
|
14
|
+
}, undefined, "w-full flex-row items-center border-border bg-muted", {
|
|
14
15
|
variant: {
|
|
15
|
-
default:
|
|
16
|
-
error:
|
|
16
|
+
default: "border-border";
|
|
17
|
+
error: "border-destructive";
|
|
17
18
|
};
|
|
18
19
|
size: {
|
|
19
|
-
default:
|
|
20
|
-
compact:
|
|
20
|
+
default: "";
|
|
21
|
+
compact: "";
|
|
21
22
|
};
|
|
22
|
-
}, {
|
|
23
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
23
24
|
variant: {
|
|
24
|
-
default:
|
|
25
|
-
error:
|
|
25
|
+
default: "border-border";
|
|
26
|
+
error: "border-destructive";
|
|
26
27
|
};
|
|
27
28
|
size: {
|
|
28
|
-
default:
|
|
29
|
-
compact:
|
|
29
|
+
default: "";
|
|
30
|
+
compact: "";
|
|
30
31
|
};
|
|
31
|
-
}
|
|
32
|
-
variant: {
|
|
33
|
-
default: string;
|
|
34
|
-
error: string;
|
|
35
|
-
};
|
|
36
|
-
size: {
|
|
37
|
-
default: string;
|
|
38
|
-
compact: string;
|
|
39
|
-
};
|
|
40
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
41
|
-
variant: {
|
|
42
|
-
default: string;
|
|
43
|
-
error: string;
|
|
44
|
-
};
|
|
45
|
-
size: {
|
|
46
|
-
default: string;
|
|
47
|
-
compact: string;
|
|
48
|
-
};
|
|
49
|
-
}, undefined, "w-full flex-row items-center border-border bg-muted", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
50
|
-
variant: {
|
|
51
|
-
default: string;
|
|
52
|
-
error: string;
|
|
53
|
-
};
|
|
54
|
-
size: {
|
|
55
|
-
default: string;
|
|
56
|
-
compact: string;
|
|
57
|
-
};
|
|
58
|
-
}, {
|
|
59
|
-
variant: {
|
|
60
|
-
default: string;
|
|
61
|
-
error: string;
|
|
62
|
-
};
|
|
63
|
-
size: {
|
|
64
|
-
default: string;
|
|
65
|
-
compact: string;
|
|
66
|
-
};
|
|
67
|
-
}>, unknown, unknown, undefined>>;
|
|
32
|
+
}, undefined>>;
|
|
68
33
|
declare const numericInputTextVariants: import("tailwind-variants").TVReturnType<{
|
|
69
34
|
size: {
|
|
70
|
-
default:
|
|
71
|
-
compact:
|
|
72
|
-
};
|
|
73
|
-
}, undefined, "text-foreground", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
74
|
-
size: {
|
|
75
|
-
default: string;
|
|
76
|
-
compact: string;
|
|
77
|
-
};
|
|
78
|
-
}, {
|
|
79
|
-
size: {
|
|
80
|
-
default: string;
|
|
81
|
-
compact: string;
|
|
82
|
-
};
|
|
83
|
-
}>, {
|
|
84
|
-
size: {
|
|
85
|
-
default: string;
|
|
86
|
-
compact: string;
|
|
87
|
-
};
|
|
88
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
89
|
-
size: {
|
|
90
|
-
default: string;
|
|
91
|
-
compact: string;
|
|
35
|
+
default: "";
|
|
36
|
+
compact: "";
|
|
92
37
|
};
|
|
93
|
-
}, undefined, "text-foreground",
|
|
38
|
+
}, undefined, "text-foreground", {
|
|
94
39
|
size: {
|
|
95
|
-
default:
|
|
96
|
-
compact:
|
|
40
|
+
default: "";
|
|
41
|
+
compact: "";
|
|
97
42
|
};
|
|
98
|
-
}, {
|
|
43
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
99
44
|
size: {
|
|
100
|
-
default:
|
|
101
|
-
compact:
|
|
45
|
+
default: "";
|
|
46
|
+
compact: "";
|
|
102
47
|
};
|
|
103
|
-
}
|
|
48
|
+
}, undefined>>;
|
|
104
49
|
export interface NumericInputProps extends Omit<TextInputProps, 'value' | 'defaultValue' | 'onChangeText' | 'keyboardType'>, VariantProps<typeof numericInputVariants> {
|
|
105
50
|
className?: string;
|
|
106
51
|
inputClassName?: string;
|
|
@@ -116,5 +61,5 @@ export interface NumericInputProps extends Omit<TextInputProps, 'value' | 'defau
|
|
|
116
61
|
/** Drop the field shell (border, background, radius, padding) for embedding inside another field shell like LabeledField. */
|
|
117
62
|
unstyled?: boolean;
|
|
118
63
|
}
|
|
119
|
-
declare const NumericInput:
|
|
64
|
+
declare const NumericInput: ForwardRefComponent<TextInputInstance, NumericInputProps>;
|
|
120
65
|
export { NumericInput, numericInputVariants, numericInputTextVariants };
|