@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.
Files changed (74) hide show
  1. package/README.md +135 -70
  2. package/dist/blocks/commerce/metric-card.d.ts +9 -29
  3. package/dist/blocks/datepicker/date-range-picker-modal.d.ts +1 -1
  4. package/dist/blocks/datepicker/date-range-picker-modal.js +6 -14
  5. package/dist/blocks/datepicker/datepicker-modal.d.ts +1 -1
  6. package/dist/blocks/datepicker/datepicker-modal.js +6 -12
  7. package/dist/blocks/datepicker/index.d.ts +1 -0
  8. package/dist/blocks/datepicker/index.js +1 -0
  9. package/dist/blocks/datepicker/time-picker-modal.d.ts +43 -0
  10. package/dist/blocks/datepicker/time-picker-modal.js +187 -0
  11. package/dist/blocks/layout/smart-input.d.ts +3 -2
  12. package/dist/blocks/layout/smart-input.js +33 -18
  13. package/dist/blocks/media/smart-image.d.ts +39 -98
  14. package/dist/blocks/navigation/drawer-menu.js +88 -72
  15. package/dist/components/alert/alert.d.ts +23 -55
  16. package/dist/components/alert/alert.js +1 -1
  17. package/dist/components/alert-dialog/alert-dialog.js +1 -4
  18. package/dist/components/avatar/avatar.d.ts +18 -45
  19. package/dist/components/avatar/avatar.js +1 -1
  20. package/dist/components/badge/badge.d.ts +84 -212
  21. package/dist/components/button/button.d.ts +69 -188
  22. package/dist/components/card/card.d.ts +29 -73
  23. package/dist/components/card/card.js +1 -1
  24. package/dist/components/container/container.d.ts +24 -96
  25. package/dist/components/data-row/data-row.d.ts +18 -38
  26. package/dist/components/data-row/data-row.js +1 -1
  27. package/dist/components/fab/fab.d.ts +87 -0
  28. package/dist/components/fab/fab.js +59 -0
  29. package/dist/components/fab/index.d.ts +1 -0
  30. package/dist/components/fab/index.js +1 -0
  31. package/dist/components/form-field/form-field.d.ts +31 -87
  32. package/dist/components/form-field/form-field.js +1 -1
  33. package/dist/components/hover-card/hover-card.d.ts +3 -2
  34. package/dist/components/input/input.d.ts +18 -31
  35. package/dist/components/input/input.js +20 -8
  36. package/dist/components/label/label.d.ts +3 -3
  37. package/dist/components/labeled-field/labeled-field.d.ts +3 -2
  38. package/dist/components/numeric-input/numeric-input.d.ts +27 -82
  39. package/dist/components/numeric-input/numeric-input.js +79 -80
  40. package/dist/components/otp-input/otp-input.d.ts +21 -65
  41. package/dist/components/popover/popover.d.ts +4 -3
  42. package/dist/components/pressable/pressable.d.ts +3 -3
  43. package/dist/components/progress/progress.d.ts +15 -39
  44. package/dist/components/row/row.d.ts +63 -163
  45. package/dist/components/segmented-control/segmented-control.d.ts +69 -241
  46. package/dist/components/select/select.d.ts +10 -22
  47. package/dist/components/select/select.js +2 -7
  48. package/dist/components/separator/separator.d.ts +3 -3
  49. package/dist/components/skeleton/skeleton.d.ts +9 -29
  50. package/dist/components/spinner/spinner.d.ts +12 -36
  51. package/dist/components/stack/stack.d.ts +63 -163
  52. package/dist/components/tabs/tabs.d.ts +9 -29
  53. package/dist/components/text/text.d.ts +51 -131
  54. package/dist/components/textarea/textarea.d.ts +15 -39
  55. package/dist/components/textarea/textarea.js +3 -3
  56. package/dist/components/toast/toast.d.ts +12 -36
  57. package/dist/components/toggle/toggle.d.ts +42 -138
  58. package/dist/components/toggle-group/toggle-group.d.ts +42 -138
  59. package/dist/components/tooltip/tooltip.d.ts +3 -2
  60. package/dist/components/view/view.d.ts +3 -3
  61. package/dist/index.d.ts +2 -1
  62. package/dist/index.js +2 -1
  63. package/dist/lib/focus-ring.d.ts +10 -0
  64. package/dist/lib/focus-ring.js +10 -0
  65. package/dist/lib/interaction-tokens.d.ts +24 -1
  66. package/dist/lib/interaction-tokens.js +26 -44
  67. package/dist/lib/motion-policy.js +2 -2
  68. package/dist/lib/ref-types.d.ts +3 -0
  69. package/dist/lib/ref-types.js +1 -0
  70. package/dist/lib/theme-bridge.d.ts +4 -2
  71. package/dist/lib/theme-bridge.js +13 -9
  72. package/dist/lib/theme-presets.d.ts +26 -0
  73. package/dist/lib/theme-presets.js +28 -0
  74. package/package.json +29 -28
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useCallback, useMemo, useState } from 'react';
3
- import { Platform, Pressable, Text, TextInput, View } from 'react-native';
3
+ import { Platform, Pressable, Text, TextInput, View, } from 'react-native';
4
4
  import { cn } from '../../lib/cn';
5
- import { focusRing } from '../../lib/focus-ring';
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, withInteractivePressableStyle } from '../../lib/interaction-tokens';
@@ -66,76 +66,97 @@ function roundToStepPrecision(value, step) {
66
66
  const decimals = step >= 1 ? 0 : (step.toString().split('.')[1]?.length ?? 2);
67
67
  return Number(value.toFixed(decimals));
68
68
  }
69
- const NumericInput = React.forwardRef(({ className, inputClassName, prefix, suffix, value, defaultValue, onValueChange, min, max, step = 1, showSteppers = false, unstyled = false, variant = 'default', size = 'default', editable = true, placeholderTextColor, onBlur, style: styleProp, ...props }, ref) => {
70
- const colors = useThemeColors();
71
- const interaction = useInteractionTokens();
72
- const visual = useVisualTokens();
69
+ function useNumericInputModel({ value, defaultValue, min, max, step, editable, onValueChange, onBlur, }) {
73
70
  const [internalText, setInternalText] = useState(() => toInputText(defaultValue));
74
71
  const isControlled = value !== undefined;
75
72
  const textValue = isControlled ? toInputText(value) : internalText;
76
73
  const currentValue = useMemo(() => parseNumericText(textValue), [textValue]);
77
- const setTextAndValue = useCallback((nextText) => {
78
- if (!isControlled) {
79
- setInternalText(nextText);
80
- }
81
- onValueChange?.(parseNumericText(nextText));
82
- }, [isControlled, onValueChange]);
83
74
  const applyNumericValue = useCallback((nextValue) => {
84
- if (nextValue === null) {
85
- if (!isControlled) {
86
- setInternalText('');
87
- }
88
- onValueChange?.(null);
89
- return;
90
- }
91
- const clamped = clampValue(nextValue, min, max);
92
- if (!isControlled) {
75
+ const clamped = nextValue === null ? null : clampValue(nextValue, min, max);
76
+ if (!isControlled)
93
77
  setInternalText(toInputText(clamped));
94
- }
95
78
  onValueChange?.(clamped);
96
79
  }, [isControlled, max, min, onValueChange]);
97
- const handleTextChange = (nextText) => {
98
- const isNumericLike = /^-?\d*(?:[.,]\d*)?$/.test(nextText);
99
- if (!isNumericLike) {
80
+ const handleTextChange = useCallback((nextText) => {
81
+ if (!/^-?\d*(?:[.,]\d*)?$/.test(nextText))
100
82
  return;
101
- }
102
- setTextAndValue(nextText);
103
- };
104
- const handleBlur = (event) => {
83
+ if (!isControlled)
84
+ setInternalText(nextText);
85
+ onValueChange?.(parseNumericText(nextText));
86
+ }, [isControlled, onValueChange]);
87
+ const handleBlur = useCallback((event) => {
105
88
  const parsed = parseNumericText(textValue);
106
- if (parsed !== null) {
107
- const rounded = roundToStepPrecision(parsed, step);
108
- const clamped = clampValue(rounded, min, max);
109
- if (!isControlled) {
110
- setInternalText(toInputText(clamped));
111
- }
112
- onValueChange?.(clamped);
113
- }
89
+ if (parsed !== null)
90
+ applyNumericValue(roundToStepPrecision(parsed, step));
114
91
  onBlur?.(event);
92
+ }, [applyNumericValue, onBlur, step, textValue]);
93
+ const nudge = useCallback((delta) => {
94
+ const baseline = currentValue ?? min ?? 0;
95
+ applyNumericValue(roundToStepPrecision(baseline + delta * step, step));
96
+ }, [applyNumericValue, currentValue, min, step]);
97
+ return {
98
+ textValue,
99
+ handleTextChange,
100
+ handleBlur,
101
+ nudge,
102
+ canDecrease: editable && (min === undefined || currentValue === null || currentValue > min),
103
+ canIncrease: editable && (max === undefined || currentValue === null || currentValue < max),
104
+ };
105
+ }
106
+ function numericInputTextStyle(visual, size, unstyled, style) {
107
+ const base = {
108
+ ...typographyStyle(visual, size === 'compact' ? 'caption' : 'label'),
109
+ paddingVertical: size === 'compact' ? visual.controlPaddingYSm : visual.controlPaddingYDefault,
110
+ paddingHorizontal: unstyled ? 0 : visual.controlPaddingXDefault,
115
111
  };
116
- const canDecrease = editable && (min === undefined || currentValue === null || currentValue > min);
117
- const canIncrease = editable && (max === undefined || currentValue === null || currentValue < max);
118
- const stepDownStyle = withInteractivePressableStyle(undefined, interaction, {
119
- disabled: !canDecrease,
112
+ return Platform.OS === 'web'
113
+ ? [{ ...base, width: '100%', minWidth: 0 }, style]
114
+ : [base, style];
115
+ }
116
+ function NumericAffix({ side, visual, children, }) {
117
+ if (!children)
118
+ return null;
119
+ const spacing = Math.max(8, Math.round(visual.controlPaddingXDefault * 0.5));
120
+ return (_jsx(View, { style: side === 'prefix' ? { paddingRight: spacing } : { paddingLeft: spacing }, children: children }));
121
+ }
122
+ function NumericStepperButton({ delta, enabled, label, symbol, size, radius, model, interaction, visual, }) {
123
+ const feedbackStyle = withInteractivePressableStyle(undefined, interaction, {
124
+ disabled: !enabled,
120
125
  disabledVariant: 'subtle',
121
126
  pressedVariant: 'default',
122
127
  });
123
- const stepUpStyle = withInteractivePressableStyle(undefined, interaction, {
124
- disabled: !canIncrease,
125
- disabledVariant: 'subtle',
126
- pressedVariant: 'default',
128
+ return (_jsx(Pressable, { className: "shrink-0 items-center justify-center bg-secondary", style: (state) => {
129
+ const baseStyle = typeof feedbackStyle === 'function' ? feedbackStyle(state) : feedbackStyle;
130
+ return [baseStyle, { width: size, height: size, borderRadius: radius }];
131
+ }, onPress: () => model.nudge(delta), disabled: !enabled, hitSlop: 4, accessibilityRole: "button", accessibilityLabel: label, children: _jsx(Text, { className: "font-medium text-foreground", style: typographyStyle(visual, 'body'), children: symbol }) }));
132
+ }
133
+ function NumericSteppers({ visible, inset, size, radius, model, interaction, visual, }) {
134
+ if (!visible)
135
+ return null;
136
+ return (_jsxs(View, { className: "shrink-0 flex-row items-center", style: { gap: inset, paddingLeft: Math.max(6, inset) }, children: [_jsx(NumericStepperButton, { delta: -1, enabled: model.canDecrease, label: "Decrease value", symbol: "\u2212", size: size, radius: radius, model: model, interaction: interaction, visual: visual }), _jsx(NumericStepperButton, { delta: 1, enabled: model.canIncrease, label: "Increase value", symbol: "+", size: size, radius: radius, model: model, interaction: interaction, visual: visual })] }));
137
+ }
138
+ const NumericInput = React.forwardRef(({ className, inputClassName, prefix, suffix, value, defaultValue, onValueChange, min, max, step = 1, showSteppers = false, unstyled = false, variant = 'default', size = 'default', editable = true, placeholderTextColor, onFocus, onBlur, style: styleProp, ...props }, ref) => {
139
+ const colors = useThemeColors();
140
+ const interaction = useInteractionTokens();
141
+ const visual = useVisualTokens();
142
+ // The border is on the wrapper and the focus on the field inside it.
143
+ const [focused, setFocused] = useState(false);
144
+ const model = useNumericInputModel({
145
+ value,
146
+ defaultValue,
147
+ min,
148
+ max,
149
+ step,
150
+ editable,
151
+ onValueChange,
152
+ onBlur,
127
153
  });
128
- const nudge = (delta) => {
129
- const baseline = currentValue ?? min ?? 0;
130
- const raw = baseline + delta * step;
131
- applyNumericValue(roundToStepPrecision(raw, step));
132
- };
133
154
  const controlHeight = size === 'compact' ? visual.controlHeightSm : visual.controlHeightDefault;
134
155
  // Steppers render as inset soft buttons, centered inside the field shell.
135
156
  const stepInset = Math.max(3, Math.round(controlHeight * 0.1));
136
157
  const stepSize = controlHeight - stepInset * 2;
137
158
  const stepRadius = Math.max(3, Math.min(visual.radiusMd, Math.round(stepSize / 3)));
138
- return (_jsxs(View, { className: cn(numericInputVariants({ variant, size }), unstyled && 'bg-transparent', className), style: [
159
+ return (_jsxs(View, { className: cn(numericInputVariants({ variant, size }), unstyled && 'bg-transparent', focused && !unstyled && focusFieldWrapper, className), style: [
139
160
  {
140
161
  // Definite height (not minHeight) so inner elements can center reliably.
141
162
  height: controlHeight,
@@ -145,35 +166,13 @@ const NumericInput = React.forwardRef(({ className, inputClassName, prefix, suff
145
166
  paddingRight: unstyled ? 0 : showSteppers ? stepInset : 0,
146
167
  },
147
168
  !editable ? { opacity: interaction.disabledOpacity } : undefined,
148
- ], children: [prefix ? (_jsx(View, { style: { paddingRight: Math.max(8, Math.round(visual.controlPaddingXDefault * 0.5)) }, children: prefix })) : null, _jsx(View, { className: "min-w-0 flex-1", style: Platform.OS === 'web' ? { minWidth: 0, flex: 1 } : undefined, children: _jsx(TextInput, { ref: ref, className: cn(numericInputTextVariants({ size }), 'w-full', focusRing, inputClassName), style: Platform.OS === 'web'
149
- ? [
150
- {
151
- ...typographyStyle(visual, size === 'compact' ? 'caption' : 'label'),
152
- width: '100%',
153
- minWidth: 0,
154
- paddingVertical: size === 'compact'
155
- ? visual.controlPaddingYSm
156
- : visual.controlPaddingYDefault,
157
- paddingHorizontal: unstyled ? 0 : visual.controlPaddingXDefault,
158
- },
159
- styleProp,
160
- ]
161
- : [
162
- {
163
- ...typographyStyle(visual, size === 'compact' ? 'caption' : 'label'),
164
- paddingVertical: size === 'compact'
165
- ? visual.controlPaddingYSm
166
- : visual.controlPaddingYDefault,
167
- paddingHorizontal: unstyled ? 0 : visual.controlPaddingXDefault,
168
- },
169
- styleProp,
170
- ], value: textValue, onChangeText: handleTextChange, onBlur: handleBlur, keyboardType: "decimal-pad", editable: editable, placeholderTextColor: placeholderTextColor ?? colors.placeholder, ...props }) }), suffix ? (_jsx(View, { style: { paddingLeft: Math.max(8, Math.round(visual.controlPaddingXDefault * 0.5)) }, children: suffix })) : null, showSteppers ? (_jsxs(View, { className: "shrink-0 flex-row items-center", style: { gap: stepInset, paddingLeft: Math.max(6, stepInset) }, children: [_jsx(Pressable, { className: "shrink-0 items-center justify-center bg-secondary", style: (state) => {
171
- const baseStyle = typeof stepDownStyle === 'function' ? stepDownStyle(state) : stepDownStyle;
172
- return [baseStyle, { width: stepSize, height: stepSize, borderRadius: stepRadius }];
173
- }, onPress: () => nudge(-1), disabled: !canDecrease, hitSlop: 4, accessibilityRole: "button", accessibilityLabel: "Decrease value", children: _jsx(Text, { className: "font-medium text-foreground", style: typographyStyle(visual, 'body'), children: "\u2212" }) }), _jsx(Pressable, { className: "shrink-0 items-center justify-center bg-secondary", style: (state) => {
174
- const baseStyle = typeof stepUpStyle === 'function' ? stepUpStyle(state) : stepUpStyle;
175
- return [baseStyle, { width: stepSize, height: stepSize, borderRadius: stepRadius }];
176
- }, onPress: () => nudge(1), disabled: !canIncrease, hitSlop: 4, accessibilityRole: "button", accessibilityLabel: "Increase value", children: _jsx(Text, { className: "font-medium text-foreground", style: typographyStyle(visual, 'body'), children: "+" }) })] })) : null] }));
169
+ ], children: [_jsx(NumericAffix, { side: "prefix", visual: visual, children: prefix }), _jsx(View, { className: "min-w-0 flex-1", style: Platform.OS === 'web' ? { minWidth: 0, flex: 1 } : undefined, children: _jsx(TextInput, { ref: ref, className: cn(numericInputTextVariants({ size }), 'w-full web:outline-none', inputClassName), style: numericInputTextStyle(visual, size, unstyled, styleProp), value: model.textValue, onChangeText: model.handleTextChange, onFocus: (event) => {
170
+ setFocused(true);
171
+ onFocus?.(event);
172
+ }, onBlur: (event) => {
173
+ setFocused(false);
174
+ model.handleBlur(event);
175
+ }, keyboardType: "decimal-pad", editable: editable, placeholderTextColor: placeholderTextColor ?? colors.placeholder, ...props }) }), _jsx(NumericAffix, { side: "suffix", visual: visual, children: suffix }), _jsx(NumericSteppers, { visible: showSteppers, inset: stepInset, size: stepSize, radius: stepRadius, model: model, interaction: interaction, visual: visual })] }));
177
176
  });
178
177
  NumericInput.displayName = 'NumericInput';
179
178
  export { NumericInput, numericInputVariants, numericInputTextVariants };
@@ -1,82 +1,38 @@
1
1
  import { type ViewProps } from 'react-native';
2
2
  declare const otpCellVariants: import("tailwind-variants").TVReturnType<{
3
3
  size: {
4
- default: string;
5
- compact: string;
4
+ default: "w-11";
5
+ compact: "w-9";
6
6
  };
7
7
  state: {
8
- idle: string;
9
- focused: string;
10
- error: string;
11
- errorFocused: string;
8
+ idle: "border-border";
9
+ focused: "border-primary";
10
+ error: "border-destructive";
11
+ errorFocused: "border-destructive";
12
12
  };
13
- }, undefined, "items-center justify-center border bg-muted", import("tailwind-variants/dist/config.js").TVConfig<{
13
+ }, undefined, "items-center justify-center border bg-muted", {
14
14
  size: {
15
- default: string;
16
- compact: string;
15
+ default: "w-11";
16
+ compact: "w-9";
17
17
  };
18
18
  state: {
19
- idle: string;
20
- focused: string;
21
- error: string;
22
- errorFocused: string;
19
+ idle: "border-border";
20
+ focused: "border-primary";
21
+ error: "border-destructive";
22
+ errorFocused: "border-destructive";
23
23
  };
24
- }, {
24
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
25
25
  size: {
26
- default: string;
27
- compact: string;
26
+ default: "w-11";
27
+ compact: "w-9";
28
28
  };
29
29
  state: {
30
- idle: string;
31
- focused: string;
32
- error: string;
33
- errorFocused: string;
30
+ idle: "border-border";
31
+ focused: "border-primary";
32
+ error: "border-destructive";
33
+ errorFocused: "border-destructive";
34
34
  };
35
- }>, {
36
- size: {
37
- default: string;
38
- compact: string;
39
- };
40
- state: {
41
- idle: string;
42
- focused: string;
43
- error: string;
44
- errorFocused: string;
45
- };
46
- }, undefined, import("tailwind-variants").TVReturnType<{
47
- size: {
48
- default: string;
49
- compact: string;
50
- };
51
- state: {
52
- idle: string;
53
- focused: string;
54
- error: string;
55
- errorFocused: string;
56
- };
57
- }, undefined, "items-center justify-center border bg-muted", import("tailwind-variants/dist/config.js").TVConfig<{
58
- size: {
59
- default: string;
60
- compact: string;
61
- };
62
- state: {
63
- idle: string;
64
- focused: string;
65
- error: string;
66
- errorFocused: string;
67
- };
68
- }, {
69
- size: {
70
- default: string;
71
- compact: string;
72
- };
73
- state: {
74
- idle: string;
75
- focused: string;
76
- error: string;
77
- errorFocused: string;
78
- };
79
- }>, unknown, unknown, undefined>>;
35
+ }, undefined>>;
80
36
  export interface OTPInputProps extends Omit<ViewProps, 'children'> {
81
37
  length?: number;
82
38
  value?: string;
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import * as PopoverPrimitive from '@rn-primitives/popover';
3
3
  import { type FrostedSurfaceProps } from '../../lib/frosted-surface';
4
4
  import { type OverlayInsets } from '../../lib/overlay-insets';
5
+ import type { ForwardRefComponent } from '../../lib/ref-types';
5
6
  export interface PopoverProps {
6
7
  onOpenChange?: (open: boolean) => void;
7
8
  children: React.ReactNode;
@@ -19,7 +20,7 @@ export interface PopoverCloseProps extends React.ComponentPropsWithoutRef<typeof
19
20
  className?: string;
20
21
  }
21
22
  declare function Popover({ onOpenChange, children }: PopoverProps): React.JSX.Element;
22
- declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverTriggerProps & React.RefAttributes<import("@rn-primitives/popover").TriggerRef>>;
23
- declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<import("react-native").View>>;
24
- declare const PopoverClose: React.ForwardRefExoticComponent<PopoverCloseProps & React.RefAttributes<import("react-native").View>>;
23
+ declare const PopoverTrigger: ForwardRefComponent<PopoverPrimitive.TriggerRef, PopoverTriggerProps>;
24
+ declare const PopoverContent: ForwardRefComponent<PopoverPrimitive.ContentRef, PopoverContentProps>;
25
+ declare const PopoverClose: ForwardRefComponent<PopoverPrimitive.CloseRef, PopoverCloseProps>;
25
26
  export { Popover, PopoverTrigger, PopoverContent, PopoverClose };
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { type PressableProps as RNPressableProps } from 'react-native';
1
+ import { type PressableInstance, type PressableProps as RNPressableProps } from 'react-native';
3
2
  import { type DisabledVariant, type PressedVariant } from '../../lib/interaction-tokens';
3
+ import type { ForwardRefComponent } from '../../lib/ref-types';
4
4
  export interface PressableProps extends RNPressableProps {
5
5
  className?: string;
6
6
  /** Semantic press feedback. `none` preserves a plain React Native Pressable. */
@@ -10,5 +10,5 @@ export interface PressableProps extends RNPressableProps {
10
10
  /** Loading controls are busy and non-interactive, just like disabled controls. */
11
11
  loading?: boolean;
12
12
  }
13
- declare const Pressable: React.ForwardRefExoticComponent<PressableProps & React.RefAttributes<import("react-native").View>>;
13
+ declare const Pressable: ForwardRefComponent<PressableInstance, PressableProps>;
14
14
  export { Pressable };
@@ -1,52 +1,28 @@
1
- import React from 'react';
2
- import { View, type ViewProps } from 'react-native';
1
+ import { 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 progressVariants: import("tailwind-variants").TVReturnType<{
5
5
  size: {
6
- sm: string;
7
- default: string;
8
- lg: string;
6
+ sm: "h-1.5";
7
+ default: "h-3";
8
+ lg: "h-5";
9
9
  };
10
- }, undefined, "h-3 w-full overflow-hidden rounded-full bg-secondary", import("tailwind-variants/dist/config.js").TVConfig<{
10
+ }, undefined, "h-3 w-full overflow-hidden rounded-full bg-secondary", {
11
11
  size: {
12
- sm: string;
13
- default: string;
14
- lg: string;
12
+ sm: "h-1.5";
13
+ default: "h-3";
14
+ lg: "h-5";
15
15
  };
16
- }, {
16
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
17
17
  size: {
18
- sm: string;
19
- default: string;
20
- lg: string;
18
+ sm: "h-1.5";
19
+ default: "h-3";
20
+ lg: "h-5";
21
21
  };
22
- }>, {
23
- size: {
24
- sm: string;
25
- default: string;
26
- lg: string;
27
- };
28
- }, undefined, import("tailwind-variants").TVReturnType<{
29
- size: {
30
- sm: string;
31
- default: string;
32
- lg: string;
33
- };
34
- }, undefined, "h-3 w-full overflow-hidden rounded-full bg-secondary", import("tailwind-variants/dist/config.js").TVConfig<{
35
- size: {
36
- sm: string;
37
- default: string;
38
- lg: string;
39
- };
40
- }, {
41
- size: {
42
- sm: string;
43
- default: string;
44
- lg: string;
45
- };
46
- }>, unknown, unknown, undefined>>;
22
+ }, undefined>>;
47
23
  export interface ProgressProps extends ViewProps, VariantProps<typeof progressVariants> {
48
24
  value?: number;
49
25
  indicatorClassName?: string;
50
26
  }
51
- declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<View>>;
27
+ declare const Progress: ForwardRefComponent<ViewInstance, ProgressProps>;
52
28
  export { Progress, progressVariants };
@@ -1,184 +1,84 @@
1
- import React from 'react';
2
- import { View, type ViewProps } from 'react-native';
1
+ import { 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 rowVariants: import("tailwind-variants").TVReturnType<{
5
5
  gap: {
6
- none: string;
7
- xs: string;
8
- sm: string;
9
- md: string;
10
- lg: string;
11
- xl: string;
12
- '2xl': string;
6
+ none: "gap-0";
7
+ xs: "gap-1";
8
+ sm: "gap-2";
9
+ md: "gap-3";
10
+ lg: "gap-4";
11
+ xl: "gap-6";
12
+ '2xl': "gap-8";
13
13
  };
14
14
  align: {
15
- start: string;
16
- center: string;
17
- end: string;
18
- stretch: string;
19
- baseline: string;
15
+ start: "items-start";
16
+ center: "items-center";
17
+ end: "items-end";
18
+ stretch: "items-stretch";
19
+ baseline: "items-baseline";
20
20
  };
21
21
  justify: {
22
- start: string;
23
- center: string;
24
- end: string;
25
- between: string;
26
- around: string;
27
- evenly: string;
28
- };
29
- }, undefined, "flex-row", import("tailwind-variants/dist/config.js").TVConfig<{
30
- gap: {
31
- none: string;
32
- xs: string;
33
- sm: string;
34
- md: string;
35
- lg: string;
36
- xl: string;
37
- '2xl': string;
38
- };
39
- align: {
40
- start: string;
41
- center: string;
42
- end: string;
43
- stretch: string;
44
- baseline: string;
45
- };
46
- justify: {
47
- start: string;
48
- center: string;
49
- end: string;
50
- between: string;
51
- around: string;
52
- evenly: string;
53
- };
54
- }, {
22
+ start: "justify-start";
23
+ center: "justify-center";
24
+ end: "justify-end";
25
+ between: "justify-between";
26
+ around: "justify-around";
27
+ evenly: "justify-evenly";
28
+ };
29
+ }, undefined, "flex-row", {
55
30
  gap: {
56
- none: string;
57
- xs: string;
58
- sm: string;
59
- md: string;
60
- lg: string;
61
- xl: string;
62
- '2xl': string;
31
+ none: "gap-0";
32
+ xs: "gap-1";
33
+ sm: "gap-2";
34
+ md: "gap-3";
35
+ lg: "gap-4";
36
+ xl: "gap-6";
37
+ '2xl': "gap-8";
63
38
  };
64
39
  align: {
65
- start: string;
66
- center: string;
67
- end: string;
68
- stretch: string;
69
- baseline: string;
40
+ start: "items-start";
41
+ center: "items-center";
42
+ end: "items-end";
43
+ stretch: "items-stretch";
44
+ baseline: "items-baseline";
70
45
  };
71
46
  justify: {
72
- start: string;
73
- center: string;
74
- end: string;
75
- between: string;
76
- around: string;
77
- evenly: string;
78
- };
79
- }>, {
80
- gap: {
81
- none: string;
82
- xs: string;
83
- sm: string;
84
- md: string;
85
- lg: string;
86
- xl: string;
87
- '2xl': string;
88
- };
89
- align: {
90
- start: string;
91
- center: string;
92
- end: string;
93
- stretch: string;
94
- baseline: string;
95
- };
96
- justify: {
97
- start: string;
98
- center: string;
99
- end: string;
100
- between: string;
101
- around: string;
102
- evenly: string;
103
- };
104
- }, undefined, import("tailwind-variants").TVReturnType<{
47
+ start: "justify-start";
48
+ center: "justify-center";
49
+ end: "justify-end";
50
+ between: "justify-between";
51
+ around: "justify-around";
52
+ evenly: "justify-evenly";
53
+ };
54
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
105
55
  gap: {
106
- none: string;
107
- xs: string;
108
- sm: string;
109
- md: string;
110
- lg: string;
111
- xl: string;
112
- '2xl': string;
56
+ none: "gap-0";
57
+ xs: "gap-1";
58
+ sm: "gap-2";
59
+ md: "gap-3";
60
+ lg: "gap-4";
61
+ xl: "gap-6";
62
+ '2xl': "gap-8";
113
63
  };
114
64
  align: {
115
- start: string;
116
- center: string;
117
- end: string;
118
- stretch: string;
119
- baseline: string;
65
+ start: "items-start";
66
+ center: "items-center";
67
+ end: "items-end";
68
+ stretch: "items-stretch";
69
+ baseline: "items-baseline";
120
70
  };
121
71
  justify: {
122
- start: string;
123
- center: string;
124
- end: string;
125
- between: string;
126
- around: string;
127
- evenly: string;
128
- };
129
- }, undefined, "flex-row", import("tailwind-variants/dist/config.js").TVConfig<{
130
- gap: {
131
- none: string;
132
- xs: string;
133
- sm: string;
134
- md: string;
135
- lg: string;
136
- xl: string;
137
- '2xl': string;
138
- };
139
- align: {
140
- start: string;
141
- center: string;
142
- end: string;
143
- stretch: string;
144
- baseline: string;
145
- };
146
- justify: {
147
- start: string;
148
- center: string;
149
- end: string;
150
- between: string;
151
- around: string;
152
- evenly: string;
153
- };
154
- }, {
155
- gap: {
156
- none: string;
157
- xs: string;
158
- sm: string;
159
- md: string;
160
- lg: string;
161
- xl: string;
162
- '2xl': string;
163
- };
164
- align: {
165
- start: string;
166
- center: string;
167
- end: string;
168
- stretch: string;
169
- baseline: string;
170
- };
171
- justify: {
172
- start: string;
173
- center: string;
174
- end: string;
175
- between: string;
176
- around: string;
177
- evenly: string;
178
- };
179
- }>, unknown, unknown, undefined>>;
72
+ start: "justify-start";
73
+ center: "justify-center";
74
+ end: "justify-end";
75
+ between: "justify-between";
76
+ around: "justify-around";
77
+ evenly: "justify-evenly";
78
+ };
79
+ }, undefined>>;
180
80
  export interface RowProps extends Omit<ViewProps, 'className'>, VariantProps<typeof rowVariants> {
181
81
  className?: string;
182
82
  }
183
- declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<View>>;
83
+ declare const Row: ForwardRefComponent<ViewInstance, RowProps>;
184
84
  export { Row, rowVariants };