@yahoo/uds-mobile 2.14.0 → 2.16.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 +27 -24
- package/dist/components/Avatar/Avatar.cjs +45 -0
- package/dist/components/Avatar/Avatar.d.cts +19 -0
- package/dist/components/Avatar/Avatar.d.cts.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +19 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.js +45 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/AvatarIcon.cjs +47 -0
- package/dist/components/Avatar/AvatarIcon.d.cts +9 -0
- package/dist/components/Avatar/AvatarIcon.d.cts.map +1 -0
- package/dist/components/Avatar/AvatarIcon.d.ts +9 -0
- package/dist/components/Avatar/AvatarIcon.d.ts.map +1 -0
- package/dist/components/Avatar/AvatarIcon.js +47 -0
- package/dist/components/Avatar/AvatarIcon.js.map +1 -0
- package/dist/components/Avatar/AvatarImage.cjs +81 -0
- package/dist/components/Avatar/AvatarImage.d.cts +9 -0
- package/dist/components/Avatar/AvatarImage.d.cts.map +1 -0
- package/dist/components/Avatar/AvatarImage.d.ts +9 -0
- package/dist/components/Avatar/AvatarImage.d.ts.map +1 -0
- package/dist/components/Avatar/AvatarImage.js +81 -0
- package/dist/components/Avatar/AvatarImage.js.map +1 -0
- package/dist/components/Avatar/AvatarText.cjs +49 -0
- package/dist/components/Avatar/AvatarText.d.cts +9 -0
- package/dist/components/Avatar/AvatarText.d.cts.map +1 -0
- package/dist/components/Avatar/AvatarText.d.ts +9 -0
- package/dist/components/Avatar/AvatarText.d.ts.map +1 -0
- package/dist/components/Avatar/AvatarText.js +49 -0
- package/dist/components/Avatar/AvatarText.js.map +1 -0
- package/dist/components/Avatar/index.cjs +10 -0
- package/dist/components/Avatar/index.d.cts +7 -0
- package/dist/components/Avatar/index.d.ts +7 -0
- package/dist/components/Avatar/index.js +6 -0
- package/dist/components/Avatar/types.cjs +1 -0
- package/dist/components/Avatar/types.d.cts +28 -0
- package/dist/components/Avatar/types.d.cts.map +1 -0
- package/dist/components/Avatar/types.d.ts +28 -0
- package/dist/components/Avatar/types.d.ts.map +1 -0
- package/dist/components/Avatar/types.js +1 -0
- package/dist/components/Avatar/utils.cjs +38 -0
- package/dist/components/Avatar/utils.d.cts +14 -0
- package/dist/components/Avatar/utils.d.cts.map +1 -0
- package/dist/components/Avatar/utils.d.ts +14 -0
- package/dist/components/Avatar/utils.d.ts.map +1 -0
- package/dist/components/Avatar/utils.js +35 -0
- package/dist/components/Avatar/utils.js.map +1 -0
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.js +1 -1
- package/dist/components/Chip/Chip.cjs +54 -0
- package/dist/components/Chip/Chip.d.cts +19 -0
- package/dist/components/Chip/Chip.d.cts.map +1 -0
- package/dist/components/Chip/Chip.d.ts +19 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/Chip.js +54 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/ChipBase.cjs +119 -0
- package/dist/components/Chip/ChipBase.d.cts +13 -0
- package/dist/components/Chip/ChipBase.d.cts.map +1 -0
- package/dist/components/Chip/ChipBase.d.ts +13 -0
- package/dist/components/Chip/ChipBase.d.ts.map +1 -0
- package/dist/components/Chip/ChipBase.js +116 -0
- package/dist/components/Chip/ChipBase.js.map +1 -0
- package/dist/components/Chip/ChipButton.cjs +18 -0
- package/dist/components/Chip/ChipButton.d.cts +9 -0
- package/dist/components/Chip/ChipButton.d.cts.map +1 -0
- package/dist/components/Chip/ChipButton.d.ts +9 -0
- package/dist/components/Chip/ChipButton.d.ts.map +1 -0
- package/dist/components/Chip/ChipButton.js +18 -0
- package/dist/components/Chip/ChipButton.js.map +1 -0
- package/dist/components/Chip/ChipDismissible.cjs +49 -0
- package/dist/components/Chip/ChipDismissible.d.cts +9 -0
- package/dist/components/Chip/ChipDismissible.d.cts.map +1 -0
- package/dist/components/Chip/ChipDismissible.d.ts +9 -0
- package/dist/components/Chip/ChipDismissible.d.ts.map +1 -0
- package/dist/components/Chip/ChipDismissible.js +49 -0
- package/dist/components/Chip/ChipDismissible.js.map +1 -0
- package/dist/components/Chip/ChipToggle.cjs +32 -0
- package/dist/components/Chip/ChipToggle.d.cts +9 -0
- package/dist/components/Chip/ChipToggle.d.cts.map +1 -0
- package/dist/components/Chip/ChipToggle.d.ts +9 -0
- package/dist/components/Chip/ChipToggle.d.ts.map +1 -0
- package/dist/components/Chip/ChipToggle.js +32 -0
- package/dist/components/Chip/ChipToggle.js.map +1 -0
- package/dist/components/Chip/chipTheme.cjs +23 -0
- package/dist/components/Chip/chipTheme.d.cts +14 -0
- package/dist/components/Chip/chipTheme.d.cts.map +1 -0
- package/dist/components/Chip/chipTheme.d.ts +14 -0
- package/dist/components/Chip/chipTheme.d.ts.map +1 -0
- package/dist/components/Chip/chipTheme.js +24 -0
- package/dist/components/Chip/chipTheme.js.map +1 -0
- package/dist/components/Chip/index.cjs +10 -0
- package/dist/components/Chip/index.d.cts +7 -0
- package/dist/components/Chip/index.d.ts +7 -0
- package/dist/components/Chip/index.js +6 -0
- package/dist/components/Chip/types.cjs +1 -0
- package/dist/components/Chip/types.d.cts +76 -0
- package/dist/components/Chip/types.d.cts.map +1 -0
- package/dist/components/Chip/types.d.ts +76 -0
- package/dist/components/Chip/types.d.ts.map +1 -0
- package/dist/components/Chip/types.js +1 -0
- package/dist/components/Input.cjs +17 -14
- package/dist/components/Input.d.cts.map +1 -1
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +17 -14
- package/dist/components/Input.js.map +1 -1
- package/dist/components/InputHelpText.cjs +52 -0
- package/dist/components/InputHelpText.d.cts +37 -0
- package/dist/components/InputHelpText.d.cts.map +1 -0
- package/dist/components/InputHelpText.d.ts +37 -0
- package/dist/components/InputHelpText.d.ts.map +1 -0
- package/dist/components/InputHelpText.js +52 -0
- package/dist/components/InputHelpText.js.map +1 -0
- package/dist/components/internal/Overlay/OverlayPortal.cjs +20 -0
- package/dist/components/internal/Overlay/OverlayPortal.d.cts +17 -0
- package/dist/components/internal/Overlay/OverlayPortal.d.cts.map +1 -0
- package/dist/components/internal/Overlay/OverlayPortal.d.ts +17 -0
- package/dist/components/internal/Overlay/OverlayPortal.d.ts.map +1 -0
- package/dist/components/internal/Overlay/OverlayPortal.js +20 -0
- package/dist/components/internal/Overlay/OverlayPortal.js.map +1 -0
- package/dist/components/internal/Overlay/index.cjs +6 -0
- package/dist/components/internal/Overlay/index.d.cts +5 -0
- package/dist/components/internal/Overlay/index.d.ts +5 -0
- package/dist/components/internal/Overlay/index.js +4 -0
- package/dist/components/internal/Overlay/types.cjs +1 -0
- package/dist/components/internal/Overlay/types.d.cts +21 -0
- package/dist/components/internal/Overlay/types.d.cts.map +1 -0
- package/dist/components/internal/Overlay/types.d.ts +21 -0
- package/dist/components/internal/Overlay/types.d.ts.map +1 -0
- package/dist/components/internal/Overlay/types.js +1 -0
- package/dist/components/internal/Overlay/useControllableState.cjs +34 -0
- package/dist/components/internal/Overlay/useControllableState.d.cts +18 -0
- package/dist/components/internal/Overlay/useControllableState.d.cts.map +1 -0
- package/dist/components/internal/Overlay/useControllableState.d.ts +18 -0
- package/dist/components/internal/Overlay/useControllableState.d.ts.map +1 -0
- package/dist/components/internal/Overlay/useControllableState.js +34 -0
- package/dist/components/internal/Overlay/useControllableState.js.map +1 -0
- package/dist/portal.cjs +1 -0
- package/dist/portal.d.cts +6 -1
- package/dist/portal.d.cts.map +1 -1
- package/dist/portal.d.ts +6 -1
- package/dist/portal.d.ts.map +1 -1
- package/dist/portal.js +1 -1
- package/dist/portal.js.map +1 -1
- package/dist/types/dist/index.d.cts +36 -1
- package/dist/types/dist/index.d.cts.map +1 -1
- package/dist/types/dist/index.d.ts +36 -1
- package/dist/types/dist/index.d.ts.map +1 -1
- package/fonts/index.cjs +219 -219
- package/fonts/index.mjs +219 -219
- package/generated/styles.cjs +114 -0
- package/generated/styles.d.ts +29 -0
- package/generated/styles.mjs +114 -0
- package/generated/unistyles.d.ts +110 -0
- package/package.json +19 -9
- package/dist/components/Avatar.cjs +0 -116
- package/dist/components/Avatar.d.cts +0 -68
- package/dist/components/Avatar.d.cts.map +0 -1
- package/dist/components/Avatar.d.ts +0 -68
- package/dist/components/Avatar.d.ts.map +0 -1
- package/dist/components/Avatar.js +0 -116
- package/dist/components/Avatar.js.map +0 -1
- package/dist/components/Chip.cjs +0 -139
- package/dist/components/Chip.d.cts +0 -82
- package/dist/components/Chip.d.cts.map +0 -1
- package/dist/components/Chip.d.ts +0 -82
- package/dist/components/Chip.d.ts.map +0 -1
- package/dist/components/Chip.js +0 -139
- package/dist/components/Chip.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
import { ChipSize, ChipVariant } from "../../types/dist/index.cjs";
|
|
3
|
+
import { IconSlotType } from "../IconSlot.cjs";
|
|
4
|
+
import { ReactNode, Ref } from "react";
|
|
5
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Chip/types.d.ts
|
|
8
|
+
type ChipInteractionState = 'rest' | 'pressed';
|
|
9
|
+
type ChipKind = 'dismissible' | 'link' | 'toggle';
|
|
10
|
+
type ChipToggleState = 'off' | 'on';
|
|
11
|
+
interface ChipSharedProps extends Omit<ViewProps, 'children' | 'style'> {
|
|
12
|
+
/** Ref to the underlying View. */
|
|
13
|
+
ref?: Ref<View>;
|
|
14
|
+
/** The visual style variant. @default 'primary' */
|
|
15
|
+
variant?: ChipVariant;
|
|
16
|
+
/** The size of the chip. @default 'md' */
|
|
17
|
+
size?: ChipSize;
|
|
18
|
+
/** Minimum width of the chip in pixels. */
|
|
19
|
+
minWidth?: number;
|
|
20
|
+
/** Maximum width of the chip in pixels. @default 200 */
|
|
21
|
+
maxWidth?: number;
|
|
22
|
+
/** Icon displayed at the start of the chip. */
|
|
23
|
+
startIcon?: IconSlotType;
|
|
24
|
+
/** Icon displayed at the end of the chip. */
|
|
25
|
+
endIcon?: IconSlotType;
|
|
26
|
+
/** Whether the chip is disabled. */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Chip label content. */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/** Style override for the chip root. */
|
|
31
|
+
style?: StyleProp<ViewStyle>;
|
|
32
|
+
}
|
|
33
|
+
interface ChipButtonProps extends ChipSharedProps {
|
|
34
|
+
/** Called when the chip is pressed. */
|
|
35
|
+
onPress?: () => void;
|
|
36
|
+
}
|
|
37
|
+
interface ChipDismissibleProps extends Omit<ChipSharedProps, 'endIcon'> {
|
|
38
|
+
/** Called when the dismiss button is pressed. */
|
|
39
|
+
onDismiss?: () => void;
|
|
40
|
+
/** Accessibility label for the dismiss button. */
|
|
41
|
+
dismissButtonAriaLabel?: string;
|
|
42
|
+
/** Custom icon for the dismiss button. */
|
|
43
|
+
dismissIcon?: IconSlotType;
|
|
44
|
+
}
|
|
45
|
+
interface ChipToggleProps extends ChipSharedProps {
|
|
46
|
+
/** Whether the chip is toggled/selected. */
|
|
47
|
+
isToggled?: boolean;
|
|
48
|
+
/** Called when the chip toggle state changes. */
|
|
49
|
+
onToggle?: (isToggled: boolean) => void;
|
|
50
|
+
}
|
|
51
|
+
interface ChipProps extends ChipSharedProps {
|
|
52
|
+
/** Called when the chip is pressed. Makes the chip interactive. */
|
|
53
|
+
onPress?: () => void;
|
|
54
|
+
/** Whether the chip is toggled/selected. */
|
|
55
|
+
isToggled?: boolean;
|
|
56
|
+
/** Called when the chip toggle state changes. */
|
|
57
|
+
onToggle?: (isToggled: boolean) => void;
|
|
58
|
+
/** Called when the dismiss button is pressed. Shows a dismiss icon. */
|
|
59
|
+
onDismiss?: () => void;
|
|
60
|
+
/** Accessibility label for the dismiss button. */
|
|
61
|
+
dismissButtonAriaLabel?: string;
|
|
62
|
+
/** Custom icon for the dismiss button. */
|
|
63
|
+
dismissIcon?: IconSlotType;
|
|
64
|
+
}
|
|
65
|
+
interface ChipBaseProps extends ChipSharedProps {
|
|
66
|
+
kind: ChipKind;
|
|
67
|
+
toggleState?: ChipToggleState;
|
|
68
|
+
interactionState?: ChipInteractionState;
|
|
69
|
+
pressable?: boolean;
|
|
70
|
+
accessibilityRole?: ViewProps['accessibilityRole'];
|
|
71
|
+
onPress?: () => void;
|
|
72
|
+
endContent?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { type ChipBaseProps, type ChipButtonProps, type ChipDismissibleProps, type ChipInteractionState, type ChipKind, type ChipProps, type ChipSharedProps, type ChipSize, type ChipToggleProps, type ChipToggleState, type ChipVariant };
|
|
76
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/components/Chip/types.ts"],"mappings":";;;;;;;KAMK,oBAAA;AAAA,KACA,QAAA;AAAA,KACA,eAAA;AAAA,UAEK,eAAA,SAAwB,IAAA,CAAK,SAAA;;EAErC,GAAA,GAAM,GAAA,CAAI,IAAA;EANa;EAQvB,OAAA,GAAU,WAAA;EAPC;EASX,IAAA,GAAO,QAAA;EATI;EAWX,QAAA;EAVG;EAYH,QAAA;;EAEA,SAAA,GAAY,YAAA;EAdM;EAgBlB,OAAA,GAAU,YAAA;EAdc;EAgBxB,QAAA;EAhBqC;EAkBrC,QAAA,GAAW,SAAA;EAhBL;EAkBN,KAAA,GAAQ,SAAA,CAAU,SAAA;AAAA;AAAA,UAGV,eAAA,SAAwB,eAAA;EATtB;EAWV,OAAA;AAAA;AAAA,UAGQ,oBAAA,SAA6B,IAAA,CAAK,eAAA;EA5BV;EA8BhC,SAAA;EA9BoC;EAgCpC,sBAAA;EAhCqC;EAkCrC,WAAA,GAAc,YAAA;AAAA;AAAA,UAGN,eAAA,SAAwB,eAAA;EAjChC;EAmCA,SAAA;EAjCA;EAmCA,QAAA,IAAY,SAAA;AAAA;AAAA,UAGJ,SAAA,SAAkB,eAAA;EAhC1B;EAkCA,OAAA;EAhCA;EAkCA,SAAA;EAhCA;EAkCA,QAAA,IAAY,SAAA;EAhCD;EAkCX,SAAA;EAhCQ;EAkCR,sBAAA;EAlC2B;EAoC3B,WAAA,GAAc,YAAA;AAAA;AAAA,UAGN,aAAA,SAAsB,eAAA;EAC9B,IAAA,EAAM,QAAA;EACN,WAAA,GAAc,eAAA;EACd,gBAAA,GAAmB,oBAAA;EACnB,SAAA;EACA,iBAAA,GAAoB,SAAA;EACpB,OAAA;EACA,UAAA,GAAa,SAAA;AAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
import { ChipSize, ChipVariant } from "../../types/dist/index.js";
|
|
3
|
+
import { IconSlotType } from "../IconSlot.js";
|
|
4
|
+
import { ReactNode, Ref } from "react";
|
|
5
|
+
import { StyleProp, View, ViewProps, ViewStyle } from "react-native";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Chip/types.d.ts
|
|
8
|
+
type ChipInteractionState = 'rest' | 'pressed';
|
|
9
|
+
type ChipKind = 'dismissible' | 'link' | 'toggle';
|
|
10
|
+
type ChipToggleState = 'off' | 'on';
|
|
11
|
+
interface ChipSharedProps extends Omit<ViewProps, 'children' | 'style'> {
|
|
12
|
+
/** Ref to the underlying View. */
|
|
13
|
+
ref?: Ref<View>;
|
|
14
|
+
/** The visual style variant. @default 'primary' */
|
|
15
|
+
variant?: ChipVariant;
|
|
16
|
+
/** The size of the chip. @default 'md' */
|
|
17
|
+
size?: ChipSize;
|
|
18
|
+
/** Minimum width of the chip in pixels. */
|
|
19
|
+
minWidth?: number;
|
|
20
|
+
/** Maximum width of the chip in pixels. @default 200 */
|
|
21
|
+
maxWidth?: number;
|
|
22
|
+
/** Icon displayed at the start of the chip. */
|
|
23
|
+
startIcon?: IconSlotType;
|
|
24
|
+
/** Icon displayed at the end of the chip. */
|
|
25
|
+
endIcon?: IconSlotType;
|
|
26
|
+
/** Whether the chip is disabled. */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Chip label content. */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/** Style override for the chip root. */
|
|
31
|
+
style?: StyleProp<ViewStyle>;
|
|
32
|
+
}
|
|
33
|
+
interface ChipButtonProps extends ChipSharedProps {
|
|
34
|
+
/** Called when the chip is pressed. */
|
|
35
|
+
onPress?: () => void;
|
|
36
|
+
}
|
|
37
|
+
interface ChipDismissibleProps extends Omit<ChipSharedProps, 'endIcon'> {
|
|
38
|
+
/** Called when the dismiss button is pressed. */
|
|
39
|
+
onDismiss?: () => void;
|
|
40
|
+
/** Accessibility label for the dismiss button. */
|
|
41
|
+
dismissButtonAriaLabel?: string;
|
|
42
|
+
/** Custom icon for the dismiss button. */
|
|
43
|
+
dismissIcon?: IconSlotType;
|
|
44
|
+
}
|
|
45
|
+
interface ChipToggleProps extends ChipSharedProps {
|
|
46
|
+
/** Whether the chip is toggled/selected. */
|
|
47
|
+
isToggled?: boolean;
|
|
48
|
+
/** Called when the chip toggle state changes. */
|
|
49
|
+
onToggle?: (isToggled: boolean) => void;
|
|
50
|
+
}
|
|
51
|
+
interface ChipProps extends ChipSharedProps {
|
|
52
|
+
/** Called when the chip is pressed. Makes the chip interactive. */
|
|
53
|
+
onPress?: () => void;
|
|
54
|
+
/** Whether the chip is toggled/selected. */
|
|
55
|
+
isToggled?: boolean;
|
|
56
|
+
/** Called when the chip toggle state changes. */
|
|
57
|
+
onToggle?: (isToggled: boolean) => void;
|
|
58
|
+
/** Called when the dismiss button is pressed. Shows a dismiss icon. */
|
|
59
|
+
onDismiss?: () => void;
|
|
60
|
+
/** Accessibility label for the dismiss button. */
|
|
61
|
+
dismissButtonAriaLabel?: string;
|
|
62
|
+
/** Custom icon for the dismiss button. */
|
|
63
|
+
dismissIcon?: IconSlotType;
|
|
64
|
+
}
|
|
65
|
+
interface ChipBaseProps extends ChipSharedProps {
|
|
66
|
+
kind: ChipKind;
|
|
67
|
+
toggleState?: ChipToggleState;
|
|
68
|
+
interactionState?: ChipInteractionState;
|
|
69
|
+
pressable?: boolean;
|
|
70
|
+
accessibilityRole?: ViewProps['accessibilityRole'];
|
|
71
|
+
onPress?: () => void;
|
|
72
|
+
endContent?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { type ChipBaseProps, type ChipButtonProps, type ChipDismissibleProps, type ChipInteractionState, type ChipKind, type ChipProps, type ChipSharedProps, type ChipSize, type ChipToggleProps, type ChipToggleState, type ChipVariant };
|
|
76
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/components/Chip/types.ts"],"mappings":";;;;;;;KAMK,oBAAA;AAAA,KACA,QAAA;AAAA,KACA,eAAA;AAAA,UAEK,eAAA,SAAwB,IAAA,CAAK,SAAA;;EAErC,GAAA,GAAM,GAAA,CAAI,IAAA;EANa;EAQvB,OAAA,GAAU,WAAA;EAPC;EASX,IAAA,GAAO,QAAA;EATI;EAWX,QAAA;EAVG;EAYH,QAAA;;EAEA,SAAA,GAAY,YAAA;EAdM;EAgBlB,OAAA,GAAU,YAAA;EAdc;EAgBxB,QAAA;EAhBqC;EAkBrC,QAAA,GAAW,SAAA;EAhBL;EAkBN,KAAA,GAAQ,SAAA,CAAU,SAAA;AAAA;AAAA,UAGV,eAAA,SAAwB,eAAA;EATtB;EAWV,OAAA;AAAA;AAAA,UAGQ,oBAAA,SAA6B,IAAA,CAAK,eAAA;EA5BV;EA8BhC,SAAA;EA9BoC;EAgCpC,sBAAA;EAhCqC;EAkCrC,WAAA,GAAc,YAAA;AAAA;AAAA,UAGN,eAAA,SAAwB,eAAA;EAjChC;EAmCA,SAAA;EAjCA;EAmCA,QAAA,IAAY,SAAA;AAAA;AAAA,UAGJ,SAAA,SAAkB,eAAA;EAhC1B;EAkCA,OAAA;EAhCA;EAkCA,SAAA;EAhCA;EAkCA,QAAA,IAAY,SAAA;EAhCD;EAkCX,SAAA;EAhCQ;EAkCR,sBAAA;EAlC2B;EAoC3B,WAAA,GAAc,YAAA;AAAA;AAAA,UAGN,aAAA,SAAsB,eAAA;EAC9B,IAAA,EAAM,QAAA;EACN,WAAA,GAAc,eAAA;EACd,gBAAA,GAAmB,oBAAA;EACnB,SAAA;EACA,iBAAA,GAAoB,SAAA;EACpB,OAAA;EACA,UAAA,GAAa,SAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_components_HStack = require("./HStack.cjs");
|
|
4
5
|
const require_components_IconSlot = require("./IconSlot.cjs");
|
|
5
6
|
const require_components_Text = require("./Text.cjs");
|
|
6
|
-
const
|
|
7
|
+
const require_components_InputHelpText = require("./InputHelpText.cjs");
|
|
7
8
|
const require_components_VStack = require("./VStack.cjs");
|
|
8
9
|
let react = require("react");
|
|
9
10
|
let react_native = require("react-native");
|
|
@@ -128,23 +129,25 @@ const Input = (0, react.memo)(function Input({ label, size = "md", startIcon, en
|
|
|
128
129
|
const helpTextContent = (0, react.useMemo)(() => {
|
|
129
130
|
if (!helpText) return null;
|
|
130
131
|
const content = (0, lodash_es.isFunction)(helpText) ? helpText() : helpText;
|
|
131
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
children: content
|
|
141
|
-
})]
|
|
132
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_InputHelpText.InputHelpText, {
|
|
133
|
+
startIcon: helperTextIcon,
|
|
134
|
+
size,
|
|
135
|
+
isFilled: valueState === "filled",
|
|
136
|
+
disabled,
|
|
137
|
+
readOnly,
|
|
138
|
+
hasError,
|
|
139
|
+
pressed: isFocused,
|
|
140
|
+
children: content
|
|
142
141
|
});
|
|
143
142
|
}, [
|
|
143
|
+
disabled,
|
|
144
|
+
hasError,
|
|
144
145
|
helpText,
|
|
145
146
|
helperTextIcon,
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
isFocused,
|
|
148
|
+
readOnly,
|
|
149
|
+
size,
|
|
150
|
+
valueState
|
|
148
151
|
]);
|
|
149
152
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_VStack.VStack, {
|
|
150
153
|
style: rootStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.cts","names":[],"sources":["../../src/components/Input.tsx"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Input.d.cts","names":[],"sources":["../../src/components/Input.tsx"],"mappings":";;;;;;;;;UAoBU,UAAA,SAEN,IAAA,CAAK,mBAAA,CAAoB,YAAA,aACzB,IAAA,CAAK,cAAA,yBACL,IAAA,CAAK,SAAA;;EAEP,GAAA,GAAM,GAAA,CAAI,SAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAAS;;;;;;;;;;;cA0Cf,KAAA,EAAK,OAAA,CAAA,oBAAA,CAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","names":[],"sources":["../../src/components/Input.tsx"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Input.d.ts","names":[],"sources":["../../src/components/Input.tsx"],"mappings":";;;;;;;;;UAoBU,UAAA,SAEN,IAAA,CAAK,mBAAA,CAAoB,YAAA,aACzB,IAAA,CAAK,cAAA,yBACL,IAAA,CAAK,SAAA;;EAEP,GAAA,GAAM,GAAA,CAAI,SAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAAS;;;;;;;;;;;cA0Cf,KAAA,EAAK,OAAA,CAAA,oBAAA,CAAA,UAAA"}
|
package/dist/components/Input.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { HStack } from "./HStack.js";
|
|
2
3
|
import { IconSlot } from "./IconSlot.js";
|
|
3
4
|
import { Text as Text$1 } from "./Text.js";
|
|
4
|
-
import {
|
|
5
|
+
import { InputHelpText } from "./InputHelpText.js";
|
|
5
6
|
import { VStack } from "./VStack.js";
|
|
6
7
|
import { memo, useCallback, useId, useMemo, useState } from "react";
|
|
7
8
|
import { TextInput, View } from "react-native";
|
|
@@ -126,23 +127,25 @@ const Input = memo(function Input({ label, size = "md", startIcon, endIcon, help
|
|
|
126
127
|
const helpTextContent = useMemo(() => {
|
|
127
128
|
if (!helpText) return null;
|
|
128
129
|
const content = isFunction(helpText) ? helpText() : helpText;
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
children: content
|
|
139
|
-
})]
|
|
130
|
+
return /* @__PURE__ */ jsx(InputHelpText, {
|
|
131
|
+
startIcon: helperTextIcon,
|
|
132
|
+
size,
|
|
133
|
+
isFilled: valueState === "filled",
|
|
134
|
+
disabled,
|
|
135
|
+
readOnly,
|
|
136
|
+
hasError,
|
|
137
|
+
pressed: isFocused,
|
|
138
|
+
children: content
|
|
140
139
|
});
|
|
141
140
|
}, [
|
|
141
|
+
disabled,
|
|
142
|
+
hasError,
|
|
142
143
|
helpText,
|
|
143
144
|
helperTextIcon,
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
isFocused,
|
|
146
|
+
readOnly,
|
|
147
|
+
size,
|
|
148
|
+
valueState
|
|
146
149
|
]);
|
|
147
150
|
return /* @__PURE__ */ jsxs(VStack, {
|
|
148
151
|
style: rootStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","names":["Text"],"sources":["../../src/components/Input.tsx"],"sourcesContent":["import type { UniversalInputProps } from '@yahoo/uds-types';\nimport { isFunction } from 'lodash-es';\nimport type { Ref } from 'react';\nimport { memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { TextInputProps } from 'react-native';\nimport { TextInput, View } from 'react-native';\n\nimport { inputStyles } from '../../generated/styles';\nimport type { SizeProps } from '../types';\nimport { HStack } from './HStack';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport { Text } from './Text';\nimport { VStack } from './VStack';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\ninterface InputProps\n extends\n Omit<UniversalInputProps<IconSlotType>, 'width'>,\n Omit<TextInputProps, 'style' | 'editable'>,\n Pick<SizeProps, 'width'> {\n /** Ref to the underlying TextInput element */\n ref?: Ref<TextInput>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Input Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **📦 An input that allows users to enter text and collect data.**\n *\n * @description\n * An input field is a component that takes text typed into it. It can also serve\n * as a way to display a selection and trigger a dropdown menu. Inputs are interactive\n * elements that users can click, tap, or otherwise engage with to collect data.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Input } from '@yahoo/uds-mobile/Input';\n *\n * <Input label=\"Name\" placeholder=\"Enter your name\" required />\n * <Input label=\"Email\" startIcon=\"Mail\" helpText=\"We'll never share your email\" />\n * <Input label=\"Password\" secureTextEntry hasError helpText=\"Password is required\" />\n * ```\n *\n * @usage\n * - Forms: For collecting data like names, emails, passwords, etc.\n * - Search Bars: Allowing users to enter search queries\n * - Filters/Settings: When users need to specify preferences\n * - Feedback/Comments: Letting users leave reviews or comments\n *\n * @accessibility\n * - Label is automatically associated with the input\n * - Help text is announced as accessibility hint\n * - Error state is communicated to screen readers\n * - Disabled state prevents interaction\n *\n * @see {@link Checkbox} for boolean selections\n * @see {@link Radio} for single-select options\n */\nconst Input = memo(function Input({\n // Input props\n label,\n size = 'md',\n startIcon,\n endIcon,\n helpText,\n helperTextIcon,\n hasError,\n disabled,\n readOnly,\n required,\n // Size props\n width = '100%',\n // TextInput props\n defaultValue,\n value: controlledValue,\n onChangeText,\n onFocus,\n onBlur,\n placeholder,\n placeholderTextColor,\n ref,\n ...textInputProps\n}: InputProps) {\n const generatedId = useId();\n const uid = `uds-input-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const [internalValue, setInternalValue] = useState(defaultValue ?? '');\n const [isFocused, setIsFocused] = useState(false);\n\n // Support both controlled and uncontrolled modes\n const isControlled = controlledValue !== undefined;\n const value = isControlled ? controlledValue : internalValue;\n const valueState = value ? 'filled' : 'empty';\n\n /* -------------------------------- Handlers -------------------------------- */\n const handleChangeText = useCallback(\n (text: string) => {\n if (!isControlled) {\n setInternalValue(text);\n }\n onChangeText?.(text);\n },\n [isControlled, onChangeText],\n );\n\n const handleFocus = useCallback<NonNullable<TextInputProps['onFocus']>>(\n (e) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n\n const handleBlur = useCallback<NonNullable<TextInputProps['onBlur']>>(\n (e) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n\n /* --------------------------------- Styles --------------------------------- */\n inputStyles.useVariants({\n size,\n value: valueState,\n disabled,\n pressed: isFocused,\n readonly: readOnly,\n invalid: hasError,\n });\n\n // Get placeholder color from theme styles\n const computedPlaceholderColor = placeholderTextColor ?? inputStyles.inputPlaceholder.color;\n\n const rootStyle = useMemo(() => [{ width, opacity: disabled ? 0.5 : 1 }], [width, disabled]);\n\n const inputWrapperStyle = useMemo(\n () => [\n inputStyles.inputWrapper,\n { flexDirection: 'row' as const, alignItems: 'center' as const },\n ],\n [inputStyles.inputWrapper],\n );\n\n // Android-specific fixes: TextInput on Android has rendering issues with text visibility\n // - includeFontPadding: false removes Android's extra font padding that can clip text\n // - textAlignVertical: 'center' ensures text is vertically centered in the input\n // - paddingVertical: 0 removes default padding that interferes with flex layout\n const textInputStyle = useMemo(\n () => [\n inputStyles.input,\n {\n flex: 1,\n includeFontPadding: false,\n textAlignVertical: 'center' as const,\n paddingVertical: 0,\n },\n ],\n [inputStyles.input],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n const content = isFunction(label) ? label() : label;\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-end\" spacingBottom=\"2\">\n <Text style={inputStyles.label}>{content}</Text>\n {required && <Text style={inputStyles.labelRequired}>*</Text>}\n </HStack>\n );\n }, [label, required, inputStyles.label, inputStyles.labelRequired]);\n\n const startIconContent = useMemo(() => {\n if (!startIcon) {\n return null;\n }\n return <IconSlot icon={startIcon} variant=\"outline\" style={inputStyles.startIcon} />;\n }, [startIcon, inputStyles.startIcon]);\n\n const endIconContent = useMemo(() => {\n if (!endIcon) {\n return null;\n }\n return <IconSlot icon={endIcon} variant=\"outline\" style={inputStyles.endIcon} />;\n }, [endIcon, inputStyles.endIcon]);\n\n const helpTextContent = useMemo(() => {\n if (!helpText) {\n return null;\n }\n const content = isFunction(helpText) ? helpText() : helpText;\n return (\n <HStack columnGap=\"1\" alignItems=\"center\" spacingTop=\"2\">\n {helperTextIcon && <IconSlot icon={helperTextIcon} style={inputStyles.helperIcon} />}\n <Text style={inputStyles.helperText}>{content}</Text>\n </HStack>\n );\n }, [helpText, helperTextIcon, inputStyles.helperIcon, inputStyles.helperText]);\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <VStack style={rootStyle}>\n {labelContent}\n\n <View\n style={inputWrapperStyle}\n accessible\n accessibilityRole=\"none\"\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n >\n {startIconContent}\n\n <TextInput\n ref={ref}\n nativeID={uid}\n value={value}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n placeholder={placeholder}\n placeholderTextColor={computedPlaceholderColor}\n editable={!disabled && !readOnly}\n style={textInputStyle}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n accessibilityHint={typeof helpText === 'string' ? helpText : undefined}\n accessibilityState={{ disabled }}\n {...textInputProps}\n />\n\n {endIconContent}\n </View>\n\n {helpTextContent}\n </VStack>\n );\n});\n\nInput.displayName = 'Input';\n\nexport { Input, type InputProps };\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Input.js","names":["Text"],"sources":["../../src/components/Input.tsx"],"sourcesContent":["import type { UniversalInputProps } from '@yahoo/uds-types';\nimport { isFunction } from 'lodash-es';\nimport type { Ref } from 'react';\nimport { memo, useCallback, useId, useMemo, useState } from 'react';\nimport type { TextInputProps } from 'react-native';\nimport { TextInput, View } from 'react-native';\n\nimport { inputStyles } from '../../generated/styles';\nimport type { SizeProps } from '../types';\nimport { HStack } from './HStack';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport { InputHelpText } from './InputHelpText';\nimport { Text } from './Text';\nimport { VStack } from './VStack';\n\n/* -------------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------------- */\n\ninterface InputProps\n extends\n Omit<UniversalInputProps<IconSlotType>, 'width'>,\n Omit<TextInputProps, 'style' | 'editable'>,\n Pick<SizeProps, 'width'> {\n /** Ref to the underlying TextInput element */\n ref?: Ref<TextInput>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Input Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **📦 An input that allows users to enter text and collect data.**\n *\n * @description\n * An input field is a component that takes text typed into it. It can also serve\n * as a way to display a selection and trigger a dropdown menu. Inputs are interactive\n * elements that users can click, tap, or otherwise engage with to collect data.\n *\n * @category Form\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Input } from '@yahoo/uds-mobile/Input';\n *\n * <Input label=\"Name\" placeholder=\"Enter your name\" required />\n * <Input label=\"Email\" startIcon=\"Mail\" helpText=\"We'll never share your email\" />\n * <Input label=\"Password\" secureTextEntry hasError helpText=\"Password is required\" />\n * ```\n *\n * @usage\n * - Forms: For collecting data like names, emails, passwords, etc.\n * - Search Bars: Allowing users to enter search queries\n * - Filters/Settings: When users need to specify preferences\n * - Feedback/Comments: Letting users leave reviews or comments\n *\n * @accessibility\n * - Label is automatically associated with the input\n * - Help text is announced as accessibility hint\n * - Error state is communicated to screen readers\n * - Disabled state prevents interaction\n *\n * @see {@link Checkbox} for boolean selections\n * @see {@link Radio} for single-select options\n */\nconst Input = memo(function Input({\n // Input props\n label,\n size = 'md',\n startIcon,\n endIcon,\n helpText,\n helperTextIcon,\n hasError,\n disabled,\n readOnly,\n required,\n // Size props\n width = '100%',\n // TextInput props\n defaultValue,\n value: controlledValue,\n onChangeText,\n onFocus,\n onBlur,\n placeholder,\n placeholderTextColor,\n ref,\n ...textInputProps\n}: InputProps) {\n const generatedId = useId();\n const uid = `uds-input-${generatedId}`;\n\n /* --------------------------------- State ---------------------------------- */\n const [internalValue, setInternalValue] = useState(defaultValue ?? '');\n const [isFocused, setIsFocused] = useState(false);\n\n // Support both controlled and uncontrolled modes\n const isControlled = controlledValue !== undefined;\n const value = isControlled ? controlledValue : internalValue;\n const valueState = value ? 'filled' : 'empty';\n\n /* -------------------------------- Handlers -------------------------------- */\n const handleChangeText = useCallback(\n (text: string) => {\n if (!isControlled) {\n setInternalValue(text);\n }\n onChangeText?.(text);\n },\n [isControlled, onChangeText],\n );\n\n const handleFocus = useCallback<NonNullable<TextInputProps['onFocus']>>(\n (e) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n\n const handleBlur = useCallback<NonNullable<TextInputProps['onBlur']>>(\n (e) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n\n /* --------------------------------- Styles --------------------------------- */\n inputStyles.useVariants({\n size,\n value: valueState,\n disabled,\n pressed: isFocused,\n readonly: readOnly,\n invalid: hasError,\n });\n\n // Get placeholder color from theme styles\n const computedPlaceholderColor = placeholderTextColor ?? inputStyles.inputPlaceholder.color;\n\n const rootStyle = useMemo(() => [{ width, opacity: disabled ? 0.5 : 1 }], [width, disabled]);\n\n const inputWrapperStyle = useMemo(\n () => [\n inputStyles.inputWrapper,\n { flexDirection: 'row' as const, alignItems: 'center' as const },\n ],\n [inputStyles.inputWrapper],\n );\n\n // Android-specific fixes: TextInput on Android has rendering issues with text visibility\n // - includeFontPadding: false removes Android's extra font padding that can clip text\n // - textAlignVertical: 'center' ensures text is vertically centered in the input\n // - paddingVertical: 0 removes default padding that interferes with flex layout\n const textInputStyle = useMemo(\n () => [\n inputStyles.input,\n {\n flex: 1,\n includeFontPadding: false,\n textAlignVertical: 'center' as const,\n paddingVertical: 0,\n },\n ],\n [inputStyles.input],\n );\n\n /* ---------------------------- Render Helpers ------------------------------ */\n const labelContent = useMemo(() => {\n if (!label) {\n return null;\n }\n const content = isFunction(label) ? label() : label;\n return (\n <HStack columnGap=\"1\" alignItems=\"flex-end\" spacingBottom=\"2\">\n <Text style={inputStyles.label}>{content}</Text>\n {required && <Text style={inputStyles.labelRequired}>*</Text>}\n </HStack>\n );\n }, [label, required, inputStyles.label, inputStyles.labelRequired]);\n\n const startIconContent = useMemo(() => {\n if (!startIcon) {\n return null;\n }\n return <IconSlot icon={startIcon} variant=\"outline\" style={inputStyles.startIcon} />;\n }, [startIcon, inputStyles.startIcon]);\n\n const endIconContent = useMemo(() => {\n if (!endIcon) {\n return null;\n }\n return <IconSlot icon={endIcon} variant=\"outline\" style={inputStyles.endIcon} />;\n }, [endIcon, inputStyles.endIcon]);\n\n const helpTextContent = useMemo(() => {\n if (!helpText) {\n return null;\n }\n const content = isFunction(helpText) ? helpText() : helpText;\n return (\n <InputHelpText\n startIcon={helperTextIcon}\n size={size}\n isFilled={valueState === 'filled'}\n disabled={disabled}\n readOnly={readOnly}\n hasError={hasError}\n pressed={isFocused}\n >\n {content}\n </InputHelpText>\n );\n }, [disabled, hasError, helpText, helperTextIcon, isFocused, readOnly, size, valueState]);\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <VStack style={rootStyle}>\n {labelContent}\n\n <View\n style={inputWrapperStyle}\n accessible\n accessibilityRole=\"none\"\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n >\n {startIconContent}\n\n <TextInput\n ref={ref}\n nativeID={uid}\n value={value}\n onChangeText={handleChangeText}\n onFocus={handleFocus}\n onBlur={handleBlur}\n placeholder={placeholder}\n placeholderTextColor={computedPlaceholderColor}\n editable={!disabled && !readOnly}\n style={textInputStyle}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n accessibilityHint={typeof helpText === 'string' ? helpText : undefined}\n accessibilityState={{ disabled }}\n {...textInputProps}\n />\n\n {endIconContent}\n </View>\n\n {helpTextContent}\n </VStack>\n );\n});\n\nInput.displayName = 'Input';\n\nexport { Input, type InputProps };\n"],"mappings":"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"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_components_HStack = require("./HStack.cjs");
|
|
5
|
+
const require_components_IconSlot = require("./IconSlot.cjs");
|
|
6
|
+
const require_components_Text = require("./Text.cjs");
|
|
7
|
+
let react = require("react");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let generated_styles = require("../../generated/styles");
|
|
10
|
+
//#region src/components/InputHelpText.tsx
|
|
11
|
+
const InputHelpText = (0, react.memo)(function InputHelpText({ children, startIcon, endIcon, iconProps, size = "md", isFilled = false, disabled, readOnly, hasError, pressed, ref, ...hStackProps }) {
|
|
12
|
+
const { style: iconStyle, variant = "outline", ...resolvedIconProps } = iconProps ?? {};
|
|
13
|
+
const value = isFilled ? "filled" : "empty";
|
|
14
|
+
generated_styles.inputStyles.useVariants({
|
|
15
|
+
size,
|
|
16
|
+
value,
|
|
17
|
+
disabled,
|
|
18
|
+
pressed,
|
|
19
|
+
readonly: readOnly,
|
|
20
|
+
invalid: hasError
|
|
21
|
+
});
|
|
22
|
+
const resolvedIconStyle = (0, react.useMemo)(() => [generated_styles.inputStyles.helperIcon, iconStyle], [iconStyle, generated_styles.inputStyles.helperIcon]);
|
|
23
|
+
if (children === null || children === void 0 || children === false) return null;
|
|
24
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_HStack.HStack, {
|
|
25
|
+
ref,
|
|
26
|
+
columnGap: "1",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
spacingTop: "2",
|
|
29
|
+
...hStackProps,
|
|
30
|
+
children: [
|
|
31
|
+
startIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
|
|
32
|
+
icon: startIcon,
|
|
33
|
+
variant,
|
|
34
|
+
style: resolvedIconStyle,
|
|
35
|
+
...resolvedIconProps
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
38
|
+
style: generated_styles.inputStyles.helperText,
|
|
39
|
+
children
|
|
40
|
+
}),
|
|
41
|
+
endIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
|
|
42
|
+
icon: endIcon,
|
|
43
|
+
variant,
|
|
44
|
+
style: resolvedIconStyle,
|
|
45
|
+
...resolvedIconProps
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
InputHelpText.displayName = "InputHelpText";
|
|
51
|
+
//#endregion
|
|
52
|
+
exports.InputHelpText = InputHelpText;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
import { InputSize } from "../types/dist/index.cjs";
|
|
3
|
+
import { IconSlotProps, IconSlotType } from "./IconSlot.cjs";
|
|
4
|
+
import { HStackProps } from "./HStack.cjs";
|
|
5
|
+
import * as _$react from "react";
|
|
6
|
+
import { ReactNode, Ref } from "react";
|
|
7
|
+
import { View } from "react-native";
|
|
8
|
+
|
|
9
|
+
//#region src/components/InputHelpText.d.ts
|
|
10
|
+
interface InputHelpTextProps extends Omit<HStackProps, 'children' | 'ref'> {
|
|
11
|
+
/** Ref to the underlying root View. */
|
|
12
|
+
ref?: Ref<View>;
|
|
13
|
+
/** Helper text content. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
/** Icon to render before the help text. */
|
|
16
|
+
startIcon?: IconSlotType;
|
|
17
|
+
/** Icon to render after the help text. */
|
|
18
|
+
endIcon?: IconSlotType;
|
|
19
|
+
/** Props to apply to both helper icons. */
|
|
20
|
+
iconProps?: Omit<IconSlotProps, 'icon' | 'ref'>;
|
|
21
|
+
/** Input size used to resolve configured helper text styles. */
|
|
22
|
+
size?: InputSize;
|
|
23
|
+
/** Whether the associated input has a value. */
|
|
24
|
+
isFilled?: boolean;
|
|
25
|
+
/** Whether the associated input is disabled. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Whether the associated input is read-only. */
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** Whether the associated input has a validation error. */
|
|
30
|
+
hasError?: boolean;
|
|
31
|
+
/** Whether the associated input is focused or pressed. */
|
|
32
|
+
pressed?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const InputHelpText: _$react.NamedExoticComponent<InputHelpTextProps>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { InputHelpText, type InputHelpTextProps };
|
|
37
|
+
//# sourceMappingURL=InputHelpText.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputHelpText.d.cts","names":[],"sources":["../../src/components/InputHelpText.tsx"],"mappings":";;;;;;;;;UAaU,kBAAA,SAA2B,IAAA,CAAK,WAAA;;EAExC,GAAA,GAAM,GAAA,CAAI,IAAA;EAFF;EAIR,QAAA,GAAW,SAAA;;EAEX,SAAA,GAAY,YAAA;EAJF;EAMV,OAAA,GAAU,YAAA;EAJC;EAMX,SAAA,GAAY,IAAA,CAAK,aAAA;EAFP;EAIV,IAAA,GAAO,SAAA;EAFK;EAIZ,QAAA;EAdmC;EAgBnC,QAAA;EAhBuC;EAkBvC,QAAA;EAlBwC;EAoBxC,QAAA;EAlBM;EAoBN,OAAA;AAAA;AAAA,cAGI,aAAA,EAAa,OAAA,CAAA,oBAAA,CAAA,kBAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
import { InputSize } from "../types/dist/index.js";
|
|
3
|
+
import { IconSlotProps, IconSlotType } from "./IconSlot.js";
|
|
4
|
+
import { HStackProps } from "./HStack.js";
|
|
5
|
+
import * as _$react from "react";
|
|
6
|
+
import { ReactNode, Ref } from "react";
|
|
7
|
+
import { View } from "react-native";
|
|
8
|
+
|
|
9
|
+
//#region src/components/InputHelpText.d.ts
|
|
10
|
+
interface InputHelpTextProps extends Omit<HStackProps, 'children' | 'ref'> {
|
|
11
|
+
/** Ref to the underlying root View. */
|
|
12
|
+
ref?: Ref<View>;
|
|
13
|
+
/** Helper text content. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
/** Icon to render before the help text. */
|
|
16
|
+
startIcon?: IconSlotType;
|
|
17
|
+
/** Icon to render after the help text. */
|
|
18
|
+
endIcon?: IconSlotType;
|
|
19
|
+
/** Props to apply to both helper icons. */
|
|
20
|
+
iconProps?: Omit<IconSlotProps, 'icon' | 'ref'>;
|
|
21
|
+
/** Input size used to resolve configured helper text styles. */
|
|
22
|
+
size?: InputSize;
|
|
23
|
+
/** Whether the associated input has a value. */
|
|
24
|
+
isFilled?: boolean;
|
|
25
|
+
/** Whether the associated input is disabled. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Whether the associated input is read-only. */
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** Whether the associated input has a validation error. */
|
|
30
|
+
hasError?: boolean;
|
|
31
|
+
/** Whether the associated input is focused or pressed. */
|
|
32
|
+
pressed?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const InputHelpText: _$react.NamedExoticComponent<InputHelpTextProps>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { InputHelpText, type InputHelpTextProps };
|
|
37
|
+
//# sourceMappingURL=InputHelpText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputHelpText.d.ts","names":[],"sources":["../../src/components/InputHelpText.tsx"],"mappings":";;;;;;;;;UAaU,kBAAA,SAA2B,IAAA,CAAK,WAAA;;EAExC,GAAA,GAAM,GAAA,CAAI,IAAA;EAFF;EAIR,QAAA,GAAW,SAAA;;EAEX,SAAA,GAAY,YAAA;EAJF;EAMV,OAAA,GAAU,YAAA;EAJC;EAMX,SAAA,GAAY,IAAA,CAAK,aAAA;EAFP;EAIV,IAAA,GAAO,SAAA;EAFK;EAIZ,QAAA;EAdmC;EAgBnC,QAAA;EAhBuC;EAkBvC,QAAA;EAlBwC;EAoBxC,QAAA;EAlBM;EAoBN,OAAA;AAAA;AAAA,cAGI,aAAA,EAAa,OAAA,CAAA,oBAAA,CAAA,kBAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { HStack } from "./HStack.js";
|
|
3
|
+
import { IconSlot } from "./IconSlot.js";
|
|
4
|
+
import { Text } from "./Text.js";
|
|
5
|
+
import { memo, useMemo } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { inputStyles } from "../../generated/styles";
|
|
8
|
+
//#region src/components/InputHelpText.tsx
|
|
9
|
+
const InputHelpText = memo(function InputHelpText({ children, startIcon, endIcon, iconProps, size = "md", isFilled = false, disabled, readOnly, hasError, pressed, ref, ...hStackProps }) {
|
|
10
|
+
const { style: iconStyle, variant = "outline", ...resolvedIconProps } = iconProps ?? {};
|
|
11
|
+
const value = isFilled ? "filled" : "empty";
|
|
12
|
+
inputStyles.useVariants({
|
|
13
|
+
size,
|
|
14
|
+
value,
|
|
15
|
+
disabled,
|
|
16
|
+
pressed,
|
|
17
|
+
readonly: readOnly,
|
|
18
|
+
invalid: hasError
|
|
19
|
+
});
|
|
20
|
+
const resolvedIconStyle = useMemo(() => [inputStyles.helperIcon, iconStyle], [iconStyle, inputStyles.helperIcon]);
|
|
21
|
+
if (children === null || children === void 0 || children === false) return null;
|
|
22
|
+
return /* @__PURE__ */ jsxs(HStack, {
|
|
23
|
+
ref,
|
|
24
|
+
columnGap: "1",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
spacingTop: "2",
|
|
27
|
+
...hStackProps,
|
|
28
|
+
children: [
|
|
29
|
+
startIcon && /* @__PURE__ */ jsx(IconSlot, {
|
|
30
|
+
icon: startIcon,
|
|
31
|
+
variant,
|
|
32
|
+
style: resolvedIconStyle,
|
|
33
|
+
...resolvedIconProps
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ jsx(Text, {
|
|
36
|
+
style: inputStyles.helperText,
|
|
37
|
+
children
|
|
38
|
+
}),
|
|
39
|
+
endIcon && /* @__PURE__ */ jsx(IconSlot, {
|
|
40
|
+
icon: endIcon,
|
|
41
|
+
variant,
|
|
42
|
+
style: resolvedIconStyle,
|
|
43
|
+
...resolvedIconProps
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
InputHelpText.displayName = "InputHelpText";
|
|
49
|
+
//#endregion
|
|
50
|
+
export { InputHelpText };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=InputHelpText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputHelpText.js","names":[],"sources":["../../src/components/InputHelpText.tsx"],"sourcesContent":["import type { InputSize } from '@yahoo/uds-types';\nimport type { ReactNode, Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { View } from 'react-native';\n\nimport { inputStyles } from '../../generated/styles';\nimport type { HStackProps } from './HStack';\nimport { HStack } from './HStack';\nimport type { IconSlotProps, IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport type { TextProps } from './Text';\nimport { Text } from './Text';\n\ninterface InputHelpTextProps extends Omit<HStackProps, 'children' | 'ref'> {\n /** Ref to the underlying root View. */\n ref?: Ref<View>;\n /** Helper text content. */\n children?: ReactNode;\n /** Icon to render before the help text. */\n startIcon?: IconSlotType;\n /** Icon to render after the help text. */\n endIcon?: IconSlotType;\n /** Props to apply to both helper icons. */\n iconProps?: Omit<IconSlotProps, 'icon' | 'ref'>;\n /** Input size used to resolve configured helper text styles. */\n size?: InputSize;\n /** Whether the associated input has a value. */\n isFilled?: boolean;\n /** Whether the associated input is disabled. */\n disabled?: boolean;\n /** Whether the associated input is read-only. */\n readOnly?: boolean;\n /** Whether the associated input has a validation error. */\n hasError?: boolean;\n /** Whether the associated input is focused or pressed. */\n pressed?: boolean;\n}\n\nconst InputHelpText = memo(function InputHelpText({\n children,\n startIcon,\n endIcon,\n iconProps,\n size = 'md',\n isFilled = false,\n disabled,\n readOnly,\n hasError,\n pressed,\n ref,\n ...hStackProps\n}: InputHelpTextProps) {\n const { style: iconStyle, variant = 'outline', ...resolvedIconProps } = iconProps ?? {};\n const value = isFilled ? 'filled' : 'empty';\n\n inputStyles.useVariants({\n size,\n value,\n disabled,\n pressed,\n readonly: readOnly,\n invalid: hasError,\n });\n\n const resolvedIconStyle = useMemo(\n () => [inputStyles.helperIcon, iconStyle],\n [iconStyle, inputStyles.helperIcon],\n );\n\n if (children === null || children === undefined || children === false) {\n return null;\n }\n\n return (\n <HStack ref={ref} columnGap=\"1\" alignItems=\"center\" spacingTop=\"2\" {...hStackProps}>\n {startIcon && (\n <IconSlot\n icon={startIcon}\n variant={variant}\n style={resolvedIconStyle}\n {...resolvedIconProps}\n />\n )}\n\n <Text style={inputStyles.helperText as TextProps['style']}>{children}</Text>\n\n {endIcon && (\n <IconSlot\n icon={endIcon}\n variant={variant}\n style={resolvedIconStyle}\n {...resolvedIconProps}\n />\n )}\n </HStack>\n );\n});\n\nInputHelpText.displayName = 'InputHelpText';\n\nexport { InputHelpText, type InputHelpTextProps };\n"],"mappings":";;;;;;;;AAsCA,MAAM,gBAAgB,KAAK,SAAS,cAAc,EAChD,UACA,WACA,SACA,WACA,OAAO,MACP,WAAW,OACX,UACA,UACA,UACA,SACA,KACA,GAAG,eACkB;CACrB,MAAM,EAAE,OAAO,WAAW,UAAU,WAAW,GAAG,sBAAsB,aAAa,EAAE;CACvF,MAAM,QAAQ,WAAW,WAAW;CAEpC,YAAY,YAAY;EACtB;EACA;EACA;EACA;EACA,UAAU;EACV,SAAS;EACV,CAAC;CAEF,MAAM,oBAAoB,cAClB,CAAC,YAAY,YAAY,UAAU,EACzC,CAAC,WAAW,YAAY,WAAW,CACpC;CAED,IAAI,aAAa,QAAQ,aAAa,KAAA,KAAa,aAAa,OAC9D,OAAO;CAGT,OACE,qBAAC,QAAD;EAAa;EAAK,WAAU;EAAI,YAAW;EAAS,YAAW;EAAI,GAAI;YAAvE;GACG,aACC,oBAAC,UAAD;IACE,MAAM;IACG;IACT,OAAO;IACP,GAAI;IACJ,CAAA;GAGJ,oBAAC,MAAD;IAAM,OAAO,YAAY;IAAmC;IAAgB,CAAA;GAE3E,WACC,oBAAC,UAAD;IACE,MAAM;IACG;IACT,OAAO;IACP,GAAI;IACJ,CAAA;GAEG;;EAEX;AAEF,cAAc,cAAc"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_portal = require("../../../portal.cjs");
|
|
5
|
+
let react_native = require("react-native");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let react_native_screens = require("react-native-screens");
|
|
8
|
+
//#region src/components/internal/Overlay/OverlayPortal.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Internal portal wrapper for mobile overlays.
|
|
11
|
+
*
|
|
12
|
+
* Uses `FullWindowOverlay` on iOS when requested, otherwise renders through the UDS portal host.
|
|
13
|
+
*/
|
|
14
|
+
function OverlayPortal({ children, useFullWindowOverlay = true }) {
|
|
15
|
+
require_portal.usePortalContext();
|
|
16
|
+
if (react_native.Platform.OS === "ios" && useFullWindowOverlay) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_screens.FullWindowOverlay, { children });
|
|
17
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_portal.Portal, { children });
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.OverlayPortal = OverlayPortal;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { OverlayPortalProps } from "./types.cjs";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/internal/Overlay/OverlayPortal.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Internal portal wrapper for mobile overlays.
|
|
8
|
+
*
|
|
9
|
+
* Uses `FullWindowOverlay` on iOS when requested, otherwise renders through the UDS portal host.
|
|
10
|
+
*/
|
|
11
|
+
declare function OverlayPortal({
|
|
12
|
+
children,
|
|
13
|
+
useFullWindowOverlay
|
|
14
|
+
}: OverlayPortalProps): _$react.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { OverlayPortal };
|
|
17
|
+
//# sourceMappingURL=OverlayPortal.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayPortal.d.cts","names":[],"sources":["../../../../src/components/internal/Overlay/OverlayPortal.tsx"],"mappings":";;;;;;;;AAIkD;;iBAOzC,aAAA,CAAA;EAAgB,QAAA;EAAU;AAAA,GAA+B,kBAAA,GAAkB,OAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { OverlayPortalProps } from "./types.js";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/internal/Overlay/OverlayPortal.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Internal portal wrapper for mobile overlays.
|
|
8
|
+
*
|
|
9
|
+
* Uses `FullWindowOverlay` on iOS when requested, otherwise renders through the UDS portal host.
|
|
10
|
+
*/
|
|
11
|
+
declare function OverlayPortal({
|
|
12
|
+
children,
|
|
13
|
+
useFullWindowOverlay
|
|
14
|
+
}: OverlayPortalProps): _$react.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { OverlayPortal };
|
|
17
|
+
//# sourceMappingURL=OverlayPortal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayPortal.d.ts","names":[],"sources":["../../../../src/components/internal/Overlay/OverlayPortal.tsx"],"mappings":";;;;;;;;AAIkD;;iBAOzC,aAAA,CAAA;EAAgB,QAAA;EAAU;AAAA,GAA+B,kBAAA,GAAkB,OAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { Portal, usePortalContext } from "../../../portal.js";
|
|
3
|
+
import { Platform } from "react-native";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { FullWindowOverlay } from "react-native-screens";
|
|
6
|
+
//#region src/components/internal/Overlay/OverlayPortal.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Internal portal wrapper for mobile overlays.
|
|
9
|
+
*
|
|
10
|
+
* Uses `FullWindowOverlay` on iOS when requested, otherwise renders through the UDS portal host.
|
|
11
|
+
*/
|
|
12
|
+
function OverlayPortal({ children, useFullWindowOverlay = true }) {
|
|
13
|
+
usePortalContext();
|
|
14
|
+
if (Platform.OS === "ios" && useFullWindowOverlay) return /* @__PURE__ */ jsx(FullWindowOverlay, { children });
|
|
15
|
+
return /* @__PURE__ */ jsx(Portal, { children });
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { OverlayPortal };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=OverlayPortal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayPortal.js","names":[],"sources":["../../../../src/components/internal/Overlay/OverlayPortal.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport { FullWindowOverlay } from 'react-native-screens';\n\nimport { Portal, usePortalContext } from '../../../portal';\nimport type { OverlayPortalProps } from './types';\n\n/**\n * Internal portal wrapper for mobile overlays.\n *\n * Uses `FullWindowOverlay` on iOS when requested, otherwise renders through the UDS portal host.\n */\nfunction OverlayPortal({ children, useFullWindowOverlay = true }: OverlayPortalProps) {\n // Always assert UDSProvider presence, even when iOS renders through FullWindowOverlay.\n usePortalContext();\n\n if (Platform.OS === 'ios' && useFullWindowOverlay) {\n return <FullWindowOverlay>{children}</FullWindowOverlay>;\n }\n\n return <Portal>{children}</Portal>;\n}\n\nexport { OverlayPortal };\n"],"mappings":";;;;;;;;;;;AAWA,SAAS,cAAc,EAAE,UAAU,uBAAuB,QAA4B;CAEpF,kBAAkB;CAElB,IAAI,SAAS,OAAO,SAAS,sBAC3B,OAAO,oBAAC,mBAAD,EAAoB,UAA6B,CAAA;CAG1D,OAAO,oBAAC,QAAD,EAAS,UAAkB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_components_internal_Overlay_OverlayPortal = require("./OverlayPortal.cjs");
|
|
4
|
+
const require_components_internal_Overlay_useControllableState = require("./useControllableState.cjs");
|
|
5
|
+
exports.OverlayPortal = require_components_internal_Overlay_OverlayPortal.OverlayPortal;
|
|
6
|
+
exports.useControllableState = require_components_internal_Overlay_useControllableState.useControllableState;
|