@cdx-ui/components 0.0.1-beta.65 → 0.0.1-beta.66
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/lib/commonjs/components/AlertDialog/index.js +12 -10
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/index.js +125 -25
- package/lib/commonjs/components/Avatar/index.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +127 -28
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +9 -3
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/CLAUDE.md +115 -11
- package/lib/commonjs/components/Checkbox/index.js +69 -22
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +1 -1
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +44 -36
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +6 -35
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +92 -72
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Field/index.js +70 -26
- package/lib/commonjs/components/Field/index.js.map +1 -1
- package/lib/commonjs/components/Form/index.js +5 -12
- package/lib/commonjs/components/Form/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/index.js +5 -33
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/Input/index.js +50 -20
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +14 -7
- package/lib/commonjs/components/Link/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +129 -54
- package/lib/commonjs/components/ListItem/index.js.map +1 -1
- package/lib/commonjs/components/OtpInput/index.js +94 -28
- package/lib/commonjs/components/OtpInput/index.js.map +1 -1
- package/lib/commonjs/components/ProgressBar/index.js +8 -13
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js +51 -53
- package/lib/commonjs/components/Radio/index.js.map +1 -1
- package/lib/commonjs/components/Select/index.js +112 -46
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +2 -2
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Switch/BaseSwitch.js +23 -13
- package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/commonjs/components/Switch/BaseSwitch.web.js +25 -21
- package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +34 -3
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Tile/index.js +150 -77
- package/lib/commonjs/components/Tile/index.js.map +1 -1
- package/lib/commonjs/figma/Chip.figma.js +2 -2
- package/lib/commonjs/figma/Chip.figma.js.map +1 -1
- package/lib/commonjs/utils/positionToDataIcon.js +41 -0
- package/lib/commonjs/utils/positionToDataIcon.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +13 -11
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Avatar/index.js +128 -28
- package/lib/module/components/Avatar/index.js.map +1 -1
- package/lib/module/components/Button/index.js +130 -32
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +8 -2
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/CLAUDE.md +115 -11
- package/lib/module/components/Checkbox/index.js +72 -25
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +1 -1
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +47 -39
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +6 -35
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/Dialog/index.js +96 -76
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Field/index.js +74 -31
- package/lib/module/components/Field/index.js.map +1 -1
- package/lib/module/components/Form/index.js +7 -14
- package/lib/module/components/Form/index.js.map +1 -1
- package/lib/module/components/IconButton/index.js +6 -34
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/Input/index.js +53 -23
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Link/index.js +16 -8
- package/lib/module/components/Link/index.js.map +1 -1
- package/lib/module/components/ListItem/index.js +134 -59
- package/lib/module/components/ListItem/index.js.map +1 -1
- package/lib/module/components/OtpInput/index.js +94 -28
- package/lib/module/components/OtpInput/index.js.map +1 -1
- package/lib/module/components/ProgressBar/index.js +9 -14
- package/lib/module/components/ProgressBar/index.js.map +1 -1
- package/lib/module/components/Radio/index.js +54 -57
- package/lib/module/components/Radio/index.js.map +1 -1
- package/lib/module/components/Select/index.js +118 -52
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +2 -2
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Switch/BaseSwitch.js +24 -14
- package/lib/module/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/module/components/Switch/BaseSwitch.web.js +26 -22
- package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/module/components/Switch/index.js +35 -4
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Tile/index.js +155 -83
- package/lib/module/components/Tile/index.js.map +1 -1
- package/lib/module/figma/Chip.figma.js +2 -2
- package/lib/module/figma/Chip.figma.js.map +1 -1
- package/lib/module/utils/positionToDataIcon.js +38 -0
- package/lib/module/utils/positionToDataIcon.js.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/index.d.ts +6 -2
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/index.d.ts +31 -8
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +2 -1
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts +3 -1
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +19 -9
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +0 -1
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/index.d.ts +12 -6
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +1 -1
- package/lib/typescript/components/Field/index.d.ts +14 -7
- package/lib/typescript/components/Field/index.d.ts.map +1 -1
- package/lib/typescript/components/Form/index.d.ts +4 -4
- package/lib/typescript/components/Form/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/index.d.ts +11 -3
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +2 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +28 -6
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -1
- package/lib/typescript/components/ProgressBar/index.d.ts +4 -4
- package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -1
- package/lib/typescript/components/Radio/index.d.ts +4 -0
- package/lib/typescript/components/Radio/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/index.d.ts +35 -2
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Switch/BaseSwitch.d.ts +12 -5
- package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -1
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +11 -5
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -1
- package/lib/typescript/components/Switch/index.d.ts +5 -1
- package/lib/typescript/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/components/Tile/index.d.ts +8 -2
- package/lib/typescript/components/Tile/index.d.ts.map +1 -1
- package/lib/typescript/utils/positionToDataIcon.d.ts +29 -0
- package/lib/typescript/utils/positionToDataIcon.d.ts.map +1 -0
- package/package.json +5 -5
- package/src/components/AlertDialog/index.tsx +13 -14
- package/src/components/Avatar/index.tsx +134 -44
- package/src/components/Button/index.tsx +216 -44
- package/src/components/Button/styles.ts +50 -38
- package/src/components/CLAUDE.md +115 -11
- package/src/components/Checkbox/index.tsx +93 -32
- package/src/components/Checkbox/styles.ts +1 -1
- package/src/components/Chip/index.tsx +88 -61
- package/src/components/Chip/styles.ts +6 -18
- package/src/components/Dialog/index.tsx +139 -99
- package/src/components/Field/index.tsx +113 -49
- package/src/components/Form/index.tsx +18 -14
- package/src/components/IconButton/index.tsx +7 -31
- package/src/components/Input/index.tsx +75 -32
- package/src/components/Link/index.tsx +38 -12
- package/src/components/ListItem/index.tsx +158 -73
- package/src/components/OtpInput/index.tsx +126 -43
- package/src/components/ProgressBar/index.tsx +11 -16
- package/src/components/Radio/index.tsx +76 -54
- package/src/components/Select/index.tsx +174 -59
- package/src/components/Select/styles.ts +1 -2
- package/src/components/Switch/BaseSwitch.tsx +38 -16
- package/src/components/Switch/BaseSwitch.web.tsx +28 -35
- package/src/components/Switch/index.tsx +51 -4
- package/src/components/Tile/index.tsx +145 -94
- package/src/utils/positionToDataIcon.ts +34 -0
- package/lib/commonjs/components/Field/FieldLabel.js +0 -33
- package/lib/commonjs/components/Field/FieldLabel.js.map +0 -1
- package/lib/commonjs/components/Field/FieldLabel.web.js +0 -22
- package/lib/commonjs/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.js +0 -25
- package/lib/commonjs/components/Form/FormRoot.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.web.js +0 -17
- package/lib/commonjs/components/Form/FormRoot.web.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.android.js +0 -20
- package/lib/commonjs/components/Input/BaseInput.android.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.js +0 -13
- package/lib/commonjs/components/Input/BaseInput.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.web.js +0 -50
- package/lib/commonjs/components/Input/BaseInput.web.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.js +0 -10
- package/lib/commonjs/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js +0 -102
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.js +0 -29
- package/lib/module/components/Field/FieldLabel.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.web.js +0 -17
- package/lib/module/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/module/components/Form/FormRoot.js +0 -21
- package/lib/module/components/Form/FormRoot.js.map +0 -1
- package/lib/module/components/Form/FormRoot.web.js +0 -12
- package/lib/module/components/Form/FormRoot.web.js.map +0 -1
- package/lib/module/components/Input/BaseInput.android.js +0 -16
- package/lib/module/components/Input/BaseInput.android.js.map +0 -1
- package/lib/module/components/Input/BaseInput.js +0 -4
- package/lib/module/components/Input/BaseInput.js.map +0 -1
- package/lib/module/components/Input/BaseInput.web.js +0 -45
- package/lib/module/components/Input/BaseInput.web.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.js +0 -7
- package/lib/module/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.web.js +0 -97
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.d.ts +0 -18
- package/lib/typescript/components/Field/FieldLabel.d.ts.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +0 -16
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.d.ts +0 -14
- package/lib/typescript/components/Form/FormRoot.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.web.d.ts +0 -10
- package/lib/typescript/components/Form/FormRoot.web.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.android.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.android.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.d.ts +0 -2
- package/lib/typescript/components/Input/BaseInput.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.web.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.web.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts +0 -3
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +0 -16
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +0 -1
- package/src/components/Field/FieldLabel.tsx +0 -33
- package/src/components/Field/FieldLabel.web.tsx +0 -25
- package/src/components/Form/FormRoot.tsx +0 -20
- package/src/components/Form/FormRoot.web.tsx +0 -12
- package/src/components/Input/BaseInput.android.tsx +0 -13
- package/src/components/Input/BaseInput.tsx +0 -1
- package/src/components/Input/BaseInput.web.tsx +0 -41
- package/src/components/Select/SelectTriggerHost.tsx +0 -4
- package/src/components/Select/SelectTriggerHost.web.tsx +0 -143
|
@@ -5,9 +5,11 @@ import { type IconProps } from '../Icon';
|
|
|
5
5
|
export { LinkProvider, type LinkConfig, type LinkAction } from '@cdx-ui/primitives';
|
|
6
6
|
export interface LinkProps extends ILinkProps {
|
|
7
7
|
className?: string;
|
|
8
|
+
children?: ReactNode;
|
|
8
9
|
}
|
|
9
10
|
declare const LinkRoot: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<View>>;
|
|
10
11
|
export interface LinkLabelProps extends TextProps {
|
|
12
|
+
asChild?: boolean;
|
|
11
13
|
className?: string;
|
|
12
14
|
children?: ReactNode;
|
|
13
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAY,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAQ/C,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMpF,MAAM,WAAW,SAAU,SAAQ,UAAU;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,QAAQ,4FAcZ,CAAC;AAQH,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,iGAwBd,CAAC;AAQF,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;CAAG;AAErE,QAAA,MAAM,QAAQ;yCAAwC,aAAa;;CAalE,CAAC;AAQF,KAAK,qBAAqB,GAAG,OAAO,QAAQ,GAAG;IAC7C,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,IAAI,EAAE,OAAO,QAAQ,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,IAAI,EAGX,qBAAqB,CAAC"}
|
|
@@ -1,39 +1,61 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import { Text, View, type TextProps, type ViewProps } from 'react-native';
|
|
2
|
-
import { type
|
|
3
|
-
import { type WithStyleContextProps } from '@cdx-ui/utils';
|
|
3
|
+
import { type IListItemProps, type ListItemCrossAlign } from '@cdx-ui/primitives';
|
|
4
4
|
import { type ListItemVariantProps } from './styles';
|
|
5
|
-
export interface ListItemProps extends IListItemProps,
|
|
5
|
+
export interface ListItemProps extends Omit<IListItemProps, 'crossAlign'>, ListItemVariantProps {
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
8
|
declare const ListItemRoot: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<View>>;
|
|
9
|
-
export interface ListItemLeadingSlotProps extends
|
|
9
|
+
export interface ListItemLeadingSlotProps extends ViewProps {
|
|
10
|
+
asChild?: boolean;
|
|
10
11
|
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Decorative leading content defaults to hidden from the accessibility tree.
|
|
14
|
+
* Set to `false` when the leading region contains meaningful controls.
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
'aria-hidden'?: boolean;
|
|
11
18
|
}
|
|
12
19
|
declare const ListItemLeadingSlot: import("react").ForwardRefExoticComponent<ListItemLeadingSlotProps & import("react").RefAttributes<View>>;
|
|
13
20
|
export interface ListItemContentProps extends ViewProps {
|
|
21
|
+
asChild?: boolean;
|
|
14
22
|
className?: string;
|
|
15
23
|
}
|
|
16
24
|
declare const ListItemContent: import("react").ForwardRefExoticComponent<ListItemContentProps & import("react").RefAttributes<View>>;
|
|
17
25
|
export interface ListItemTitleProps extends TextProps {
|
|
26
|
+
asChild?: boolean;
|
|
18
27
|
className?: string;
|
|
19
28
|
}
|
|
20
29
|
declare const ListItemTitle: import("react").ForwardRefExoticComponent<ListItemTitleProps & import("react").RefAttributes<Text>>;
|
|
21
30
|
export interface ListItemDescriptionProps extends TextProps {
|
|
31
|
+
asChild?: boolean;
|
|
22
32
|
className?: string;
|
|
23
33
|
}
|
|
24
34
|
declare const ListItemDescription: import("react").ForwardRefExoticComponent<ListItemDescriptionProps & import("react").RefAttributes<Text>>;
|
|
25
35
|
export interface ListItemMetaProps extends TextProps {
|
|
36
|
+
asChild?: boolean;
|
|
26
37
|
className?: string;
|
|
27
38
|
}
|
|
28
39
|
declare const ListItemMeta: import("react").ForwardRefExoticComponent<ListItemMetaProps & import("react").RefAttributes<Text>>;
|
|
29
40
|
export interface ListItemTrailingSlotProps extends ViewProps {
|
|
41
|
+
asChild?: boolean;
|
|
30
42
|
className?: string;
|
|
31
43
|
}
|
|
32
44
|
declare const ListItemTrailingSlot: import("react").ForwardRefExoticComponent<ListItemTrailingSlotProps & import("react").RefAttributes<View>>;
|
|
33
|
-
export interface
|
|
45
|
+
export interface ListItemSectionHeaderProps extends ViewProps {
|
|
46
|
+
asChild?: boolean;
|
|
34
47
|
className?: string;
|
|
48
|
+
/** Primary section label (e.g. date heading). */
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
/** Optional right-aligned adornment (e.g. section Chip). */
|
|
51
|
+
trailing?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Whether to expose the top divider marker for styling.
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
showDivider?: boolean;
|
|
35
57
|
}
|
|
36
|
-
declare const ListItemSectionHeader: import("react").ForwardRefExoticComponent<
|
|
58
|
+
declare const ListItemSectionHeader: import("react").ForwardRefExoticComponent<ListItemSectionHeaderProps & import("react").RefAttributes<View>>;
|
|
37
59
|
type ListItemCompound = typeof ListItemRoot & {
|
|
38
60
|
LeadingSlot: typeof ListItemLeadingSlot;
|
|
39
61
|
Content: typeof ListItemContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ListItem/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ListItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAUL,KAAK,oBAAoB,EAC1B,MAAM,UAAU,CAAC;AAalB,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,oBAAoB;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,gGAkCjB,CAAC;AAUF,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,mBAAmB,2GAgBxB,CAAC;AAUF,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,uGAepB,CAAC;AAIF,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,aAAa,qGAclB,CAAC;AAIF,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,mBAAmB,2GAaxB,CAAC;AAIF,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,oGAcjB,CAAC;AAIF,MAAM,WAAW,yBAA0B,SAAQ,SAAS;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,oBAAoB,4GAezB,CAAC;AAqCF,MAAM,WAAW,0BAA2B,SAAQ,SAAS;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,QAAQ,EAAE,SAAS,CAAC;IACpB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,qBAAqB,6GAgC1B,CAAC;AAQF,KAAK,gBAAgB,GAAG,OAAO,YAAY,GAAG;IAC5C,WAAW,EAAE,OAAO,mBAAmB,CAAC;IACxC,OAAO,EAAE,OAAO,eAAe,CAAC;IAChC,KAAK,EAAE,OAAO,aAAa,CAAC;IAC5B,WAAW,EAAE,OAAO,mBAAmB,CAAC;IACxC,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,YAAY,EAAE,OAAO,oBAAoB,CAAC;IAC1C,aAAa,EAAE,OAAO,qBAAqB,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAQf,gBAAgB,CAAC;AAEvB,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,kCAAkC,EAClC,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AACpE,OAAO,EAQL,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,UAAU,CAAC;AAsDlB,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,EAAE,oBAAoB;IAC3F,OAAO,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,gGA6EpB,CAAC"}
|
|
@@ -7,10 +7,10 @@ export interface ProgressBarProps extends IProgressProps, ProgressBarTrackVarian
|
|
|
7
7
|
export interface ProgressBarIndicatorProps extends ViewProps {
|
|
8
8
|
readonly className?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
type ProgressBarCompoundComponent = typeof
|
|
13
|
-
Indicator: typeof
|
|
10
|
+
declare const ProgressBarRootComponent: import("react").ForwardRefExoticComponent<ProgressBarProps & import("react").RefAttributes<View>>;
|
|
11
|
+
declare const ProgressBarIndicatorComponent: import("react").ForwardRefExoticComponent<ProgressBarIndicatorProps & import("react").RefAttributes<View>>;
|
|
12
|
+
type ProgressBarCompoundComponent = typeof ProgressBarRootComponent & {
|
|
13
|
+
Indicator: typeof ProgressBarIndicatorComponent;
|
|
14
14
|
};
|
|
15
15
|
export declare const ProgressBar: ProgressBarCompoundComponent;
|
|
16
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressBar/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressBar/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAyC,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEhG,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,gBAAiB,SAAQ,cAAc,EAAE,4BAA4B;IACpF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,yBAA0B,SAAQ,SAAS;IAC1D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,wBAAwB,mGAM7B,CAAC;AAIF,QAAA,MAAM,6BAA6B,4GASlC,CAAC;AAIF,KAAK,4BAA4B,GAAG,OAAO,wBAAwB,GAAG;IACpE,SAAS,EAAE,OAAO,6BAA6B,CAAC;CACjD,CAAC;AAEF,eAAO,MAAM,WAAW,EAElB,4BAA4B,CAAC"}
|
|
@@ -7,11 +7,13 @@ export interface RadioProps extends IRadioProps {
|
|
|
7
7
|
}
|
|
8
8
|
declare const RadioRoot: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<View>>;
|
|
9
9
|
export interface RadioIndicatorProps extends ViewProps {
|
|
10
|
+
asChild?: boolean;
|
|
10
11
|
className?: string;
|
|
11
12
|
children?: ReactNode;
|
|
12
13
|
}
|
|
13
14
|
declare const RadioIndicator: import("react").ForwardRefExoticComponent<RadioIndicatorProps & import("react").RefAttributes<View>>;
|
|
14
15
|
export interface RadioLabelProps extends TextProps {
|
|
16
|
+
asChild?: boolean;
|
|
15
17
|
className?: string;
|
|
16
18
|
children?: ReactNode;
|
|
17
19
|
}
|
|
@@ -28,6 +30,8 @@ export interface RadioGroupProps extends ViewProps {
|
|
|
28
30
|
isReadOnly?: boolean;
|
|
29
31
|
direction?: 'column' | 'row';
|
|
30
32
|
name?: string;
|
|
33
|
+
'aria-label'?: string;
|
|
34
|
+
'aria-labelledby'?: string;
|
|
31
35
|
}
|
|
32
36
|
declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<View>>;
|
|
33
37
|
type RadioCompoundComponent = typeof RadioRoot & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAc5B,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,6FAeb,CAAC;AAQH,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,cAAc,sGAwCnB,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,kGAiBf,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,kGA0Cf,CAAC;AAQF,KAAK,sBAAsB,GAAG,OAAO,SAAS,GAAG;IAC/C,SAAS,EAAE,OAAO,cAAc,CAAC;IACjC,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,KAAK,EAAE,OAAO,UAAU,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,KAAK,EAIZ,sBAAsB,CAAC"}
|
|
@@ -2,36 +2,69 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { Text, type TextProps, View, type ViewProps } from 'react-native';
|
|
3
3
|
import { type ISelectContentProps, type ISelectItemLabelProps, type ISelectItemProps, type ISelectProps, type ISelectTriggerProps, type ISelectValueProps } from '@cdx-ui/primitives';
|
|
4
4
|
import { IconProps } from '../Icon';
|
|
5
|
+
import { type IconSlotPosition } from '../../utils/positionToDataIcon';
|
|
5
6
|
import { type SelectVariantProps } from './styles';
|
|
6
7
|
export interface SelectProps extends ViewProps, ISelectProps, SelectVariantProps {
|
|
7
8
|
className?: string;
|
|
8
9
|
}
|
|
9
10
|
declare const SelectRoot: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<View>>;
|
|
10
11
|
export interface SelectTriggerProps extends ISelectTriggerProps {
|
|
12
|
+
/**
|
|
13
|
+
* Substitute the rendered trigger element with the single child. The child must
|
|
14
|
+
* be another Forge primitive (IconButton, Chip, Button) — anything whose
|
|
15
|
+
* underlying Pressable accepts Pressable-shaped handlers. When set, the
|
|
16
|
+
* auto-injected arrow indicator is skipped and `selectTriggerVariants` is not
|
|
17
|
+
* applied so the substituted component's own appearance wins.
|
|
18
|
+
*
|
|
19
|
+
* On web, `<label htmlFor>` association is preserved via a `focus()` bridge
|
|
20
|
+
* registered by the primitive.
|
|
21
|
+
*
|
|
22
|
+
* NOTE — `data-slot` overlap: the substituted component's own `data-slot`
|
|
23
|
+
* (e.g. `button`, `icon-button`, `chip`) may win on the merged element.
|
|
24
|
+
* Selectors that need guaranteed `select-trigger` access should wrap the
|
|
25
|
+
* trigger instead of relying on `data-slot`.
|
|
26
|
+
*/
|
|
27
|
+
asChild?: boolean;
|
|
11
28
|
className?: string;
|
|
12
29
|
children?: ReactNode;
|
|
13
30
|
}
|
|
14
31
|
declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<View>>;
|
|
15
32
|
export interface SelectValueProps extends TextProps, ISelectValueProps {
|
|
33
|
+
asChild?: boolean;
|
|
16
34
|
className?: string;
|
|
17
35
|
}
|
|
18
36
|
declare const SelectValue: import("react").ForwardRefExoticComponent<SelectValueProps & import("react").RefAttributes<Text>>;
|
|
19
|
-
export interface SelectIconProps extends Omit<IconProps, 'children'> {
|
|
37
|
+
export interface SelectIconProps extends Omit<IconProps, 'children' | 'as'> {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Forge icon component to render. Required unless `asChild` is set, in which
|
|
41
|
+
* case the consumer's substituted element is rendered instead.
|
|
42
|
+
*/
|
|
43
|
+
as?: IconProps['as'];
|
|
44
|
+
/**
|
|
45
|
+
* Position hint that emits `data-icon="inline-start"` or `data-icon="inline-end"`.
|
|
46
|
+
* CVA uses this attribute to apply leading/trailing padding logically (RTL-aware).
|
|
47
|
+
* Omit to apply the symmetric baseline gap.
|
|
48
|
+
*/
|
|
49
|
+
position?: IconSlotPosition;
|
|
20
50
|
}
|
|
21
51
|
declare const SelectIcon: {
|
|
22
|
-
({ className, style, as
|
|
52
|
+
({ asChild, className, style, as, position, ...props }: SelectIconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
53
|
displayName: string;
|
|
24
54
|
};
|
|
25
55
|
export interface SelectContentProps extends ViewProps, ISelectContentProps {
|
|
56
|
+
asChild?: boolean;
|
|
26
57
|
className?: string;
|
|
27
58
|
}
|
|
28
59
|
declare const SelectContent: import("react").ForwardRefExoticComponent<SelectContentProps & import("react").RefAttributes<View>>;
|
|
29
60
|
export interface SelectItemProps extends ISelectItemProps {
|
|
61
|
+
asChild?: boolean;
|
|
30
62
|
className?: string;
|
|
31
63
|
children?: ReactNode;
|
|
32
64
|
}
|
|
33
65
|
declare const SelectItem: import("react").ForwardRefExoticComponent<SelectItemProps & import("react").RefAttributes<View>>;
|
|
34
66
|
export interface SelectItemLabelProps extends TextProps, ISelectItemLabelProps {
|
|
67
|
+
asChild?: boolean;
|
|
35
68
|
className?: string;
|
|
36
69
|
}
|
|
37
70
|
declare const SelectItemLabel: import("react").ForwardRefExoticComponent<SelectItemLabelProps & import("react").RefAttributes<Text>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAUL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EACL,KAAK,kBAAkB,EAOxB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,YAAY,EAAE,kBAAkB;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,8FAmBf,CAAC;AAQF,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,qGA6BlB,CAAC;AAQF,MAAM,WAAW,gBAAiB,SAAQ,SAAS,EAAE,iBAAiB;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,mGA+BhB,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,CAAC;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAED,QAAA,MAAM,UAAU;4DAA2D,eAAe;;CAqBzF,CAAC;AAQF,MAAM,WAAW,kBAAmB,SAAQ,SAAS,EAAE,mBAAmB;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,aAAa,qGAelB,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,kGAmBf,CAAC;AAQF,MAAM,WAAW,oBAAqB,SAAQ,SAAS,EAAE,qBAAqB;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,uGA0BpB,CAAC;AAQF,KAAK,uBAAuB,GAAG,OAAO,UAAU,GAAG;IACjD,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,KAAK,EAAE,OAAO,WAAW,CAAC;IAC1B,IAAI,EAAE,OAAO,UAAU,CAAC;IACxB,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,IAAI,EAAE,OAAO,UAAU,CAAC;IACxB,SAAS,EAAE,OAAO,eAAe,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,MAAM,EAOb,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,qBAAqB;;;8EAgDjC,CAAC;AAIF,eAAO,MAAM,mBAAmB;;8EAkB/B,CAAC;AAIF,eAAO,MAAM,kBAAkB;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,qBAAqB;;;8EAgDjC,CAAC;AAIF,eAAO,MAAM,mBAAmB;;8EAkB/B,CAAC;AAIF,eAAO,MAAM,kBAAkB;;8EAiB9B,CAAC;AAIF,eAAO,MAAM,qBAAqB,oFAWhC,CAAC;AAIH,eAAO,MAAM,kBAAkB;;8EAsB9B,CAAC;AAIF,eAAO,MAAM,uBAAuB;;8EAanC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { Switch as RNSwitch, type SwitchProps } from 'react-native';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Switch as RNSwitch, type SwitchProps as RNSwitchProps } from 'react-native';
|
|
2
|
+
import { type IUseSwitchReturn } from '@cdx-ui/primitives';
|
|
3
|
+
export interface BaseSwitchProps extends Omit<RNSwitchProps, 'value' | 'disabled' | 'onValueChange' | 'thumbColor' | 'trackColor' | 'ios_backgroundColor' | 'className'> {
|
|
4
|
+
switchState: IUseSwitchReturn;
|
|
5
5
|
className?: string;
|
|
6
|
-
size?: string;
|
|
6
|
+
size?: string | null;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Native host for `Switch`. Renders `RNSwitch` with Uniwind className passthrough
|
|
10
|
+
* derived from the resolved interaction state in `switchState`.
|
|
11
|
+
*
|
|
12
|
+
* All state/a11y/interaction machinery lives in the `useSwitch` hook; this file
|
|
13
|
+
* is pure rendering (Standard 3: primitives must not carry styling machinery).
|
|
14
|
+
*/
|
|
8
15
|
export declare const BaseSwitch: import("react").ForwardRefExoticComponent<BaseSwitchProps & import("react").RefAttributes<RNSwitch>>;
|
|
9
16
|
//# sourceMappingURL=BaseSwitch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSwitch.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/BaseSwitch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseSwitch.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/BaseSwitch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,KAAK,WAAW,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAShF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,aAAa,EACX,OAAO,GACP,UAAU,GACV,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,qBAAqB,GACrB,WAAW,CACd;IACC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,sGAwBtB,CAAC"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
|
+
import { type IUseSwitchReturn } from '@cdx-ui/primitives';
|
|
2
3
|
import { type SwitchVariantProps } from './styles';
|
|
3
4
|
export interface BaseSwitchProps {
|
|
4
|
-
|
|
5
|
-
onValueChange?: (value: boolean) => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
states?: Record<string, boolean | undefined>;
|
|
8
|
-
dataSet?: Record<string, string>;
|
|
5
|
+
switchState: IUseSwitchReturn;
|
|
9
6
|
className?: string;
|
|
10
7
|
size?: SwitchVariantProps['size'];
|
|
8
|
+
accessibilityLabel?: string;
|
|
11
9
|
onFocus?: () => void;
|
|
12
10
|
onBlur?: () => void;
|
|
13
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Web host for `Switch`. Renders a custom `Pressable` + `View` toggle (preserving
|
|
14
|
+
* the existing visual contract) wired to the resolved state in `switchState`.
|
|
15
|
+
*
|
|
16
|
+
* `role="switch"` + `aria-checked` + keyboard semantics satisfy the same a11y
|
|
17
|
+
* contract that an `<input type="checkbox" role="switch">` would provide, without
|
|
18
|
+
* the visual rework an input swap would require (see spike notes in PR).
|
|
19
|
+
*/
|
|
14
20
|
export declare const BaseSwitch: import("react").ForwardRefExoticComponent<BaseSwitchProps & import("react").RefAttributes<View>>;
|
|
15
21
|
//# sourceMappingURL=BaseSwitch.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSwitch.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/BaseSwitch.web.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseSwitch.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/BaseSwitch.web.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,kGA+BtB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import type { Switch as RNSwitch, View } from 'react-native';
|
|
1
2
|
import { type ISwitchProps } from '@cdx-ui/primitives';
|
|
2
3
|
import type { SwitchVariantProps } from './styles';
|
|
3
4
|
export interface SwitchProps extends ISwitchProps, SwitchVariantProps {
|
|
4
5
|
className?: string;
|
|
6
|
+
accessibilityLabel?: string;
|
|
7
|
+
onFocus?: () => void;
|
|
8
|
+
onBlur?: () => void;
|
|
5
9
|
}
|
|
6
|
-
export declare const Switch: import("
|
|
10
|
+
export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<View | RNSwitch>>;
|
|
7
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,WAAY,SAAQ,YAAY,EAAE,kBAAkB;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,yGAqClB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { Text, View, type TextProps, type ViewProps } from 'react-native';
|
|
3
|
-
import { type ITileGroupMultipleProps, type ITileGroupSingleProps, type ITileIndicatorProps, type ITileLeadingSlotProps, type ITileProps, type ITileTrailingSlotProps
|
|
3
|
+
import { useTileContext, type ITileGroupMultipleProps, type ITileGroupSingleProps, type ITileIndicatorProps, type ITileLeadingSlotProps, type ITileProps, type ITileTrailingSlotProps } from '@cdx-ui/primitives';
|
|
4
4
|
import { type TileGroupVariantProps, type TileVariantProps } from './styles';
|
|
5
5
|
/**
|
|
6
6
|
* Discriminated union mirroring `ITileGroupProps`, with `className` and layout variants added at
|
|
@@ -12,7 +12,7 @@ import { type TileGroupVariantProps, type TileVariantProps } from './styles';
|
|
|
12
12
|
* - `direction="column"` + `spacing="none"` — tight vertical stack (rows touch).
|
|
13
13
|
* - `direction="row"` + `spacing="default"` — side-by-side horizontal layout.
|
|
14
14
|
*
|
|
15
|
-
* `shape` (when set) is propagated to child `Tile`s via `
|
|
15
|
+
* `shape` (when set) is propagated to child `Tile`s via `ParentContext`, matching the
|
|
16
16
|
* Avatar size-propagation pattern. A per-tile `shape` prop overrides the inherited value.
|
|
17
17
|
*/
|
|
18
18
|
export interface TileGroupSingleProps extends ITileGroupSingleProps, TileGroupVariantProps {
|
|
@@ -32,27 +32,33 @@ export interface TileProps extends ITileProps, TileVariantProps {
|
|
|
32
32
|
}
|
|
33
33
|
declare const TileRoot: import("react").ForwardRefExoticComponent<TileProps & import("react").RefAttributes<View>>;
|
|
34
34
|
export interface TileLeadingSlotProps extends ITileLeadingSlotProps {
|
|
35
|
+
asChild?: boolean;
|
|
35
36
|
className?: string;
|
|
36
37
|
}
|
|
37
38
|
declare const TileLeadingSlot: import("react").ForwardRefExoticComponent<TileLeadingSlotProps & import("react").RefAttributes<View>>;
|
|
38
39
|
export interface TileContentProps extends ViewProps {
|
|
40
|
+
asChild?: boolean;
|
|
39
41
|
className?: string;
|
|
40
42
|
}
|
|
41
43
|
declare const TileContent: import("react").ForwardRefExoticComponent<TileContentProps & import("react").RefAttributes<View>>;
|
|
42
44
|
export interface TileTitleProps extends TextProps {
|
|
45
|
+
asChild?: boolean;
|
|
43
46
|
className?: string;
|
|
44
47
|
}
|
|
45
48
|
declare const TileTitle: import("react").ForwardRefExoticComponent<TileTitleProps & import("react").RefAttributes<Text>>;
|
|
46
49
|
export interface TileDescriptionProps extends TextProps {
|
|
50
|
+
asChild?: boolean;
|
|
47
51
|
className?: string;
|
|
48
52
|
}
|
|
49
53
|
declare const TileDescription: import("react").ForwardRefExoticComponent<TileDescriptionProps & import("react").RefAttributes<Text>>;
|
|
50
54
|
export interface TileIndicatorProps extends ITileIndicatorProps {
|
|
55
|
+
asChild?: boolean;
|
|
51
56
|
className?: string;
|
|
52
57
|
children?: ReactNode;
|
|
53
58
|
}
|
|
54
59
|
declare const TileIndicator: import("react").ForwardRefExoticComponent<TileIndicatorProps & import("react").RefAttributes<View>>;
|
|
55
60
|
export interface TileTrailingSlotProps extends ITileTrailingSlotProps {
|
|
61
|
+
asChild?: boolean;
|
|
56
62
|
className?: string;
|
|
57
63
|
}
|
|
58
64
|
declare const TileTrailingSlot: import("react").ForwardRefExoticComponent<TileTrailingSlotProps & import("react").RefAttributes<View>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tile/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Tile/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAML,cAAc,EACd,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EASL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACtB,MAAM,UAAU,CAAC;AAqBlB;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB,EAAE,qBAAqB;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACnC;AACD,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB,EAAE,qBAAqB;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACnC;AACD,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,CAAC;AAE3E,QAAA,MAAM,SAAS,iGAmBd,CAAC;AAQF,MAAM,WAAW,SAAU,SAAQ,UAAU,EAAE,gBAAgB;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,QAAQ,4FAqBb,CAAC;AAUF,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,uGAgBpB,CAAC;AAUF,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,WAAW,mGAahB,CAAC;AAMF,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,iGAcd,CAAC;AAIF,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,uGAapB,CAAC;AAuCF,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,qGAiBlB,CAAC;AAMF,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,gBAAgB,wGAarB,CAAC;AAIF,KAAK,YAAY,GAAG,OAAO,QAAQ,GAAG;IACpC,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,WAAW,EAAE,OAAO,eAAe,CAAC;IACpC,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,WAAW,EAAE,OAAO,eAAe,CAAC;IACpC,SAAS,EAAE,OAAO,aAAa,CAAC;IAChC,YAAY,EAAE,OAAO,gBAAgB,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,IAAI,EAQX,YAAY,CAAC;AAEnB,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Position hint accepted by icon/spinner-bearing styled slots
|
|
3
|
+
* (`Button.Icon`, `Button.Spinner`, `Chip.Icon`, etc.). Maps to a logical
|
|
4
|
+
* `data-icon` attribute that CVA targets for leading/trailing padding.
|
|
5
|
+
*
|
|
6
|
+
* `'leading'` → `data-icon="inline-start"`
|
|
7
|
+
* `'trailing'` → `data-icon="inline-end"`
|
|
8
|
+
*/
|
|
9
|
+
export type IconSlotPosition = 'leading' | 'trailing';
|
|
10
|
+
/**
|
|
11
|
+
* Returns the data-attribute spread props for the requested position, or
|
|
12
|
+
* `undefined` when no position is set (so the attribute is omitted entirely
|
|
13
|
+
* and baseline spacing applies).
|
|
14
|
+
*
|
|
15
|
+
* Spread the result onto the rendered element:
|
|
16
|
+
*
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Icon {...positionToDataIcon(position)} />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Spacing rules live in CVA variant strings, targeting the attribute via
|
|
22
|
+
* logical-property utilities so RTL flips automatically:
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* cva(['data-[icon=inline-start]:me-1.5 data-[icon=inline-end]:ms-1.5'], { ... });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function positionToDataIcon(position?: IconSlotPosition): Record<string, string> | undefined;
|
|
29
|
+
//# sourceMappingURL=positionToDataIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positionToDataIcon.d.ts","sourceRoot":"","sources":["../../../src/utils/positionToDataIcon.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,gBAAgB,sCAG7D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.66",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"@gorhom/bottom-sheet": "^5.2.6",
|
|
68
68
|
"class-variance-authority": "^0.7.1",
|
|
69
69
|
"uniwind": "1.6.1",
|
|
70
|
-
"@cdx-ui/
|
|
71
|
-
"@cdx-ui/
|
|
72
|
-
"@cdx-ui/
|
|
70
|
+
"@cdx-ui/utils": "0.0.1-beta.66",
|
|
71
|
+
"@cdx-ui/icons": "0.0.1-beta.66",
|
|
72
|
+
"@cdx-ui/primitives": "0.0.1-beta.66"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@react-navigation/bottom-tabs": "*",
|
|
@@ -98,6 +98,6 @@
|
|
|
98
98
|
"scripts": {
|
|
99
99
|
"build": "bob build",
|
|
100
100
|
"lint": "eslint src/",
|
|
101
|
-
"test": "jest --config ../../jest.config.js"
|
|
101
|
+
"test": "jest --config ../../jest.config.js --selectProjects rntl axe"
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import { useDialog } from '@cdx-ui/primitives';
|
|
3
|
+
import { Slot, useDialog } from '@cdx-ui/primitives';
|
|
4
4
|
import { composeEventHandlers } from '@cdx-ui/utils';
|
|
5
5
|
import { Button, type ButtonProps } from '../Button';
|
|
6
6
|
import { Dialog, type DialogRootProps } from '../Dialog';
|
|
@@ -45,12 +45,12 @@ export interface AlertDialogActionProps extends Omit<ButtonProps, 'variant'> {
|
|
|
45
45
|
|
|
46
46
|
const AlertDialogAction = forwardRef<View, AlertDialogActionProps>(
|
|
47
47
|
({ asChild = false, children, color = 'action', className, ...props }, ref) => {
|
|
48
|
-
if (asChild
|
|
49
|
-
return
|
|
50
|
-
ref
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
if (asChild) {
|
|
49
|
+
return (
|
|
50
|
+
<Slot ref={ref} className={className} {...props}>
|
|
51
|
+
{children}
|
|
52
|
+
</Slot>
|
|
53
|
+
);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
return (
|
|
@@ -75,13 +75,12 @@ const AlertDialogCancel = forwardRef<View, AlertDialogCancelProps>(
|
|
|
75
75
|
const { onOpenChange } = useDialog();
|
|
76
76
|
const handlePress = composeEventHandlers(onPress, () => onOpenChange(false));
|
|
77
77
|
|
|
78
|
-
if (asChild
|
|
79
|
-
return
|
|
80
|
-
ref
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
78
|
+
if (asChild) {
|
|
79
|
+
return (
|
|
80
|
+
<Slot ref={ref} onPress={handlePress} className={className} {...props}>
|
|
81
|
+
{children}
|
|
82
|
+
</Slot>
|
|
83
|
+
);
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
return (
|