@butternutbox/pawprint-native 1.6.2 → 2.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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +60 -0
- package/COMPONENT_GUIDELINES.md +57 -1
- package/dist/index.cjs +1459 -1380
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -117
- package/dist/index.d.ts +81 -117
- package/dist/index.js +1206 -1125
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/__mocks__/react-native.tsx +33 -5
- package/src/__mocks__/rn-primitives/portal.tsx +71 -0
- package/src/components/atoms/Input/InputField.tsx +12 -2
- package/src/components/molecules/Drawer/Drawer.test.tsx +54 -2
- package/src/components/molecules/Drawer/DrawerBody.tsx +2 -17
- package/src/components/molecules/Drawer/DrawerContent.tsx +49 -2
- package/src/components/molecules/Drawer/DrawerOverlay.tsx +28 -16
- package/src/components/molecules/SelectField/AsyncSearch.test.tsx +373 -0
- package/src/components/molecules/SelectField/SelectDrawerField.stories.tsx +192 -0
- package/src/components/molecules/SelectField/SelectDrawerField.test.tsx +210 -0
- package/src/components/molecules/SelectField/SelectDrawerField.tsx +245 -0
- package/src/components/molecules/SelectField/SelectField.stories.tsx +221 -421
- package/src/components/molecules/SelectField/SelectField.test.tsx +214 -662
- package/src/components/molecules/SelectField/SelectField.tsx +269 -539
- package/src/components/molecules/SelectField/SelectFieldDropdown.tsx +90 -0
- package/src/components/molecules/SelectField/SelectFieldList.tsx +88 -0
- package/src/components/molecules/SelectField/SelectFieldOption.tsx +90 -0
- package/src/components/molecules/SelectField/core/index.ts +8 -0
- package/src/components/molecules/SelectField/core/listHeight.test.ts +22 -0
- package/src/components/molecules/SelectField/core/listHeight.ts +8 -0
- package/src/components/molecules/SelectField/core/options.ts +35 -0
- package/src/components/molecules/SelectField/core/useSelectOptions.ts +116 -0
- package/src/components/molecules/SelectField/index.ts +12 -9
- package/src/index.ts +0 -1
- package/src/test-utils.tsx +5 -1
- package/vitest.config.ts +7 -0
- package/src/components/molecules/SelectField/SelectFieldContent.tsx +0 -81
- package/src/components/molecules/SelectField/SelectFieldItem.tsx +0 -133
- package/src/components/molecules/SelectField/SelectFieldTrigger.tsx +0 -188
- package/src/components/molecules/SelectField/SelectFieldValue.tsx +0 -33
- package/src/components/molecules/SelectField/hooks/index.ts +0 -2
- package/src/components/molecules/SelectField/hooks/useSelectField.ts +0 -84
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useDrawerKeyboardAvoidance.ts +0 -29
package/dist/index.d.cts
CHANGED
|
@@ -9,11 +9,10 @@ import React__default from 'react';
|
|
|
9
9
|
import * as _emotion_react from '@emotion/react';
|
|
10
10
|
import { Theme } from '@emotion/react';
|
|
11
11
|
import * as react_native from 'react-native';
|
|
12
|
-
import { View, ViewProps, TextProps, Text, PressableProps, FlexStyle, TextInputProps, TextInput, ImageSourcePropType, ScrollViewProps
|
|
12
|
+
import { View, ViewProps, TextProps, Text, PressableProps, FlexStyle, TextInputProps, TextInput, ImageSourcePropType, ScrollViewProps } from 'react-native';
|
|
13
13
|
import * as react_native_reanimated from 'react-native-reanimated';
|
|
14
14
|
import { FadeIn, FadeOut, FadeInUp, FadeOutUp, FadeInDown, FadeOutDown, ComplexAnimationBuilder, BaseAnimationBuilder, EntryExitAnimationFunction, FadeInRight, FadeOutRight, FadeInLeft, FadeOutLeft } from 'react-native-reanimated';
|
|
15
15
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
16
|
-
import { Option } from '@rn-primitives/select';
|
|
17
16
|
import { Locale } from 'date-fns';
|
|
18
17
|
|
|
19
18
|
declare module "@emotion/react" {
|
|
@@ -469,6 +468,7 @@ type InputFieldOwnProps = {
|
|
|
469
468
|
containerWidth?: number;
|
|
470
469
|
containerHeight?: number;
|
|
471
470
|
hasInlineHelp?: boolean;
|
|
471
|
+
onPress?: () => void;
|
|
472
472
|
};
|
|
473
473
|
type InputFieldProps = InputFieldOwnProps & Omit<TextInputProps, keyof InputFieldOwnProps>;
|
|
474
474
|
/**
|
|
@@ -537,14 +537,14 @@ type InputOwnProps = {
|
|
|
537
537
|
onValueChange?: (value: string) => void;
|
|
538
538
|
};
|
|
539
539
|
type InputProps = InputOwnProps & Omit<InputFieldProps, keyof InputOwnProps> & Omit<ViewProps, keyof InputOwnProps>;
|
|
540
|
-
declare const StyledRoot$
|
|
540
|
+
declare const StyledRoot$5: _emotion_native.StyledComponent<ViewProps & {
|
|
541
541
|
theme?: _emotion_react.Theme;
|
|
542
542
|
as?: React__default.ElementType;
|
|
543
543
|
}, {}, {
|
|
544
544
|
ref?: React__default.Ref<View> | undefined;
|
|
545
545
|
}>;
|
|
546
546
|
type InputComponent = React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<View>> & {
|
|
547
|
-
Root: typeof StyledRoot$
|
|
547
|
+
Root: typeof StyledRoot$5;
|
|
548
548
|
Label: typeof InputLabel;
|
|
549
549
|
Field: typeof InputField;
|
|
550
550
|
Description: typeof InputDescription;
|
|
@@ -628,14 +628,14 @@ type NumberInputOwnProps = Pick<InputProps, "label" | "description" | "error" |
|
|
|
628
628
|
inlineHelpText?: string;
|
|
629
629
|
};
|
|
630
630
|
type NumberInputProps = NumberInputOwnProps & Omit<InputFieldProps, keyof NumberInputOwnProps> & Omit<ViewProps, keyof NumberInputOwnProps>;
|
|
631
|
-
declare const StyledRoot$
|
|
631
|
+
declare const StyledRoot$4: _emotion_native.StyledComponent<ViewProps & {
|
|
632
632
|
theme?: _emotion_react.Theme;
|
|
633
633
|
as?: React__default.ElementType;
|
|
634
634
|
}, {}, {
|
|
635
635
|
ref?: React__default.Ref<View> | undefined;
|
|
636
636
|
}>;
|
|
637
637
|
type NumberInputComponent = React__default.ForwardRefExoticComponent<NumberInputProps & React__default.RefAttributes<View>> & {
|
|
638
|
-
Root: typeof StyledRoot$
|
|
638
|
+
Root: typeof StyledRoot$4;
|
|
639
639
|
Label: typeof InputLabel;
|
|
640
640
|
Field: typeof NumberInputField;
|
|
641
641
|
Description: typeof InputDescription;
|
|
@@ -750,14 +750,14 @@ type TextAreaOwnProps = {
|
|
|
750
750
|
onValueChange?: (value: string) => void;
|
|
751
751
|
};
|
|
752
752
|
type TextAreaProps = TextAreaOwnProps & Omit<TextAreaFieldProps, keyof TextAreaOwnProps> & Omit<ViewProps, keyof TextAreaOwnProps>;
|
|
753
|
-
declare const StyledRoot$
|
|
753
|
+
declare const StyledRoot$3: _emotion_native.StyledComponent<ViewProps & {
|
|
754
754
|
theme?: _emotion_react.Theme;
|
|
755
755
|
as?: React__default.ElementType;
|
|
756
756
|
}, {}, {
|
|
757
757
|
ref?: React__default.Ref<View> | undefined;
|
|
758
758
|
}>;
|
|
759
759
|
type TextAreaComponent = React__default.ForwardRefExoticComponent<TextAreaProps & React__default.RefAttributes<View>> & {
|
|
760
|
-
Root: typeof StyledRoot$
|
|
760
|
+
Root: typeof StyledRoot$3;
|
|
761
761
|
Label: typeof TextAreaLabel;
|
|
762
762
|
Field: typeof TextAreaField;
|
|
763
763
|
Description: typeof InputDescription;
|
|
@@ -1008,9 +1008,7 @@ declare const Drawer: React__default.ForwardRefExoticComponent<DrawerRootOwnProp
|
|
|
1008
1008
|
Close: React__default.ForwardRefExoticComponent<{
|
|
1009
1009
|
"aria-label"?: string;
|
|
1010
1010
|
} & Omit<ViewProps, "children"> & React__default.RefAttributes<View>>;
|
|
1011
|
-
Body: React__default.ForwardRefExoticComponent<react_native.ScrollViewProps &
|
|
1012
|
-
ignoreKeyboardAvoidance?: boolean;
|
|
1013
|
-
} & React__default.RefAttributes<react_native.ScrollView>>;
|
|
1011
|
+
Body: React__default.ForwardRefExoticComponent<react_native.ScrollViewProps & React__default.RefAttributes<react_native.ScrollView>>;
|
|
1014
1012
|
Footer: React__default.ForwardRefExoticComponent<ViewProps & React__default.RefAttributes<View>>;
|
|
1015
1013
|
};
|
|
1016
1014
|
|
|
@@ -1034,9 +1032,7 @@ type DrawerCloseProps = {
|
|
|
1034
1032
|
"aria-label"?: string;
|
|
1035
1033
|
} & Omit<ViewProps, "children">;
|
|
1036
1034
|
|
|
1037
|
-
type DrawerBodyProps = ScrollViewProps
|
|
1038
|
-
ignoreKeyboardAvoidance?: boolean;
|
|
1039
|
-
};
|
|
1035
|
+
type DrawerBodyProps = ScrollViewProps;
|
|
1040
1036
|
|
|
1041
1037
|
type DrawerFooterProps = ViewProps;
|
|
1042
1038
|
|
|
@@ -1159,7 +1155,7 @@ type CopyFieldInputOwnProps = {
|
|
|
1159
1155
|
};
|
|
1160
1156
|
declare const CopyFieldInput: React__default.ForwardRefExoticComponent<CopyFieldInputOwnProps & Omit<InputFieldProps, keyof CopyFieldInputOwnProps> & React__default.RefAttributes<TextInput>>;
|
|
1161
1157
|
|
|
1162
|
-
declare const StyledRoot$
|
|
1158
|
+
declare const StyledRoot$2: _emotion_native.StyledComponent<ViewProps & {
|
|
1163
1159
|
theme?: _emotion_react.Theme;
|
|
1164
1160
|
as?: React__default.ElementType;
|
|
1165
1161
|
}, {}, {
|
|
@@ -1177,7 +1173,7 @@ type CopyFieldOwnProps = {
|
|
|
1177
1173
|
};
|
|
1178
1174
|
type CopyFieldProps = CopyFieldOwnProps & Omit<InputFieldProps, keyof CopyFieldOwnProps> & Omit<ViewProps, keyof CopyFieldOwnProps>;
|
|
1179
1175
|
type CopyFieldComponent = React__default.ForwardRefExoticComponent<CopyFieldProps & React__default.RefAttributes<View>> & {
|
|
1180
|
-
Root: typeof StyledRoot$
|
|
1176
|
+
Root: typeof StyledRoot$2;
|
|
1181
1177
|
Label: typeof InputLabel;
|
|
1182
1178
|
Field: typeof CopyFieldInput;
|
|
1183
1179
|
Description: typeof InputDescription;
|
|
@@ -1336,7 +1332,7 @@ type PasswordFieldRequirementsProps = PasswordFieldRequirementsOwnProps & Omit<V
|
|
|
1336
1332
|
*/
|
|
1337
1333
|
declare const PasswordFieldRequirements: React__default.ForwardRefExoticComponent<PasswordFieldRequirementsOwnProps & Omit<ViewProps, keyof PasswordFieldRequirementsOwnProps> & React__default.RefAttributes<View>>;
|
|
1338
1334
|
|
|
1339
|
-
declare const StyledRoot$
|
|
1335
|
+
declare const StyledRoot$1: _emotion_native.StyledComponent<ViewProps & {
|
|
1340
1336
|
theme?: _emotion_react.Theme;
|
|
1341
1337
|
as?: React__default.ElementType;
|
|
1342
1338
|
}, {}, {
|
|
@@ -1354,7 +1350,7 @@ type PasswordFieldOwnProps = {
|
|
|
1354
1350
|
};
|
|
1355
1351
|
type PasswordFieldProps = PasswordFieldOwnProps & Omit<InputFieldProps, keyof PasswordFieldOwnProps> & Omit<ViewProps, keyof PasswordFieldOwnProps>;
|
|
1356
1352
|
type PasswordFieldComponent = React__default.ForwardRefExoticComponent<PasswordFieldProps & React__default.RefAttributes<View>> & {
|
|
1357
|
-
Root: typeof StyledRoot$
|
|
1353
|
+
Root: typeof StyledRoot$1;
|
|
1358
1354
|
Label: typeof InputLabel;
|
|
1359
1355
|
Field: typeof PasswordFieldInput;
|
|
1360
1356
|
Description: typeof InputDescription;
|
|
@@ -1504,7 +1500,7 @@ declare const RadioGroup: RadioGroupComponent;
|
|
|
1504
1500
|
|
|
1505
1501
|
declare const SearchFieldInput: React__default.ForwardRefExoticComponent<Omit<SearchFieldProps, "error" | "label" | "description" | "optionalText"> & React__default.RefAttributes<TextInput>>;
|
|
1506
1502
|
|
|
1507
|
-
declare const StyledRoot
|
|
1503
|
+
declare const StyledRoot: _emotion_native.StyledComponent<ViewProps & {
|
|
1508
1504
|
theme?: _emotion_react.Theme;
|
|
1509
1505
|
as?: React__default.ElementType;
|
|
1510
1506
|
}, {}, {
|
|
@@ -1521,7 +1517,7 @@ type SearchFieldOwnProps = {
|
|
|
1521
1517
|
};
|
|
1522
1518
|
type SearchFieldProps = SearchFieldOwnProps & Omit<InputFieldProps, keyof SearchFieldOwnProps> & Omit<ViewProps, keyof SearchFieldOwnProps>;
|
|
1523
1519
|
type SearchFieldComponent = React__default.ForwardRefExoticComponent<SearchFieldProps & React__default.RefAttributes<View>> & {
|
|
1524
|
-
Root: typeof StyledRoot
|
|
1520
|
+
Root: typeof StyledRoot;
|
|
1525
1521
|
Label: typeof InputLabel;
|
|
1526
1522
|
Field: typeof SearchFieldInput;
|
|
1527
1523
|
Description: typeof InputDescription;
|
|
@@ -1586,54 +1582,43 @@ type SegmentedControlComponent = React__default.ForwardRefExoticComponent<Segmen
|
|
|
1586
1582
|
};
|
|
1587
1583
|
declare const SegmentedControl: SegmentedControlComponent;
|
|
1588
1584
|
|
|
1589
|
-
type
|
|
1590
|
-
state?: InputState;
|
|
1591
|
-
leadingIcon?: React__default.ReactNode;
|
|
1592
|
-
children?: React__default.ReactNode;
|
|
1593
|
-
isOpen?: boolean;
|
|
1594
|
-
isSearching?: boolean;
|
|
1595
|
-
actionIcon?: React__default.ReactNode;
|
|
1596
|
-
};
|
|
1597
|
-
type SelectFieldTriggerProps = SelectFieldTriggerOwnProps & Omit<PressableProps, keyof SelectFieldTriggerOwnProps>;
|
|
1598
|
-
declare const SelectFieldTrigger: React__default.ForwardRefExoticComponent<SelectFieldTriggerOwnProps & Omit<PressableProps, keyof SelectFieldTriggerOwnProps> & React__default.RefAttributes<View>>;
|
|
1599
|
-
|
|
1600
|
-
declare const SelectFieldValue: React__default.ForwardRefExoticComponent<{
|
|
1601
|
-
placeholder?: string;
|
|
1602
|
-
hasValue?: boolean;
|
|
1603
|
-
} & Omit<ViewProps, "children"> & React__default.RefAttributes<View>>;
|
|
1604
|
-
|
|
1605
|
-
declare const SelectFieldContent: React__default.ForwardRefExoticComponent<{
|
|
1606
|
-
children?: React__default.ReactNode;
|
|
1607
|
-
} & Omit<ViewProps, "children"> & React__default.RefAttributes<View>>;
|
|
1608
|
-
|
|
1609
|
-
type SelectFieldItemOwnProps = {
|
|
1585
|
+
type SelectFieldOptionData = {
|
|
1610
1586
|
value: string;
|
|
1587
|
+
label: string;
|
|
1611
1588
|
leadingIcon?: React__default.ReactNode;
|
|
1612
|
-
hintText?: string;
|
|
1613
1589
|
disabled?: boolean;
|
|
1614
|
-
isSelected?: boolean;
|
|
1615
1590
|
};
|
|
1616
|
-
|
|
1617
|
-
declare const
|
|
1591
|
+
declare const matchOptions: (options: SelectFieldOptionData[], query: string) => SelectFieldOptionData[];
|
|
1592
|
+
declare const labelFor: (options: SelectFieldOptionData[], value: string | null | undefined) => string;
|
|
1618
1593
|
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
type SelectFieldSearchResult = {
|
|
1630
|
-
value: string;
|
|
1631
|
-
label: string;
|
|
1594
|
+
type SelectOptionsResolver = (query: string) => Promise<SelectFieldOptionData[]>;
|
|
1595
|
+
|
|
1596
|
+
type SelectFieldOwnProps = {
|
|
1597
|
+
options: SelectFieldOptionData[];
|
|
1598
|
+
label?: string;
|
|
1599
|
+
description?: string;
|
|
1600
|
+
error?: string;
|
|
1601
|
+
state?: InputState;
|
|
1602
|
+
optionalText?: string;
|
|
1603
|
+
placeholder?: string;
|
|
1632
1604
|
leadingIcon?: React__default.ReactNode;
|
|
1633
|
-
|
|
1605
|
+
noResultsText?: string;
|
|
1606
|
+
errorText?: string;
|
|
1607
|
+
onSearchQuery?: SelectOptionsResolver;
|
|
1608
|
+
debounceMs?: number;
|
|
1609
|
+
minQueryLength?: number;
|
|
1610
|
+
searchHintText?: string;
|
|
1611
|
+
clearAccessibilityLabel?: string;
|
|
1634
1612
|
disabled?: boolean;
|
|
1613
|
+
value?: string | null;
|
|
1614
|
+
defaultValue?: string | null;
|
|
1615
|
+
onValueChange?: (value: string | null) => void;
|
|
1635
1616
|
};
|
|
1636
|
-
type
|
|
1617
|
+
type SelectFieldProps = SelectFieldOwnProps & Omit<ViewProps, keyof SelectFieldOwnProps>;
|
|
1618
|
+
declare const SelectField: React__default.ForwardRefExoticComponent<SelectFieldOwnProps & Omit<ViewProps, keyof SelectFieldOwnProps> & React__default.RefAttributes<View>>;
|
|
1619
|
+
|
|
1620
|
+
type SelectDrawerFieldOwnProps = {
|
|
1621
|
+
options: SelectFieldOptionData[];
|
|
1637
1622
|
label?: string;
|
|
1638
1623
|
description?: string;
|
|
1639
1624
|
error?: string;
|
|
@@ -1641,67 +1626,50 @@ type SelectFieldOwnProps<Value = Option | string> = {
|
|
|
1641
1626
|
optionalText?: string;
|
|
1642
1627
|
placeholder?: string;
|
|
1643
1628
|
leadingIcon?: React__default.ReactNode;
|
|
1644
|
-
|
|
1645
|
-
defaultValue?: Value | null;
|
|
1646
|
-
onValueChange?: (value: Value | null) => void;
|
|
1647
|
-
children?: React__default.ReactNode;
|
|
1648
|
-
disabled?: boolean;
|
|
1629
|
+
drawerTitle?: string;
|
|
1649
1630
|
searchable?: boolean;
|
|
1650
1631
|
searchPlaceholder?: string;
|
|
1651
1632
|
noResultsText?: string;
|
|
1652
|
-
onSearchQuery?: (query: string) => Promise<SelectFieldSearchResult[]>;
|
|
1653
|
-
debounceMs?: number;
|
|
1654
1633
|
errorText?: string;
|
|
1634
|
+
onSearchQuery?: SelectOptionsResolver;
|
|
1635
|
+
debounceMs?: number;
|
|
1636
|
+
minQueryLength?: number;
|
|
1637
|
+
searchHintText?: string;
|
|
1638
|
+
clearAccessibilityLabel?: string;
|
|
1639
|
+
listMaxHeight?: number;
|
|
1640
|
+
disabled?: boolean;
|
|
1641
|
+
value?: string | null;
|
|
1642
|
+
defaultValue?: string | null;
|
|
1643
|
+
onValueChange?: (value: string | null) => void;
|
|
1655
1644
|
};
|
|
1656
|
-
type
|
|
1657
|
-
|
|
1658
|
-
Root: typeof StyledRoot;
|
|
1659
|
-
Label: typeof InputLabel;
|
|
1660
|
-
Trigger: typeof SelectFieldTrigger;
|
|
1661
|
-
Value: typeof SelectFieldValue;
|
|
1662
|
-
Content: typeof SelectFieldContent;
|
|
1663
|
-
Item: typeof SelectFieldItem;
|
|
1664
|
-
Description: typeof InputDescription;
|
|
1665
|
-
Error: typeof InputError;
|
|
1666
|
-
};
|
|
1667
|
-
declare const SelectField: SelectFieldComponent;
|
|
1645
|
+
type SelectDrawerFieldProps = SelectDrawerFieldOwnProps & Omit<ViewProps, keyof SelectDrawerFieldOwnProps>;
|
|
1646
|
+
declare const SelectDrawerField: React__default.ForwardRefExoticComponent<SelectDrawerFieldOwnProps & Omit<ViewProps, keyof SelectDrawerFieldOwnProps> & React__default.RefAttributes<View>>;
|
|
1668
1647
|
|
|
1669
|
-
type
|
|
1670
|
-
|
|
1671
|
-
|
|
1648
|
+
type SelectFieldOptionOwnProps = {
|
|
1649
|
+
label: string;
|
|
1650
|
+
leadingIcon?: React__default.ReactNode;
|
|
1651
|
+
disabled?: boolean;
|
|
1652
|
+
isSelected?: boolean;
|
|
1672
1653
|
};
|
|
1673
|
-
type
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1654
|
+
type SelectFieldOptionProps = SelectFieldOptionOwnProps & Omit<PressableProps, keyof SelectFieldOptionOwnProps>;
|
|
1655
|
+
declare const SelectFieldOption: React__default.ForwardRefExoticComponent<SelectFieldOptionOwnProps & Omit<PressableProps, keyof SelectFieldOptionOwnProps> & React__default.RefAttributes<View>>;
|
|
1656
|
+
|
|
1657
|
+
type SelectFieldPlacement = "below" | "above";
|
|
1658
|
+
type SelectFieldAnchorRect = {
|
|
1659
|
+
x: number;
|
|
1660
|
+
y: number;
|
|
1661
|
+
width: number;
|
|
1662
|
+
height: number;
|
|
1677
1663
|
};
|
|
1678
|
-
type
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1664
|
+
type SelectFieldDropdownOwnProps = {
|
|
1665
|
+
anchor: SelectFieldAnchorRect;
|
|
1666
|
+
placement: SelectFieldPlacement;
|
|
1667
|
+
maxHeight: number;
|
|
1668
|
+
screenHeight: number;
|
|
1669
|
+
children?: React__default.ReactNode;
|
|
1683
1670
|
};
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
* Handles value, validation state, and error message automatically.
|
|
1687
|
-
*
|
|
1688
|
-
* @example
|
|
1689
|
-
* ```tsx
|
|
1690
|
-
* // Simple usage without validation
|
|
1691
|
-
* const selectProps = useSelectField()
|
|
1692
|
-
* <SelectField {...selectProps} label="Country" />
|
|
1693
|
-
*
|
|
1694
|
-
* // With validation rule
|
|
1695
|
-
* const selectProps = useSelectField({
|
|
1696
|
-
* validationRule: {
|
|
1697
|
-
* test: (v) => v !== null,
|
|
1698
|
-
* message: "Please select an option"
|
|
1699
|
-
* }
|
|
1700
|
-
* })
|
|
1701
|
-
* <SelectField {...selectProps} label="Category" />
|
|
1702
|
-
* ```
|
|
1703
|
-
*/
|
|
1704
|
-
declare function useSelectField<T = string | Option>(options?: SelectOptions<T>): SelectReturn<T>;
|
|
1671
|
+
type SelectFieldDropdownProps = SelectFieldDropdownOwnProps & Omit<ViewProps, keyof SelectFieldDropdownOwnProps>;
|
|
1672
|
+
declare const SelectFieldDropdown: React__default.ForwardRefExoticComponent<SelectFieldDropdownOwnProps & Omit<ViewProps, keyof SelectFieldDropdownOwnProps> & React__default.RefAttributes<View>>;
|
|
1705
1673
|
|
|
1706
1674
|
type NativeSelectPickerItem = {
|
|
1707
1675
|
label: string;
|
|
@@ -2720,8 +2688,4 @@ type NavigationHeaderComponent = React__default.ForwardRefExoticComponent<Naviga
|
|
|
2720
2688
|
};
|
|
2721
2689
|
declare const NavigationHeader: NavigationHeaderComponent;
|
|
2722
2690
|
|
|
2723
|
-
|
|
2724
|
-
contentContainerStyle: StyleProp<ViewStyle>;
|
|
2725
|
-
};
|
|
2726
|
-
|
|
2727
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, FloatingActionButton, type FloatingActionButtonAnimation, type FloatingActionButtonIconButtonIcon, type FloatingActionButtonProps, type FloatingActionButtonVariant, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, type MenuAnchorRect, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, NavigationHeader, NavigationHeaderButton, type NavigationHeaderButtonProps, NavigationHeaderIconButton, type NavigationHeaderIconButtonProps, type NavigationHeaderProps, type NavigationHeaderSurface, type NavigationHeaderVariant, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PROGRESS_ANIMATION, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectField, SelectFieldContent, SelectFieldItem, type SelectFieldItemProps, type SelectFieldProps, type SelectFieldSearchResult, SelectFieldTrigger, type SelectFieldTriggerProps, SelectFieldValue, type SelectValidationRule, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, registerLogo, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useDrawerKeyboardAvoidance, useMenuTrigger, usePasswordField, usePawprint, useSearchField, useSelectField };
|
|
2691
|
+
export { Accordion, type AccordionItemProps, type AccordionProps, type AccordionSize, Animated, type AnimatedProps, type AnimatedVariant, Avatar, type AvatarFallbackType, type AvatarProps, type AvatarSize, Badge$1 as Badge, type BadgeProps, Button, type ButtonColour, ButtonDock, type ButtonDockProps, type ButtonDockVariant, ButtonGroup, type ButtonGroupLayout, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, CarouselControls, type CarouselControlsProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxVariant, CopyField, CopyFieldInput, type CopyFieldProps, Countdown, type CountdownLabels, type CountdownProps, type CountdownUnitLabel, type DateItemState, DatePicker, type DatePickerProps, Divider, type DividerColour, type DividerProps, type DividerSize, Drawer, type DrawerBodyProps, type DrawerCloseProps, type DrawerContentProps, type DrawerDescriptionProps, type DrawerFooterProps, type DrawerGrabberProps, type DrawerHeaderProps, type DrawerHeaderVariant, type DrawerOverlayProps, type DrawerOverlayProviderProps, type DrawerPortalProps, type DrawerProps, type DrawerTitleProps, type DrawerTriggerProps, FilterTab, type FilterTabItemProps, type FilterTabProps, FloatingActionButton, type FloatingActionButtonAnimation, type FloatingActionButtonIconButtonIcon, type FloatingActionButtonProps, type FloatingActionButtonVariant, Hint, type HintProps, Icon, IconButton, type IconButtonColour, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconCategory, type IconColour, type IconProps, type IconSize, Illustration, type IllustrationProps, type IllustrationSize, Input, InputDescription, type InputDescriptionProps, InputError, type InputErrorProps, InputField, type InputFieldProps, InputLabel, type InputLabelProps, type InputProps, InputText, Link, type LinkProps, type LinkSize, type LinkWeight, Logo, type LogoBrand, type LogoProps, type LogoSvgComponent, type LogoVariant, Menu, type MenuAlign, type MenuAnchorRect, MenuItem, type MenuItemProps, type MenuItemVariant, type MenuProps, MessageCard, MessageCardBanner, type MessageCardBannerMedia, type MessageCardBannerProps, MessageCardInsight, type MessageCardInsightProps, NativeSelectPicker, type NativeSelectPickerItem, type NativeSelectPickerProps, NavigationHeader, NavigationHeaderButton, type NavigationHeaderButtonProps, NavigationHeaderIconButton, type NavigationHeaderIconButtonProps, type NavigationHeaderProps, type NavigationHeaderSurface, type NavigationHeaderVariant, Notification, type NotificationProps, NumberField, type NumberFieldProps, NumberInput, NumberInputField, type NumberInputFieldProps, type NumberInputProps, PROGRESS_ANIMATION, PasswordField, PasswordFieldInput, type PasswordFieldProps, PasswordFieldRequirements, type PasswordFieldRequirementsProps, type PasswordRequirement, type PasswordValidationRule, type PawprintIcon, type PawprintIllustration$2 as PawprintIllustration, PawprintProvider, type PawprintProviderProps, PictureSelector, type PictureSelectorItem, type PictureSelectorProps, ProductDisplayCard, type ProductDisplayCardProps, ProductListingCardWithBadgeAndGrid as ProductListingCard, type ProductListingCardProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOwnProps, type RadioProps, RadioTile, SearchField, SearchFieldInput, type SearchFieldProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, SelectDrawerField, type SelectDrawerFieldProps, SelectField, SelectFieldDropdown, type SelectFieldDropdownProps, SelectFieldOption, type SelectFieldOptionData, type SelectFieldOptionProps, type SelectFieldPlacement, type SelectFieldProps, Slider, type SliderProps, Spinner, type SpinnerProps, type SpinnerSize, type SpinnerVariant, type StackedNotificationItem, type StackedNotificationType, StackedNotifications, type StackedNotificationsProps, Switch, type SwitchProps, TabNavigation, type TabNavigationListProps, type TabNavigationPanelProps, type TabNavigationProps, type TabNavigationTabProps, Tag, type TagProps, TextArea, TextAreaField, type TextAreaFieldProps, TextAreaLabel, type TextAreaLabelProps, type TextAreaProps, ThemeProvider, Tooltip, type TooltipProps, Typography, type TypographyProps, createPawprintTheme, fadeAnimation, fadeDownAnimation, fadeUpAnimation, labelFor, matchOptions, registerLogo, resolveLogo, scaleAnimation, slideInAnimation, slideOutAnimation, theme, useCopyField, useMenuTrigger, usePasswordField, usePawprint, useSearchField };
|